Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +134 -0
- parse/dev/0I3su3mkuL/0I3su3mkuL_middle.json +0 -0
- parse/dev/0I3su3mkuL/0I3su3mkuL_model.json +0 -0
- parse/dev/0RDcd5Axok/0RDcd5Axok.md +365 -0
- parse/dev/0RDcd5Axok/0RDcd5Axok_middle.json +0 -0
- parse/dev/5hLP5JY9S2d/5hLP5JY9S2d.md +501 -0
- parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_content_list.json +0 -0
- parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_middle.json +0 -0
- parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_model.json +0 -0
- parse/dev/9EAQVEINuum/9EAQVEINuum_model.json +0 -0
- parse/dev/BSww-NrOzJ/BSww-NrOzJ.md +502 -0
- parse/dev/BSww-NrOzJ/BSww-NrOzJ_content_list.json +0 -0
- parse/dev/BSww-NrOzJ/BSww-NrOzJ_middle.json +0 -0
- parse/dev/BSww-NrOzJ/BSww-NrOzJ_model.json +0 -0
- parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH.md +630 -0
- parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_content_list.json +0 -0
- parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_middle.json +0 -0
- parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_model.json +0 -0
- parse/dev/I3mLa12s_H/I3mLa12s_H.md +270 -0
- parse/dev/I3mLa12s_H/I3mLa12s_H_content_list.json +1218 -0
- parse/dev/I3mLa12s_H/I3mLa12s_H_middle.json +0 -0
- parse/dev/I3mLa12s_H/I3mLa12s_H_model.json +0 -0
- parse/dev/JavFPcsscd5/JavFPcsscd5_model.json +0 -0
- parse/dev/LQnyIk5dUA/LQnyIk5dUA.md +0 -0
- parse/dev/LQnyIk5dUA/LQnyIk5dUA_content_list.json +0 -0
- parse/dev/LQnyIk5dUA/LQnyIk5dUA_middle.json +0 -0
- parse/dev/LQnyIk5dUA/LQnyIk5dUA_model.json +0 -0
- parse/dev/Nayau9fwXU/Nayau9fwXU_content_list.json +0 -0
- parse/dev/NnIaEaBfXD/NnIaEaBfXD.md +228 -0
- parse/dev/NnIaEaBfXD/NnIaEaBfXD_content_list.json +1165 -0
- parse/dev/NnIaEaBfXD/NnIaEaBfXD_middle.json +0 -0
- parse/dev/NnIaEaBfXD/NnIaEaBfXD_model.json +0 -0
- parse/dev/OgCcfc1m0TO/OgCcfc1m0TO_content_list.json +1336 -0
- parse/dev/OgCcfc1m0TO/OgCcfc1m0TO_middle.json +0 -0
- parse/dev/QYvFUlF19n/QYvFUlF19n_content_list.json +1365 -0
- parse/dev/QYvFUlF19n/QYvFUlF19n_middle.json +0 -0
- parse/dev/QYvFUlF19n/QYvFUlF19n_model.json +0 -0
- parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ.md +420 -0
- parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_content_list.json +0 -0
- parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_middle.json +0 -0
- parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_model.json +0 -0
- parse/dev/S9GpoS2TmN/S9GpoS2TmN.md +0 -0
- parse/dev/S9GpoS2TmN/S9GpoS2TmN_middle.json +0 -0
- parse/dev/TySnJ-0RdKI/TySnJ-0RdKI.md +0 -0
- parse/dev/TySnJ-0RdKI/TySnJ-0RdKI_content_list.json +0 -0
- parse/dev/TySnJ-0RdKI/TySnJ-0RdKI_model.json +0 -0
- parse/dev/UW5A3SweAH/UW5A3SweAH.md +0 -0
- parse/dev/UW5A3SweAH/UW5A3SweAH_content_list.json +984 -0
- parse/dev/UW5A3SweAH/UW5A3SweAH_middle.json +0 -0
- parse/dev/UW5A3SweAH/UW5A3SweAH_model.json +0 -0
.gitattributes
CHANGED
|
@@ -14883,3 +14883,137 @@ parse/train/FGqiDsBUKL0/FGqiDsBUKL0_span.pdf filter=lfs diff=lfs merge=lfs -text
|
|
| 14883 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14884 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14885 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14883 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14884 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14885 |
parse/train/5lhWG3Hj2By/5lhWG3Hj2By_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14886 |
+
parse/train/BJeguTEKDB/BJeguTEKDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14887 |
+
parse/train/BJeguTEKDB/BJeguTEKDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14888 |
+
parse/train/BJeguTEKDB/BJeguTEKDB_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14889 |
+
parse/train/NfZ6g2OmXEk/NfZ6g2OmXEk_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14890 |
+
parse/train/NfZ6g2OmXEk/NfZ6g2OmXEk_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14891 |
+
parse/train/NfZ6g2OmXEk/NfZ6g2OmXEk_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14892 |
+
parse/train/rytNfI1AZ/rytNfI1AZ_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14893 |
+
parse/train/rytNfI1AZ/rytNfI1AZ_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14894 |
+
parse/train/rytNfI1AZ/rytNfI1AZ_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14895 |
+
parse/train/H1gfOiAqYm/H1gfOiAqYm_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14896 |
+
parse/train/H1gfOiAqYm/H1gfOiAqYm_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14897 |
+
parse/train/H1gfOiAqYm/H1gfOiAqYm_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14898 |
+
parse/train/8E1-f3VhX1o/8E1-f3VhX1o_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14899 |
+
parse/train/8E1-f3VhX1o/8E1-f3VhX1o_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14900 |
+
parse/train/8E1-f3VhX1o/8E1-f3VhX1o_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14901 |
+
parse/train/TJSOfuZEd1B/TJSOfuZEd1B_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14902 |
+
parse/train/TJSOfuZEd1B/TJSOfuZEd1B_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14903 |
+
parse/train/TJSOfuZEd1B/TJSOfuZEd1B_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14904 |
+
parse/train/r1VdcHcxx/r1VdcHcxx_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14905 |
+
parse/train/r1VdcHcxx/r1VdcHcxx_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14906 |
+
parse/train/r1VdcHcxx/r1VdcHcxx_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14907 |
+
parse/train/N5hQI_RowVA/N5hQI_RowVA_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14908 |
+
parse/train/N5hQI_RowVA/N5hQI_RowVA_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14909 |
+
parse/train/N5hQI_RowVA/N5hQI_RowVA_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14910 |
+
parse/train/rq_Qr0c1Hyo/rq_Qr0c1Hyo_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14911 |
+
parse/train/rq_Qr0c1Hyo/rq_Qr0c1Hyo_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14912 |
+
parse/train/rq_Qr0c1Hyo/rq_Qr0c1Hyo_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14913 |
+
parse/train/HJlLKjR9FQ/HJlLKjR9FQ_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14914 |
+
parse/train/HJlLKjR9FQ/HJlLKjR9FQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14915 |
+
parse/train/HJlLKjR9FQ/HJlLKjR9FQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14916 |
+
parse/train/B1e7hs05Km/B1e7hs05Km_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14917 |
+
parse/train/B1e7hs05Km/B1e7hs05Km_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14918 |
+
parse/train/B1e7hs05Km/B1e7hs05Km_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14919 |
+
parse/train/JQznhE5mdyv/JQznhE5mdyv_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14920 |
+
parse/train/JQznhE5mdyv/JQznhE5mdyv_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14921 |
+
parse/train/JQznhE5mdyv/JQznhE5mdyv_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14922 |
+
parse/train/D1E1h-K3jso/D1E1h-K3jso_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14923 |
+
parse/train/D1E1h-K3jso/D1E1h-K3jso_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14924 |
+
parse/train/D1E1h-K3jso/D1E1h-K3jso_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14925 |
+
parse/train/U_mat0b9iv/U_mat0b9iv_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14926 |
+
parse/train/U_mat0b9iv/U_mat0b9iv_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14927 |
+
parse/train/U_mat0b9iv/U_mat0b9iv_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14928 |
+
parse/train/nWSZ30wrEw3/nWSZ30wrEw3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14929 |
+
parse/train/nWSZ30wrEw3/nWSZ30wrEw3_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14930 |
+
parse/train/nWSZ30wrEw3/nWSZ30wrEw3_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14931 |
+
parse/train/H1edEyBKDS/H1edEyBKDS_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14932 |
+
parse/train/H1edEyBKDS/H1edEyBKDS_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14933 |
+
parse/train/H1edEyBKDS/H1edEyBKDS_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14934 |
+
parse/train/HyxFF34FPr/HyxFF34FPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14935 |
+
parse/train/HyxFF34FPr/HyxFF34FPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14936 |
+
parse/train/HyxFF34FPr/HyxFF34FPr_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14937 |
+
parse/train/Sys6GJqxl/Sys6GJqxl_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14938 |
+
parse/train/Sys6GJqxl/Sys6GJqxl_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14939 |
+
parse/train/Sys6GJqxl/Sys6GJqxl_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14940 |
+
parse/train/zbEupOtJFF/zbEupOtJFF_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14941 |
+
parse/train/zbEupOtJFF/zbEupOtJFF_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14942 |
+
parse/train/zbEupOtJFF/zbEupOtJFF_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14943 |
+
parse/train/zQTezqCCtNx/zQTezqCCtNx_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14944 |
+
parse/train/Tsp2PL7-GQ/Tsp2PL7-GQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14945 |
+
parse/train/rJg4YGWRb/rJg4YGWRb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14946 |
+
parse/train/rJg4YGWRb/rJg4YGWRb_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14947 |
+
parse/train/rJg4YGWRb/rJg4YGWRb_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14948 |
+
parse/train/rkgNKkHtvB/rkgNKkHtvB_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14949 |
+
parse/train/rkgNKkHtvB/rkgNKkHtvB_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14950 |
+
parse/train/rkgNKkHtvB/rkgNKkHtvB_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14951 |
+
parse/train/rJevYoA9Fm/rJevYoA9Fm_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14952 |
+
parse/train/rJevYoA9Fm/rJevYoA9Fm_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14953 |
+
parse/train/rJevYoA9Fm/rJevYoA9Fm_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14954 |
+
parse/train/S1gOpsCctm/S1gOpsCctm_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14955 |
+
parse/train/S1gOpsCctm/S1gOpsCctm_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14956 |
+
parse/train/S1gOpsCctm/S1gOpsCctm_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14957 |
+
parse/train/Sks9_ajex/Sks9_ajex_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14958 |
+
parse/train/Sks9_ajex/Sks9_ajex_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14959 |
+
parse/train/Sks9_ajex/Sks9_ajex_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14960 |
+
parse/train/S1q_Cz-Cb/S1q_Cz-Cb_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14961 |
+
parse/train/S1q_Cz-Cb/S1q_Cz-Cb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14962 |
+
parse/train/S1q_Cz-Cb/S1q_Cz-Cb_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14963 |
+
parse/train/rJgzzJHtDB/rJgzzJHtDB_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14964 |
+
parse/train/rJgzzJHtDB/rJgzzJHtDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14965 |
+
parse/train/rJgzzJHtDB/rJgzzJHtDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14966 |
+
parse/train/rJljdh4KDH/rJljdh4KDH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14967 |
+
parse/train/rJljdh4KDH/rJljdh4KDH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14968 |
+
parse/train/rJljdh4KDH/rJljdh4KDH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14969 |
+
parse/train/rJxGLlBtwH/rJxGLlBtwH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14970 |
+
parse/train/rJxGLlBtwH/rJxGLlBtwH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14971 |
+
parse/train/rJxGLlBtwH/rJxGLlBtwH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14972 |
+
parse/train/ZIyj0E58vzlo/ZIyj0E58vzlo_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14973 |
+
parse/train/ZIyj0E58vzlo/ZIyj0E58vzlo_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14974 |
+
parse/train/ZIyj0E58vzlo/ZIyj0E58vzlo_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14975 |
+
parse/train/k-0oq5eNjh/k-0oq5eNjh_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14976 |
+
parse/train/k-0oq5eNjh/k-0oq5eNjh_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14977 |
+
parse/train/k-0oq5eNjh/k-0oq5eNjh_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14978 |
+
parse/train/SkxpDT4YvS/SkxpDT4YvS_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14979 |
+
parse/train/SkxpDT4YvS/SkxpDT4YvS_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14980 |
+
parse/train/SkxpDT4YvS/SkxpDT4YvS_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14981 |
+
parse/train/Yx1OzVU_SRi/Yx1OzVU_SRi_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14982 |
+
parse/train/Yx1OzVU_SRi/Yx1OzVU_SRi_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14983 |
+
parse/train/Yx1OzVU_SRi/Yx1OzVU_SRi_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14984 |
+
parse/train/rJg76kStwH/rJg76kStwH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14985 |
+
parse/train/rJg76kStwH/rJg76kStwH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14986 |
+
parse/train/rJg76kStwH/rJg76kStwH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14987 |
+
parse/train/BkVsWbbAW/BkVsWbbAW_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14988 |
+
parse/train/BkVsWbbAW/BkVsWbbAW_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14989 |
+
parse/train/BkVsWbbAW/BkVsWbbAW_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14990 |
+
parse/train/BJg73xHtvr/BJg73xHtvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14991 |
+
parse/train/BJg73xHtvr/BJg73xHtvr_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14992 |
+
parse/train/BJg73xHtvr/BJg73xHtvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14993 |
+
parse/train/Skeh1krtvH/Skeh1krtvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14994 |
+
parse/train/Skeh1krtvH/Skeh1krtvH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14995 |
+
parse/train/Skeh1krtvH/Skeh1krtvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14996 |
+
parse/train/HJgSwyBKvr/HJgSwyBKvr_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14997 |
+
parse/train/HJgSwyBKvr/HJgSwyBKvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14998 |
+
parse/train/HJgSwyBKvr/HJgSwyBKvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 14999 |
+
parse/train/wS0UFjsNYjn/wS0UFjsNYjn_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15000 |
+
parse/train/wS0UFjsNYjn/wS0UFjsNYjn_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15001 |
+
parse/train/wS0UFjsNYjn/wS0UFjsNYjn_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15002 |
+
parse/train/H1g0Z3A9Fm/H1g0Z3A9Fm_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15003 |
+
parse/train/H1g0Z3A9Fm/H1g0Z3A9Fm_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15004 |
+
parse/train/H1g0Z3A9Fm/H1g0Z3A9Fm_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15005 |
+
parse/train/SJlHwkBYDH/SJlHwkBYDH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15006 |
+
parse/train/SJlHwkBYDH/SJlHwkBYDH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15007 |
+
parse/train/SJlHwkBYDH/SJlHwkBYDH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15008 |
+
parse/train/B1lDoJSYDH/B1lDoJSYDH_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15009 |
+
parse/train/B1lDoJSYDH/B1lDoJSYDH_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15010 |
+
parse/train/B1lDoJSYDH/B1lDoJSYDH_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15011 |
+
parse/train/H1zriGeCZ/H1zriGeCZ_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15012 |
+
parse/train/H1zriGeCZ/H1zriGeCZ_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15013 |
+
parse/train/H1zriGeCZ/H1zriGeCZ_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15014 |
+
parse/train/BkCV_W-AZ/BkCV_W-AZ_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15015 |
+
parse/train/BkCV_W-AZ/BkCV_W-AZ_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15016 |
+
parse/train/BkCV_W-AZ/BkCV_W-AZ_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15017 |
+
parse/train/_WnGcwXLYOE/_WnGcwXLYOE_span.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15018 |
+
parse/train/_WnGcwXLYOE/_WnGcwXLYOE_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 15019 |
+
parse/train/_WnGcwXLYOE/_WnGcwXLYOE_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
parse/dev/0I3su3mkuL/0I3su3mkuL_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/0I3su3mkuL/0I3su3mkuL_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/0RDcd5Axok/0RDcd5Axok.md
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TOWARDS A UNIFIED VIEW OF PARAMETER-EFFICIENT TRANSFER LEARNING
|
| 2 |
+
|
| 3 |
+
Junxian $\mathbf { H e } ^ { * }$ Carnegie Mellon University junxianh@cs.cmu.edu
|
| 4 |
+
|
| 5 |
+
Chunting Zhou∗ Carnegie Mellon University chuntinz@cs.cmu.edu
|
| 6 |
+
|
| 7 |
+
Xuezhe Ma University of Southern California xuezhema@isi.edu
|
| 8 |
+
|
| 9 |
+
Taylor Berg-Kirkpatrick UC San Diego tberg@eng.ucsd.edu
|
| 10 |
+
|
| 11 |
+
Graham Neubig Carnegie Mellon University gneubig@cs.cmu.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Fine-tuning large pretrained language models on downstream tasks has become the de-facto learning paradigm in NLP. However, conventional approaches finetune all the parameters of the pretrained model, which becomes prohibitive as the model size and the number of tasks grow. Recent work has proposed a variety of parameter-efficient transfer learning methods that only fine-tune a small number of (extra) parameters to attain strong performance. While effective, the critical ingredients for success and the connections among the various methods are poorly understood. In this paper, we break down the design of state-of-the-art parameter-efficient transfer learning methods and present a unified framework that establishes connections between them. Specifically, we re-frame them as modifications to specific hidden states in pretrained models, and define a set of design dimensions along which different methods vary, such as the function to compute the modification and the position to apply the modification. Through comprehensive empirical studies across machine translation, text summarization, language understanding, and text classification benchmarks, we utilize the unified view to identify important design choices in previous methods. Furthermore, our unified framework enables the transfer of design elements across different approaches, and as a result we are able to instantiate new parameter-efficient fine-tuning methods that tune less parameters than previous methods while being more effective, achieving comparable results to fine-tuning all parameters on all four tasks.1
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Transfer learning from pre-trained language models (PLMs) is now the prevalent paradigm in natural language processing, yielding strong performance on many tasks (Peters et al., 2018; Devlin et al., 2019; Qiu et al., 2020). The most common way to adapt general-purpose PLMs to downstream tasks is to fine-tune all the model parameters (full fine-tuning). However, this results in a separate copy of fine-tuned model parameters for each task, which is prohibitively expensive when serving models that perform a large number of tasks. This issue is particularly salient with the ever-increasing size of PLMs, which now range from hundreds of millions (Radford et al., 2019; Lewis et al., 2020) to hundreds of billions (Brown et al., 2020) or even trillions of parameters (Fedus et al., 2021).
|
| 20 |
+
|
| 21 |
+
To mitigate this issue, a few lightweight alternatives have been proposed to update only a small number of extra parameters while keeping most pretrained parameters frozen. For example, adapter tuning (Houlsby et al., 2019) inserts small neural modules called adapters to each layer of the pretrained network and only the adapters are trained at fine-tuning time. Inspired by the success of prompting methods that control PLMs through textual prompts (Brown et al., 2020; Liu et al., 2021a), prefix tuning (Li & Liang, 2021) and prompt tuning (Lester et al., 2021) prepend an additional $l$ tunable prefix tokens to the input or hidden layers and only train these soft prompts when fine-tuning on downstream tasks. More recently, Hu et al. (2021) learn low-rank matrices to approximate parameter updates. We illustrate these methods in Figure 1. These approaches have all been reported to demonstrate comparable performance to full fine-tuning on different sets of tasks, often through updating less than $1 \%$ of the original model parameters. Besides parameter savings, parameter-efficient tuning makes it possible to quickly adapt to new tasks without catastrophic forgetting (Pfeiffer et al., 2021) and often exhibits superior robustness in out-of-distribution evaluation (Li & Liang, 2021).
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Illustration of the transformer architecture and several state-of-the-art parameter-efficient tuning methods. We use blocks with dashed borderlines to represent the added modules by those methods.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 2: Performance of different methods on the XSum (Narayan et al., 2018) summarization task. The number of fine-tuned parameters is relative to the tuned parameters in full fine-tuning.
|
| 28 |
+
|
| 29 |
+
However, we contend that the important ingredients that contribute to the success of these parameterefficient tuning methods are poorly understood, and the connections between them are still unclear. In this paper, we aim to answer three questions: (1) How are these methods connected? (2) Do these methods share design elements that are essential for their effectiveness, and what are they? (3) Can the effective ingredients of each method be transferred to others to yield more effective variants?
|
| 30 |
+
|
| 31 |
+
In order to answer these questions, we first derive an alternative form of prefix tuning that reveals prefix tuning’s close connections with adapters (§3.1). Based on this we then devise a unified framework that frames the aforementioned methods as different ways to modify the hidden representations of frozen PLMs (§3.2). Our unified framework decomposes previous methods along a shared set of design dimensions, such as the function used to perform the modification, the position in which to impose this modification, and how to integrate the modification. This framework allows us to transfer design choices across approaches to propose new variants such as adapters with multiple heads (§3.3). In experiments, we first show that existing parameter-efficient tuning methods still lag behind full fine-tuning on higher-resource and challenging tasks (§4.2), as exemplified in Figure 2. Then we utilize the unified framework to identify critical design choices and validate the proposed variants empirically (§4.3-4.6). Our experiments on four NLP benchmarks covering text summarization, machine translation (MT), text classification, and general language understanding, demonstrate that the proposed variant uses less parameters than existing methods while being more effective, matching full fine-tuning results on all four tasks.
|
| 32 |
+
|
| 33 |
+
# 2 PRELIMINARIES
|
| 34 |
+
|
| 35 |
+
# 2.1 RECAP OF THE TRANSFORMER ARCHITECTURE
|
| 36 |
+
|
| 37 |
+
The transformer model (Vaswani et al., 2017) is now the workhorse architecture behind most stateof-the-art PLMs. In this section we recap the equations of this model for completeness. Transformer models are composed of $L$ stacked blocks, where each block (Figure 1) contains two types of sub
|
| 38 |
+
|
| 39 |
+
layers: multi-head self-attention and a fully connected feed-forward network (FFN).2 The conventional attention function maps queries $\boldsymbol { Q } \in \mathbb { R } ^ { n \times d _ { k } }$ and key-value pairs $\pmb { K } \in \mathbb { R } ^ { m \times d _ { k } } , \pmb { V } \in \mathbb { R } ^ { m \times d _ { v } }$
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\mathrm { A t t n } ( Q , K , V ) = \mathrm { s o f t m a x } \big ( \frac { Q K ^ { T } } { \sqrt { d _ { k } } } \big ) V ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $n$ and $m$ are the number of queries and key-value pairs respectively. Multi-head attention performs the attention function in parallel over $N _ { h }$ heads, where each head is separately parameterized by $W _ { q } ^ { ( i ) }$ , $\boldsymbol { W } _ { k } ^ { ( i ) }$ , $W _ { v } ^ { ( i ) } \in \mathbb { R } ^ { d \times d _ { h } }$ to project inputs to queries, keys, and values. Given a sequence of $m$ vectors $C \in \mathbb { R } ^ { m \times d }$ over which we would like to perform attention and a query vector $\pmb { x } \in \mathbb { R } ^ { d }$ , multi-head attention (MHA) computes the output on each head and concatenates them:3
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\mathrm { M H A } ( C , { \pmb x } ) = \mathrm { C o n c a t } ( \mathrm { h e a d } _ { 1 } , \cdots , \mathrm { h e a d } _ { \mathrm { h } } ) { \pmb W } _ { o } , \ \mathrm { h e a d } _ { \mathrm { i } } = \mathrm { A t t n } ( { \pmb x } { \pmb W } _ { q } ^ { ( i ) } , C { \pmb W } _ { k } ^ { ( i ) } , C { \pmb W } _ { v } ^ { ( i ) } ) ,
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $W _ { o } \in \mathbb { R } ^ { d \times d }$ . $d$ is the model dimension, and in MHA $d _ { h }$ is typically set to $d / N _ { h }$ to save parameters, which indicates that each attention head is operating on a lower-dimensional space. The other important sublayer is the fully connected feed-forward network (FFN) which consists of two linear transformations with a ReLU activation function in between:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathrm { F F N } ( \pmb { x } ) = \mathrm { R e L U } ( \pmb { x } \pmb { W } _ { 1 } + \pmb { b } _ { 1 } ) \pmb { W } _ { 2 } + \pmb { b } _ { 2 } ,
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $W _ { 1 } \in \mathbb { R } ^ { d \times d _ { m } }$ , $W _ { 2 } \in \mathbb { R } ^ { d _ { m } \times d }$ . Transformers typically use a large $d _ { m }$ , e.g. $d _ { m } = 4 d$ . Finally, a residual connection is used followed by layer normalization (Ba et al., 2016).
|
| 58 |
+
|
| 59 |
+
# 2.2 OVERVIEW OF PREVIOUS PARAMETER-EFFICIENT TUNING METHODS
|
| 60 |
+
|
| 61 |
+
Below and in Figure 1, we introduce several state-of-the-art parameter-efficient tuning methods.
|
| 62 |
+
Unless otherwise specified, they only tune the added parameters while the PLM’s are frozen.
|
| 63 |
+
|
| 64 |
+
Adapters (Houlsby et al., 2019): The adapter approach inserts small modules (adapters) between transformer layers. The adapter layer generally uses a down-projection with $W _ { \mathrm { d o w n } } \ \in \ \mathbb { R } ^ { d \times r }$ to project the input $^ { h }$ to a lower-dimensional space specified by bottleneck dimension $r$ , followed by a nonlinear activation function $f ( \cdot )$ , and a up-projection with $W _ { \mathsf { u p } } \in \mathbb { R } ^ { r \times d }$ . These adapters are surrounded by a residual connection, leading to a final form:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
h h + f ( h W _ { \mathrm { d o w n } } ) W _ { \mathrm { u p } } .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
Houlsby et al. (2019) places two adapters sequentially within one layer of the transformer, one after the multi-head attention and one after the FFN sub-layer. Pfeiffer et al. (2021) have proposed a more efficient adapter variant that is inserted only after the FFN “add & layer norm” sub-layer.
|
| 71 |
+
|
| 72 |
+
Prefix Tuning (Li & Liang, 2021): Inspired by the success of textual prompting methods (Liu et al., 2021a), prefix tuning prepends $l$ tunable prefix vectors to the keys and values of the multihead attention at every layer. Specifically, two sets of prefix vectors $P _ { k } , \dot { P } _ { v } \in \mathbb R ^ { l \times d }$ are concatenated with the original key $\kappa$ and value $V$ . Then multi-head attention is performed on the new prefixed keys and values. The computation of ${ \mathrm { h e a d } } _ { i }$ in Eq. 2 becomes:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\mathrm { h e a d } _ { i } = \mathrm { A t t n } ( \pmb { x } \pmb { W } _ { q } ^ { ( i ) } , \mathrm { c o n c a t } ( \pmb { P } _ { k } ^ { ( i ) } , \pmb { C } \pmb { W } _ { k } ^ { ( i ) } ) , \mathrm { c o n c a t } ( \pmb { P } _ { v } ^ { ( i ) } , \pmb { C } \pmb { W } _ { v } ^ { ( i ) } ) ) ,
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
$P _ { k }$ and $P _ { v }$ are split into $N _ { h }$ head vectors respectively and $P _ { k } ^ { ( i ) } , P _ { v } ^ { ( i ) } \in \mathbb R ^ { l \times d / N _ { h } }$ denote the $i$ -th head vector. Prompt-tuning (Lester et al., 2021) simplifies prefix-tuning by only prepending to the input word embeddings in the first layer; similar work also includes $\mathrm { \bf P }$ -tuning (Liu et al., 2021b).
|
| 79 |
+
|
| 80 |
+
LoRA (Hu et al., 2021): LoRA injects trainable low-rank matrices into transformer layers to approximate the weight updates. For a pre-trained weight matrix $W \in \mathbb { R } ^ { d \times k }$ , LoRA represents its update with a low-rank decomposition $W + \Delta W = W + W _ { \mathrm { d o w n } } W _ { \mathrm { u p } }$ , where $W _ { \mathrm { d o w n } } \in \mathbb { R } ^ { \hat { d } \times r }$ , $W _ { \mathrm { u p } } \in$ $\mathbb { R } ^ { r \times k }$ are tunable parameters. LoRA applies this update to the query and value projection matrices $\left( W _ { q } , W _ { v } \right)$ in the multi-head attention sub-layer, as shown in Figure 1. For a specific input $_ { \textbf { \em x } }$ to the linear projection in multi-head attention, LoRA modifies the projection output $^ { h }$ as:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
h h + s \cdot x W _ { \mathrm { d o w n } } W _ { \mathrm { u p } } ,
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 3: Graphical illustration of existing methods and the proposed variants. “PLM module” represents a certain sublayer of the PLM (e.g. attention or FFN) that is frozen. “Scaled PA” denotes scaled parallel adapter. We do not include multi-head parallel adapter here to save space.
|
| 88 |
+
|
| 89 |
+
where $s \geq 1$ is a tunable scalar hyperparameter.4
|
| 90 |
+
|
| 91 |
+
Others: Other parameter-efficient tuning methods include BitFit (Ben Zaken et al., 2021), which only fine-tunes bias vectors in the pre-trained model, and diff-pruning (Guo et al., 2021), which learns a sparse parameter update vector.
|
| 92 |
+
|
| 93 |
+
# 3 BRIDGING THE GAP – A UNIFIED VIEW
|
| 94 |
+
|
| 95 |
+
We first derive an equivalent form of prefix tuning to establish its connection with adapters. We then propose a unified framework for parameter-efficient tuning that includes several state-of-the-art methods as instantiations.
|
| 96 |
+
|
| 97 |
+
# 3.1 A CLOSER LOOK AT PREFIX TUNING
|
| 98 |
+
|
| 99 |
+
Eq. 5 describes the mechanism of prefix tuning which changes the attention module through prepending $l$ learnable vectors to the original attention keys and values. Here, we derive an equivalent form of Eq. 5 and provide an alternative view of prefix tuning:5
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\begin{array} { r l } & { \mathrm { h e a d } = \mathrm { A t } \mathrm { t n } ( x W _ { q } , \mathrm { c o n c a t } ( P _ { k } , C W _ { k } ) , \mathrm { c o n c a t } ( P _ { v } , C W _ { v } ) ) } \\ & { \ = \mathrm { s o f t m a x } \big ( x W _ { q } \mathrm { c o n c a t } ( P _ { k } , C W _ { k } ) ^ { \top } \big ) \Big [ \begin{array} { l } { P _ { v } } \\ { C W _ { v } } \end{array} \Big ] } \\ & { \ = ( 1 - \lambda ( \pmb { x } ) ) \mathrm { s o f t m a x } ( { \pmb x } W _ { q } W _ { k } ^ { \top } C ^ { \top } ) C W _ { v } + \lambda ( { \pmb x } ) \mathrm { s o f t m a x } ( { \pmb x } W _ { q } P _ { k } ^ { \top } ) P _ { v } } \\ & { \ = ( 1 - \lambda ( \pmb { x } ) ) \underbrace { \mathrm { A t t n } ( { \pmb x } W _ { q } , C W _ { k } , C W _ { v } ) } _ { \mathrm { s t a n d a r d a t e n t i o n } } + \lambda ( \pmb { x } ) \underbrace { \mathrm { A t t n } ( { \pmb x } W _ { q } , P _ { k } , P _ { v } ) } _ { \mathrm { i n d e p e n d e n t o f } C } , } \end{array}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $\lambda ( { \pmb x } )$ is a scalar that represents the sum of normalized attention weights on the prefixes:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\lambda ( \pmb { x } ) = \frac { \sum _ { i } \exp ( \pmb { x } \pmb { W _ { q } } \pmb { P } _ { k } ^ { \top } ) _ { i } } { \sum _ { i } \exp ( \pmb { x } \pmb { W _ { q } } \pmb { P } _ { k } ^ { \top } ) _ { i } + \sum _ { j } \exp ( \pmb { x } \pmb { W _ { q } } \pmb { W } _ { k } ^ { \top } \pmb { C } ^ { \top } ) _ { j } } .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
Note that the first term in Eq. 7, $\mathrm { A t t n } ( x W _ { q } , C W _ { k } , C W _ { v } )$ , is the original attention without prefixes, whereas the second term is a position-wise modification independent of $C$ . Eq. 7 gives an alternative view of prefix tuning that essentially applies a position-wise modification to the original head attention output $^ { h }$ through linear interpolation:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\begin{array} { r } { \pmb { h } ( 1 - \lambda ( \pmb { x } ) ) \pmb { h } + \lambda ( \pmb { x } ) \Delta \pmb { h } , \quad \Delta \pmb { h } : = \mathrm { s o f t m a x } ( \pmb { x } \pmb { W } _ { q } \pmb { P } _ { k } ^ { \top } ) \pmb { P } _ { v } . } \end{array}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
The Connection with Adapters: We define $W _ { 1 } { = } W _ { q } P _ { k } ^ { \top }$ , $W _ { 2 } { = } P _ { v }$ , $f \colon$ =softmax, and rewrite Eq. 9:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\begin{array} { r } { \pmb { h } ( 1 - \lambda ( \pmb { x } ) ) \pmb { h } + \lambda ( \pmb { x } ) f ( \pmb { x } \pmb { W } _ { 1 } ) \pmb { W } _ { 2 } , } \end{array}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
which reaches a very similar form to the adapter function in Eq. 4, except that prefix tuning is performing weighted addition while the adapter one is unweighted.6 Figure 3b demonstrates the computation graph of prefix tuning from this view, which allows for abstraction of prefix tuning as a plug-in module like adapters. Further, we note that $W _ { 1 } \in \mathbb { R } ^ { d _ { h } \times l }$ and $W _ { 2 } \in \mathbb { R } ^ { l ^ { \cdot } \times d _ { h } }$ are lowrank matrices when $l$ is small, and thus they function similarly to the $W _ { \mathrm { d o w n } }$ and $W _ { \mathrm { u p } }$ matrices in adapters. This view also suggests that the number of prefix vectors, $l$ , plays a similar role to the bottleneck dimension $r$ in adapters: they both represent the rank limitation of computing the modification vector $\Delta h$ . Thus we also refer $l$ as the bottleneck dimension. Intuitively, the rank limitation implies that $\Delta h$ is a linear combination of the same $l$ (or $\leq l$ ) basis vectors for any $_ { \textbf { \em x } }$ .
|
| 124 |
+
|
| 125 |
+
Table 1: Parameter-efficient tuning methods decomposed along the defined design dimensions. Here, for clarity, we directly write the adapter nonlinear function as ReLU which is commonly used. The bottom part of the table exemplifies new variants by transferring design choices of existing approaches.
|
| 126 |
+
|
| 127 |
+
<table><tr><td>Method</td><td>△h functional form</td><td>insertion form</td><td>modified representation</td><td>composition function</td></tr><tr><td colspan="5">Existing Methods</td></tr><tr><td>Prefix Tuning</td><td> softmax(xWqPT)Pu</td><td>parallel</td><td>head attn</td><td>h←(1-λ)h+λ△h</td></tr><tr><td>Adapter</td><td>ReLU(hWdown)Wup</td><td>sequential</td><td>ffn/attn</td><td>h←h+△h</td></tr><tr><td>LoRA</td><td>xWdownWup</td><td>parallel</td><td>attn key/val</td><td>h←h+s·△h</td></tr><tr><td colspan="5">Proposed Variants</td></tr><tr><td>Parallel adapter</td><td>ReLU(hWdown)Wup</td><td>parallel</td><td>ffn/attn</td><td>h←h+△h</td></tr><tr><td>Muti-head parallel adapter</td><td>ReLU(hWdown)Wup</td><td>parallel</td><td>head attn</td><td>h←h+△h</td></tr><tr><td>Scaled parallel adapter</td><td>ReLU(hWdown)Wup</td><td>parallel</td><td>ffn/attn</td><td>h←h+s·△h</td></tr></table>
|
| 128 |
+
|
| 129 |
+
The Difference from Adapters: In addition to the gating variable $\lambda$ , we emphasize three differences between prefix tuning and adapters. (1) As demonstrated in Figure 3, prefix tuning uses $_ { \textbf { \em x } }$ , the input of the PLM layer, to compute $\Delta h$ , while adapters use $^ { h }$ , the output of the PLM layer. Thus, prefix tuning can be thought of as a “parallel” computation to the PLM layer, whereas the typical adapter is “sequential” computation. (2) Adapters are more flexible with respect to where they are inserted than prefix tuning: adapters typically modify attention or FFN outputs, while prefix tuning only modifies the attention output of each head. Empirically, this makes a large difference as we will show in $\ S 4 . 4$ . (3) Eq. 10 applies to each attention head, while adapters are always single-headed, which makes prefix tuning more expressive: head attention is of dimension $d / \dot { N _ { h } }$ – basically we have full rank updates to each attention head if $l \geq d / N _ { h }$ , but we only get full-rank updates to the whole attention output with adapters if $r \geq d$ . Notably, prefix tuning is not adding more parameters than adapters when ${ \dot { l } } = r$ .7 We empirically validate such multi-head influence in $\ S 4 . 4$ .
|
| 130 |
+
|
| 131 |
+
# 3.2 THE UNIFIED FRAMEWORK
|
| 132 |
+
|
| 133 |
+
Inspired by the connections between prefix tuning and adapters, we propose a general framework that aims to unify several state-of-the-art parameter-efficient tuning methods. Specifically, we cast them as learning a modification vector $\Delta h$ , which is applied to various hidden representations. Formally, we denote the hidden representation to be directly modified as $^ { h }$ , and the direct input to the PLM sub-module that computes $^ { h }$ as $_ { \textbf { \em x } }$ (e.g. $^ { h }$ and $_ { \textbf { \em x } }$ can be the attention output and input respectively). To characterize this modification process, we define a set of design dimensions, and different methods can be instantiated by varying values along these dimensions. We detail the design dimensions below, and illustrate how adapters, prefix tuning, and LoRA fall along them in Table 1:
|
| 134 |
+
|
| 135 |
+
Functional Form is the specific function that computes $\Delta h$ . We have detailed the functional form for adapters, prefix tuning, and LoRA in Eq. 4, 6, and 10 respectively. The functional forms of all these methods are similar with a proj down nonlinear $\to \mathsf { p r o j }$ up architecture, while “nonlinear” degenerates to the identity function in LoRA.
|
| 136 |
+
|
| 137 |
+
Modified Representation indicates which hidden representation is directly modified.8
|
| 138 |
+
|
| 139 |
+
Insertion Form is how the added module is inserted into the network. As mentioned in the previous section and shown in Figure 3, traditionally adapters are inserted at a position in a sequential manner, where both the input and output are $^ { h }$ . Prefix tuning and LoRA – although not originally described in this way – turn out to be equivalent to a parallel insertion where $_ { \textbf { \em x } }$ is the input.
|
| 140 |
+
|
| 141 |
+
Composition Function is how the modified vector $\Delta h$ is composed with the original hidden representation $^ { h }$ to form the new hidden representation. For example, adapters perform simple additive composition, prefix tuning uses a gated additive composition as shown in Eq. 10, and LoRA scales $\Delta h$ by a constant factor and adds it to the original hidden representation as in Eq. 6.
|
| 142 |
+
|
| 143 |
+
We note that many other methods not present in Table 1 fit into this framework as well. For example, prompt tuning modifies the head attention in the first layer in a way similar to prefix tuning, and various adapter variants (Pfeiffer et al., 2021; Mahabadi et al., 2021) can be represented in a similar way as adapters. Critically, the unified framework allows us to study parameter-efficient tuning methods along these design dimensions, identify the critical design choices, and potentially transfer design elements across approaches, as in the following section.
|
| 144 |
+
|
| 145 |
+
# 3.3 TRANSFERRING DESIGN ELEMENTS
|
| 146 |
+
|
| 147 |
+
Here, and in Figure 3, we describe just a few novel methods that can be derived through our unified view above by transferring design elements across methods: (1) Parallel Adapter is the variant by transferring the parallel insertion of prefix tuning into adapters. Interestingly, while we motivate the parallel adapter due to its similarity to prefix tuning, concurrent work (Zhu et al., 2021) independently proposed this variant and studied it empirically; (2) Multi-head Parallel Adapter is a further step to make adapters more similar to prefix tuning: we apply parallel adapters to modify head attention outputs as prefix tuning. This way the variant improves the capacity for free by utilizing the multi-head projections as we discuss in $\ S 3 . 1$ . (3) Scaled Parallel Adapter is the variant by transferring the composition and insertion form of LoRA into adapters, as shown in Figure 3e.
|
| 148 |
+
|
| 149 |
+
Our discussion and formulation so far raise a few questions: Do methods varying the design elements above exhibit distinct properties? Which design dimensions are particularly important? Do the novel methods described above yield better performance? We answer these questions next.
|
| 150 |
+
|
| 151 |
+
# 4 EXPERIMENTS
|
| 152 |
+
|
| 153 |
+
# 4.1 GENERAL SETUP
|
| 154 |
+
|
| 155 |
+
Datasets: We study four downstream tasks: (1) XSum (Narayan et al., 2018) is an English summarization dataset where models predict a summary given a news article; (2) English to Romanian translation using the WMT 2016 en-ro dataset (Bojar et al., 2016); (3) MNLI (Williams et al., 2018) is an English natural language inference dataset where models predict whether one sentence entails, contradicts, or is neutral to another. (4) SST2 (Socher et al., 2013) is an English sentiment classification benchmark where models predict whether a sentence’s sentiment is positive or negative.
|
| 156 |
+
|
| 157 |
+
Setup: We use ${ \tt B A R T } _ { \tt L A R G E }$ (Lewis et al., 2020) and a multilingual version of it, mBARTLARGE (Liu et al., 2020a), as the underlying pretrained models for XSum and en-ro translation respectively, and we use RoBERTaBASE (Liu et al., 2019) for MNLI and SST2. We vary the bottleneck dimension within $\{ 1 , 3 0 , 2 0 0 , 5 1 2 , 1 0 2 4 \}$ if needed.9 We mainly study adapters, prefix tuning (prefix), and LoRA which greatly outperform bitfit and prompt tuning in our experiments. In the analysis sections $( \ S 4 . 3 – 4 . 5 )$ we insert adapters either at the attention or FFN layers for easier analysis, but include the results of inserting at both places in the final comparison (§4.6). We re-implement these methods based on their respective public code.10 We use the huggingface transformers library (Wolf et al., 2020) for our implementation. Complete setup details can be found in Appendix A.
|
| 158 |
+
|
| 159 |
+
Evaluation: We report ROUGE $1 / 2 / \mathrm { L }$ scores (R-1/2/L, Lin (2004)) on the XSum test set, BLEU scores (Papineni et al., 2002) on the en-ro test set, and accuracy on the MNLI and SST2 dev set. For MNLI and SST2, we take the median of five random runs. We also report the number of tuned parameters relative to that in full fine-tuning (#params).
|
| 160 |
+
|
| 161 |
+
Number of Tunable Parameters: BART and mBART have an encoder-decoder structure that has three types of attention: encoder self-attention, decoder self-attention, and decoder cross-attention. RoBERTa only has encoder self-attention. For each attention sub-layer, the number of parameters used of each method is: (1) prefix tuning prepends $l$ vectors to the keys and values and uses $2 \times l \times d$ parameters; (2) adapter has $W _ { \mathrm { d o w n } }$ and $W _ { \mathrm { u p } }$ thus uses $2 \times r \times d$ parameters; (3) LoRA employs a pair of $W _ { \mathrm { d o w n } }$ and $W _ { \mathrm { u p } }$ for query and value projections, hence uses $4 \times r \times d$ parameters. For the adapter modification at ffn, it uses $2 \times r \times d$ parameters which is the same as adapter at attention. Therefore, for a specific value of $r$ or $l$ , prefix tuning uses the same number of parameters as adapters, while LoRA uses more parameters. More details can be found in Appendix B.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 4: Performance of previous state-of-the-art parameterefficient tuning methods on $\bar { \mathrm { X S u m } }$ (left) and en-ro (right).
|
| 165 |
+
|
| 166 |
+
Table 2: Accuracy on the dev set of MNLI and SST2. MAM Adapter is proposed in $\ S 4 . 6$ . Bitfit numbers are from Ben Zaken et al. (2021).
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Method (# params)</td><td>MNLI</td><td>SST2</td></tr><tr><td>Full-FT (100%)</td><td>87.6±.4</td><td>94.6±.4 93.7</td></tr><tr><td>Bitfit (0.1 %) Prefix (0.5%) LoRA (0.5%) Adapter (0.5%)</td><td>84.7 86.3±.4 87.2±.4 87.2±.2</td><td>94.0±.1 94.2±.2 94.2±.1</td></tr><tr><td colspan="3">MAM Adapter (0.5%) 87.4±.3 94.2±.3</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 3: Comparison of different insertion forms for adapters, i.e. sequential adapter (SA) and parallel adapter (PA). We include the results of prefix tuning as a reference point.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Method</td><td># params</td><td>XSum (R-1/2/L)</td><td>MT (BLEU)</td></tr><tr><td>Prefix,l=200</td><td>3.6%</td><td>43.40/20.46/35.51</td><td>35.6</td></tr><tr><td>SA (attn), r=200</td><td>3.6%</td><td>42.01/19.30/34.40</td><td>35.3</td></tr><tr><td>SA (ffn),r=200</td><td>2.4%</td><td>43.21/19.98/35.08</td><td>35.6</td></tr><tr><td>PA (attn), r=200</td><td>3.6%</td><td>43.58/20.31/35.34</td><td>35.6</td></tr><tr><td>PA (ffn),r=200</td><td>2.4%</td><td>43.93/20.66/35.63</td><td>36.4</td></tr></table>
|
| 173 |
+
|
| 174 |
+
Table 4: Results on en-ro dataset.
|
| 175 |
+
|
| 176 |
+
<table><tr><td>Method</td><td># params MT (BLEU)</td></tr><tr><td>PA (attn),r=200 Prefix,l=200</td><td>3.6% 35.6 3.6% 35.6</td></tr><tr><td>MH PA (attn),r=200</td><td>3.6% 35.8</td></tr><tr><td>Prefix,l=30</td><td>0.1% 35.2</td></tr><tr><td>-gating,l=30</td><td>0.1% 34.9</td></tr><tr><td>PA (ffn),r=30</td><td>0.1% 33.0</td></tr><tr><td>PA (attn),r=30 MH PA (attn),r=30</td><td>0.1% 33.7 0.1% 35.3</td></tr></table>
|
| 177 |
+
|
| 178 |
+
# 4.2 THE RESULTS OF EXISTING METHODS
|
| 179 |
+
|
| 180 |
+
We first overview the results of existing methods on the four tasks. As shown in Figure 4 and Table 2, while existing methods can achieve competitive performance on MNLI and SST2 by tuning fewer than $1 \%$ parameters, a large gap is still present if we add $5 \%$ parameters in XSum and en-ro. The gap remains significant even though we increase the relative parameter size to $> 1 0 \%$ . Even larger gaps have been observed in Raffel et al. (2020) on high-resource MT tasks. This shows that many methods that claimed comparable results to full fine-tuning on the GLUE benchmark with an encoder-only model (Guo et al., 2021; Ben Zaken et al., 2021; Mahabadi et al., 2021), or on relatively simple generation benchmarks such as E2E (Novikova et al., 2017) with an encoder-decoder model (Li & Liang, 2021), may not generalize well to other standard benchmarks. The influencing factors could be complicated including the number of training samples, task complexity, or model architecture. We thus advocate for future research on this line to report results on more diverse benchmarks to exhibit a more complete picture of their performance profile. Below, our analysis will mainly focus on the XSum and en-ro datasets to better distinguish different design choices. We note that these two benchmarks are relatively high-resource performed with an encoder-decoder model (BART), while we will discuss the results on MNLI and SST2 with an encoder-only model (RoBERTa) in $\ S 4 . 6$ .
|
| 181 |
+
|
| 182 |
+
# .3 WHICH INSERTION FORM – SEQUENTIAL OR PARALLEL?
|
| 183 |
+
|
| 184 |
+
We first study the insertion form design dimension, comparing the proposed parallel adapter (PA) variant to the conventional sequential adapter (SA) over both the attention (att) and FFN modification. We also include prefix tuning as a reference point. As shown in Table 3, prefix tuning, which uses parallel insertion, outperforms attention sequential adapters. Further, the parallel adapter is able to beat sequential adapters in all cases,11 with PA (ffn) outperforming SA (ffn) by $1 . 7 \mathrm { R } \mathrm { - } 2$ points on
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 5: Results on XSum (left) and en-ro (right). PA represents parallel adapter. Blue and red markers apply modifications at attention and FFN sub-layers respectively (best viewed in color).
|
| 188 |
+
|
| 189 |
+
XSum and 0.8 BLEU points on en-ro respectively. Given the superior results of parallel adapters over sequential adapters, we focus on parallel adapter results in following sections.
|
| 190 |
+
|
| 191 |
+
# 4.4 WHICH MODIFIED REPRESENTATION – ATTENTION OR FFN?
|
| 192 |
+
|
| 193 |
+
Setup: We now study the effect of modifying different representations. We mainly compare attention and FFN modification. For easier analysis we categorize methods that modifies any hidden representations in the attention sub-layer (e.g. the head output, query, etc) as modifying the attention module. We compare parallel adapters at attention and FFN and prefix tuning. We also transfer the FFN modification to LoRA to have a LoRA (ffn) variant for a complete comparison. Specifically, we use LoRA to approximate the parameter updates for the FFN weights $\dot { W _ { 1 } } \in \mathbb { R } ^ { d \times \dot { d _ { m } } }$ and $\pmb { W } _ { 2 } \in \mathbb { R } ^ { d _ { m } \times d }$ . In this case $W _ { \mathrm { u p } }$ in LoRA for $W _ { 1 }$ (similar for $W _ { \mathrm { d o w n } }$ of $W _ { 2 }$ ) would have dimensions of $r \times d _ { m }$ , where $d _ { m } = 4 d$ as described in $\ S 2 . 1$ . Thus we typically use smaller $r$ for LoRA (ffn) than other methods to match their overall parameter size in later experiments.
|
| 194 |
+
|
| 195 |
+
Results: As shown in Figure 5, any method with FFN modification outperforms all the methods with attention modification in all cases (the red markers are generally above all the blue ones, the only exception is ffn-PA with $2 . 4 \%$ params), often with fewer parameters. Second, the same method applied at FFN always improves over its attention counterpart. For example, LoRA (ffn) improves LoRA (attn) by 1 R-2 points on XSum. We also highlight that prefix tuning does not keep improving when we further increase the capacity, which is also observed in Li & Liang (2021). These results suggest that FFN modification can utilize the added parameters more effectively than attention, no matter what the functional form or composition function is. We hypothesize that this is because the FFN learns task-specific textual patterns (Geva et al., 2021), while attention learns pairwise positional interactions which do not require large capacity for adapting to new tasks.
|
| 196 |
+
|
| 197 |
+
Is the story different when we use $0 . 1 \%$ parameters? In $\ S 3 . 1$ we reason that prefix tuning is more expressive than adapters (attn), which, however, is not reflected in Figure 5. We conjecture that this is because multi-head attention is only superior when the parameter budget is small. To validate this hypothesis, we compare prefix tuning to parallel adapters when they add $0 . 1 \%$ of the pretrained parameters. To ablate the impact of the composition function, we also report the results of removing the gating in prefix tuning as $h + \Delta h$ . We include the results of the multi-head parallel adapter variant (MH PA) described in $\ S 3 . 3$ . As shown in Table 4, the multi-head methods – prefix tuning and MH PA (attn) – outperform all others by at least 1.6 BLEU points when using $0 . 1 \%$ of the parameters. Surprisingly, reducing $l$ from 200 to 30 only causes 0.4 BLEU loss for prefix tuning while PA (attn) loses 1.9 points. The gating composition function in prefix tuning slightly helps the results by 0.3 points. We highlight that the MH parallel adapter improves the single-headed version by 1.6 points, which again verifies the effectiveness of the multi-head formulation.
|
| 198 |
+
|
| 199 |
+
Combining the results in Figure 5 and Table 4, we conclude that modifying head attention shows the best results when the parameter budget is very small, while the FFN can better utilize modifications at larger capacities. This suggests that it may be effective to allocate a larger parameter budget to FFN modification instead of treating attention and FFN equally as in Houlsby et al. (2019).
|
| 200 |
+
|
| 201 |
+
# 4.5 WHICH COMPOSITION FUNCTION?
|
| 202 |
+
|
| 203 |
+
We have presented three composition functions in $\ S 3 . 2$ : simple addition (adapter), gated addition (prefix tuning) and scaled addition (LoRA). As it is unnatural to incorporate the exact gated addition into methods whose functional form does not use softmax, we examine the other two by ablating on LoRA and comparing with the proposed scaled parallel adapter (Scaled PA), we constrain modified representation to be FFN since it is generally more effective as shown in $\ S 4 . 4$
|
| 204 |
+
|
| 205 |
+
Table 6: Comparison of various parameter-efficient tuning methods and the proposed variants. “†” are results copied from Lewis et al. (2020) and Liu et al. (2020b). We could not reproduce exactly the same full finetuning numbers with the same hyperparameters or even searching them. The reason may be the different libraries which the training code is based on – full fine-tuning is very sensitive to training hyperparameters. For the most performant methods we run with 3 random seeds and report mean and standard deviation.
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Method</td><td># params</td><td>XSum (R-1/2/L)</td><td>MT (BLEU)</td></tr><tr><td>Full fine-tuning+</td><td>100%</td><td>45.14/22.27/37.25</td><td>37.7</td></tr><tr><td>Full fine-tuning (our run)</td><td>100%</td><td>44.81/21.94/36.83</td><td>37.3</td></tr><tr><td>Bitfit (Ben Zaken et al., 2021)</td><td>0.1%</td><td>40.64/17.32/32.19</td><td>26.4</td></tr><tr><td>Prompt tuning (Lester et al., 2021)</td><td>0.1%</td><td>38.91/15.98/30.83</td><td>21.0</td></tr><tr><td>Prefix tuning (Li& Liang,2021),l=200</td><td>3.6%</td><td>43.40/20.46/35.51</td><td>35.6</td></tr><tr><td>Pfeiffer adapter (Pfeiffer et al.,2021),r=600</td><td>7.2%</td><td>44.03/20.89/35.89±.13/.10/.08</td><td>36.9±.1</td></tr><tr><td>LoRA (ffn),r=102</td><td>7.2%</td><td>44.53/21.29/36.28±.14/.07/.10</td><td>36.8±.3</td></tr><tr><td>Parallel adapter (PA,ffn),r=1024</td><td>12.3%</td><td>44.71/21.41/36.41±.16/.17/.16</td><td>37.2±.1</td></tr><tr><td>PA (attn,r=30) + PA (ffn,r=512)</td><td>6.7%</td><td>44.29/21.06/36.12±.31/.19/.18</td><td>37.2±.1</td></tr><tr><td>Prefix tuning (attn,l=3O) + LoRA (ffn,r=102)</td><td>6.7%</td><td>44.84/21.71/36.77±.07/.05/.03</td><td>37.0±.1</td></tr><tr><td>MAM Adapter (our variant, l=30,r=512)</td><td>6.7%</td><td>45.06/21.90/36.87±.08/01/.04</td><td>37.5±.1</td></tr></table>
|
| 208 |
+
|
| 209 |
+
Table 5 reports the results on XSum. We set $r$ as 512 for adapters and 102 for LoRA so that their tuned parameter sizes are the same. We select $s$ based on the R-2 score on the dev set. We observe that LoRA $s = 4$ ) performs better than parallel adapter. However, the advantage disappears if we remove the scaling by setting $s ~ = ~ 1$ . Through plugging the composition function of LoRA into parallel adapter, the resulted Scaled PA improves the vanilla parallel adapter by 0.56 ROUGE-2 points. We also experiment with a learned scalar which does not give better results. Therefore, we conclude that the scaling composition function is better than the vanilla additive one while being easily applicable.
|
| 210 |
+
|
| 211 |
+
Table 5: Results on XSum when using different composition functions. The modified representation is FFN. The bottleneck dimension $\bar { r } = 5 1 2$ for (Scaled) PA and $r = 1 0 2$ for LoRA.
|
| 212 |
+
|
| 213 |
+
<table><tr><td>Method (# params)</td><td>XSum (R-1/2/LSum)</td></tr><tr><td>LoRA (6.1%), s=4</td><td>44.59/21.31/36.25</td></tr><tr><td>LoRA (6.1%), s=1</td><td>44.17/20.83/35.74</td></tr><tr><td>PA (6.1%)</td><td>44.35/20.98/35.98</td></tr><tr><td>Scaled PA (6.1%), s=4</td><td>44.85/21.54/36.58</td></tr><tr><td>Scaled PA(6.1%),trainable s</td><td>44.56/21.31/36.29</td></tr></table>
|
| 214 |
+
|
| 215 |
+
# 4.6 AN EFFECTIVE INTEGRATION BY TRANSFERRING FAVORABLE DESIGN ELEMENTS
|
| 216 |
+
|
| 217 |
+
We first highlight three findings in previous sections: (1) Scaled parallel adapter is the best variant to modify FFN; (2) FFN can better utilize modification at larger capacities; and (3) modifying head attentions like prefix tuning can achieve strong performance with only $0 . 1 \%$ parameters. Inspired by them, we mix and match the favorable designs behind these findings: specifically, we use prefix tuning with a small bottleneck dimension $\mathit { l } \ : = \ : 3 0 $ ) at the attention sub-layers and allocate more parameter budgets to modify FFN representation using the scaled parallel adapter $( r = 5 1 2$ ). Since prefix tuning can be viewed as a form of adapter in our unified framework, we name this variant as Mix-And-Match adapter (MAM Adapter). In Table 6, we compare MAM adapter with various parameter-efficient tuning methods. For completeness, we also present results of other combination versions in Table 6: using parallel adapters at both attention and FFN layers and combining prefix tuning (attn) with LoRA (ffn) – both of these combined versions can improve over their respective prototypes. However, MAM Adapter achieves the best performance on both tasks and is able to match the results of our full fine-tuning by only updating $6 . 7 \%$ of the pre-trained parameters. In Table 2, we present the results of MAM Adapter on MNLI and SST2 as well, where MAM Adapter achieves comparable results to full fine-tuning by adding only $0 . 5 \%$ of pretrained parameters.
|
| 218 |
+
|
| 219 |
+
# 5 DISCUSSION
|
| 220 |
+
|
| 221 |
+
We provide a unified framework for several performant parameter-tuning methods, which enables us to instantiate a more effective model that matches the performance of full fine-tuning method through transferring techniques across approaches. We hope our work can provide insights and guidance for future research on parameter-efficient tuning.
|
| 222 |
+
|
| 223 |
+
# ETHICS STATEMENT
|
| 224 |
+
|
| 225 |
+
Our work proposes a method for efficient fine-tuning of pre-trained models, in particular language models. Pre-trained language models have a wide variety of positive applications, such as the applications to summarization, translation, or language understanding described in our paper. At the same time, there are a number of ethical concerns with language models in general, including concerns regarding the generation of biased or discriminative text (Bordia & Bowman, 2019), the leakage of private information from training data (Carlini et al., 2020), and environmental impact of training or tuning them (Strubell et al., 2019).
|
| 226 |
+
|
| 227 |
+
Our method attempts to train language models making minimal changes to their pre-existing parameters. While it is an interesting research question whether parameter-efficient fine-tuning methods exacerbate, mitigate, or make little change to issues such as bias or information leakage, to our knowledge no previous work has examined this topic. It is an interesting avenue for future work.
|
| 228 |
+
|
| 229 |
+
With respect to environmental impact, the methods proposed in this paper add a small number of extra parameters and components to existing models, and thus they have a nominal negative impact on training and inference time – for example, the final MAM Adapter needs $1 0 0 \% - 1 5 0 \%$ training time of full fine-tuning in our four benchmarks since parameter-efficient tuning typically needs more epochs to converge; the inference time is roughly the same as the model obtained by full fine-tuning. On the other hand, as the methods proposed in this paper may obviate the need for full fine-tuning, this may also significantly reduce the cost (in terms of memory/deployed servers) of serving models. Notably, the great majority of the experimentation done for this paper was performed on a data center powered entirely by renewable energy.
|
| 230 |
+
|
| 231 |
+
# REPRODUCIBILITY STATEMENT
|
| 232 |
+
|
| 233 |
+
In addition to the setup description in $\ S 4 . 1$ , we have detailed the complete experiments setup such as batch size, optimizer, learning rates in Appendix A. Besides, we have publicized our source code. These resources should be sufficient to reproduce results of the paper.
|
| 234 |
+
|
| 235 |
+
# ACKNOWLEDGEMENT
|
| 236 |
+
|
| 237 |
+
We thank the anonymous reviewers for their comments. This work was supported in part by the CMU-Portugal MAIA Project, a Baidu PhD Fellowship for Junxian He, and a CMU Presidential Fellowship for Chunting Zhou.
|
| 238 |
+
|
| 239 |
+
# REFERENCES
|
| 240 |
+
|
| 241 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 242 |
+
|
| 243 |
+
Elad Ben Zaken, Shauli Ravfogel, and Yoav Goldberg. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. arXiv e-prints, pp. arXiv–2106, 2021.
|
| 244 |
+
|
| 245 |
+
Ondˇrej Bojar, Rajen Chatterjee, Christian Federmann, Yvette Graham, Barry Haddow, Matthias Huck, Antonio Jimeno Yepes, Philipp Koehn, Varvara Logacheva, Christof Monz, et al. Findings of the 2016 conference on machine translation. In Proceedings of the First Conference on Machine Translation: Volume 2, Shared Task Papers, 2016.
|
| 246 |
+
|
| 247 |
+
Shikha Bordia and Samuel R. Bowman. Identifying and reducing gender bias in word-level language models. In Proceedings of the 2019 NAACL: Student Research Workshop, 2019.
|
| 248 |
+
|
| 249 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 250 |
+
|
| 251 |
+
Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. Extracting training data from large language models. arXiv preprint arXiv:2012.07805, 2020.
|
| 252 |
+
|
| 253 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL, 2019.
|
| 254 |
+
|
| 255 |
+
William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961, 2021.
|
| 256 |
+
|
| 257 |
+
Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. Transformer feed-forward layers are key-value memories. In Proceedings of EMNLP, 2021.
|
| 258 |
+
|
| 259 |
+
Demi Guo, Alexander M Rush, and Yoon Kim. Parameter-efficient transfer learning with diff pruning. In Proceedings of ACL, 2021.
|
| 260 |
+
|
| 261 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of ICCV, 2015.
|
| 262 |
+
|
| 263 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for nlp. In Proceedings of ICML, 2019.
|
| 264 |
+
|
| 265 |
+
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
|
| 266 |
+
|
| 267 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of ICLR, 2015.
|
| 268 |
+
|
| 269 |
+
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Proceedings of EMNLP, 2021.
|
| 270 |
+
|
| 271 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of ACL, 2020.
|
| 272 |
+
|
| 273 |
+
Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of ACL, 2021.
|
| 274 |
+
|
| 275 |
+
Chin-Yew Lin. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, 2004.
|
| 276 |
+
|
| 277 |
+
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. arXiv preprint arXiv:2107.13586, 2021a.
|
| 278 |
+
|
| 279 |
+
Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. GPT understands, too. arXiv:2103.10385, 2021b.
|
| 280 |
+
|
| 281 |
+
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. arXiv preprint arXiv:1907.11692, 2019.
|
| 282 |
+
|
| 283 |
+
Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. Multilingual denoising pre-training for neural machine translation. Transactions of the Association for Computational Linguistics, 2020a.
|
| 284 |
+
|
| 285 |
+
Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. Multilingual denoising pre-training for neural machine translation. Transactions of the Association for Computational Linguistics, 8:726–742, 2020b. doi: 10.1162/tacl a 00343. URL https://aclanthology.org/2020.tacl-1.47.
|
| 286 |
+
|
| 287 |
+
Rabeeh Karimi Mahabadi, James Henderson, and Sebastian Ruder. Compacter: Efficient low-rank hypercomplex adapter layers. In Proceedings of NeurIPS, 2021.
|
| 288 |
+
|
| 289 |
+
Shashi Narayan, Shay B. Cohen, and Mirella Lapata. Don’t give me the details, just the summary! Topic-aware convolutional neural networks for extreme summarization. In Proceedings of EMNLP, 2018.
|
| 290 |
+
|
| 291 |
+
Jekaterina Novikova, Ondˇrej Dusek, and Verena Rieser. The E2E dataset: New challenges for ˇ end-to-end generation. In Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue, pp. 201–206, Saarbrucken, Germany, August 2017. doi: 10.18653/v1/W17-5525. ¨
|
| 292 |
+
|
| 293 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of ACL, 2002.
|
| 294 |
+
|
| 295 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of NAACL, 2018.
|
| 296 |
+
|
| 297 |
+
Jonas Pfeiffer, Aishwarya Kamath, Andreas Ruckl ¨ e, Kyunghyun Cho, and Iryna Gurevych. Adapter- ´ Fusion: Non-destructive task composition for transfer learning. In Proceedings of EACL, 2021.
|
| 298 |
+
|
| 299 |
+
Xipeng Qiu, Tianxiang Sun, Yige Xu, Yunfan Shao, Ning Dai, and Xuanjing Huang. Pre-trained models for natural language processing: A survey. Science China Technological Sciences, 2020.
|
| 300 |
+
|
| 301 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 2019.
|
| 302 |
+
|
| 303 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 2020.
|
| 304 |
+
|
| 305 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { ~ Y ~ N ~ g ~ } _ { }$ and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP, 2013.
|
| 306 |
+
|
| 307 |
+
Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in NLP. In Proceedings of ACL, 2019.
|
| 308 |
+
|
| 309 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of NeurIPS, 2017.
|
| 310 |
+
|
| 311 |
+
Adina Williams, Nikita Nangia, and Samuel Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of NAACL, 2018.
|
| 312 |
+
|
| 313 |
+
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 EMNLP: System Demonstrations, 2020.
|
| 314 |
+
|
| 315 |
+
Yaoming Zhu, Jiangtao Feng, Chengqi Zhao, Mingxuan Wang, and Lei Li. Serial or parallel? plugable adapter for multilingual machine translation. arXiv preprint arXiv:2104.08154, 2021.
|
| 316 |
+
|
| 317 |
+
# A EXPERIMENTS
|
| 318 |
+
|
| 319 |
+
A.1 SETUPS
|
| 320 |
+
|
| 321 |
+
Table 7: Dataset Statistics of the four tasks.
|
| 322 |
+
|
| 323 |
+
<table><tr><td>Dataset</td><td>#train</td><td>#dev</td><td>#test</td></tr><tr><td>XSum</td><td>204,045</td><td>113,332</td><td>113,334</td></tr><tr><td>WMT16 en-ro</td><td>610,320</td><td>1,999</td><td>1,999</td></tr><tr><td>MNLI</td><td>392,702</td><td>9815</td><td>9832</td></tr><tr><td>SST-2</td><td>67,349</td><td>872</td><td>1,821</td></tr></table>
|
| 324 |
+
|
| 325 |
+
We implement all the parameter-efficient tuning methods using the huggingface transformers library (Wolf et al., 2020). We use BARTLARGE(Lewis et al., 2020) and mBARTLARGE (Liu et al., 2020b) (mBART-cc25) for the summarization and machine translation tasks respectively, and we use RoBERTaBASE (Liu et al., 2019) for MNLI and SST2. BARTLARGE and mBARTLARGE have the same encoder-decoder architectures. mBARTLARGE is pre-trained on 25 languages. We use their public checkpoints from the transformers library in experiments. For MT and classifications tasks, the max token lengths of training data are set to be 150 and 512 respectively. For XSum, we set the max length of source articles to be 512 and the max length of the target summary to be 128. The detailed dataset statistics is present in Table 7. In our summarization experiments, we only use 1600 examples for validation to save time.
|
| 326 |
+
|
| 327 |
+
While we vary the bottleneck dimension within $\{ 1 , 3 0 , 5 1 2 , 1 0 2 4 \}$ as mentioned in $\ S 4 . 1$ , we test bottleneck dimension 1024 only when the modified representation is FFN, because the training of prefix tuning does not fit into 48GB GPU memory when $l = 1 0 2 4$ . While other methods do not have memory issues, we keep the bottleneck dimension of attention modification at most 512 to have a relatively fair comparison with prefix tuning. For LoRA we always tune its scaling hyperparameters $s$ on the dev set.
|
| 328 |
+
|
| 329 |
+
# A.2 TRAINING AND EVALUATION
|
| 330 |
+
|
| 331 |
+
We present some training hyperparameters of parameter-efficient tuning methods in Table 8. For all the tasks, we train with the Adam optimizer (Kingma & Ba, 2015), and use a polynomial learning rate scheduler that linearly decays the learning rate throughout training. We set the warm up steps of learning rate to be 0 for both MT and summarization tasks, and for the classification tasks, learning rate is linearly warmed up from 0 for the first $6 \%$ of the total training steps before decay. For full fine-tuning we set these training hyperparameters following Lewis et al. (2020) (XSum), Liu et al. (2020b) (en-ro), and (Liu et al., 2019) (MNLI and SST2). We also did hyperparameter search in the full fine-tuning case to try to reproduce their results. We set dropout rate to be 0.1 for all the tasks. We use ROUGE-2 and perplexity as the validation metrics for summarization and MT respectively.
|
| 332 |
+
|
| 333 |
+
For MT and text summarization, we use beam search for decoding and set the number of beams to be 6 and 5 following previous work (Li & Liang, 2021; Liu et al., 2020b). The min and max generation lengths for summarization and MT are set to be (10, 60) and (1, 200) respectively.
|
| 334 |
+
|
| 335 |
+
# A.3 OTHER EXPERIMENTAL DETAILS
|
| 336 |
+
|
| 337 |
+
Prefix Tuning: Following Li & Liang (2021), we reparameterize the prefix vectors by a MLP network which is composed of a small embedding matrix and a large feedforward neural network. This is conducive for learning due to the shared parameters across all layers.
|
| 338 |
+
|
| 339 |
+
LoRA: LoRA and adapter employ different parameter initialization methods: LoRA uses a random Kaiming uniform (He et al., 2015) initialization for $W _ { \mathrm { d o w n } }$ and zero for $W _ { \mathrm { u p } }$ (LoRA init), while adapters use the same initialization as BERT (Devlin et al., 2019). We found it beneficial to use the same initialization method as LoRA in scaled PA.
|
| 340 |
+
|
| 341 |
+
Table 8: Training hyperparameters of parameter-efficient tuning methods on the four tasks. lr and ls represents learning rate and label smoothing respectively.
|
| 342 |
+
|
| 343 |
+
<table><tr><td>Tasks</td><td>lr</td><td>batch size</td><td>ls</td><td> max grad norm</td><td> weight decay</td><td> train steps</td></tr><tr><td>XSum</td><td>5e-5</td><td>64 sents</td><td>0.1</td><td>0.1</td><td>0.01</td><td>100K</td></tr><tr><td>enro MT</td><td>5e-5</td><td>16384 tokens</td><td>0.1</td><td>1.0</td><td>0.01</td><td>50K</td></tr><tr><td>MNLI/SST2</td><td>1e-4</td><td>32 sents</td><td>0</td><td>1.0</td><td>0.1</td><td>10 epochs</td></tr></table>
|
| 344 |
+
|
| 345 |
+
# B COMPUTATION OF TUNABLE PARAMETERS
|
| 346 |
+
|
| 347 |
+
Table 9: Number of attention or FFN sublayers in each layer of the pre-trained models.
|
| 348 |
+
|
| 349 |
+
<table><tr><td>BART/mBARTLARGE RoBERTaBASE</td><td></td></tr><tr><td>Nattn</td><td></td></tr><tr><td>Nfn</td><td>1</td></tr></table>
|
| 350 |
+
|
| 351 |
+
Table 10: Number of parameters used at each sub-layer for different methods.
|
| 352 |
+
|
| 353 |
+
<table><tr><td></td><td>Nattn</td><td>N</td></tr><tr><td>Prefix Tuning</td><td>2ld</td><td>一</td></tr><tr><td>Adapter variants</td><td>2rd</td><td>2rd</td></tr><tr><td>LoRA</td><td></td><td>2 × 2rd=4rd 2×(rd+4dr)=10rd</td></tr></table>
|
| 354 |
+
|
| 355 |
+
We compute the number of tunable parameters based on where the tunable module is inserted into and how it is parameterized. The pretrained-models for summarization or MT have an encoderdecoder structure and each has $L$ layers, whereas RoBERTaBASE for classification tasks only has $L$ encoder layers. To simplify the computation of tunable parameters, we compute the sum of parameter used in one encoder layer and one decoder layer as the parameter overhead of one single layer of the pre-trained encoder-decoder model. Each layer has $N _ { \mathrm { a t t n } }$ sub-layers and $N _ { \mathrm { { f f n } } }$ sublayers. For the encoder-decoder models, $N _ { \mathrm { a t t n } } = 3$ : the encoder self-attention, the decoder selfattention and the decoder cross-attention. For the classification tasks, $\mathtt { R o B E R T a } _ { \mathtt { B A S E } }$ only has the encoder self-attention, thus $N _ { \mathrm { a t t n } } ~ = ~ 1$ . We present the number of attention and ffn sub-layers for different pre-trained models in Table 10. For modifications applied at the attention sub-layers, the number of tunable parameters is computed by $| \Theta | _ { \mathrm { a t t n } } = \bar { N } _ { \mathrm { W } } ^ { \mathrm { a t t n } } \times N _ { \mathrm { a t t n } } \times L$ , where $N _ { \mathrm { W } } ^ { \mathrm { a t t n } }$ denotes the number of parameters $W _ { \mathrm { d o w n } }$ or $W _ { \mathrm { u p , } }$ ) used for one attention sub-layer. Similarly, the number of tunable parameters for the FFN sub-layers is computed by $\vert \Theta \vert _ { \mathrm { f f n } } = N _ { \mathrm { W } } ^ { \mathrm { f f n } } \times N _ { \mathrm { f f n } } \times$ $L$ . In Table 10, we show the number of parameters for one sub-layer. As we have explained in $\ S 4 . 4$ , LoRA approximates the update of each weight matrix with a pair of $W _ { \mathrm { d o w n } }$ and $W _ { \mathrm { u p } }$ , thus LoRA typically uses more parameters with the same $r$ as other methods. Finally, the total number of tunable parameters for prefix tuning, adapter variants and LoRA is $| \Theta | = | \Theta | _ { \mathrm { a t t n } } + | \Theta | _ { \mathrm { f n } }$ as applicable. Prompt tuning prepends $l$ tunable vectors at the input layer and uses $l \times d$ number of parameters. Using MBART/BART as an example, we present the number of parameters used by several representative methods throughout our paper in Table 11, where adapter variants include sequential adapter, parallel adapter, scaled adapter and multi-head adapter.
|
| 356 |
+
|
| 357 |
+
Table 11: Number of tunable parameters of various parameter-efficient tuning methods with BART/MBART models $L = 1 2$ ) as an example.
|
| 358 |
+
|
| 359 |
+
<table><tr><td>Method</td><td>number of parameters</td></tr><tr><td>Prompt Tuning</td><td>lxd</td></tr><tr><td>Prefix Tuning (attn)</td><td>2ld×3×12</td></tr><tr><td>Adapter variants (attn)</td><td>2rd×3×12</td></tr><tr><td>Adapter variants (ffn)</td><td>2rd ×2×12</td></tr><tr><td>LoRA (attn)</td><td>4rd×3×12</td></tr><tr><td>LoRA (ffn)</td><td>10rd ×2×12</td></tr><tr><td>MAM Adapter (our proposed model)</td><td>)2ld×3×12+2rd×2×12</td></tr></table>
|
| 360 |
+
|
| 361 |
+
# C FULL RESULTS ON DIFFERENT BOTTLENECK DIMENSIONS
|
| 362 |
+
|
| 363 |
+
Table 12: Performance on the test sets of abstractive summarization (XSum) and WMT EN-RO translation.
|
| 364 |
+
|
| 365 |
+
<table><tr><td>Method</td><td># params (%) XSum (R-1/2/L)</td><td>MTBLEU</td></tr><tr><td colspan="3">Modified Representation: : attention</td></tr><tr><td>Prefix Tuning,r = 200</td><td>3.6 43.40/20.46/35.51 9.2</td><td>35.6</td></tr><tr><td>Prefix Tuning,r = 512</td><td>43.29/20.40/35.37</td><td>35.1</td></tr><tr><td>LoRA,r= 200</td><td>43.09/20.29/35.37</td><td>36.2</td></tr><tr><td>Sequential Adapter,r = 200</td><td>42.01/19.30/34.40</td><td>35.3</td></tr><tr><td>Sequential Adapter,r = 512</td><td>41.05/18.87/33.71</td><td>34.7</td></tr><tr><td>Parallel Adapter,r = 200</td><td>43.58/20.31/35.34</td><td>35.6</td></tr><tr><td>Parallel Adapter,r = 512</td><td>43.99/20.83/35.77</td><td>36.2</td></tr><tr><td colspan="3">Modified Representation: FFN</td></tr><tr><td>LoRA,r = 102</td><td>44.59/21.31/36.25</td><td>36.5</td></tr><tr><td>Sequential Adapter,r = 200</td><td>2.4 43.21/19.98/35.08</td><td>35.6</td></tr><tr><td>Sequential Adapter,r = 512</td><td>6.1 43.72/20.75/35.64</td><td>36.3</td></tr><tr><td>Sequential Adapter,r = 1024</td><td>12.3 43.95/21.00/35.90</td><td>36.7</td></tr><tr><td>Parallel Adapter,r = 200</td><td>2.4 43.93/20.66/35.63</td><td>36.4</td></tr><tr><td>Parallel Adapter,r = 512</td><td>6.1 44.35/20.98/35.98</td><td>37.1</td></tr><tr><td>Parallel Adapter,r = 1024</td><td>12.3 44.53/21.24/36.23</td><td>37.3</td></tr></table>
|
parse/dev/0RDcd5Axok/0RDcd5Axok_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/5hLP5JY9S2d/5hLP5JY9S2d.md
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OPEN-SET RECOGNITION: A GOOD CLOSED-SET CLASSIFIER IS ALL YOU NEED?
|
| 2 |
+
|
| 3 |
+
Sagar Vaze⋆ Kai $\mathbf { H a n } ^ { \star \dagger }$ Andrea Vedaldi⋆ Andrew Zisserman⋆
|
| 4 |
+
⋆Visual Geometry Group, University of Oxford
|
| 5 |
+
†The University of Hong Kong
|
| 6 |
+
{sagar,vedaldi,az}@robots.ox.ac.uk kaihanx@hku.hk
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
The ability to identify whether or not a test sample belongs to one of the semantic classes in a classifier’s training set is critical to practical deployment of the model. This task is termed open-set recognition (OSR) and has received significant attention in recent years. In this paper, we first demonstrate that the ability of a classifier to make the ‘none-of-above’ decision is highly correlated with its accuracy on the closed-set classes. We find that this relationship holds across loss objectives and architectures, and further demonstrate the trend both on the standard OSR benchmarks as well as on a large-scale ImageNet evaluation. Second, we use this correlation to boost the performance of the maximum softmax probability OSR ‘baseline’ by improving its closed-set accuracy, and with this strong baseline achieve state-of-the-art on a number of OSR benchmarks. Similarly, we boost the performance of the existing state-of-the-art method by improving its closed-set accuracy, but the resulting discrepancy with the strong baseline is marginal. Our third contribution is to present the ‘Semantic Shift Benchmark’ (SSB), which better respects the task of detecting semantic novelty, as opposed to low-level distributional shifts as tackled by neighbouring machine learning fields. On this new evaluation, we again demonstrate that there is negligible difference between the strong baseline and the existing state-of-the-art. Code available at: https://github.com/sgvaze/osr_closed_set_all_you_need.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Given the success of modern deep learning systems on closed-set visual recognition tasks, a natural next challenge is open-set recognition (OSR) (Scheirer et al., 2013). In the closed-set setting, a model is tasked with recognizing a set of categories that remain the same during both training and testing phases. In the more realistic open-set setting, a model must not only be able to distinguish between the training classes, but also indicate if an image comes from a class it has not yet encountered.
|
| 15 |
+
|
| 16 |
+
The OSR problem was initially formalized in (Scheirer et al., 2013) and has since inspired a rich line of research (Bendale & Boult, 2016; Chen et al., 2020a; Ge et al., 2017; Neal et al., 2018; Sun et al., 2020; Zhang et al., 2020; Shu et al., 2020). The standard baseline for OSR is a model trained with the cross-entropy loss on the known classes. At test time, the maximum value of the softmax probability vector is used to decide if an input belongs to the known classes or not. We henceforth refer to this method as the ‘baseline’ or ‘maximum softmax probability (MSP) baseline’. Most existing literature reports significantly outperforming this OSR baseline on standard benchmarks of re-purposed image recognition datasets, including MNIST (LeCun et al., 2010) and TinyImageNet (Le & Yang, 2015).
|
| 17 |
+
|
| 18 |
+
In this paper we reappraise these approaches, by asking whether a well-trained closed-set classifier can perform as well as recent algorithms, and by analyzing the benchmark datasets. To do this, we first investigate the relationship between the closed-set and open-set performance of a classifier (sec. 3). Though one may expect stronger closed-set classifiers to overfit to the training classes (Recht et al., 2019; Zhang et al., 2017), and so perform poorly for OSR, we show instead that the closed-set and open-set performance are highly correlated. We show this trend holds across datasets, objectives and model architectures, and further demonstrate the trend on an ImageNet-scale evaluation.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1: (a) We show that we can push OSR baseline performance to be competitive with or surpass state-of-the-art methods (shown, $\mathrm { A R P L + C S }$ (Chen et al., 2021)). (b) We propose the ‘Semantic Shift Benchmark’ datasets for OSR, which are larger scale and give precise definitions of what constitutes a ‘new class’.
|
| 22 |
+
|
| 23 |
+
Secondly, following this observation, we show that the open-set performance of a classifier can be improved by enhancing its closed-set accuracy, tapping the numerous recent advances in image classification (Loshchilov & Hutter, 2017; Szegedy et al., 2016; Cubuk et al., 2020; Bello et al., 2021). Specifically, we introduce strategies such as more augmentation, better learning rate schedules and label smoothing, that significantly improve the closed-set performance of the MSP baseline (sec. 4). We also propose the use of the maximum logit score (MLS), rather than normalized softmax probabilities, as an open-set indicator. With these adjustments, we push the baseline to become competitive with or outperform state-of-the-art OSR methods, substantially outperforming the currently reported baseline figures. Notably, we surpass state-of-the-art figures on four of the six OSR benchmark datasets.
|
| 24 |
+
|
| 25 |
+
Furthermore, we transfer these improvements to two previous OSR methods, including the current state-of-the-art from (Chen et al., 2021). While this does boost its performance, we observe that there is negligible difference with that of the improved ‘MLS’ baseline (see fig. 1a). This finding is important because it allows us to better assess recent reported progress in the area.
|
| 26 |
+
|
| 27 |
+
Finally, we turn to the experimental setting for OSR (sec. 5). Current OSR benchmarks are both small scale and lack a specific definition of what constitutes a ‘visual class’. As an alternative, we propose the ‘Semantic Shift Benchmark’ suite (SSB). We propose the use of fine-grained datasets — including CUB (Wah et al., 2011), Stanford Cars (Krause et al., 2013) and FGVC-Aircraft (Maji et al., 2013) — which all have clear definitions of a semantic class (see fig. 1b), as well as an ImageNet-scale evaluation based on the full ImageNet database (Ridnik et al., 2021). Furthermore, we construct open-set splits with an explicit focus on semantic novelty, which we hope better separates this avenue of research from related machine learning sub-fields such as out-of-distribution (Hendrycks & Gimpel, 2017) and anomaly detection (Kwon et al., 2020). Our proposed splits also offer a better way of quantifying open-set difficulty; we find that different splits lead to a much larger discrepancy in open-set performance than the current measure of open-set difficulty ‘openness’ (Scheirer et al., 2013), which focuses only on the number of open-set classes. We evaluate our strong baseline as well as the state-of-the-art method on this new configuration to encourage future research in this direction.
|
| 28 |
+
|
| 29 |
+
# 2 RELATED WORK
|
| 30 |
+
|
| 31 |
+
Open-set recognition. Seminal work in (Scheirer et al., 2013) formalized the task of open-set recognition, and has inspired a number of subsequent works in the field. (Bendale & Boult, 2016) introduced the first deep learning approach for OSR, OpenMax, based on the Extreme Value Theory (EVT). GANs have also been used to tackle the task (Ge et al., 2017; Neal et al., 2018). OSRCI (Neal et al., 2018) generates images similar to those in the training set but that do not belong to any of the known classes, and uses the generated images to train an open-set classifier. This work also established the existing OSR benchmark suite. (Kong & Ramanan, 2021) achieve strong OSR performance by using an adversarially trained discriminator to delineate closed from open-set images, leveraging real open-set images for model selection. Other approaches include reconstruction based methods (Yoshihashi et al., 2019; Oza & Patel, 2019; Sun et al., 2020) which use poor test-time reconstruction as an open-set indicator, and prototype-based methods (Shu et al., 2020; Chen et al.,
|
| 32 |
+
|
| 33 |
+
2020a; 2021) which represent known classes with learned prototypes, and identify open-set images based on distances to the prototypes.
|
| 34 |
+
|
| 35 |
+
State-of-the-art. In this work, we compare against methods which achieve state-of-the-art in the controlled OSR setting (with no extra data for training or model selection, for instance as demonstrated in (Kong & Ramanan, 2021)). To our knowledge, these methods are ARPL (Adversarial Reciprocal Point Learning) (Chen et al., 2020a; 2021) and OpenHybrid (Zhang et al., 2020), which we detail in sec. 3.1 and sec. 4 respectively. In this paper, we show that the MSP baseline can be competitive with or outperform the more complex methods listed above. Finally, we note recent works (Zhou et al., 2021; Miller et al., 2021; Guo et al., 2021) with which we do not compare as they report lower performance than ARPL and OpenHybrid.
|
| 36 |
+
|
| 37 |
+
Related subfields. OSR is also closely related to out-of-distribution (OoD) detection (Hendrycks & Gimpel, 2017; Liang et al., 2018; Hsu et al., 2020), novelty detection (Abati et al., 2019; Perera et al., 2019; Tack et al., 2020), anomaly detection (Hendrycks et al., 2019; Kwon et al., 2020; Bergman & Hoshen, 2020) and novel category discovery (Han et al., 2019; 2020; 2021). Amongst these, OoD is perhaps the most widely studied and is similar in nature to OSR. As noted by (Dhamija et al., 2018; Boult et al., 2019), OSR is similar to the OoD problem with an additional multi-way classification component between known categories. In fact, there is currently significant overlap in the evaluation datasets between these settings, though cross-setting comparisons are difficult due to different evaluation protocols. Specifically, the OoD setting permits the use of additional data as examples of ‘OoD’ data during training. (Chen et al., 2021) and (Zhang et al., 2020) evaluate their OSR methods on OoD benchmarks, with both showing competitive results despite not having access to additional data during training. In this paper, we distinguish the OSR problem from OoD and other related fields by proposing a new suite of benchmarks. While OoD encompasses all forms of distributional shift, including those based on low-level features, OSR specifically refers to semantic novelty. We propose new benchmarks that respect this distinction.
|
| 38 |
+
|
| 39 |
+
# 3 CORRELATION BETWEEN CLOSED-SET AND OPEN-SET PERFORMANCE
|
| 40 |
+
|
| 41 |
+
One may expect that stronger closed-set classifiers have overfit their learned representations to the closed-set categories, and thus perform poorly for OSR (Recht et al., 2019; Zhang et al., 2017). Furthermore, existing literature largely considers the closed and open-set tasks separately, with works generally emphasising good open-set performance despite no degradation in closed-set accuracy (Neal et al., 2018; Zhou et al., 2021; Miller et al., 2021). On the contrary, in this section we show that the closed-set and open-set performance of classifiers are strongly correlated. We first demonstrate this for the baseline and a state-of-the-art method on the standard OSR benchmarks (sec. 3.1) and then on a large scale evaluation across a number of model architectures (sec. 3.2).
|
| 42 |
+
|
| 43 |
+
Open-set recognition. We formalize the problem of OSR, and highlight its differences from closedset recognition. First, consider a labelled training set for a classifier $\mathcal { D } _ { \operatorname { t r a i n } } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N } \subset \mathcal { X } \times \mathcal { C }$ . Here, $\mathcal { X }$ is the input space (e.g., images) and $\mathcal { C }$ is the set of ‘known’ classes. In the closed-set scenario, the model is evaluated on a test set in which the labels are also drawn from the same set of classes, i.e., $\mathcal { D } _ { \mathrm { t e s t - c l o s e d } } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { M } \subset \mathcal { X } \times \mathcal { C }$ . In the closed-set setting, the model returns a distribution over the known classes as $p ( y | \mathbf { x } )$ . Conversely, in OSR, test images may also come from unseen classes $\mathcal { U }$ , giving $\mathcal { D } _ { \mathrm { t e s t - o p e n } } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { M ^ { \prime } } \subset \mathcal { X } \times ( \mathcal { C } \cup \mathcal { U } )$ . In the open-set setting, in addition to returning the distribution $\bar { p } ( y | \mathbf x , y \in \mathcal C )$ over known classes, the model also returns a score $\boldsymbol { S } ( \boldsymbol { y } \in \mathcal { C } | \mathbf { x } )$ to indicate whether or not the test sample belongs to any of the known classes.
|
| 44 |
+
|
| 45 |
+
# 3.1 BASELINE AND STATE-OF-THE-ART ON STANDARD BENCHMARKS
|
| 46 |
+
|
| 47 |
+
We first experiment with three representative open-set recognition methods across the standard benchmark datasets in the literature (Neal et al., 2018; Oza & Patel, 2019; Sun et al., 2020; Chen et al., 2020a; Zhang et al., 2020). The methods include the standard MSP baseline as well as two variants of ARPL (Chen et al., 2021). We use the standard network from the open-set literature (Neal et al., 2018), a lightweight model similar to the VGG architecture (Simonyan & Zisserman, 2015) which we henceforth refer to as ‘VGG32’ (refer to appendix D for details). The three methods are summarised below, followed by a description of the most commonly used benchmarks.
|
| 48 |
+
|
| 49 |
+
Methods. Maximum Softmax Probability (MSP, baseline): The model is trained for closed-set classification using the cross-entropy loss between a one-hot target vector and the softmax output $p ( y | \mathbf { x } )$ of the classifier. This training strategy, along with the use of the maximum softmax probability as ${ \dot { S } } ( y \in { \mathcal { C } } | \mathbf { x } ) = \operatorname* { m a x } _ { y \in { \mathcal { C } } } p ( y | \mathbf { x } )$ , is widely used in both the OSR and OoD literature as a baseline (Hendrycks & Gimpel, 2017). ARPL (Chen et al., 2021): This method is an extension of the recent RPL (Reciprocal Point Learning) optimization strategy (Chen et al., 2020a). Here, the probability that a sample belongs to a class is proportional to its distance from a learned ‘reciprocal point’ in the feature space. A reciprocal point aims to represent ‘otherness’ with respect to a class, with the intuition being that open-set examples are different to all known classes. ARPL extends RPL by computing feature distances as the sum of both the Euclidean and cosine distances. In this case, $\boldsymbol { S } ( \boldsymbol { y } \in \mathcal { C } | \mathbf { x } )$ is equal to the maximum distance in feature space between the image and any reciprocal point. $\mathbf { A R P L + C S }$ (Chen et al., 2021) augments ARPL with ‘confusing samples’: adversarially generated latent points to stand in for ‘unseen class’ samples. The confusing samples are encouraged to be equidistant from all reciprocal points, with the same open-set scoring rule used as in ARPL. We train both ARPL and $\mathrm { A R P L + C S }$ based on the official public implementation (Chen et al., 2021).
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 2: Correlation between closed set performance (accuracy) and open-set performance (AUROC). We train three methods on the standard open-set benchmark datasets, including the MSP baseline, ARPL and ARPL $^ +$ CS (Chen et al., 2021). Foreground points in bold show results averaged across five ‘known/unknown’ class splits for each method-dataset pair (following standard practise in the OSR literature) while background points, shown feint, indicate results from the underlying individual splits.
|
| 53 |
+
|
| 54 |
+
Datasets. We train the above methods on the standard benchmark datasets for open-set recognition. In all cases, the model is trained on a subset of classes, while other classes are reserved as ‘unseen’ for evaluation. MNIST (LeCun et al., 2010), SVHN (Netzer et al., 2011), CIFAR10 (Krizhevsky, 2009): These are ten-class datasets, with MNIST and SVHN containing images of hand-written digits and street-view house numbers respectively. Meanwhile, CIFAR10 is a generic object recognition dataset containing natural images from ten diverse classes including animals and vehicles. In these cases, the open-set methods are evaluated by training on six classes, while using the other four classes for testing $( | \mathcal { C } | = 6 ; | \mathcal { U } | = 4 )$ . $\mathrm { C I F A R + N }$ (Krizhevsky, 2009): In an extension to the CIFAR10 evaluation protocol, open-set algorithms are benchmarked by training on four classes from CIFAR10, while using $N$ classes from CIFAR100 for evaluation, where $N$ denotes either 10 or 50 classes $( | \mathcal { C } | = 4 ; | \mathcal { U } | \in \{ 1 0 , 5 0 \} )$ . TinyImageNet (Le & Yang, 2015): In the final and most challenging case, exisiting open-set algorithms are evaluated on the TinyImageNet dataset. This dataset contains 200 classes sub-sampled from ImageNet (Russakovsky et al., 2015), with 20 classes used for training and 180 as unknown $( | \mathcal { C } | = 2 0 ; | \mathcal { U } | = 1 8 0 )$ .
|
| 55 |
+
|
| 56 |
+
Experimental setup. At test time, the model is fed test images from both known and novel classes, and is tasked with making a binary ‘known/unknown’ decision on a per-image basis. Following standard practise in the OSR literature, the threshold-free area under the Receiver-Operator curve (AUROC) is used as an evaluation metric. We train with the same hyper-parameters as in (Chen et al., 2021) and, following standard practise, train on five different splits of closed and open-set classes for each dataset and method combination. When evaluating on existing benchmarks throughout this paper, we use the same data splits as (Chen et al., 2021).
|
| 57 |
+
|
| 58 |
+
Results. Fig. 2 gives the AUROC (open-set performance) against the Top-1 multi-way classification accuracy (closed-set performance). We show the averaged results as well as the individual split results, omitting the $\mathrm { C I F A R } { + } 1 0$ setting for clarity (as the scatter points are almost coincident with the $\mathrm { C I F A R } { + } 5 0$ setting). It is clear that there is a positive correlation between the closed-set accuracy and open-set performance: we find a Pearson Product-Moment correlation $\rho = 0 . 9 5$ between the accuracy and AUROC, indicating a roughly linear relationship between the two metrics.
|
| 59 |
+
|
| 60 |
+
Discussion. To justify our findings theoretically, we look to the model calibration literature (Guo et al., 2017). Intuitively, model calibration aims to quantify whether the model ‘knows when it doesn’t know’, in that low confidence predictions are correlated with high error rates. Specifically, assume a classifier, $f ( \mathbf { x } )$ , returns probabilities for each class, making predictions as ${ \hat { y } } = \arg \operatorname* { m a x } f ( \mathbf { x } )$ .
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 3: (a) Open-set results on a range of architectures on the ImageNet dataset. ‘Easy’ and ‘Hard’ OSR splits are constructed from the ImageNet-21K-P dataset. (b) ImageNet open-set results within a single model family (ResNet).
|
| 64 |
+
|
| 65 |
+
Further assume labelled input-output pairs, $( \mathbf { x } , y ) \subset \mathcal { X } \times \mathcal { C }$ , where $\mathcal { C }$ is the label space. Then, the classifier is said to be perfectly calibrated if:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
P ( \hat { y } = y | f ( x ) = p ) = p \quad \forall p \in [ 0 , 1 ]
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
It is further true that if a classifier is trained with a proper scoring rule (Gneiting et al., 2007) on infinite data, then the classifier will be perfectly calibrated at the loss function’s minimum (Minderer et al., 2021). Many losses used to train deep networks are proper scoring rules (e.g., the cross-entropy loss). Thus, assuming that generalization error on the test set is correlated with the infinite-data loss value, we would suspect models with lower generalization (test) error to be better calibrated. If we use low-confidence predictions as an indicator that a test sample belongs to a new semantic class, we would expect stronger models to be better open-set detectors.
|
| 72 |
+
|
| 73 |
+
# 3.2 LARGE-SCALE EXPERIMENTS AND ARCHITECTURE ABLATION
|
| 74 |
+
|
| 75 |
+
So far, we have demonstrated the correlation between closed and open-set performance on a single, lightweight architecture and on small scale datasets – though we highlight that they are the standard existing benchmarks in the OSR literature. Here, we experiment with a range of architectures on a large-scale dataset (ImageNet).
|
| 76 |
+
|
| 77 |
+
Methods. We experiment with architectures from a number of popular model families, including VGG (Simonyan & Zisserman, 2015), ResNet (He et al., 2016) and EfficientNet (Tan & Le, 2019). We further include results for the recently proposed non-convolutional ViT (Dosovitskiy et al., 2021) and MLP-Mixer (Tolstikhin et al., 2021; Melas-Kyriazi, 2021) models. All models were trained with the cross-entropy objective for classification.
|
| 78 |
+
|
| 79 |
+
Dataset. For large-scale evaluation, we leverage the recently released ImageNet-21K-P (Ridnik et al., 2021). This dataset contains a subset of the full ImageNet database, processed and standardized to remove small classes and leaving around 11K object categories. Note that ImageNet-21K-P is a strict superset of ImageNet-1K (ILSVRC12). As such, models are trained on the standard 1000 classes from ImageNet-1K, and we select two 1000-category subsets from the disjoint categories in ImageNet-21K-P as the open sets. Differently to existing practise on the standard datasets, our two open-set splits for ImageNet are not randomly sampled, but rather designed to be ‘Easy’ and ‘Hard’ based on the semantic similarity of the open-set categories to the training classes. In this way we better capture a model’s ability to identify semantic novelty as opposed to low-level distributional shift. This idea and split construction details are expanded upon in sec. 5. For both ‘Easy’ and ‘Hard’ splits, we have $\vert \mathcal { C } \vert = 1 0 0 0$ and $| \mathcal { U } | = 1 0 0 0$ .
|
| 80 |
+
|
| 81 |
+
Results. Fig. 3a shows our open-set results on ImageNet. Once again, we find a positive correlation between closed and open-set performance. In this case we find the linear relationship to be weaker, with $\rho = 0 . 8 8$ for the ‘Hard’ evaluation and $\rho = 0 . 6 3$ for the ‘Easy’. This is unsurprising given the large discrepancy in architecture styles. In general, we do not find any particular model family to be remarkably better for OSR than others. The exception is the ViT model (highlighted), which bucks the OSR trend for both ‘Easy’ and ‘Hard’ splits. When looking within a single model family, we find the linear relationship to be substantially strengthened. Fig. 3b demonstrates the trend within the ResNet family, with $\rho = 1 . 0 0$ and $\rho = 0 . 9 9$ for the ‘Easy’ and ‘Hard’ OSR splits respectively.
|
| 82 |
+
|
| 83 |
+
Discussion. We again note that the ViT model, despite its size (86M parameters) and few inductive biases (no convolutions), does not overfit its representation to the training classes. The fact that it outperforms the OSR trend supports recent findings on the benefits of purely attention-based vision models (including similar findings in (Fort et al., 2021)), as well as the benefits of good closed-set performance for OSR. Finally, we note the practical utility of our findings in sec. 3. Namely, the fact that the open and closed-set performance are correlated allows OSR to readily improve with the extensive research in standard image recognition.
|
| 84 |
+
|
| 85 |
+
# 4 A GOOD CLOSED-SET CLASSIFIER IS ALL YOU NEED?
|
| 86 |
+
|
| 87 |
+
In this section, we demonstrate that we can leverage the correlation established in sec. 3 to improve the performance of the baseline OSR method. Specifically, we improve the closed-set accuracy of the maximum softmax probability (MSP) baseline and, in doing so, make it competitive with or stronger than state-of-the-art open-set models. Specifically, we achieve new state-of-the-art figures on four of the six OSR benchmarks.
|
| 88 |
+
|
| 89 |
+
We find that we can significantly improve the MSP baseline performance by leveraging techniques from the image recognition literature, such as longer training, better augmentations (Cubuk et al., 2020) and label smoothing (Szegedy et al., 2016). Fig. 4 shows how open-set performance of the baseline model increases as we introduce these changes on the TinyImageNet benchmark. For example: longer training (scatter point 7 - scatter point 8); better augmentations $( 3 \textrm { - } 5 )$ ; and ensembling (8 - 9). Full details and a tabular breakdown of the methods used to increase closed-set performance can be found in appendix C.
|
| 90 |
+
|
| 91 |
+
We take these improved training strategies and train the VGG32 backbone on the standard benchmark datasets. We train all models for 600 epochs with a batch size of 128, training models on a single NVIDIA Titan X GPU. We do not include ensemble results for fair comparison with previous methods. Full training strategies and implementation details can be found in appendices C and D. We report our results as ‘Baseline $\mathrm { ( M S P + ) }$ ’ in table 1.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 4: Gains in open-set performance as closed-set performance increases on TinyImageNet.
|
| 95 |
+
|
| 96 |
+
Logit scoring rule. Next, we also change the open-set scoring rule. Previous work has noted that open-set examples tend to have lower feature norms than closed-set ones (Dhamija et al., 2018; Chen et al., 2021). As such, we propose the use of the maximum logit score (MLS) for the open-set scoring rule. Logits are the raw outputs of the final linear layer in a deep classifier, before the softmax operation normalizes these such that the outputs can be interpreted as a probability vector summing to one. As the softmax operation normalizes out much of the feature magnitude information present in the logits, we find logits lead to better open-set detection results. We provide a detailed analysis and discussion of this effect in appendix B. We further provide a more general study of the representations learned with cross-entropy models, including visualizations of the learned feature space. We present results of our maximum logit score baseline as ‘Baseline (MLS)’ in table 1.
|
| 97 |
+
|
| 98 |
+
We compare against OpenHybrid (Zhang et al., 2020) and $\mathrm { A R P L + C S }$ (Chen et al., 2021), which hold state-of-the-art performances on the standard datasets in the controlled setting (with no extra data for training or model selection). We also compare against OSRCI (Neal et al., 2018), which established the current OSR benchmark suite. While OSRCI and $\mathrm { A R P L + C S }$ have been described in sec. 2 and 3.1 respectively, OpenHybrid tackles the open-set task by training a flow-based density estimator on top of the classifier’s feature representation, jointly training both the encoder and density model. In this way, a distribution over the training data $\log p ( \mathbf { x } )$ is learned, which is used to directly provide $\boldsymbol { S } ( y \in \mathcal { C } | \mathbf { \bar { x } } )$ . Comparisons with more methods can be found in appendix E.
|
| 99 |
+
|
| 100 |
+
We find that our MLS baseline substantially improves the previously reported baseline figures, with an average absolute increase in AUROC of $1 5 . 6 \%$ across the datasets. In fact, MLS surpasses the existing state-of-the-art on the SVHN, $\mathrm { C I F A R { + } } 1 0$ , CIFAR $+ 5 0$ and TinyImageNet benchmarks and is, on average, $0 . 7 \%$ better across the entire suite.
|
| 101 |
+
|
| 102 |
+
Table 1: Comparisons of our improved baselines $\mathbf { ( M S P + }$ , MLS) against state-of-the-art methods on the standard OSR benchmark datasets. All results indicate the area under the ReceiverOperator curve (AUROC) averaged over five ‘known/unknown’ class splits. $\cdot _ { + } ,$ indicates prior methods augmented with improved closed-set optimization strategies, including: ${ \mathrm { { \bf { M S P } + } } }$ (Neal et al., 2018), ${ \mathrm { O S R C I } } +$ (Neal et al., 2018) and $( \mathrm { A R P L + C S } ) +$ (Chen et al., 2021).
|
| 103 |
+
|
| 104 |
+
<table><tr><td>Method</td><td>MNIST</td><td>SVHN</td><td>CIFAR10</td><td>CIFAR + 10</td><td>CIFAR +50</td><td>TinyImageNet</td></tr><tr><td>Baseline (MSP) (Neal et al.,2018)</td><td>97.8</td><td>88.6</td><td>67.7</td><td>81.6</td><td>80.5</td><td>57.7</td></tr><tr><td>OSRCI (Neal et al., 2018)</td><td>98.8</td><td>91.0</td><td>69.9</td><td>83.8</td><td>82.7</td><td>58.6</td></tr><tr><td>OpenHybrid (Zhang et al., 2020)</td><td>99.5</td><td>94.7</td><td>95.0</td><td>96.2</td><td>95.5</td><td>79.3</td></tr><tr><td>ARPL + CS (Chen et al., 2021)</td><td>99.7</td><td>96.7</td><td>91.0</td><td>97.1</td><td>95.1</td><td>78.2</td></tr><tr><td>OSRCI+</td><td>98.5 (-0.3)</td><td>89.9 (-1.1)</td><td>87.2 (+17.3)</td><td>91.1 (+7.3)</td><td>90.3 (+7.6)</td><td>62.6 (+4.0)</td></tr><tr><td>(ARPL + CS)+</td><td>99.2 (-0.5)</td><td>96.8 (+0.1)</td><td>93.9 (+2.9)</td><td>98.1 (+1.0)</td><td>96.7 (+1.6)</td><td>82.5 (+4.3)</td></tr><tr><td>Baseline (MSP+)</td><td>98.6 (+0.8)</td><td>96.0 (+7.4)</td><td>90.1 (+22.4)</td><td>95.6 (+14.0)</td><td>94.0 (+13.5)</td><td>82.7 (+25.0)</td></tr><tr><td>Baseline (MLS)</td><td>99.3 (+1.5)</td><td>97.1 (+8.5)</td><td>93.6 (+25.9)</td><td>97.9 (+16.3)</td><td>96.5 (+16.0)</td><td>83.0 (+25.3)</td></tr></table>
|
| 105 |
+
|
| 106 |
+
We also take the OSRCI and $\mathrm { A R P L + C S }$ algorithms (Neal et al., 2018; Chen et al., 2021), and augment them with our proposed training strategies for a fair comparison, reporting the results under ${ \mathrm { O S R C I } } +$ and $( \mathrm { A R P L } + \mathrm { C S } ) +$ . Specifically, we train them for longer, include label smoothing and use better data augmentations (see appendix D for full details). We also trained OpenHybrid in this controlled setting, but significantly underperformed the reported performance. This is likely because the method was trained for $1 0 \mathrm { k }$ epochs and with a batch size of 1024, which are both $1 0 \times$ larger than those used in these experiments. Note that, despite this, the stronger baseline still outperforms OpenHybrid in a number of cases.
|
| 107 |
+
|
| 108 |
+
In almost all cases we are able to boost the open-set performance of OSRCI and $\mathrm { A R P L + C S }$ , especially for the former. In the case of $( \mathrm { A R P L + C S } ) +$ , we achieve new state-of-the-art results on the $\mathrm { C I F A R { + } } 1 0$ and $\mathrm { C I F A R } { + } 5 0$ benchmarks, and also report a $4 . 3 \%$ boost on TinyImageNet. However, we note that on average, $( \mathrm { A R P L + C S } ) +$ is almost indistinguishable from the improved MLS baseline (with $0 . 0 3 \%$ difference in average open-set performance).
|
| 109 |
+
|
| 110 |
+
Discussion. A number of increasingly sophisticated methods have been proposed for OSR in recent years. Typically, proposed methods have carefully tuned training strategies and hyper-parameters, such as custom learning rate schedules (Zhang et al., 2020), non-standard backbones (Guo et al., 2021) and novel data augmentations (Zhou et al., 2021). Meanwhile, the closed-set accuracy of the methods is often unreported. As such, it is difficult to delineate what proportion of the open-set performance gains come from increases in closed-set accuracy. Our findings in this section suggest that many of the gains could equally be realised through the standard baseline. Indeed, in sec. 5, we propose new evaluation protocols and find that once the closed-set accuracy of ARPL and the baseline are made comparable, there is negligible difference in open-set performance. We further experiment on OoD benchmarks in appendix F and report similarly improved baseline performance.
|
| 111 |
+
|
| 112 |
+
# 5 SEMANTIC SHIFT BENCHMARK
|
| 113 |
+
|
| 114 |
+
Current OSR benchmarks have two drawbacks: (1) they all involve small scale datasets; (2) they lack a clear definition of what constitutes a ‘semantic class’. The latter is important to delineate the open-set field from other research questions such as out-of-distribution detection (Hendrycks & Gimpel, 2017) and anomaly detection (Kwon et al., 2020). Specifically, OSR aims to identify whether a test image is semantically different to the training classes, not whether, for example, the model is uncertain about its prediction or whether there has been a low-level distributional shift.
|
| 115 |
+
|
| 116 |
+
To address these issues, we propose a new suite of evaluation benchmarks. In this section, we first detail a large-scale ImageNet evaluation (introduced in sec. 3.2) before proposing three evaluations on fine-grained datasets which have clear definitions of a semantic class. Differently to previous work, our evaluation settings all aim to explicitly capture the notion of semantic novelty. Finally, we benchmark MLS and ARPL on the new benchmark suite to motivate future research.
|
| 117 |
+
|
| 118 |
+
# 5.1 PROPOSED BENCHMARK DATATSETS
|
| 119 |
+
|
| 120 |
+
ImageNet. We introduce a large-scale evaluation for category shift, with open-set splits based on semantic distances to the training set. Specifically, we designate the original ImageNet-1K classes for the closed-set, and choose open-set classes from the disjoint set of ImageNet-21K-P (Ridnik et al., 2021). We exploit the hierarchical, tree-like semantic structure of the ImageNet database. For instance, the class ‘elephant’ can be labelled at multiple levels of semantic abstraction (‘elephant’, ‘placental’, ‘mammal’, ‘vertebrate’, ‘animal’). Thus, for each pair of classes between ImageNet-1K and ImageNet-21K-P, we define the semantic distance between two classes as the total path distance between their nodes in the semantic tree. We then approximate the total semantic distance from the ImageNet-21K-P classes to the closed-set by summing distances to all ImageNet-1K classes. Finally, we select ‘Easy’ and ‘Hard’ open-set splits by sorting the total distances to the closed-set and selecting two sets of 1000 categories. We note that the larger ImageNet database has been used for OSR research previously (Bendale & Boult, 2016; Kumar et al., 2021; Hendrycks et al., 2021). However, we structure explicitly for semantic similarity with ImageNet-1K similarly to concurrent work in (Sariyildiz et al., 2021).
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 5: Open-set class pairs for CUB. For three difficulties {‘Easy’ (green/left), ‘Medium’ (orange/middle), ‘Hard’ (red/right)}, we show an image from an open-set class (right) and its most similar closed-set class (left). Note that the harder the difficulty, the more visual features (e.g., foot colour or bill shape) the open-set class has in common with the closed-set. Further examples can be found in appendix H.
|
| 124 |
+
|
| 125 |
+
Fine-grained classification datasets. Consider the properties of fine-grained visual categorization (FGVC) datasets. These datasets are defined by an ‘entry level’ category, such as flowers (Nilsback & Zisserman, 2008) or birds (Wah et al., 2011). Within the dataset, all classes are variants of that single category, defining a single axis of semantic variation, e.g., ‘bird species’ in the case of birds. Because the axis of variation is well defined, it is reasonable to expect a classifier to learn it given a number of example classes — namely, to learn what bird species are and how they can be distinguished.
|
| 126 |
+
|
| 127 |
+
Contrast FGVC datasets with the current OSR benchmarks, such as the $\mathrm { C I F A R { + } } 1 0$ evaluation. In this case, a model is trained on four CIFAR10 classes such as {airplane, automobile, ship, truck}, all of which could be considered ‘entry level’, before having to identify images from CIFAR100 classes such as {bicycle, bee, porcupine, baby} as belonging to new classes. In this case, the axis of variation is much less specific, and it is uncertain whether the OSR model is responding to a true semantic signal or simply to low-level distributional shifts in the ‘unseen’ data. Furthermore, because of the small number of training classes in the current benchmark settings, it is unrealistic for a classifier to learn such high-level class definitions. We give an illustrative example of this in appendix G.
|
| 128 |
+
|
| 129 |
+
As a result, we propose three FGVC datasets for OSR evaluation: Caltech-UCSD Birds (CUB) (Wah et al., 2011), Stanford Cars (Krause et al., 2013) FGVC-Aircraft (Maji et al., 2013). These datasets come with labelled attributes (e.g., has_bill_shape::hooked in CUB), which can be used to characterize the differences between classes and thus the degree of semantic shift. We use attributes to construct open-set FGVC class splits which are binned into ‘Easy’, ‘Medium’ and ‘Hard’ classes, with the difficulty depending on the similarity of labelled visual attributes with any of the training classes. We sketch the split-construction process for CUB here, and refer to appendix H for more details on Stanford Cars and FGVC-Aircraft.
|
| 130 |
+
|
| 131 |
+
Every image in CUB is labelled for the presence of 312 visual attributes such as has_bill_shape::hooked and has_breast_color::yellow. This information is aggregated for each class, resulting in a matrix $M \in [ 0 , \bar { 1 } ] ^ { C \times A }$ , describing the frequency with which each attribute appears in each class.
|
| 132 |
+
|
| 133 |
+
Table 2: Statistics of the Semantic Shift Benchmark. We show ‘#Classes(#Test Images)’ for the known classes, and for the ‘Easy’, ‘Medium’ and ‘Hard’ open-set classes.
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Dataset</td><td>Known</td><td>|Easy</td><td>Medium</td><td>Hard</td></tr><tr><td>CUB</td><td>100 (2884)</td><td>32 (915)</td><td>34 (1004)</td><td>34 (991)</td></tr><tr><td>Stanford Cars</td><td>98 (3948)</td><td>76 (3170)</td><td></td><td>22 (923)</td></tr><tr><td>FGVC-Aircraft</td><td>50(1668)</td><td>20 (667)</td><td>17 (565)</td><td>13 (433)</td></tr><tr><td>ImageNet</td><td>1000 (50000)</td><td>1000 (50000)</td><td></td><td>1000 (50000)</td></tr></table>
|
| 136 |
+
|
| 137 |
+
Treating each row in $M$ as a semantic class descriptor, this allows us to compute the semantic similarity of every pair of classes and, given a set of closed-set classes, identify which remaining classes are ‘Easy’, ‘Medium’ and ‘Hard’ (least to most similar) with respect to the closed-set. Examples of ‘Easy’, ‘Medium’ and ‘Hard’ open-set classes, along with their closest class in the closed-set, are shown in fig. 5 for CUB.
|
| 138 |
+
|
| 139 |
+
We note that fine-grained OSR has been demonstrated in (Chen et al., 2021; 2020a) on a dataset of 300 aircraft classes. However, this dataset does not come with labelled attributes, making it harder to construct open-set splits with varying levels of semantic similarity to the training set, which is our focus here. Finally, while prior works have recognised the difficulty of OoD detection for more fine-grained data (Bodesheim et al., 2015; Perera & Patel, 2019; Lee et al., 2018a), we propose them for OSR because of their clear definition of a semantic class rather than their increased difficulty. A further discussion of these ideas is presented in appendix G. We provide statistics of the splits from all proposed datasets in table 2, and the splits themselves in the supplementary material.
|
| 140 |
+
|
| 141 |
+
# 5.2 BENCHMARKING FOR OPEN-SET RECOGNITION
|
| 142 |
+
|
| 143 |
+
Evaluation Protocol. For the ‘known/unknown’ class decision, we report AUROC as is standard practise, as well as accuracy to allow potential gains in open-set performance to be contextualized in the closed-set accuracy of a model. We also report Open-Set Classification Rate (OSCR) (Dhamija et al., 2018) which measures the trade-off between accuracy and open-set detection rate as a threshold on the confidence of the predicted class is varied. We report results on ‘Easy’ and ‘Hard’ splits for all datasets, combining ‘Medium’ and ‘Hard’ examples into a single bin when applicable.
|
| 144 |
+
|
| 145 |
+
In fine-grained classification, it is standard to pre-train models on ImageNet. This is unsuitable for the proposed fine-grained OSR setting, as ImageNet contains overlapping classes with the proposed datasets. Instead, we pre-train the network on Places (Zhou et al., 2017) using MoCoV2 selfsupervised weights (Chen et al., 2020b; Zhao et al., 2021). For the ImageNet benchmark, we can train with labels on the ImageNet-1K dataset and evaluate on the unseen classes. We finetune the ARPL model from a pre-trained ImageNet checkpoint.
|
| 146 |
+
|
| 147 |
+
Results. In table 3 we test MLS and $\mathrm { { A R P L + } }$ (Chen et al., 2021) using a ResNet50 backbone on the proposed benchmarks (we found $\mathrm { A R P L + C S }$ to be prohibitively expensive to train in this setting, see appendix $\supset$ for details). The results corroborate the trends found in sec. 4: strong closed-set classifiers produce open-set results with good AUROC performance, and the MLS baseline performs comparably to the state-of-the-art method. In fact, while we find $\mathrm { \ A R P L + }$ achieves slightly better AUROC on the ImageNet benchmark, MLS outperforms in terms of OSCR across the board.
|
| 148 |
+
|
| 149 |
+
Finally, more careful consideration of the semantics of the open-set classes leads to harder splits significantly reducing OSR performance. This is in contrast to ‘openness’ (Scheirer et al., 2013), the current measure used to assess the difficulty of an OSR problem, dependent on the ratio of the number of closed to open-set classes. For instance, in the ImageNet case, we find the harder split to be lead to around $6 \%$ worse AUROC for both methods. We also experimented with randomly subsampling first 1K and then 10K open-set classes, finding that introducing more classes during evaluation only reduced open-set performance by around $0 . 6 \%$ ( $1 0 \times$ less than our proposed splits).
|
| 150 |
+
|
| 151 |
+
Table 3: OSR results on the Semantic Shift Benchmark. We measure the closed-set classification accuracy and AUROC on the binary open-set decision. We also report OSCR, which measures the trade-off between open and closed-set performance. OSR results are shown on ‘Easy / Hard’ splits.
|
| 152 |
+
|
| 153 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">CUB</td><td colspan="3">SCars</td><td colspan="3">FGVC-Aircraft</td><td colspan="3">ImageNet</td></tr><tr><td>Acc.</td><td>AUROC</td><td>OSCR</td><td>Acc.</td><td>AUROC</td><td>OSCR</td><td>Acc.</td><td>AUROC</td><td>OSCR</td><td>Acc.</td><td>AUROC</td><td>OSCR</td></tr><tr><td>ARPL+</td><td>85.9</td><td>83.5/75.5</td><td>76.0 / 69.6</td><td>96.9</td><td>94.8 /83.6</td><td>92.8 /82.3</td><td>91.5</td><td>87.0/77.7</td><td>83.3/74.9</td><td>78.1</td><td>79.0/73.6</td><td>65.9 / 62.6</td></tr><tr><td>MLS</td><td>86.2</td><td>88.3/79.3</td><td>79.8/73.1</td><td>97.1</td><td>94.0 /82.2</td><td>92.2/81.1</td><td>91.7</td><td>90.7/82.3</td><td>86.8 /79.8</td><td>78.8</td><td>78.2 /72.6</td><td>66.1/62.7</td></tr></table>
|
| 154 |
+
|
| 155 |
+
# 6 CONCLUSION
|
| 156 |
+
|
| 157 |
+
In this work we have demonstrated a strong correlation between the closed-set and open-set performance of models for the task of open-set recognition. Leveraging this finding, we have demonstrated that a well-trained closed-set classifier, using the maximum logit score (MLS) at test-time, can be competitive with or outperform existing state-of-the-art methods. Though we believe OSR is a critical problem which requires further investigation, our findings give us insufficient evidence to reject our titular question of ‘is a good closed-set classifier all you need?’. We have also proposed the ‘Semantic Shift Benchmark’ suite, which isolates semantic shift from other low-level distributional shifts. Our proposed benchmark suite allows controlled study of semantic novelty, including stratification of the degree of semantic shift.
|
| 158 |
+
|
| 159 |
+
# ACKNOWLEDGEMENTS
|
| 160 |
+
|
| 161 |
+
We would like to thank Andrew Brown for many interesting discussions on this work. This research is funded by a Facebook AI Research Scholarship, a Royal Society Research Professorship, and the EPSRC Programme Grant VisualAI EP/T028572/1.
|
| 162 |
+
|
| 163 |
+
# ETHICS STATEMENT
|
| 164 |
+
|
| 165 |
+
Open-set recognition is of immediate relevance to the safe and ethical deployment of machine learning models. In real-world settings, it is unrealistic to expect that all categories of interest to the user will be represented in the training set. For instance, in an autonomous driving scenario, forcing the model to identify every object as an instance of a training category could lead it to make unsafe decisions.
|
| 166 |
+
|
| 167 |
+
When considering potential negative societal impacts of this work, we identify the possibility that OSR research may lead to complacent consideration of the training data. As we have demonstrated, OSR models are far from perfect and cannot be exclusively relied upon in practical deployment. As such, it remains of critical importance to carefully curate training data and ensure its distribution is representative of the target task.
|
| 168 |
+
|
| 169 |
+
Finally, we comment on the dataset privacy considerations for the existing and proposed benchmarks. All datasets are licensed for academic/non-commercial research. However, CIFAR, TinyImageNet and ImageNet contain some personal data for which consent was likely not obtained. The proposed FGVC datasets have the added benefit of containing no personal information.
|
| 170 |
+
|
| 171 |
+
# REFERENCES
|
| 172 |
+
|
| 173 |
+
Davide Abati, Angelo Porrello, Simone Calderara, and Rita Cucchiara. Latent space autoregression for novelty detection. In CVPR, 2019.
|
| 174 |
+
|
| 175 |
+
Irwan Bello, William Fedus, Xianzhi Du, Ekin D. Cubuk, Aravind Srinivas, Tsung-Yi Lin, Jonathon Shlens, and Barret Zoph. Revisiting resnets: Improved training and scaling strategies. arXiv preprint arXiv:2103.07579, 2021.
|
| 176 |
+
|
| 177 |
+
Abhijit Bendale and Terrance E. Boult. Towards open set deep networks. In CVPR, 2016.
|
| 178 |
+
|
| 179 |
+
Liron Bergman and Yedid Hoshen. Classification-based anomaly detection for general data. In ICLR, 2020.
|
| 180 |
+
|
| 181 |
+
Paul Bodesheim, Alexander Freytag, Erik Rodner, and Joachim Denzler. Local novelty detection in multi-class recognition problems. In WACV, 2015.
|
| 182 |
+
|
| 183 |
+
Terrance E. Boult, Steve Cruz, Akshay Raj Dhamija, Manuel Günther, James Henrydoss, and Walter J. Scheirer. Learning and the unknown: Surveying steps toward open world recognition. In AAAI, 2019.
|
| 184 |
+
|
| 185 |
+
Guangyao Chen, Limeng Qiao, Yemin Shi, Peixi Peng, Jia Li, Tiejun Huang, Shiliang Pu, and Yonghong Tian. Learning open set network with discriminative reciprocal points. In ECCV, 2020a.
|
| 186 |
+
|
| 187 |
+
Guangyao Chen, Peixi Peng, Xiangqian Wang, and Yonghong Tian. Adversarial reciprocal points learning for open set recognition. IEEE TPAMI, 2021.
|
| 188 |
+
|
| 189 |
+
Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b.
|
| 190 |
+
|
| 191 |
+
M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In CVPR, 2014.
|
| 192 |
+
|
| 193 |
+
Ekin Dogus Cubuk, Barret Zoph, Jon Shlens, and Quoc Le. Randaugment: Practical automated data augmentation with a reduced search space. In NeurIPS, 2020.
|
| 194 |
+
|
| 195 |
+
Akshay Raj Dhamija, Manuel Günther, and Terrance E. Boult. Reducing network agnostophobia. In NeurIPS, 2018.
|
| 196 |
+
|
| 197 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.
|
| 198 |
+
|
| 199 |
+
Xuefeng Du, Zhaoning Wang, Mu Cai, and Yixuan Li. Vos: Learning what you don’t know by virtual outlier synthesis. ICLR, 2022.
|
| 200 |
+
|
| 201 |
+
Stanislav Fort, Jie Ren, and Balaji Lakshminarayanan. Exploring the limits of out-of-distribution detection. ICML Workshop on Uncertainty & Robustness in Deep Learning, 2021.
|
| 202 |
+
|
| 203 |
+
Zongyuan Ge, Sergey Demyanov, and Rahil Garnavi. Generative openmax for multi-class open set classification. In BMVC, 2017.
|
| 204 |
+
|
| 205 |
+
Tilmann Gneiting, Fadoua Balabdaoui, and Adrian E. Raftery. Probabilistic forecasts, calibration and sharpness. Journal of the Royal Statistical Society, 2007.
|
| 206 |
+
|
| 207 |
+
Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. ICML, 2017.
|
| 208 |
+
|
| 209 |
+
Yunrui Guo, Guglielmo Camporese, Wenjing Yang, Alessandro Sperduti, and Lamberto Ballan. Conditional variational capsule network for open set recognition. ICCV, 2021.
|
| 210 |
+
|
| 211 |
+
Kai Han, Andrea Vedaldi, and Andrew Zisserman. Learning to discover novel visual categories via deep transfer clustering. In ICCV, 2019.
|
| 212 |
+
|
| 213 |
+
Kai Han, Sylvestre-Alvise Rebuffi, Sebastien Ehrhardt, Andrea Vedaldi, and Andrew Zisserman. Automatically discovering and learning new visual categories with ranking statistics. In ICLR, 2020.
|
| 214 |
+
|
| 215 |
+
Kai Han, Sylvestre-Alvise Rebuffi, Sebastien Ehrhardt, Andrea Vedaldi, and Andrew Zisserman. Autonovel: Automatically discovering and learning novel visual categories. IEEE TPAMI, 2021.
|
| 216 |
+
|
| 217 |
+
Kaiming He, X. Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 218 |
+
|
| 219 |
+
Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In ICLR, 2017.
|
| 220 |
+
|
| 221 |
+
Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In ICLR, 2019.
|
| 222 |
+
|
| 223 |
+
Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. CVPR, 2021.
|
| 224 |
+
|
| 225 |
+
Yen-Chang Hsu, Yilin Shen, Hongxia Jin, and Zsolt Kira. Generalized odin: Detecting out-ofdistribution image without learning from out-of-distribution data. In CVPR, 2020.
|
| 226 |
+
|
| 227 |
+
Shu Kong and Deva Ramanan. Opengan: Open-set recognition via open data generation. ICCV, 2021.
|
| 228 |
+
|
| 229 |
+
Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In International IEEE Workshop on 3D Representation and Recognition (3dRR), 2013.
|
| 230 |
+
|
| 231 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. University of Toronto, 2009.
|
| 232 |
+
|
| 233 |
+
Pulkit Kumar, Anubhav, Abhinav Shrivastava, and Shu Kong. Open world vision challenge. CVPR Workshop on Open World Vision, 2021.
|
| 234 |
+
|
| 235 |
+
Gukyeong Kwon, Mohit Prabhushankar, Dogancan Temel, and Ghassan AlRegib. Backpropagated gradient representations for anomaly detection. In ECCV, 2020.
|
| 236 |
+
|
| 237 |
+
Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. In CS231N, 2015.
|
| 238 |
+
|
| 239 |
+
Yann LeCun, Corinna Cortes, and CJ Burges. Mnist handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, 2010.
|
| 240 |
+
|
| 241 |
+
Kibok Lee, Kimin Lee, Kyle Min, Yuting Zhang, Jinwoo Shin, and Honglak Lee. Hierarchical novelty detection for visual object recognition. In CVPR, 2018a.
|
| 242 |
+
|
| 243 |
+
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. NeurIPS, 2018b.
|
| 244 |
+
|
| 245 |
+
Shiyu Liang, Yixuan Li, and Rayadurgam Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In ICLR, 2018.
|
| 246 |
+
|
| 247 |
+
Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast autoaugment. In NeurIPS, 2019.
|
| 248 |
+
|
| 249 |
+
Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. NeurIPS, 2020.
|
| 250 |
+
|
| 251 |
+
Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts. In ICLR, 2017.
|
| 252 |
+
|
| 253 |
+
Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013.
|
| 254 |
+
|
| 255 |
+
Luke Melas-Kyriazi. Do you even need attention? a stack of feed-forward layers does surprisingly well on imagenet. ArXiv e-prints, 2021.
|
| 256 |
+
|
| 257 |
+
Dimity Miller, Niko Sünderhauf, Michael Milford, and Feras Dayoub. Class anchor clustering: a distance-based loss for training open set classifiers. In WACV, 2021.
|
| 258 |
+
|
| 259 |
+
Matthias Minderer, Josip Djolonga, Rob Romijnders, Frances Hubis, Xiaohua Zhai, Neil Houlsby, Dustin Tran, and Mario Lucic. Revisiting the calibration of modern neural networks. ArXiv e-prints, 2021.
|
| 260 |
+
|
| 261 |
+
Lawrence Neal, Matthew Olson, Xiaoli Fern, Weng-Keen Wong, and Fuxin Li. Open set learning with counterfactual images. In ECCV, 2018.
|
| 262 |
+
|
| 263 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NeurIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011.
|
| 264 |
+
|
| 265 |
+
Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In Proceedings of the Indian Conference on Computer Vision, Graphics and Image Processing, 2008.
|
| 266 |
+
|
| 267 |
+
Poojan Oza and Vishal M. Patel. C2ae: Class conditioned auto-encoder for open-set recognition. In CVPR, 2019.
|
| 268 |
+
|
| 269 |
+
Pramuditha Perera and Vishal M. Patel. Deep transfer learning for multiple class novelty detection. In CVPR, 2019.
|
| 270 |
+
|
| 271 |
+
Pramuditha Perera, Ramesh Nallapati, and Bing Xiang. Ocgan: One-class novelty detection using gans with constrained latent representations. In CVPR, 2019.
|
| 272 |
+
|
| 273 |
+
Pramuditha Perera, Vlad I. Morariu, Rajiv Jain, Varun Manjunatha, Curtis Wigington, Vicente Ordonez, and Vishal M. Patel. Generative-discriminative feature representations for open-set recognition. In CVPR, 2020.
|
| 274 |
+
|
| 275 |
+
Rajeev Ranjan, Carlos Domingo Castillo, and Rama Chellappa. L2-constrained softmax loss for discriminative face verification. arXiv preprint arXiv:1703.09507, 2017.
|
| 276 |
+
|
| 277 |
+
Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In ICML, 2019.
|
| 278 |
+
|
| 279 |
+
Tal Ridnik, Emanuel Ben-Baruch, Asaf Noy, and Lihi Zelnik-Manor. Imagenet-21k pretraining for the masses. ArXiv e-prints, 2021.
|
| 280 |
+
|
| 281 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015.
|
| 282 |
+
|
| 283 |
+
Mert Bulent Sariyildiz, Yannis Kalantidis, Diane Larlus, and Karteek Alahari. Concept generalization in visual representation learning. In ICCV, 2021.
|
| 284 |
+
|
| 285 |
+
Walter J. Scheirer, Anderson Rocha, Archana Sapkota, and Terrance E. Boult. Towards open set recognition. IEEE TPAMI, 2013.
|
| 286 |
+
|
| 287 |
+
Yu Shu, Yemin Shi, Yaowei Wang, Tiejun Huang, and Yonghong Tian. P-odn: Prototype-based open deep network for open set recognition. Scientific Reports, 2020.
|
| 288 |
+
|
| 289 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 290 |
+
|
| 291 |
+
Xin Sun, Zhenning Yang, Chi Zhang, Guohao Peng, and Keck-Voon Ling. Conditional gaussian distribution learning for open set recognition. In CVPR, 2020.
|
| 292 |
+
|
| 293 |
+
Xin Sun, Chi Zhang, Guosheng Lin, and Keck-Voon Ling. Open set recognition with conditional probabilistic generative models. arXiv preprint arXiv:2008.05129, 2021.
|
| 294 |
+
|
| 295 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016.
|
| 296 |
+
|
| 297 |
+
Jihoon Tack, Sangwoo Mo, Jongheon Jeong, and Jinwoo Shin. Csi: Novelty detection via contrastive learning on distributionally shifted instances. In NeurIPS, 2020.
|
| 298 |
+
|
| 299 |
+
Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. ICML, 2019.
|
| 300 |
+
|
| 301 |
+
Ilya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Andreas Steiner, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, and Alexey Dosovitskiy. Mlp-mixer: An all-mlp architecture for vision. In arXiv, 2021.
|
| 302 |
+
|
| 303 |
+
Antonio Torralba, Rob Fergus, and William T. Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE TPAMI, 2008.
|
| 304 |
+
|
| 305 |
+
Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The CaltechUCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011.
|
| 306 |
+
|
| 307 |
+
Ross Wightman. Pytorch image models. GitHub repository [Online]. Available: https://github.com/rwightman/pytorch-image-models, 2019.
|
| 308 |
+
|
| 309 |
+
Pingmei Xu, Krista A Ehinger, Yinda Zhang, Adam Finkelstein, Sanjeev R. Kulkarni, and Jianxiong Xiao. Turkergaze: Crowdsourcing saliency with webcam based eye tracking. ArXiv e-prints, 2015.
|
| 310 |
+
|
| 311 |
+
Ryota Yoshihashi, Wen Shao, Rei Kawakami, Shaodi You, Makoto Iida, and Takeshi Naemura. Classification-reconstruction learning for open-set recognition. In CVPR, 2019.
|
| 312 |
+
|
| 313 |
+
Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. ArXiv e-prints, 2015.
|
| 314 |
+
|
| 315 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017.
|
| 316 |
+
|
| 317 |
+
Hongjie Zhang, Ang Li, Jie Guo, and Yanwen Guo. Hybrid models for open set recognition. In ECCV, 2020.
|
| 318 |
+
|
| 319 |
+
Nanxuan Zhao, Zhirong Wu, Rynson W.H. Lau, and Stephen Lin. What makes instance discrimination good for transfer learning? In ICLR, 2021.
|
| 320 |
+
|
| 321 |
+
Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. In IEEE TPAMI, 2017.
|
| 322 |
+
|
| 323 |
+
Da-Wei Zhou, Han-Jia Ye, and De-Chuan Zhan. Learning placeholders for open-set recognition. In CVPR, 2021.
|
| 324 |
+
|
| 325 |
+
# A EXPANSION OF FIG. 2 OF THE MAIN PAPER WITH STANDARD DEVIATIONS
|
| 326 |
+
|
| 327 |
+
For completeness, we include another version of fig. 2 which includes OSRCI models (Neal et al., 2018) in fig. 6. We find the correlation between the closed and open-set performance continues to hold with the inclusion of this additional method. We further report the standard deviations of this plot in table 4. It can be seen that, for the same dataset, the standard deviations of all four methods appear to be similar. The standard deviations on the most challenging TinyImageNet benchmark is greater than on the other datasets.
|
| 328 |
+
|
| 329 |
+
Finally, we note in fig. 6 that the trend seems less clear at very high accuracies. This may be because AUROC also becomes very high, making it difficult to identify clear patterns. However, it may also indicate that the relationship between the metrics becomes weaker as closed-set performance saturates.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 6: Correlation between open-set and closed-set performances on the standard OSR benchmarks. This plot is similar to fig. 2 but includes scatter points for OSRCI (Neal et al., 2018).
|
| 333 |
+
|
| 334 |
+
Table 4: Standard deviations of our experiments in fig. 2 of the main paper. We report the standard deviations for both the closed-set and open-set performance (accuracy/AUROC) across the five ‘known/unknown’ class splits.
|
| 335 |
+
|
| 336 |
+
<table><tr><td>Method</td><td>MNIST</td><td>SVHN</td><td>CIFAR10</td><td>CIFAR + 50</td><td>TinyImageNet</td></tr><tr><td>MSP</td><td>0.20/1.29</td><td>0.36/0.55</td><td>1.64/1.34</td><td>0.79/1.23</td><td>4.83/1.36</td></tr><tr><td>OSRCI</td><td>0.22/0.52</td><td>0.47/2.97</td><td>1.99/1.80</td><td>0.63/1.47</td><td>3.27/3.02</td></tr><tr><td>ARPL</td><td>0.21/0.77</td><td>0.43/0.79</td><td>2.10/1.56</td><td>0.66/0.44</td><td>5.40/1.63</td></tr><tr><td>ARPL + CS</td><td>0.29/1.04</td><td>0.51/0.31</td><td>1.70/1.68</td><td>0.63/0.23</td><td>4.40/1.55</td></tr></table>
|
| 337 |
+
|
| 338 |
+
# B ANALYSING THE CLOSED-SET AND OPEN-SET CORRELATION
|
| 339 |
+
|
| 340 |
+
Here, we aim to understand why improving the closed-set accuracy may lead to increased open-set performance through the MSL baseline. To this end, we train the VGG32 model on the CIFAR10 benchmark setting with the cross-entropy loss. We train the model both with a feature dimension of $D = 1 2 8$ (as is standard for this model) as well as with $D = 2$ for feature space visualization. We also train without a bias in the linear classifier for more interpretable features and classification boundaries (so class boundaries radiate from the origin of the feature space). Specifically, we train a model to make predictions as $\hat { \mathbf { y } } _ { i } = \mathrm { s o f t m a x } ( \mathbf { W } \Phi _ { \theta } ( \mathbf { x } _ { i } ) )$ , where $\Phi _ { \theta } ( \cdot )$ is a CNN embedding function $( \Phi _ { \theta } ( \mathbf { x } ) \in \mathbb { R } ^ { \dot { D } } )$ and $\mathbf { W } \in \mathbb { R } ^ { C \times D }$ is the linear classification matrix. Here $C = | \mathcal { C } | = 6$ and $D \in \{ 2 , 1 2 8 \}$ , and we optimise the loss with a one-hot target vector $\mathbf { y } _ { i }$ and batch size $B$ , as $\begin{array} { r } { - \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \mathbf { y } _ { i } \cdot \log ( \hat { \mathbf { y } } _ { i } ) . } \end{array}$ .
|
| 341 |
+
|
| 342 |
+
Next, we interrogate the learned embeddings by plotting the mean vector norm of the features from all test images, for both the known and unknown classes, as training proceeds. These are shown in fig. 7a and fig. 7b for the models with $D = 1 2 8$ and $D = 2$ respectively. We also show the average vector norm for the per-class weights in the linear classifiers as dashed lines. Furthermore, snapshots of how these images are embedded for the model with $D = 2$ are shown in fig. 7d to 7f at representative epochs. The plots of the mean feature norms show that, at the start of training, all images are embedded with a similar magnitude. However, as training proceeds, the magnitude of features for the known classes increases substantially more than for the unknown classes.
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 7: Plots showing how the feature representations and linear classification weights of a deep classifier evolve as training proceeds (CIFAR10 OSR setting). (a), (b) show the average feature norm for seen and unseen classes, as well as the per-class vector norms for the weights in the linear classification head, for models with $D = 1 2 8$ and $D = 2$ respectively. (c) shows how the open-set performance of the classifier with $D = 1 2 8$ develops as training proceeds, using three different OSR scoring rules. (d), (e), (f) show the feature projections for images from seen and unseen classes at different epochs (indicated by vertical dashed lines in (b)) for the model with $D = 2$ . We show test images from known classes in colour and unknown classes in black. (g) (h) (i) show how classifier weight and feature norms change as a function of weight decay strength $( \lambda )$
|
| 346 |
+
|
| 347 |
+
To understand this, consider the cross-entropy loss for a single sample in the batch, shown in eq. (2):
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\mathcal { L } _ { i } ( \theta , \mathbf { W } ) = - \hat { y } _ { i , c } + \log ( \sum _ { j = 1 } ^ { C } \exp ( \hat { y } _ { i , j } ) ) = - \mathbf { w } _ { c } \cdot \Phi _ { \theta } ( \mathbf { x } _ { i } ) + \log ( \sum _ { j = 1 } ^ { C } \exp ( \mathbf { w } _ { j } \cdot \Phi _ { \theta } ( \mathbf { x } _ { i } ) ) )
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
where $c$ refers to the correct class index, and ${ \bf w } _ { j }$ refers to the classification vector corresponding to the $j ^ { t h }$ class. Empirically, we find that the linear classifier’s weights and the feature norms for known classes increase during training, which is justified as increasing both $\left| \mathbf { w } _ { c } \right|$ and $| \Phi _ { \theta } ( \mathbf { x } _ { i } ) |$ reduces the loss value. Note that we observe this despite training with weight decay, which we omit from eq. (2) for clarity. 1 However, for ‘hard’ or ‘uncertain’ training examples (for which the classifier’s prediction may be incorrect) the model is encouraged to reduce $\mathbf { w } _ { j } \cdot \Phi _ { \theta } ( \mathbf { x } _ { i } ) \forall j \neq c$ through the second term of eq. (2). While the only way to do this for the $D = 2$ case is to reduce the feature norm (fig. 7b and fig. 7d to 7f), we show in fig. 7a that this also holds true for the $D = 1 2 8$ case in which $D > C$ . The tendency of deep networks to map ‘hard’ samples closer to the origin has been noted in (Ranjan et al., 2017).
|
| 354 |
+
|
| 355 |
+
This suggests that stronger cross-entropy models project features further from the origin, while still ensuring that any ‘uncertain’ samples have lower feature norms. This, in turn, suggests stronger cross-entropy classifiers would perform better for OSR, with images from novel categories likely to be interpreted as ‘uncertain’ during evaluation. Our analysis also suggests that cross-entropy training already provides a strong signal and thus a strong baseline for open-set recognition.
|
| 356 |
+
|
| 357 |
+
Finally, this motivates us to propose the maximum logit score (MLS) to provide our open-set score, i.e., $\begin{array} { r } { \dot { S } ( y \in \mathcal { C } | \mathbf { x } ) = \operatorname* { m a x } _ { j \in \mathcal { C } } \mathbf { w } _ { j } \cdot \boldsymbol { \Phi } _ { \theta } ( \mathbf { x } ) } \end{array}$ , rather than the softmax output as in the standard MSP baseline. Normalizing the logits via the softmax operator cancels out the magnitude information of the feature representation, which we have demonstrated is useful for the OSR decision. Fig. 7c shows how the AUROC evolves as training proceeds when both the maximum logit and maximum softmax value are used for OSR scoring. The plot demonstrates that softmax normalization noticeably reduces the model’s ability to make the open-set decision. We also show the OSR performance if we use the feature norm as our open-set score $( S ( y \in \mathcal { C } | \mathbf { x } ) = | \Phi _ { \theta } ( \mathbf { x } ) | )$ , showing that this simple indicator can perform remarkably well.
|
| 358 |
+
|
| 359 |
+
# C IMPROVING OPEN-SET PERFORMANCE WITH STRONGER CLOSED-SETCLASSIFIERS
|
| 360 |
+
|
| 361 |
+
Here, we describe how we improve the open-set performance of the baseline method in sec. 4 of the main paper, and provide a full breakdown of fig. 4. The methods include better learning rate schedules and data augmentations, as well as the use of logits rather than the softmax output for OSR scoring. We document the closed-set and open-set performance on the TinyImageNet dataset (the most challenging of the OSR benchmarks) in table 5. We further include the ‘Open Set Classification Rate’ (OSCR (Dhamija et al., 2018)) which summarises the trade-off between closed-set accuracy and open-set performance (here, in terms of the False Positive Rate) as the threshold on the open-set score is varied. As demonstrated in sec. 4 of the main paper, the findings of this study generalize well to other datasets.
|
| 362 |
+
|
| 363 |
+
Table 5: Breakdown of methods used to improve the closed-set classification accuracy of the baseline method. All experiments were conducted with a VGG32 backbone over five ‘known/unknown’ splits of the TinyImageNet dataset. The bracketed number with the Cosine scheduler indicates the number of learning rate restarts used during training. We find a Pearson Product-Moment correlation of 0.93 between the closed-set accuracy and the open-set AUROC.
|
| 364 |
+
|
| 365 |
+
<table><tr><td></td><td colspan="5">Setting</td><td rowspan="2">Ensemble</td><td rowspan="2">Closed Set (Accuracy)</td><td rowspan="2">Open Set (AUROC)</td><td rowspan="2">Combined (OSCR)</td></tr><tr><td>Epochs</td><td>Scheduler</td><td>Aug.</td><td>Logit Eval</td><td>Warmup</td><td>Label Smoothing</td></tr><tr><td>100</td><td>Step</td><td>RandCrop</td><td>X</td><td>X</td><td>X</td><td>X</td><td>64.3</td><td>68.9</td><td>51.4</td></tr><tr><td>100</td><td>Step</td><td>RandCrop</td><td></td><td>X</td><td>X</td><td>X</td><td>64.3</td><td>69.6</td><td>50.7</td></tr><tr><td>200</td><td>Cosine (0)</td><td>RandCrop</td><td>√</td><td>×</td><td>X</td><td>×</td><td>77.7</td><td>74.8</td><td>64.3</td></tr><tr><td>200</td><td>Cosine (0)</td><td>CutOut</td><td>√</td><td>X</td><td>X</td><td>×</td><td>77.6</td><td>75.4</td><td>64.7</td></tr><tr><td>200</td><td>Cosine (0)</td><td>RandAug</td><td>√</td><td>X</td><td>X</td><td>X</td><td>79.8</td><td>76.6</td><td>67.3</td></tr><tr><td>600</td><td>Cosine (2)</td><td>RandAug</td><td>√</td><td>X</td><td>X</td><td>X</td><td>82.5</td><td>78.2</td><td>70.3</td></tr><tr><td>600</td><td>Cosine (2)</td><td>RandAug</td><td></td><td>√</td><td>X</td><td>×</td><td>82.5</td><td>78.4</td><td>70.3</td></tr><tr><td>600</td><td>Cosine (2)</td><td>RandAug</td><td>1</td><td><</td><td>√</td><td>X</td><td>84.2</td><td>83.0</td><td>74.3</td></tr><tr><td>600</td><td>Cosine (2)</td><td>RandAug</td><td></td><td>√</td><td>√</td><td>√</td><td>85.3</td><td>84.0</td><td>76.1</td></tr></table>
|
| 366 |
+
|
| 367 |
+
We first train the baseline with the same hyper-parameters as in (Chen et al., 2021), training for 100 epochs and using a step learning rate schedule, with a basic random crop augmentation strategy. We evaluate using both softmax and logit scoring strategies. It can be seen that using maximum logit scoring gives better open-set performance (AUROC), while softmax scoring appears to be better in terms of OSCR. This is likely due to the fact that softmax normalization cancels the effect of the feature norm, which results in more separable scores that are beneficial to the OSCR calculation.
|
| 368 |
+
|
| 369 |
+
Here, we are interested in boosting the open-set performance (AUROC) by improving the closed-set accuracy. Hence, we use the maximum logit for open-set scoring as discussed in appendix B. This already gives an open-set performance of $6 9 . 6 \%$ AUROC, which is significantly higher than the softmax thresholding baseline reported for these datasets in almost all of the comparisons in the literature, which report a baseline $5 7 . 7 \%$ AUROC. The discrepancy between the reported baseline and our simplest setting is the result of reported figures originating in (Neal et al., 2018), wherein all models were trained only for 30 epochs (according to the publicly shared code) while our simplest model is trained for 100 epochs.
|
| 370 |
+
|
| 371 |
+
Following this trend, we find that training for longer (200 epochs) and using a better learning rate schedule (cosine annealed schedule (Loshchilov & Hutter, 2017)) significantly enhances both closed-set and open-set performance. We further find that stronger augmentations boost accuracy, where we leverage RandAugment (Cubuk et al., 2020) to find an optimal strategy. Finally, we find that learning rate warmup and label smoothing (Szegedy et al., 2016) can together significantly increase accuracy. We select the RandAugment and label smoothing hyper-parameters by maximizing closed-set accuracy on a validation set (randomly sampling $20 \%$ of the training set).
|
| 372 |
+
|
| 373 |
+
In summary, we find that simply leveraging standard training strategies for image recognition models leads to a significant boost in open-set performance. Specifically, we find that the combination of the above methodologies, including longer training and better augmentations boosts the AUROC to $8 2 . 6 \%$ . Finally, we find that open-set performance can be boosted to $8 4 . 0 \%$ AUROC by bootstrapping the training data and training $K = 5$ ensembles. The improvements in open-set performance strongly correlate with the boosts to the closed-set accuracy, with $\rho = 0 . 9 3$ between accuracy and AUROC.
|
| 374 |
+
|
| 375 |
+
# D IMPLEMENTATION DETAILS
|
| 376 |
+
|
| 377 |
+
# D.1 VGG32 ARCHITECTURE
|
| 378 |
+
|
| 379 |
+
This backbone architecture is commonly used in the open-set literature (Neal et al., 2018). The model consists of a simple series of nine $3 \times 3$ convolution layers, with downsampling occurring through strided convolutions every third layer. Batch normalization and LeakyRelu (slope of 0.2) are used after every convolution layer, with dropout used on the input image, and then after the third and sixth layer. Finally, after the ninth layer, the spatial feature is reduced with average pooling to a feature vector with dimensionality $D = 1 2 8$ . This is fed to the linear classifier (fully connected layer) to give the output logits.
|
| 380 |
+
|
| 381 |
+
# D.2 STANDARD DATASETS
|
| 382 |
+
|
| 383 |
+
Here, we describe the experimental setup for our results in sec. 4 of the main paper.
|
| 384 |
+
|
| 385 |
+
All models were trained on a single 12GB GPU (mostly a NVIDIA Titan X). When optimizing with the cross-entropy loss, training took between 2 and 6 hours for a single class split, depending on the dataset (for instance, training on TinyImageNet took 2.5 hours). All hyper-parameters were tuned on a validation set which was constructed by holding out a randomly sampled $20 \%$ of the closed-set training data from a single split of seen/unseen classes.
|
| 386 |
+
|
| 387 |
+
Baselines, $\mathbf { M S P + / M L S }$ We trained the VGG32 model with a batch size of 128 for 600 epochs. For each dataset, we train on five splits of ‘known/unknown’ classes as is standard practise, training each run with the random seed $\cdot _ { 0 } \cdot \mathrm { \ }$ . We use an initial learning rate of 0.1 for all datasets except TinyImageNet, for which we use 0.01. We train with a cosine annealed learning rate, restarting the learning rate to the initial value at epochs 200 and 400. Furthermore, we ‘warm up’ the learning rate by linearly increasing it from 0 to the ‘initial value’ at epoch 20.
|
| 388 |
+
|
| 389 |
+
We use RandAugment for all experiments, tuning its hyper-parameters on a validation set from a single class split for each dataset. We follow a similar procedure for the label smoothing value $s$ though we find the optimal value to be $s = 0$ for all datasets except TinyImageNet, where it helps significantly at $s = 0 . 9$ .
|
| 390 |
+
|
| 391 |
+
$( \mathbf { A R P L + C S } ) +$ We use the same experimental procedure for $\mathrm { A R P L + C S }$ (Chen et al., 2021) as for the baselines, again tuning the RandAugment and label smoothing hyperparameters for this method. Here, following the original implementation, we find a batch size of 64 and learning rate of 0.001 lead to better performance on TinyImageNet. This method also took significantly longer to train, taking 7.5 hours per class split on TinyImageNet.
|
| 392 |
+
|
| 393 |
+
OSRCI+ OSRCI involves multiple stages of training, including first training a GAN to synthesize images similar to the training data, before using generated images as ‘open-set’ examples to train a $( K + 1 )$ -way classifier (Neal et al., 2018). As our focus is on the effect of improving classification accuracy on open-set performance, we augment the training of the latter stage of OSRCI. We again train the $( K + 1 )$ -way classifier for 600 epochs with a cosine annealed learning rate schedule and RandAugment. For this method, we find that reducing all learning rates by a factor 10 compared to the baselines significantly improved performance.
|
| 394 |
+
|
| 395 |
+
# D.3 PROPOSED BENCHMARKS
|
| 396 |
+
|
| 397 |
+
Here, we describe the experimental setup for our results in sec. 5 of the main paper.
|
| 398 |
+
|
| 399 |
+
ImageNet. For this evaluation, we leverage a ResNet50 model pre-trained with the cross-entropy loss on ImageNet-1K from (Wightman, 2019). We evaluate the model directly for our MLS baseline. For ARPL+, we finetune the pre-trained model for 10 epochs with the ARPL optimization strategy.
|
| 400 |
+
|
| 401 |
+
FGVC datasets. We use a similar experimental setting for the FGVC datasets as we do for the standard benchmarks. Specifically, for both $\mathbf { M S P + / M L S }$ and $\mathbf { A R P L + }$ , we again train for 600 epochs, using a cosine annealed learning rate and learning rate warmup. We also re-tune the RandAugment and label smoothing hyper-parameters on a validation set. Differently, however, we use a ResNet50 backbone with $4 4 8 \times 4 4 8$ image size as is standard in the FGVC literature. We further initialize the network with weights from MoCoV2 training on Places, using an initial learning rate of 0.001 and a batch size of 32. Training for both methods took between one and two days depending on the dataset.
|
| 402 |
+
|
| 403 |
+
Note: We attempted to train $\mathbf { A R P L + C S }$ on our proposed datasets but found it computationally infeasible. Specifically, the memory intensive nature of the method meant we could only fit a batch size of 2 on a 12GB GPU. We attempted to scale it up for the FGVC datasets, fitting a batch size of 16 across $4 \times 2 4 \mathrm { G B }$ GPUs, with training taking a week. However, we found its performance after a week to be slightly lower than $\mathrm { \ A R P L + }$ in this setting.
|
| 404 |
+
|
| 405 |
+
# E COMPARISONS WITH OTHER DEEP LEARNING BASED OSR METHODS
|
| 406 |
+
|
| 407 |
+
Table 6: Comparing our improved baseline with other deep learning based OSR methods on the standard benchmark datasets. All results indicate the area under the Receiver-Operator curve (AUROC) as a percentage. We also show the backbone architecture used for each method, showing results with multiple backbones when reported.
|
| 408 |
+
|
| 409 |
+
<table><tr><td>Method</td><td>Backbone</td><td>MNIST</td><td>SVHN</td><td>CIFAR10</td><td>CIFAR+10</td><td>CIFAR+50</td><td>TinyImageNet</td></tr><tr><td>MSP (Neal et al., 2018)</td><td>VGG32</td><td>97.8</td><td>88.6</td><td>67.7</td><td>81.6</td><td>80.5</td><td>57.7</td></tr><tr><td>OpenMax (Bendale & Boult,2016)</td><td>VGG32</td><td>98.1</td><td>89.4</td><td>69.5</td><td>81.7</td><td>79.6</td><td>57.6</td></tr><tr><td>G-OpenMax (Ge et al., 2017)</td><td>VGG32</td><td>98.4</td><td>89.6</td><td>67.5</td><td>82.7</td><td>81.9</td><td>58.0</td></tr><tr><td>OSRCI (Neal et al.,2018)</td><td>VGG32</td><td>98.8</td><td>91.0</td><td>69.9</td><td>83.8</td><td>82.7</td><td>58.6</td></tr><tr><td>CROSR(Yoshihashi et al.,2019)</td><td>DHRNet</td><td>99.1</td><td>89.9</td><td></td><td>=</td><td></td><td>58.9</td></tr><tr><td>C2AE(Oza& Patel,2019)</td><td>VGG32</td><td>98.9</td><td>92.2</td><td>89.5</td><td>95.5</td><td>93.7</td><td>74.8</td></tr><tr><td>GFROSR (Perera et al.,2020)</td><td>VGG32/WRN-28-10</td><td>-</td><td>93.5 /95.5</td><td>80.7 /83.1</td><td>92.8 /91.5</td><td>92.6/91.3</td><td>60.8 /64.7</td></tr><tr><td>CGDL (Sun et al., 2021)</td><td>CPGM-AAE</td><td>99.5</td><td>96.8</td><td>95.3</td><td>96.5</td><td>96.1</td><td>77.0</td></tr><tr><td>OpenHybrid (Zhang et al., 2020)</td><td>VGG32</td><td>99.5</td><td>94.7</td><td>95.0</td><td>96.2</td><td>95.5</td><td>79.3</td></tr><tr><td>RPL (Chen et al.,2020a)</td><td>VGG32/WRN-40-4</td><td>99.3 /99.6</td><td>95.1/96.8</td><td>86.1/90.1</td><td>85.6/97.6</td><td>85.0 /96.8</td><td>70.2/ 80.9</td></tr><tr><td>PROSER (Zhou et al., 2021)</td><td>WRN-28-10</td><td>·</td><td>94.3</td><td>89.1</td><td>96.0</td><td>85.3</td><td>69.3</td></tr><tr><td>ARPL (Chen et al., 2021)</td><td>VGG32</td><td>99.6</td><td>96.3</td><td>90.1</td><td>96.5</td><td>94.3</td><td>76.2</td></tr><tr><td>ARPL + CS (Chen et al., 2021)</td><td>VGG32</td><td>99.7</td><td>96.7</td><td>91.0</td><td>97.1</td><td>95.1</td><td>78.2</td></tr><tr><td>OSRCI+</td><td>VGG32</td><td>98.5 (-0.3)</td><td>89.9 (-1.1)</td><td>87.2 (+17.3)</td><td>91.1 (+7.3)</td><td>90.3 (+7.6)</td><td>62.6 (+4.0)</td></tr><tr><td>(ARPL + CS)+</td><td>VGG32</td><td>99.2 (-0.5)</td><td>96.8 (+0.1)</td><td>93.9 (+2.9)</td><td>98.1 (+1.0)</td><td>96.7 (+1.6)</td><td>82.5 (+4.3)</td></tr><tr><td>Baseline (MSP+)</td><td>VGG32</td><td>98.6 (+0.8)</td><td>96.0 (+7.4)</td><td>90.1 (+22.4)</td><td>95.6 (+14.0)</td><td>94.0 (+13.5)</td><td>82.7 (+25.0)</td></tr><tr><td>Baseline (MLS)</td><td>VGG32</td><td>99.3 (+1.5)</td><td>97.1 (+8.5)</td><td>93.6 (+25.9)</td><td>97.9 (+16.3)</td><td>96.5 (+16.0)</td><td>83.0 (+25.3)</td></tr></table>
|
| 410 |
+
|
| 411 |
+
In table 6, we provide comparisons with more methods, including those using a different backbone architecture, to supplement table 1 from the main paper. The overrall conclusion is the same as in the main paper. Specifically, our improved baseline significantly outperforms reported baseline figures and outperforms state-of-the-art OSR models on a number of standard benchmarks. Training other OSR methods (OSRCI, $\mathrm { A R P L + C S }$ (Neal et al., 2018; Chen et al., 2021)) on top of our improved baseline can boost also their OSR performance. However, the discrepancy between the state-of-the-art and the baseline is now negligible.
|
| 412 |
+
|
| 413 |
+
# F OUT-OF-DISTRIBUTION DETECTION RESULTS
|
| 414 |
+
|
| 415 |
+
In this section, we run experiments on OoD benchmarks, a separate but related machine learning sub-field to OSR. OoD deals with all forms of distributional shifts, whereas OSR focusses on semantic novelty. Specifically, in the ‘multiclass’ OoD setting, a model is trained for classification on a given dataset, before being tasked with detecting test samples from other datasets as ‘unknown’ (Hendrycks & Gimpel, 2017). Once again, this task is evaluated as a binary classification (‘known’/‘unknown’) problem. A notable difference with the OSR setting is that OoD models often have access to auxiliary data as examples of ‘OoD’ during training (Hendrycks et al., 2019).
|
| 416 |
+
|
| 417 |
+
# F.1 CORRELATION BETWEEN CLOSED-SET AND OOD PERFORMANCE
|
| 418 |
+
|
| 419 |
+
First, we conduct similar experiments to sec. 3. We evaluate four ResNet models trained on CIFAR100 on the OoD task, using CIFAR10 for examples of ‘OoD’. We show the closed-set and OoD performances of these models are correlated in fig. 8, with a Pearson Product-Moment correlation of $\rho = 0 . 9 7$ . This trend is similar to the one observed in the ImageNet OSR evaluation in fig. 3b.
|
| 420 |
+
|
| 421 |
+

|
| 422 |
+
Figure 8: OoD against closed-set performance for four ResNet models trained on CIFAR100, using CIFAR10 as OoD. The plot indicates a similar performance correlation as observed in fig. 3b.
|
| 423 |
+
|
| 424 |
+
F.2 OOD PERFORMANCE WITH DIFFERING TYPES OF DISTRIBUTION SHIFT
|
| 425 |
+
|
| 426 |
+
Next, in table 7, we evaluate OoD performance when different datasets are taken as examples of ‘OoD’ with respect to CIFAR100. Specifically, we compare OSR methods (and an OoD baseline), taking Gaussian Noise, SVHN and CIFAR10 as ‘OoD’.
|
| 427 |
+
|
| 428 |
+
Table 7: Results on out-of-distribution detection benchmarks. We evaluate two MLS models: one represents a model which we train ourselves; the second represents a strong pre-trained model from (Lim et al., 2019).
|
| 429 |
+
|
| 430 |
+
<table><tr><td></td><td>Outlier Exposure (Hendrycks et al., 2019)</td><td>OpenHybrid (Zhang et al., 2020)</td><td>ARPL+CS</td><td>MLS</td><td>MLS (Lim et al., 2019)</td></tr><tr><td>CIFAR100 → Gaussian Noise</td><td>95.7</td><td>1</td><td>67.6</td><td>73.5</td><td>78.9</td></tr><tr><td>CIFAR100 →SVHN</td><td>86.9</td><td></td><td>77.9</td><td>83.3</td><td>88.9</td></tr><tr><td>CIFAR100 →CIFAR10</td><td>75.7</td><td>85.6</td><td>73.0</td><td>77.7</td><td>83.2</td></tr></table>
|
| 431 |
+
|
| 432 |
+
As a strong baseline from the OoD literature, we report results from Outlier Exposure (O.E.) (Hendrycks et al., 2019), which encourages the classifier to predict a uniform distribution when fed auxiliary ‘OoD’ images from 80 Million Tiny Images (Torralba et al., 2008). We also report results from OpenHybrid (Zhang et al., 2020) which reports a CIFAR $1 0 0 $ CIFAR10 result. Furthermore, we train $\mathbf { A R P L + C S }$ and MLS in this setting, training a ResNet50 for 200 epochs. As a final experiment, we take a strong model pre-trained on CIFAR100 from (Lim et al., 2019) and evaluate it on the OoD benchmarks. Our results show that, while OpenHybrid performs strongly on the CIFAR $1 0 0 $ CIFAR10 experiment, the two MLS models outperform the O.E baseline on this evaluation despite not having seen extra data during training.
|
| 433 |
+
|
| 434 |
+
# F.3 EVALUATION ON OOD BENCHMARKS
|
| 435 |
+
|
| 436 |
+
Finally, we run our MLS method on the standard OoD benchmark suite. Specifically, we take models trained on CIFAR10 and CIFAR100, and evaluate them when Places365 (Zhou et al., 2017), Textures (Cimpoi et al., 2014), LSUN-Crop (Yu et al., 2015), LSUN-Resize (Yu et al., 2015), iSUN (Xu et al., 2015) and SVHN (Netzer et al., 2011) are used in turn as ‘OoD’ datasets. We take well-trained WideResNet-40 models (trained with Fast Auto-Augment on CIFAR10 and CIFAR100 from (Lim et al., 2019)) and run our MLS baseline on top. We compare against state-of-the-art OoD methods which do not use extra data for fine-tuning, and report our results in table 8. We report average AUROC across the six OoD datasets.
|
| 437 |
+
|
| 438 |
+
We find that strong closed-set classifiers with our MLS baseline can achieve highly competitive performance on the OoD benchmarks, once again substantially closing the gap between the MSP baseline (Hendrycks & Gimpel, 2017) and state-of-the-art.
|
| 439 |
+
|
| 440 |
+
Table 8: Results of our strong baseline on the full OoD benchmark suite. We take strong WideResNet-40 models from (Lim et al., 2019) and run our MLS baseline on top. Models are trained on CIFAR10 and CIFAR100 as ‘in-distribution’ and we report AUROC averaged across six OoD datasets. All compared figures are taken from (Du et al., 2022) and Liu et al. (2020).
|
| 441 |
+
|
| 442 |
+
<table><tr><td>Method</td><td>CIFAR10</td><td>CIFAR100</td></tr><tr><td>MSP (Hendrycks & Gimpel, 2017)</td><td>90.9</td><td>75.5</td></tr><tr><td>ODIN (Liang et al., 2018)</td><td>91.1</td><td>77.4</td></tr><tr><td>Energy Score (Liu et al., 2020)</td><td>91.9</td><td>79.6</td></tr><tr><td>Mahanabolis (Lee et al., 2018b)</td><td>93.3</td><td>84.1</td></tr><tr><td>VOS (Du et al., 2022)</td><td>94.1</td><td>1</td></tr><tr><td>MLS (Ours)</td><td>95.1</td><td>80.8</td></tr></table>
|
| 443 |
+
|
| 444 |
+
Discussion. Our results show that strong closed-set classifiers can also perform well in the OoD setting, even compared to very recent methods such as Virtual Outlier Synthesis (VOS, (Du et al., 2022)). In fact, in some cases, we find the MLS baseline exceeds state-of-the-art for this task.
|
| 445 |
+
|
| 446 |
+
Interestingly, the MLS baseline performs best with in the ‘near-OoD’ case (e.g. SVHN and CIFAR10 as ‘OoD’ in table 7, i.e. in the more similar settings to OSR). In fact, the MLS models trained on CIFAR100 are worse at detecting Gaussian Noise than CIFAR10 images as ‘OoD’. We present this peculiar finding as evidence that the OoD and OSR research questions may have different, and possibly orthogonal, solutions. We hope that benchmarks which can isolate semantic novelty from low-level distributional shifts, such as the Semantic Shift Benchmark from sec. 5, can facilitate more controlled OSR and OoD research.
|
| 447 |
+
|
| 448 |
+
# G DISCUSSION: UNDERSTANDING SYSTEMS OF CATEGORIZATION
|
| 449 |
+
|
| 450 |
+
Before one can establish if an image belongs to a new class, one must first understand what constitutes a single class, or how the system of categorization is constructed. To illustrate this, consider a classifier trained on instances of two household pets: {Labrador (dog), British Shorthair (cat)}. Now consider an open-world setting in which the model must be able to distinguish previously unseen objects, perhaps: {Poodle (dog), Sphynx (cat)}. In this case, understanding the categorization system is essential to making the open-set decision. Does the classification system delineate individual animal species? In this case, both ‘Poodle’ and ‘Sphynx’ should be identified as ‘open-set’ examples. Or does it instead simply separate ‘cats’ from ‘dogs’? In which case neither object belongs to the open-set.
|
| 451 |
+
|
| 452 |
+
To solve this problem, and to perform OSR reliably, the model must understand the set of invariances within a single category, as well as a set of ‘axes of variation’ to distinguish between categories. Specifically, different instances within a single category will have a set of features which can be freely varied without the category label changing. In computer vision, this often refers to characteristics such as pose and lighting, but could also refer to more abstract features such as animal gender or background setting. Meanwhile, the classification system will also have a (possibly abstract) set of axes of variation to which the category label is sensitive.
|
| 453 |
+
|
| 454 |
+
In the current OSR benchmarks, with either abstract class definitions or a small number of classes, the set of axes of variation which can distinguish between categories is diverse. In this sense, the problem is ill-posed, with many axes likely being equally valid to distinguish between the training classes, including those based on semantically meaningless low-level features. In contrast, within our proposed fine-grained setting, the set of axes of variation which can distinguish between categories is far more constrained. For instance, in the CUB case, given a training task of classifying 100 bird species, there is little uncertainty as to what the axis of semantic variation could be.
|
| 455 |
+
|
| 456 |
+
# H CREATING SPLITS FOR THE SEMANTIC SHIFT BENCHMARK
|
| 457 |
+
|
| 458 |
+
# H.1 SPLIT CONSTRUCTION
|
| 459 |
+
|
| 460 |
+
In sec. 5 of the main paper, we sketched the process for constructing open-set splits from the CUB dataset. Here, we describe the process in detail for both CUB, Stanford Cars and FGVC-Aircraft, which each have different attribute structures.
|
| 461 |
+
|
| 462 |
+
For each FGVC benchmark, we split its classes into two disjoint sets, $\mathcal { C }$ and $\mathcal { U }$ , containing closed-set and open-set classes respectively. $\mathcal { U }$ is further subdivided into disjoint {‘Easy’, ‘Medium’, ‘Hard’} sets with varying degrees of attribute similarity with any class in $\mathcal { C }$ . Specifically, we measure the difficulty of an open-set class by its semantic similarity with its most similar training class (where similarity is defined in terms of attribute overlap).
|
| 463 |
+
|
| 464 |
+
In practice, we found the semantic similarity of the ‘Medium’ and ‘Hard’ splits of Stanford Cars to the closed-set to be very similar, hence we combine them into a single ‘Hard’ split.
|
| 465 |
+
|
| 466 |
+
CUB. In CUB, each image is labelled for the presence of 312 visual attributes such as has_bill_shape::hooked and has_breast_color::yellow. Note that images from the same class do not all share the same attributes, both because of standard factors such as pose and occlusion, but also because of factors such as the age and gender of the bird.
|
| 467 |
+
|
| 468 |
+
This information is summarised on a per-class basis, describing how often each attribute occurs in each class; i.e., a matrix $M \in [ 0 , 1 ] ^ { C \times \mathbf { \dot { A } } }$ is available, where $C = 2 0 0$ is the total number of classes in CUB and $A = 3 1 2$ is the number of attributes. This allows us to construct a class similarity matrix $S \in [ 0 , 1 ] ^ { C \times C }$ where $S _ { i j } = \mathbf { m } _ { i } \cdot \mathbf { m } _ { j }$ and $\mathbf { m } _ { i }$ is the L2-normalized $i ^ { t h }$ row of $M$ . Thus, given a set of closed-set classes in $\mathcal { C }$ , we can rank all remaining classes $( \mathcal { U } )$ according to their maximum similarity with any of the training classes. Finally, we bin the ranked open-set classes into $\{ \mathrm { \dot { E } a s y \mathrm { \ ' } }$ , ‘Medium’, ‘Hard’} sets. In practice, we randomly sample 1 million combinations of $\mathcal { C }$ , and select the combination which results in the most difficult open-set splits.
|
| 469 |
+
|
| 470 |
+
Stanford Cars. Each class name in Stanford Cars follows the format of ‘Make’-‘Model’-‘Type’- ‘Year’; for instance ‘Aston Martin - V8 Vantage - Convertible - 2012’ is a class. In this case, we create open-set splits of different difficulties based on the similarity between class names.
|
| 471 |
+
|
| 472 |
+
We first create the ‘Hard’ open-set split by identifying pairs of classes which have the same ‘Make’, ‘Model’ and ‘Type’ but come from different ‘Years’. Next, we create the ‘Medium’ split from class pairs which have the same ‘Make’ and ‘Model’ but have different ‘Types’. Finally, the ‘Easy’ split is constructed from pairs which have the same ‘Make’ but different ‘Models’.
|
| 473 |
+
|
| 474 |
+
We note that open-set bins of different difficulties in Stanford Cars are the most troublesome to define. This is because the rough hierarchy in the class names may not always correspond to the degree of visual similarity between the classes. For instance, two cars from the same ‘Year’ but of different ‘Makes’ (e.g. a Ford and Nissan both made in 2010) may look more similar than cars of the same ‘Make’-‘Model’-‘Type’ but from different years (e.g. Audi S4 Sedan 2007 and Audi S4 Sedan 2012).
|
| 475 |
+
|
| 476 |
+
FGVC-Aircraft. We leverage the hierarchy of class labels in FGVC-Aircraft; each image is labelled with a ‘manufacturer’ (e.g., ‘Airbus’ or ‘Boeing’), a ‘family’ (e.g., ‘A320’ or ‘A330’) and a ‘variant’ (e.g.‘A330-200’ or ‘A330-300’). The hierarchy is constructed as a tree, with ‘manufacturer’ classes at the top level, ‘family’ classes at the second, and ‘variant’ classes at the bottom. The standard image classification challenge operates at the variant level, meaning all variant classes are visually distinct with identifiable features. Furthermore, the hierarchy corresponds to visual similarity, i.e there is more inter-class variation between manufacturers than between variants from the same manufacturer. Thus, given the closed-set classes $\mathcal { C }$ , we can create an ‘Easy’ open-set split from variants which do not share a manufacturer with any closed-set class. Meanwhile, ‘Medium’ open-set classes share a manufacturer with closed-set classes but come from different families, and ‘Hard’ open-set classes share families with closed-set classes but are different variants.
|
| 477 |
+
|
| 478 |
+
# H.2 SPLIT EXAMPLES
|
| 479 |
+
|
| 480 |
+
We include examples of images from the closed-set and open-set splits of the proposed FGVC datasets in fig. 9 and 11. For each dataset, we show examples of ‘Easy’ (green/top), ‘Medium’ (orange/middle) and ‘Hard’ (red/bottom) classes. For each difficulty, we show three images from three classes from the open-set (right) and their most similar class in the closed-set (left). We note that ‘Hard’ open-set classes are far more visually similar to their corresponding closed-set class than ‘Easy’ open-set classes.
|
| 481 |
+
|
| 482 |
+
# H.3 SPLIT DETAILS
|
| 483 |
+
|
| 484 |
+
All split details can be found here: https://github.com/sgvaze/osr_closed_set_all_you_need.
|
| 485 |
+
|
| 486 |
+

|
| 487 |
+
Figure 9: Sample classes from closed and open-set splits for the CUB dataset. We show ‘Easy’ (green/top), ‘Medium’ (orange/middle) and ‘Hard’ (red/bottom) classes. Classes on the left (solid outline) are in the closed-set, while classes on the right (dashed outline) are in the open-set.
|
| 488 |
+
|
| 489 |
+

|
| 490 |
+
Figure 10: Sample classes from closed and open-set splits for the Stanford Cars dataset. We show ‘Easy’ (green/top), ‘Medium’ (orange/middle) and ‘Hard’ (red/bottom) classes. Classes on the left (solid outline) are in the closed-set, while classes on the right (dashed outline) are in the open-set. In practice, we combine the ‘Medium’ and ‘Hard’ splits during evaluation.
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
Figure 11: Sample classes from closed and open-set splits for the FGVC-Aircraft dataset. We show ‘Easy’ (green/top), ‘Medium’ (orange/middle) and ‘Hard’ (red/bottom) classes. Classes on the left (solid outline) are in the closed-set, while classes on the right (dashed outline) are in the open-set.
|
| 494 |
+
|
| 495 |
+
# I AVERAGE PRECISION EVALUATION ON PROPOSED BENCHMARKS
|
| 496 |
+
|
| 497 |
+
We report average precision (AP) for the binary ‘known/unknown’ decision for the proposed benchmark evaluations in table 9. AP is a standard metric in the OoD literature and is better suited for dealing with class imbalance at test time. We note that the ‘Hard’ FGVC open-set splits (with a small number of classes) report substantially poorer AP than AUROC in absolute terms. We treat open-set examples as ‘positive’ during evaluation.
|
| 498 |
+
|
| 499 |
+
Table 9: Average Precision (AP) results on the proposed benchmark datasets for ‘Easy’ / ‘Medium’ / ‘Hard’ splits.
|
| 500 |
+
|
| 501 |
+
<table><tr><td></td><td>CUB</td><td>FGVC-Aircraft</td><td>ImageNet</td></tr><tr><td>ARPL+</td><td>59.9 / 53.3 / 45.3</td><td>66.9 / 58.9 / 34.4</td><td>78.2 / - / 71.2</td></tr><tr><td>MLS</td><td>67.1 / 58.2 / 47.2</td><td>69.2 / 58.2 / 39.6</td><td>76.6/ - / 68.6</td></tr></table>
|
parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/5hLP5JY9S2d/5hLP5JY9S2d_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/9EAQVEINuum/9EAQVEINuum_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/BSww-NrOzJ/BSww-NrOzJ.md
ADDED
|
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# STEERING PROTOTYPES WITH PROMPT TUNING FOR REHEARSAL-FREE CONTINUAL LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Prototype, as a representation of class embeddings, has been explored to reduce memory footprint or avoid bias towards the latest task for continual learning. However, prototype-based methods still suffer from performance deterioration due to semantic drift and prototype interference. In this work, we propose a simple and novel framework for rehearsal-free continual learning. We show that task-specific prompt-tuning when coupled with a contrastive loss design can effectively address both issues and largely improves the potency of prototypes. The proposed framework excels at three challenging benchmarks, resulting in $3 \%$ to $6 \%$ absolute improvements over state-of-the-art methods without usage of a rehearsal buffer or a test-time oracle. Furthermore, the proposed framework largely bridges the performance gap between incremental learning and offline joint learning, demonstrating a promising design schema for continual learning.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Continual learning (Thrun, 1995), the capability of learning sequentially from a continuous stream of correlated data, is crucial for modern intelligent systems as the world is nonstationary (Hadsell et al., 2020). Yet, existing deep neural networks are known to be prone to catastrophic forgetting (McCloskey & Cohen, 1989): models suffer from dramatic performance degeneration on earlier learned tasks when learn new information. Prototype (i.e., the class mean embedding (Snell et al., 2017)) exhibits a promising functionality in continual learning context as it can retain previous knowledge in a data-efficient manner (Zhu et al., 2021) and avoid bias towards the latest task (Rebuffi et al., 2017) when coupled with a nearest class mean (NCM) (Mensink et al., 2013) classifier. However, prototypes themselves are also subject to abrupt efficacy drop due to semantic drift and prototype interference. Concretely, learning a
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: An illustration of semantic drift and prototype interference in the latent space. Both phenomena occur simultaneously in continual learning and cause catastrophic forgetting. Different colors represent different classes.
|
| 15 |
+
|
| 16 |
+
sequence of tasks with a single model can be viewed as generating a sequence of snapshots of the model, and only the latest version is retained. Therefore, a data sample at inference and its corresponding prototype is, in fact, encoded by different embedding functions (except for data samples from the latest task). This inconsistency can cause severe drifts in latent space as shown in Fig. 1 (top). Besides, when new data samples that bear similar semantics with previous classes appear, their encoded features can locate near previous prototypes in latent space, thus causing interference as illustrated in Fig. 1 (bottom).
|
| 17 |
+
|
| 18 |
+
A recent transfer learning paradigm, namely prompt-tuning (Lester et al., 2021; Jia et al., 2022), demonstrates a strong knowledge adaption ability. It allows a tiny portion of extra learnable tokens to steer a frozen transformer-based architecture (Vaswani et al., 2017). Therefore, prompt-tuning reuses the pre-trained network in a parameter efficient manner without hurting its feature extraction ability. Inspired by the efficiency of prompt-tuning and the plug-and-play property of the token, we propose a novel framework built upon the basis of task-specific prompt that can effectively address both semantic drift and prototype interference described above.
|
| 19 |
+
|
| 20 |
+
In our method, we associate the prototype of each class with a task-specific prompt group and maintain a collection of corresponding pairs in memory. During inference, we combine the task-specific prompt group with a frozen embedding function to reemerge each snapshot of the model. As such, we effectively eliminate the inconsistency between embedding functions used for prototypes generation and samples prediction. The frozen embedding function here can be deemed as consolidated global knowledge that keeps the system stable. Prompt groups, on the other hand, learn tasklevel specializations and maintain the plasticity of the system. To avoid prototype interference in embedding space, we train task-specific prompt groups with the designed contrastive prototypical loss. It encourages in-class clustering and increases inter-class distances giving a mixture of data embeddings and prototypes. Since we only maintain previous knowledge as prototypes and put them as anchors in latent space, the trained prompt groups can effectively steer prototypes to avoid interference without saving or replaying previous data samples. Furthermore, we propose the multi-centroid prototype strategy that leverages a group of fictitious embeddings instead of a mean embedding to characterize the distribution of a class in latent space. It helps to improve the representation power of prototypes and further mitigate semantic drift and prototype interference. The above schema effectively align both the space (i.e., the embedding space) and the embedding functions that are used during learning and inference, hence effectively boosting the potency of prototypes in continual learning.
|
| 21 |
+
|
| 22 |
+
We term our method Contrastive Prototypical Prompt (CPP), a simple and novel continual learning framework that explores embedding space holistically. In experiments, CPP excels at split CIFAR100, split ImageNet-subset and 5-datasets three challenging benchmarks, bringing around $3 \%$ to $6 \%$ absolute improvements over state-of-the-art methods. Moreover, it largely bridges the gap between incremental learning and offline joint learning1. The efficacy of proposed modules is thoroughly studied both empirically and analytically. The main contributions can be summarized as follows:
|
| 23 |
+
|
| 24 |
+
• We propose CPP, a simple and novel framework for rehearsal-free continual learning. It leverages contrastively learned task-specific prompt to effectively address both semantic drift and prototype interference issues.
|
| 25 |
+
• We present multi-centroid prototype strategy which can better characterize the class distribution and improves representativeness of prototypes. It is seamlessly merged into CPP and exhibits an additive benefit.
|
| 26 |
+
• CPP significantly outperforms the state-of-the-art methods and largely bridges the performance gap between incremental learning and offline joint-learning. The proposed modules are comprehensively analyzed and demonstrate clear and additive benefits.
|
| 27 |
+
|
| 28 |
+
# 2 RELATED WORKS
|
| 29 |
+
|
| 30 |
+
Continual learning. The development trajectory of continual learning is the history of combating against catastrophic forgetting (McCloskey & Cohen, 1989) issue. Existing algorithms can be mainly categorized into three subsets. Regularization-based methods (Lopez-Paz & Ranzato, 2017; Li & Hoiem, 2018) strike for a balance under stability–plasticity dilemma. They impose extra constraints on the changeability of network parameters while maintaining a certain degree of plasticity to learn new knowledge. Despite the succinct formulation, solely using regularization struggles when facing a long sequence of tasks (Hadsell et al., 2020). Architectural methods manage to overcome forgetting by allocating extra resources as learning progresses (Mallya & Lazebnik, 2018; Rusu et al., 2016; Pham et al., 2020). However, most existing methods assume the existence of a test-time oracle and face scalability issues. In practice, rehearsal-based methods (Buzzega et al., 2020; Cha et al., 2021) exhibit the most versatility and robustness through saving and rehearsing previous samples. Nevertheless, this strategy is sensitive to buffer size (Prabhu et al., 2020; Hadsell et al., 2020) and becomes infeasible under restricted scenarios (e.g., on edge devices, for privacy-sensitive applications). The proposed CPP here is a hybrid method. It combines merits from architectural and rehearsal-based methods without inheriting their limitations (see a full discussion in Appendix D).
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 2: An overview of CPP. Different colors represent different classes. Left: along the learning process, knowledge from earlier tasks are retained as prototypes and are used as anchors in embedding space. Current prompt learn through avoiding interference. Right: during inference, a group of candidate prompt groups are first retrieved followed by a fine-grained matching process.
|
| 34 |
+
|
| 35 |
+
Prototypes for continual learning. It has been shown that embedding is less prone to information loss (Davari et al., 2022) and a typical linear classifier is one of the critical sources for abrupt forgetting due to the bias towards latest task (Zhang et al., 2021). As such, most prototype-related approaches (Rebuffi et al., 2017; Yu et al., 2020; Zhu et al., 2021) leverage prototypes in combination with a NCM classifier to discriminate data samples. Zhu et al. (2021), on the other hand, used prototypes as anchors in latent space to avoid semantic overlap and thus improving discrimination ability without forwarding explicit exemplars. Yu et al. (2020) managed to post-compensate semantic drifts of previous prototypes through approximating drifts from current data. Herein, instead of compensating drifts, CPP prevents drifts from the origin and handles prototype interference as well. Moreover, CPP deploys the multi-centroid prototype instead of a class mean embedding to better characterize the embedding distribution and improves representativeness of the prototype.
|
| 36 |
+
|
| 37 |
+
Prompt tuning. Initializing the model with pre-trained weights has become a de facto practice in both computer vision and natural language processing communities. However, a typical fine-tuning technique does not necessarily benefit when transferring models to downstream tasks (Kumar et al., 2022). Prompt-tuning (Li & Liang, 2021; Lester et al., 2021) has emerged as an alternative to reuse pre-trained knowledge. Jia et al. (2022) further adapted prompt-tuning to the vision domain. It has recently also been introduced to continual learning. Both L2P (Wang et al., 2022c) and DualPromt (Wang et al., 2022b) leveraged a prompt pool or global prompts that share across tasks to learn incremental knowledge. S-prompts (Wang et al., 2022a) used domain-specific prompts to tackle the domain-incremental learning. We here apply task-specific prompts to counteract semantic drifts and prototype interference, and leverage prototypes as classifiers without projecting to logistic space.
|
| 38 |
+
|
| 39 |
+
# 3 METHODOLOGY
|
| 40 |
+
|
| 41 |
+
In this section, we start with describing the problem setup and, along the way, introduce the notations (Sec. 3.1). Then we present a minimum feasible prototype-based framework which serves as a proof of concept and the baseline model (Sec. 3.2). Afterwards, We introduce the proposed CPP upon the baseline model (Sec. 3.3). At last, we describe multi-centroid prototype strategy (Sec. 3.4). Fig. 2 provides an overview of our framework.
|
| 42 |
+
|
| 43 |
+
# 3.1 PROBLEM SETUP AND NOTION
|
| 44 |
+
|
| 45 |
+
Supervised continual learning can be defined as learning a model over a sequence of $T$ tasks $\bar { \mathcal { T } _ { 1 : T } } = \{ \mathcal { T } _ { 1 } , \mathcal { T } _ { 2 } . . . \mathcal { T } _ { T } \}$ . Each task $\mathcal { T } _ { t }$ is associated to a dataset $\mathcal { D } ^ { t } = \{ ( \boldsymbol { x } _ { i } ^ { t } , y _ { i } ^ { t } ) _ { i = 1 } ^ { n _ { t } } \}$ containing $n _ { t }$ data pairs where $_ { \textbf { \em x } }$ is the input vector and $y$ is its corresponding label. Each data pair $( \boldsymbol { x } _ { i } ^ { t } , \boldsymbol { y } _ { i } ^ { t } ) \in ( \bar { \boldsymbol { x } } ^ { t } \times \mathcal { V } ^ { t } )$
|
| 46 |
+
|
| 47 |
+
belongs to an unknown distribution $( \mathcal { X } ^ { t } \times \mathcal { Y } ^ { t } )$ and $\mathcal { y } ^ { t } \cap \mathcal { y } ^ { t ^ { \prime } } = \emptyset$ while $t \ne t ^ { \prime }$ . Without loss of generality, a neural network at session $t$ can be decoupled into an embedding function $f _ { \theta ^ { t } } ( \cdot ) :$ $\mathbb { R } ^ { V \times H \times C } \stackrel { \bullet } { \to } \mathbb { R } ^ { D }$ and a classifier $g _ { \phi ^ { t } } ( \cdot ) : \mathbb { R } ^ { D } \to \mathbb { R } ^ { K }$ that parameterized by $\theta ^ { t }$ and $\phi ^ { t }$ , respectively. Then the overall learning target is to minimize:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\underset { \Theta , \Phi } { \arg \operatorname* { m i n } } \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { n _ { t } } \mathcal { L } ( g _ { \phi ^ { t } } ( f _ { \theta ^ { t } } ( \pmb { x } _ { i } ^ { t } ) ) , y _ { i } ^ { t } ) ,
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\mathcal { L }$ is a loss measurement, $\Theta = \{ \theta ^ { 1 } . . . \theta ^ { T } \}$ and $\Phi = \{ \phi ^ { 1 } . . . \phi ^ { T } \}$ . Note that at each task $\mathcal { T } _ { t }$ , only dataset $\mathcal { D } ^ { t }$ is accessible. Most reigning methods assume an extra replay buffer to save samples from previous tasks and augment current dataset with the replay buffer. In the rehearsal-free setup (Wang et al., 2022c), we do not assume the existence of a replay buffer.
|
| 54 |
+
|
| 55 |
+
# 3.2 A TRAINING-FREE BASELINE
|
| 56 |
+
|
| 57 |
+
Let $\mathcal { D } _ { k } ^ { t }$ denote a set of samples belonging to class $k$ at session $t$ , we compute a prototype for each class $k$ as the mean embedding following Rebuffi et al. (2017):
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\pmb { \mu } _ { k } = \frac { 1 } { | \mathscr { D } _ { k } ^ { t } | } \sum _ { \pmb { x } \in \mathscr { D } _ { k } ^ { t } } f _ { \theta } ( \pmb { x } ) ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
and save $\mu _ { k }$ to memory. $\theta$ is initialized by a pre-trained ViT (Dosovitskiy et al., 2021) and kept frozen across the whole process: ${ \theta } ^ { 1 } = { \theta } ^ { \dot { 2 } } = \dot { \cdot } \cdot \cdot = { \theta } ^ { T }$ . We maintain a collection of prototypes $U = \{ \pmb { u } _ { 1 } , \pmb { u } _ { 2 } . . . \pmb { u } _ { K } \}$ for $K$ classes that have been observed so far. Then we use the nearest-class-mean (NCM) (Mensink et al., 2013) classifier for classification:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
y ^ { * } = \underset { y = 1 \ldots K } { \arg \operatorname* { m i n } } \{ d ( { \pmb u } _ { y } , f _ { \theta } ( { \pmb x } ) ) \} ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $d : \mathbb { R } ^ { D } \times \mathbb { R } ^ { D } \mathbb { R }$ is a distance function measuring the distance between two $D$ -dimensional embeddings. Here, we use the cosine distance following the common practice in self-supervised representation learning (Chen et al., 2020). This simple and training-free baseline produces promising results under a strong embedding function (see Table 4), confirming the crucial role played by the embedding and effectiveness of prototypes in the continual learning context.
|
| 70 |
+
|
| 71 |
+
# 3.3 CONTRASTIVE PROTOTYPICAL PROMPT
|
| 72 |
+
|
| 73 |
+
Steering prototypes with prompt. Ideally, a perfect static embedding function can project embeddings to the places that locate nearest to their corresponding prototypes in the latent space, thus preventing forgetting. However, in practice, an embedding function is ever-changing and samples from different categories yet with similar semantics can interleave in the latent space and cause interference. To this end, we leverage a group of extra learnable parameters (prompts) to adapt a fixed embedding function to up-to-now information and reemerge different snapshots of the model through combining it with different prompt groups. Specifically, we append a series of prompts $\pmb { p } _ { i } \in \mathbb { R } ^ { L _ { p } \times \smile D }$ to the existing tokens. $L _ { p }$ is the length of prompts, and $D$ denotes the embedding dimensionality. The information flow of a transformer layer $i$ is defined as:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
[ { \pmb { c } } _ { i } , { \pmb { e } } _ { i } ] = T _ { i } ( [ { \pmb { c } } _ { i - 1 } , { \pmb { p } } _ { i - 1 } , { \pmb { e } } _ { i - 1 } ] ) ,
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $T _ { i }$ represents a multi-head self-attention block followed by a feed-forward block in the $i ^ { t h }$ layer. $\pmb { c } \in \mathbf { \mathbb { R } } ^ { 1 \times D }$ denotes the class token and $\boldsymbol { e } ~ \in \mathbb { R } ^ { L _ { e } \times D }$ are existing tokens with length $L _ { e }$ Operator $[ \cdot ]$ performs concatenation along the sequence length dimension. Here, we adopt deep prompt (Jia et al., 2022) by adding prompts to all $S$ layers. The prompt group for a task $t$ is denoted by $P ^ { \bar { t } } = \{ p _ { 1 } ^ { t } , p _ { 2 } ^ { t } . . . p _ { S } ^ { t } \}$ and the embedding function can be rewritten as:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
f _ { \theta ^ { t } } ( \cdot ) f _ { \{ \theta , P ^ { t } \} } ( \cdot ) .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
We maintain a collection of prompt groups as learning progresses and each prompt group is associated with a group of key and value prototypes that will be illustrated later in this section.
|
| 86 |
+
|
| 87 |
+
Contrastive prototypical loss. To effectively learn the prompt group and leverage it reduce prototype interference, we use a contrastive formulation which explicitly encourages alignments between embeddings and prototypes from the same class as well as pushing away embeddings and prototypes from different classes. In session $t$ , let $I = \{ ( x _ { 1 } , y _ { 1 } ) . . . ( x _ { N } , y _ { N } ) \}$ be a batch of $N$ image pairs and $Z = \{ z _ { 1 } . . . z _ { N } \}$ be their corresponding embeddings. We define $z = m _ { \sigma ^ { t } } ( f _ { \{ \theta ; P ^ { t } \} } ( { \pmb x } ) )$ where $m _ { \sigma ^ { t } } ( \cdot )$ is a multi-layer perception (MLP) parameterized by $\sigma ^ { t }$ . Note that $m _ { \sigma ^ { t } } ( \cdot )$ is re-initialized at each new task and being disposed during inference. The learning objective for a target prototype (class) $k$ is then defined as one-versus-all:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\mathcal { L } ^ { k } = \sum _ { z _ { i } \in P ( i ) } \mathcal { L } _ { i } ^ { k } = \sum _ { z _ { i } \in P ( i ) } \frac { - 1 } { \vert \hat { P } ( i ) \vert } \sum _ { z _ { p } \in \hat { P } ( i ) } \log \frac { \exp ( \sin ( z _ { i } , z _ { p } ) / \tau ) } { \sum _ { z _ { n } \in N ( i ) } \exp ( \sin ( z _ { i } , z _ { n } ) / \tau ) } ,
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\sin ( \cdot , \cdot )$ denotes the similarity function and $i$ is the index of a data sample with label $k$ in the batch. $P ( i ) = \{ z _ { p } \in Z : y _ { p } = y _ { i } = k \}$ is a set of positive samples w.r.t. image $i$ and ${ \hat { P } } ( i ) = P ( i ) \cup \{ { \boldsymbol { \mathbf { u } } } _ { k } \}$ further includes the key prototype of class $k$ ; $N ( i ) ~ = ~ \{ z _ { n } \in~ Z ~ : ~ y _ { n } \ne$ $y _ { i } \} \cup \{ \mu _ { 1 } ^ { \prime } . . . \mu _ { k - 1 } ^ { \prime } \}$ is a collection of negative samples with $\mathbf { { \boldsymbol { u } } } ^ { \prime }$ representing the value prototype of the previously learned classes. Eq. 6 can be naturally generalized to a task-wise formulation by averaging over all M classes within the current task: Ltask = 1M PMm=1 . The embedding space in Fig. 2 illustrates the idea of the designed loss function. To better restrain the discrimination boundary, we further adopt prototype augmentation (Zhu et al., 2021) when using prototypes as negative anchors in denominator. Concretely, negative prototypes are randomly perturbed by a scaled Gaussian noise $\mathbf { \boldsymbol { e } } \sim \mathcal { N } ( \mathbf { \boldsymbol { 0 } } , \mathbf { \boldsymbol { 1 } } )$ with same dimension: ${ \hat { \pmb { \mu } } } _ { k } = { \pmb { \mu } } _ { k } + m * { \pmb { e } }$ , where scale factor $m$ is calculated as the average variance of the corresponding class embeddings.
|
| 94 |
+
|
| 95 |
+
The proposed contrastive prototypical loss deviates from the canonical supervised contrastive loss (Khosla et al., 2020) in following aspects. 1) We add prototypes as positive and negative anchors to avoid prototype interference in latent space. For instance, new data sample can locate at a position in the latent space where it is preoccupied with other samples from previous classes. In this case, positive anchors can prevent the distribution from being over-squeezed and shifted, while negative anchors can retain spaces for previous data. 2) We only use a single view for each data sample, i.e., we do not transform a sample into multiple different views. 3) The designed loss function only focuses on alignments of positive embeddings and does not constrain the intra-class uniformity, which is considered as one of the pivot properties that attributes to the success of contrastive representation learning Wang & Isola (2020). Concretely, we do not pair samples from the same category as negative pairs in the denominator. Since NCM classifier discriminates by selecting the closest prototype, and increasing intra-class uniformity can enlarge the distance between a sample and its corresponding prototype which is against the classification policy. (see an analysis from the energy perspective in Appendix. B). We refer to Appendix A for an analysis of gradients.
|
| 96 |
+
|
| 97 |
+
Inference by reemerging model snapshots. To effectively reemerge each snapshot of the model, we decouple the prototype of a class into two-fold: a key prototype and a value prototype. The key prototype $\pmb { \mu }$ is generated using the Eq. 2 at the beginning of a task. The value prototype $\mu ^ { \prime }$ is produced with Eq. 2 after inserting the learned prompt group by the end of the task. And we maintain a collection of key prototypes $U = \{ { \pmb u } _ { 1 } , . . , { \pmb u } _ { k } \}$ and value prototypes $U ^ { \prime } = \{ { \pmb u } _ { 1 } ^ { \prime } , . . , { \pmb u } _ { k } ^ { \prime } \}$ along the learning process. During inference, a coarse query vector $\pmb { q } : \mathbb { R } ^ { 1 \times D }$ is first generated followed by a query function $q ( \pmb q , U , r )$ to find $r$ nearest key prototypes and retrieve their corresponding prompt groups $\{ P ^ { 1 } . . . \dot { P ^ { r } } \}$ . Here, $\pmb q$ is simply the class token from the last layer and the query function measures the pair-wise cosine similarity between $\pmb q$ and key prototypes $U$ . Then, we leverage retrieved prompt groups to generate a set of fine-grained queries $\checkmark ^ { \prime } = \{ q _ { 1 } ^ { \prime } . . . q _ { r } ^ { \prime } \}$ where $\pmb q _ { r } ^ { \prime }$ is the generated in the same way as $\pmb q$ after inserting corresponding prompt group $P ^ { r }$ . At last, the class of value prototype that poses the minimum distance among
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: Two toy cases for average embedding prototype and multi-centroid prototype.
|
| 101 |
+
|
| 102 |
+
$Q ^ { \prime }$ will be the final prediction. Since the mismatched prompt group will increase distance between samples and their corresponding value prototypes and the correct prompt group will behave in an opposite way. Fig. 2 (right) depicts the information flow of the inference process. Please refer to Algs. 1 and 2 in Appendix C for summarization and see a discussion about inference efficiency in Appendix E.
|
| 103 |
+
|
| 104 |
+
# 3.4 MULTI-CENTROID PROTOTYPES
|
| 105 |
+
|
| 106 |
+
Existing literature in continual learning simply adopts the mean embedding when it comes to prototypes (Yu et al., 2020; Zhu et al., 2021; Zhou et al., 2022). In this case, it implicitly assumes the distribution in the latent space to be convex (e.g., a Gaussian distribution), and the distance function belongs to Bregman divergence (Snell et al., 2017). This premise may not hold in practice as no strict constraints are imposed on embedding distributions, and cosine similarity is not one of Bregman divergences. Fig. 3 displays two toy cases where class mean embedding fails to be representative. To this end, we propose to multi-centroid prototypes. Instead of using mean embedding, we generate a group of fictitious embeddings to characterize the class distribution. Given a set of embeddings from class $k$ , we first calculate similarity matrix $S _ { k } : \mathbb { R } ^ { N \times N }$ by measuring the pair-wise cosine similarity between all samples. We then perform spectral clustering $\mathrm { N g }$ et al., 2001) with $S _ { k }$ as affinity matrix to generate $C$ centroids $\{ \stackrel { } { u _ { k , c } } \} _ { c = 1 } ^ { C }$ , where $C$ is a hyper-parameter. To deploy this strategy, we substitute each prototype $\mathbf { \Delta } \mathbf { u } _ { k }$ to its corresponding multi-centroid prototype $\{ \boldsymbol { u } _ { k , c } \} _ { c = 1 } ^ { C }$ (for both key and value prototypes) in its existence during both training and inference process.
|
| 107 |
+
|
| 108 |
+
# 4 EXPERIMENTS
|
| 109 |
+
|
| 110 |
+
# 4.1 DATASETS
|
| 111 |
+
|
| 112 |
+
Split CIFAR-100 is a commonly used benchmark in continual learning. Following the standard setup, we evenly split CIFAR-100 into 10 disjoint tasks. Existing literature also explores split CIFAR-100 under multiple different splits. As such, we also report detailed session-wise results under 5, 10, 20 splits in Appendix I.
|
| 113 |
+
|
| 114 |
+
5-datasets is a collection of CIFAR-10 (Krizhevsky, 2009), MNIST (Lecun et al., 1998), FashionMNIST (Xiao et al., 2017), SVHN (Netzer et al., 2011), and notMNIST (Bulatov, 2011). Each dataset containing 10 classes is treated as one learning task. 5-datasets serves as a fair analog of real-word scenarios where inter-task diversity is large.
|
| 115 |
+
|
| 116 |
+
Split ImageNet-subset is typically deemed as a challenging and scaled-up benchmark for continual learning. Following Douillard et al. (2022), we divide a subset (100 classes) of ImageNet (Deng et al., 2009) into 10 tasks with 10 classes per task.
|
| 117 |
+
|
| 118 |
+
# 4.2 CONFIGURATION AND EVALUATION METRIC
|
| 119 |
+
|
| 120 |
+
Configuration. We use the following dataset-agnostic configuration for all experiments if not state otherwise. We train CPP (initialized with ImageNet pre-trained ViT-B/16) for 50 epochs with a batch size of 256 using the AdamW optimizer (Loshchilov & Hutter, 2019). The initial learning rate is set to $1 \times 1 0 ^ { - 3 }$ and anneals to $1 \times \mathrm { { 1 0 ^ { - 6 } } }$ according to the cosine scheduler. The prompt length $L _ { p }$ is set to 8, and we use deep prompt as default. The multi-centroid number $C$ and the number of nearest neighbors $r$ is set to 5 and 20, respectively. A 3-layer MLP with 2048 hidden units and 768 output dimension is randomly initialized at each session. We adopt transformations used in Dino (Caron et al., 2021) as our data augmentation, and all input images are resized to 224.
|
| 121 |
+
|
| 122 |
+
Table 1: Comparison with state-of-the-art rehearsal and rehearsal-free methods on split CIFAR-100 and 5-datasets. All results are reported using a ImageNet pre-trained ViT-B/16 for fairness.
|
| 123 |
+
|
| 124 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Buffer size</td><td colspan="2">Split CIFAR-100</td><td rowspan="2">Buffer size</td><td colspan="2">5-datasets</td></tr><tr><td>Avg. Acc (↑)</td><td>Forget (↓)</td><td>Avg. Acc (↑)</td><td>Forget (↓)</td></tr><tr><td>ER(Chaudhry et al.,2019b)</td><td rowspan="5">5000</td><td>82.53±0.17</td><td>16.46±0.25</td><td rowspan="5">500</td><td>84.26±0.84</td><td>12.85±0.62</td></tr><tr><td>BiC (Wu et ai.,2019)</td><td>81.42±0.85</td><td>17.31±1.02</td><td>85.53±2.06</td><td>10.27±1.32</td></tr><tr><td>GDumb (Prabhu et al., 2020)</td><td>81.67±0.02</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DER++ (Buzzega et al.,2020)</td><td>83.94±0.34</td><td>14.55±0.73</td><td>84.88±0.57</td><td>10.46±1.02</td></tr><tr><td>Co²L (Cha et al.,2021)</td><td>82.49±0.89</td><td>17.48±1.80</td><td>86.05±1.03</td><td>12.28±1.44</td></tr><tr><td>FT-seq</td><td rowspan="5"></td><td>33.61±0.85</td><td>86.87±0.20</td><td rowspan="5">0</td><td>20.12±0.42</td><td>94.63±0.68</td></tr><tr><td>EWC (Lopez-Paz & Ranzato,2017)</td><td>47.01±0.29</td><td>33.27±1.17</td><td>50.93±0.09</td><td>34.94±0.07</td></tr><tr><td>LwF(Li& Hoiem,2018)</td><td>60.69±0.63</td><td>27.77±2.17</td><td>47.91±0.33</td><td>38.01±0.28</td></tr><tr><td>L2P (Wang et al., 2022c)</td><td>83.86±0.28</td><td>7.35±0.38</td><td>81.14±0.93</td><td>4.64±0.52</td></tr><tr><td>DualPrompt (Wang et al.,2022b)</td><td>86.51±0.33</td><td>5.16±0.09</td><td>88.08±0.36</td><td>2.21±0.69</td></tr><tr><td>CPP (ours)</td><td></td><td>89.43± 0.24</td><td>3.61±0.31</td><td>93.36±0.03</td><td></td><td>0.1±0.01</td></tr><tr><td>Upper-bound</td><td>=</td><td>90.85±0.12</td><td>-</td><td>=</td><td>93.93±0.18</td><td>-</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 2: Comparison with architecture-based methods on Split CIFAR-100. Diff (lower is better) measures how close the performance to the upper-bound of the used backbone. † reported from the original papers. ‡ reported in DualPrompt (Wang et al., 2022b)
|
| 127 |
+
|
| 128 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Backbone</td><td rowspan="2">Avg. Acc (↑)</td><td rowspan="2">Diff (↓)</td><td rowspan="2">Pretrained</td><td rowspan="2">Buffer size</td><td colspan="2">Additional Parameters</td></tr><tr><td>MB</td><td>%</td></tr><tr><td>Upper-bound</td><td rowspan="5">ResNet18</td><td>80.41t</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SupSup (Wortsman et al., 2020)</td><td>28.34±2.45*</td><td>52.07</td><td>X</td><td>0</td><td>3.0</td><td>6.5%</td></tr><tr><td>DualNet (Pham et al.,2021)</td><td>40.14±1.64*</td><td>40.27</td><td>X</td><td>1000</td><td>5.04</td><td>10.9%</td></tr><tr><td>RPSNet (Rajasegaran et al.,2019)</td><td>68.60t</td><td>11.81</td><td>X</td><td>2000</td><td>181</td><td>404%</td></tr><tr><td>DynaER(Yan et al.,2021)</td><td>74.64†</td><td>5.77</td><td>X</td><td>2000</td><td>19.8</td><td>43.8%</td></tr><tr><td>Upper-bound</td><td rowspan="2">ResNet152</td><td>88.54</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DynaER(Yan et al.,2021)</td><td>71.01±0.58*</td><td>17.53</td><td>×</td><td>2000</td><td>159</td><td>68.5%</td></tr><tr><td rowspan="2">Upper-bound DyTox (Douillard et al., 2022)</td><td rowspan="2">Customized ViT</td><td>76.12†</td><td></td><td>-</td><td></td><td>-</td><td></td></tr><tr><td>62.06±0.25†</td><td>14.06</td><td>X</td><td>2000</td><td>0.04</td><td>0.38%</td></tr><tr><td rowspan="3">Upper-bound L2P (Wang et al.,2022c)</td><td rowspan="4">ViT-B/16</td><td>90.85±0.12‡</td><td>-</td><td>-</td><td>-</td><td></td><td></td></tr><tr><td>83.86±0.28‡</td><td>6.99</td><td>√</td><td>0</td><td>1.94</td><td>0.56%</td></tr><tr><td>86.51±0.33‡</td><td>4.34</td><td>√</td><td>0</td><td>1.90</td><td>0.55%</td></tr><tr><td>DualPrompt (Wang et al.,2022b)</td><td>89.43± 0.24</td><td>1.42</td><td>√</td><td>0</td><td>0.74</td><td>0.21%</td></tr></table>
|
| 129 |
+
|
| 130 |
+
Evaluation metric. We report widely used average accuracy and forgetting from the end session (Lopez-Paz & Ranzato, 2017; Chaudhry et al., 2019a; Wang et al., 2022b). All experiments run for 5 times with different seeds. We report the average and standard deviation for each metric. There are also a set of works reporting average accuracy across all sessions. As such, we provide detailed descriptions of evaluation metrics in Appendix H and results under both protocols in Appendix I.
|
| 131 |
+
|
| 132 |
+
# 4.3 COMPARISON WITH STATE OF THE ARTS
|
| 133 |
+
|
| 134 |
+
Rehearsal and rehearsal-free methods. We compare CPP to representative regularization-based methods: EWC (Lopez-Paz & Ranzato, 2017), LwF (Li & Hoiem, 2018), advanced rehearsalbased methods: $E R$ (Chaudhry et al., 2019b), GDumb (Prabhu et al., 2020), BiC (Wu et al., 2019), $D E R + +$ (Buzzega et al., 2020), $C o ^ { 2 } L$ (Cha et al., 2021), and state-of-the-art prompt-based methods: $L 2 P$ (Wang et al., 2022c), DualPrompt (Wang et al., 2022b). We report results from Wang et al. (2022b) where all baseline methods are reproduced with a pre-trained ViT-B/16. FT-seq represents typical sequential fine-tuning with a single linear classifier. As shown in Table 1, despite the rehearsalfree property of regularization-based methods, their performances lag behind a lot. Rehearsal-based methods, on the other hand, produce decent results under large memory budget. Prompt-based methods achieve state-of-the-art performances without using a rehearsal buffer. Our method surpasses existing approaches by a large margin on split CIFAR-100 and 5-datasets in terms of both classification accuracy and forgetting.
|
| 135 |
+
|
| 136 |
+
Table 3: Comparison with prototype-related methods on split ImageNet-subset and split CIFAR-100.
|
| 137 |
+
|
| 138 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Buffer size</td><td colspan="2">Split CIFAR-100</td><td colspan="2">Split ImageNet-subset</td></tr><tr><td>Backbone</td><td>Avg. Acc (↑)</td><td>Backbone</td><td>Avg. Acc (↑)</td></tr><tr><td>Upper-bound</td><td>-</td><td>ViT</td><td>90.85±0.12</td><td>MAE</td><td>94.22±0.18</td></tr><tr><td>iCaRL</td><td>2000</td><td>ResNet18</td><td>51.12 ±0.36</td><td>ResNet18</td><td>23.77±0.35</td></tr><tr><td>ProtoAug</td><td>0</td><td>ResNet18</td><td>36.32±0.33</td><td>ResNet18</td><td>27.16±0.24</td></tr><tr><td>iCaRL</td><td>2000</td><td>ViT</td><td>75.10±0.26</td><td>MAE</td><td>87.96±0.26</td></tr><tr><td>ProtoAug</td><td>0</td><td>ViT</td><td>64.1±0.20</td><td>MAE</td><td>72.72±0.31</td></tr><tr><td>CPP (ours)</td><td>0</td><td>ViT</td><td>89.43±0.24</td><td>MAE</td><td>93.90±0.12</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Architecture-based methods. It is non-trivial to migrate ConvNet-based architectural methods to transformer-based methods, so we adopt the metric from Wang et al. (2022b) to measure the difference between the method and its corresponding upper bound. Table 2 shows that CPP largely bridges the gap between incremental learning and joint learning on split CIFAR-100 dataset. Moreover, CPP outperforms other prompt-based methods using less than $50 \%$ of trainable parameters, leading to a better memory efficiency which is one of the critical desiderata in continual learning (see Appendix F for a detailed analysis of scalability).
|
| 141 |
+
|
| 142 |
+
Table 4: We ablate the proposed CPP and the multi-centroid prototypes with four different pretraining methods on split CIFAR-100. When both CPP and multi-centroid are not applied, the model is equivalent to the training-free baseline model.
|
| 143 |
+
|
| 144 |
+
<table><tr><td rowspan="2">Pretrain</td><td rowspan="2">CPP</td><td rowspan="2">Multi-centroids</td><td colspan="2">Split CIFAR-100</td></tr><tr><td>Avg. Acc (↑)</td><td>Forgetting (↓)</td></tr><tr><td rowspan="4">Deit (Touvron et al.,2021)</td><td></td><td></td><td>71.9</td><td>9.97</td></tr><tr><td>√</td><td></td><td>80.32±0.6</td><td>8.36±0.74</td></tr><tr><td></td><td>√</td><td>74.6±0.18</td><td>8.42±0.13</td></tr><tr><td>√</td><td>√</td><td>81.33±0.37</td><td>6.28±0.53</td></tr><tr><td rowspan="4">Dino (Caron et al., 2021)</td><td></td><td></td><td>76.69</td><td>8.91</td></tr><tr><td>√</td><td></td><td>80.82±0.22</td><td>6.16±0.09</td></tr><tr><td></td><td>√</td><td>79.71±0.09</td><td>7.72±0.04</td></tr><tr><td>√</td><td>√</td><td>83.73±0.14</td><td>4.87±0.06</td></tr><tr><td rowspan="4">MAE (He et al.,2022)</td><td></td><td></td><td>74.65</td><td>8.6</td></tr><tr><td>√</td><td></td><td>80.26±0.46</td><td>8.74±0.25</td></tr><tr><td></td><td>√</td><td>76.71±0.17</td><td>8.21±0.05</td></tr><tr><td>√</td><td>√</td><td>82.28±0.38</td><td>6.65±0.33</td></tr><tr><td rowspan="4">ViT (Dosovitskiy et al., 2021)</td><td></td><td></td><td>75.97</td><td>7.83</td></tr><tr><td>√</td><td></td><td>88.73±0.17</td><td>3.88±0.20</td></tr><tr><td></td><td>√</td><td>78.62±0.11</td><td>6.81±0.02</td></tr><tr><td>√</td><td>√</td><td>89.43±0.24</td><td>3.61±0.31</td></tr></table>
|
| 145 |
+
|
| 146 |
+
Prototype-related methods. Here, we compare our method with state-of-the-art prototype-based methods, ProtoAug (Zhu et al., 2021) and iCaRL (Rebuffi et al., 2017), on split CIFAR-100 and split ImageNet-subset. To be impartial and prevents information leakage, we reproduce both methods using a ImageNet pre-trained ViT-B/16, whereas supervised pre-training method is used for split CIFAR-100 and MAE pre-training method (self-supervised) is used for split ImageNet-subset. We then carefully tune hyper-parameters to avoid reckless fail (see Appendix G for details). As shown in Table 3, and in agreement with observations in Ramasesh et al. (2022), a pre-trained ViT backbone indeed significantly boost performances of existing methods. Nevertheless, CPP displays a cuttingedge performance under the same backbone, manifesting a systematic advantage of our method over the existing prototype-based methods.
|
| 147 |
+
|
| 148 |
+
# 4.4 ABLATION STUDY
|
| 149 |
+
|
| 150 |
+
Effectiveness of proposed modules. Since embeddings are one of the key ingredients in our recipe, it is crucial to analyze CPP upon different embedding functions. To this end, we implement CPP on four up-to-date pre-training methods, ViT (Dosovitskiy et al., 2021), Deit (Touvron et al., 2021), Dino (Caron et al., 2021) and MAE (He et al., 2022) that sweep supervised and self/un-supervised learning as well as discriminative and generative models. As displayed in Table 4, both proposed modules are robust w.r.t. all four pre-training methods, bringing around $10 \%$ absolute improvements over the baseline models. Each design remains effective when being isolated, and the benefits are additive when combined. An interesting observation is that different pre-training methods can cause large performance variances from the prototype perspective and there is a positive correlation $( \rho = 0 . 6 0 )$ between performances of the baseline models and final results. We deem this as an informative discover that leaves further probe in future work.
|
| 151 |
+
|
| 152 |
+
Contrastive prototypical loss outperforms alternatives. In our framework, the designed asymmetric contrastive loss explicitly aligns the optimization target with the classification problem, but it is still critical to validate the design empirically. As such, we first compare our designed loss with two widely-used alternatives: $C E$ (cross-entropy) and SupCon (supervised contrastive loss) (Khosla et al., 2020). Then we independently add uniformity (w/ uniformity), remove prototypes (w/o prototype) and cancel prototype augmentation (w/o ProtoAug) to show the efficacy of each proposed component. As shown in Table 5, the proposed loss consistently outperforms other loss functions by a clear margin. Among different alternatives, SupCon is the most compatible, demonstrating the benefits of unifying optimization and classification space. In agreement with our intuition and analysis in Appendix B, encouraging uniformity results in a clear drop in performance, and removing prototypes (both positive and negative anchors) leads to inferior space allocation in the latent space. In addition, using prototype augmentation can also boost the performance.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 4: Left: ablation on prompt length and deep prompt. Middle: centroid number v.s. number of query neighbors. Right: t-SNE visualizations for samples w/ (right) and w/o (left) prompt groups.
|
| 156 |
+
|
| 157 |
+
MLP is non-negligible. We show in Table 5 that nonlinearity introduced by the MLP is vital to the success of training prompt groups regardless of the loss design. This result coincides with the conventional practice in self-supervised representation learning, where MLP consistently improves the quality of representations.
|
| 158 |
+
|
| 159 |
+
Ablation for prompts. Two factors in prompt design can affect the final performance: prompt length (which indicates the number of trainable units at each layer) and deep prompt (which represents adding prompts to all layers instead of the first layer). As shown in Fig. 4 (left), deep prompt consistently outperforms the shallow prompt, suggesting the importance of steering features at different levels of abstraction. Also, an appropriate length can improve the performance. It is worth pointing out that CPP can still outperform existing methods by a large margin even with $L _ { p } = 1$ (using less than $1 / 2 0$ of parameters compared with DualPrompt). This result showcases a great parameter efficiency of our method which is critical towards the real-world scalable continual learning.
|
| 160 |
+
|
| 161 |
+
Table 5: Ablation study on contrastive prototypical loss and its alternatives.
|
| 162 |
+
|
| 163 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">Split CIFAR-100</td></tr><tr><td>Avg. Acc (↑)</td><td>Forgetting (↓)</td></tr><tr><td>CE (w/o mlp)</td><td>37.12±2.54</td><td>10.01±1.63</td></tr><tr><td>CE</td><td>87.98±0.32</td><td>4.53±0.35</td></tr><tr><td>SupCon (w/o mlp)</td><td>48.03±6.97</td><td>7.37±2.42</td></tr><tr><td>SupCon</td><td>88.60±0.18</td><td>3.89±0.32</td></tr><tr><td>CPP (w/o mlp)</td><td>55.43±7.74</td><td>0.8±0.29</td></tr><tr><td>CPP (w/ uniformity)</td><td>88.82±0.18</td><td>4.01±0.15</td></tr><tr><td>CPP (w/o prototype)</td><td>88.85±0.20</td><td>3.88±0.27</td></tr><tr><td>CPP (w/o ProtoAug)</td><td>89.18±0.15</td><td>3.78±0.30</td></tr><tr><td>CPP</td><td>89.43±0.24</td><td>3.61±0.31</td></tr></table>
|
| 164 |
+
|
| 165 |
+
Centroid number v.s. query radius. Both centroid number $C$ and query radius $r$ can impact how many prompt groups are actually retrieved for fine-grained matching. For example, with a fixed $r$ , increasing $C$ may result in fewer categories being visited and vice versa. Even though one can always traverse all prompt groups to avoid querying process, it will increase inference time as the task accumulates. As such, it is more cost-effective to select a proper combination of $C$ and $r$ Fig. 4 (middle) exhibits the result of a simple grid search on CIFAR-100, and the searched setting $C = 5$ and $r = 2 0$ ) works fairly well for all other datasets.
|
| 166 |
+
|
| 167 |
+
Visualizations. We visualize data samples and their corresponding prototypes (single centroid) from CIFAR-100 with and without inserting learned prompt groups. As displayed in Fig. 4 (right), while samples from the same class tend to locate near each other in the latent space, samples from different classes still interleave with each other. After prompt groups are added, samples from the same category are tightly clustered, while different classes are spread out. See Appendix K for additional visualizations and analysis.
|
| 168 |
+
|
| 169 |
+
# 5 CONCLUSION
|
| 170 |
+
|
| 171 |
+
In this study, we propose a simple and novel framework for rehearsal-free continual learning. It leverages task-specific prompt to reemerge each snapshot of a model so as to avoid semantic drift. It also uses prompt-tuning to steer prototypes to reduce interference in the latent space through contrastive learning on the mixture of data embeddings and prototypes. Empirically, CPP surpasses state-of-the-art methods by a large margin without using a rehearsal buffer or a test-time oracle. We comprehensively analyze the effectiveness of proposed components, showcasing clear and additive benefits. We believe CPP can shine a light on the design principle of real-world continual learning giving current advances in architecture design and representation learning.
|
| 172 |
+
|
| 173 |
+
# REFERENCES
|
| 174 |
+
|
| 175 |
+
Yaroslav Bulatov. Notmnist dataset. Google (Books/OCR), Tech. Rep.[Online]. Available: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset. html, 2, 2011.
|
| 176 |
+
|
| 177 |
+
Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and SIMONE CALDERARA. Dark experience for general continual learning: a strong, simple baseline. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 15920–15930. Curran Associates, Inc., 2020.
|
| 178 |
+
|
| 179 |
+
Mathilde Caron, Hugo Touvron, Ishan Misra, Herv’e J’egou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 9630–9640, 2021.
|
| 180 |
+
|
| 181 |
+
H. Cha, J. Lee, and J. Shin. Co2l: Contrastive continual learning. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 9496–9505, 2021.
|
| 182 |
+
|
| 183 |
+
Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-GEM. In International Conference on Learning Representations, 2019a.
|
| 184 |
+
|
| 185 |
+
Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K Dokania, Philip HS Torr, and Marc’Aurelio Ranzato. On tiny episodic memories in continual learning. arXiv preprint arXiv:1902.10486, 2019b.
|
| 186 |
+
|
| 187 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning, ICML’20. JMLR.org, 2020.
|
| 188 |
+
|
| 189 |
+
MohammadReza Davari, Nader Asadi, Sudhir Mudur, Rahaf Aljundi, and Eugene Belilovsky. Probing representation forgetting in supervised and unsupervised continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 16712–16721, June 2022.
|
| 190 |
+
|
| 191 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
|
| 192 |
+
|
| 193 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021.
|
| 194 |
+
|
| 195 |
+
Arthur Douillard, Alexandre Rame, Guillaume Couairon, and Matthieu Cord. Dytox: Transformers ´ for continual learning with dynamic token expansion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
|
| 196 |
+
|
| 197 |
+
Raia Hadsell, Dushyant Rao, Andrei Rusu, and Razvan Pascanu. Embracing change: Continual learning in deep neural networks. Trends in Cognitive Sciences, 24:1028–1040, 12 2020.
|
| 198 |
+
|
| 199 |
+
Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollar, and Ross Girshick. Masked ´ autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 16000–16009, June 2022.
|
| 200 |
+
|
| 201 |
+
Menglin Jia, Luming Tang, Bor-Chun Chen, Claire Cardie, Serge Belongie, Bharath Hariharan, and Ser-Nam Lim. Visual prompt tuning. In European Conference on Computer Vision (ECCV), 2022.
|
| 202 |
+
|
| 203 |
+
Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In Advances in Neural Information Processing Systems, volume 33, pp. 18661–18673. Curran Associates, Inc., 2020.
|
| 204 |
+
|
| 205 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
|
| 206 |
+
|
| 207 |
+
Ananya Kumar, Aditi Raghunathan, Robbie Matthew Jones, Tengyu Ma, and Percy Liang. Finetuning can distort pretrained features and underperform out-of-distribution. In International Conference on Learning Representations, 2022.
|
| 208 |
+
|
| 209 |
+
Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998.
|
| 210 |
+
|
| 211 |
+
Yann LeCun, Sumit Chopra, Raia Hadsell, Fu Jie Huang, and et al. A tutorial on energy-based learning. In PREDICTING STRUCTURED DATA. MIT Press, 2006.
|
| 212 |
+
|
| 213 |
+
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, November 2021.
|
| 214 |
+
|
| 215 |
+
Xiang Lisa Li and Percy Liang. 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), pp. 4582–4597. Association for Computational Linguistics, aug 2021.
|
| 216 |
+
|
| 217 |
+
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(12):2935–2947, 2018.
|
| 218 |
+
|
| 219 |
+
David Lopez-Paz and Marc’Aurelio Ranzato. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 220 |
+
|
| 221 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
|
| 222 |
+
|
| 223 |
+
Arun Mallya and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7765– 7773, 2018.
|
| 224 |
+
|
| 225 |
+
Michael McCloskey and Neal J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. volume 24 of Psychology of Learning and Motivation, pp. 109–165. Academic Press, 1989.
|
| 226 |
+
|
| 227 |
+
Thomas Mensink, Jakob J. Verbeek, Florent Perronnin, and Gabriela Csurka. Distance-based image classification: Generalizing to new classes at near-zero cost. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35:2624–2637, 2013.
|
| 228 |
+
|
| 229 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011.
|
| 230 |
+
|
| 231 |
+
Andrew Y. Ng, Michael I. Jordan, and Yair Weiss. On spectral clustering: Analysis and an algorithm. In ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS, pp. 849–856. MIT Press, 2001.
|
| 232 |
+
|
| 233 |
+
German I. Parisi, Ronald Kemker, Jose L. Part, Christopher Kanan, and Stefan Wermter. Continual lifelong learning with neural networks: A review. Neural Networks, 113:54–71, 2019. ISSN 0893-6080.
|
| 234 |
+
|
| 235 |
+
Quang Pham, Chenghao Liu, Doyen Sahoo, and HOI Steven. Contextual transformation networks for online continual learning. In International Conference on Learning Representations, 2020.
|
| 236 |
+
|
| 237 |
+
Quang Pham, Chenghao Liu, and Steven Hoi. Dualnet: Continual learning, fast and slow. In Advances in Neural Information Processing Systems, volume 34, pp. 16131–16144, 2021.
|
| 238 |
+
|
| 239 |
+
Ameya Prabhu, Philip Torr, and Puneet Dokania. Gdumb: A simple approach that questions our progress in continual learning. In The European Conference on Computer Vision (ECCV), August 2020.
|
| 240 |
+
|
| 241 |
+
Jathushan Rajasegaran, Munawar Hayat, Salman Khan, Fahad Shahbaz Khan, and Ling Shao. Random path selection for incremental learning. Advances in Neural Information Processing Systems, 2019.
|
| 242 |
+
|
| 243 |
+
Vinay Venkatesh Ramasesh, Aitor Lewkowycz, and Ethan Dyer. Effect of scale on catastrophic forgetting in neural networks. In International Conference on Learning Representations, 2022.
|
| 244 |
+
|
| 245 |
+
Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, G. Sperl, and Christoph H. Lampert. icarl: Incremental classifier and representation learning. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 5533–5542, 2017.
|
| 246 |
+
|
| 247 |
+
Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. CoRR, abs/1606.04671, 2016.
|
| 248 |
+
|
| 249 |
+
Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 250 |
+
|
| 251 |
+
S. Thrun. A lifelong learning perspective for mobile robot control. In V. Graefe (ed.), Intelligent Robots and Systems. Elsevier, 1995.
|
| 252 |
+
|
| 253 |
+
Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Herve Jegou. Training data-efficient image transformers & distillation through attention. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 10347–10357. PMLR, 18–24 Jul 2021.
|
| 254 |
+
|
| 255 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 256 |
+
|
| 257 |
+
Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In Proceedings of the 37th International Conference on Machine Learning, pp. 9929–9939, 2020.
|
| 258 |
+
|
| 259 |
+
Yabin Wang, Zhiwu Huang, and Xiaopeng Hong. S-prompts learning with pre-trained transformers: An occam’s razor for domain incremental learning, 2022a.
|
| 260 |
+
|
| 261 |
+
Zifeng Wang, Zizhao Zhang, Sayna Ebrahimi, Ruoxi Sun, Han Zhang, Chen-Yu Lee, Xiaoqi Ren, Guolong Su, Vincent Perot, Jennifer G. Dy, and Tomas Pfister. Dualprompt: Complementary prompting for rehearsal-free continual learning. 2022b.
|
| 262 |
+
|
| 263 |
+
Zifeng Wang, Zizhao Zhang, Chen-Yu Lee, Han Zhang, Ruoxi Sun, Xiaoqi Ren, Guolong Su, Vincent Perot, Jennifer Dy, and Tomas Pfister. Learning to prompt for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 139–149, 2022c.
|
| 264 |
+
|
| 265 |
+
Mitchell Wortsman, Vivek Ramanujan, Rosanne Liu, Aniruddha Kembhavi, Mohammad Rastegari, Jason Yosinski, and Ali Farhadi. Supermasks in superposition. In Advances in Neural Information Processing Systems, volume 33, pp. 15173–15184. Curran Associates, Inc., 2020.
|
| 266 |
+
|
| 267 |
+
Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, and Yun Fu. Large scale incremental learning. In CVPR, pp. 374–382, 2019.
|
| 268 |
+
|
| 269 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017.
|
| 270 |
+
|
| 271 |
+
Shipeng Yan, Jiangwei Xie, and Xuming He. Der: Dynamically expandable representation for class incremental learning. 2021.
|
| 272 |
+
|
| 273 |
+
Lu Yu, Bartlomiej Twardowski, Xialei Liu, Luis Herranz, Kai Wang, Yongmei Cheng, Shangling Jui, and Joost van de Weijer. Semantic drift compensation for class-incremental learning. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6980–6989, 2020.
|
| 274 |
+
|
| 275 |
+
Chi Zhang, Nan Song, Guosheng Lin, Yun Zheng, Pan Pan, and Yinghui Xu. Few-shot incremental learning with continually evolved classifiers. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2021.
|
| 276 |
+
|
| 277 |
+
Da-Wei Zhou, Fu-Yun Wang, Han-Jia Ye, Liang Ma, Shiliang Pu, and De-Chuan Zhan. Forward compatible few-shot class-incremental learning, 2022.
|
| 278 |
+
|
| 279 |
+
Fei Zhu, Xu-Yao Zhang, Chuang Wang, Fei Yin, and Cheng-Lin Liu. Prototype augmentation and self-supervision for incremental learning. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 280 |
+
|
| 281 |
+
# A DETAILED DERIVATIONS FOR CONTRASTIVE PROTOTYPICAL LOSS
|
| 282 |
+
|
| 283 |
+
Here, we provide an analysis of gradients for proposed contrastive prototypical loss. It is sufficient to show gradients for a single prototype $k$ . To ease the notion, we abbreviate similarity between vector $z _ { i }$ and $z _ { j }$ as $s _ { i , j }$ . Therefore, the loss of a sample $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ w.r.t. prototype $k$ is:
|
| 284 |
+
|
| 285 |
+
$$
|
| 286 |
+
\mathcal { L } _ { i } ^ { k } = \frac { - 1 } { | \hat { P } ( i ) | } \sum _ { z _ { p } \in \hat { P } ( i ) } \log \frac { \exp ( s _ { i , p } / \tau ) } { \sum _ { z _ { n } \in N ( i ) } ^ { \sum } \exp ( s _ { i , n } / \tau ) }
|
| 287 |
+
$$
|
| 288 |
+
|
| 289 |
+
The gradient with respect to the similarity $s _ { i , j }$ between a positive pair $( z _ { i } , z _ { j } )$ where $j \in P ( i )$ can be derived as:
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
\begin{array} { r l } & { \frac { \partial \mathcal { L } _ { i } ^ { k } } { \partial s _ { i , j } } = \frac { - 1 } { | \tilde { P } ( i ) | } \displaystyle \sum _ { s _ { r } \in \tilde { P } ( \tilde { 0 } ) } \frac { \partial } { \partial s _ { i , j } } \left( s _ { i , j } / \tau - \log \displaystyle \sum _ { s = \mathrm { e } ^ { - \mathrm { i } \chi _ { ( i ) } } } \exp ( s _ { i , n } / \tau ) \right) } \\ & { \quad = \frac { - 1 } { | \tilde { P } ( i ) | } \displaystyle \sum _ { s _ { r } \in \tilde { P } ( \tilde { 0 } ) } \left( \frac { 1 } { \tau } \cdot 1 [ p = j ] - \frac { \frac { \partial } { \partial s _ { i , j } } \left( \displaystyle \sum _ { s = \mathrm { e } ^ { - \mathrm { i } \chi _ { ( i ) } } } \exp ( s _ { i , n } / \tau ) \right) } { \displaystyle z _ { \mathrm { e } ^ { - \mathrm { i } \chi _ { ( i ) } } } \exp ( s _ { i , n } / \tau ) } \right) } \\ & { \quad = \frac { - 1 } { | \tilde { P } ( i ) | } \displaystyle \sum _ { s _ { r } \in \tilde { P } ( \tilde { 0 } ) } \left( \frac { 1 } { \tau } \cdot \mathbb { I } [ p = j ] - 0 \right) } \\ & { \quad = \frac { 1 } { \tau | \tilde { P } ( i ) | } \displaystyle z _ { s } \exp ( - 1 ) } \end{array}
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
Here $\mathbb { 1 }$ is an indicator. Similarly, the gradient with respect to the similarity $s _ { i , m }$ between a negative pair $( z _ { i } , z _ { m } )$ where $m \in N ( i )$ is:
|
| 296 |
+
|
| 297 |
+
$$
|
| 298 |
+
\begin{array} { l } \displaystyle \frac { \partial \mathcal { E } _ { \xi , n } ^ { k } } { \partial \nu _ { i , m } } = \frac { - 1 } { | \mathcal { P } ( i ) | } \sum _ { \alpha , \alpha ^ { \ell } \neq \ell \neq 0 } \frac { \partial } { \partial s _ { i , m } } ( \begin{array} { l } { s _ { i , \alpha ^ { \ell } } \langle \tau - \log \big ( \sum _ { \alpha , \alpha \neq \ell } \exp ( s _ { i , \alpha ^ { \ell } } \tau ) \big ) } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \displaystyle = \frac { - 1 } { | \mathcal { P } ( i ) | } \sum _ { \alpha , \alpha ^ { \ell } \neq \ell \neq 0 } ( \frac { \sigma _ { \alpha , \ell } ^ { \ell } } { D _ { \alpha , \alpha ^ { \ell } } \big ( s _ { i , m } \big ( s _ { i , \alpha ^ { \ell } } ) \big ) } ( \begin{array} { l } { \frac { \sigma _ { \alpha , \alpha ^ { \ell } } } { \sigma _ { \alpha , \alpha ^ { \ell } } } } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \displaystyle - \frac { \sigma _ { \alpha ^ { \ell } } } { D _ { \alpha ^ { \ell } } \big ( s _ { i , m } \big ( s _ { i , m } \big ) \big ) } } \end{array} ) ) } \\ { \displaystyle \quad \quad = \frac { 1 } { | \mathcal { P } ( i ) | } \sum _ { \alpha , \alpha ^ { \ell } \neq \ell \neq 0 } ( \frac { \exp ( s _ { i , \alpha ^ { \ell } } \int _ { \gamma } \cdot \frac { 1 } { \tau } \cdot \big [ \ln = m \big ] } { \sum _ { \alpha ^ { \ell } } \exp ( s _ { i , \alpha ^ { \ell } } \tau ) } ) } \\ { \displaystyle \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \displaystyle = \frac { 1 } { \tau } \frac { \big ( 1 - \exp ( s _ { i , \alpha ^ { \ell } } \tau ) \big ) } { | \mathcal { P } ( i ) | } \frac { \exp ( s _ { i , \alpha ^ { \ell } } \tau ) ^ { \prime } } { \exp ( s _ { i , \alpha ^ { \ell } } \tau ) } } \end{array} \end{array}
|
| 299 |
+
$$
|
| 300 |
+
|
| 301 |
+
Taking gradients of loss $\mathcal { L } ^ { k }$ with respect to the similarity between a positive pair $s _ { i , j } = \sin ( z _ { i } , z _ { j } )$ and a negative pair $s _ { i , m } = \sin ( z _ { i } , z _ { m } )$ result in:
|
| 302 |
+
|
| 303 |
+
$$
|
| 304 |
+
\frac { \partial \mathcal { L } _ { i } ^ { k } } { \partial s _ { i , j } } = \frac { 1 } { \tau | \hat { P } ( i ) | } , \qquad \frac { \partial \mathcal { L } _ { i } ^ { k } } { \partial s _ { i , m } } = \frac { 1 } { \tau | \hat { P } ( i ) | } \cdot \frac { \exp ( s _ { i , m } / \tau ) } { \sum _ { z _ { n } \in N ( i ) } \exp ( s _ { i , n } / \tau ) } .
|
| 305 |
+
$$
|
| 306 |
+
|
| 307 |
+
The above derivation shows that positive similarities are treated equally and scaled by the temperature and the cardinality of the set of positive anchors. And property of implicit hard-case mining (i.e., proportional to the exponential term $\exp ( { s _ { i , m } } / { \tau } ) \rangle$ ) is inherited from a typical contrastive loss in negative term.
|
| 308 |
+
|
| 309 |
+
# B CPP IS AN ENERGY-BASED MODEL
|
| 310 |
+
|
| 311 |
+
The overall objective of an energy-based model (LeCun et al., 2006) (EBM) is to obtain an energy function $E _ { \theta } ( \dot { \mathbf { x } } ) : \mathbb { R } ^ { D } \mathbb { R }$ parameterized by $\theta$ that maps the high dimensional input $_ { \textbf { \em x } }$ to a scalar value. Giving an energy function $E _ { \theta } ( \cdot )$ , probability density $p ( { \pmb x } )$ can be expressed through Gibbs distribution:
|
| 312 |
+
|
| 313 |
+
$$
|
| 314 |
+
p ( y | x ) = \frac { \exp ( - E _ { \theta } ( x , y ) / \tau ) } { \int _ { y ^ { \prime } } \exp ( - E _ { \theta } ( x , y ^ { \prime } ) / \tau ) } = \frac { \exp ( - E _ { \theta } ( x , y ) / \tau ) } { \exp ( - E _ { \theta } ( x ) / \tau ) }
|
| 315 |
+
$$
|
| 316 |
+
|
| 317 |
+
where $E _ { \theta } ( x )$ is the Helmholtz free energy and $\tau$ is the temperature factor. As such:
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
E _ { \theta } ( x ) = \tau \cdot - \log \int _ { y ^ { \prime } } \exp ( - E _ { \theta } ( x , y ^ { \prime } ) / \tau )
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
When making final prediction under our framework, the categorical distribution can be represented as:
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
p ( y | \boldsymbol { x } ) = \frac { \exp ( s _ { x , y } / \tau ) } { \sum _ { y ^ { \prime } = 1 } ^ { K } \exp ( s _ { x , y ^ { \prime } } / \tau ) }
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
where $s _ { x , y } = \mathrm { s i m } ( f _ { \theta } ( \pmb { x } ) , \pmb { \mu } _ { y } )$ . Note that we here merge the prompt parameters $P$ into $\theta$ for the sake of simplicity. When connecting Eq. 13 with Eq. 11 and let $E _ { \theta } ( x , y ) = - s _ { x , y }$ , we see that the energy of $_ { \textbf { \em x } }$ can be expressed as:
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
E _ { \theta } ( \pmb { x } ) = \tau \cdot - \log \sum _ { y = 1 } ^ { K } \exp ( s _ { x , y } / \tau )
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
which is dominated by the largest similarity $s _ { x , y * }$ given an appropriate temperature $\tau$ . Above analysis drives to the conclusion that predicting the class of prototype which is most similar to a given query vector will generate lowest energy for the system (i.e., a more stable system). Now the question turns to whether the proposed contrastive prototypical loss serves as a qualified energy loss function.
|
| 336 |
+
|
| 337 |
+
To see this, we first simplify the Eq. 7 to a formulation where there is only one positive sample $z _ { \hat { p } }$ :
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\begin{array} { c } { { \mathcal { L } _ { i } ^ { k } = - \log \displaystyle \frac { \exp ( s _ { i , \hat { p } } ) } { \sum _ { \boldsymbol { \pi } _ { n } \in { \cal N } ( i ) } \exp ( s _ { i , n } / \tau ) } } } \\ { { = - s _ { i , \hat { p } } + \log \displaystyle \sum _ { z _ { n } \in { \cal N } ( i ) } \exp ( s _ { i , n } / \tau ) } } \end{array}
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
when letting $z _ { \hat { p } }$ to be the value prototype $\pmb { \mu } _ { k } ^ { \prime }$ that used as classifier, we have:
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
{ \mathcal L } _ { i } ^ { k } = \underbrace { - \mathrm { s i m } ( z _ { i } , { \mu } _ { k } ^ { \prime } ) } _ { \mathrm { p u s h d o w n ~ e n e r g y ~ f o r ~ p r o t o t y p e k } } + \log \sum _ { z _ { n } \in N ( i ) } \exp ( s _ { i , n } / \tau )
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
As shown above, to minimize above loss, the first term will push down the energy for value prototype $\pmb { \mu } _ { k } ^ { \prime }$ and the second term will increase energies for other prototypes. So above simplified loss is an effective loss function for the energy model. However, the ground-truth prototype $\pmb { \mu } _ { k } ^ { \prime }$ is unavailable at training, instead a rough approximation $\mu _ { k }$ can be generated with Eq. 2 and a set of data samples are available. As such, Eq. 7 treat $\mu _ { k }$ and every sample embedding as positive prototypes and pulling the $z _ { i }$ to all of them simultaneously. This is equivalent to pulling $z _ { i }$ to a fictitious prototype that dynamically evolves with the distribution of embeddings. Since $\pmb { \mu } _ { k } ^ { \prime }$ is generated using the learned embeddings at the end of the task, Eq. 7 still approximately minimizes the energy between a sample and its correspondingly value prototype $\pmb { \mu } _ { k } ^ { \prime }$ even though $\pmb { \mu } _ { k } ^ { \prime }$ is not explicitly shows in loss function.
|
| 350 |
+
|
| 351 |
+
Finally, we show that encouraging uniformity is against the principle of the energy model. By encouraging uniformity as typical supervised or self-supervised contrastive loss (Chen et al., 2020;
|
| 352 |
+
|
| 353 |
+
Khosla et al., 2020), we turn Eq. 15 into:
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\begin{array} { l } { \displaystyle \mathcal { L } _ { i } ^ { k } = - \log \frac { \exp ( s _ { i , \hat { p } } ) } { \sum _ { \boldsymbol { z } _ { n } \in N ( i ) } \exp ( s _ { i , n } / \tau ) + \sum _ { \boldsymbol { z } _ { p } \in \tilde { \cal P } ( i ) } \exp ( s _ { i , p } / \tau ) } } \\ { = \displaystyle - s _ { i , \hat { p } } + \log \left( \sum _ { \boldsymbol { z } _ { n } \in N ( i ) } \exp ( s _ { i , n } / \tau ) + \sum _ { \boldsymbol { z } _ { n } \in \tilde { \cal P } ( i ) } \exp ( s _ { i , p } / \tau ) \right) } \end{array}
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
As shown above, we can see that the second term in log function acts adversely with respect to $- s _ { i , \hat { p } }$ which minimizes the energy between a sample and its corresponding prototype. Hence, we intentionally remove the term that encourages the uniformity in typical contrastive loss from our designed loss.
|
| 360 |
+
|
| 361 |
+
During inference, the prediction process can be interpreted as selecting a prompt group that generates the most compatible embedding $z ^ { \prime }$ that has minimum energy with respect to a local system and its nearest value prototype is the predicted class. The Local system is generated through querying and making visible a predefined number of neighbors on the key manifold (i.e., manifold containing key prototypes).
|
| 362 |
+
|
| 363 |
+
# C ALGORITHMS FOR CPP
|
| 364 |
+
|
| 365 |
+
The pipeline of the proposed framework is summarized in Algoritm 1 and Algorithm 2.
|
| 366 |
+
|
| 367 |
+
# Algorithm 1: Training algorithm
|
| 368 |
+
|
| 369 |
+
Input: Pre-trained ViT model $f _ { \theta }$ , number of tasks $T$ , training epochs $E$ , training set
|
| 370 |
+
$\{ ( \pmb { x } _ { i } ^ { t } , \pmb { y } _ { i } ^ { t } ) \} _ { i = 1 } ^ { n _ { t } } \} _ { t = 1 } ^ { T }$ , prompt length $L _ { p }$ and centriod number $C$ .
|
| 371 |
+
for $t = 1 , \cdots , T$ do Initialize: MLP $m _ { \sigma ^ { t } }$ , prompt group $P ^ { t }$ , $U = \varnothing , U ^ { \prime } = \varnothing$ for class $k \in \mathcal { V } ^ { t }$ do Generate key prototype $\mu _ { k }$ with Eq. 2 U ← U ∪ µk end for $e = 1 , \cdots , E$ do Optimize $\sigma ^ { t }$ , $P ^ { t }$ through generalized Eq. 6 end Dispose $m _ { \sigma ^ { t } }$ $f _ { \theta } \gets f _ { \theta , P ^ { t } }$ for class $k \in \mathcal { V } ^ { t }$ do Generate value prototype $\pmb { \mu } _ { k } ^ { \prime }$ with Eq. 2 $U ^ { \prime } \gets U ^ { \prime } \cup \mu _ { k } ^ { \prime }$ end
|
| 372 |
+
end
|
| 373 |
+
Output: $\{ P ^ { t } \} _ { t = 1 } ^ { T }$ , $U$ and $U ^ { \prime }$ .
|
| 374 |
+
|
| 375 |
+
# D RELATIONS WITH PREVIOUS METHODS
|
| 376 |
+
|
| 377 |
+
There exists different taxonomies for continual learning methods (Parisi et al., 2019; Hadsell et al., 2020), we here take notions from Hadsell et al. (2020). Put conclusion first, CPP in this study is a hybrid method. From the view of prompt deployment, CPP is in consistent with modular models. Extra capacity is assigned when encountering new tasks and a specialization at task-level is maintained. Nevertheless, CPP does not necessarily suffer from computational issues and the
|
| 378 |
+
|
| 379 |
+
# Algorithm 2: Inference algorithm
|
| 380 |
+
|
| 381 |
+
Given: Pre-trained ViT model $f _ { \theta }$ , the collection of key prototypes $U$ , the collection of value prototypes $U ^ { \prime }$ , the collection of prompts $\{ P ^ { t } \} _ { t = 1 } ^ { T }$ , query funcion $q ( , , r )$ and pair-wise distance function $d$ .
|
| 382 |
+
|
| 383 |
+
Input: test image $_ { \textbf { \em x } }$
|
| 384 |
+
Initialize: $Q ^ { \prime } = \emptyset$ , $L = \mathcal { O }$
|
| 385 |
+
$\begin{array} { r } { \pmb q = f _ { \pmb \theta } ( \pmb x ) [ 0 , : ] } \end{array}$ ; // use class token as query vector
|
| 386 |
+
$M = q ( \pmb q , U , r )$ ; // retrieve indexes of r nearest key prototypes
|
| 387 |
+
for $t \in M$ do q0 = fθ,P t (x) Q0 ← Q0 ∪ q 0 L ← L ∪ µ 0t
|
| 388 |
+
end
|
| 389 |
+
y = arg min(d(Q0, L)) y=1...K
|
| 390 |
+
Output: label y
|
| 391 |
+
|
| 392 |
+
premise of test-time oracle as other modular methods. Inheriting parameter efficiency from prompttuning (Lester et al., 2021), CPP introduces negligible extra parameters for each incremental task. And since only prompts are updated with gradient descent and each task is associate with a fixed amount of prompts, the computational overhead is relatively small and constant. During inference, we leverage prototypes as key values and embeddings as quries to retrieve candiate prompt groups and thus avoid the requirement of test-time oracle. Taking prototype perspective, CPP can be categorized as a memory-based method, especially episodic memory method. We save prototypes in memory space and leverage to retain previous knowledge and also as classifiers during inference. Yet, unlike most memory-based method, we maintain information in a highly abstract and compressed manner and set them as anchors in latent space without forwarding them through the network.
|
| 393 |
+
|
| 394 |
+
# E DISCUSSION OF INFERENCE EFFICIENCY
|
| 395 |
+
|
| 396 |
+
Here, we analyze the efficiency of inference process for CPP and provides an engineering solution. The time complexity of different data samples can be different during inference and there is randomness. For example, when querying 5 nearest neighbors with key prototypes, it does not necessarily result in 5 different prompt groups due the existences of multi-centroid prototypes and task-level prompt groups. At worst case, when 5 nearest centroids are from totally different classes and these classes are contained in totally different tasks. Then the query function will return 5 different prompt groups. However, in practice, centroids from same class tend to locate near to each other and a prompt group is shared by all classes within a task. It results in much lesser prompt groups that being retrieved and number of prompt groups vary according to data samples. From an engineering perspective, one can leverage batch processing to accelerate the process. Concretely, one can directly append all prompt groups and input a batch of attention masks to differentiate different configurations.
|
| 397 |
+
|
| 398 |
+
# F DISCUSSION OF SCALABILITY
|
| 399 |
+
|
| 400 |
+
The scalability of a continual learning framework is one of the most crucial considerations in practice. It requires a framework to be first, memory efficient, consuming affordable memory footprint as tasks accumulate; second, computational efficient, using as less computational resources as possible; at last, privacy respectful, making it compatible with diverse real-world scenarios. We manage to analysis the scalability of our method with respect to these three aspects in the following paragraph.
|
| 401 |
+
|
| 402 |
+
For memory usage, there are two parts in our framework will cause increasing parameters during continual learning, prototypes and prompt groups. Using split CIFAR-100 as an instance, each new class will introduce $2 \times M \times 7 6 8$ extra parameters where $M$ denotes the centroid number and the factor 2 is due to the decoupling of key and value prototypes. Let $M = 5$ as in our setting, we only save $1 0 \times 7 6 8$ extra parameters for a new class, this consumes approximately only $1 / 2 0$ of memory as saving a single ImageNet image $( 2 2 4 \times 2 2 4 \times 3 )$ . Besides, each new task (containing 10 classes)
|
| 403 |
+
|
| 404 |
+
will bring a prompt group (w/ deep prompt) with $8 \times 1 2 \times 7 6 8$ parameters. When averaged over 10 classes, it is approximately equivalent to $1 0 \times 7 6 8$ per class. Note that the increasing rate of parameters introduced by prompt group are negatively correlated to the size of the task. When put together both sources of extra parameters, we can see that for each incremental class we have roughly $2 0 \times 7 6 8$ parameters which costs $0 . 0 1 5 3 6 \mathrm { M B }$ and is equivalent to $1 / 1 0$ of a single ImageNet image. Moreover, the increment of memory usage for each class is constant w.r.t. all scenarios from where saving explicit samples may suffer from memory surge due to the resolution change (e.g., with a 4K camera). With above discussion, we believe it is fair to say that our framework is benign to scalability issue in terms of memory usage. From a computational perspective, thanks to prompt-tuning, only a tiny portion of parameters are updated through backpropagation. And prototypes are leveraged as anchors in latent space, thus no explicit data samples from previous classes need to be forwarded through the network. So the computational cost during the training is also minimized. Finally, since all information from previous tasks are retained as a few latent vectors (i.e., the prototypes), the privacy is inherently protected.
|
| 405 |
+
|
| 406 |
+
# G REPRODUCTION DETAILS
|
| 407 |
+
|
| 408 |
+
Prototype-related methods. In Sec. 4.3, we compare our method to other representative prototypebased methods. To be impartial, we first run the original codes (ResNet-18 as feature extractor) on the same split ImageNet-subset and split CIFAR-100 as we used. In original setting of ProtoAug (Zhu et al., 2021), it uses 50 classes in initial session and 5 class for each incremental session. To be consistent with our setup, we change it to 10 classes per session and 10 sessions in total. Both iCaRL (Rebuffi et al., 2017) and ProtoAug (Zhu et al., 2021)’s technical designs are orthogonal to the choice of feature extractor. So we replace ResNet-18 with a pre-trained ViT-B/16 without the loss of fairness and keep other designs the same as originals. To take advantages of the pre-trained backbone, we set learning rate to 1e-4 for both methods according to a simple grid search and use the same training configuration as detailed in Sec. 4.2 for fairness.
|
| 409 |
+
|
| 410 |
+
DualPrompt on split ImangeNet-subset. Here, we further reproduce DualPrompt (Wang et al., 2022b) on split ImageNet-subset. The result can be seen in Table 6. To prevent information leakage, we use MAE pre-trained weights instead of the original ViT pre-trained weights. All other parameters are set following the original paper. Specifically, we set $L _ { e } = 2 0 , L _ { g } = 5 , s t a r t _ { e } = 3 , e n d _ { e } =$ $5 , s t a r t _ { g } = 1 , e n d _ { g } = 2$ . We train the model for 50 epochs with constant learning rate 0.005 and Adam optimizer is used. Since the original paper does not use split ImageNet-subset, there may exist a better configuration with further tuning.
|
| 411 |
+
|
| 412 |
+
Table 6: Reproduction of DualPrompt on split ImageNet-subset.
|
| 413 |
+
|
| 414 |
+
<table><tr><td>Methods</td><td colspan="2">split ImageNet-subset Avg. Acc (1)</td></tr><tr><td>DualPrompt (MAE)</td><td>92.5</td><td>Forget (↓) 2.0</td></tr><tr><td>CPP (ours)</td><td>93.9</td><td>1.89</td></tr></table>
|
| 415 |
+
|
| 416 |
+
# H EVALUATION METRICS
|
| 417 |
+
|
| 418 |
+
Let $A _ { i , j }$ be classification accuracy on the $j$ -th task after training on the $i$ -th task. After the model finishes training on the $i$ -th task, we compute the Average Accuracy $( A _ { i } )$ and Forgetting $( F _ { i } )$ as follows:
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
\begin{array} { l } { \displaystyle { A _ { i } = \frac { 1 } { i } \sum _ { j = 1 } ^ { i } A _ { i , j } } } \\ { \displaystyle { F _ { i } = \frac { 1 } { i - 1 } \sum _ { j = 1 } ^ { i - 1 } \sum _ { j ^ { \prime } \in \{ 1 , \cdots , i - 1 \} } \big ( A _ { j ^ { \prime } , j } - A _ { i , j } \big ) } } \end{array}
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
Assume there are $T$ tasks in total, we report accuracy from last session as $A c c = A _ { T }$ following (Lopez-Paz & Ranzato, 2017; Wang et al., 2022b). There are also a large body of literature (Li &
|
| 425 |
+
|
| 426 |
+
Hoiem, 2018; Zhu et al., 2021; Douillard et al., 2022) report macro average over all sessions as $\begin{array} { r } { A c c = \frac { 1 } { T } \sum _ { i = 1 } ^ { T } A _ { i } } \end{array}$ . To ease future reference, we provide results under both protocols in Appendix I.
|
| 427 |
+
|
| 428 |
+
# I RESULTS UNDER DIFFERENT PROTOCOLS
|
| 429 |
+
|
| 430 |
+
Detailed results for CIFAR-100 under different splits. Here, we provide session-wise results for split CIFAR-100 under different splits. As shown in Fig. 5, our method exhibits a clear and consistent improvements over other methods and the gap is enlarged as the length of task sequence increases.
|
| 431 |
+
|
| 432 |
+
Results under different metrics. Here, we provide results under two commonly used measurements as described in Appendix H.
|
| 433 |
+
|
| 434 |
+
Table 7: Results for CPP under different metrics.
|
| 435 |
+
|
| 436 |
+
<table><tr><td rowspan="2">Task num</td><td rowspan="2">Dataset</td><td rowspan="2">Pre-train</td><td colspan="2">Accuracy</td><td colspan="2">Forgetting</td></tr><tr><td>Avg. (↑)</td><td>Last (↑)</td><td>Avg. (↓)</td><td>Last (↓)</td></tr><tr><td>5</td><td>split CIFAR-100</td><td>ViT</td><td>92.6</td><td>89.58</td><td>3.99</td><td>3.97</td></tr><tr><td>10</td><td>split CIFAR-100</td><td>ViT</td><td>93.06</td><td>89.43</td><td>3.11</td><td>3.61</td></tr><tr><td>20</td><td>split CIFAR-100</td><td>ViT</td><td>92.49</td><td>88.25</td><td>3.66</td><td>4.56</td></tr><tr><td>5</td><td>5-datasets</td><td>ViT</td><td>95.15</td><td>93.36</td><td>0.12</td><td>0.1</td></tr><tr><td>10</td><td>split ImageNet-Sub</td><td>MAE</td><td>95.01</td><td>93.90</td><td>0.84</td><td>1.89</td></tr></table>
|
| 437 |
+
|
| 438 |
+
# J EXTRA ABLATIONS
|
| 439 |
+
|
| 440 |
+
Ablation for MLP design. As MLP layer is crucial for training prompts, we are curious about relations between MLP width (number of hidden units), deepth (layer numbers) and prompt quality. As shown in Table 8, either monotonously increasing layers or hidden units do not necessarily bring benefits. And 3-layer with 2048 hidden units, which is the same as the conventional practice in self-supervised representation learning, produces best performance in our framework. So we adopt this setting as default for all our experiments.
|
| 441 |
+
|
| 442 |
+
Table 8: Results on split cifar-100 under different MLP layer numbers.
|
| 443 |
+
|
| 444 |
+
<table><tr><td>Layer num</td><td>Hidden units</td><td colspan="2">Split CIFAR-100 Avg. Acc (↑) Forget (↓)</td></tr><tr><td>1</td><td>2048</td><td>82.16</td><td>4.58</td></tr><tr><td>3</td><td>1024</td><td>89.27</td><td>4.13</td></tr><tr><td>3</td><td>2048</td><td>89.43</td><td>3.61</td></tr><tr><td>3</td><td>4096</td><td>89.16</td><td>4.09</td></tr><tr><td>5</td><td>2048</td><td>88.54</td><td>3.20</td></tr></table>
|
| 445 |
+
|
| 446 |
+
Generation of multi-centriod prototypes. In CPP, we leverage spectral clustering to generate multi-centroid prototypes. Herein, we also provide results for commonly used $\mathbf { k }$ -means clustering algorithm. As shown in Table 9, spectral clustering empirically demonstrates better performance and we thus take it as default.
|
| 447 |
+
|
| 448 |
+
Table 9: Different clustering algorithms for generating multi-centroid prototypes.
|
| 449 |
+
|
| 450 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">Split CIFAR-100</td></tr><tr><td>Avg. Acc (1)</td><td>Forget (↓)</td></tr><tr><td>K-means</td><td>89.02</td><td>4.18</td></tr><tr><td>Spectral Clustering</td><td>89.43</td><td>3.61</td></tr></table>
|
| 451 |
+
|
| 452 |
+

|
| 453 |
+
Figure 5: Comparison with state-of-the-art methods on CIFAR-100 under multiple splits.
|
| 454 |
+
|
| 455 |
+
Effectiveness of the query function. We assume that samples with similar semantics should tend to locate close to each other in latent space. It is convincing to see that, giving $r$ nearest neighbors, whether the true class falls in the candidates. In this case, top- $_ r$ accuracy in the coarse query process can be deemed as a rigid upper-bound for CPP. We here plot top- $\cdot r$ accuracy under the 5-centroid prototype environment in Fig. 6. We can see that top- $\mathbfit { \nabla } \mathcal { r }$ accuracy increases monotonically with $r$ and $r = 2 0$ works fairly well. Hence, query vector in combination with key prototypes and a reasonable hyper-parameter can be safely leveraged to retrieve candidate prompt groups.
|
| 456 |
+
|
| 457 |
+

|
| 458 |
+
Figure 6: Top-r accuracy of split CIFAR-100 under 5-centroid prototype.
|
| 459 |
+
|
| 460 |
+
# K DETAILED VISUALIZATIONS AND ANALYSIS
|
| 461 |
+
|
| 462 |
+
Fig. 7 displays training samples from CIFAR-100 in latent space under different configurations. Fig. 7a and Fig. 7b shows original data samples with their corresponding key prototypes and multicentroid key prototypes, respectively. As shown in figures, both single-centroid and multi-centroid key prototypes effectively characterize the distribution for each class. In Fig. 7c and Fig. 7d, when replacing key prototypes to value prototypes, there is a clear drift and mismatch between class distributions and their corresponding prototypes. Since value prototypes characterize the distribution of prompted samples in latent space, this observation manifests a clear distribution shift in latent space when adding prompts. And thus justify the necessity of decoupling prototypes into the key prototypes and value prototypes two sets. Fig. 7e and Fig. 7f shows value prototypes and embeddings of samples after adding prompts. Both single-centroid and multi-centroid value prototypes suits the learned distributions well according to visualizations, while multi-centroid value prototypes can better capture outliers and thus being more representative.
|
| 463 |
+
|
| 464 |
+
In Fig. 7, we have successfully shown the efficacy of key and value prototypes for representing training embeddings. So we test their performances on test dataset in Fig. 8, When leveraging key prototypes for coarse retrieval, it works fairly well according to Fig. 8a and Fig. 8b. Fig. 8c and Fig. 8d further validate the necessity of decoupling prototypes from test data view. There are some classes where key prototypes can still effectively characterize sample distribution after inserting prompts, suggesting less semantic overlap (easy to discriminate) and minor distribution shift. However, most classes fail to reuse key prototypes. When using value prototypes as classifiers for final prediction, Fig. 8e and Fig. 8f demonstrate a clear match which in turn results in high accuracy.
|
| 465 |
+
|
| 466 |
+

|
| 467 |
+
(a) Original train samples with key prototypes
|
| 468 |
+
|
| 469 |
+

|
| 470 |
+
(b) Original train samples with multi-centriod key prototypes
|
| 471 |
+
|
| 472 |
+

|
| 473 |
+
(c) Original train samples with value prototypes
|
| 474 |
+
|
| 475 |
+

|
| 476 |
+
(d) Original train samples with multi-centroid value prototypes
|
| 477 |
+
|
| 478 |
+

|
| 479 |
+
(f) Prompted train samples with multi-centriod value prototypes
|
| 480 |
+
|
| 481 |
+

|
| 482 |
+
Figure 7: Visualization for train data in CIFAR-100.
|
| 483 |
+
|
| 484 |
+
(e) Prompted train samples with value prototypes (e) Prompted test samples with multi-centroid value prototypes
|
| 485 |
+
|
| 486 |
+

|
| 487 |
+
(a) Original test samples with key prototypes
|
| 488 |
+
|
| 489 |
+

|
| 490 |
+
(b) Original test samples with multi-centriod key prototypes
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
(c) Prompted test samples with key prototypes
|
| 494 |
+
|
| 495 |
+

|
| 496 |
+
(d) Prompted test samples with multi-centroid key prototypes
|
| 497 |
+
|
| 498 |
+

|
| 499 |
+
Figure 8: Visualization for test data in CIFAR-100.
|
| 500 |
+
|
| 501 |
+

|
| 502 |
+
(f) Prompted test samples with value prototypes
|
parse/dev/BSww-NrOzJ/BSww-NrOzJ_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/BSww-NrOzJ/BSww-NrOzJ_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/BSww-NrOzJ/BSww-NrOzJ_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH.md
ADDED
|
@@ -0,0 +1,630 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A CLOSER LOOK AT SMOOTHNESS IN DOMAIN ADVERSARIAL TRAINING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Domain adversarial training has been ubiquitous for achieving invariant representations and is used widely for various domain adaptation tasks. In recent times, methods converging to smooth optima have shown improved generalization for supervised learning tasks like classification. In this work, we analyze the effect of smoothness enhancing formulations on domain adversarial training, the objective of which is a combination of task loss (eg. classification, regression etc.) and adversarial terms. In contrast to task loss, our analysis shows that converging to smooth minima w.r.t. adversarial loss leads to sub-optimal generalization on the target domain. Based on the analysis, we introduce the Smooth Domain Adversarial training (SDAT) procedure, which effectively enhances the performance of existing domain adversarial methods for both classification and object detection tasks. Our smoothness analysis also provides insight into the extensive usage of SGD over Adam in domain adversarial training.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Domain Adversarial Training (Ganin & Lempitsky, 2015) (DAT) refers to adversarial learning of neural network based feature representations that are invariant to the domain. For example, car images from the clipart domain have similar feature representations as car images from the web domain. DAT has been widely useful in diverse areas (cited 3540 times) such as fairness (Adel et al., 2019), object detection (Saito et al., 2019), domain generalization (Li et al., 2018), imageto-image translation (Liu et al., 2017) etc. The prime driver of research on DAT is its application in unsupervised Domain Adaptation (DA), which aims to learn a classifier using labeled source data and unlabeled target data, such that it generalizes well on target data. Various enhancements like superior objectives (Acuna et al., 2021; Zhang et al., 2019), architectures (Long et al., 2018) etc. have been proposed to improve its effectiveness. However, as DAT objective is combination of Generative Adversarial Network (GAN) (Goodfellow et al., 2014) and Empirical Risk Minimization (ERM) (Vapnik, 2013) objectives, there has not been much focus on explicitly analyzing the nature of optimization in DAT. One direction of work aiming to improve generalization of ERM on unseen data focuses on developing algorithms that converge to a smooth (or a flat) minima (Foret et al., 2021; Keskar & Socher, 2017). However, we find that these techniques, when directly applied for DAT, do not significantly improve the generalization on the target domain (Sec. 4 and 7).
|
| 12 |
+
|
| 13 |
+
In this work, we analyze the loss landscape near the optimal point obtained by DAT, to gain insights into curvature. We first focus on the eigen-spectrum of Hessian of the task loss (ERM term for classification) where we find that using Stochastic Gradient Descent (SGD) as optimizer converges to a smoother minima in comparison to Adam (Kingma & Ba, 2014). Further we find that smoother minima w.r.t.task loss leads to better generalization on the target domain. Contrary to task loss, we find that smoothness enhancing formulation for adversarial components worsen performance, rendering ERM-based techniques which enhance smoothness for all loss components ineffective. Hence we introduce Smooth Domain Adversarial Training (SDAT), which aims only to reach a smooth minima w.r.t. task loss, and helps in generalizing better on the target domain. SDAT requires an additional gradient computation step and can be combined with existing methods with a few lines of code. We show the soundness of the SDAT method theoretically by proving a generalization bound (Sec. 4) on target error. We extensively verify the empirical efficacy of SDAT across various datasets for classification (i.e., DomainNet, VisDA-2017 and Office-Home), along with showing a prototypical application in DA for object detection, demonstrating it’s diverse applicability. In summary, we make the following contributions:
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Overview of Smooth Domain Adversarial Training. Conventional approaches of smoothing loss do not discriminate between adversarial loss and task loss. Based on our theoretical analysis we propose SDAT which only focuses on smoothing task loss, leading to effective generalization on target domain.
|
| 17 |
+
|
| 18 |
+
• We analyze the optimization procedure of DAT, establishing the correlation between the smoothness near optima w.r.t. task loss and generalization on the target domain. • Contrary to ERM, we show through our theoretical and empirical analysis that smoothness enhancing adversarial formulation leads to sub-optimal performance. • For enhancing the smoothness w.r.t. task loss near optima in DAT, we propose a novel and theoretically motivated SDAT that improves the generalization on the target domain. SDAT effectively increases the average performance of even state-of-the-art adversarial adaptation methods.
|
| 19 |
+
|
| 20 |
+
# 2 RELATED WORK
|
| 21 |
+
|
| 22 |
+
Unsupervised Domain Adaptation: It refers to a class of methods that aim to adapt models to work in a target domain distinct from what it was trained on. One of the most prominent lines of work is based on DAT (Ganin & Lempitsky, 2015). This involves using an additional discriminator to distinguish between samples of source and target domain. The goal of the model is to learn features that can not be distinguished between source and target. The follow-up works have improved this basic idea by introducing a class information based discriminator (CDAN (Long et al., 2018)), introducing a transferable normalization function (Wang et al., 2019) etc. In this work, we focus on analyzing and improving such methods. Another line of work involves DA by using self-training on target domain (Kundu et al., 2020b;a; Prabhu et al., 2020) which will not be the focus of this work.
|
| 23 |
+
|
| 24 |
+
Smoothness of Loss Landscape: As neural networks operate in the regime of over parameterized models, low error on training data does not always lead to better generalization (Keskar et al., 2017). Often it has been stated (He et al., 2019; Dziugaite & Roy, 2017) that smoother minima does generalize better on unseen data. But until recently, this was practically expensive as smoothing required additional costly computations. Recently, a method called Sharpness Aware Minimization (SAM) (Foret et al., 2021) has been proposed to find a smoother minima with an additional gradient computation step. SAM also improves the ImageNet model performance (Chen et al., 2021) on ImageNet-C and ImageNet-R (which are out of distribution). It has also been observed that smoothness w.r.t. input (image) is beneficial for domain adaptation (Shu et al., 2018; Cai et al., 2021), which motivates us to explore smoothness w.r.t weights (W) in case of DAT. However, the earlier work has focused on achieving a smoother minima w.r.t. W for ERM. Currently, no study has been done if the loss function is composed of both ERM and adversarial objectives (as present in DAT).
|
| 25 |
+
|
| 26 |
+
# 3 BACKGROUND
|
| 27 |
+
|
| 28 |
+
# 3.1 PRELIMINARIES
|
| 29 |
+
|
| 30 |
+
We will primarily focus on Unsupervised DA where we have labeled source data $S = \{ ( x _ { i } ^ { s } , y _ { i } ^ { s } ) \}$ and unlabeled target data $T = \{ ( x _ { i } ^ { t } ) \bar \}$ . The source samples are assumed to be sampled i.i.d. from source distribution $P _ { S }$ defined on input space $\mathcal { X }$ , similarly target samples are sampled i.i.d. from $P _ { T }$ . $\mathcal { V }$ is used for denoting the label set which is $\{ 1 , 2 , \ldots , k \}$ in our case as we perform multiclass $( k )$ classification. We denote $y : \mathcal { X } \mathcal { Y }$ a mapping from images to labels. Our task is to find a hypothesis function $h _ { \theta }$ that has a low risk on the target distribution. The source risk (a.k.a expected error) of the hypothesis $h _ { \theta }$ is defined with respect to loss function $l$ as: $R _ { S } ^ { l } ( h _ { \theta } ) = \mathbb { E } _ { x \sim P _ { S } } [ \bar { l } ( h _ { \theta } ( x ) , y ( x ) ) ]$ . The target risk $R _ { T } ^ { l } ( h _ { \theta } )$ is defined analogously. The empirical versions of source and target risk will be denoted by $\hat { R } _ { S } ^ { l } ( h _ { \theta } )$ and $\hat { R } _ { T } ^ { l } ( h _ { \theta } )$ . All notations used in paper are summarized in Table F. In this work we build on the domain adaption theory of (Acuna et al., 2021) which is a generalization of Ben-David et al. (2010). We first define the discrepancy between the two domains.
|
| 31 |
+
|
| 32 |
+
Definition 3.1 $( D _ { h _ { \theta } , \mathcal { H } } ^ { \phi }$ discrepancy). The discrepancy between two domains $P _ { S }$ and $P _ { T }$ is defined
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
D _ { h _ { \theta } , \mathcal { H } } ^ { \phi } ( P _ { S } | | P _ { T } ) : = \operatorname* { s u p } _ { h ^ { \prime } \in \mathcal { H } } [ \mathbb { E } _ { x \sim P _ { S } } [ l ( h _ { \theta } ( x ) , h ^ { \prime } ( x ) ) ] ] - [ \mathbb { E } _ { x \sim P _ { T } } [ \phi ^ { * } ( l ( h _ { \theta } ( x ) , h ^ { \prime } ( x ) ) ) ] ]
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
Here $\phi ^ { * }$ is a frenchel conjugate of a lower semi-continuous convex function $\phi$ that satisfies $\phi ( 1 ) = 0$ , and $\mathcal { H }$ is the set of all possible hypothesis (i.e. Hypothesis Space).
|
| 39 |
+
|
| 40 |
+
This discrepancy distance $D _ { h _ { \theta } , \mathcal { H } } ^ { \phi }$ is based on variational formulation of f-divergence (Nguyen et al., 2010) for the convex function $\phi$ . The $D _ { h _ { \theta } , \mathcal { H } } ^ { \phi }$ is the lower bound estimate of the f-divergence function $D ^ { \phi } ( P _ { S } | | P _ { T } )$ . See Lemma 4 in (Acuna et al., 2021) for additional details. We state a bound on target risk $R _ { T } ^ { l } ( h _ { \theta } )$ based on $\mathcal { D } _ { h _ { \theta } , \mathcal { H } } ^ { \phi }$ discrepancy (Acuna et al., 2021):
|
| 41 |
+
|
| 42 |
+
Theorem 1 (Generalization bound). Suppose $l : \mathcal { V } \times \mathcal { Y } \to [ 0 , 1 ] \subset d o m \phi ^ { * } .$ . Let $h ^ { * }$ be the ideal joint classifier with least $\lambda ^ { * } = R _ { S } ^ { l } ( h ^ { * } ) + R _ { T } ^ { l } ( h ^ { * } )$ (i.e. joint risk) in $\mathcal { H }$ . We have the following relation between source and target risk:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq R _ { S } ^ { l } ( h _ { \theta } ) + D _ { h _ { \theta } , \mathcal { H } } ^ { \phi } ( P _ { S } | | P _ { T } ) + \lambda ^ { * }
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
The above generalization bound shows that the target risk $R _ { T } ^ { l } ( h _ { \theta } )$ is upper bounded by the source risk $R _ { S } ^ { l } ( h _ { \theta } )$ and the discrepancy term $D _ { h _ { \theta } , \mathcal { H } } ^ { \phi }$ along with an irreducible constant error $\lambda ^ { * }$ . Hence, this infers that reducing source risk and discrepancy lead a to reduction in target risk. Based on this, we concretely define the unsupervised adversarial adaptation procedure in the next section.
|
| 49 |
+
|
| 50 |
+
# 3.2 UNSUPERVISED DOMAIN ADAPTATION
|
| 51 |
+
|
| 52 |
+
In this section we first define the components of the framework we use for our purpose: $h _ { \theta } = f _ { \Theta } \circ g _ { \psi }$ where $g _ { \psi }$ is the feature extractor and $f _ { \Theta }$ is the classifier. The domain discriminator $\mathcal { D } _ { \Phi }$ , used for estimating the discrepancy between $P _ { S }$ and $P _ { T }$ is a classifier whose goal is to distinguish between the features of two domains. For minimizing the target risk (Th. 1), the optimization problem can be written as:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { x \sim P _ { S } } [ l ( h _ { \theta } ( x ) , y ( x ) ) ] + D _ { h _ { \theta } , \mathcal { H } } ^ { \phi } ( P _ { S } | | P _ { T } )
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
The discrepancy term under some assumptions (refer App. B) can be upper bounded by a tractable term:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
D _ { h _ { \theta } , \mathcal { H } } ^ { \phi } ( P _ { S } | | P _ { T } ) \leq \operatorname* { m a x } _ { \Phi } d _ { S , T } ^ { \Phi }
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $d _ { S , T } ^ { \Phi } = \mathbb { E } _ { x \sim P _ { S } } [ \log ( \mathcal { D } _ { \Phi } ( g _ { \psi } ( x ) ) ) ] + \mathbb { E } _ { x \sim P _ { T } } \log [ 1 - \mathcal { D } _ { \Phi } ( g _ { \psi } ( x ) ) ]$ . This leads to the final optimization objective of:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \Phi } \mathbb { E } _ { x \sim P _ { S } } [ l ( h _ { \theta } ( x ) , y ( x ) ) ] + d _ { S , T } ^ { \Phi }
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
The first term in practice is empirically approximated by using finite samples $\hat { R } _ { S } ^ { l } ( h _ { \theta } )$ and used as task loss (classification) for minimization. The empirical estimate of the second term is adversarial loss which is optimized using a gradient reversal layer (GRL) as it has a min-max form. (Overview in Fig. 1) The above procedure composes DAT, and we use CDAN (Long et al., 2018) as our default DAT method.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 2: Eigen Spectral Density plots of Hessian $( \nabla ^ { 2 } \hat { R } _ { S } ^ { l } ( h _ { \theta } ) )$ for Adam (left), SGD (middle) and SDAT (right) on Art Clipart. Each plot contains the maximum eigenvalue $( \lambda _ { m a x } )$ and the trace of the Hessian $( T r ( H ) )$ , which are indicators of the smoothness (Lower $T r ( H )$ and $\lambda _ { m a x }$ indicate the presence of smoother loss surface). Low range of eigenvalues $\mathbf { \dot { x } }$ -axis), ${ \dot { T r } } ( H )$ and $\lambda _ { m a x }$ for SGD indicates that it reaches a smoother minima compared to Adam. SDAT reaches a smoother minima compared to DAT with either SGD and Adam.
|
| 74 |
+
|
| 75 |
+
# 4 ANALYSIS OF SMOOTHNESS
|
| 76 |
+
|
| 77 |
+
In this section, we analyze the curvature properties of the loss with respect to the parameters. Specifically, we focus on analyzing the Hessian of empirical source risk $H = \nabla _ { \theta } ^ { 2 } \hat { R } _ { S } ^ { l } ( h _ { \theta } )$ which is the Hessian of classification (task) loss term. For quantifying the smoothness, we measure the trace $T r ( H )$ and maximum eigenvalue of Hessian $( \lambda _ { m a x } )$ as a proxy for quantifying smoothness. This is motivated by analysis of which states that the high value of $\lambda _ { m a x }$ and $T r ( H )$ are indicative of low smoothness (Jastrzebski et al., 2020). We articulate our conjecture informally below:
|
| 78 |
+
|
| 79 |
+
Conjecture 1. Smoothing of empirical source risk (i.e. task loss) $\hat { R } _ { S } ^ { l } ( h _ { \theta } )$ leads to efficient DAT. In other words, decreasing $\lambda _ { m a x }$ of $\nabla _ { { \theta } } ^ { 2 } \hat { R } _ { S } ^ { l } ( h _ { \theta } )$ leads to reduced error on target domain $\hat { R } _ { T } ^ { l } ( h _ { \theta } )$ .
|
| 80 |
+
|
| 81 |
+
For verifying our conjecture, we analyze the eigen spectrum of the Hessian $\hat { R } _ { T } ^ { l } ( h _ { \theta } )$ where we find that in contrast to standard ERM (Ghorbani et al., 2019) the negative eigenvalues do not disappear as the training progresses. We show the $\lambda _ { m a x }$ , $T r ( H )$ and eigen spectrum for different algorithms, namely DAT w/ Adam, DAT w/ SGD and our proposed SDAT (which is described in detail in later sections) in Fig. 2. We find that high smoothness leads to better generalization on the target domain. We also provide additional results in Fig. 3 for empirical verification of the conjecture. Our conjecture also explains the reason for widespread usage of SGD for DAT as SGD converges to smoother minima (Ganin & Lempitsky, 2015; Long et al., 2018; Saito et al., 2018a) which leads to efficient DAT, even though Adam has shown to be effective for min-max optimization (Gemp & McWilliams, 2019). More details regarding the Hessian analysis are provided in App. D.
|
| 82 |
+
|
| 83 |
+
# 4.1 SMOOTHING LOSS LANDSCAPE
|
| 84 |
+
|
| 85 |
+
In this section we first introduce the losses which are based on Sharpness Aware Minimization (Foret et al., 2021) (SAM). The basic idea of SAM is to find a smoother minima (i.e. low loss in $\epsilon$ neighborhood of $\theta$ ) by using the following objective given formally below:
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } L _ { o b j } ( \theta + \epsilon )
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Here $L _ { o b j }$ is any objective function to be minimized and $\rho \geq 0$ is a hyperparameter which defines the maximum norm of the $\epsilon$ . Since finding the exact solution of inner maximization is hard, SAM maximizes the first order approximation:
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\boldsymbol { \hat { \epsilon } } ( \theta ) \approx \underset { | | \boldsymbol { \epsilon } | | \leq \rho } { \arg \operatorname* { m a x } } \ L _ { o b j } ( \theta ) + \boldsymbol { \epsilon } ^ { T } \nabla _ { \theta } L _ { o b j } ( \theta ) = \rho \nabla _ { \theta } L _ { o b j } ( \theta ) / | | \nabla _ { \theta } L _ { o b j } ( \theta ) | | _ { 2 }
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
The $\hat { \epsilon } ( \theta )$ is added to the weights $\theta$ . The gradient update for $\theta$ is then computed as $\nabla _ { \theta } L _ { o b j } ( \theta ) | _ { \theta + \hat { \epsilon } ( \theta ) }$ . The above procedure can be seen as a generic smoothness enhancing formulation for any $L _ { o b j }$ . We now analogously introduce the sharpness aware source risk for finding a smooth minima:
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\operatorname* { m a x } _ { | | \epsilon | | \leq \rho } R _ { S } ^ { l } ( h _ { \theta + \epsilon } ) = \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } \mathbb { E } _ { x \sim P _ { S } } [ l ( h _ { \theta + \epsilon } ( x ) , f ( x ) ) ]
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 3: A) Error on Target Domain (y-axis) for Office-Home dataset against maximum eigenvalue $\lambda _ { m a x }$ of classification loss in DAT. When compared to SGD, Adam converges to a non-smooth minima (high $\lambda _ { m a x , \ - }$ ), leading to a high error on target. B) Domain Accuracy (vs iterations) is lower when discriminator is smooth (i.e. SDAT w/ adv), which indicates suboptimal discrepancy estimation $d _ { s _ { , t } } ^ { \Phi }$ C) SNGAN performance on different datasets, smoothing discriminator in GAN also leads to inferior GAN performance (higher FID) across both datasets.
|
| 105 |
+
|
| 106 |
+
We also now define the sharpness aware discrepancy estimation objective below:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname* { m a x } _ { \Phi } \operatorname* { m i n } _ { | | \epsilon | | \leq \rho } d _ { S , T } ^ { \Phi + \epsilon }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
As $d _ { S , T } ^ { \Phi }$ is to be maximized the sharpness aware objective will have min instead of max , as it $| | \epsilon | | \le \rho$ $| | \epsilon | | \le \rho$ needs to find smoother maxima. We now theoretically analyse the difference in discrepancy estimation for smooth version $d _ { S , T } ^ { \Phi ^ { \prime \prime } }$ (Eq. 9) in comparison to non-smooth version $d _ { S , T } ^ { \Phi ^ { \prime } }$ (Eq. 4). Assuming $\mathcal { D } _ { \Phi }$ is a $L$ -smooth (common assumption for non-convex optimization (Carmon et al., 2020)), $\eta$ is a small constant and $d _ { S , T } ^ { * }$ the optimal discrepancy, the theorem states:
|
| 113 |
+
|
| 114 |
+
Theorem 2. For a given classifier $h _ { \theta }$ and one step of (steepest) gradient ascent i.e. $\Phi ^ { \prime } = \Phi + $ $\eta ( \nabla d _ { S , T } ^ { \Phi } / | | \nabla d _ { S , T } ^ { \Phi } | | )$ and $\Phi ^ { \prime \prime } = \Phi + \eta ( \nabla d _ { S , T } ^ { \Phi } | _ { \Phi + \hat { \epsilon } ( \Phi ) } / | | \nabla d _ { S , T } ^ { \Phi ^ { - } } | _ { \Phi + \hat { \epsilon } ( \Phi ) } | | )$
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
d _ { S , T } ^ { \Phi ^ { \prime } } - d _ { S , T } ^ { \Phi ^ { \prime \prime } } \leq \eta ( 1 - \cos \alpha ) \sqrt { 2 L ( d _ { S , T } ^ { \ast } - d _ { S , T } ^ { \Phi } ) }
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\alpha$ is the angle between $\nabla d _ { S , T } ^ { \Phi }$ and $\nabla d _ { S , T } ^ { \Phi } \big | _ { \Phi + \hat { \epsilon } ( \Phi ) }$
|
| 121 |
+
|
| 122 |
+
The $d _ { S , T } ^ { \Phi ^ { \prime } }$ (non-smooth version) can exceed $d _ { S , T } ^ { \Phi ^ { \prime \prime } }$ (smooth discrepancy) significantly, as the term $d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi } \neq 0$ , as the $h _ { \theta }$ objective is to oppose the convergence of $d _ { S , T } ^ { \Phi }$ to optima $d _ { S , T } ^ { * }$ (min-max S,T S,T training in Eq. 11). Thus $d _ { S , T } ^ { \Phi ^ { \prime } }$ S,T S,T can be a better estimate of discrepancy in comparison to $d _ { S , T } ^ { \Phi ^ { \prime \prime } }$ . A better estimate of $d _ { s , t } ^ { \Phi }$ helps in effectively reducing the discrepancy between $P _ { S }$ and $P _ { T }$ , hence leads to reduced $R _ { T } ^ { l } ( h _ { \theta } )$ . This is also observed in practice that smoothing the discriminator (SDAT w/ adv in Fig. 3) leads to low domain classification accuracy (proxy measure for $d _ { s , t } ^ { \Phi } )$ in comparison to DAT. Due to ineffective discrepancy estimation, SDAT w/ adv results in sub-optimal generalization on target domain i.e. high target error $R _ { T } ^ { l } ( h _ { \theta } )$ (Fig. 3). For further establishing the generality of sub-optimality of smooth adversarial loss, we also perform experiments on Spectral Normalised Generative Adversarial Networks (SNGAN) (Miyato et al., 2018). In case of SNGAN we also find that smoothing discriminator through SAM leads to suboptimal performance (higher FID) as in Fig. 3. The above evidences indicates that smoothing the adversarial loss leads to sub-optimality, hence it should not be done in practice. The proof of the above theorem and additional experimental details are provided in the supplementary (refer App. C and App. E).
|
| 123 |
+
|
| 124 |
+
# 4.2 SMOOTH DOMAIN ADVERSARIAL TRAINING (SDAT)
|
| 125 |
+
|
| 126 |
+
We propose smooth domain adversarial training which only focuses on converging to smooth minima w.r.t. task loss (i.e. empirical source risk), whereas does no change for the discrepancy term. We define the optimization objective of our smooth domain adversarial training below:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\displaystyle \operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \Phi } \operatorname* { m a x } _ { | | \epsilon | | \le \rho } \mathbb { E } _ { x \sim P _ { S } } [ l ( h _ { \theta + \epsilon } ( x ) , y ( x ) ) ] + d _ { S , T } ^ { \Phi }
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
The first term is the sharpness aware risk, and the second term is the discrepancy term which is not smooth in our procedure. The term $d _ { S , T } ^ { \Phi }$ estimates $D _ { h _ { \theta } , H } ^ { \phi } ( P _ { S } | | P _ { T } )$ discrepancy. We empirically find that this optimization procedure effectively reduces the generalization error on the target domain compared to all other alternatives. We now show that optimizing Eq. 11 reduces $R _ { T } ^ { l } ( h _ { \theta } )$ through a generalization bound. This bound establishes that our procedure is also consistent (i.e. in case of infinite data the upper bound is tight), similar to the DAT (Ganin et al., 2016) baseline.
|
| 133 |
+
|
| 134 |
+
Theorem 3. Suppose $l$ is the loss function, we denote $\lambda ^ { * } : = R _ { S } ^ { l } ( h ^ { * } ) + R _ { T } ^ { l } ( h ^ { * } )$ and let $h ^ { * }$ be the ideal joint hypothesis:
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } \hat { R } _ { S } ^ { l } ( h _ { \theta + \epsilon } ) + D _ { h _ { \theta } , H } ^ { \phi } ( P _ { S } | | P _ { T } ) + \gamma ( | | \theta | | _ { 2 } ^ { 2 } / \rho ^ { 2 } ) + \lambda ^ { * } .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
where $\gamma : \mathbb { R } ^ { + } \mathbb { R } ^ { + }$ is a strictly increasing function.
|
| 141 |
+
|
| 142 |
+
The bound is similar to generalization bounds for domain adaptation (Ben-David et al., 2010; Acuna et al., 2021). The main difference is the sharpness aware risk term $\mathrm { m a x } _ { | | \epsilon | | \leq \rho } \hat { R } _ { S } ^ { l } ( h _ { \theta } )$ in place of source risk $R _ { S } ^ { l } ( h _ { \theta } )$ , and an additional term that depends on the norm of the weights $\gamma ( | | \theta | | _ { 2 } ^ { 2 } / \rho ^ { 2 } )$ . The first is minimized by decreasing the empirical sharpness aware source risk by using SAM loss shown in Sec. 4. The second term is reduced by decreasing the discrepancy between source and target domains. The third term, as it is a function of norm of weights $| | \theta | | _ { 2 } ^ { 2 }$ , can be reduced by using either L2 regularization or weight decay. Since we assume that the $\mathcal { H }$ hypothesis class we have is rich, the $\lambda ^ { * }$ term is small. We now show the improvements due to SDAT empirically in the following sections.
|
| 143 |
+
|
| 144 |
+
# 5 ADAPTATION FOR CLASSIFICATION
|
| 145 |
+
|
| 146 |
+
We evaluate our proposed method on three datasets: Office-Home, VisDA-2017, and DomainNet, as well as by combining SDAT with two DAT based DA techniques: CDAN and CDAN $^ +$ MCC.
|
| 147 |
+
|
| 148 |
+
# 5.1 DATASETS
|
| 149 |
+
|
| 150 |
+
Office-Home (Venkateswara et al., 2017): Office-Home consists of around 15,500 images from 65 classes and four distinct domains: Art (Ar), Clipart (Cl), Product $( \mathrm { P r } )$ and Real World (Rw).
|
| 151 |
+
|
| 152 |
+
VisDA-2017 (Peng et al., 2017): VisDA is a dataset that focuses on the transition from simulation to real world and contains approximately 280K images across 12 classes.
|
| 153 |
+
|
| 154 |
+
DomainNet (Peng et al., 2019): DomainNet consists of 0.6 million images across 345 classes belonging to six domains. The domains are infograph (inf), clipart (clp), painting (pnt), sketch (skt), real and quickdraw.
|
| 155 |
+
|
| 156 |
+
# 5.2 DOMAIN ADAPTATION METHODS
|
| 157 |
+
|
| 158 |
+
CDAN (Long et al., 2018): Conditional Domain Adversarial network is a popular DA algorithm that improves the performance of the DANN algorithm. CDAN introduces the idea of multi-linear conditioning to align the source and target distributions better. CDAN\* in Table 1 and 4 refers to our implementation of CDAN method.
|
| 159 |
+
|
| 160 |
+
$\mathbf { C D A N + M C C }$ (Jin et al., 2020): In this method, the minimum class confusion loss term is added as a regularizer to CDAN. Minimum class confusion is a non-adversarial term that minimizes the pairwise class confusion on the target domain. This achieves state of the art accuracy among adversarial adaptation methods.
|
| 161 |
+
|
| 162 |
+
# 5.3 IMPLEMENTATION DETAILS
|
| 163 |
+
|
| 164 |
+
We implement our proposed method in the Transfer-Learning-Library (Junguang Jiang & Long, 2020) toolkit developed in PyTorch (Paszke et al., 2019). The main difference between the performance reported in the CDAN and our implementation (CDAN\*) is the batch normalization layer in the domain classifier, which enhances performance.
|
| 165 |
+
|
| 166 |
+
Table 1: Accuracy $( \% )$ on Office-Home for unsupervised domain adaptation (ResNet-50). CDAN+MCC w/ SDAT outperforms other sophisticated state-of-the-art DA techniques. CDAN w/ SDAT improves over performance of CDAN by $1 . 1 \%$ .
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Method</td><td>Ar+Cl</td><td>Ar+Pr</td><td>Ar→Rw</td><td>ClAr</td><td>Cl+Pr</td><td>Cl+Rw</td><td>Pr>Ar</td><td>Pr+Cl</td><td>Pr+Rw</td><td>Rw→Ar</td><td>Rw+Cl</td><td>Rw→Pr</td><td>Avg</td></tr><tr><td>ResNet-50 (He et al.,2016)</td><td>34.9</td><td>50.0</td><td>58.0</td><td>37.4</td><td>41.9</td><td>46.2</td><td>38.5</td><td>31.2</td><td>60.4</td><td>53.9</td><td>41.2</td><td>59.9</td><td>46.1</td></tr><tr><td>DAN (Long et al., 2015)</td><td>43.6</td><td>57.0</td><td>67.9</td><td>45.8</td><td>56.5</td><td>60.4</td><td>44.0</td><td>43.6</td><td>67.7</td><td>63.1</td><td>51.5</td><td>74.3</td><td>56.3</td></tr><tr><td>DANN (Ganin et al., 2016)</td><td>45.6</td><td>59.3</td><td>70.1</td><td>47.0</td><td>58.5</td><td>60.9</td><td>46.1</td><td>43.7</td><td>68.5</td><td>63.2</td><td>51.8</td><td>76.8</td><td>57.6</td></tr><tr><td>JAN (Long et al., 2017)</td><td>45.9</td><td>61.2</td><td>68.9</td><td>50.4</td><td>59.7</td><td>61.0</td><td>45.8</td><td>43.4</td><td>70.3</td><td>63.9</td><td>52.4</td><td>76.8</td><td>58.3</td></tr><tr><td>CDAN (Long et al.,2018)</td><td>49.0</td><td>69.3</td><td>74.5</td><td>54.4</td><td>66.0</td><td>68.4</td><td>55.6</td><td>48.3</td><td>75.9</td><td>68.4</td><td>55.4</td><td>80.5</td><td>63.8</td></tr><tr><td>MDD (Zhang et al., 2019) f-DAL-pearson + alignment</td><td>54.9</td><td>73.7</td><td>77.8</td><td>60.0</td><td>71.4</td><td>71.8</td><td>61.2</td><td>53.6</td><td>78.1</td><td>72.5</td><td>60.2</td><td>82.3</td><td>68.1</td></tr><tr><td>(Acuna et al.,2021)</td><td>56.7</td><td>77.0</td><td>81.1</td><td>63.1</td><td>72.2</td><td>75.9</td><td>64.5</td><td>54.4</td><td>81.0</td><td>72.3</td><td>58.4</td><td>83.7</td><td>70.0</td></tr><tr><td>SRDC (Tang et al., 2020)</td><td>52.3</td><td>76.3</td><td>81.0</td><td>69.5</td><td>76.2</td><td>78.0</td><td>68.7</td><td>53.8</td><td>81.7</td><td>76.3</td><td>57.1</td><td>85.0</td><td>71.3</td></tr><tr><td>CDAN*2</td><td>54.3</td><td>70.6</td><td>76.8</td><td>61.3</td><td>69.5</td><td>71.3</td><td>61.7</td><td>55.3</td><td>80.5</td><td>74.8</td><td>60.1</td><td>84.2</td><td>68.4</td></tr><tr><td>CDAN w/SDAT</td><td>56.0</td><td>72.2</td><td>78.6</td><td>62.5</td><td>73.2</td><td>71.8</td><td>62.1</td><td>55.9</td><td>80.3</td><td>75.0</td><td>61.4</td><td>84.5</td><td>69.5</td></tr><tr><td>CDAN + MCC (Jin et al.,2020)</td><td>570</td><td>76.0</td><td>81.6</td><td>64.9</td><td>75.9</td><td>75.4</td><td>63.7</td><td>56.1</td><td>81.2</td><td>74.2</td><td>63.9</td><td>85.4</td><td>71.3</td></tr><tr><td>CDAN + MCC w/ SDAT</td><td>58.2</td><td>77.1</td><td>82.2</td><td>66.3</td><td>77.6</td><td>76.8</td><td>63.3</td><td>57.0</td><td>82.2</td><td>74.9</td><td>64.7</td><td>86.0</td><td>72.2</td></tr></table>
|
| 169 |
+
|
| 170 |
+
We use a ResNet-50 backbone for Office-Home experiments and a ResNet-101 backbone for VisDA2017 and DomainNet experiments. The backbone is initialized with ImageNet weights. We use a learning rate of 0.01 with batch size 32 in all of our experiments. We tune $\rho$ value in SDAT for a particular dataset and use the same value across domains. The $\rho$ value is set to 0.02 for the Office-Home experiments, 0.005 for the VisDA-2017 experiments and 0.05 for the DomainNet experiments. More details are present in supplementary (refer App. F).
|
| 171 |
+
|
| 172 |
+
# 5.4 RESULTS
|
| 173 |
+
|
| 174 |
+
Table 2 shows the results on the large and challenging DomainNet dataset across five domains as done in (Junguang Jiang & Long, 2020). The proposed method improves the performance of CDAN significantly across all source-target pairs. On specific source-target pairs like infograph real, the performance increase is $4 . 5 \%$ . The overall performance of CDAN is improved by nearly $1 . 8 \%$ which is significant considering the large number of classes and images present in DomainNet.
|
| 175 |
+
|
| 176 |
+
For the Office-Home dataset, we compare our methods with other domain adaptation algorithms including DANN, SRDC, MDD and fDAL. The results for the Office-Home dataset are shown in Table 1. We can see that adding
|
| 177 |
+
|
| 178 |
+
Table 2: Results on DomainNet with CDAN w/ SDAT. The number in the parenthesis refers to the increase in accuracy with respect to CDAN.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Target (→) Source (↓)</td><td>clp</td><td>inf</td><td>pnt</td><td>real</td><td>skt</td><td>Avg</td></tr><tr><td>clp</td><td>-</td><td>22.0 (+1.4)</td><td>41.5 (+2.6)</td><td>57.5 (+1.5)</td><td>47.2 (+2.3)</td><td>42.1 (+2.0)</td></tr><tr><td>inf</td><td>33.9 (+2.3)</td><td>-</td><td>30.3 (+1.0)</td><td>48.1 (+4.5)</td><td>27.9 (1.5)</td><td>35.0 (+2.3)</td></tr><tr><td>pnt</td><td>47.5 (+3.4)</td><td>20.7 (+0.9)</td><td>-</td><td>58.0 (+0.8)</td><td>41.8 (+1.8)</td><td>42.0 (+1.7)</td></tr><tr><td>real</td><td>56.7 (+0.9)</td><td>25.1 (+0.7)</td><td>53.6 (+0.4)</td><td>-</td><td>43.9 (+1.6)</td><td>44.8 (+1.0)</td></tr><tr><td>skt</td><td>58.7 (+2.7)</td><td>21.8 (+1.1)</td><td>48.1 (+2.8)</td><td>57.1 (+2.2)</td><td>-</td><td>46.4 (+2.2)</td></tr><tr><td>Avg</td><td>49.2 (+2.3)</td><td>22.4 (+1.0)</td><td>43.4 (+1.7)</td><td>55.2 (+2.2)</td><td>40.2 (+1.8)</td><td>42.1 (+1.8)</td></tr></table>
|
| 181 |
+
|
| 182 |
+
SDAT improves the performance on both CDAN and $\mathrm { C D A N + M C C }$ across all the transfer tasks. CDAN+MCC w/ SDAT achieves state-of-the-art adversarial adaptation performance on the OfficeHome dataset.
|
| 183 |
+
|
| 184 |
+
The class-wise accuracy on VisDA-2017 are reported in Table 4. CDAN w/ SDAT improves the overall performance of CDAN by more than $1 . 5 \%$ . CDAN w/ SDAT improves the performance of underperforming minority classes like bicycle and car. Additional baselines and results are reported in supplementary (refer App. G) along with a discussion on statistical significance (App. J) .
|
| 185 |
+
|
| 186 |
+
# 6 ADAPTATION FOR OBJECT DETECTION
|
| 187 |
+
|
| 188 |
+
To further validate our approach’s generality and extensibility, we did experiments on DA for object detection. We use the same setting as proposed in DA-Faster (Chen et al., 2018) with all domain adaptation components and use it as our baseline. We use the mean Average Precision at $0 . 5 \ \mathrm { I o U }$ (mAP) as our evaluation metric. In object detection, the smoothness enhancement can be achieved in two ways (empirical comparison in Sec. 6.2) :
|
| 189 |
+
|
| 190 |
+
a) DA-Faster w/ SDAT-Classification: Smoothness enhancement for classification loss. b) DA-Faster w/ SDAT: Smoothness enhancment for the combined classification and regression loss.
|
| 191 |
+
|
| 192 |
+
Table 4: Accuracy $( \% )$ on VisDA-2017 for unsupervised domain adaptation (ResNet-101). The mean column contains mean across all classes. SDAT particularly improves the accuracy in classes that have comparatively low CDAN performance.
|
| 193 |
+
|
| 194 |
+
<table><tr><td>Method</td><td>plane</td><td>bcybl</td><td>bus</td><td>car</td><td>horse</td><td>knife</td><td>mcyle</td><td>persn</td><td>plant sktb</td><td></td><td>train</td><td>truck</td><td>mean</td></tr><tr><td>ResNet (He et al.,2016)</td><td>55.1</td><td>53.3</td><td>61.9</td><td>59.1</td><td>80.6</td><td>17.9</td><td>79.7</td><td>31.2</td><td>81.0</td><td>26.5</td><td>73.5</td><td>8.5</td><td>52.4</td></tr><tr><td>DANN (Ganin et al., 2016)</td><td>81.9</td><td>77.7</td><td>82.8</td><td>44.3</td><td>81.2</td><td>29.5</td><td>65.1</td><td>28.6</td><td>51.9</td><td>54.6</td><td>82.8</td><td>7.8</td><td>57.4</td></tr><tr><td>DAN (Long et al., 2015)</td><td>87.1</td><td>63.0</td><td>76.5</td><td>42.0</td><td>90.3</td><td>42.9</td><td>85.9</td><td>53.1</td><td>49.7</td><td>36.3</td><td>85.8</td><td>20.7</td><td>61.1</td></tr><tr><td>MCD (Saito et al., 2018b)</td><td>87.0</td><td>60.9</td><td>83.7</td><td>64.0</td><td>88.9</td><td>79.6</td><td>84.7</td><td>76.9</td><td>88.6</td><td>40.3</td><td>83.0</td><td>25.8</td><td>71.9</td></tr><tr><td>CDAN (Long et al., 2018)</td><td>85.2</td><td>66.9</td><td>83.0</td><td>50.8</td><td>84.2</td><td>74.9</td><td>88.1</td><td>74.5</td><td>83.4</td><td>76.0</td><td>81.9</td><td>38.0</td><td>73.9</td></tr><tr><td>AFN (Xu et al., 2019)</td><td>93.6</td><td>61.3</td><td>84.1</td><td>70.6</td><td>94.1</td><td>79.0</td><td>91.8</td><td>79.6</td><td>89.9</td><td>55.6</td><td>89.0</td><td>24.4</td><td>76.1</td></tr><tr><td>MCC (Jin et al.,2020)</td><td>88.1</td><td>80.3</td><td>80.5</td><td>71.5</td><td>90.1</td><td>93.2</td><td>85.0</td><td>71.6</td><td>89.4</td><td>73.8</td><td>85.0</td><td>36.9</td><td>78.8</td></tr><tr><td>CDAN*2</td><td>94.9</td><td>72.0</td><td></td><td>83.0 57.3</td><td>91.6</td><td>95.2</td><td>91.6</td><td>79.5</td><td>85.8</td><td>88.8</td><td>87.0</td><td>40.5</td><td>80.6</td></tr><tr><td>CDAN w/ SDAT</td><td>94.8</td><td>77.1</td><td>82.8</td><td>60.9</td><td>92.3</td><td>95.2</td><td>91.7</td><td>79.9</td><td>89.9</td><td>91.2</td><td>88.5</td><td>41.2</td><td>82.1</td></tr><tr><td>CDAN+MCC (Jin et al., 2020)</td><td>95.0</td><td>84.2</td><td>75.0</td><td>66.9</td><td>94.4</td><td>97.1</td><td>90.5</td><td>79.8</td><td>89.4</td><td>89.5</td><td>86.9</td><td>54.4</td><td>83.6</td></tr><tr><td>CDAN+MCC w/ SDAT</td><td>95.8</td><td>85.5</td><td></td><td></td><td>76.9 69.0 93.5</td><td>97.4</td><td>88.5</td><td>78.2</td><td>93.1</td><td>91.6 86.3</td><td></td><td> 55.3</td><td> 84.3</td></tr></table>
|
| 195 |
+
|
| 196 |
+
# 6.1 EXPERIMENTAL SETUP
|
| 197 |
+
|
| 198 |
+
We evaluate our proposed approach on object detection on two different domain shifts:
|
| 199 |
+
|
| 200 |
+
Pascal to Clipart $P C$ ): Pascal (Everingham et al., 2010) is a real-world image dataset which consists images with 20 different object categories. Clipart (Inoue et al., 2018) is a graphical image dataset with complex backgrounds and has the same 20 categories as Pascal. We use Resnet-101 (He et al., 2016) backbone for Faster R-CNN (Ren et al., 2015) following Saito et al. (2019).
|
| 201 |
+
|
| 202 |
+
Cityscapes to Foggy Cityscapes $( C \to F c )$ ): Cityscapes (Cordts et al., 2016) is a street scene dataset for driving, whose images are collected in clear weather. Foggy Cityscapes (Sakaridis et al., 2018) dataset is synthesized from Cityscapes for the foggy weather. We use Resnet-50 (He et al., 2016) as the backbone for Faster R-CNN for experiments on this task. Both domains have the same 8 object categories with instance labels.
|
| 203 |
+
|
| 204 |
+
The training is done via SGD with momentum 0.9 for $7 0 \mathrm { k }$ iterations with the learning rate of $1 0 ^ { - 3 }$ , and then dropped to $1 0 ^ { - 4 }$ after $5 0 \mathrm { k }$ iterations. We split the target data into train and validation sets and report the best mAP on validation data. Additional experimental and implementation details are present in supplementary (refer App. F).
|
| 205 |
+
|
| 206 |
+
# 6.2 RESULTS
|
| 207 |
+
|
| 208 |
+
Table 3 shows the results on two domain shifts with varying batch size $( b s )$ during training. We find that only smoothing w.r.t. classification loss is much more effective (SDAT-Classification) than smoothing w.r.t. combined classification and regression loss (SDAT). On average, SDATClassification produces an mAP gain of $2 . 0 \%$ compared to SDAT, and $2 . 8 \%$ compared to DA-Faster baseline.
|
| 209 |
+
|
| 210 |
+
The proposed SDAT-Classification significantly outperforms DA-Faster baseline and improves mAP by $1 . 3 \%$ on $P C$ and by $2 . 8 \%$ on $C F c$ . It is noteworthy that increase in performance of SDAT-Classification is consis
|
| 211 |
+
|
| 212 |
+
Table 3: Results on DA for object detection.
|
| 213 |
+
|
| 214 |
+
<table><tr><td>Method</td><td>C→Fc (bs=2)</td><td>P→C (bs=2)</td><td>P→C (bs=8)</td></tr><tr><td>DA-Faster (Chen et al.,2018)</td><td>35.21</td><td>29.96</td><td>26.40</td></tr><tr><td>DA-Faster w/SDAT</td><td>37.47</td><td>29.04</td><td>27.64</td></tr><tr><td>DA-Faster w/SDAT-Classification</td><td>38.00</td><td>31.23</td><td>30.74</td></tr></table>
|
| 215 |
+
|
| 216 |
+
tent even after training with higher batch size ( $\ b s = 8$ ) achieving improvement of $4 . 3 \%$ in mAP.
|
| 217 |
+
|
| 218 |
+
Table 3 also shows that even DA-Faster w/ SDAT (i.e. smoothing both classification and regression) outperforms DA-Faster by $0 . 9 \%$ on average across all experiments. The improvement due to SDAT on adaptation for object detection shows the generality of SDAT across techniques that have some form of adversarial component present in the loss formulation.
|
| 219 |
+
|
| 220 |
+
# 7 DISCUSSION
|
| 221 |
+
|
| 222 |
+
How much smoothing is optimal?: Figure 4 (A) shows the ablation on $\rho$ value (higher $\rho$ value corresponds to more smoothing) on the $\mathbf { A r } { \cdot } \mathbf { C l }$ and $\mathrm { C l } { \scriptstyle } \mathrm { P r }$ from Office-Home dataset with CDAN backbone. The performance of the different values of $\rho$ is higher than the baseline with $\rho = 0$ . It can be seen that $\rho = 0 . 0 2$ works best among all the different values and outperforms the baseline by at least $1 . 5 \%$ . We found that the same $\rho$ value usually worked well across domains in a dataset, but different $\rho$ was optimal for different datasets.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 4: Analysis of SDAT for $\mathrm { A r } \mathrm { C l }$ split of Office-Home dataset. A) Variation of target accuracy with maximum perturbation $\rho$ . B) Comparison of accuracy of SDAT with DAT for different ratio of label noise. C) Comparison of accuracy when smoothing is applied to various loss components.
|
| 226 |
+
|
| 227 |
+
Which components benefit from smooth optima?: Figure 4 (C) shows the effect of introducing smoothness enhancement for different components in DAT. For this we use SAM on a) classifier (SDAT) b) discriminator (SDAT w/ adv) c) both classifier and discriminator (SDAT-all). It can be seen that smoothing the adversarial component (SDAT w/ adv) reduces the performance to $5 1 . 0 \%$ , which is significantly lower than even the DAT baseline.
|
| 228 |
+
|
| 229 |
+
Is it Robust to Label Noise?: In practical, real-world scenarios, the labeled datasets are often corrupted with some amount of label noise. Due to this, performing domain adaptation with such data is challenging. We find that smoother minima through SDAT lead to robust models which generalize well on the target domain. Figure 4 (B) provides the comparison of SGD vs. SDAT for different percentages of label noise injected into training data (by flipping the labels).
|
| 230 |
+
|
| 231 |
+
Is it better than other smoothing techniques? To answer this question, we compare SDAT with different smoothing techniques originally proposed for ERM. We specifically compare our method against DAT, Label Smoothing (LS) (Szegedy et al., 2016), and VAT (Miyato et al., 2019). Stutz et al. (2021) recently showed that these techniques produce a significantly smooth loss landscape in comparison to SGD. We also compare with a very recent
|
| 232 |
+
|
| 233 |
+
Table 5: Performance comparison across different loss smoothing techniques on Office-Home. SDAT outperforms other smoothing techniques in each case consistently.
|
| 234 |
+
|
| 235 |
+
<table><tr><td>Method</td><td>Ar>C1</td><td>Cl→Pr</td><td>Rw>Cl</td><td>Pr→Cl</td><td>Avg</td></tr><tr><td>DAT</td><td>54.3</td><td>69.5</td><td>60.1</td><td>55.3</td><td>59.2</td></tr><tr><td>VAT</td><td>54.6</td><td>70.7</td><td>60.8</td><td>54.4</td><td>60.1 (+0.9)</td></tr><tr><td>SWAD</td><td>54.6</td><td>71.0</td><td>60.9</td><td>55.2</td><td>60.4 (+1.2)</td></tr><tr><td>LS</td><td>53.6</td><td>71.6</td><td>59.9</td><td>53.4</td><td>59.6 (+0.4)</td></tr><tr><td>SDAT</td><td>56.0</td><td>73.2</td><td>61.4</td><td>55.9</td><td>61.6 (+2.4)</td></tr></table>
|
| 236 |
+
|
| 237 |
+
SWAD (Cha et al., 2021) technique which is shown effective for domain generalization. For this, we run our experiments on four different splits of the Office-Home dataset and summarize our results in Table 5. We find that techniques for ERM (LS and VAT) fail to provide significant consistent gain in performance which also confirms the requirement of specific smoothing strategies for DAT. We find that SDAT even outperforms SWAD on average by a significant margin of $1 . 2 \%$ . Additional details regarding the specific methods are provided in the supplementary (refer App. H).
|
| 238 |
+
|
| 239 |
+
# 8 CONCLUSION
|
| 240 |
+
|
| 241 |
+
In this work, we analyse the curvature of loss surface of DAT used extensively for Unsupervised Domain Adaptation. We find that converging to a smooth minima w.r.t. task loss (i.e., empirical source risk) leads to better generalization on the target domain. We also theoretically and empirically show that smoothness enhancing for adversarial components of loss lead to sub-optimal results, hence should be avoided in practice. We then introduce our practical and effective method, SDAT, which only increases the smoothness w.r.t. task loss, leading to better generalization on the target domain. SDAT leads to an effective increase even for the state of the art methods for adversarial domain adaptation and can be incorporated with just a few lines of code change. One limitation of SDAT is presence of no automatic way of selecting $\rho$ (determines extent of smoothness) which is a good future direction to explore.
|
| 242 |
+
|
| 243 |
+
# REFERENCES
|
| 244 |
+
|
| 245 |
+
David Acuna, Guojun Zhang, Marc T Law, and Sanja Fidler. f-domain-adversarial learning: Theory and algorithms. arXiv preprint arXiv:2106.11344, 2021. 1, 3, 6, 7, 14, 16
|
| 246 |
+
|
| 247 |
+
Tameem Adel, Isabel Valera, Zoubin Ghahramani, and Adrian Weller. One-network adversarial fairness. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 2412– 2420, 2019. 1
|
| 248 |
+
|
| 249 |
+
Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine learning, 79(1):151–175, 2010. 3, 6
|
| 250 |
+
|
| 251 |
+
David Berthelot, Rebecca Roelofs, Kihyuk Sohn, Nicholas Carlini, and Alex Kurakin. Adamatch: A unified approach to semi-supervised learning and domain adaptation. arXiv preprint arXiv:2106.04732, 2021. 20
|
| 252 |
+
|
| 253 |
+
Lukas Biewald. Experiment tracking with weights and biases, 2020. URL https://www. wandb.com/. Software available from wandb.com. 17
|
| 254 |
+
|
| 255 |
+
Guanyu Cai, Lianghua He, Mengchu Zhou, Hesham Alhumade, and Die Hu. Learning smooth representation for unsupervised domain adaptation, 2021. 2
|
| 256 |
+
|
| 257 |
+
Yair Carmon, John C Duchi, Oliver Hinder, and Aaron Sidford. Lower bounds for finding stationary points I. Mathematical Programming, 184(1):71–120, 2020. 5, 15
|
| 258 |
+
|
| 259 |
+
Junbum Cha, Sanghyuk Chun, Kyungjae Lee, Han-Cheol Cho, Seunghyun Park, Yunsung Lee, and Sungrae Park. Swad: Domain generalization by seeking flat minima. arXiv preprint arXiv:2102.08604, 2021. 9, 19
|
| 260 |
+
|
| 261 |
+
Xiangning Chen, Cho-Jui Hsieh, and Boqing Gong. When vision transformers outperform resnets without pretraining or strong data augmentations. arXiv preprint arXiv:2106.01548, 2021. 2, 16
|
| 262 |
+
|
| 263 |
+
Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3339–3348, 2018. 7, 8, 18
|
| 264 |
+
|
| 265 |
+
Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3213–3223, 2016. 8
|
| 266 |
+
|
| 267 |
+
Gintare Karolina Dziugaite and Daniel M Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017. 2
|
| 268 |
+
|
| 269 |
+
Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2): 303–338, 2010. 8
|
| 270 |
+
|
| 271 |
+
Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=6Tm1mposlrM. 1, 2, 4, 16
|
| 272 |
+
|
| 273 |
+
Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pp. 1180–1189. PMLR, 2015. 1, 2, 4, 18
|
| 274 |
+
|
| 275 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The journal of machine learning research, 17(1):2096–2030, 2016. 6, 7, 8, 17
|
| 276 |
+
|
| 277 |
+
Ian Gemp and Brian McWilliams. The unreasonable effectiveness of adam on cycles. In NeurIPS Workshop on Bridging Game Theory and Deep Learning, 2019. 4
|
| 278 |
+
|
| 279 |
+
Behrooz Ghorbani, Shankar Krishnan, and Ying Xiao. An investigation into neural net optimization via hessian eigenvalue density. In International Conference on Machine Learning, pp. 2232– 2241. PMLR, 2019. 4, 16
|
| 280 |
+
|
| 281 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. 1
|
| 282 |
+
|
| 283 |
+
Haowei He, Gao Huang, and Yang Yuan. Asymmetric valleys: beyond sharp and flat local minima. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 2553–2564, 2019. 2
|
| 284 |
+
|
| 285 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. 7, 8
|
| 286 |
+
|
| 287 |
+
Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weaklysupervised object detection through progressive domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5001–5009, 2018. 8
|
| 288 |
+
|
| 289 |
+
Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018. 19
|
| 290 |
+
|
| 291 |
+
Stanislaw Jastrzebski, Maciej Szymczak, Stanislav Fort, Devansh Arpit, Jacek Tabor, Kyunghyun Cho\*, and Krzysztof Geras\*. The break-even point on optimization trajectories of deep neural networks. In International Conference on Learning Representations, 2020. URL https:// openreview.net/forum?id=r1g87C4KwB. 4
|
| 292 |
+
|
| 293 |
+
Ying Jin, Ximei Wang, Mingsheng Long, and Jianmin Wang. Minimum class confusion for versatile domain adaptation. In European Conference on Computer Vision, pp. 464–480. Springer, 2020. 6, 7, 8, 17, 18
|
| 294 |
+
|
| 295 |
+
Bo Fu Junguang Jiang, Baixu Chen and Mingsheng Long. Transfer-learning-library. https: //github.com/thuml/Transfer-Learning-Library, 2020. 6, 7, 18, 21
|
| 296 |
+
|
| 297 |
+
Minguk Kang and Jaesik Park. ContraGAN: Contrastive Learning for Conditional Image Generation. 2020. 17
|
| 298 |
+
|
| 299 |
+
Nitish Shirish Keskar and Richard Socher. Improving generalization performance by switching from adam to sgd. arXiv preprint arXiv:1712.07628, 2017. 1
|
| 300 |
+
|
| 301 |
+
Nitish Shirish Keskar, Jorge Nocedal, Ping Tak Peter Tang, Dheevatsa Mudigere, and Mikhail Smelyanskiy. On large-batch training for deep learning: Generalization gap and sharp minima. In 5th International Conference on Learning Representations, ICLR 2017, 2017. 2
|
| 302 |
+
|
| 303 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 1
|
| 304 |
+
|
| 305 |
+
Alex Krizhevsky et al. Learning multiple layers of features from tiny images. 2009. 17
|
| 306 |
+
|
| 307 |
+
Jogendra Nath Kundu, Naveen Venkat, Ambareesh Revanur, Rahul M V, and R. Venkatesh Babu. Towards inheritable models for open-set domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020a. 2
|
| 308 |
+
|
| 309 |
+
Jogendra Nath Kundu, Naveen Venkat, Rahul M V, and R. Venkatesh Babu. Universal source-free domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020b. 2
|
| 310 |
+
|
| 311 |
+
Haoliang Li, Sinno Jialin Pan, Shiqi Wang, and Alex C Kot. Domain generalization with adversarial feature learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5400–5409, 2018. 1
|
| 312 |
+
|
| 313 |
+
Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in neural information processing systems, pp. 700–708, 2017. 1
|
| 314 |
+
|
| 315 |
+
Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In International conference on machine learning, pp. 97–105. PMLR, 2015. 7, 8
|
| 316 |
+
|
| 317 |
+
Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. In International conference on machine learning, pp. 2208–2217. PMLR, 2017. 7
|
| 318 |
+
|
| 319 |
+
Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In Advances in Neural Information Processing Systems, pp. 1645–1655, 2018. 1, 2, 3, 4, 6, 7, 8, 17, 18
|
| 320 |
+
|
| 321 |
+
T. Miyato, S. Maeda, M. Koyama, and S. Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(8):1979–1993, 2019. doi: 10.1109/TPAMI.2018.2858821. 9, 19
|
| 322 |
+
|
| 323 |
+
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In International Conference on Learning Representations, 2018. 5, 17
|
| 324 |
+
|
| 325 |
+
XuanLong Nguyen, Martin J Wainwright, and Michael I Jordan. Estimating divergence functionals and the likelihood ratio by convex risk minimization. IEEE Transactions on Information Theory, 56(11):5847–5861, 2010. 3
|
| 326 |
+
|
| 327 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alche-Buc, E. Fox, and ´ R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp. 8024–8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/9015-pytorchan-imperative-style-high-performance-deep-learning-library.pdf. 6
|
| 328 |
+
|
| 329 |
+
Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge, 2017. 6
|
| 330 |
+
|
| 331 |
+
Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1406–1415, 2019. 6
|
| 332 |
+
|
| 333 |
+
Viraj Prabhu, Shivam Khare, Deeksha Kartik, and Judy Hoffman. Sentry: Selective entropy optimization via committee consistency for unsupervised domain adaptation. arXiv preprint arXiv:2012.11460, 2020. 2
|
| 334 |
+
|
| 335 |
+
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. Advances in neural information processing systems, 28: 91–99, 2015. 8, 18
|
| 336 |
+
|
| 337 |
+
Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Adversarial dropout regularization. In International Conference on Learning Representations, 2018a. 4
|
| 338 |
+
|
| 339 |
+
Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3723–3732, 2018b. 8, 17
|
| 340 |
+
|
| 341 |
+
Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6956–6965, 2019. 1, 8
|
| 342 |
+
|
| 343 |
+
Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Semantic foggy scene understanding with synthetic data. International Journal of Computer Vision, 126(9):973–992, 2018. 8
|
| 344 |
+
|
| 345 |
+
Rui Shu, Hung Bui, Hirokazu Narui, and Stefano Ermon. A dirt-t approach to unsupervised domain adaptation. In International Conference on Learning Representations, 2018. 2
|
| 346 |
+
|
| 347 |
+
David Stutz, Matthias Hein, and Bernt Schiele. Relating adversarially robust generalization to flat minima. arXiv preprint arXiv:2104.04448, 2021. 9, 19
|
| 348 |
+
|
| 349 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016. 9, 19
|
| 350 |
+
|
| 351 |
+
Hui Tang, Ke Chen, and Kui Jia. Unsupervised domain adaptation via structurally regularized deep clustering. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 8725–8735, 2020. 7
|
| 352 |
+
|
| 353 |
+
Vladimir Vapnik. The nature of statistical learning theory. Springer science & business media, 2013. 1
|
| 354 |
+
|
| 355 |
+
Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In (IEEE) Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 6
|
| 356 |
+
|
| 357 |
+
Ximei Wang, Ying Jin, Mingsheng Long, Jianmin Wang, and Michael I Jordan. Transferable normalization: towards improving transferability of deep neural networks. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 1953–1963, 2019. 2
|
| 358 |
+
|
| 359 |
+
Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detectron2. https://github.com/facebookresearch/detectron2, 2019. 18
|
| 360 |
+
|
| 361 |
+
Ruijia Xu, Guanbin Li, Jihan Yang, and Liang Lin. Larger norm more transferable: An adaptive feature norm approach for unsupervised domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1426–1435, 2019. 8
|
| 362 |
+
|
| 363 |
+
Zhewei Yao, Amir Gholami, Kurt Keutzer, and Michael W Mahoney. Pyhessian: Neural networks through the lens of the hessian. In 2020 IEEE International Conference on Big Data (Big Data), pp. 581–590. IEEE, 2020. 16
|
| 364 |
+
|
| 365 |
+
Yuchen Zhang, Tianle Liu, Mingsheng Long, and Michael Jordan. Bridging theory and algorithm for domain adaptation. In International Conference on Machine Learning, pp. 7404–7413. PMLR, 2019. 1, 7
|
| 366 |
+
|
| 367 |
+
# APPENDICES
|
| 368 |
+
|
| 369 |
+
# A NOTATION TABLE
|
| 370 |
+
|
| 371 |
+
Table S1 contains all the notations used in the paper and the proofs of theorems.
|
| 372 |
+
|
| 373 |
+
Table S1: The notations used in the paper and the corresponding meaning.
|
| 374 |
+
|
| 375 |
+
<table><tr><td>Notation</td><td>Meaning</td></tr><tr><td>S</td><td>Labeled Source Data</td></tr><tr><td>T</td><td>Unlabelled Target Data</td></tr><tr><td>Ps (or Pr)</td><td>Source (or Target) Distribution</td></tr><tr><td>X</td><td>Input space</td></tr><tr><td>2</td><td>Label space</td></tr><tr><td>y()</td><td>Maps image to labels</td></tr><tr><td>h</td><td>Hypothesis function</td></tr><tr><td>Rs(he) (or R(hθ))</td><td>Source (or Target) risk</td></tr><tr><td>R(he)(or R(hθ))</td><td>Empirical Source (or Target) risk</td></tr><tr><td>H</td><td>Hypothesis space</td></tr><tr><td>D ,H(Psl|Pr) ?</td><td>Discrepancy between two domains Ps and PT</td></tr><tr><td>g</td><td>Feature extractor</td></tr><tr><td>fe</td><td>Classifier</td></tr><tr><td>D</td><td>Domain Discriminator</td></tr><tr><td>T</td><td>Tractable Discrepancy Estimate</td></tr><tr><td>VRg(he) (or H)</td><td></td></tr><tr><td>Tr(H)</td><td>Hessian of classification loss</td></tr><tr><td></td><td>Trace ofHessian</td></tr><tr><td>入max</td><td>Maximum eigenvalue of Hessian</td></tr><tr><td>E</td><td>Perturbation</td></tr><tr><td>p</td><td>Maximum norm of é</td></tr></table>
|
| 376 |
+
|
| 377 |
+
# B CONNECTION OF DISCREPANCY TO $d _ { S , T } ^ { \Phi }$ (EQ. 4) IN MAIN PAPER
|
| 378 |
+
|
| 379 |
+
We refer reader to Appendix C.2 of Acuna et al. (2021) for relation of $d _ { S , T } ^ { \Phi }$ . The $d _ { S , T } ^ { \Phi }$ term defined in Eq. 4 given as:
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
d _ { S , T } ^ { \Phi } = \mathbb { E } _ { x \sim P _ { S } } [ \log ( \mathcal { D } _ { \Phi } ( g _ { \psi } ( x ) ) ) ] + \mathbb { E } _ { x \sim P _ { T } } [ \log ( 1 - \mathcal { D } _ { \Phi } ( g _ { \psi } ( x ) ) ) ]
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
The above term is exactly the Eq. C.1 in Acuna et al. (2021) where they show that optimal $d _ { S , T } ^ { \Phi }$ i.e.:
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\operatorname* { m a x } _ { \Phi } d _ { S , T } ^ { \Phi } = D _ { J S } ( P _ { S } | | P _ { T } ) - 2 \log ( 2 )
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
Hence we can say from result in Eq. 4 is a consequence of Lemma 1 and Proposition 1 in (Acuna et al., 2021), assuming that $D _ { \Phi }$ satisfies the constraints in Proposition 1.
|
| 392 |
+
|
| 393 |
+
# C PROOF OF THEOREMS
|
| 394 |
+
|
| 395 |
+
In this section we provide proofs for the theoretical results present in the paper:
|
| 396 |
+
|
| 397 |
+
Theorem 1 (Generalization bound). Suppose $l : \mathcal { V } \times \mathcal { Y } \to [ 0 , 1 ] \subset d o m \phi ^ { * } .$ . Let $h ^ { * }$ be the ideal joint classifier with error $\lambda ^ { * } = R _ { S } ^ { l } ( h ^ { * } ) \dot { + } \mathbf { \bar { \delta } } R _ { T } ^ { l } ( h ^ { * } )$ . We have the following relation between source and target risk:
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq R _ { S } ^ { l } ( h _ { \theta } ) + D _ { h _ { \theta } , \mathcal { H } } ^ { \phi } ( P _ { S } | | P _ { T } ) + \lambda ^ { * }
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
Proof. We refer the reader to Theorem 2 in Appendix $\cdot$ of Acuna et al. (2021) for the detailed proof the theorem. □
|
| 404 |
+
|
| 405 |
+
We now introduce a Lemma for smooth functions which we will use in the proofs subsequently:
|
| 406 |
+
|
| 407 |
+
Lemma 1. For an $L$ -smooth function $f ( w )$ the following holds where $w ^ { * }$ is the optimal minima:
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
f ( w ) - f ( w ^ { * } ) \geq \frac { 1 } { 2 L } | | \nabla f ( w ) | | ^ { 2 }
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Proof. The L-smooth function by definition satisfies the following:
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
f ( w ^ { * } ) \leq f ( v ) \leq f ( w ) + \nabla f ( w ) ( v - w ) + \frac { L } { 2 } | | v - w | | ^ { 2 }
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
Now we minimize the upper bound wrt $v$ to get a tight bound on $f ( w ^ { \ast } )$ .
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
D ( v ) = f ( w ) + \nabla f ( w ) ( v - w ) + \frac { L } { 2 } | | v - w | | ^ { 2 }
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
after doing $\nabla _ { v } D ( v ) = 0$ we get:
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
v = w - \frac { 1 } { L } \nabla f ( w )
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
By substituting the value of $v$ in the upper bound we get:
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
f ( w ^ { * } ) \leq f ( w ) - \frac { 1 } { 2 L } | | \nabla f ( w ) | | ^ { 2 }
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Hence rearranging the above term gives the desired result:
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
f ( w ) - f ( w ^ { * } ) \geq \frac { 1 } { 2 L } | | \nabla f ( w ) | | ^ { 2 }
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
Theorem 2. For a given classifier $h _ { \theta }$ and one step of (steepest) gradient ascent i.e. $\Phi ^ { \prime } = \Phi + $ $\eta ( \nabla d _ { S , T } ^ { \Phi } / | | \nabla d _ { S , T } ^ { \Phi } | | )$ and $\Phi ^ { \prime \prime } = \stackrel { \sim } { \Phi } + \eta \big ( \nabla d _ { S , T } ^ { \Phi } \big | _ { \Phi + \hat { \epsilon } ( \Phi ) } \big / \big | \big | \nabla d _ { S , T } ^ { \Phi ^ { \prime } } \big | _ { \Phi + \hat { \epsilon } ( \Phi ) } \big | \big | \big )$ for maximizing
|
| 444 |
+
|
| 445 |
+
$$
|
| 446 |
+
d _ { S , T } ^ { \Phi ^ { \prime } } - d _ { S , T } ^ { \Phi ^ { \prime \prime } } \leq \eta ( 1 - \cos \alpha ) \sqrt { 2 L ( d _ { S , T } ^ { \ast } - d _ { S , T } ^ { \Phi } ) }
|
| 447 |
+
$$
|
| 448 |
+
|
| 449 |
+
where $\alpha$ is the angle between $\nabla d _ { S , T } ^ { \Phi }$ and $\nabla d _ { S , T } ^ { \Phi } \big | _ { \Phi + \hat { \epsilon } ( \Phi ) }$
|
| 450 |
+
|
| 451 |
+
Proof of Theorem 2. We assume that the function is $L$ -smooth (the assumption of L-smoothness is the basis of many results in non-convex optimization (Carmon et al., 2020)) in terms of input $x$ . As for a fixed $h _ { \theta }$ as we use a reverse gradient procedure for measuring the discrepancy, only one step analysis is shown. This is because only a single step of gradient is used for estimating discrepancy $\dot { d } _ { S , T } ^ { \Phi }$ i.e. one step of each min and max optimization is performed alternatively for optimization. After this the $h _ { \theta }$ is updated to decrease the discrepancy. Any differential function can be approximated by the linear approximation in case of small $\eta$ :
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
d _ { S , T } ^ { \Phi + \eta v } \approx d _ { S , T } ^ { \Phi } + \eta \nabla d _ { S , T } ^ { \Phi } { } ^ { T } v
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
The dot product between two vectors can be written as the following function of norms and angle $\theta$ between those:
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\nabla d _ { S , T } ^ { \Phi } { } ^ { T } { \boldsymbol { v } } = | | \nabla d _ { S , T } ^ { \Phi } | | \ | | \boldsymbol { v } | | c o s \theta
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
The steepest value will be achieved when $\cos \theta = 1$ which is actually $\begin{array} { r } { v = \frac { \nabla d _ { S , T } ^ { \Phi } ( x ) } { | | \nabla d _ { S , T } ^ { \Phi } ( x ) | | } } \end{array}$ . Now we compare the descent in another direction $\begin{array} { r } { v _ { 2 } \ = \ \frac { \nabla d _ { S , T } ^ { \Phi } | _ { w + \epsilon ( w ) } } { | | \nabla d _ { S , T } ^ { \Phi } | _ { w + \epsilon ( w ) } | | } } \end{array}$ from the gradient descent. The difference in value can be characterized by:
|
| 464 |
+
|
| 465 |
+
$$
|
| 466 |
+
d _ { S , T } ^ { \Phi + \eta v } - d _ { S , T } ^ { \Phi + \eta v _ { 2 } } = \eta | | \nabla d _ { S , T } ^ { \Phi } | | ( 1 - \cos \alpha )
|
| 467 |
+
$$
|
| 468 |
+
|
| 469 |
+
As $\alpha$ is an angle between $\nabla d _ { S , T } ^ { \Phi } | _ { w + \epsilon ( w ) } \ ( v _ { 2 } )$ and $\nabla d _ { S , T } ^ { \Phi } ( X ) \left( v \right)$ . The suboptimality is dependent on the gradient magnitude. We use the following result to show that when optimality gap $d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi } ( x )$ is large the difference between two directions is also large.
|
| 470 |
+
|
| 471 |
+
For an L-smooth function the following holds according to Lemma 1:
|
| 472 |
+
|
| 473 |
+
$$
|
| 474 |
+
f ( w ) - f ( w ^ { * } ) \geq \frac { 1 } { 2 L } | | \nabla f ( w ) | | ^ { 2 }
|
| 475 |
+
$$
|
| 476 |
+
|
| 477 |
+
As we are performing gradient ascent $f ( w ) = - d _ { s , t } ^ { \Phi }$ , we get the following result:
|
| 478 |
+
|
| 479 |
+
$$
|
| 480 |
+
\begin{array} { c } { { ( d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi } ) \geq \displaystyle \frac 1 { 2 L } | | \nabla d _ { S , T } ^ { \Phi } ( x ) | | ^ { 2 } } } \\ { { { } } } \\ { { 2 L ( d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi } ) \geq \displaystyle \frac { ( d _ { S , T } ^ { \Phi + \eta v _ { 2 } } - d _ { S , T } ^ { \Phi + \eta v } ) ^ { 2 } } { ( \eta ( 1 - \cos \alpha ) ) ^ { 2 } } } } \\ { { { } } } \\ { { \eta ( 1 - \cos \alpha ) \sqrt { 2 L ( d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi } ) } \geq ( d _ { S , T } ^ { \Phi ^ { \prime } } - d _ { S , T } ^ { \Phi ^ { \prime \prime } } ) } } \end{array}
|
| 481 |
+
$$
|
| 482 |
+
|
| 483 |
+
This shows that difference in value of by taking a step in direction of gradient $v$ vs taking the step in a different direction $v _ { 2 }$ is upper bounded by the $\bar { d _ { S , T } ^ { * } } - \bar { d _ { S , T } ^ { \Phi } } ( x )$ , hence if we are far from minima the difference can be potentially large. As we are only doing one step of gradient ascent will be potentially large, hence can lead to suboptimal measure of discrepancy. $d _ { S , T } ^ { * } - d _ { S , T } ^ { \Phi }$
|
| 484 |
+
|
| 485 |
+
Theorem 3. Suppose $l$ is the loss function, we denote $\lambda ^ { * } : = R _ { S } ^ { l } ( h ^ { * } ) + R _ { T } ^ { l } ( h ^ { * } )$ and let $h ^ { * }$ be the ideal joint hypothesis:
|
| 486 |
+
|
| 487 |
+
$$
|
| 488 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } \hat { R } _ { S } ^ { l } ( h _ { \theta + \epsilon } ) + D _ { h _ { \theta } , H } ^ { \phi } ( P _ { S } | | P _ { T } ) + \gamma ( | | \theta | | _ { 2 } ^ { 2 } / \rho ^ { 2 } ) + \lambda ^ { * } .
|
| 489 |
+
$$
|
| 490 |
+
|
| 491 |
+
where $\gamma : \mathbb { R } ^ { + } \mathbb { R } ^ { + }$ is a strictly increasing function.
|
| 492 |
+
|
| 493 |
+
Proof of Theorem 3: In this case we make use of Theorem 2 in the paper sharpness aware minimization (Foret et al., 2021) which states the following: The source risk $R _ { S } ( h )$ is bounded using the following PAC-Bayes generalization bound for any $\rho$ with probability $1 - \delta$ :
|
| 494 |
+
|
| 495 |
+
$$
|
| 496 |
+
R _ { S } ( h _ { \theta } ) \leq \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } \hat { R } _ { S } ( h _ { \theta } ) + \sqrt { \frac { k \log \left( 1 + \frac { \| \theta \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + 4 \log \frac { n } { \delta } + \tilde { O } ( 1 ) } { n - 1 } }
|
| 497 |
+
$$
|
| 498 |
+
|
| 499 |
+
here $n$ is the training set size used for calculation of empirical risk $\hat { R } _ { S } ( h )$ , $k$ is the number of parameters and $| | \theta | | _ { 2 }$ is the norm of the weight parameters. The second term in equation can be abbreviated as $\gamma ( | | \theta | | _ { 2 } )$ . Hence,
|
| 500 |
+
|
| 501 |
+
$$
|
| 502 |
+
R _ { S } ( h _ { \theta } ) \leq \operatorname* { m a x } _ { | | \epsilon | | \leq \rho } \hat { R } _ { S } ( h _ { \theta } ) + \gamma ( | | \theta | | _ { 2 } ^ { 2 } / \rho ^ { 2 } )
|
| 503 |
+
$$
|
| 504 |
+
|
| 505 |
+
From the generalization bound for domain adaptation for any f-divergence (Acuna et al., 2021) (Theorem 2) we have the following result.
|
| 506 |
+
|
| 507 |
+
$$
|
| 508 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq R _ { S } ^ { l } ( h _ { \theta } ) + \mathcal { D } _ { h _ { \theta } , H } ^ { \phi } ( P _ { S } | | P _ { T } ) + \lambda ^ { * }
|
| 509 |
+
$$
|
| 510 |
+
|
| 511 |
+
Combining the above two inequalities gives us the required result we wanted to prove i.e.
|
| 512 |
+
|
| 513 |
+
$$
|
| 514 |
+
R _ { T } ^ { l } ( h _ { \theta } ) \leq \tilde { R } _ { S } ^ { l } ( h _ { \theta } ) + D _ { h _ { \theta } , H } ^ { \phi } ( P _ { S } | | P _ { T } ) + \gamma ( | | \theta | | _ { 2 } ^ { 2 } / \rho ^ { 2 } ) + \lambda ^ { * } .
|
| 515 |
+
$$
|
| 516 |
+
|
| 517 |
+
# D HESSIAN ANALYSIS
|
| 518 |
+
|
| 519 |
+
We use the PyHessian library (Yao et al., 2020) to calculate the Hessian eigenvalues and the Hessian Eigen Spectral Density. All the calculations are performed using $50 \%$ of the source data at the last checkpoint. Only the source class loss is used for calculating to clearly illustrate our point. The partition was selected randomly, and the same partition was used across all the runs. We also made sure to use the same environment to run all the Hessian experiments. A subset of the data was used for Hessian calculation mainly because the hessian calculation is computationally expensive (Yao et al., 2020). This is commonly done in hessian experiments. For example, (Chen et al., 2021) (refer Appendix D) uses $10 \%$ of training data for Hessian Eigenvalue calculation The PyHessian library uses Lanczos algorithm (Ghorbani et al., 2019) for calculating the Eigen Spectral density of the Hessian and uses the Hutchinson method to calculate the trace of the Hessian efficiently.
|
| 520 |
+
|
| 521 |
+
Table S2: Architecture used for feature classifier and Domain classifier. $C$ is the number of classes. Both classifiers will take input from feature generator $\left( g _ { \boldsymbol { \theta } } \right)$ .
|
| 522 |
+
|
| 523 |
+
<table><tr><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Output Shape</td></tr><tr><td rowspan=1 colspan=1>Featu</td><td rowspan=1 colspan=1>Feature Classifier(fe)</td></tr><tr><td rowspan=1 colspan=1>Linear</td><td rowspan=1 colspan=1>Bottleneck DimensionC</td></tr><tr><td rowspan=1 colspan=1>Domai</td><td rowspan=1 colspan=1>Domain Classifier (DΦ)</td></tr><tr><td rowspan=5 colspan=1>LinearBatchNormReLULinearBatchNormReLULinear</td><td rowspan=3 colspan=1>BottleneckDimension102410241024</td></tr><tr><td rowspan=2 colspan=1>1024</td></tr><tr><td rowspan=1 colspan=1>10241024</td></tr><tr><td rowspan=1 colspan=1>10241024</td></tr><tr><td rowspan=1 colspan=1>10241</td></tr></table>
|
| 524 |
+
|
| 525 |
+
Table S3: Accuracy $( \% )$ on VisDA2017 (ResNet-101).
|
| 526 |
+
|
| 527 |
+
<table><tr><td>Method</td><td>Synthetic →Real</td></tr><tr><td>DANN (Ganin et al., 2016) MCD (Saito et al., 2018b)</td><td>57.4 71.4</td></tr><tr><td>CDAN (Long et al., 2018) CDAN*a</td><td>73.7 76.6</td></tr><tr><td>CDAN w/ SDAT</td><td>78.3</td></tr><tr><td>CDAN+MCC (Jin et al., 2020) CDAN+MCC w/ SDAT</td><td>80.4 81.2</td></tr></table>
|
| 528 |
+
|
| 529 |
+
aOur implementation of CDAN. Refer to Section F for more details.
|
| 530 |
+
|
| 531 |
+
# E SMOOTHNESS OF DISCRIMINATOR IN SNGAN
|
| 532 |
+
|
| 533 |
+
We also did the similar experiment of smoothing discriminator in DAT (Sec. 4.1) for SNGAN Miyato et al. (2018) as the adversarial objective in GAN is similar to DAT. We use the same configuration for SNGAN as described in PyTorchStudioGAN (Kang & Park, 2020) for both CIFAR10 (Krizhevsky et al., 2009) and TinyImageNet 3 with batch size of 256 in both cases. We then smooth the discriminator while discriminator is trained by using the same formulation as in Eq. 9. We find that smoothing discriminator leads to higher (suboptimal) Frechet Inception Distance in case of ´ GANs as well, shown in Fig. 3.
|
| 534 |
+
|
| 535 |
+
# F EXPERIMENTAL DETAILS
|
| 536 |
+
|
| 537 |
+
# F.1 IMAGE CLASSIFICATION
|
| 538 |
+
|
| 539 |
+
Office-Home: For CDAN methods, we train the models using mini-batch stochastic gradient descent (SGD) with a batch size of 32 and a learning rate of 0.01. The learning rate schedule is the same as (Ganin et al., 2016). We train it for a total of 30 epochs with 1000 iterations per epoch. The momentum parameter in SGD is set to 0.9 and a weight decay of 0.001 is used. For $\mathrm { C D A N + M C C }$ experiments, we use a temperature parameter (Jin et al., 2020) of 2.5. The bottleneck dimension for the features is set to 2048.
|
| 540 |
+
|
| 541 |
+
VisDA-2017: We use a ResNet-101 backbone initialized with ImageNet weights for VisDA-2017 experiments. Center Crop is also used as an augmentation during training. We use a bottleneck dimension of 256 for both algorithms.
|
| 542 |
+
|
| 543 |
+
For CDAN runs, we train the model for 30 epochs with same optimizer setting as that of OfficeHome. For CDAN+MCC runs, we use a temperature parameter of 3.0 and a learning rate of 0.002.
|
| 544 |
+
|
| 545 |
+
DomainNet: We use a ResNet-101 backbone initialized with ImageNet weights for DomainNet experiments. We run all the experiments for 30 epochs with 2500 iterations per epoch. The other parameters are the same as that of Office-Home.
|
| 546 |
+
|
| 547 |
+
To show the effectiveness of SDAT fairly and promote reproducibility, we run with and without SDAT on the same GPU and environment and with the same seed. All the above experiments were run on Nvidia V100 and RTX 2080 GPUs. We used Wandb (Biewald, 2020) to track our experiments. We will be releasing the code to promote reproducible research.
|
| 548 |
+
|
| 549 |
+
# F.1.1 ARCHITECTURE OF DOMAIN DISCRIMINATOR
|
| 550 |
+
|
| 551 |
+
One of the major reasons for increased accuracy in Office-Home baseline CDAN compared to reported numbers in the paper is the architecture of domain classifier. The main difference is the use
|
| 552 |
+
|
| 553 |
+
Table S5: Accuracy $( \% )$ on DomainNet dataset for unsupervised domain adaptation (ResNet-101) across five distinct domains. The row indicates the source domain and the columns indicate the target domain.
|
| 554 |
+
|
| 555 |
+
<table><tr><td>ADDA</td><td>clp</td><td>inf</td><td>pnt</td><td>rel</td><td>skt</td><td>Avg</td><td>MCD</td><td>clp</td><td>inf</td><td>pnt</td><td>rel</td><td>skt</td><td>Avg</td></tr><tr><td>clp</td><td>-</td><td>11.2</td><td>24.1</td><td>41.9</td><td>30.7</td><td>27.0</td><td>clp</td><td>-</td><td>14.2</td><td>26.1</td><td>45.0</td><td>33.8</td><td>29.8</td></tr><tr><td>inf</td><td>19.1</td><td>-</td><td>16.4</td><td>26.9</td><td>14.6</td><td>19.2</td><td>inf</td><td>23.6</td><td>-</td><td>21.2</td><td>36.7</td><td>18.0</td><td>24.9</td></tr><tr><td>pnt</td><td>31.2</td><td>9.5</td><td>-</td><td>39.1</td><td>25.4</td><td>26.3</td><td>pnt</td><td>34.4</td><td>14.8</td><td>-</td><td>50.5</td><td>28.4</td><td>32.0</td></tr><tr><td>rel</td><td>39.5</td><td>14.5</td><td>29.1</td><td>-</td><td>25.7</td><td>27.2</td><td>rel</td><td>42.6</td><td>19.6</td><td>42.6</td><td>-</td><td>29.3</td><td>33.5</td></tr><tr><td>skt</td><td>35.3</td><td>8.9</td><td>25.2</td><td>37.6</td><td>-</td><td>26.7</td><td>skt</td><td>41.2</td><td>13.7</td><td>27.6</td><td>34.8</td><td>1</td><td>29.3</td></tr><tr><td>Avg</td><td>31.3</td><td>11.0</td><td>23.7</td><td>36.4</td><td>24.1</td><td>25.3</td><td>Avg</td><td>35.4</td><td>15.6</td><td>29.4</td><td>41.7</td><td>27.4</td><td>29.9</td></tr><tr><td>CDAN</td><td>clp</td><td>inf</td><td>pnt</td><td>rel</td><td>skt</td><td>Avg</td><td>CDAN w/ SDAT</td><td>clp</td><td>inf</td><td>pnt</td><td>rel</td><td>skt</td><td>Avg</td></tr><tr><td>clp</td><td>-</td><td>20.6</td><td>38.9</td><td>56.0</td><td>44.9</td><td>40.1</td><td>clp</td><td>-</td><td>22.0</td><td>41.5</td><td>57.5</td><td>47.2</td><td>42.1</td></tr><tr><td>inf</td><td>31.5</td><td>-</td><td>29.3</td><td>43.6</td><td>26.3</td><td>32.7</td><td>inf</td><td>33.9</td><td>-</td><td>30.3</td><td>48.1</td><td>27.9</td><td>35.0</td></tr><tr><td>pnt</td><td>44.1</td><td>19.8</td><td>-</td><td>57.2</td><td>39.9</td><td>40.2</td><td>pnt</td><td>47.5</td><td>20.7</td><td>-</td><td>58.0</td><td>41.8</td><td>42.0</td></tr><tr><td>rel</td><td>55.8</td><td>24.4</td><td>53.2</td><td>-</td><td>42.3</td><td>43.9</td><td>rel</td><td>56.7</td><td>25.1</td><td>53.6</td><td>-</td><td>43.9</td><td>44.8</td></tr><tr><td>skt</td><td>56.0</td><td>20.7</td><td>45.3</td><td>54.9</td><td>-</td><td>44.2</td><td>skt</td><td>58.7</td><td>21.8</td><td>48.1</td><td>57.1</td><td>-</td><td>46.4</td></tr><tr><td>Avg</td><td>46.9</td><td>21.4</td><td>41.7</td><td>52.9</td><td>38.3</td><td>40.2</td><td>Avg</td><td>49.2</td><td>22.4</td><td>43.4</td><td>55.2</td><td>40.2</td><td>42.1</td></tr></table>
|
| 556 |
+
|
| 557 |
+
of batch normalization layer in domain classifier, which was done in the library (Junguang Jiang & Long, 2020). Table S2 shows the architecture of the feature classifier and domain classifier.
|
| 558 |
+
|
| 559 |
+
# F.2 ADDITIONAL IMPLEMENTATIONS DETAILS FOR DA FOR OBJECT DETECTION
|
| 560 |
+
|
| 561 |
+
In SDAT, we modified the loss function present in Chen et al. (2018) by adding classification loss smoothing, i.e. smoothing classification loss of RPN and ROI, used in Faster R-CNN (Ren et al., 2015), by training with source data. Similarly, we applied smoothing to regression loss and found it to be less effective. We implemented SDAT for object detection using Detectron2 (Wu et al., 2019). We fixed $\rho$ to 0.15 for object detection experiments.
|
| 562 |
+
|
| 563 |
+
# G ADDITIONAL RESULTS
|
| 564 |
+
|
| 565 |
+
VisDA-2017: Table S3 shows the overall accuracy on the VisDA-2017 with ResNet-101 backbone. The accuracy reported in this table is the overall accuracy of the dataset, whereas the accuracy reported in the Table 5 of the main paper refers to the mean of the accuracy across classes. CDAN w/ SDAT outperforms CDAN by $1 . 7 \%$ , showing the effectiveness of SDAT in large scale Synthetic Real shifts. With CDAN+MCC as the backbone, adding SDAT improves the performance of the method to $8 1 . 2 \%$ .
|
| 566 |
+
|
| 567 |
+
DomainNet: Table S5 shows the results of the proposed method on DomainNet across five domains. We compare our results with ADDA and MCD and show that CDAN achieves much higher performance on DomainNet compared to other techniques. It can be seen that CDAN w/ SDAT further improves the overall accuracy on DomainNet by $1 . 8 \%$ .
|
| 568 |
+
|
| 569 |
+
Results with DANN (Ganin & Lempitsky, 2015): Domain Adversarial neural networks introduced the concept of adversarial training in domain adaptation and is a seminal paper in the field of domain adaptation. Table S4 shows the results on some splits on Office-Home with DANN and DANN w/ SDAT. DANN w/ SDAT improves upon the performance on DANN specifically in challenging splits like Clipart $ \mathbf { A r t }$ where DANN w/ SDAT gets a $1 \%$ increase over DANN.
|
| 570 |
+
|
| 571 |
+
We have shown results with three different domain adaptation algorithms namely DANN (Ganin & Lempitsky, 2015), CDAN (Long et al., 2018) and $\mathrm { C D A N + M C C }$ (Jin et al., 2020). SDAT has shown to improve the performance of all the three DA methods. This shows that SDAT is a generic method that can applied on top of any domain adversarial training based method to get better performance.
|
| 572 |
+
|
| 573 |
+
Table S4: Results on Office-Home dataset with DANN (Ganin & Lempitsky, 2015). DANN w/ SDAT improves the performance over DANN across the four splits of Office-Home dataset showing the adaptability of the proposed method.
|
| 574 |
+
|
| 575 |
+
<table><tr><td>Method</td><td>Ar>C1</td><td>Cl>Pr</td><td>Rw>Cl</td><td>Pr>C1</td><td>Average</td></tr><tr><td>DANN (Ganin & Lempitsky,2015)</td><td>52.6</td><td>65.4</td><td>60.4</td><td>52.3</td><td>57.7</td></tr><tr><td>DANN w/ SDAT</td><td>53.4</td><td>66.4</td><td>61.3</td><td>53.8</td><td>58.7</td></tr></table>
|
| 576 |
+
|
| 577 |
+
# H DIFFERENT SMOOTHING TECHNIQUES
|
| 578 |
+
|
| 579 |
+
Stochastic Weight Averaging (SWA) (Izmailov et al., 2018): SWA is a widely popular technique to reach a flatter minima. The idea behind SWA is that averaging weights across epochs leads to better generalization because it reaches a wider optima. The recently proposed SWA-Densely (SWAD) (Cha et al., 2021) takes this a step further and proposes to average the weights across iterations instead of epochs. SWAD shows improved performance on domain generalization tasks. We average every 400 iterations in the SWA instead of averaging per epochs. We tried averaging across 800 iterations as well and the performance was comparable.
|
| 580 |
+
|
| 581 |
+
Virtual Adversarial Training (VAT) (Miyato et al., 2019): VAT is regularization technique which makes use of adversarial perturbations. Adversarial perturbations are created using Algo. 1 present in (Miyato et al., 2019). We added VAT by optimizing the following objective:
|
| 582 |
+
|
| 583 |
+
$$
|
| 584 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { x \sim P _ { S } } \big [ \operatorname* { m a x } _ { | | r | | \leq \epsilon } D _ { K L } ( h _ { \theta } ( x ) | | h _ { \theta } ( x + r ) ) \big ]
|
| 585 |
+
$$
|
| 586 |
+
|
| 587 |
+
This value acts as a negative measure of smoothness and minimizing this will make the model smooth. For training, we set hyperparameters $\epsilon$ to 15.0, $\xi$ to 1e-6, and $\alpha$ as 0.1.
|
| 588 |
+
|
| 589 |
+
Label Smoothing (LS) (Szegedy et al., 2016): The idea behind label smoothing is to have a distribution over outputs instead of one hot vectors. Assuming that there are $\mathrm { k }$ classes, the correct class gets a probability of $1 - \alpha$ and the other classes gets a probability of $\alpha /$ (k-1). (Stutz et al., 2021) mention that label smoothing tends to avoid sharper minima during training. We use a smoothing parameter $( \alpha )$ of 0.1 in all the experiments in Table S6. We also show results with smoothing parameter of 0.2 and observe comparable performance. We observe that label smoothing slightly improves the performance over DAT.
|
| 590 |
+
|
| 591 |
+
Table S6: Different Smoothing techniques. We refer to (Stutz et al., 2021) to compare the proposed SDAT with other techniques to show the efficacy of SDAT. It can be seen that SDAT outperforms the other smoothing techniques significantly. Other smoothing techniques improve upon the performance of DAT showing that smoothing is indeed necessary for better adaptation.
|
| 592 |
+
|
| 593 |
+
<table><tr><td>Method</td><td>Ar>C1</td><td>Cl>Pr Rw>C1</td><td>Pr>C1</td></tr><tr><td>DAT</td><td>54.3 69.5</td><td>60.1</td><td>55.3</td></tr><tr><td>VAT</td><td>54.6 70.7</td><td>60.8</td><td>54.4</td></tr><tr><td>SWAD-400</td><td>54.6 71.0</td><td>60.9</td><td>55.2</td></tr><tr><td>LS (α = 0.1)</td><td>53.6 71.6</td><td>59.9</td><td>53.4</td></tr><tr><td>LS (α = 0.2)</td><td>53.5 71.2</td><td>60.5</td><td>53.2</td></tr><tr><td>SDAT</td><td>55.9 73.2</td><td>61.4</td><td>55.9</td></tr></table>
|
| 594 |
+
|
| 595 |
+
# I OPTIMUM RHO VALUE
|
| 596 |
+
|
| 597 |
+
Table S7 and S8 show that $\rho = 0 . 0 2$ works robustly across experiments providing an increase in performance (although it does not achieve the best result each time) and can be used as a rule of thumb.
|
| 598 |
+
|
| 599 |
+
Table S7: $\rho$ value for DomainNet
|
| 600 |
+
|
| 601 |
+
<table><tr><td>Split</td><td>DAT</td><td>SDAT(p = 0.02)</td><td>SDAT - Reported (p = 0.05)</td></tr><tr><td>clp-skt</td><td>44.9</td><td>46.7</td><td>47.2</td></tr><tr><td>skt>clp</td><td>56.0</td><td>59.0</td><td>58.7</td></tr><tr><td> skt→pnt</td><td>45.3</td><td>47.8</td><td>48.1</td></tr><tr><td>inf→rel</td><td>43.6</td><td>47.3</td><td>48.1</td></tr></table>
|
| 602 |
+
|
| 603 |
+
Table S8: $\rho$ value for VisDA-2017 Synthetic Real
|
| 604 |
+
|
| 605 |
+
<table><tr><td>Backbone</td><td>DAT</td><td>SDAT(p=0.02)</td><td>SDAT Reported(p = 0.005)</td></tr><tr><td>CDAN</td><td>76.6</td><td>78.2</td><td>78.3</td></tr><tr><td>CDAN+MCC</td><td>80.4</td><td>80.9</td><td>81.2</td></tr></table>
|
| 606 |
+
|
| 607 |
+

|
| 608 |
+
Figure S1: Validation Accuracy across epochs on different splits of DomainNet. We run on three different random seeds and plot the error bar indicating standard deviation across runs. CDAN w/ SDAT consistently outperforms CDAN across different splits of DomainNet.
|
| 609 |
+
|
| 610 |
+
# J SIGNIFICANCE AND STABILITY OF EMPIRICAL RESULTS
|
| 611 |
+
|
| 612 |
+
To establish the empirical results’ soundness and reliability, we run a subset of experiments (representative of each different source domain) on DomainNet. The experiments are repeated with three different random seeds leading to overall 36 experimental runs (18 for CDAN w/ SDAT (Our proposed method) and 18 for CDAN baseline). Due to the large computational complexity of each experiment ${ \approx } 2 0$ hrs each), we have presented results for multiple trials on a subset of splits. We find (in Table S9) that our method can outperform the baseline average in each of the 6 cases, establishing significant improvement across all splits. However, we found that due to the large size of DomainNet, the average increase (across three different trials) is close to the reported increase in all cases (Table S9), which also serves as evidence of the soundness of reported results (for remaining splits). We also present additional statistics below for establishing soundness.
|
| 613 |
+
|
| 614 |
+
If the proposed method is unstable, there is a large variance in the validation accuracy across epochs. For analyzing the stability of SDAT, we show the validation accuracy plots in Figure S1 on six different splits of DomainNet. We find that our proposed SDAT improves over baselines consistently across epochs without overlap in confidence intervals in later epochs. This also provides evidence for the authenticity and stability of our results. We also find that in some cases, like when using the Infographic domain as a source, our proposed SDAT also significantly stabilizes the training (Figure S1 Infographic Clipart).
|
| 615 |
+
|
| 616 |
+
One of the other ways of reporting results reliably proposed by the concurrent work (Berthelot et al., 2021) (Section 4.4) involves reporting the median of accuracy across the last few checkpoints. The median is a measure of central tendency which ignores outlier results. We also report the median of validation accuracy for our method across all splits for the last five epochs. It is observed that we observe similar gains for median accuracy (in Table S10) as reported in Table 2.
|
| 617 |
+
|
| 618 |
+
Table S9: DomainNet experiments over 3 different seeds. We report the mean, standard deviation, reported increase and average increase in the accuracy (in $\%$ ).
|
| 619 |
+
|
| 620 |
+
<table><tr><td>Split</td><td>CDAN</td><td>CDAN w/ SDAT</td><td>Reported Increase (Table 2)</td><td>Average Increase</td></tr><tr><td>clp→pnt</td><td>38.9 ± 0.1</td><td>41.5 ± 0.3</td><td>+2.6</td><td>+2.6</td></tr><tr><td>skt>rel</td><td>55.1 ± 0.2</td><td>57.1 ± 0.1</td><td>+2.2</td><td>+2.0</td></tr><tr><td>pnt>clp</td><td>44.5 ± 0.3</td><td>47.1 ± 0.3</td><td>+3.4</td><td>+2.6</td></tr><tr><td>rel>skt</td><td>42.4 ± 0.4</td><td>43.9 ± 0.1</td><td>+1.6</td><td>+1.5</td></tr><tr><td>clp>skt</td><td>44.9 ± 0.2</td><td>47.3 ± 0.1</td><td>+2.3</td><td>+2.4</td></tr><tr><td>inf→clp</td><td>31.4 ± 0.5</td><td>34.2 ± 0.3</td><td>+2.3</td><td>+2.7</td></tr></table>
|
| 621 |
+
|
| 622 |
+
Table S10: Median accuracy of last 5 epochs on DomainNet dataset with CDAN w/ SDAT. The number in the parenthesis indicates the increase in accuracy with respect to CDAN.
|
| 623 |
+
|
| 624 |
+
<table><tr><td>Target (→) Source (↓)</td><td>clp</td><td>inf</td><td>pnt</td><td>real</td><td>skt</td><td>Avg</td></tr><tr><td>clp</td><td></td><td>21.9 (+1.7)</td><td>41.6 (+3.0)</td><td>56.5 (+1.3)</td><td>46.4 (+2.0)</td><td>41.6 (+2.0)</td></tr><tr><td>inf</td><td>32.4 (+7.9)</td><td></td><td>29.8 (+7.0)</td><td>46.7 (+12.7)</td><td>25.6 (+5.4)</td><td>33.6 (+8.2)</td></tr><tr><td>pnt</td><td>47.2 (+2.9)</td><td>21.0 (+1.1)</td><td></td><td>57.6 (+1.0)</td><td>41.5 (+2.4)</td><td>41.8 (+1.8)</td></tr><tr><td>real</td><td>56.5 (+0.7)</td><td>25.5 (+0.9)</td><td>53.9 (+0.5)</td><td></td><td>43.5 (+1.3)</td><td>44.8 (+0.8)</td></tr><tr><td>skt</td><td>59.1 (+3.0)</td><td>22.1 (+1.7)</td><td>48.2 (+3.1)</td><td>56.6 (+2.9)</td><td></td><td>46.5 (+2.7)</td></tr><tr><td>Avg</td><td>48.8 (+3.6)</td><td>22.6 (+1.3)</td><td>43.4 (+3.4)</td><td>54.3 (+4.5)</td><td>39.2 (+2.8)</td><td>41.7 (+3.1)</td></tr></table>
|
| 625 |
+
|
| 626 |
+
As the Office-Home dataset is smaller (i.e., 44 images per class) in comparison to DomainNet we find that there exists some variance in baseline CDAN results (This is also reported in the wellknown benchmark for DA (Junguang Jiang & Long, 2020)). For establishing the empirical soundness, we report results of 4 different dataset splits on three different random seeds. It can be seen in Table S11 that even though there is variance in baseline results, our combination of CDAN w/ SDAT can produce consistent improvement across different random seeds. This further establishes the empirical soundness of our procedure.
|
| 627 |
+
|
| 628 |
+
Table S11: Office-Home experiments over 3 different seeds. We report the mean, standard deviation, reported increase and average increase in the accuracy (in $\%$ ).
|
| 629 |
+
|
| 630 |
+
<table><tr><td>Split</td><td>CDAN</td><td>CDAN w/SDAT</td><td>Reported Increase(Table1)</td><td>Average Increase</td></tr><tr><td>Ar>CI</td><td>53.9± 0.2</td><td>55.5 ± 0.2</td><td>+1.7</td><td>+1.6</td></tr><tr><td>Ar>Pr</td><td>70.6 ± 0.4</td><td>72.1 ± 0.4</td><td>+1.6</td><td>+1.5</td></tr><tr><td>Rw→Cl</td><td>60.7 ± 0.5</td><td>61.8 ± 0.4</td><td>+1.3</td><td>+1.1</td></tr><tr><td>Pr>Cl</td><td>54.7 ± 0.4</td><td>55.5 ± 0.4</td><td>+0.6</td><td>+0.8</td></tr></table>
|
parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Fj1Tpym9KxH/Fj1Tpym9KxH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/I3mLa12s_H/I3mLa12s_H.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Point Transformer V2: Grouped Vector Attention and Partition-based Pooling
|
| 2 |
+
|
| 3 |
+
Xiaoyang $\mathbf { W } \mathbf { u } ^ { 1 }$ Yixing Lao2 Li Jiang3 Xihui Liu1 Hengshuang Zhao1∗ 1The University of Hong Kong 2Intel Labs 3Max Planck Institute {xywu3, hszhao}@cs.hku.hk
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
As a pioneering work exploring transformer architecture for 3D point cloud understanding, Point Transformer achieves impressive results on multiple highly competitive benchmarks. In this work, we analyze the limitations of the Point Transformer and propose our powerful and efficient Point Transformer V2 model with novel designs that overcome the limitations of previous work. In particular, we first propose group vector attention, which is more effective than the previous version of vector attention. Inheriting the advantages of both learnable weight encoding and multi-head attention, we present a highly effective implementation of grouped vector attention with a novel grouped weight encoding layer. We also strengthen the position information for attention by an additional position encoding multiplier. Furthermore, we design novel and lightweight partition-based pooling methods which enable better spatial alignment and more efficient sampling. Extensive experiments show that our model achieves better performance than its predecessor and achieves state-of-the-art on several challenging 3D point cloud understanding benchmarks, including 3D point cloud segmentation on ScanNet v2 and S3DIS and 3D point cloud classification on ModelNet40. Our code will be available at https://github.com/Gofinge/PointTransformerV2.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Point Transformer (PTv1) [1] introduces the self-attention networks to 3D point cloud understanding. Combining the vector attention [2] with a U-Net style encoder-decoder framework, PTv1 achieves remarkable performance in several 3D point cloud recognition tasks, including shape classification, object part segmentation, and semantic scene segmentation.
|
| 12 |
+
|
| 13 |
+
In this work, we analyze the limitations of Point Transformer (PTv1) [1] and propose a new elegant and powerful backbone named Point Transformer V2 (PTv2). Our PTv2 improves upon PTv1 with several novel designs, including the advanced grouped vector attention with improved position encoding, and the efficient partition-based pooling scheme.
|
| 14 |
+
|
| 15 |
+
The vector attention layers in PTv1 utilize MLPs as the weight encoding to map the subtraction relation of query and key into an attention weight vector that can modulate the individual channels of the value vector. However, as the model goes deeper and the number of channels increases, the number of weight encoding parameters also increases drastically, leading to severe overfitting and limiting the model depth. To address this problem, we present grouped vector attention with a more parameter-efficient formulation, where the vector attention is divided into groups with shared vector attention weights. Meanwhile, we show that the well-known multi-head attention [3] and the vector attention [2, 1] are degenerate cases of our proposed grouped vector attention. Our proposed grouped vector attention inherits the merits of both vector attention and multi-head attention while being more powerful and efficient.
|
| 16 |
+
|
| 17 |
+
Furthermore, point positions provide important geometric information for 3D semantic understanding. Hence, the positional relationship among 3D points is more critical than 2D pixels. However, previous 3D position encoding schemes mostly follow the 2D ones and do not fully exploit the geometric knowledge in 3D coordinates. To this end, we strengthen the position encoding mechanism by applying an additional position encoding multiplier to the relation vector. Such a design strengthens the positional relationship information in the model, and we validate its effectiveness in our experiments.
|
| 18 |
+
|
| 19 |
+
Moreover, it is worth noting that the irregular, non-uniform spatial distributions of points are significant challenges to the pooling modules for point cloud processing. Previous point cloud pooling approaches rely on a combination of sampling methods (e.g. farthest point sampling [4] or grid sampling [5]) and neighbor query methods (e.g. kNN or radius query), which is time-consuming and not spatially well-aligned. To overcome this problem, we go beyond the pooling paradigm of combining sampling and query, and divide the point cloud into non-overlapping partitions to directly fuse points within the same partition. We use uniform grids as partition divider and achieve significant improvement.
|
| 20 |
+
|
| 21 |
+
In conclusion, we propose Point Transformer V2, which improves Point Transformer [1] from several perspectives:
|
| 22 |
+
|
| 23 |
+
• We propose an effective grouped vector attention (GVA) with a novel weight encoding layer that enables efficient information exchange within and among attention groups.
|
| 24 |
+
• We introduce an improved position encoding scheme to utilize point cloud coordinates better and further enhance the spatial reasoning ability of the model.
|
| 25 |
+
• We design the partition-based pooling strategy to enable more efficient and spatially betteraligned information aggregation compared to previous methods.
|
| 26 |
+
|
| 27 |
+
We conducted extensive analysis and controlled experiments to validate our designs. Our results indicate that PTv2 outperforms predecessor works and sets the new state-of-the-art on various 3D understanding tasks.
|
| 28 |
+
|
| 29 |
+
# 2 Related Works
|
| 30 |
+
|
| 31 |
+
Image transformers. With the great success of ViT [6], the absolute dominance of convolution in vision tasks is shaken by Vision Transformer, which becomes a trend in 2D image understanding [7, 8, 9, 10]. ViT introduces the far-reaching scaled dot-product self-attention and multi-head self-attention theory [3] in NLP into vision by considering image patches as tokens. However, operating global attention on the entire image consumes excessive memory. To solve the memory consumption problem, Swin Transformer [7] introduces the grid-based local attention mechanism to operate the transformer block in a sequence of shifted windows.
|
| 32 |
+
|
| 33 |
+
Point cloud understanding. Learning-based methods for processing 3D point clouds can be classified into the following types: projection-based, voxel-based, and point-based networks. An intuitive way to process irregular inputs like point clouds is to transform irregular representations into regular ones. Projection-based methods project 3D point clouds into various image planes and utilize 2D CNN-based backbones to extract feature representations [11, 12, 13, 14]. An alternative approach operates convolutions in 3D by transforming irregular point clouds into regular voxel representations [15, 16]. Those voxel-based methods suffer from inefficiency because of the sparsity of point clouds until the introduction and implementation of sparse convolution [17, 18]. Point-based methods extract features directly from the point cloud rather than projecting or quantizing irregular point clouds onto regular grids in 2D or 3D [19, 4, 20, 5]. The recently proposed transformer-based point cloud understanding approaches, introduced in the next paragraph, are also categorized into point-based methods.
|
| 34 |
+
|
| 35 |
+
Point cloud transformers. Transformer-based networks belong to the category of point-based networks for point cloud understanding. During the research upsurge of vision transformers, at almost the same period, Zhao et al. [1] and Guo et al. [21] published their explorations of applying attention to point cloud understanding, becoming pioneers in this direction. The PCT [21] proposed by Guo et al. performs global attention directly on the point cloud. Their work, similar to ViT, is limited by memory consumption and computational complexity. Meanwhile, based on the vector attention theory proposed in SAN [2], Point Transformer [1] proposed by Zhao et al. directly performs local attention between each point and its adjacent points, which alleviated the memory problem mentioned above. Point Transformer achieves remarkable results in multiple point cloud understanding tasks and state-of-art results for several competitive challenges. In this work, we analyze the limitations of the Point Transformer [1], and propose several novel architecture designs for the attention and pooling module, to improve the effectiveness and efficiency of the Point Transformer. Our proposed model, Point Transformer V2, performs better than the Point Transformer across a variety of 3D scene understating tasks.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: Comparison of the attention, position encoding, and pooling mechanisms between PTv1 and PTv2. Top-left: the vector attention (Sec. 3.1) with position encoding (Sec. 3.3) in PTv1 . Bottom-left: our grouped vector attention (Sec. 3.2, denoted by red) with improved position encoding (Sec. 3.3, denoted by blue) in PTv2. Top-right: the sampling-based pooling and interpolation-based unpooling in PTv1. Bottom-right: our partition-based pooling and unpooling in PTv2 (Sec. 3.4).
|
| 39 |
+
|
| 40 |
+
# 3 Point Transformer V2
|
| 41 |
+
|
| 42 |
+
We analyze the limitations of Point Transformer V1 (PTv1) [1] and propose our Point Transformer V2 (PTv2), including several improved modules upon PTv1. We begin by introducing the mathematical formulations and revisiting the vector self-attention used in PTv1 in Sec. 3.1. Based on the observation that the parameters of PTv1 increases drastically with the increased model depth and channel size, we propose our powerful and efficient grouped vector attention in Sec. 3.2. Further, we introduce our improved position encoding in Sec. 3.3 and the new pooling method in Sec. 3.4. We finally describe our network architecture in Sec. 3.5.
|
| 43 |
+
|
| 44 |
+
# 3.1 Problem Formulation and Background
|
| 45 |
+
|
| 46 |
+
Problem formulation. Let $\mathcal { M } = ( \mathcal { P } , \mathcal { F } )$ be a 3D point cloud scene containing a set of points $\pmb { x } _ { i } = ( \pmb { p } _ { i } , \pmb { f } _ { i } ) \in \mathcal { M }$ , where $\pmb { p } _ { i } \in \mathbb { R } ^ { 3 }$ represents the point position, and $\ b { f } _ { i } \in \mathbb { R } ^ { c }$ represents the point features. Point cloud semantic segmentation aims to predict a class label for each point $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ , and the goal of scene classification is to predict a class label for each scene $\mathcal { M }$ . $\mathcal { M } ( \pmb { p } )$ denotes a mapping function that maps the point at position $\pmb { p }$ to a subset of $\mathcal { M }$ denoted as “reference set”. Next, we revisit the self-attention mechanism used in PTv1 [1].
|
| 47 |
+
|
| 48 |
+
Local attention. Conducting the global attention [6, 21] over all points in a scene is computationally heavy and infeasible for large-scale 3D scenes. Therefore, we apply local attention where the attention for each point $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ works within a subset of points, i.e., reference point set, $\mathcal { M } ( \pmb { p } _ { i } )$ .
|
| 49 |
+
|
| 50 |
+
Shifted-grid attention [7], where attention is alternatively applied over two sets of non-overlapping image grids, has become is a common practice [22, 23, 24, 25] for image transformers. Similarly, the 3D space can be split into uniform non-overlapping grid cells, and the reference set is defined as the points within the same grid, i.e., $\mathcal { M } ( \pmb { p } _ { i } ) = \{ ( \pmb { p } _ { j } , \pmb { f } _ { j } ) \ | \ \pmb { p } _ { j }$ in the same grid cell as $\pmb { p } _ { i } \}$ . However, such attention relies on a cumbersome shift grid operation to achieve a global receptive field, and it does not work well on point clouds where the point densities within different grids are not consistent.
|
| 51 |
+
|
| 52 |
+
PTv1 adopts neighborhood attention, where the reference point set is a local neighborhood of the given point, i.e., $\mathcal { M } ( \pmb { p } _ { i } ) = \{ ( \pmb { p } _ { j } , \pmb { f } _ { j } ) \ | \ p _ { j } \in \mathrm { N e i g h b o r h o o d } ( \pmb { p } _ { i } ) \}$ . Specifically, the neighborhood point set $\mathcal { M } ( \pmb { p } _ { i } )$ is defined as the $k$ nearest neighboring (kNN) points of $\mathbf { \nabla } _ { \pmb { p } _ { i } }$ in PTv1. Our experiments (Sec. 4.3) show that neighborhood attention is more effective than shifted-grid attention, so our approach adopts the neighborhood attention.
|
| 53 |
+
|
| 54 |
+
Scalar attention and vector attention. Given a point $\pmb { x } _ { i } = ( \pmb { p } _ { i } , \pmb { f } _ { i } ) \in \mathcal { M }$ , we apply linear projections or MLPs to project the point features $f _ { i }$ to the feature vectors of query $\pmb q _ { i }$ , key $\boldsymbol { k } _ { i }$ , and value ${ \mathbf { } } v _ { i }$ each with $c _ { h }$ channels. The standard scalar attention (SA) operated on the point $x _ { i }$ and its reference point set $\mathcal { M } ( \pmb { p } _ { i } )$ can be represented as follows,
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
w _ { i j } = \langle q _ { i } , k _ { j } \rangle / \sqrt { c _ { h } } , \qquad \mathbf { f } _ { i } ^ { \mathrm { a t t n } } = \sum _ { \substack { \mathbf { x } _ { j } \in \mathcal { M } ( p _ { i } ) } } \operatorname { S o f t m a x } ( \pmb { w } _ { i } ) _ { j } \pmb { v } _ { j } ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
The attention weights in the above formulation are scalars computed from the scaled dot-product [3] between the query and key vectors. Multi-head scalar attention (MSA) [3] is an extension of SA which runs several scalar attentions in parallel. MSA is widely applied in transformers, and we will show in Sec. 3.2 that MSA is a degenerate case of our proposed grouped vector attention.
|
| 61 |
+
|
| 62 |
+
Instead of the scalar attention weights, PTv1 applies vector attention, where the attention weights are vectors that can modulate the individual feature channels. In SA, the scalar attention is computed by the scaled dot-product between the query and key vectors. In vector attention, a weight encoding function encodes the relation between query and key to a vector. The vector attention [2] is formulated as follows,
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
{ \pmb w } _ { i j } = \omega ( \gamma ( { \pmb q } _ { i } , { \pmb k } _ { j } ) ) , \qquad f _ { i } ^ { \mathrm { a t t n } } = \sum _ { { \pmb x } _ { j } \in \mathcal { M } ( { \pmb p } _ { i } ) } \mathrm { S o f t m a x } ( { \pmb W } _ { i } ) _ { j } \odot { \pmb v } _ { j } ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $\odot$ is the Hadamard product. $\gamma$ is a relation function (e.g., subtraction). $\omega : \mathbb { R } ^ { c } \mapsto \mathbb { R } ^ { c }$ is a learnable weight encoding (e.g., MLP) that computes the attention vectors to re-weight ${ \pmb v } _ { j }$ by channels before aggregation. Fig. 2 (a) shows a method using vector attention with linear weight encoding.
|
| 69 |
+
|
| 70 |
+
# 3.2 Grouped Vector Attention
|
| 71 |
+
|
| 72 |
+
In vector attention, as the network goes deeper and there are more feature encoding channels, the number of parameters for the weight encoding layer increases drastically. The large parameter size restricts the efficiency and generalization ability of the model. In order to overcome the limitations of vector attention, we introduce the grouped vector attention, as illustrated in Fig. 1 (left).
|
| 73 |
+
|
| 74 |
+
Attention groups. We divide channels of the value vector $v \in \mathbb { R } ^ { c }$ evenly into $g$ groups $( 1 \leq g \leq c )$ The weight encoding layer outputs a grouped attention vector with $g$ channels instead of $c$ channels. Channels of $\pmb { v }$ within the same attention group share the same scalar attention weight from the grouped attention vector. Mathematically,
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
{ \pmb w } _ { i j } = \omega ( \gamma ( { \pmb q } _ { i } , { \pmb k } _ { j } ) ) , \qquad { \pmb f } _ { i } ^ { a t t n } = \sum _ { x _ { j } } ^ { \mathcal { M } ( p _ { i } ) } \sum _ { l = 1 } ^ { g } \sum _ { m = 1 } ^ { c / g } { \mathrm { S o f t m a x } ( { \pmb W } _ { i } ) _ { j l } } v _ { j } ^ { l c / g + m } ,
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $\gamma$ is the relation function and $\omega : \mathbb { R } ^ { c } \mapsto \mathbb { R } ^ { g }$ is the learnable grouped weight encoding defined in the next paragraph. The second equation in Eq. 3 is the grouped vector aggregation. Fig. 2 (a) presents a vanilla GVA implemented by a fully connected weight encoding, the number of the grouped weight encoding function parameters reduced compared with the vector attention (Fig. 2 (b)), leading to a more powerful and efficient model.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
Figure 2: Comparison of various weight encoding functions. Each square represents a scalar, and each row of them represents a vector. The three rows represent relation vector, weight vector, and value vector from top to bottom. The attention groups are separated by dash lines. For demonstration, we assume the feature dimension is 4 and the number of attention groups (applicable to b, c, d) is 2. Lines with different colors refer to different operations, blue lines represent learnable parameters act on input relation scalar, while red lines represent multiply by the input relation scalar. Orange lines identify which value feature is affected by the input scalar weight.
|
| 84 |
+
|
| 85 |
+
GVA is a generalized formulation of VA and MSA. Our GVA degenerates to vector attention (VA) when $g = c$ , and it degenerates to multi-head self-attention (MSA) if $\omega$ in Eq. 3 is defined as follows,
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\omega ( r ) = r \underbrace { \left[ \begin{array} { c c c c } { \mathbf { 1 } _ { 1 \times c _ { g } } } & { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \cdot \cdot \cdot } & { \mathbf { 0 } _ { 1 \times c _ { g } } } \\ { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \mathbf { 1 } _ { 1 \times c _ { g } } } & { \cdot \cdot \cdot } & { \mathbf { 0 } _ { 1 \times c _ { g } } } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \cdot \cdot \cdot } & { \mathbf { 1 } _ { 1 \times c _ { g } } } \end{array} \right] ^ { T } } _ { g \times c _ { g } } \frac { 1 } { \sqrt { c _ { g } } } ,
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
where $c _ { g } = c / g$ and $r \in \mathbb { R } ^ { 1 \times c }$ .
|
| 92 |
+
|
| 93 |
+
Grouped linear. Inspired by the weight encoding function of MSA, we design the grouped linear layer $\zeta ( r ) : \mathbb { R } ^ { c } \mapsto \mathbb { R } ^ { g }$ where different groups of the input vector are projected with different parameters independently. Grouped linear further reduce the number of parameters in the weight encoding function. Our final adopted grouped weight encoding function is composed of the grouped linear layer, normalization layer, activation layer, and a fully connected layer to allow inter-group information exchange. Mathematically,
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\zeta ( r ) = r \underbrace { \left[ \begin{array} { c c c c c } { p _ { 1 } } & { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \cdot \cdot \cdot } & { \mathbf { 0 } _ { 1 \times c _ { g } } } \\ { \mathbf { 0 } _ { 1 \times c _ { g } } } & { p _ { 2 } } & { \cdot \cdot \cdot } & { \mathbf { 0 } _ { 1 \times c _ { g } } } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { \underbrace { \mathbf { 0 } _ { 1 \times c _ { g } } } } & { \mathbf { 0 } _ { 1 \times c _ { g } } } & { \cdot \cdot \cdot } & { p _ { g } } \end{array} \right] } _ { \mathcal { J } \times \mathcal { C } _ { g } } ,
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $c _ { g } = c / g , p _ { 1 } , \ldots , p _ { g } \in \mathbb { R } _ { g } ^ { c }$ are learnable parameters, and $\circ$ represents function composition.
|
| 100 |
+
|
| 101 |
+
# 3.3 Position Encoding Multipler
|
| 102 |
+
|
| 103 |
+
Different from the discrete, regular-grid pixels in 2D images, points in the 3D point cloud are unevenly distributed in a continuous Euclidean Metric space, making the spatial relationship in 3D point cloud much more complicated than 2D images. In transformers and attention modules, the spatial information is obtained with the position encoding $\delta _ { b i a s } ( \pmb { p } _ { i } - \pmb { p } _ { j } )$ added to the relation vector $\gamma ( q _ { i } , k _ { j } )$ as a bias.
|
| 104 |
+
|
| 105 |
+
Due to the generalization limitation of vector attention in PTv1 mentioned in Sec. 3.2, adding more position encoding capacity to vector attention will not help to improve the performance. In PTv2, the grouped vector attention has an effect of reducing overfitting and enhancing generalization. With grouped vector attention restricting the capacity of the attention mechanism, we strengthen the position encoding with an additional multiplier $\delta _ { m u l } ( \pmb { p } _ { i } - \pmb { p } _ { j } )$ to the relation vector, which focuses on learning complex point cloud positional relations. As shown in Fig. 1 (left), our improved position
|
| 106 |
+
|
| 107 |
+
encoding is as follows,
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\pmb { w } _ { i j } = \omega \big ( \delta _ { m u l } \big ( \pmb { p } _ { i } - \pmb { p } _ { j } \big ) \odot \gamma \big ( \pmb { q } _ { i } , \pmb { k } _ { j } \big ) + \delta _ { b i a s } \big ( \pmb { p } _ { i } - \pmb { p } _ { j } \big ) \big ) ,
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $\odot$ is the Hadamard product. $\delta _ { m u l } , \delta _ { b i a s } : \mathbb { R } ^ { d } \mapsto \mathbb { R } ^ { d }$ are two MLP position encoding functions, which take relative positions as input. Position encoding multiplier compliments group vector attention to achieve a good balance of network capacity.
|
| 114 |
+
|
| 115 |
+
# 3.4 Partition-based Pooling
|
| 116 |
+
|
| 117 |
+
Traditional sampling-based pooling procedures adopted by other point-based methods use a combination of sampling and query methods. In the sampling stage, farthest point sampling [4] or grid sampling [5] is used to sample points reserved for the following encoding stage. For each sampled point, a neighbor query is performed to aggregate information from the neighboring points. In these sampling-based pooling procedures, the query sets of points are not spatially-aligned since the information density and overlap among each query set are not controllable. To address the problem, we propose a more efficient and effective partition-based pooling approach, as shown in Fig. 1.
|
| 118 |
+
|
| 119 |
+
Pooling. Given a point set $\mathcal { M } = ( \mathcal { P } , \mathcal { F } )$ , we partition $\mathcal { M }$ into subsets $[ \mathcal { M } _ { 1 } , \mathcal { M } _ { 2 } , . . . , \mathcal { M } _ { n ^ { \prime } } ]$ by separating the space into non-overlapping partitions. We fusion each subset of points $\mathcal { M } _ { i } = ( \mathcal { P } _ { i } , \mathcal { F } _ { i } )$ from a single partition as follows,
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array} { r } { \pmb { f } _ { i } ^ { \prime } = \pmb { \mathrm { M a x P o o l } } ( \{ f _ { j } U \mid f _ { j } \in \mathscr { F } _ { i } \} ) , \qquad \pmb { p } _ { i } ^ { \prime } = \pmb { \mathrm { M e a n P o o l } } ( \{ p _ { j } \mid p _ { j } \in \mathscr { P } _ { i } \} ) , } \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
where $( p _ { i } ^ { \prime } , f _ { i } ^ { \prime } )$ is the position and features of pooling point aggregated form subset $\mathcal { M } _ { i }$ , and $U \in$ $\mathbb { R } ^ { c \times c ^ { \prime } }$ is the linear projection. Collecting the pooling points from $n ^ { \prime }$ subsets gives us the point set $\mathcal { M } ^ { \prime } = \{ p _ { i } ^ { \prime } , f _ { i } ^ { \prime } \} _ { i = 1 } ^ { n ^ { \prime } }$ for the next stage of encoding. In our implementation, we use uniform grids to partition the point cloud space, and thus our partition-based pooling is also called grid pooling.
|
| 126 |
+
|
| 127 |
+
Unpooling. The common practice of unpooling by interpolation is also applicable to partition-based pooling. Here we introduce a more straightforward and efficient unpooling method. To unpool the fused point set $\mathcal { M } ^ { \prime }$ back to $\mathcal { M }$ , the point locations in $\mathcal { M }$ are record from the pooling process, and we only need to obtain the features for each point in $\mathcal { M }$ . With the help of the grid-based partitioning $[ \mathcal { M } _ { 1 } , \mathcal { M } _ { 2 } , . . . , \mathcal { M } _ { n ^ { \prime } } ]$ during the pooling stage, we can map point feature to all points from the same subset,
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\pmb { f } _ { i } ^ { u p } = \pmb { f } _ { j } ^ { \prime } , \qquad \mathrm { i f } \left( \pmb { p } _ { i } , \pmb { f } _ { i } \right) \in \mathcal { M } _ { j } .
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
# 3.5 Network Architecture
|
| 134 |
+
|
| 135 |
+
Backbone structure. Following previous works [18, 1], we adopt the U-Net architecture with skip connections. There are four stages of encoders and decoders with block depths [2, 2, 6, 2] and [1, 1, 1, 1], respectively. The grid size multipliers for the four stages are $[ \mathrm { x } 3 . 0 , \mathrm { x } 2 . 5 , \mathrm { x } 2 . 5 , \mathrm { x } 2 . 5 ]$ , representing the expansion ratio over the previous pooling stage. The attention is conducted in a local neighborhood, described in “neighborhood attention” in Sec. 3.1. In Sec. 4.3 we compare the neighborhood attention with shift-grid attention.
|
| 136 |
+
|
| 137 |
+
The initial feature dimension is 48, and we first embed the input channels to this number with a basic block with attention groups of 6. Then, we double this feature dimension and attention groups each time entering the next encoding stage. For the four encoding stages, the feature dimensions are [96, 192, 384, 384], and the corresponding attention groups are [12, 24, 48, 48].
|
| 138 |
+
|
| 139 |
+
Output head. For point cloud semantic segmentation, we apply an MLP to map point features produced by the backbone to the final logits for each point in the input point set. For point cloud classification, we apply global average pooling over the point features produced by the encoding stages to obtain a global feature vector, followed by an MLP classifier for prediction.
|
| 140 |
+
|
| 141 |
+
# 4 Experiments
|
| 142 |
+
|
| 143 |
+
To validate the effectiveness of the proposed method, we conduct experimental evaluations on ScanNet v2 [44] and S3DIS [45] for semantic segmentation, and ModelNet40 [46] for shape classification. Implementation details are available in the appendix.
|
| 144 |
+
|
| 145 |
+
Table 1: Semantic segmentation on ScanNet v2.
|
| 146 |
+
|
| 147 |
+
<table><tr><td>Method PointNet++ [4]</td><td>Input</td><td>Val</td><td>Test</td></tr><tr><td>3DMV[26] PanopticFusion [27] PointCNN [28] PointConv [29] JointPointBased [30] PointASNL [31] SegGCN [32] RandLA-Net [33] KPConv [5] JSENet [34] FusionNet [35] SparseConvNet [17]</td><td>point point point point point point point point point point point point voxel</td><td>53.5 1 - = 61.0 69.2 63.5 1 = 69.2 - =</td><td>55.7 48.4 52.9 45.8 66.6 63.4 66.6 58.9 64.5 68.6 69.9 68.8</td></tr><tr><td>MinkUNet [18] PTv1[1] PTv2 (ours)</td><td>voxel point point</td><td>69.3 72.2 70.6 75.4</td><td>72.5 73.6 = 75.2</td></tr></table>
|
| 148 |
+
|
| 149 |
+
Table 2: Semantic segmentation on S3DIS Area 5.
|
| 150 |
+
|
| 151 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Input</td><td rowspan=1 colspan=1>OA mAcc mIoU</td></tr><tr><td rowspan=2 colspan=1>PointNet [19]SegCloud [36]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 49.0 41.1</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>- 57.4 48.9</td></tr><tr><td rowspan=1 colspan=1>TanConv [37]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 62.2 52.6</td></tr><tr><td rowspan=1 colspan=1>PointCNN [28]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>85.9 63.9 57.3</td></tr><tr><td rowspan=1 colspan=1>PointWeb [20]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.0 66.6 60.3</td></tr><tr><td rowspan=1 colspan=1>HPEIN [38]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.2 68.3 61.9</td></tr><tr><td rowspan=1 colspan=1>GACNet [39]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.8 1 62.9</td></tr><tr><td rowspan=1 colspan=1>PAT [40]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 70.8 60.1</td></tr><tr><td rowspan=1 colspan=1>ParamConv [41]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>= 67.0 58.3</td></tr><tr><td rowspan=1 colspan=1>SPGraph [42]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>86.4 66.5 58.0</td></tr><tr><td rowspan=1 colspan=1>SegGCN [32]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>88.2 70.4 63.6</td></tr><tr><td rowspan=1 colspan=1>MinkUNet [18]</td><td rowspan=1 colspan=1>voxel</td><td rowspan=1 colspan=1>1 71.7 65.4</td></tr><tr><td rowspan=2 colspan=1>PAConv [43]KPConv [5]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 - 66.6</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 72.8 67.1</td></tr><tr><td rowspan=2 colspan=1>PTv1[1]PTv2 (ours)</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>90.8 76.5 70.4</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>91.1 77.9 71.6</td></tr></table>
|
| 152 |
+
|
| 153 |
+
# 4.1 Semantic Segmentation
|
| 154 |
+
|
| 155 |
+
Data and metric. For semantic segmentation, we experiment on ScanNet v2 [44] and S3DIS [45]. The ScanNet v2 dataset contains 1,513 room scans reconstructed from RGB-D frames. The dataset is divided into 1,201 scenes for training and 312 for validation. Point clouds for the model input are sampled from vertices of reconstructed meshes, and each sampled point is assigned a semantic label from 20 categories (wall, floor, table, etc.). The S3DIS dataset for semantic scene parsing consists of 271 rooms in six areas from three different buildings. Following a common protocol [36, 4, 1], area 5 is withheld during training and used for testing. Different from ScanNet v2, points of S3DIS are densely sampled on the mesh surfaces and annotated into 13 categories. Following a standard protocol [4], we use mean class-wise intersection over union (mIoU) as the evaluation metric for validation and test set of ScanNet v2. And we use mean class-wise intersection over union (mIoU), mean of class-wise accuracy (mAcc), and overall point-wise accuracy (OA) for evaluating performance on S3DIS area5.
|
| 156 |
+
|
| 157 |
+
Performance comparison. Table 1 and Table 2 show the results of our PTv2 model compared with previous methods on ScanNet v2 and S3DIS, respectively. Our PTv2 model outperforms prior methods in all evaluation metrics. Notably, PTv2 significantly outperforms PTv1 [1] by $4 . 8 \%$ mIoU on the ScanNet v2 validation set.
|
| 158 |
+
|
| 159 |
+
Visualization. The qualitative results of point cloud semantic segmentation are shown in Fig. 3 and Fig. 4. Our PTv2 model is able to predict semantic segmentation results that are quite close the ground-truth. It is worth noting that our model can capture the detailed structure information and predict the correct semantics for challenging scenarios. For example, in the S3DIS scenes with chairs, PTv2 is able to cleanly predict the chair legs and armrests.
|
| 160 |
+
|
| 161 |
+
# 4.2 Shape Classification
|
| 162 |
+
|
| 163 |
+
Data and metric. We test our proposed PTv2 model for 3D point cloud classification on ModelNet40 dataset. The ModelNet40 [46] dataset consists of 12,311 CAD models belonging to 40 object categories. 9,843 models are split out for training, and the rest 2,468 models are reserved for testing. Following the common practice in the community, we report the class-average accuracy (mAcc) and overall accuracy (OA) on the test set.
|
| 164 |
+
|
| 165 |
+
Performance comparison. We test our PTv2 model and compare it with previous models on the ModelNet40 dataset for shape classification. Results are shown in Table 3, demonstrating that our proposed PTv2 model achieves state-of-the-art performance on ModelNet40 shape classification.
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 3: Visualization of semantic segmentation results on ScanNet v2.
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 4: Visualization of semantic segmentation results on S3DIS.
|
| 172 |
+
|
| 173 |
+
# 4.3 Ablation Study
|
| 174 |
+
|
| 175 |
+
We conduct ablation studies to examine the effectiveness of each module in our design. The ablation study results are reported on ScanNet v2 validation set.
|
| 176 |
+
|
| 177 |
+
Attention type. We first investigate the effects of different attention designs. We experiment with two types of local attention introduced in Sec. 3.1, namely shifted-grid attention and neighborhood attention [1]. Then, to validate the effectiveness of our proposed grouped vector attention (denoted as “GVA”), we compare it with the commonly-used multi-head self-attention (denoted as “MSA”). We use the vanilla position encoding in PTv1 [1] and our proposed partition-based pooling scheme in all of the experiments in Table 4. It shows neighborhood attention performs significantly better than shiftedgrid attention, indicating that the neighborhood attention is better suited for point clouds which are non-uniformly distributed. Moreover, our proposed grouped vector attention consistently outperforms the commonly-used multi-head self-attention with both shifted-grid attention and neighborhood attention. So our grouped vector attention is not only more efficient, but also more effective, than multi-head self-attention. The comparison between GVA and MSA indicates the effectiveness of the learnable parameters in the grouped linear layer of the grouped weight encoding in Sec. 3.2.
|
| 178 |
+
|
| 179 |
+
Weight encoding. We study the effects of different weight encoding functions $\omega$ in Table 6. The weight encoding functions are introduced in Sec. 3.1 and Sec. 3.2, and different attention mechanisms adopt different weight encoding functions. We use the vanilla position encoding in PTv1 [1] and our proposed grid pooling scheme in all of the experiments in Table 6. We experimented with the following weight encoding functions: (1) The weight encoding for multi-head scalar attention in Eq. 4, denoted as “MSA”. (2) Weight encoding as a linear layer denoted as “L”. (3) The grouped linear layer, which is $\zeta$ in Eq. 5, denoted as “GL”. (4) The linear layer followed by batch normalization, activation, and another linear layer, denoted as $\cdot \mathrm { ^ { \circ } L + N + A + L } ^ { \mathrm { , \circ } }$ . (5) The grouped linear layer, followed by batch normalization, activation, and a linear layer, denoted as $\scriptstyle \mathbf { \ddot { G L + N + A + L } } ^ { }$ . (5) is also the grouped weight encoding function used for our grouped vector attention, introduced as $\omega$ in Eq. 5. Results in Table 6 demonstrate that our grouped weight encoding function outperforms other compared designs. Specifically, comparing (1), (3) and (5), GL slightly outperforms MSA but adding additional inter-group information exchange combined with proper normalization and activation can boost the performance to be better than MSA. Moreover, the comparison between (5) and (4) and the comparison between (3) and (2) both indicate that our grouped linear layer outperforms the naive linear layer, even though the grouped linear layer has $g$ times fewer parameters and requires less computing than the linear layer.
|
| 180 |
+
|
| 181 |
+
Table 3: Shape classification on ModelNet40.
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Method</td><td>mAcc (%)</td><td>OA (%)</td></tr><tr><td>PointNet [19]</td><td>86.0</td><td>89.2</td></tr><tr><td>PointNet++ [4]</td><td>=</td><td>91.9</td></tr><tr><td>PointCNN[28]</td><td>88.1</td><td>92.5</td></tr><tr><td>PointConv [29]</td><td>-</td><td>92.5</td></tr><tr><td>KPConv [5]</td><td>1</td><td>92.9</td></tr><tr><td>DGCNN [47]</td><td>90.2</td><td>92.9</td></tr><tr><td>RS-CNN [48]</td><td>-</td><td>92.9</td></tr><tr><td>PointASNL [31]</td><td>=</td><td>92.9</td></tr><tr><td>DensePoint [49]</td><td></td><td>93.2</td></tr><tr><td>PosPool [50]</td><td>=</td><td>93.2</td></tr><tr><td>GBNet [51]</td><td>91.0</td><td>93.8</td></tr><tr><td>PCT[21]</td><td></td><td>93.2</td></tr><tr><td>PA-DGC [43]</td><td></td><td>93.9</td></tr><tr><td>CurveNet [52]</td><td>=</td><td>94.2</td></tr><tr><td>PTv1[1]</td><td>90.6</td><td>93.7</td></tr><tr><td>PTv2 (ours)</td><td>91.6</td><td>94.2</td></tr></table>
|
| 184 |
+
|
| 185 |
+
Table 4: Attention type ablation.
|
| 186 |
+
|
| 187 |
+
<table><tr><td>Local Type</td><td>Mechanism Type</td><td>mIoU (%)</td></tr><tr><td rowspan="2">Shifted-Grid</td><td>MSA</td><td>71.6</td></tr><tr><td>GVA</td><td>72.5</td></tr><tr><td rowspan="2">Neighborhood</td><td>MSA</td><td>73.9</td></tr><tr><td>GVA</td><td>75.0</td></tr></table>
|
| 188 |
+
|
| 189 |
+
Table 5: Pooling method ablation.
|
| 190 |
+
|
| 191 |
+
<table><tr><td>Pooling Method</td><td>Pooling Ratio</td><td>Grid Size Multipliers</td><td>mIoU (%)</td></tr><tr><td>FPS</td><td>1/4 1/6</td><td>- -</td><td>74.4 72.9</td></tr><tr><td rowspan="3">Grid</td><td>~1/4</td><td>[x3.0,×2.0,×2.0,×2.0]</td><td>75.2</td></tr><tr><td>~1/4</td><td>[x4.0,×2.0,×2.0,×2.0]</td><td>75.0</td></tr><tr><td>~1/6 ~1/6</td><td>[x3.0,×2.5,×2.5,×2.5] [x4.0,×2.5,×2.5,×2.5]</td><td>75.4 74.7</td></tr></table>
|
| 192 |
+
|
| 193 |
+
Table 6: Weight encoding ablation.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>ID</td><td>Weight encoding</td><td>mIoU (%)</td></tr><tr><td>(1)</td><td>MSA</td><td>73.9</td></tr><tr><td>(2)</td><td>L</td><td>73.8</td></tr><tr><td>(3)</td><td>GL</td><td>74.1</td></tr><tr><td>(4)</td><td>L+N+A+L</td><td>74.7</td></tr><tr><td>(5)</td><td>GL+N+A+L (ours)</td><td>75.0</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Table 7: Module design ablation.
|
| 198 |
+
|
| 199 |
+
<table><tr><td>ID</td><td>GVA</td><td>PE Mul</td><td>Grid Pool</td><td>Map Unpool</td><td>mIoU (%)</td></tr><tr><td>I</td><td></td><td></td><td></td><td></td><td>72.3</td></tr><tr><td>II</td><td></td><td></td><td></td><td></td><td>73.8</td></tr><tr><td>Ⅲ</td><td><<>></td><td>三</td><td></td><td></td><td>74.4</td></tr><tr><td>IV</td><td></td><td></td><td>~</td><td></td><td>74.9</td></tr><tr><td>V</td><td></td><td></td><td></td><td>√</td><td>75.4</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Pooling methods. In Sec. 3.4 we discuss the potential limitations of the sampling-based pooling in PTv1 and propose a new pooling and unpooling scheme based on non-overlapping partitions. We also name a simple and effective grid-based implement of our partition-based pooling as grid pooling. To further examine the superiority of our method, we experiment with different pooling-unpooling schemes in Table 5.
|
| 202 |
+
|
| 203 |
+
For our partition-based pooling implemented by a grid, the base grid size is 0.02 meters, which is identical to the voxelization grid size during data pre-processing. The grid size multipliers are the grid size expansion ratio over the previous pooling stage. For example, $[ \times 4 . 0 , \times 2 . 0 , \times 2 . 0 , \times 2 . 0 ]$ means that the grid sizes are: [0.08, 0.16, 0.32, 0.64] meters, respectively. We choose a relatively large value for initial grid sizes $( \times 3 . 0$ and $\times 4 . 0 \dot s$ ) to provide sufficiently large receptive fields, which is analogous to the common practice in image transformers [6]. For subsequent pooling stages, we observe that $\times 2 . 0$ grid size increase results in an approximate pooling ratio of 4 for the point cloud, while $\times 2 . 5$ grid size increase results in an approximate pooling ratio of 6. We choose the same sampling ratio of 4 and 6 for sampling-based pooling to ensure a fair comparison.
|
| 204 |
+
|
| 205 |
+
The results in Table 5 illustrate that our partition-based pooling achieves higher mIoU than the sampling-based method. For sampling-based pooling with farthest point sampling, the performance decreases significantly when the sampling ratio increases from 4 to 6. However, for our partition-based pooling implemented by grid, we observe that initial grid size and subsequent grid size multipliers do not significantly affect the overall performance, so we can use larger grid sizes to reduce the number of points in each stage to save memory.
|
| 206 |
+
|
| 207 |
+
Module design. We ablate different modules introduced in our PTv2: grouped vector attention (VGA), position encoding multiplier (PE Mul), partition-based pooling implemented by grid (Grid Pool), and partition map unpooling (Map Unpool) and the results are illustrated in Table 7. The model adopts in Experiment I is PTv1 [1], which serves as a baseline result of our design. Benefiting from structural parameter adjustments and better data processing, which are also shared with the rest of the experiments, our baseline result increased from $7 0 . 6 \%$ to $7 2 . 3 \%$ . Experiment $\mathrm { I I }$ to $\mathrm { v }$ add each of our proposed components in turns, gradually increasing our baseline result to $7 5 . 4 \%$ . The increasing mIOU indicates the effectiveness of each component.
|
| 208 |
+
|
| 209 |
+
Table 8: Model performance and amortized latency with different pooling methods.
|
| 210 |
+
|
| 211 |
+
<table><tr><td></td><td colspan="2">FPS-kNN [4]</td><td colspan="2">Grid-kNN [5]</td><td colspan="2">Grid pooling (ours)</td></tr><tr><td>Pooling Rate</td><td>1/4</td><td>1/6</td><td>~1/4</td><td>~1/6</td><td>~1/4</td><td>~1/6</td></tr><tr><td>Time (ms)</td><td>1007</td><td>785</td><td>389</td><td>356</td><td>318</td><td>266</td></tr><tr><td>mIoU (%)</td><td>74.4</td><td>72.9</td><td>74.1</td><td>73.4</td><td>75.2</td><td>75.4</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Table 9: Model parameters and amortized latency of several networks.
|
| 214 |
+
|
| 215 |
+
<table><tr><td></td><td>① PTv1</td><td>② ��� + GVA (L)</td><td>③ ① + GVA (GL)</td><td>④ ① + GVA (GL-N-A-L)</td><td>⑤ ④+GP</td><td>⑥ ⑤+PEM</td></tr><tr><td>Params (M)</td><td>11.4</td><td>9.8</td><td>9.6</td><td>9.6</td><td>9.6</td><td>12.8</td></tr><tr><td>Time (ms)</td><td>1023</td><td>991</td><td>951</td><td>971</td><td>220</td><td>266</td></tr><tr><td>mIoU (%)</td><td>72.3</td><td>73.0</td><td>73.2</td><td>74.2</td><td>75.0</td><td>75.4</td></tr></table>
|
| 216 |
+
|
| 217 |
+
# 4.4 Model Complexity and Latency
|
| 218 |
+
|
| 219 |
+
We further conduct model complexity and latency studies to examine the superior efficiency of several design in our work. We record the amortized forward time for each scan in the ScanNet v2 validation set with batch size 4 on a single TITAN RTX.
|
| 220 |
+
|
| 221 |
+
Pooling methods. Table 8 shows the forward time and mIoU of PTv2 with different pooling methods and pooling ratios. We compare our pooling method with two classical sampling-based pooling methods: FPS-kNN and Grid-kNN. FPS-kNN pooling [4, 1] uses farthest point sampling (FPS) to sample a specified number of points and then query $k$ nearest neighbor points for pooling. We call the pooling method in Strided KPConv [5] Grid-kNN pooling, as it uses a uniform grid to sample points and then applies the kNN method to index neighbors. This leads to uncontrollable overlaps of the pooling receptive fields. As shown in the table, our grid pooling method is not only faster but also achieves higher mIoUs.
|
| 222 |
+
|
| 223 |
+
Module design. Table 9 summarizes comparisons of model complexity, time consumption, and evaluation performances on ScanNet v2 validation set. Meanwhile, we drop the first batch of forwarding time for GPU preparation. In Table 9, GVA refers to grouped vector attention. L refers to grouped weight encoding implemented by a single Linear. GL refers to grouped weight encoding implemented by a Grouped Linear. GL-N-A-L refers to the grouped linear layer, followed by batch normalization, activation, and a linear layer as grouped weight encoding function. GP refers to partition-based pooling implemented by grid. PEM refers to the position encoding multiplier. To ensure fair comparison, PTv1 is set to be the same depth and feature dimensions as our model architecture of PTv2. By comparing experiment $\textcircled{1}$ and $\textcircled{2}$ , we can study the effect of GVA. The same spirit goes on for experiment $\textcircled{3}$ , $\textcircled{4}$ , and $\textcircled{5}$ , where each experiments adds one additional module, so that we can study the effect of the added module respectively.
|
| 224 |
+
|
| 225 |
+
Comparing experiments $\textcircled{1}$ , $\textcircled{2}$ , $\textcircled{3}$ , and $\textcircled{4}$ , the introduction of grouped vector attention (GVA) with grouped weight encoding dramatically improves the model performance and slightly reduces execution time. The comparison between $\textcircled{4}$ and $\textcircled{5}$ indicates that the grid pooling strategy can significantly speed up the network and further enhance the generalization ability of our model. Position encoding multiplier is the only design that increases the number of model parameters, but experiment $\textcircled{6}$ demonstrates its effectiveness in improving performance. Meanwhile, our model is still lightweight compared to voxel-based backbones, such as MinkUNet42 [18] with 37.9M parameters.
|
| 226 |
+
|
| 227 |
+
# 5 Conclusion
|
| 228 |
+
|
| 229 |
+
We propose Point Transformer V2 (PTv2), a powerful and efficient transformer-based backbone for 3D point cloud understanding. Our work makes several non-trivial improvements upon Point Transformer V1 [1], including the grouped vector attention, improved position encoding, and partitionbased pooling. Our PTv2 model achieves state-of-the-art performance on point cloud classification and semantic segmentation benchmarks.
|
| 230 |
+
|
| 231 |
+
# Acknowledgements
|
| 232 |
+
|
| 233 |
+
This work is supported in part by HKU Startup Fund and HKU Seed Fund for Basic Research. We also appreciate the supporting of computing resources by SmartMore Corporation.
|
| 234 |
+
|
| 235 |
+
References [1] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021.
|
| 236 |
+
1, 2, 3, 6, 7, 8, 9, 10, 14, 15, 16 [2] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In CVPR,
|
| 237 |
+
2020. 1, 3, 4 [3] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 4 [4] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, 2017. 2, 6, 7, 9, 10, 15, 16 [5] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatriz Marcotegui, François Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. In ICCV, 2019. 2, 6, 7,
|
| 238 |
+
9, 10, 15, 16 [6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021.
|
| 239 |
+
2, 4, 9 [7] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. ICCV, 2021. 2, 4 [8] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In ICCV, 2021. 2 [9] Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. arXiv:2107.00652, 2021. 2 [10] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. 2 [11] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik G. Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In ICCV, 2015. 2 [12] Bo Li, Tianlei Zhang, and Tian Xia. Vehicle detection from 3d lidar using fully convolutional network. In RSS, 2016. 2 [13] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. 2 [14] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019. 2 [15] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In IROS, 2015. 2 [16] Shuran Song, Fisher Yu, Andy Zeng, Angel X Chang, Manolis Savva, and Thomas Funkhouser. Semantic scene completion from a single depth image. In CVPR, 2017. 2 [17] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In CVPR, 2018. 2, 7 [18] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In CVPR, 2019. 2, 6, 7, 10 [19] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 2, 7, 9 [20] Hengshuang Zhao, Li Jiang, Chi-Wing Fu, and Jiaya Jia. Pointweb: Enhancing local neighborhood features for point cloud processing. In CVPR, 2019. 2, 7 [21] Meng-Hao Guo, Jun-Xiong Cai, Zheng-Ning Liu, Tai-Jiang Mu, Ralph R Martin, and Shi-Min Hu. Pct: Point cloud transformer. Computational Visual Media, 2021. 2, 4, 9
|
| 240 |
+
[22] Bowen Cheng, Alexander G. Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for semantic segmentation. In NeurIPS, 2021. 4
|
| 241 |
+
[23] Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, and Rohit Girdhar. Maskedattention mask transformer for universal image segmentation. In CVPR, 2022. 4
|
| 242 |
+
[24] Zhenda Xie, Zheng Zhang, Yue Cao, Yutong Lin, Jianmin Bao, Zhuliang Yao, Qi Dai, and Han Hu. Simmim: A simple framework for masked image modeling. In CVPR, 2022. 4
|
| 243 |
+
[25] Hao Zhang, Feng Li, Shilong Liu, Lei Zhang, Hang Su, Jun Zhu, Lionel M. Ni, and Heung-Yeung Shum. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. arXiv preprint arXiv:2203.03605, 2022. 4
|
| 244 |
+
[26] Angela Dai and Matthias Nießner. 3dmv: Joint 3d-multi-view prediction for 3d semantic scene segmentation. In ECCV, 2018. 7
|
| 245 |
+
[27] Gaku Narita, Takashi Seno, Tomoya Ishikawa, and Yohsuke Kaji. Panopticfusion: Online volumetric semantic mapping at the level of stuff and things. In IROS, 2019. 7
|
| 246 |
+
[28] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. NeurIPS, 2018. 7, 9
|
| 247 |
+
[29] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In CVPR, 2019. 7, 9
|
| 248 |
+
[30] Hung-Yueh Chiang, Yen-Liang Lin, Yueh-Cheng Liu, and Winston H Hsu. A unified point-based framework for 3d segmentation. In 3DV, 2019. 7
|
| 249 |
+
[31] Xu Yan, Chaoda Zheng, Zhen Li, Sheng Wang, and Shuguang Cui. Pointasnl: Robust point clouds processing using nonlocal neural networks with adaptive sampling. In CVPR, 2020. 7, 9
|
| 250 |
+
[32] Huan Lei, Naveed Akhtar, and Ajmal Mian. Seggcn: Efficient 3d point cloud segmentation with fuzzy spherical kernel. In CVPR, 2020. 7
|
| 251 |
+
[33] Qingyong Hu, Bo Yang, Linhai Xie, Stefano Rosa, Yulan Guo, Zhihua Wang, Niki Trigoni, and Andrew Markham. Randla-net: Efficient semantic segmentation of large-scale point clouds. In CVPR, 2020. 7
|
| 252 |
+
[34] Zeyu Hu, Mingmin Zhen, Xuyang Bai, Hongbo Fu, and Chiew-lan Tai. Jsenet: Joint semantic segmentation and edge detection network for 3d point clouds. In ECCV, 2020. 7
|
| 253 |
+
[35] Feihu Zhang, Jin Fang, Benjamin Wah, and Philip Torr. Deep fusionnet for point cloud semantic segmentation. In ECCV, 2020. 7
|
| 254 |
+
[36] Lyne Tchapmi, Christopher Choy, Iro Armeni, JunYoung Gwak, and Silvio Savarese. Segcloud: Semantic segmentation of 3d point clouds. In 3DV, 2017. 7
|
| 255 |
+
[37] Maxim Tatarchenko, Jaesik Park, Vladlen Koltun, and Qian-Yi Zhou. Tangent convolutions for dense prediction in 3d. In CVPR, 2018. 7
|
| 256 |
+
[38] Li Jiang, Hengshuang Zhao, Shu Liu, Xiaoyong Shen, Chi-Wing Fu, and Jiaya Jia. Hierarchical point-edge interaction network for point cloud semantic segmentation. In ICCV, 2019. 7
|
| 257 |
+
[39] Lei Wang, Yuchun Huang, Yaolin Hou, Shenman Zhang, and Jie Shan. Graph attention convolution for point cloud semantic segmentation. In CVPR, 2019. 7
|
| 258 |
+
[40] Jiancheng Yang, Qiang Zhang, Bingbing Ni, Linguo Li, Jinxian Liu, Mengdie Zhou, and Qi Tian. Modeling point clouds with self-attention and gumbel subset sampling. In CVPR, 2019. 7
|
| 259 |
+
[41] Shenlong Wang, Simon Suo, Wei-Chiu Ma, Andrei Pokrovsky, and Raquel Urtasun. Deep parametric continuous convolutional neural networks. In CVPR, 2018. 7
|
| 260 |
+
[42] Loic Landrieu and Martin Simonovsky. Large-scale point cloud semantic segmentation with superpoint graphs. In CVPR, 2018. 7
|
| 261 |
+
[43] Mutian Xu, Runyu Ding, Hengshuang Zhao, and Xiaojuan Qi. Paconv: Position adaptive convolution with dynamic kernel assembling on point clouds. In CVPR, 2021. 7, 9
|
| 262 |
+
[44] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, 2017. 6, 7, 14
|
| 263 |
+
[45] Iro Armeni, Ozan Sener, Amir R. Zamir, Helen Jiang, Ioannis Brilakis, Martin Fischer, and Silvio Savarese. 3d semantic parsing of large-scale indoor spaces. In CVPR, 2016. 6, 7, 14
|
| 264 |
+
[46] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, 2015. 6, 7, 14
|
| 265 |
+
[47] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. TOG, 2019. 9
|
| 266 |
+
[48] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In CVPR, 2019. 9
|
| 267 |
+
[49] Yongcheng Liu, Bin Fan, Gaofeng Meng, Jiwen Lu, Shiming Xiang, and Chunhong Pan. Densepoint: Learning densely contextual representation for efficient point cloud processing. In ICCV, 2019. 9
|
| 268 |
+
[50] Ze Liu, Han Hu, Yue Cao, Zheng Zhang, and Xin Tong. A closer look at local aggregation operators in point cloud analysis. In ECCV, 2020. 9
|
| 269 |
+
[51] Shi Qiu, Saeed Anwar, and Nick Barnes. Geometric back-projection network for point cloud classification. TMM, 2021. 9
|
| 270 |
+
[52] Tiange Xiang, Chaoyi Zhang, Yang Song, Jianhui Yu, and Weidong Cai. Walk in the cloud: Learning curves for point clouds shape analysis. In ICCV, 2021. 9
|
parse/dev/I3mLa12s_H/I3mLa12s_H_content_list.json
ADDED
|
@@ -0,0 +1,1218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Point Transformer V2: Grouped Vector Attention and Partition-based Pooling ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
199,
|
| 8 |
+
122,
|
| 9 |
+
800,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Xiaoyang $\\mathbf { W } \\mathbf { u } ^ { 1 }$ Yixing Lao2 Li Jiang3 Xihui Liu1 Hengshuang Zhao1∗ 1The University of Hong Kong 2Intel Labs 3Max Planck Institute {xywu3, hszhao}@cs.hku.hk ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
220,
|
| 19 |
+
224,
|
| 20 |
+
767,
|
| 21 |
+
276
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
311,
|
| 32 |
+
535,
|
| 33 |
+
328
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "As a pioneering work exploring transformer architecture for 3D point cloud understanding, Point Transformer achieves impressive results on multiple highly competitive benchmarks. In this work, we analyze the limitations of the Point Transformer and propose our powerful and efficient Point Transformer V2 model with novel designs that overcome the limitations of previous work. In particular, we first propose group vector attention, which is more effective than the previous version of vector attention. Inheriting the advantages of both learnable weight encoding and multi-head attention, we present a highly effective implementation of grouped vector attention with a novel grouped weight encoding layer. We also strengthen the position information for attention by an additional position encoding multiplier. Furthermore, we design novel and lightweight partition-based pooling methods which enable better spatial alignment and more efficient sampling. Extensive experiments show that our model achieves better performance than its predecessor and achieves state-of-the-art on several challenging 3D point cloud understanding benchmarks, including 3D point cloud segmentation on ScanNet v2 and S3DIS and 3D point cloud classification on ModelNet40. Our code will be available at https://github.com/Gofinge/PointTransformerV2. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
343,
|
| 43 |
+
766,
|
| 44 |
+
578
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
174,
|
| 54 |
+
609,
|
| 55 |
+
310,
|
| 56 |
+
626
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Point Transformer (PTv1) [1] introduces the self-attention networks to 3D point cloud understanding. Combining the vector attention [2] with a U-Net style encoder-decoder framework, PTv1 achieves remarkable performance in several 3D point cloud recognition tasks, including shape classification, object part segmentation, and semantic scene segmentation. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
176,
|
| 65 |
+
640,
|
| 66 |
+
825,
|
| 67 |
+
695
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "In this work, we analyze the limitations of Point Transformer (PTv1) [1] and propose a new elegant and powerful backbone named Point Transformer V2 (PTv2). Our PTv2 improves upon PTv1 with several novel designs, including the advanced grouped vector attention with improved position encoding, and the efficient partition-based pooling scheme. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
176,
|
| 76 |
+
702,
|
| 77 |
+
823,
|
| 78 |
+
757
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "The vector attention layers in PTv1 utilize MLPs as the weight encoding to map the subtraction relation of query and key into an attention weight vector that can modulate the individual channels of the value vector. However, as the model goes deeper and the number of channels increases, the number of weight encoding parameters also increases drastically, leading to severe overfitting and limiting the model depth. To address this problem, we present grouped vector attention with a more parameter-efficient formulation, where the vector attention is divided into groups with shared vector attention weights. Meanwhile, we show that the well-known multi-head attention [3] and the vector attention [2, 1] are degenerate cases of our proposed grouped vector attention. Our proposed grouped vector attention inherits the merits of both vector attention and multi-head attention while being more powerful and efficient. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
763,
|
| 88 |
+
825,
|
| 89 |
+
875
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
92,
|
| 99 |
+
823,
|
| 100 |
+
119
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Furthermore, point positions provide important geometric information for 3D semantic understanding. Hence, the positional relationship among 3D points is more critical than 2D pixels. However, previous 3D position encoding schemes mostly follow the 2D ones and do not fully exploit the geometric knowledge in 3D coordinates. To this end, we strengthen the position encoding mechanism by applying an additional position encoding multiplier to the relation vector. Such a design strengthens the positional relationship information in the model, and we validate its effectiveness in our experiments. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
126,
|
| 110 |
+
825,
|
| 111 |
+
209
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Moreover, it is worth noting that the irregular, non-uniform spatial distributions of points are significant challenges to the pooling modules for point cloud processing. Previous point cloud pooling approaches rely on a combination of sampling methods (e.g. farthest point sampling [4] or grid sampling [5]) and neighbor query methods (e.g. kNN or radius query), which is time-consuming and not spatially well-aligned. To overcome this problem, we go beyond the pooling paradigm of combining sampling and query, and divide the point cloud into non-overlapping partitions to directly fuse points within the same partition. We use uniform grids as partition divider and achieve significant improvement. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
215,
|
| 121 |
+
825,
|
| 122 |
+
325
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "In conclusion, we propose Point Transformer V2, which improves Point Transformer [1] from several perspectives: ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
332,
|
| 132 |
+
821,
|
| 133 |
+
359
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "• We propose an effective grouped vector attention (GVA) with a novel weight encoding layer that enables efficient information exchange within and among attention groups. \n• We introduce an improved position encoding scheme to utilize point cloud coordinates better and further enhance the spatial reasoning ability of the model. \n• We design the partition-based pooling strategy to enable more efficient and spatially betteraligned information aggregation compared to previous methods. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
217,
|
| 142 |
+
371,
|
| 143 |
+
825,
|
| 144 |
+
467
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "We conducted extensive analysis and controlled experiments to validate our designs. Our results indicate that PTv2 outperforms predecessor works and sets the new state-of-the-art on various 3D understanding tasks. ",
|
| 151 |
+
"bbox": [
|
| 152 |
+
176,
|
| 153 |
+
477,
|
| 154 |
+
823,
|
| 155 |
+
518
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 1
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "2 Related Works ",
|
| 162 |
+
"text_level": 1,
|
| 163 |
+
"bbox": [
|
| 164 |
+
176,
|
| 165 |
+
536,
|
| 166 |
+
330,
|
| 167 |
+
553
|
| 168 |
+
],
|
| 169 |
+
"page_idx": 1
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "Image transformers. With the great success of ViT [6], the absolute dominance of convolution in vision tasks is shaken by Vision Transformer, which becomes a trend in 2D image understanding [7, 8, 9, 10]. ViT introduces the far-reaching scaled dot-product self-attention and multi-head self-attention theory [3] in NLP into vision by considering image patches as tokens. However, operating global attention on the entire image consumes excessive memory. To solve the memory consumption problem, Swin Transformer [7] introduces the grid-based local attention mechanism to operate the transformer block in a sequence of shifted windows. ",
|
| 174 |
+
"bbox": [
|
| 175 |
+
174,
|
| 176 |
+
566,
|
| 177 |
+
825,
|
| 178 |
+
662
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 1
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "Point cloud understanding. Learning-based methods for processing 3D point clouds can be classified into the following types: projection-based, voxel-based, and point-based networks. An intuitive way to process irregular inputs like point clouds is to transform irregular representations into regular ones. Projection-based methods project 3D point clouds into various image planes and utilize 2D CNN-based backbones to extract feature representations [11, 12, 13, 14]. An alternative approach operates convolutions in 3D by transforming irregular point clouds into regular voxel representations [15, 16]. Those voxel-based methods suffer from inefficiency because of the sparsity of point clouds until the introduction and implementation of sparse convolution [17, 18]. Point-based methods extract features directly from the point cloud rather than projecting or quantizing irregular point clouds onto regular grids in 2D or 3D [19, 4, 20, 5]. The recently proposed transformer-based point cloud understanding approaches, introduced in the next paragraph, are also categorized into point-based methods. ",
|
| 185 |
+
"bbox": [
|
| 186 |
+
174,
|
| 187 |
+
670,
|
| 188 |
+
825,
|
| 189 |
+
835
|
| 190 |
+
],
|
| 191 |
+
"page_idx": 1
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"type": "text",
|
| 195 |
+
"text": "Point cloud transformers. Transformer-based networks belong to the category of point-based networks for point cloud understanding. During the research upsurge of vision transformers, at almost the same period, Zhao et al. [1] and Guo et al. [21] published their explorations of applying attention to point cloud understanding, becoming pioneers in this direction. The PCT [21] proposed by Guo et al. performs global attention directly on the point cloud. Their work, similar to ViT, is limited by memory consumption and computational complexity. Meanwhile, based on the vector attention theory proposed in SAN [2], Point Transformer [1] proposed by Zhao et al. directly performs local attention between each point and its adjacent points, which alleviated the memory problem mentioned above. Point Transformer achieves remarkable results in multiple point cloud understanding tasks and state-of-art results for several competitive challenges. In this work, we analyze the limitations of the Point Transformer [1], and propose several novel architecture designs for the attention and pooling module, to improve the effectiveness and efficiency of the Point Transformer. Our proposed model, Point Transformer V2, performs better than the Point Transformer across a variety of 3D scene understating tasks. ",
|
| 196 |
+
"bbox": [
|
| 197 |
+
174,
|
| 198 |
+
842,
|
| 199 |
+
823,
|
| 200 |
+
911
|
| 201 |
+
],
|
| 202 |
+
"page_idx": 1
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "image",
|
| 206 |
+
"img_path": "images/1ba8e4f3bf3f52d52b2fe6e70034a2866b7c1053dd025394c15bd4f6696e11d3.jpg",
|
| 207 |
+
"image_caption": [
|
| 208 |
+
"Figure 1: Comparison of the attention, position encoding, and pooling mechanisms between PTv1 and PTv2. Top-left: the vector attention (Sec. 3.1) with position encoding (Sec. 3.3) in PTv1 . Bottom-left: our grouped vector attention (Sec. 3.2, denoted by red) with improved position encoding (Sec. 3.3, denoted by blue) in PTv2. Top-right: the sampling-based pooling and interpolation-based unpooling in PTv1. Bottom-right: our partition-based pooling and unpooling in PTv2 (Sec. 3.4). "
|
| 209 |
+
],
|
| 210 |
+
"image_footnote": [],
|
| 211 |
+
"bbox": [
|
| 212 |
+
212,
|
| 213 |
+
89,
|
| 214 |
+
753,
|
| 215 |
+
375
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 2
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "",
|
| 222 |
+
"bbox": [
|
| 223 |
+
174,
|
| 224 |
+
484,
|
| 225 |
+
825,
|
| 226 |
+
611
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 2
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "3 Point Transformer V2 ",
|
| 233 |
+
"text_level": 1,
|
| 234 |
+
"bbox": [
|
| 235 |
+
174,
|
| 236 |
+
637,
|
| 237 |
+
390,
|
| 238 |
+
655
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 2
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "text",
|
| 244 |
+
"text": "We analyze the limitations of Point Transformer V1 (PTv1) [1] and propose our Point Transformer V2 (PTv2), including several improved modules upon PTv1. We begin by introducing the mathematical formulations and revisiting the vector self-attention used in PTv1 in Sec. 3.1. Based on the observation that the parameters of PTv1 increases drastically with the increased model depth and channel size, we propose our powerful and efficient grouped vector attention in Sec. 3.2. Further, we introduce our improved position encoding in Sec. 3.3 and the new pooling method in Sec. 3.4. We finally describe our network architecture in Sec. 3.5. ",
|
| 245 |
+
"bbox": [
|
| 246 |
+
173,
|
| 247 |
+
674,
|
| 248 |
+
825,
|
| 249 |
+
771
|
| 250 |
+
],
|
| 251 |
+
"page_idx": 2
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"type": "text",
|
| 255 |
+
"text": "3.1 Problem Formulation and Background ",
|
| 256 |
+
"text_level": 1,
|
| 257 |
+
"bbox": [
|
| 258 |
+
176,
|
| 259 |
+
797,
|
| 260 |
+
483,
|
| 261 |
+
813
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 2
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "Problem formulation. Let $\\mathcal { M } = ( \\mathcal { P } , \\mathcal { F } )$ be a 3D point cloud scene containing a set of points $\\pmb { x } _ { i } = ( \\pmb { p } _ { i } , \\pmb { f } _ { i } ) \\in \\mathcal { M }$ , where $\\pmb { p } _ { i } \\in \\mathbb { R } ^ { 3 }$ represents the point position, and $\\ b { f } _ { i } \\in \\mathbb { R } ^ { c }$ represents the point features. Point cloud semantic segmentation aims to predict a class label for each point $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ , and the goal of scene classification is to predict a class label for each scene $\\mathcal { M }$ . $\\mathcal { M } ( \\pmb { p } )$ denotes a mapping function that maps the point at position $\\pmb { p }$ to a subset of $\\mathcal { M }$ denoted as “reference set”. Next, we revisit the self-attention mechanism used in PTv1 [1]. ",
|
| 268 |
+
"bbox": [
|
| 269 |
+
174,
|
| 270 |
+
827,
|
| 271 |
+
825,
|
| 272 |
+
911
|
| 273 |
+
],
|
| 274 |
+
"page_idx": 2
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"type": "text",
|
| 278 |
+
"text": "Local attention. Conducting the global attention [6, 21] over all points in a scene is computationally heavy and infeasible for large-scale 3D scenes. Therefore, we apply local attention where the attention for each point $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ works within a subset of points, i.e., reference point set, $\\mathcal { M } ( \\pmb { p } _ { i } )$ . ",
|
| 279 |
+
"bbox": [
|
| 280 |
+
173,
|
| 281 |
+
90,
|
| 282 |
+
823,
|
| 283 |
+
133
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 3
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "Shifted-grid attention [7], where attention is alternatively applied over two sets of non-overlapping image grids, has become is a common practice [22, 23, 24, 25] for image transformers. Similarly, the 3D space can be split into uniform non-overlapping grid cells, and the reference set is defined as the points within the same grid, i.e., $\\mathcal { M } ( \\pmb { p } _ { i } ) = \\{ ( \\pmb { p } _ { j } , \\pmb { f } _ { j } ) \\ | \\ \\pmb { p } _ { j }$ in the same grid cell as $\\pmb { p } _ { i } \\}$ . However, such attention relies on a cumbersome shift grid operation to achieve a global receptive field, and it does not work well on point clouds where the point densities within different grids are not consistent. ",
|
| 290 |
+
"bbox": [
|
| 291 |
+
173,
|
| 292 |
+
138,
|
| 293 |
+
826,
|
| 294 |
+
223
|
| 295 |
+
],
|
| 296 |
+
"page_idx": 3
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "PTv1 adopts neighborhood attention, where the reference point set is a local neighborhood of the given point, i.e., $\\mathcal { M } ( \\pmb { p } _ { i } ) = \\{ ( \\pmb { p } _ { j } , \\pmb { f } _ { j } ) \\ | \\ p _ { j } \\in \\mathrm { N e i g h b o r h o o d } ( \\pmb { p } _ { i } ) \\}$ . Specifically, the neighborhood point set $\\mathcal { M } ( \\pmb { p } _ { i } )$ is defined as the $k$ nearest neighboring (kNN) points of $\\mathbf { \\nabla } _ { \\pmb { p } _ { i } }$ in PTv1. Our experiments (Sec. 4.3) show that neighborhood attention is more effective than shifted-grid attention, so our approach adopts the neighborhood attention. ",
|
| 301 |
+
"bbox": [
|
| 302 |
+
174,
|
| 303 |
+
228,
|
| 304 |
+
825,
|
| 305 |
+
299
|
| 306 |
+
],
|
| 307 |
+
"page_idx": 3
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"type": "text",
|
| 311 |
+
"text": "Scalar attention and vector attention. Given a point $\\pmb { x } _ { i } = ( \\pmb { p } _ { i } , \\pmb { f } _ { i } ) \\in \\mathcal { M }$ , we apply linear projections or MLPs to project the point features $f _ { i }$ to the feature vectors of query $\\pmb q _ { i }$ , key $\\boldsymbol { k } _ { i }$ , and value ${ \\mathbf { } } v _ { i }$ each with $c _ { h }$ channels. The standard scalar attention (SA) operated on the point $x _ { i }$ and its reference point set $\\mathcal { M } ( \\pmb { p } _ { i } )$ can be represented as follows, ",
|
| 312 |
+
"bbox": [
|
| 313 |
+
174,
|
| 314 |
+
304,
|
| 315 |
+
825,
|
| 316 |
+
361
|
| 317 |
+
],
|
| 318 |
+
"page_idx": 3
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"type": "equation",
|
| 322 |
+
"img_path": "images/a2b679406d9084fcf180e53d988ea9423aa30eff9be4c9ef99ca7eeb4d4e9f72.jpg",
|
| 323 |
+
"text": "$$\nw _ { i j } = \\langle q _ { i } , k _ { j } \\rangle / \\sqrt { c _ { h } } , \\qquad \\mathbf { f } _ { i } ^ { \\mathrm { a t t n } } = \\sum _ { \\substack { \\mathbf { x } _ { j } \\in \\mathcal { M } ( p _ { i } ) } } \\operatorname { S o f t m a x } ( \\pmb { w } _ { i } ) _ { j } \\pmb { v } _ { j } ,\n$$",
|
| 324 |
+
"text_format": "latex",
|
| 325 |
+
"bbox": [
|
| 326 |
+
295,
|
| 327 |
+
366,
|
| 328 |
+
700,
|
| 329 |
+
402
|
| 330 |
+
],
|
| 331 |
+
"page_idx": 3
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "text",
|
| 335 |
+
"text": "The attention weights in the above formulation are scalars computed from the scaled dot-product [3] between the query and key vectors. Multi-head scalar attention (MSA) [3] is an extension of SA which runs several scalar attentions in parallel. MSA is widely applied in transformers, and we will show in Sec. 3.2 that MSA is a degenerate case of our proposed grouped vector attention. ",
|
| 336 |
+
"bbox": [
|
| 337 |
+
173,
|
| 338 |
+
406,
|
| 339 |
+
825,
|
| 340 |
+
463
|
| 341 |
+
],
|
| 342 |
+
"page_idx": 3
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "Instead of the scalar attention weights, PTv1 applies vector attention, where the attention weights are vectors that can modulate the individual feature channels. In SA, the scalar attention is computed by the scaled dot-product between the query and key vectors. In vector attention, a weight encoding function encodes the relation between query and key to a vector. The vector attention [2] is formulated as follows, ",
|
| 347 |
+
"bbox": [
|
| 348 |
+
173,
|
| 349 |
+
468,
|
| 350 |
+
825,
|
| 351 |
+
539
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 3
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "equation",
|
| 357 |
+
"img_path": "images/5118229f4e75307b961eee7a755dad84063067d0904d46b95a41e66726fe6136.jpg",
|
| 358 |
+
"text": "$$\n{ \\pmb w } _ { i j } = \\omega ( \\gamma ( { \\pmb q } _ { i } , { \\pmb k } _ { j } ) ) , \\qquad f _ { i } ^ { \\mathrm { a t t n } } = \\sum _ { { \\pmb x } _ { j } \\in \\mathcal { M } ( { \\pmb p } _ { i } ) } \\mathrm { S o f t m a x } ( { \\pmb W } _ { i } ) _ { j } \\odot { \\pmb v } _ { j } ,\n$$",
|
| 359 |
+
"text_format": "latex",
|
| 360 |
+
"bbox": [
|
| 361 |
+
284,
|
| 362 |
+
541,
|
| 363 |
+
710,
|
| 364 |
+
579
|
| 365 |
+
],
|
| 366 |
+
"page_idx": 3
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"text": "where $\\odot$ is the Hadamard product. $\\gamma$ is a relation function (e.g., subtraction). $\\omega : \\mathbb { R } ^ { c } \\mapsto \\mathbb { R } ^ { c }$ is a learnable weight encoding (e.g., MLP) that computes the attention vectors to re-weight ${ \\pmb v } _ { j }$ by channels before aggregation. Fig. 2 (a) shows a method using vector attention with linear weight encoding. ",
|
| 371 |
+
"bbox": [
|
| 372 |
+
174,
|
| 373 |
+
583,
|
| 374 |
+
825,
|
| 375 |
+
626
|
| 376 |
+
],
|
| 377 |
+
"page_idx": 3
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "text",
|
| 381 |
+
"text": "3.2 Grouped Vector Attention ",
|
| 382 |
+
"text_level": 1,
|
| 383 |
+
"bbox": [
|
| 384 |
+
174,
|
| 385 |
+
642,
|
| 386 |
+
395,
|
| 387 |
+
657
|
| 388 |
+
],
|
| 389 |
+
"page_idx": 3
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"type": "text",
|
| 393 |
+
"text": "In vector attention, as the network goes deeper and there are more feature encoding channels, the number of parameters for the weight encoding layer increases drastically. The large parameter size restricts the efficiency and generalization ability of the model. In order to overcome the limitations of vector attention, we introduce the grouped vector attention, as illustrated in Fig. 1 (left). ",
|
| 394 |
+
"bbox": [
|
| 395 |
+
173,
|
| 396 |
+
666,
|
| 397 |
+
825,
|
| 398 |
+
723
|
| 399 |
+
],
|
| 400 |
+
"page_idx": 3
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "text",
|
| 404 |
+
"text": "Attention groups. We divide channels of the value vector $v \\in \\mathbb { R } ^ { c }$ evenly into $g$ groups $( 1 \\leq g \\leq c )$ The weight encoding layer outputs a grouped attention vector with $g$ channels instead of $c$ channels. Channels of $\\pmb { v }$ within the same attention group share the same scalar attention weight from the grouped attention vector. Mathematically, ",
|
| 405 |
+
"bbox": [
|
| 406 |
+
174,
|
| 407 |
+
728,
|
| 408 |
+
825,
|
| 409 |
+
786
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 3
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "equation",
|
| 415 |
+
"img_path": "images/76f498831a55faea866fa681a060694fbc60993e497cd3216adf12078cb18c46.jpg",
|
| 416 |
+
"text": "$$\n{ \\pmb w } _ { i j } = \\omega ( \\gamma ( { \\pmb q } _ { i } , { \\pmb k } _ { j } ) ) , \\qquad { \\pmb f } _ { i } ^ { a t t n } = \\sum _ { x _ { j } } ^ { \\mathcal { M } ( p _ { i } ) } \\sum _ { l = 1 } ^ { g } \\sum _ { m = 1 } ^ { c / g } { \\mathrm { S o f t m a x } ( { \\pmb W } _ { i } ) _ { j l } } v _ { j } ^ { l c / g + m } ,\n$$",
|
| 417 |
+
"text_format": "latex",
|
| 418 |
+
"bbox": [
|
| 419 |
+
251,
|
| 420 |
+
790,
|
| 421 |
+
743,
|
| 422 |
+
838
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 3
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "text",
|
| 428 |
+
"text": "where $\\gamma$ is the relation function and $\\omega : \\mathbb { R } ^ { c } \\mapsto \\mathbb { R } ^ { g }$ is the learnable grouped weight encoding defined in the next paragraph. The second equation in Eq. 3 is the grouped vector aggregation. Fig. 2 (a) presents a vanilla GVA implemented by a fully connected weight encoding, the number of the grouped weight encoding function parameters reduced compared with the vector attention (Fig. 2 (b)), leading to a more powerful and efficient model. ",
|
| 429 |
+
"bbox": [
|
| 430 |
+
173,
|
| 431 |
+
842,
|
| 432 |
+
825,
|
| 433 |
+
911
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 3
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "image",
|
| 439 |
+
"img_path": "images/090ccf1932dee561835b295048829e2ff29197b8c561cac86019456d04b1e9cd.jpg",
|
| 440 |
+
"image_caption": [
|
| 441 |
+
"Figure 2: Comparison of various weight encoding functions. Each square represents a scalar, and each row of them represents a vector. The three rows represent relation vector, weight vector, and value vector from top to bottom. The attention groups are separated by dash lines. For demonstration, we assume the feature dimension is 4 and the number of attention groups (applicable to b, c, d) is 2. Lines with different colors refer to different operations, blue lines represent learnable parameters act on input relation scalar, while red lines represent multiply by the input relation scalar. Orange lines identify which value feature is affected by the input scalar weight. "
|
| 442 |
+
],
|
| 443 |
+
"image_footnote": [],
|
| 444 |
+
"bbox": [
|
| 445 |
+
176,
|
| 446 |
+
92,
|
| 447 |
+
818,
|
| 448 |
+
189
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 4
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "GVA is a generalized formulation of VA and MSA. Our GVA degenerates to vector attention (VA) when $g = c$ , and it degenerates to multi-head self-attention (MSA) if $\\omega$ in Eq. 3 is defined as follows, ",
|
| 455 |
+
"bbox": [
|
| 456 |
+
171,
|
| 457 |
+
320,
|
| 458 |
+
826,
|
| 459 |
+
351
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 4
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "equation",
|
| 465 |
+
"img_path": "images/d9e193b98e63102bfc9bcbbb6eb97f39b9cc6af0d4482c7786e40d61f6a7530d.jpg",
|
| 466 |
+
"text": "$$\n\\omega ( r ) = r \\underbrace { \\left[ \\begin{array} { c c c c } { \\mathbf { 1 } _ { 1 \\times c _ { g } } } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\cdot \\cdot \\cdot } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } \\\\ { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\mathbf { 1 } _ { 1 \\times c _ { g } } } & { \\cdot \\cdot \\cdot } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } \\\\ { \\vdots } & { \\vdots } & { \\ddots } & { \\vdots } \\\\ { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\cdot \\cdot \\cdot } & { \\mathbf { 1 } _ { 1 \\times c _ { g } } } \\end{array} \\right] ^ { T } } _ { g \\times c _ { g } } \\frac { 1 } { \\sqrt { c _ { g } } } ,\n$$",
|
| 467 |
+
"text_format": "latex",
|
| 468 |
+
"bbox": [
|
| 469 |
+
336,
|
| 470 |
+
356,
|
| 471 |
+
660,
|
| 472 |
+
454
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 4
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "where $c _ { g } = c / g$ and $r \\in \\mathbb { R } ^ { 1 \\times c }$ . ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
174,
|
| 481 |
+
460,
|
| 482 |
+
379,
|
| 483 |
+
477
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 4
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "Grouped linear. Inspired by the weight encoding function of MSA, we design the grouped linear layer $\\zeta ( r ) : \\mathbb { R } ^ { c } \\mapsto \\mathbb { R } ^ { g }$ where different groups of the input vector are projected with different parameters independently. Grouped linear further reduce the number of parameters in the weight encoding function. Our final adopted grouped weight encoding function is composed of the grouped linear layer, normalization layer, activation layer, and a fully connected layer to allow inter-group information exchange. Mathematically, ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
173,
|
| 492 |
+
482,
|
| 493 |
+
825,
|
| 494 |
+
566
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 4
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "equation",
|
| 500 |
+
"img_path": "images/a131ad7ed9225338a4406dd6324d0cddf37d46fdfda0768960eb67105249b8f1.jpg",
|
| 501 |
+
"text": "$$\n\\zeta ( r ) = r \\underbrace { \\left[ \\begin{array} { c c c c c } { p _ { 1 } } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\cdot \\cdot \\cdot } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } \\\\ { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { p _ { 2 } } & { \\cdot \\cdot \\cdot } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } \\\\ { \\vdots } & { \\vdots } & { \\ddots } & { \\vdots } \\\\ { \\underbrace { \\mathbf { 0 } _ { 1 \\times c _ { g } } } } & { \\mathbf { 0 } _ { 1 \\times c _ { g } } } & { \\cdot \\cdot \\cdot } & { p _ { g } } \\end{array} \\right] } _ { \\mathcal { J } \\times \\mathcal { C } _ { g } } ,\n$$",
|
| 502 |
+
"text_format": "latex",
|
| 503 |
+
"bbox": [
|
| 504 |
+
354,
|
| 505 |
+
573,
|
| 506 |
+
642,
|
| 507 |
+
688
|
| 508 |
+
],
|
| 509 |
+
"page_idx": 4
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"type": "text",
|
| 513 |
+
"text": "where $c _ { g } = c / g , p _ { 1 } , \\ldots , p _ { g } \\in \\mathbb { R } _ { g } ^ { c }$ are learnable parameters, and $\\circ$ represents function composition. ",
|
| 514 |
+
"bbox": [
|
| 515 |
+
173,
|
| 516 |
+
694,
|
| 517 |
+
820,
|
| 518 |
+
710
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 4
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "3.3 Position Encoding Multipler ",
|
| 525 |
+
"text_level": 1,
|
| 526 |
+
"bbox": [
|
| 527 |
+
174,
|
| 528 |
+
726,
|
| 529 |
+
410,
|
| 530 |
+
741
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 4
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "Different from the discrete, regular-grid pixels in 2D images, points in the 3D point cloud are unevenly distributed in a continuous Euclidean Metric space, making the spatial relationship in 3D point cloud much more complicated than 2D images. In transformers and attention modules, the spatial information is obtained with the position encoding $\\delta _ { b i a s } ( \\pmb { p } _ { i } - \\pmb { p } _ { j } )$ added to the relation vector $\\gamma ( q _ { i } , k _ { j } )$ as a bias. ",
|
| 537 |
+
"bbox": [
|
| 538 |
+
173,
|
| 539 |
+
751,
|
| 540 |
+
825,
|
| 541 |
+
821
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 4
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "Due to the generalization limitation of vector attention in PTv1 mentioned in Sec. 3.2, adding more position encoding capacity to vector attention will not help to improve the performance. In PTv2, the grouped vector attention has an effect of reducing overfitting and enhancing generalization. With grouped vector attention restricting the capacity of the attention mechanism, we strengthen the position encoding with an additional multiplier $\\delta _ { m u l } ( \\pmb { p } _ { i } - \\pmb { p } _ { j } )$ to the relation vector, which focuses on learning complex point cloud positional relations. As shown in Fig. 1 (left), our improved position ",
|
| 548 |
+
"bbox": [
|
| 549 |
+
174,
|
| 550 |
+
827,
|
| 551 |
+
825,
|
| 552 |
+
912
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 4
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "encoding is as follows, ",
|
| 559 |
+
"bbox": [
|
| 560 |
+
173,
|
| 561 |
+
92,
|
| 562 |
+
325,
|
| 563 |
+
106
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 5
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "equation",
|
| 569 |
+
"img_path": "images/181f9d652ee106c18a6b4c0067694118ef5189429fb936304b9b39f38ec9b71a.jpg",
|
| 570 |
+
"text": "$$\n\\pmb { w } _ { i j } = \\omega \\big ( \\delta _ { m u l } \\big ( \\pmb { p } _ { i } - \\pmb { p } _ { j } \\big ) \\odot \\gamma \\big ( \\pmb { q } _ { i } , \\pmb { k } _ { j } \\big ) + \\delta _ { b i a s } \\big ( \\pmb { p } _ { i } - \\pmb { p } _ { j } \\big ) \\big ) ,\n$$",
|
| 571 |
+
"text_format": "latex",
|
| 572 |
+
"bbox": [
|
| 573 |
+
313,
|
| 574 |
+
113,
|
| 575 |
+
683,
|
| 576 |
+
131
|
| 577 |
+
],
|
| 578 |
+
"page_idx": 5
|
| 579 |
+
},
|
| 580 |
+
{
|
| 581 |
+
"type": "text",
|
| 582 |
+
"text": "where $\\odot$ is the Hadamard product. $\\delta _ { m u l } , \\delta _ { b i a s } : \\mathbb { R } ^ { d } \\mapsto \\mathbb { R } ^ { d }$ are two MLP position encoding functions, which take relative positions as input. Position encoding multiplier compliments group vector attention to achieve a good balance of network capacity. ",
|
| 583 |
+
"bbox": [
|
| 584 |
+
174,
|
| 585 |
+
138,
|
| 586 |
+
825,
|
| 587 |
+
181
|
| 588 |
+
],
|
| 589 |
+
"page_idx": 5
|
| 590 |
+
},
|
| 591 |
+
{
|
| 592 |
+
"type": "text",
|
| 593 |
+
"text": "3.4 Partition-based Pooling ",
|
| 594 |
+
"text_level": 1,
|
| 595 |
+
"bbox": [
|
| 596 |
+
174,
|
| 597 |
+
196,
|
| 598 |
+
377,
|
| 599 |
+
213
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 5
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "Traditional sampling-based pooling procedures adopted by other point-based methods use a combination of sampling and query methods. In the sampling stage, farthest point sampling [4] or grid sampling [5] is used to sample points reserved for the following encoding stage. For each sampled point, a neighbor query is performed to aggregate information from the neighboring points. In these sampling-based pooling procedures, the query sets of points are not spatially-aligned since the information density and overlap among each query set are not controllable. To address the problem, we propose a more efficient and effective partition-based pooling approach, as shown in Fig. 1. ",
|
| 606 |
+
"bbox": [
|
| 607 |
+
174,
|
| 608 |
+
222,
|
| 609 |
+
826,
|
| 610 |
+
321
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 5
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "Pooling. Given a point set $\\mathcal { M } = ( \\mathcal { P } , \\mathcal { F } )$ , we partition $\\mathcal { M }$ into subsets $[ \\mathcal { M } _ { 1 } , \\mathcal { M } _ { 2 } , . . . , \\mathcal { M } _ { n ^ { \\prime } } ]$ by separating the space into non-overlapping partitions. We fusion each subset of points $\\mathcal { M } _ { i } = ( \\mathcal { P } _ { i } , \\mathcal { F } _ { i } )$ from a single partition as follows, ",
|
| 617 |
+
"bbox": [
|
| 618 |
+
173,
|
| 619 |
+
325,
|
| 620 |
+
826,
|
| 621 |
+
368
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 5
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "equation",
|
| 627 |
+
"img_path": "images/edf46ebd91f117738279bdecb9c996694e5317bd6a517880d69b991bd70f3f04.jpg",
|
| 628 |
+
"text": "$$\n\\begin{array} { r } { \\pmb { f } _ { i } ^ { \\prime } = \\pmb { \\mathrm { M a x P o o l } } ( \\{ f _ { j } U \\mid f _ { j } \\in \\mathscr { F } _ { i } \\} ) , \\qquad \\pmb { p } _ { i } ^ { \\prime } = \\pmb { \\mathrm { M e a n P o o l } } ( \\{ p _ { j } \\mid p _ { j } \\in \\mathscr { P } _ { i } \\} ) , } \\end{array}\n$$",
|
| 629 |
+
"text_format": "latex",
|
| 630 |
+
"bbox": [
|
| 631 |
+
254,
|
| 632 |
+
375,
|
| 633 |
+
743,
|
| 634 |
+
393
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 5
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "where $( p _ { i } ^ { \\prime } , f _ { i } ^ { \\prime } )$ is the position and features of pooling point aggregated form subset $\\mathcal { M } _ { i }$ , and $U \\in$ $\\mathbb { R } ^ { c \\times c ^ { \\prime } }$ is the linear projection. Collecting the pooling points from $n ^ { \\prime }$ subsets gives us the point set $\\mathcal { M } ^ { \\prime } = \\{ p _ { i } ^ { \\prime } , f _ { i } ^ { \\prime } \\} _ { i = 1 } ^ { n ^ { \\prime } }$ for the next stage of encoding. In our implementation, we use uniform grids to partition the point cloud space, and thus our partition-based pooling is also called grid pooling. ",
|
| 641 |
+
"bbox": [
|
| 642 |
+
173,
|
| 643 |
+
398,
|
| 644 |
+
825,
|
| 645 |
+
460
|
| 646 |
+
],
|
| 647 |
+
"page_idx": 5
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "text",
|
| 651 |
+
"text": "Unpooling. The common practice of unpooling by interpolation is also applicable to partition-based pooling. Here we introduce a more straightforward and efficient unpooling method. To unpool the fused point set $\\mathcal { M } ^ { \\prime }$ back to $\\mathcal { M }$ , the point locations in $\\mathcal { M }$ are record from the pooling process, and we only need to obtain the features for each point in $\\mathcal { M }$ . With the help of the grid-based partitioning $[ \\mathcal { M } _ { 1 } , \\mathcal { M } _ { 2 } , . . . , \\mathcal { M } _ { n ^ { \\prime } } ]$ during the pooling stage, we can map point feature to all points from the same subset, ",
|
| 652 |
+
"bbox": [
|
| 653 |
+
173,
|
| 654 |
+
465,
|
| 655 |
+
825,
|
| 656 |
+
549
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 5
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "equation",
|
| 662 |
+
"img_path": "images/4d4d55427842632d6fb3e822c36564e39dacdae2af06cb4e4534b822864ea5cb.jpg",
|
| 663 |
+
"text": "$$\n\\pmb { f } _ { i } ^ { u p } = \\pmb { f } _ { j } ^ { \\prime } , \\qquad \\mathrm { i f } \\left( \\pmb { p } _ { i } , \\pmb { f } _ { i } \\right) \\in \\mathcal { M } _ { j } .\n$$",
|
| 664 |
+
"text_format": "latex",
|
| 665 |
+
"bbox": [
|
| 666 |
+
385,
|
| 667 |
+
556,
|
| 668 |
+
612,
|
| 669 |
+
575
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 5
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "3.5 Network Architecture ",
|
| 676 |
+
"text_level": 1,
|
| 677 |
+
"bbox": [
|
| 678 |
+
174,
|
| 679 |
+
588,
|
| 680 |
+
366,
|
| 681 |
+
603
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 5
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "Backbone structure. Following previous works [18, 1], we adopt the U-Net architecture with skip connections. There are four stages of encoders and decoders with block depths [2, 2, 6, 2] and [1, 1, 1, 1], respectively. The grid size multipliers for the four stages are $[ \\mathrm { x } 3 . 0 , \\mathrm { x } 2 . 5 , \\mathrm { x } 2 . 5 , \\mathrm { x } 2 . 5 ]$ , representing the expansion ratio over the previous pooling stage. The attention is conducted in a local neighborhood, described in “neighborhood attention” in Sec. 3.1. In Sec. 4.3 we compare the neighborhood attention with shift-grid attention. ",
|
| 688 |
+
"bbox": [
|
| 689 |
+
173,
|
| 690 |
+
613,
|
| 691 |
+
825,
|
| 692 |
+
698
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 5
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "text",
|
| 698 |
+
"text": "The initial feature dimension is 48, and we first embed the input channels to this number with a basic block with attention groups of 6. Then, we double this feature dimension and attention groups each time entering the next encoding stage. For the four encoding stages, the feature dimensions are [96, 192, 384, 384], and the corresponding attention groups are [12, 24, 48, 48]. ",
|
| 699 |
+
"bbox": [
|
| 700 |
+
174,
|
| 701 |
+
704,
|
| 702 |
+
825,
|
| 703 |
+
761
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 5
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "Output head. For point cloud semantic segmentation, we apply an MLP to map point features produced by the backbone to the final logits for each point in the input point set. For point cloud classification, we apply global average pooling over the point features produced by the encoding stages to obtain a global feature vector, followed by an MLP classifier for prediction. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
173,
|
| 712 |
+
766,
|
| 713 |
+
825,
|
| 714 |
+
821
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 5
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "text",
|
| 720 |
+
"text": "4 Experiments ",
|
| 721 |
+
"text_level": 1,
|
| 722 |
+
"bbox": [
|
| 723 |
+
174,
|
| 724 |
+
839,
|
| 725 |
+
312,
|
| 726 |
+
857
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 5
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "text",
|
| 732 |
+
"text": "To validate the effectiveness of the proposed method, we conduct experimental evaluations on ScanNet v2 [44] and S3DIS [45] for semantic segmentation, and ModelNet40 [46] for shape classification. Implementation details are available in the appendix. ",
|
| 733 |
+
"bbox": [
|
| 734 |
+
174,
|
| 735 |
+
869,
|
| 736 |
+
825,
|
| 737 |
+
911
|
| 738 |
+
],
|
| 739 |
+
"page_idx": 5
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"type": "table",
|
| 743 |
+
"img_path": "images/281cc7cac09d4e7001ef23aa610f3bc511c87d869310f316b761c90401502971.jpg",
|
| 744 |
+
"table_caption": [
|
| 745 |
+
"Table 1: Semantic segmentation on ScanNet v2. "
|
| 746 |
+
],
|
| 747 |
+
"table_footnote": [],
|
| 748 |
+
"table_body": "<table><tr><td>Method PointNet++ [4]</td><td>Input</td><td>Val</td><td>Test</td></tr><tr><td>3DMV[26] PanopticFusion [27] PointCNN [28] PointConv [29] JointPointBased [30] PointASNL [31] SegGCN [32] RandLA-Net [33] KPConv [5] JSENet [34] FusionNet [35] SparseConvNet [17]</td><td>point point point point point point point point point point point point voxel</td><td>53.5 1 - = 61.0 69.2 63.5 1 = 69.2 - =</td><td>55.7 48.4 52.9 45.8 66.6 63.4 66.6 58.9 64.5 68.6 69.9 68.8</td></tr><tr><td>MinkUNet [18] PTv1[1] PTv2 (ours)</td><td>voxel point point</td><td>69.3 72.2 70.6 75.4</td><td>72.5 73.6 = 75.2</td></tr></table>",
|
| 749 |
+
"bbox": [
|
| 750 |
+
181,
|
| 751 |
+
116,
|
| 752 |
+
475,
|
| 753 |
+
351
|
| 754 |
+
],
|
| 755 |
+
"page_idx": 6
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "table",
|
| 759 |
+
"img_path": "images/696a0de74b003b79a28bc95473f3c7b8be9a93c8a9fddc73683563f7e79d1b87.jpg",
|
| 760 |
+
"table_caption": [
|
| 761 |
+
"Table 2: Semantic segmentation on S3DIS Area 5. "
|
| 762 |
+
],
|
| 763 |
+
"table_footnote": [],
|
| 764 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Input</td><td rowspan=1 colspan=1>OA mAcc mIoU</td></tr><tr><td rowspan=2 colspan=1>PointNet [19]SegCloud [36]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 49.0 41.1</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>- 57.4 48.9</td></tr><tr><td rowspan=1 colspan=1>TanConv [37]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 62.2 52.6</td></tr><tr><td rowspan=1 colspan=1>PointCNN [28]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>85.9 63.9 57.3</td></tr><tr><td rowspan=1 colspan=1>PointWeb [20]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.0 66.6 60.3</td></tr><tr><td rowspan=1 colspan=1>HPEIN [38]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.2 68.3 61.9</td></tr><tr><td rowspan=1 colspan=1>GACNet [39]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>87.8 1 62.9</td></tr><tr><td rowspan=1 colspan=1>PAT [40]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 70.8 60.1</td></tr><tr><td rowspan=1 colspan=1>ParamConv [41]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>= 67.0 58.3</td></tr><tr><td rowspan=1 colspan=1>SPGraph [42]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>86.4 66.5 58.0</td></tr><tr><td rowspan=1 colspan=1>SegGCN [32]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>88.2 70.4 63.6</td></tr><tr><td rowspan=1 colspan=1>MinkUNet [18]</td><td rowspan=1 colspan=1>voxel</td><td rowspan=1 colspan=1>1 71.7 65.4</td></tr><tr><td rowspan=2 colspan=1>PAConv [43]KPConv [5]</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 - 66.6</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>1 72.8 67.1</td></tr><tr><td rowspan=2 colspan=1>PTv1[1]PTv2 (ours)</td><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>90.8 76.5 70.4</td></tr><tr><td rowspan=1 colspan=1>point</td><td rowspan=1 colspan=1>91.1 77.9 71.6</td></tr></table>",
|
| 765 |
+
"bbox": [
|
| 766 |
+
493,
|
| 767 |
+
114,
|
| 768 |
+
821,
|
| 769 |
+
351
|
| 770 |
+
],
|
| 771 |
+
"page_idx": 6
|
| 772 |
+
},
|
| 773 |
+
{
|
| 774 |
+
"type": "text",
|
| 775 |
+
"text": "4.1 Semantic Segmentation ",
|
| 776 |
+
"text_level": 1,
|
| 777 |
+
"bbox": [
|
| 778 |
+
174,
|
| 779 |
+
387,
|
| 780 |
+
375,
|
| 781 |
+
401
|
| 782 |
+
],
|
| 783 |
+
"page_idx": 6
|
| 784 |
+
},
|
| 785 |
+
{
|
| 786 |
+
"type": "text",
|
| 787 |
+
"text": "Data and metric. For semantic segmentation, we experiment on ScanNet v2 [44] and S3DIS [45]. The ScanNet v2 dataset contains 1,513 room scans reconstructed from RGB-D frames. The dataset is divided into 1,201 scenes for training and 312 for validation. Point clouds for the model input are sampled from vertices of reconstructed meshes, and each sampled point is assigned a semantic label from 20 categories (wall, floor, table, etc.). The S3DIS dataset for semantic scene parsing consists of 271 rooms in six areas from three different buildings. Following a common protocol [36, 4, 1], area 5 is withheld during training and used for testing. Different from ScanNet v2, points of S3DIS are densely sampled on the mesh surfaces and annotated into 13 categories. Following a standard protocol [4], we use mean class-wise intersection over union (mIoU) as the evaluation metric for validation and test set of ScanNet v2. And we use mean class-wise intersection over union (mIoU), mean of class-wise accuracy (mAcc), and overall point-wise accuracy (OA) for evaluating performance on S3DIS area5. ",
|
| 788 |
+
"bbox": [
|
| 789 |
+
173,
|
| 790 |
+
420,
|
| 791 |
+
825,
|
| 792 |
+
585
|
| 793 |
+
],
|
| 794 |
+
"page_idx": 6
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"type": "text",
|
| 798 |
+
"text": "Performance comparison. Table 1 and Table 2 show the results of our PTv2 model compared with previous methods on ScanNet v2 and S3DIS, respectively. Our PTv2 model outperforms prior methods in all evaluation metrics. Notably, PTv2 significantly outperforms PTv1 [1] by $4 . 8 \\%$ mIoU on the ScanNet v2 validation set. ",
|
| 799 |
+
"bbox": [
|
| 800 |
+
174,
|
| 801 |
+
593,
|
| 802 |
+
825,
|
| 803 |
+
648
|
| 804 |
+
],
|
| 805 |
+
"page_idx": 6
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"type": "text",
|
| 809 |
+
"text": "Visualization. The qualitative results of point cloud semantic segmentation are shown in Fig. 3 and Fig. 4. Our PTv2 model is able to predict semantic segmentation results that are quite close the ground-truth. It is worth noting that our model can capture the detailed structure information and predict the correct semantics for challenging scenarios. For example, in the S3DIS scenes with chairs, PTv2 is able to cleanly predict the chair legs and armrests. ",
|
| 810 |
+
"bbox": [
|
| 811 |
+
174,
|
| 812 |
+
655,
|
| 813 |
+
825,
|
| 814 |
+
724
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 6
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "text",
|
| 820 |
+
"text": "4.2 Shape Classification ",
|
| 821 |
+
"text_level": 1,
|
| 822 |
+
"bbox": [
|
| 823 |
+
176,
|
| 824 |
+
760,
|
| 825 |
+
352,
|
| 826 |
+
775
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 6
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "Data and metric. We test our proposed PTv2 model for 3D point cloud classification on ModelNet40 dataset. The ModelNet40 [46] dataset consists of 12,311 CAD models belonging to 40 object categories. 9,843 models are split out for training, and the rest 2,468 models are reserved for testing. Following the common practice in the community, we report the class-average accuracy (mAcc) and overall accuracy (OA) on the test set. ",
|
| 833 |
+
"bbox": [
|
| 834 |
+
174,
|
| 835 |
+
792,
|
| 836 |
+
825,
|
| 837 |
+
863
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 6
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "Performance comparison. We test our PTv2 model and compare it with previous models on the ModelNet40 dataset for shape classification. Results are shown in Table 3, demonstrating that our proposed PTv2 model achieves state-of-the-art performance on ModelNet40 shape classification. ",
|
| 844 |
+
"bbox": [
|
| 845 |
+
176,
|
| 846 |
+
869,
|
| 847 |
+
825,
|
| 848 |
+
911
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 6
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "image",
|
| 854 |
+
"img_path": "images/2b4d3ab3d4f54fe3b8b661ee353013c4879630abe49a672dfe8d5daa9f84d36f.jpg",
|
| 855 |
+
"image_caption": [
|
| 856 |
+
"Figure 3: Visualization of semantic segmentation results on ScanNet v2. "
|
| 857 |
+
],
|
| 858 |
+
"image_footnote": [],
|
| 859 |
+
"bbox": [
|
| 860 |
+
179,
|
| 861 |
+
83,
|
| 862 |
+
825,
|
| 863 |
+
256
|
| 864 |
+
],
|
| 865 |
+
"page_idx": 7
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"type": "image",
|
| 869 |
+
"img_path": "images/5f408241a0a55a3f19804ef671182ffd0bd4d1e2413167229b43cfdf741d9393.jpg",
|
| 870 |
+
"image_caption": [
|
| 871 |
+
"Figure 4: Visualization of semantic segmentation results on S3DIS. "
|
| 872 |
+
],
|
| 873 |
+
"image_footnote": [],
|
| 874 |
+
"bbox": [
|
| 875 |
+
181,
|
| 876 |
+
280,
|
| 877 |
+
823,
|
| 878 |
+
406
|
| 879 |
+
],
|
| 880 |
+
"page_idx": 7
|
| 881 |
+
},
|
| 882 |
+
{
|
| 883 |
+
"type": "text",
|
| 884 |
+
"text": "4.3 Ablation Study ",
|
| 885 |
+
"text_level": 1,
|
| 886 |
+
"bbox": [
|
| 887 |
+
174,
|
| 888 |
+
443,
|
| 889 |
+
318,
|
| 890 |
+
458
|
| 891 |
+
],
|
| 892 |
+
"page_idx": 7
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"type": "text",
|
| 896 |
+
"text": "We conduct ablation studies to examine the effectiveness of each module in our design. The ablation study results are reported on ScanNet v2 validation set. ",
|
| 897 |
+
"bbox": [
|
| 898 |
+
176,
|
| 899 |
+
469,
|
| 900 |
+
823,
|
| 901 |
+
497
|
| 902 |
+
],
|
| 903 |
+
"page_idx": 7
|
| 904 |
+
},
|
| 905 |
+
{
|
| 906 |
+
"type": "text",
|
| 907 |
+
"text": "Attention type. We first investigate the effects of different attention designs. We experiment with two types of local attention introduced in Sec. 3.1, namely shifted-grid attention and neighborhood attention [1]. Then, to validate the effectiveness of our proposed grouped vector attention (denoted as “GVA”), we compare it with the commonly-used multi-head self-attention (denoted as “MSA”). We use the vanilla position encoding in PTv1 [1] and our proposed partition-based pooling scheme in all of the experiments in Table 4. It shows neighborhood attention performs significantly better than shiftedgrid attention, indicating that the neighborhood attention is better suited for point clouds which are non-uniformly distributed. Moreover, our proposed grouped vector attention consistently outperforms the commonly-used multi-head self-attention with both shifted-grid attention and neighborhood attention. So our grouped vector attention is not only more efficient, but also more effective, than multi-head self-attention. The comparison between GVA and MSA indicates the effectiveness of the learnable parameters in the grouped linear layer of the grouped weight encoding in Sec. 3.2. ",
|
| 908 |
+
"bbox": [
|
| 909 |
+
173,
|
| 910 |
+
503,
|
| 911 |
+
825,
|
| 912 |
+
670
|
| 913 |
+
],
|
| 914 |
+
"page_idx": 7
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"type": "text",
|
| 918 |
+
"text": "Weight encoding. We study the effects of different weight encoding functions $\\omega$ in Table 6. The weight encoding functions are introduced in Sec. 3.1 and Sec. 3.2, and different attention mechanisms adopt different weight encoding functions. We use the vanilla position encoding in PTv1 [1] and our proposed grid pooling scheme in all of the experiments in Table 6. We experimented with the following weight encoding functions: (1) The weight encoding for multi-head scalar attention in Eq. 4, denoted as “MSA”. (2) Weight encoding as a linear layer denoted as “L”. (3) The grouped linear layer, which is $\\zeta$ in Eq. 5, denoted as “GL”. (4) The linear layer followed by batch normalization, activation, and another linear layer, denoted as $\\cdot \\mathrm { ^ { \\circ } L + N + A + L } ^ { \\mathrm { , \\circ } }$ . (5) The grouped linear layer, followed by batch normalization, activation, and a linear layer, denoted as $\\scriptstyle \\mathbf { \\ddot { G L + N + A + L } } ^ { }$ . (5) is also the grouped weight encoding function used for our grouped vector attention, introduced as $\\omega$ in Eq. 5. Results in Table 6 demonstrate that our grouped weight encoding function outperforms other compared designs. Specifically, comparing (1), (3) and (5), GL slightly outperforms MSA but adding additional inter-group information exchange combined with proper normalization and activation can boost the performance to be better than MSA. Moreover, the comparison between (5) and (4) and the comparison between (3) and (2) both indicate that our grouped linear layer outperforms the naive linear layer, even though the grouped linear layer has $g$ times fewer parameters and requires less computing than the linear layer. ",
|
| 919 |
+
"bbox": [
|
| 920 |
+
173,
|
| 921 |
+
676,
|
| 922 |
+
825,
|
| 923 |
+
911
|
| 924 |
+
],
|
| 925 |
+
"page_idx": 7
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"type": "table",
|
| 929 |
+
"img_path": "images/d6c4b3cf38655cecbd76f0e32d625a6e899e06f700d6ef2183cb52464be34132.jpg",
|
| 930 |
+
"table_caption": [
|
| 931 |
+
"Table 3: Shape classification on ModelNet40. "
|
| 932 |
+
],
|
| 933 |
+
"table_footnote": [],
|
| 934 |
+
"table_body": "<table><tr><td>Method</td><td>mAcc (%)</td><td>OA (%)</td></tr><tr><td>PointNet [19]</td><td>86.0</td><td>89.2</td></tr><tr><td>PointNet++ [4]</td><td>=</td><td>91.9</td></tr><tr><td>PointCNN[28]</td><td>88.1</td><td>92.5</td></tr><tr><td>PointConv [29]</td><td>-</td><td>92.5</td></tr><tr><td>KPConv [5]</td><td>1</td><td>92.9</td></tr><tr><td>DGCNN [47]</td><td>90.2</td><td>92.9</td></tr><tr><td>RS-CNN [48]</td><td>-</td><td>92.9</td></tr><tr><td>PointASNL [31]</td><td>=</td><td>92.9</td></tr><tr><td>DensePoint [49]</td><td></td><td>93.2</td></tr><tr><td>PosPool [50]</td><td>=</td><td>93.2</td></tr><tr><td>GBNet [51]</td><td>91.0</td><td>93.8</td></tr><tr><td>PCT[21]</td><td></td><td>93.2</td></tr><tr><td>PA-DGC [43]</td><td></td><td>93.9</td></tr><tr><td>CurveNet [52]</td><td>=</td><td>94.2</td></tr><tr><td>PTv1[1]</td><td>90.6</td><td>93.7</td></tr><tr><td>PTv2 (ours)</td><td>91.6</td><td>94.2</td></tr></table>",
|
| 935 |
+
"bbox": [
|
| 936 |
+
183,
|
| 937 |
+
114,
|
| 938 |
+
454,
|
| 939 |
+
352
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 8
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "table",
|
| 945 |
+
"img_path": "images/1f5e21a2b52d91f5c0613724dde6f40678975165712e0ecc40a2e3fe0682645b.jpg",
|
| 946 |
+
"table_caption": [
|
| 947 |
+
"Table 4: Attention type ablation. "
|
| 948 |
+
],
|
| 949 |
+
"table_footnote": [],
|
| 950 |
+
"table_body": "<table><tr><td>Local Type</td><td>Mechanism Type</td><td>mIoU (%)</td></tr><tr><td rowspan=\"2\">Shifted-Grid</td><td>MSA</td><td>71.6</td></tr><tr><td>GVA</td><td>72.5</td></tr><tr><td rowspan=\"2\">Neighborhood</td><td>MSA</td><td>73.9</td></tr><tr><td>GVA</td><td>75.0</td></tr></table>",
|
| 951 |
+
"bbox": [
|
| 952 |
+
483,
|
| 953 |
+
114,
|
| 954 |
+
805,
|
| 955 |
+
202
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 8
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "table",
|
| 961 |
+
"img_path": "images/6d6fce902c1fc9a3918ead32bc306e5bed3b46259e662b2adbc49a79b9697d28.jpg",
|
| 962 |
+
"table_caption": [
|
| 963 |
+
"Table 5: Pooling method ablation. "
|
| 964 |
+
],
|
| 965 |
+
"table_footnote": [],
|
| 966 |
+
"table_body": "<table><tr><td>Pooling Method</td><td>Pooling Ratio</td><td>Grid Size Multipliers</td><td>mIoU (%)</td></tr><tr><td>FPS</td><td>1/4 1/6</td><td>- -</td><td>74.4 72.9</td></tr><tr><td rowspan=\"3\">Grid</td><td>~1/4</td><td>[x3.0,×2.0,×2.0,×2.0]</td><td>75.2</td></tr><tr><td>~1/4</td><td>[x4.0,×2.0,×2.0,×2.0]</td><td>75.0</td></tr><tr><td>~1/6 ~1/6</td><td>[x3.0,×2.5,×2.5,×2.5] [x4.0,×2.5,×2.5,×2.5]</td><td>75.4 74.7</td></tr></table>",
|
| 967 |
+
"bbox": [
|
| 968 |
+
478,
|
| 969 |
+
234,
|
| 970 |
+
808,
|
| 971 |
+
351
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 8
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "table",
|
| 977 |
+
"img_path": "images/38ec0d0959bebacedc2b5a9424c5e0b4fc5b060076044db704bedac239322ee1.jpg",
|
| 978 |
+
"table_caption": [
|
| 979 |
+
"Table 6: Weight encoding ablation. "
|
| 980 |
+
],
|
| 981 |
+
"table_footnote": [],
|
| 982 |
+
"table_body": "<table><tr><td>ID</td><td>Weight encoding</td><td>mIoU (%)</td></tr><tr><td>(1)</td><td>MSA</td><td>73.9</td></tr><tr><td>(2)</td><td>L</td><td>73.8</td></tr><tr><td>(3)</td><td>GL</td><td>74.1</td></tr><tr><td>(4)</td><td>L+N+A+L</td><td>74.7</td></tr><tr><td>(5)</td><td>GL+N+A+L (ours)</td><td>75.0</td></tr></table>",
|
| 983 |
+
"bbox": [
|
| 984 |
+
205,
|
| 985 |
+
377,
|
| 986 |
+
442,
|
| 987 |
+
488
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 8
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "table",
|
| 993 |
+
"img_path": "images/b54e4e36f71066723b7529465d9a4f809d701a153096acce4bceddb0ce74c02c.jpg",
|
| 994 |
+
"table_caption": [
|
| 995 |
+
"Table 7: Module design ablation. "
|
| 996 |
+
],
|
| 997 |
+
"table_footnote": [],
|
| 998 |
+
"table_body": "<table><tr><td>ID</td><td>GVA</td><td>PE Mul</td><td>Grid Pool</td><td>Map Unpool</td><td>mIoU (%)</td></tr><tr><td>I</td><td></td><td></td><td></td><td></td><td>72.3</td></tr><tr><td>II</td><td></td><td></td><td></td><td></td><td>73.8</td></tr><tr><td>Ⅲ</td><td><<>></td><td>三</td><td></td><td></td><td>74.4</td></tr><tr><td>IV</td><td></td><td></td><td>~</td><td></td><td>74.9</td></tr><tr><td>V</td><td></td><td></td><td></td><td>√</td><td>75.4</td></tr></table>",
|
| 999 |
+
"bbox": [
|
| 1000 |
+
480,
|
| 1001 |
+
377,
|
| 1002 |
+
812,
|
| 1003 |
+
488
|
| 1004 |
+
],
|
| 1005 |
+
"page_idx": 8
|
| 1006 |
+
},
|
| 1007 |
+
{
|
| 1008 |
+
"type": "text",
|
| 1009 |
+
"text": "Pooling methods. In Sec. 3.4 we discuss the potential limitations of the sampling-based pooling in PTv1 and propose a new pooling and unpooling scheme based on non-overlapping partitions. We also name a simple and effective grid-based implement of our partition-based pooling as grid pooling. To further examine the superiority of our method, we experiment with different pooling-unpooling schemes in Table 5. ",
|
| 1010 |
+
"bbox": [
|
| 1011 |
+
173,
|
| 1012 |
+
503,
|
| 1013 |
+
825,
|
| 1014 |
+
573
|
| 1015 |
+
],
|
| 1016 |
+
"page_idx": 8
|
| 1017 |
+
},
|
| 1018 |
+
{
|
| 1019 |
+
"type": "text",
|
| 1020 |
+
"text": "For our partition-based pooling implemented by a grid, the base grid size is 0.02 meters, which is identical to the voxelization grid size during data pre-processing. The grid size multipliers are the grid size expansion ratio over the previous pooling stage. For example, $[ \\times 4 . 0 , \\times 2 . 0 , \\times 2 . 0 , \\times 2 . 0 ]$ means that the grid sizes are: [0.08, 0.16, 0.32, 0.64] meters, respectively. We choose a relatively large value for initial grid sizes $( \\times 3 . 0$ and $\\times 4 . 0 \\dot s$ ) to provide sufficiently large receptive fields, which is analogous to the common practice in image transformers [6]. For subsequent pooling stages, we observe that $\\times 2 . 0$ grid size increase results in an approximate pooling ratio of 4 for the point cloud, while $\\times 2 . 5$ grid size increase results in an approximate pooling ratio of 6. We choose the same sampling ratio of 4 and 6 for sampling-based pooling to ensure a fair comparison. ",
|
| 1021 |
+
"bbox": [
|
| 1022 |
+
174,
|
| 1023 |
+
579,
|
| 1024 |
+
825,
|
| 1025 |
+
705
|
| 1026 |
+
],
|
| 1027 |
+
"page_idx": 8
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"type": "text",
|
| 1031 |
+
"text": "The results in Table 5 illustrate that our partition-based pooling achieves higher mIoU than the sampling-based method. For sampling-based pooling with farthest point sampling, the performance decreases significantly when the sampling ratio increases from 4 to 6. However, for our partition-based pooling implemented by grid, we observe that initial grid size and subsequent grid size multipliers do not significantly affect the overall performance, so we can use larger grid sizes to reduce the number of points in each stage to save memory. ",
|
| 1032 |
+
"bbox": [
|
| 1033 |
+
174,
|
| 1034 |
+
710,
|
| 1035 |
+
825,
|
| 1036 |
+
794
|
| 1037 |
+
],
|
| 1038 |
+
"page_idx": 8
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"type": "text",
|
| 1042 |
+
"text": "Module design. We ablate different modules introduced in our PTv2: grouped vector attention (VGA), position encoding multiplier (PE Mul), partition-based pooling implemented by grid (Grid Pool), and partition map unpooling (Map Unpool) and the results are illustrated in Table 7. The model adopts in Experiment I is PTv1 [1], which serves as a baseline result of our design. Benefiting from structural parameter adjustments and better data processing, which are also shared with the rest of the experiments, our baseline result increased from $7 0 . 6 \\%$ to $7 2 . 3 \\%$ . Experiment $\\mathrm { I I }$ to $\\mathrm { v }$ add each of our proposed components in turns, gradually increasing our baseline result to $7 5 . 4 \\%$ . The increasing mIOU indicates the effectiveness of each component. ",
|
| 1043 |
+
"bbox": [
|
| 1044 |
+
173,
|
| 1045 |
+
800,
|
| 1046 |
+
825,
|
| 1047 |
+
911
|
| 1048 |
+
],
|
| 1049 |
+
"page_idx": 8
|
| 1050 |
+
},
|
| 1051 |
+
{
|
| 1052 |
+
"type": "table",
|
| 1053 |
+
"img_path": "images/e2f7144f8c6f683a5872e7816bc23ff97aec931acdbff92304cb225df087d806.jpg",
|
| 1054 |
+
"table_caption": [
|
| 1055 |
+
"Table 8: Model performance and amortized latency with different pooling methods. "
|
| 1056 |
+
],
|
| 1057 |
+
"table_footnote": [],
|
| 1058 |
+
"table_body": "<table><tr><td></td><td colspan=\"2\">FPS-kNN [4]</td><td colspan=\"2\">Grid-kNN [5]</td><td colspan=\"2\">Grid pooling (ours)</td></tr><tr><td>Pooling Rate</td><td>1/4</td><td>1/6</td><td>~1/4</td><td>~1/6</td><td>~1/4</td><td>~1/6</td></tr><tr><td>Time (ms)</td><td>1007</td><td>785</td><td>389</td><td>356</td><td>318</td><td>266</td></tr><tr><td>mIoU (%)</td><td>74.4</td><td>72.9</td><td>74.1</td><td>73.4</td><td>75.2</td><td>75.4</td></tr></table>",
|
| 1059 |
+
"bbox": [
|
| 1060 |
+
245,
|
| 1061 |
+
93,
|
| 1062 |
+
745,
|
| 1063 |
+
160
|
| 1064 |
+
],
|
| 1065 |
+
"page_idx": 9
|
| 1066 |
+
},
|
| 1067 |
+
{
|
| 1068 |
+
"type": "table",
|
| 1069 |
+
"img_path": "images/259144619c692cd1e838c24496617a29633059ba854f41ef445749db0a3885c8.jpg",
|
| 1070 |
+
"table_caption": [
|
| 1071 |
+
"Table 9: Model parameters and amortized latency of several networks. "
|
| 1072 |
+
],
|
| 1073 |
+
"table_footnote": [],
|
| 1074 |
+
"table_body": "<table><tr><td></td><td>① PTv1</td><td>② ① + GVA (L)</td><td>③ ① + GVA (GL)</td><td>④ ① + GVA (GL-N-A-L)</td><td>⑤ ④+GP</td><td>⑥ ⑤+PEM</td></tr><tr><td>Params (M)</td><td>11.4</td><td>9.8</td><td>9.6</td><td>9.6</td><td>9.6</td><td>12.8</td></tr><tr><td>Time (ms)</td><td>1023</td><td>991</td><td>951</td><td>971</td><td>220</td><td>266</td></tr><tr><td>mIoU (%)</td><td>72.3</td><td>73.0</td><td>73.2</td><td>74.2</td><td>75.0</td><td>75.4</td></tr></table>",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
176,
|
| 1077 |
+
185,
|
| 1078 |
+
821,
|
| 1079 |
+
265
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 9
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "4.4 Model Complexity and Latency ",
|
| 1086 |
+
"text_level": 1,
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
174,
|
| 1089 |
+
277,
|
| 1090 |
+
431,
|
| 1091 |
+
292
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 9
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "We further conduct model complexity and latency studies to examine the superior efficiency of several design in our work. We record the amortized forward time for each scan in the ScanNet v2 validation set with batch size 4 on a single TITAN RTX. ",
|
| 1098 |
+
"bbox": [
|
| 1099 |
+
176,
|
| 1100 |
+
303,
|
| 1101 |
+
823,
|
| 1102 |
+
344
|
| 1103 |
+
],
|
| 1104 |
+
"page_idx": 9
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"type": "text",
|
| 1108 |
+
"text": "Pooling methods. Table 8 shows the forward time and mIoU of PTv2 with different pooling methods and pooling ratios. We compare our pooling method with two classical sampling-based pooling methods: FPS-kNN and Grid-kNN. FPS-kNN pooling [4, 1] uses farthest point sampling (FPS) to sample a specified number of points and then query $k$ nearest neighbor points for pooling. We call the pooling method in Strided KPConv [5] Grid-kNN pooling, as it uses a uniform grid to sample points and then applies the kNN method to index neighbors. This leads to uncontrollable overlaps of the pooling receptive fields. As shown in the table, our grid pooling method is not only faster but also achieves higher mIoUs. ",
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
174,
|
| 1111 |
+
351,
|
| 1112 |
+
825,
|
| 1113 |
+
462
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 9
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "Module design. Table 9 summarizes comparisons of model complexity, time consumption, and evaluation performances on ScanNet v2 validation set. Meanwhile, we drop the first batch of forwarding time for GPU preparation. In Table 9, GVA refers to grouped vector attention. L refers to grouped weight encoding implemented by a single Linear. GL refers to grouped weight encoding implemented by a Grouped Linear. GL-N-A-L refers to the grouped linear layer, followed by batch normalization, activation, and a linear layer as grouped weight encoding function. GP refers to partition-based pooling implemented by grid. PEM refers to the position encoding multiplier. To ensure fair comparison, PTv1 is set to be the same depth and feature dimensions as our model architecture of PTv2. By comparing experiment $\\textcircled{1}$ and $\\textcircled{2}$ , we can study the effect of GVA. The same spirit goes on for experiment $\\textcircled{3}$ , $\\textcircled{4}$ , and $\\textcircled{5}$ , where each experiments adds one additional module, so that we can study the effect of the added module respectively. ",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
173,
|
| 1122 |
+
468,
|
| 1123 |
+
825,
|
| 1124 |
+
621
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 9
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "Comparing experiments $\\textcircled{1}$ , $\\textcircled{2}$ , $\\textcircled{3}$ , and $\\textcircled{4}$ , the introduction of grouped vector attention (GVA) with grouped weight encoding dramatically improves the model performance and slightly reduces execution time. The comparison between $\\textcircled{4}$ and $\\textcircled{5}$ indicates that the grid pooling strategy can significantly speed up the network and further enhance the generalization ability of our model. Position encoding multiplier is the only design that increases the number of model parameters, but experiment $\\textcircled{6}$ demonstrates its effectiveness in improving performance. Meanwhile, our model is still lightweight compared to voxel-based backbones, such as MinkUNet42 [18] with 37.9M parameters. ",
|
| 1131 |
+
"bbox": [
|
| 1132 |
+
174,
|
| 1133 |
+
626,
|
| 1134 |
+
825,
|
| 1135 |
+
723
|
| 1136 |
+
],
|
| 1137 |
+
"page_idx": 9
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"type": "text",
|
| 1141 |
+
"text": "5 Conclusion ",
|
| 1142 |
+
"text_level": 1,
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
174,
|
| 1145 |
+
741,
|
| 1146 |
+
299,
|
| 1147 |
+
758
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 9
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "We propose Point Transformer V2 (PTv2), a powerful and efficient transformer-based backbone for 3D point cloud understanding. Our work makes several non-trivial improvements upon Point Transformer V1 [1], including the grouped vector attention, improved position encoding, and partitionbased pooling. Our PTv2 model achieves state-of-the-art performance on point cloud classification and semantic segmentation benchmarks. ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
174,
|
| 1156 |
+
771,
|
| 1157 |
+
825,
|
| 1158 |
+
840
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 9
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "Acknowledgements ",
|
| 1165 |
+
"text_level": 1,
|
| 1166 |
+
"bbox": [
|
| 1167 |
+
174,
|
| 1168 |
+
853,
|
| 1169 |
+
338,
|
| 1170 |
+
869
|
| 1171 |
+
],
|
| 1172 |
+
"page_idx": 9
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"type": "text",
|
| 1176 |
+
"text": "This work is supported in part by HKU Startup Fund and HKU Seed Fund for Basic Research. We also appreciate the supporting of computing resources by SmartMore Corporation. ",
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
174,
|
| 1179 |
+
876,
|
| 1180 |
+
823,
|
| 1181 |
+
906
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 9
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "References [1] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021. \n1, 2, 3, 6, 7, 8, 9, 10, 14, 15, 16 [2] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In CVPR, \n2020. 1, 3, 4 [3] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 4 [4] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, 2017. 2, 6, 7, 9, 10, 15, 16 [5] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatriz Marcotegui, François Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. In ICCV, 2019. 2, 6, 7, \n9, 10, 15, 16 [6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021. \n2, 4, 9 [7] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. ICCV, 2021. 2, 4 [8] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In ICCV, 2021. 2 [9] Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. arXiv:2107.00652, 2021. 2 [10] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. 2 [11] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik G. Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In ICCV, 2015. 2 [12] Bo Li, Tianlei Zhang, and Tian Xia. Vehicle detection from 3d lidar using fully convolutional network. In RSS, 2016. 2 [13] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. 2 [14] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019. 2 [15] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In IROS, 2015. 2 [16] Shuran Song, Fisher Yu, Andy Zeng, Angel X Chang, Manolis Savva, and Thomas Funkhouser. Semantic scene completion from a single depth image. In CVPR, 2017. 2 [17] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In CVPR, 2018. 2, 7 [18] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In CVPR, 2019. 2, 6, 7, 10 [19] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 2, 7, 9 [20] Hengshuang Zhao, Li Jiang, Chi-Wing Fu, and Jiaya Jia. Pointweb: Enhancing local neighborhood features for point cloud processing. In CVPR, 2019. 2, 7 [21] Meng-Hao Guo, Jun-Xiong Cai, Zheng-Ning Liu, Tai-Jiang Mu, Ralph R Martin, and Shi-Min Hu. Pct: Point cloud transformer. Computational Visual Media, 2021. 2, 4, 9 \n[22] Bowen Cheng, Alexander G. Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for semantic segmentation. In NeurIPS, 2021. 4 \n[23] Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, and Rohit Girdhar. Maskedattention mask transformer for universal image segmentation. In CVPR, 2022. 4 \n[24] Zhenda Xie, Zheng Zhang, Yue Cao, Yutong Lin, Jianmin Bao, Zhuliang Yao, Qi Dai, and Han Hu. Simmim: A simple framework for masked image modeling. In CVPR, 2022. 4 \n[25] Hao Zhang, Feng Li, Shilong Liu, Lei Zhang, Hang Su, Jun Zhu, Lionel M. Ni, and Heung-Yeung Shum. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. arXiv preprint arXiv:2203.03605, 2022. 4 \n[26] Angela Dai and Matthias Nießner. 3dmv: Joint 3d-multi-view prediction for 3d semantic scene segmentation. In ECCV, 2018. 7 \n[27] Gaku Narita, Takashi Seno, Tomoya Ishikawa, and Yohsuke Kaji. Panopticfusion: Online volumetric semantic mapping at the level of stuff and things. In IROS, 2019. 7 \n[28] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. NeurIPS, 2018. 7, 9 \n[29] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In CVPR, 2019. 7, 9 \n[30] Hung-Yueh Chiang, Yen-Liang Lin, Yueh-Cheng Liu, and Winston H Hsu. A unified point-based framework for 3d segmentation. In 3DV, 2019. 7 \n[31] Xu Yan, Chaoda Zheng, Zhen Li, Sheng Wang, and Shuguang Cui. Pointasnl: Robust point clouds processing using nonlocal neural networks with adaptive sampling. In CVPR, 2020. 7, 9 \n[32] Huan Lei, Naveed Akhtar, and Ajmal Mian. Seggcn: Efficient 3d point cloud segmentation with fuzzy spherical kernel. In CVPR, 2020. 7 \n[33] Qingyong Hu, Bo Yang, Linhai Xie, Stefano Rosa, Yulan Guo, Zhihua Wang, Niki Trigoni, and Andrew Markham. Randla-net: Efficient semantic segmentation of large-scale point clouds. In CVPR, 2020. 7 \n[34] Zeyu Hu, Mingmin Zhen, Xuyang Bai, Hongbo Fu, and Chiew-lan Tai. Jsenet: Joint semantic segmentation and edge detection network for 3d point clouds. In ECCV, 2020. 7 \n[35] Feihu Zhang, Jin Fang, Benjamin Wah, and Philip Torr. Deep fusionnet for point cloud semantic segmentation. In ECCV, 2020. 7 \n[36] Lyne Tchapmi, Christopher Choy, Iro Armeni, JunYoung Gwak, and Silvio Savarese. Segcloud: Semantic segmentation of 3d point clouds. In 3DV, 2017. 7 \n[37] Maxim Tatarchenko, Jaesik Park, Vladlen Koltun, and Qian-Yi Zhou. Tangent convolutions for dense prediction in 3d. In CVPR, 2018. 7 \n[38] Li Jiang, Hengshuang Zhao, Shu Liu, Xiaoyong Shen, Chi-Wing Fu, and Jiaya Jia. Hierarchical point-edge interaction network for point cloud semantic segmentation. In ICCV, 2019. 7 \n[39] Lei Wang, Yuchun Huang, Yaolin Hou, Shenman Zhang, and Jie Shan. Graph attention convolution for point cloud semantic segmentation. In CVPR, 2019. 7 \n[40] Jiancheng Yang, Qiang Zhang, Bingbing Ni, Linguo Li, Jinxian Liu, Mengdie Zhou, and Qi Tian. Modeling point clouds with self-attention and gumbel subset sampling. In CVPR, 2019. 7 \n[41] Shenlong Wang, Simon Suo, Wei-Chiu Ma, Andrei Pokrovsky, and Raquel Urtasun. Deep parametric continuous convolutional neural networks. In CVPR, 2018. 7 \n[42] Loic Landrieu and Martin Simonovsky. Large-scale point cloud semantic segmentation with superpoint graphs. In CVPR, 2018. 7 \n[43] Mutian Xu, Runyu Ding, Hengshuang Zhao, and Xiaojuan Qi. Paconv: Position adaptive convolution with dynamic kernel assembling on point clouds. In CVPR, 2021. 7, 9 \n[44] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, 2017. 6, 7, 14 \n[45] Iro Armeni, Ozan Sener, Amir R. Zamir, Helen Jiang, Ioannis Brilakis, Martin Fischer, and Silvio Savarese. 3d semantic parsing of large-scale indoor spaces. In CVPR, 2016. 6, 7, 14 \n[46] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, 2015. 6, 7, 14 \n[47] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. TOG, 2019. 9 \n[48] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In CVPR, 2019. 9 \n[49] Yongcheng Liu, Bin Fan, Gaofeng Meng, Jiwen Lu, Shiming Xiang, and Chunhong Pan. Densepoint: Learning densely contextual representation for efficient point cloud processing. In ICCV, 2019. 9 \n[50] Ze Liu, Han Hu, Yue Cao, Zheng Zhang, and Xin Tong. A closer look at local aggregation operators in point cloud analysis. In ECCV, 2020. 9 \n[51] Shi Qiu, Saeed Anwar, and Nick Barnes. Geometric back-projection network for point cloud classification. TMM, 2021. 9 \n[52] Tiange Xiang, Chaoyi Zhang, Yang Song, Jianhui Yu, and Weidong Cai. Walk in the cloud: Learning curves for point clouds shape analysis. In ICCV, 2021. 9 ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
171,
|
| 1190 |
+
64,
|
| 1191 |
+
828,
|
| 1192 |
+
916
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 10
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "",
|
| 1199 |
+
"bbox": [
|
| 1200 |
+
171,
|
| 1201 |
+
68,
|
| 1202 |
+
828,
|
| 1203 |
+
916
|
| 1204 |
+
],
|
| 1205 |
+
"page_idx": 11
|
| 1206 |
+
},
|
| 1207 |
+
{
|
| 1208 |
+
"type": "text",
|
| 1209 |
+
"text": "",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
171,
|
| 1212 |
+
90,
|
| 1213 |
+
828,
|
| 1214 |
+
367
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 12
|
| 1217 |
+
}
|
| 1218 |
+
]
|
parse/dev/I3mLa12s_H/I3mLa12s_H_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/I3mLa12s_H/I3mLa12s_H_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/JavFPcsscd5/JavFPcsscd5_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/LQnyIk5dUA/LQnyIk5dUA.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/LQnyIk5dUA/LQnyIk5dUA_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/LQnyIk5dUA/LQnyIk5dUA_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/LQnyIk5dUA/LQnyIk5dUA_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Nayau9fwXU/Nayau9fwXU_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/NnIaEaBfXD/NnIaEaBfXD.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Mix-of-Show: Decentralized Low-Rank Adaptation for Multi-Concept Customization of Diffusion Models
|
| 2 |
+
|
| 3 |
+
Yuchao $\mathbf { G u } ^ { 1 }$ , Xintao Wang3, Jay Zhangjie $\mathbf { W } \mathbf { u } ^ { 1 }$ , Yujun $\mathbf { S h i ^ { 2 } }$ , Yunpeng Chen2, Zihan $\mathbf { F a n } ^ { 2 }$ , Wuyou Xiao2, Rui Zhao1, Shuning Chang1, Weijia $\mathbf { W } \mathbf { u } ^ { 1 }$ , Yixiao $\mathbf { G e ^ { 3 } }$ , Ying Shan3, Mike Zheng Shou1∗
|
| 4 |
+
|
| 5 |
+
1Show Lab, 2National University of Singapore 3ARC Lab, Tencent PCG
|
| 6 |
+
|
| 7 |
+
https://showlab.github.io/Mix-of-Show
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Public large-scale text-to-image diffusion models, such as Stable Diffusion, have gained significant attention from the community. These models can be easily customized for new concepts using low-rank adaptations (LoRAs). However, the utilization of multiple concept LoRAs to jointly support multiple customized concepts presents a challenge. We refer to this scenario as decentralized multiconcept customization, which involves single-client concept tuning and center-node concept fusion. In this paper, we propose a new framework called Mix-of-Show that addresses the challenges of decentralized multi-concept customization, including concept conflicts resulting from existing single-client LoRA tuning and identity loss during model fusion. Mix-of-Show adopts an embedding-decomposed LoRA (EDLoRA) for single-client tuning and gradient fusion for the center node to preserve the in-domain essence of single concepts and support theoretically limitless concept fusion. Additionally, we introduce regionally controllable sampling, which extends spatially controllable sampling (e.g., ControlNet and T2I-Adapter) to address attribute binding and missing object problems in multi-concept sampling. Extensive experiments demonstrate that Mix-of-Show is capable of composing multiple customized concepts with high fidelity, including characters, objects, and scenes.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Open-source text-to-image diffusion models, such as Stable Diffusion [1], empower community users to create customized models by collecting personalized concept images and fine-tuning them with low-rank adaptation (LoRA) [2, 3]. These tailored LoRA models achieve unparalleled quality for specific concepts through meticulous data selection, preprocessing, and hyperparameter tuning. While existing concept LoRAs serve as plug-and-play plugins for pretrained models, there are still challenges in utilizing multiple concept LoRAs to extend the pretrained model and enable joint composition of those concepts. We refer to this
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Illustration of decentralized multiconcept customization via Mix-of-Show.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 2: How to generate Harry Potter and Thanos, these two (or even more) concepts from different shows, in the same image? Our Mix-of-Show enables complex compositions of multiple customized concepts (e.g., characters, objects, scenes) with individually trained concept LoRAs.
|
| 22 |
+
|
| 23 |
+
scenario as decentralized multi-concept customization. As shown in Fig. 1, it involves two steps: single-client concept tuning and center-node concept fusion. Each client retains their private concept data while sharing the tuned LoRA models. The center node leverages these concept LoRAs to update the pretrained model, enabling joint sampling of these customized concepts. Decentralized multi-concept customization facilitates maximum community engagement in producing high-quality concept LoRAs and offers flexibility in reusing and combining different concept LoRAs.
|
| 24 |
+
|
| 25 |
+
However, the existing LoRA tuning and weight fusion techniques [3] fail to address the challenges of decentralized multi-concept customization. We have identified two main challenges: concept conflict and identity loss. Concept conflict arises because current LoRA tuning methods do not differentiate between the roles of embeddings and LoRA weights. Our research reveals that embeddings effectively capture concepts within the pretrained models’ domain, while LoRA weight assist in capturing outof-domain information (e.g., styles or fine details cannot be directly modeled by the pretrained model). However, existing LoRA tuning methods place excessive emphasis on LoRA weights while overlooking the importance of embeddings. Consequently, the LoRA weights encode a significant portion of the identity of a given concept, resulting in semantically similar embeddings being projected onto concepts with different appearances. This, in turn, leads to conflicts during model fusion. Furthermore, existing weight fusion strategies compromise each concept’s identity and introduce interference from other concepts by performing a weighted average of all concept LoRAs.
|
| 26 |
+
|
| 27 |
+
To overcome the challenges of decentralized multi-concept customization, we propose Mix-of-Show, which involves embedding-decomposed LoRA (ED-LoRA) for single-client tuning and gradient fusion for center-node fusion. In single-client tuning, ED-LoRA is designed to address concept conflicts by preserving more in-domain essence within the embedding. To achieve this, we enhance the expressive ability of the concept embedding by decomposing it into layer-wise embeddings [4] and multi-word representations. At the central node, gradient fusion leverages multiple concept LoRAs to update the pretrained model. Since the diffusion model includes both forward and reverse diffusion processes, we can obtain the input/output features of each layer through sampling, even in the absence of data. Features from multiple concept LoRAs are combined to generate the fused gradient, which is used for layer-wise updating. Compared to weight fusion [3], gradient fusion aligns the inference behavior of each individual concept, significantly reducing identity loss.
|
| 28 |
+
|
| 29 |
+
To demonstrate the capabilities of Mix-of-Show, we introduce regionally controllable sampling for multi-concept generation. Direct multi-concept generation often encounters issues such as missing objects and attribute binding [5, 6]. Recently, spatially controllable sampling (e.g., ControlNet [7], T2I-Adapter [8]) have been introduced to guide diffusion models using spatial hints (e.g., keypose or sketch), which resolve the problem of missing objects but still faces challenges of attribute binding in multi-concept generation. Considering that spatial layout is pre-defined when adopting spatial conditions, we propose injecting region prompts through regional-aware cross-attention. Powered by Mix-of-Show and regionally controllable sampling, we can achieve complex compositions of multiple customized concepts, including characters, objects, and scenes, as illustrated in Fig. 2. In summary, our contributions are as follows: 1) We analyze the challenges of decentralized multiconcept customization. 2) We propose the Mix-of-Show framework, consisting of an embeddingdecomposed LoRA (ED-LoRA) and gradient fusion, to address the concept conflict and identity loss in decentralized multi-concept customization. 3) We introduce regionally controllable sampling to demonstrate the potential of Mix-of-Show in composing multiple customized concepts.
|
| 30 |
+
|
| 31 |
+
# 2 Related Work
|
| 32 |
+
|
| 33 |
+
# 2.1 Concept Customization
|
| 34 |
+
|
| 35 |
+
Concept customization aims to extend pretrained diffusion models to support personalized concepts using only a few images. There are two main types of concept tuning methods: embedding tuning (e.g., Textual Inversion [9] and $\mathrm { P } +$ [4]) and joint embedding-weight tuning (e.g., Dreambooth [10] and Custom Diffusion [11]). Additionally, the community [3] adopts low-rank adapter (LoRA) [2] for concept tuning, which is lightweight and can achieve comparable fidelity to full weight tuning.
|
| 36 |
+
|
| 37 |
+
Although significant progress has been made in single-concept customization, multi-concept customization remains a challenge. Custom Diffusion [11] proposes co-training of multiple concepts or constrained optimization of several existing concept models. Following this, SVDiff [12] introduces data augmentation to prevent concept mixing in co-training multi-concepts, and Cones [13] discovers concept neurons that can be added to support multiple concepts. However, their methods are typically restricted to fuse 2-3 semantically distinct concepts. In contrast, Mix-of-Show can combine theoretically limitless customized concepts, including those within the same semantic category.
|
| 38 |
+
|
| 39 |
+
Another research line in concept customization, as explored in studies by Instantbooth [14], ELITE [15], and Jia et al. [16], focuses on achieving fast test-time customization. These methods involve pretraining an encoder on a large-scale dataset specific to the desired category. During inference, when provided with a few representative concept images from the trained category, the encoder extracts features that complement the pretrained diffusion models and support customized generation. However, these methods require training a separate encoder for each category, typically limited to common categories (e.g., person or cats). This limitation hinders their ability to customize and compose more diverse and open-world subjects.
|
| 40 |
+
|
| 41 |
+
# 2.2 Decentralized Learning
|
| 42 |
+
|
| 43 |
+
Decentralized or federated learning aims to train models collaboratively across different clients without sharing data. The de facto algorithm for federated learning, FedAvg, was proposed by [17]. This method simply averages the weights of each client’s model to obtain the final model. However, we find that directly applying this simple weight averaging is not ideal for fusing LoRAs of different concepts. To improve over FedAvg, previous works have either focused on local client training [18, 19, 20, 21, 22, 23, 24] or global server aggregation [25, 26, 27, 28, 29, 30]. Motivated by this, we explore the optimal design of single-client tuning and center-node fusion for decentralized multi-concept customization.
|
| 44 |
+
|
| 45 |
+
# 2.3 Controllable Multi-Concept Generation
|
| 46 |
+
|
| 47 |
+
Direct multi-concept generation using text prompts alone faces challenges such as missing objects and attribute binding [6, 31, 32, 33, 34]. Previous approaches, like Attend-and-Excite [5] and Structure Diffusion [6], have attempted to address these issues, but the problem still persist, limiting the effectiveness of multi-concept generation. Recent works, such as ControlNet [7] and T2I-Adapter [8], introduce spatial control (e.g., keypose and sketch) and enable more accurate compositions, resolving the problem of missing objects in multi-concept generation. However, attribute binding remains a challenge. In our work, we tackle this challenge through regionally controllable sampling.
|
| 48 |
+
|
| 49 |
+
# 3 Methods
|
| 50 |
+
|
| 51 |
+
In this section, we provide a brief background on text-to-image diffusion models and concept customization in Sec. 3.1. We then introduce the task formulation of decentralized multi-concept customization in Sec. 3.2, followed by a detailed description of our method in Sec. 3.3 and Sec. 3.4.
|
| 52 |
+
|
| 53 |
+
# 3.1 Preliminary
|
| 54 |
+
|
| 55 |
+
Text-to-Image Diffusion Models. Diffusion models [35, 36, 37, 38, 39, 40, 41] belong to a class of generative models that gradually introduce noise into an image during the forward diffusion process and learn to reverse this process to synthesize images. When combined with pretrained text embeddings, text-to-image diffusion models [1, 42, 43, 44, 45, 46] are capable of generating high-fidelity images based on text prompts. In this paper, we conduct experiments using Stable Diffusion [1], which is a variant of the text-to-image diffusion model operating in the latent space. Given a condition $c = \psi ( P ^ { * } )$ , where $P ^ { * }$ is the text prompt and $\psi$ is the pretrained CLIP text encoder [47], the training objective for stable diffusion is to minimize the denoising objective by
|
| 56 |
+
|
| 57 |
+
where $z _ { t }$ is the latent feature at timestep $t$ and $\epsilon _ { \theta }$ is the denoising unet with learnable parameter $\theta$
|
| 58 |
+
|
| 59 |
+
Embedding Tuning for Concept Customization. Textual Inversion [9] represents the input concept using a unique token $V$ . When provided with a few images of the target concept, the embedding of $V$ is tuned using Eq. 1. After tuning, the embedding for $V$ encodes the essence of the target concept and functions like any other text in the pretrained model. To achieve greater disentanglement and control, $\mathrm { P } + [ 4 ]$ introduces layer-wise embeddings for concept tokens, denoted as $V ^ { + }$ in this paper.
|
| 60 |
+
|
| 61 |
+
# Single-Concept
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 3: Single- and multi-concept customization between the embedding tuning (i.e., Textual Inversion (TI) [9] and $\mathrm { P } +$ [4]), and joint embedding-weight tuning (i.e., LoRA [3] and our ED-LoRA). $P ^ { * } =$ “Photo of a $V$ , near the beach". $\Phi _ { 0 }$ and $\Delta \Phi$ denotes the pretrained model and LoRA weight.
|
| 65 |
+
|
| 66 |
+
Low-Rank Adaptation. Low-rank adaptation (LoRA) [2] was initially proposed to adapt largelanguage models to downstream tasks. It operates under the assumption that weight changes during adaptation have a low “intrinsic rank" and introduces a low-rank factorization of the weight change to obtain the updated weight $W$ , which is given by $W = W _ { 0 } + \Delta W = W _ { 0 } + B A .$ . Here, $\mathcal { W } _ { 0 } \in \breve { \mathbb { R } } ^ { d \times k }$ represents the original weight in the pretrained model, and $B \in \mathbb { R } ^ { d \times r }$ and $A \in \mathbb { R } ^ { r \times k }$ represent the low-rank factors, with $r \ll \operatorname* { m i n } ( d , k )$ . Recently, the community [3] has adopted LoRA for fine-tuning diffusion models, leading to promising results. LoRA is typically used as a plug-and-play plugin in pretrained models, but the community also employs weight fusion techniques to combine multiple LoRAs:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
W = W _ { 0 } + \sum _ { i = 1 } ^ { n } w _ { i } \Delta W _ { i } , \quad { \mathrm { s . t . } } \sum _ { i = 1 } ^ { n } w _ { i } = 1 ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $w _ { i }$ denotes the normalized importance of different LoRAs.
|
| 73 |
+
|
| 74 |
+
# 3.2 Task Formulation: Decentralized Multi-Concept Customization
|
| 75 |
+
|
| 76 |
+
While custom diffusion [11] has attempted to merge two tuned concepts models into a pretrained model, their findings suggest that co-training with multiple concepts yields better results. However, considering scalability and reusability, we focus on merging single-concept models to support multi-concept customization. We refer to this setting as decentralized multi-concept customization.
|
| 77 |
+
|
| 78 |
+
Formally, decentralized multi-concept customization involves a two-step process: single-client concept tuning and center-node concept fusion. As shown in Fig. 1, each of the $n$ clients possesses its own private concept data and tunes the concept model $\Delta W _ { i }$ . Here, $\Delta W _ { i }$ represents the changes in network weights, which specifically refers to LoRA weights in our work. We omit discussing the merging of text embeddings, as the tuned embeddings can be seamlessly integrated into the pretrained model without conflicts.
|
| 79 |
+
|
| 80 |
+
After tuning, the center node gathers all LoRAs to obtain the updated pretrained weight $W$ by:
|
| 81 |
+
|
| 82 |
+
where $f$ represents the update rule that operates on the original pretrained model weight $W _ { 0 }$ and the $n$ concept LoRAs $\{ \Delta W _ { i } , i = 1 \cdots n \}$ . One straightforward updating rule $f$ is weight fusion, as illustrated in Eq. 2. Once updated, the new model $W$ should be capable of generating all the concepts introduced in the $n$ LoRAs.
|
| 83 |
+
|
| 84 |
+
# 3.3 Mix-of-Show
|
| 85 |
+
|
| 86 |
+
In this section, we introduce Mix-of-Show, containing ED-LoRA (in Sec. 3.3.1) for single-client concept tuning, gradient fusion (in Sec. 3.3.2) for center-node concept fusion.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 4: Pipeline of Mix-of-Show. In single-client concept tuning, the ED-LoRA adopts the layerwise embedding and multi-word representation. In center node, gradient fusion is adopted to fuse multiple concept LoRAs and then support composing those customized concepts.
|
| 90 |
+
|
| 91 |
+
# 3.3.1 Single-Client Concept Tuning: ED-LoRA
|
| 92 |
+
|
| 93 |
+
Vanilla LoRA [3] is not suitable for decentralized multi-concept customization due to the issue of concept conflict. To better understand this limitation, we start by examining the distinct roles of embeddings and LoRA weights in concept tuning.
|
| 94 |
+
|
| 95 |
+
Single-Concept Tuning Setting. We investigate embedding tuning (i.e., Textual Inversion [9] and $\mathrm { P } +$ [4]) and the joint embedding-weight tuning (i.e., LoRA [3]) on single concept customization. We conduct experiments on both in-domain concept (i.e., directly sampled from the pretrained model), and out-domain concepts. The weights of the pretrained model, including the unet $\theta$ and the text encoder $\psi$ , are denoted as $\Phi _ { 0 } = \{ \theta _ { 0 } , \psi _ { 0 } \}$ . Given a text prompt $P ^ { * }$ containing the concept $V$ , we visualize the tuned embedding of concept $V$ using the pretrained weights $\Phi _ { 0 } ( \bar { P ^ { * } } )$ , and visualize the tuned embedding along with the LoRA weight using $( \Phi _ { 0 } + \Delta \Phi ) ( P ^ { * } )$ .
|
| 96 |
+
|
| 97 |
+
Analysis. Based on the experiment results in Fig. 3, we draw the following two observations regarding existing embedding tuning and joint embedding-weight tuning approaches.
|
| 98 |
+
|
| 99 |
+
Observation 1: The embeddings are capable of capturing concepts within the domain of pretrained models, while the LoRA helps capture out-domain information.
|
| 100 |
+
|
| 101 |
+
In Fig. 3(a, b), we observe that embedding tuning approaches such as Textual Inversion and $\mathrm { P } +$ struggle to capture out-domain concepts. This is because they attempt to encode all out-domain details (e.g., anime styles or details not modeled by the pretrained model $\Phi _ { 0 }$ ) within the embedding, resulting in semantic collapse. However, for in-domain concepts sampled from the model, embedding tuning accurately encodes the concept identity within the embedding, benefiting from the accurate modeling of concept details by the pretrained model weights $\Phi _ { 0 }$ . Furthermore, when jointly tuning the embedding with LoRA, the embedding no longer produces oversaturated outputs. This is because the out-domain information is captured by the pretrained model with LoRA weight shift (i.e., $\Phi _ { 0 } + \Delta \Phi )$ .
|
| 102 |
+
|
| 103 |
+
Observation 2: Existing LoRA weights encode most of the concept identity and project semantically similar embeddings to visually distinct concepts, leading to conflicts during concept fusion.
|
| 104 |
+
|
| 105 |
+
In the joint embedding-LoRA tuning results shown in Fig. 3(c), we observe that directly visualizing the embedding with the pretrained model $\Phi _ { 0 } ( P ^ { * } )$ yields semantically similar results. However, when the LoRA weights are loaded $( \Phi _ { 0 } + \Delta \Phi ) ( P ^ { * } )$ , the target concept can be accurately captured. This suggests that the majority of the concept identity is encoded within the LoRA weights rather than the embedding itself. However, when attempting to support multiple semantically similar concepts within a single model, it becomes problematic to determine which concept to sample based on similar embeddings, resulting in concept conflicts. As shown in Fig. 3(e), when fused into one model, the identity of each individual concept is lost.
|
| 106 |
+
|
| 107 |
+
Our Solution: ED-LoRA. Based on the aforementioned observations, our ED-LoRA is designed to preserve more in-domain essence within the embedding while capturing the remaining details using LoRA weights. To achieve this, we enhance the expressiveness of the embedding through decomposed embedding. As illustrated in Fig. 4, we adopt a layer-wise embedding similar to [4] and create a multi-world representation for the concept token $\mathbf { \bar { \rho } } \mathbf { \bar { V } } = V _ { r a n d } ^ { + } V _ { c l a s s } ^ { + } )$ . Here, $V _ { r a n d } ^ { + }$ is randomly initialized to capture the variance of different concepts, while $V _ { c l a s s } ^ { + }$ is initialized based on its semantic class to maintain semantic meaning. Both tokens are learnable during concept tuning. As shown in Fig. 3(d), the learned embedding of ED-LoRA effectively preserves the essence of the given concept within the domain of the pretrained model, while LoRA helps capture the other details.
|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 5: Regionally controllable sampling for multi-concept generation.
|
| 111 |
+
|
| 112 |
+
# 3.3.2 Center-Node Concept Fusion: Gradient Fusion
|
| 113 |
+
|
| 114 |
+
At the center node, we have access to all the concept LoRAs and can use these models to update the pretrained model, enabling multi-concept customization. However, the existing weight fusion strategy described in Eq. 2 is insufficient to achieve this goal, as we will discuss further below.
|
| 115 |
+
|
| 116 |
+
Multi-Concept Fusion Setting. In this experiment, we apply the weight fusion described in Eq. 2 to weighted average $n$ concept LoRAs or ED-LoRAs $\{ \Delta \Phi _ { i } , i = 1 \cdots n \}$ into the pretrained model $\Phi _ { 0 }$ , resulting in a new model $\Phi$ . We then use the new model $\Phi ( P _ { i } ^ { * } )$ to sample each concept and compare its identity with the corresponding single-concept sample $( \bar { \Phi _ { 0 } } + \Delta \Phi ) ( P _ { i } ^ { * } )$ .
|
| 117 |
+
|
| 118 |
+
Analysis. Based on the results in Fig. 3, we make the following observation about fusion strategy.
|
| 119 |
+
|
| 120 |
+
Observation 3: Weight fusion leads to identity loss of individual concepts in concept fusion.
|
| 121 |
+
|
| 122 |
+
As shown in Fig. 3 (multi-concept), we can observe that weight fusion in the case of LoRA leads to significant loss of concept identity due to conflicts between concepts. Even when combined with our ED-LoRA, weight fusion still compromises the identity of each individual concept. In theory, if a concept achieves its complete identity through LoRA weight shift $\Delta \Phi ( P ^ { * } )$ , fusing it with $n$ -1 other concept LoRAs requires reducing its weight to $\begin{array} { r } { { \frac { 1 } { n } } \Delta \Phi ( P ^ { * } ) } \\ { . ^ { n } } \end{array}$ and introducing other concept LoRA weights, which ultimately diminishes the concept’s identity.
|
| 123 |
+
|
| 124 |
+
Our Solution: Gradient Fusion. Based on the previous analysis, our objective is to preserve the identity of each concept in the fused model by aligning their single-concept inference behavior. Unlike in federated learning [17, 19], where models are typically single-direction classification models that cannot access gradients without data, text-to-image diffusion models have the inherent capability to decode concepts from text prompts. Leveraging this characteristic, we first decode the individual concepts using their respective LoRA weights, as depicted in Fig. 4(b). We then extract the input and output features associated with each LoRA layer. These input/output features from different concepts ate eac, where yer rep $W$ using the following objective:ents the input activation of the $W = \mathrm { a r g } \mathrm { m i n } _ { W }$ $\begin{array} { r } { \sum _ { i = 1 } ^ { n } | | ( \boldsymbol { W _ { 0 } } + \Delta \boldsymbol { W _ { i } } ) X _ { i } - \boldsymbol { W } X _ { i } | | _ { F } ^ { 2 } } \end{array}$ $X _ { i }$ $i$ -th concept, and $| \cdot | _ { F }$ denotes the Frobenius norm. By adopting this approach, we can fuse different concept LoRAs without accessing the data and without considering their differences during training. The results of our gradient fusion are shown in Fig. 3(f), demonstrating improved preservation of each concept’s identity and consistent stylization across different concepts.
|
| 125 |
+
|
| 126 |
+
# 3.4 Regionally Controllable Sampling
|
| 127 |
+
|
| 128 |
+
Direct multi-concept sampling often encounters challenges of missing objects and attribute binding [6, 31, 32, 33, 34]. While spatially controllable sampling methods (e.g., ControlNet [7] and T2IAdapter [8]) can address the issue of missing objects in multi-concept generation, they cannot accurately bind concepts to specific keyposes or sketches. Merely indicating the desired concept
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 6: Qualitative comparison on single- and multi-concept customization.
|
| 132 |
+
|
| 133 |
+
<table><tr><td></td><td>Methods</td><td>Real-Objects Single→Fused</td><td>Real-Characters Single-→Fused</td><td>Real-Scenes Single-→Fused</td><td>Mean Change</td></tr><tr><td rowspan="5">Text-alignment</td><td>Upper Bound</td><td>0.811</td><td>0.767</td><td>0.834</td><td>0.804</td></tr><tr><td>P+ [4]</td><td>0.771-→0.771 (-)</td><td>0.686-→0.686(-)</td><td>0.759-→0.759 (-)</td><td>0.739-→0.739 (-)</td></tr><tr><td>Custom Diffusion [11]</td><td>0.745->0.747(+0.002)</td><td>0.674-0.650 (-0.024)</td><td>0.748-→0.738 (-0.010)</td><td>0.722-0.712(-0.010)</td></tr><tr><td>LoRA [3]</td><td>0.720->0.795 (+0.075)</td><td>0.654->0.700 (+0.046)</td><td>0.717->0.760 (+0.043)</td><td>0.697-→0.752(+0.055)</td></tr><tr><td>Mix-of-Show (Ours)</td><td>0.724-→0.745 (+0.021)</td><td>0.632-→0.662(+0.030)</td><td>0.716-→0.736(+0.020)</td><td>0.691-0.714(+0.024)</td></tr><tr><td rowspan="5">Image-alignment</td><td>Lower Bound</td><td>0.721</td><td>0.471</td><td>0.595</td><td>0.596</td></tr><tr><td>P+ [4]</td><td>0.790→0.790 (-)</td><td>0.670-→0.670 (-)</td><td>0.796→0.796 (-)</td><td>0.752-→0.752(-)</td></tr><tr><td>Custom Diffusion [11]</td><td>0.842-→0.808 (-0.034)</td><td>0.714-→0.694 (-0.020)</td><td>0.804-→0.750 (-0.054)</td><td>0.787-→0.751(-0.036)</td></tr><tr><td>LoRA [3]</td><td>0.864-→0.778 (-0.086)</td><td>0.761-→0.555(-0.206)</td><td>0.824-→0.769 (-0.055)</td><td>0.816-→0.701 (-0.115)</td></tr><tr><td>Mix-of-Show (Ours)</td><td>0.868-→0.846 (-0.022)</td><td>0.802->0.770 (-0.032)</td><td>0.858-→0.838 (-0.020)</td><td>0.843-→0.818(-0.025)</td></tr></table>
|
| 134 |
+
|
| 135 |
+
Table 1: Text-alignment and image-alignment vary between the single-client tuned model and the center-node fused model. The upper bound of text-alignment and the lower bound of image-alignment are computed by replacing the concept’s token (e.g., $V ^ { d o g A ^ { \prime } }$ ) with its class token (e.g., dog) and sampling using the pretrained model.
|
| 136 |
+
|
| 137 |
+
and attribute through a text prompt can lead to attribute binding problems, as in Fig. 5(a), where the identities of three people are mixed, and the "red dress" is incorrectly assigned to other concepts.
|
| 138 |
+
|
| 139 |
+
To address these challenges, we propose a method called regionally controllable sampling. This approach utilizes both a global prompt and multiple regional prompts to describe an image based on spatial conditions. The global prompt provides the overall context, while the regional prompts specify subjects within specific regions, including their attributes and contextual information from the global prompt (e.g., "near a lake"). To achieve this, we introduce region-aware cross-attention. Given a global prompt $P _ { g } ^ { * }$ and $n$ regional prompts $P _ { r _ { i } } ^ { * }$ , we first incorporate the global prompt via cross-attention with the latent $z$ by $\begin{array} { r } { h = \mathrm { s o f t m a x } \left( \frac { Q ( z ) \dot { K } ( P _ { g } ^ { * } ) } { \sqrt { d } } \right) \cdot V ( P _ { g } ^ { * } ) } \end{array}$ . Then, we extract the regional latent feature by $z _ { \mathrm { i } } = z \odot M _ { i }$ , where $M _ { i }$ represents the binary mask associated with the region specified by $P _ { r _ { i } } ^ { * }$ . We obtain regional features using $h _ { i } = \mathrm { s o f t m a x } \left( \frac { Q ( z _ { i } ) K ( P _ { r _ { i } } ^ { * } ) } { \sqrt { d } } \right) \cdot V ( P _ { r _ { i } } ^ { * } )$ . Finally, we replace the features in the global output with the regional features: $h [ M _ { i } ] = h _ { i }$ . As shown in Fig. 5(b), regionally controllable sampling allows for precise assignment of subjects and attributes, while maintaining a harmonious global context.
|
| 140 |
+
|
| 141 |
+
# 4 Experiments
|
| 142 |
+
|
| 143 |
+
# 4.1 Datasets and Implementation Details
|
| 144 |
+
|
| 145 |
+
To conduct evaluation for Mix-of-Show, we collect a dataset containing characters, objects, and scenes. For ED-LoRA tuning, we incorporate LoRA layer into the linear layer in all attention (a) Subject identity preservation (i.e., image-alignment) measured by CLIP score between LoRA $^ +$ weight fusion, ED-LoRA $^ +$ weight fusion, and ED-LoRA $^ +$ gradient fusion. Our ED-LoRA $^ +$ gradient fusion achieves the least loss in image-alignment after multi-concept fusion, preserving the best subject identity.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 7: Qualitative ablation study of Mix-of-Show. $P ^ { * }$ means the text prompt. $\Phi _ { 0 }$ and $\Delta \Phi$ denotes the pretrained model and LoRA weight, respectively.
|
| 149 |
+
|
| 150 |
+
<table><tr><td></td><td>Methods</td><td>Real-Objects Single-→Fused</td><td>Real-Characters Single-→Fused</td><td>Real-Scenes Single-→Fused</td><td>Mean Change</td></tr><tr><td rowspan="4">Image-alignment</td><td>Lower Bound</td><td>0.721</td><td>0.471</td><td>0.595</td><td>0.596</td></tr><tr><td>LoRA+ Weight Fusion</td><td>0.864- 0.778 (-0.086)</td><td>0.761-0.555(-0.206)</td><td>0.824->0.769 (-0.055)</td><td>0.816-→0.701 (-0.115)</td></tr><tr><td>ED-LoRA + Weight Fusion</td><td>0.868-→0.798 (-0.070)</td><td>0.802-→0.634 (-0.168)</td><td>0.858->0.816 (-0.042)</td><td>0.843->0.749 (-0.094)</td></tr><tr><td>ED-LoRA + Gradient Fusions</td><td>0.868-→0.846(-0.022)</td><td>0.802-→0.770 (-0.032)</td><td>0.858-→0.838 (-0.020)</td><td>0.843-0.818 (-0.025)</td></tr></table>
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
|
| 154 |
+
<table><tr><td>Human Evaluation</td><td>Image Alignment</td><td>Text Alignment</td></tr><tr><td>ED-LoRA+Weight Fusion</td><td>33.5%</td><td>47.5%</td></tr><tr><td>ED-LoRA + Gradient Fusion</td><td>66.5%</td><td>52.5%</td></tr></table>
|
| 155 |
+
|
| 156 |
+
(b) Human preference study interface on Amazon Mechanical Turk.
|
| 157 |
+
|
| 158 |
+
(c) Human preference study between weight fusion and gradient fusion for fusing ED-LoRAs.
|
| 159 |
+
|
| 160 |
+
Table 2: Quantitative ablation study of our main components. (a) Ablation study between the LoRA $^ +$ weight fusion, ED-LoRA $^ +$ weight fusion and our ED-LoRA $^ +$ gradient fusion. (b, c) Human preference study to comparing weight fusion and gradient fusion for fusing our ED-LoRAs.
|
| 161 |
+
|
| 162 |
+
modules of the text encoder and Unet, with a rank of $r = 4$ in all experiments. We use the Adam [48] optimizer with a learning rate of 1e-3, 1e-5 and 1e-4 for tuning text embedding, text encoder and Unet, respectively. For gradient fusion, we use the LBFGS optimizer [49] with 500 and 50 steps to optimize the text encoder and Unet, respectively. More details are provided in the supplementary.
|
| 163 |
+
|
| 164 |
+
# 4.2 Qualitative Comparison
|
| 165 |
+
|
| 166 |
+
Single-Concept Results. We compare our ED-LoRA with LoRA [3], Custom Diffusion [11] and $\mathrm { P } +$ [4] for single-concept customization. The results are shown in Fig. 6 (a). Our ED-LoRA achieves comparable performance to previous methods on customizing objects, while maintaining better identity for character customization. More comparisons are provided in the supplementary.
|
| 167 |
+
|
| 168 |
+
Multi-Concept Results. We compare Mix-of-Show with LoRA [3], Custom Diffusion [11], and $\mathrm { P } +$ [4] for decentralized multi-concept customization. For LoRA,we utilize weight fusion to combine the different concepts. In the case of $\mathrm { P } +$ , we directly incorporate the tuned concept embedding into the pretrained model. And for Custom Diffusion, we follow their approach of constrained optimization to merge the key and value projections in cross-attention. To ensure fair evaluation, we employ the same regionally controllable sampling for multi-concept generation across all models and the results are summarized in Fig. 6 (b).
|
| 169 |
+
|
| 170 |
+
$\mathrm { P } +$ [4] and Custom Diffusion [11] only tunes text-related module (i.e., text embedding, or the key and value projection of cross-attention). In contrast, LoRA and Mix-of-Show add LoRA layers to the entire model. The limited scope of tuned modules in $\mathrm { P } +$ and Custom Diffusion leads to an excessive encoding of out-domain low-level details within the embedding. This leads to unnatural and less desirable outcomes when compared to LoRA and Mix-of-Show. In comparison to LoRA, which loses concept identity after weight fusion, Mix-of-Show effectively preserves the identity of each individual concept.
|
| 171 |
+
|
| 172 |
+
# 4.3 Quantitative Comparison
|
| 173 |
+
|
| 174 |
+
Following Custom Diffusion [11], we utilize the CLIP [47] text/image encoder to assess text alignment and image alignment. We evaluate on different category of concepts on both single-concept tuned model and multi-concept fused model. We include detailed evaluation setting in the supplementary.
|
| 175 |
+
|
| 176 |
+
Based on the results presented in Table. 1, both Mix-of-Show and LoRA exhibit superior image alignment compared to other methods, all the while maintaining comparable text alignment in the single-client tuned model. This achievement stems from their fine-tuning the spatial-related layer in Unet (e.g., linear projection layer in self-attention), a critical aspect for accurately capturing the complex concepts’ identity, such as characters.
|
| 177 |
+
|
| 178 |
+
However, the main difference between LoRA and Mix-of-Show emerges in the context of multiconcept fusion. In the center-node fused model, LoRA experiences a significant decline in image alignment for each concept, progressively deteriorating towards the lower bound. In contrast, our Mix-of-Show method undergoes far less degradation in image alignment after multi-concept fusion.
|
| 179 |
+
|
| 180 |
+
# 4.4 Ablation Study
|
| 181 |
+
|
| 182 |
+
Embedding Expressiveness. In Fig. 7(a), it is evident that our decomposed embeddings better preserve the identity of the specified concept compared to the standard text embeddings used in LoRA. This results in a more robust encoding of concept identity. As shown in the quantitative results in Table. 2(a), when LoRA is replaced with ED-LoRA, the identity loss from weight fusion (measured by mean change of image-alignment) is reduced from 0.115 to 0.094. This result verifies that expressive embeddings help reduce identity loss during multi-concept fusion.
|
| 183 |
+
|
| 184 |
+
Fusion Type. Built with the same ED-LoRAs, we conduct experiments to compare weight fusion and gradient fusion. As shown in Fig. 7(b), gradient fusion effectively preserves concept identity after concept fusion, resulting in superior results for multi-concept sampling. According to the quantitative results in Table. 2(a), gradient fusion significantly reduces the identity loss of weight fusion, decreasing it from 0.094 to 0.025. We also conduct a human evaluation and confirm a clear preference for gradient fusion, as indicated in Table. 2(c).
|
| 185 |
+
|
| 186 |
+
Regionally Controllable Sampling. As shown in Fig. 7(c), direct sampling lead to attribute binding issues, where the concept identities are mixed. However, our regionally controllable sampling overcomes this problem and achieves correct attribute binding in multi-concept generation.
|
| 187 |
+
|
| 188 |
+
# 5 Conclusion
|
| 189 |
+
|
| 190 |
+
In this work, we explore decentralized multi-concept customization and highlight the limitations of existing methods like LoRA tuning and weight fusion, which suffer from concept conflicts and identity loss in this scenario. To overcome these challenges, we propose Mix-of-Show, a framework that combines ED-LoRA for single-client concept tuning and gradient fusion for centernode concept fusion. ED-LoRA preserves individual concept essence in the embedding, avoiding conflicts, while gradient fusion minimizes identity loss during concept fusion. We also introduce regionally controllable sampling to handle attribute binding in multi-concept generation. Experiments demonstrate Mix-of-Show can successfully generate complex compositions of multiple customized concepts, including characters, objects and scenes.
|
| 191 |
+
|
| 192 |
+
# Acknowledgements
|
| 193 |
+
|
| 194 |
+
This project is supported by the National Research Foundation, Singapore under its NRFF Award NRF-NRFF13-2021-0008, and the Ministry of Education, Singapore, under the Academic Research Fund Tier 1 (FY2022).
|
| 195 |
+
|
| 196 |
+
References
|
| 197 |
+
[1] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. Highresolution image synthesis with latent diffusion models. In CVPR, pages 10684–10695, 2022. 1, 4
|
| 198 |
+
[2] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021. 1, 3, 5
|
| 199 |
+
[3] Simo Ryu. Low-rank adaptation for fast text-to-image diffusion fine-tuning. https://github. com/cloneofsimo/lora. 1, 3, 5, 6, 8, 9
|
| 200 |
+
[4] Andrey Voynov, Qinghao Chu, Daniel Cohen-Or, and Kfir Aberman. $^ { p + }$ : Extended textual conditioning in text-to-image generation. arXiv preprint arXiv:2303.09522, 2023. 3, 4, 5, 6, 8, 9
|
| 201 |
+
[5] Hila Chefer, Yuval Alaluf, Yael Vinker, Lior Wolf, and Daniel Cohen-Or. Attend-andexcite: Attention-based semantic guidance for text-to-image diffusion models. arXiv preprint arXiv:2301.13826, 2023. 3, 4
|
| 202 |
+
[6] Weixi Feng, Xuehai He, Tsu-Jui Fu, Varun Jampani, Arjun Akula, Pradyumna Narayana, Sugato Basu, Xin Eric Wang, and William Yang Wang. Training-free structured diffusion guidance for compositional text-to-image synthesis. arXiv preprint arXiv:2212.05032, 2022. 3, 4, 7
|
| 203 |
+
[7] Lvmin Zhang and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. arXiv preprint arXiv:2302.05543, 2023. 3, 4, 7
|
| 204 |
+
[8] Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, and Xiaohu Qie. T2i-adapter: Learning adapters to dig out more controllable ability for text-to-image diffusion models. arXiv preprint arXiv:2302.08453, 2023. 3, 4, 7
|
| 205 |
+
[9] Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. An image is worth one word: Personalizing text-to-image generation using textual inversion. arXiv preprint arXiv:2208.01618, 2022. 3, 4, 5, 6
|
| 206 |
+
[10] Nataniel Ruiz, Yuanzhen Li, Varun Jampani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. arXiv preprint arXiv:2208.12242, 2022. 3
|
| 207 |
+
[11] Nupur Kumari, Bingliang Zhang, Richard Zhang, Eli Shechtman, and Jun-Yan Zhu. Multiconcept customization of text-to-image diffusion. arXiv preprint arXiv:2212.04488, 2022. 3, 5, 8, 9, 10
|
| 208 |
+
[12] Ligong Han, Yinxiao Li, Han Zhang, Peyman Milanfar, Dimitris Metaxas, and Feng Yang. Svdiff: Compact parameter space for diffusion fine-tuning. arXiv preprint arXiv:2303.11305, 2023. 3
|
| 209 |
+
[13] Zhiheng Liu, Ruili Feng, Kai Zhu, Yifei Zhang, Kecheng Zheng, Yu Liu, Deli Zhao, Jingren Zhou, and Yang Cao. Cones: Concept neurons in diffusion models for customized generation. arXiv preprint arXiv:2303.05125, 2023. 3
|
| 210 |
+
[14] Jing Shi, Wei Xiong, Zhe Lin, and Hyun Joon Jung. Instantbooth: Personalized text-to-image generation without test-time finetuning. arXiv preprint arXiv:2304.03411, 2023. 4
|
| 211 |
+
[15] Yuxiang Wei, Yabo Zhang, Zhilong Ji, Jinfeng Bai, Lei Zhang, and Wangmeng Zuo. Elite: Encoding visual concepts into textual embeddings for customized text-to-image generation. arXiv preprint arXiv:2302.13848, 2023. 4
|
| 212 |
+
[16] Xuhui Jia, Yang Zhao, Kelvin CK Chan, Yandong Li, Han Zhang, Boqing Gong, Tingbo Hou, Huisheng Wang, and Yu-Chuan Su. Taming encoder for zero fine-tuning image customization with text-to-image diffusion models. arXiv preprint arXiv:2304.02642, 2023. 4
|
| 213 |
+
[17] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pages 1273–1282. PMLR, 2017. 4, 7
|
| 214 |
+
[18] Qinbin Li, Bingsheng He, and Dawn Song. Model-contrastive federated learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10713–10722, 2021. 4 [19] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine Learning and Systems, 2:429–450, 2020. 4, 7 [20] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning, pages 5132–5143. PMLR, 2020. 4 [21] Durmus Alp Emre Acar, Yue Zhao, Ramon Matas Navarro, Matthew Mattina, Paul N Whatmough, and Venkatesh Saligrama. Federated learning based on dynamic regularization. arXiv preprint arXiv:2111.04263, 2021. 4 [22] Maruan Al-Shedivat, Jennifer Gillenwater, Eric Xing, and Afshin Rostamizadeh. Federated learning via posterior averaging: A new perspective and practical algorithms. arXiv preprint arXiv:2010.05273, 2020. 4 [23] Lixu Wang, Shichao Xu, Xiao Wang, and Qi Zhu. Addressing class imbalance in federated learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages
|
| 215 |
+
10165–10173, 2021. 4 [24] Yujun Shi, Jian Liang, Wenqing Zhang, Vincent YF Tan, and Song Bai. Towards understanding and mitigating dimensional collapse in heterogeneous federated learning. arXiv preprint arXiv:2210.00226, 2022. 4 [25] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. Advances in neural information processing systems, 33:7611–7623, 2020. 4 [26] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019. 4 [27] Mi Luo, Fei Chen, Dapeng Hu, Yifan Zhang, Jian Liang, and Jiashi Feng. No fear of heterogeneity: Classifier calibration for federated learning with non-iid data. Advances in Neural Information Processing Systems, 34, 2021. 4 [28] Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. arXiv preprint arXiv:2002.06440, 2020. 4 [29] Tao Lin, Lingjing Kong, Sebastian U Stich, and Martin Jaggi. Ensemble distillation for robust model fusion in federated learning. Advances in Neural Information Processing Systems,
|
| 216 |
+
33:2351–2363, 2020. 4 [30] Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\` Sanjiv Kumar, and H Brendan McMahan. Adaptive federated optimization. arXiv preprint arXiv:2003.00295, 2020. 4 [31] Jiahui Yu, Yuanzhong Xu, Jing Yu Koh, Thang Luong, Gunjan Baid, Zirui Wang, Vijay Vasudevan, Alexander Ku, Yinfei Yang, Burcu Karagol Ayan, et al. Scaling autoregressive models for content-rich text-to-image generation. arXiv preprint arXiv:2206.10789, 2022. 4, 7 [32] Kimin Lee, Hao Liu, Moonkyung Ryu, Olivia Watkins, Yuqing Du, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, and Shixiang Shane Gu. Aligning text-to-image models using human feedback. arXiv preprint arXiv:2302.12192, 2023. 4, 7 [33] Xiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao, and Hongsheng Li. Better aligning text-toimage models with human preference. arXiv preprint arXiv:2303.14420, 2023. 4, 7 [34] Wan-Duo Kurt Ma, JP Lewis, W Bastiaan Kleijn, and Thomas Leung. Directed diffusion: Direct control of object placement through attention guidance. arXiv preprint arXiv:2302.13153, 2023.
|
| 217 |
+
4, 7 [35] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840–6851, 2020. 4 [36] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020. 4 [37] Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems, 34:8780–8794, 2021. 4 [38] Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022. 4
|
| 218 |
+
[39] Kushagra Pandey, Avideep Mukherjee, Piyush Rai, and Abhishek Kumar. Diffusevae: Efficient, controllable and high-fidelity generation from low-dimensional latents. arXiv preprint arXiv:2201.00308, 2022. 4
|
| 219 |
+
[40] Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. arXiv preprint arXiv:2206.00927, 2022. 4
|
| 220 |
+
[41] Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. Dpmsolver $^ { \cdot + + }$ : Fast solver for guided sampling of diffusion probabilistic models. arXiv preprint arXiv:2211.01095, 2022. 4
|
| 221 |
+
[42] Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479–36494, 2022. 4
|
| 222 |
+
[43] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022. 4
|
| 223 |
+
[44] Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021. 4
|
| 224 |
+
[45] Shuyang Gu, Dong Chen, Jianmin Bao, Fang Wen, Bo Zhang, Dongdong Chen, Lu Yuan, and Baining Guo. Vector quantized diffusion model for text-to-image synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10696–10706, 2022. 4
|
| 225 |
+
[46] Yogesh Balaji, Seungjun Nah, Xun Huang, Arash Vahdat, Jiaming Song, Karsten Kreis, Miika Aittala, Timo Aila, Samuli Laine, Bryan Catanzaro, et al. ediffi: Text-to-image diffusion models with an ensemble of expert denoisers. arXiv preprint arXiv:2211.01324, 2022. 4
|
| 226 |
+
[47] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In ICML, pages 8748–8763. PMLR, 2021. 4, 10
|
| 227 |
+
[48] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 9
|
| 228 |
+
[49] Dong C Liu and Jorge Nocedal. On the limited memory bfgs method for large scale optimization. Mathematical programming, 45(1-3):503–528, 1989. 9
|
parse/dev/NnIaEaBfXD/NnIaEaBfXD_content_list.json
ADDED
|
@@ -0,0 +1,1165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Mix-of-Show: Decentralized Low-Rank Adaptation for Multi-Concept Customization of Diffusion Models ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
122,
|
| 9 |
+
823,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Yuchao $\\mathbf { G u } ^ { 1 }$ , Xintao Wang3, Jay Zhangjie $\\mathbf { W } \\mathbf { u } ^ { 1 }$ , Yujun $\\mathbf { S h i ^ { 2 } }$ , Yunpeng Chen2, Zihan $\\mathbf { F a n } ^ { 2 }$ , Wuyou Xiao2, Rui Zhao1, Shuning Chang1, Weijia $\\mathbf { W } \\mathbf { u } ^ { 1 }$ , Yixiao $\\mathbf { G e ^ { 3 } }$ , Ying Shan3, Mike Zheng Shou1∗ ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
232,
|
| 19 |
+
224,
|
| 20 |
+
771,
|
| 21 |
+
270
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "1Show Lab, 2National University of Singapore 3ARC Lab, Tencent PCG ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
254,
|
| 30 |
+
281,
|
| 31 |
+
741,
|
| 32 |
+
297
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "https://showlab.github.io/Mix-of-Show ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
339,
|
| 41 |
+
304,
|
| 42 |
+
656,
|
| 43 |
+
316
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Abstract ",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
462,
|
| 53 |
+
353,
|
| 54 |
+
535,
|
| 55 |
+
369
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Public large-scale text-to-image diffusion models, such as Stable Diffusion, have gained significant attention from the community. These models can be easily customized for new concepts using low-rank adaptations (LoRAs). However, the utilization of multiple concept LoRAs to jointly support multiple customized concepts presents a challenge. We refer to this scenario as decentralized multiconcept customization, which involves single-client concept tuning and center-node concept fusion. In this paper, we propose a new framework called Mix-of-Show that addresses the challenges of decentralized multi-concept customization, including concept conflicts resulting from existing single-client LoRA tuning and identity loss during model fusion. Mix-of-Show adopts an embedding-decomposed LoRA (EDLoRA) for single-client tuning and gradient fusion for the center node to preserve the in-domain essence of single concepts and support theoretically limitless concept fusion. Additionally, we introduce regionally controllable sampling, which extends spatially controllable sampling (e.g., ControlNet and T2I-Adapter) to address attribute binding and missing object problems in multi-concept sampling. Extensive experiments demonstrate that Mix-of-Show is capable of composing multiple customized concepts with high fidelity, including characters, objects, and scenes. ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
233,
|
| 64 |
+
385,
|
| 65 |
+
766,
|
| 66 |
+
619
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "1 Introduction ",
|
| 73 |
+
"text_level": 1,
|
| 74 |
+
"bbox": [
|
| 75 |
+
176,
|
| 76 |
+
651,
|
| 77 |
+
310,
|
| 78 |
+
667
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Open-source text-to-image diffusion models, such as Stable Diffusion [1], empower community users to create customized models by collecting personalized concept images and fine-tuning them with low-rank adaptation (LoRA) [2, 3]. These tailored LoRA models achieve unparalleled quality for specific concepts through meticulous data selection, preprocessing, and hyperparameter tuning. While existing concept LoRAs serve as plug-and-play plugins for pretrained models, there are still challenges in utilizing multiple concept LoRAs to extend the pretrained model and enable joint composition of those concepts. We refer to this ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
684,
|
| 88 |
+
485,
|
| 89 |
+
876
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/33add3e1b35e2090374bc169917c8e92cdbe1cc5dd8a9742b63e02aa35fef781.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Illustration of decentralized multiconcept customization via Mix-of-Show. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
496,
|
| 102 |
+
679,
|
| 103 |
+
823,
|
| 104 |
+
843
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "image",
|
| 110 |
+
"img_path": "images/af6f56d87f1ebd86094e9026b53ca5b7f16e561496e9216447c419a703298263.jpg",
|
| 111 |
+
"image_caption": [
|
| 112 |
+
"Figure 2: How to generate Harry Potter and Thanos, these two (or even more) concepts from different shows, in the same image? Our Mix-of-Show enables complex compositions of multiple customized concepts (e.g., characters, objects, scenes) with individually trained concept LoRAs. "
|
| 113 |
+
],
|
| 114 |
+
"image_footnote": [],
|
| 115 |
+
"bbox": [
|
| 116 |
+
173,
|
| 117 |
+
66,
|
| 118 |
+
826,
|
| 119 |
+
819
|
| 120 |
+
],
|
| 121 |
+
"page_idx": 1
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"type": "text",
|
| 125 |
+
"text": "scenario as decentralized multi-concept customization. As shown in Fig. 1, it involves two steps: single-client concept tuning and center-node concept fusion. Each client retains their private concept data while sharing the tuned LoRA models. The center node leverages these concept LoRAs to update the pretrained model, enabling joint sampling of these customized concepts. Decentralized multi-concept customization facilitates maximum community engagement in producing high-quality concept LoRAs and offers flexibility in reusing and combining different concept LoRAs. ",
|
| 126 |
+
"bbox": [
|
| 127 |
+
174,
|
| 128 |
+
92,
|
| 129 |
+
825,
|
| 130 |
+
174
|
| 131 |
+
],
|
| 132 |
+
"page_idx": 2
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"type": "text",
|
| 136 |
+
"text": "However, the existing LoRA tuning and weight fusion techniques [3] fail to address the challenges of decentralized multi-concept customization. We have identified two main challenges: concept conflict and identity loss. Concept conflict arises because current LoRA tuning methods do not differentiate between the roles of embeddings and LoRA weights. Our research reveals that embeddings effectively capture concepts within the pretrained models’ domain, while LoRA weight assist in capturing outof-domain information (e.g., styles or fine details cannot be directly modeled by the pretrained model). However, existing LoRA tuning methods place excessive emphasis on LoRA weights while overlooking the importance of embeddings. Consequently, the LoRA weights encode a significant portion of the identity of a given concept, resulting in semantically similar embeddings being projected onto concepts with different appearances. This, in turn, leads to conflicts during model fusion. Furthermore, existing weight fusion strategies compromise each concept’s identity and introduce interference from other concepts by performing a weighted average of all concept LoRAs. ",
|
| 137 |
+
"bbox": [
|
| 138 |
+
174,
|
| 139 |
+
181,
|
| 140 |
+
825,
|
| 141 |
+
347
|
| 142 |
+
],
|
| 143 |
+
"page_idx": 2
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"type": "text",
|
| 147 |
+
"text": "To overcome the challenges of decentralized multi-concept customization, we propose Mix-of-Show, which involves embedding-decomposed LoRA (ED-LoRA) for single-client tuning and gradient fusion for center-node fusion. In single-client tuning, ED-LoRA is designed to address concept conflicts by preserving more in-domain essence within the embedding. To achieve this, we enhance the expressive ability of the concept embedding by decomposing it into layer-wise embeddings [4] and multi-word representations. At the central node, gradient fusion leverages multiple concept LoRAs to update the pretrained model. Since the diffusion model includes both forward and reverse diffusion processes, we can obtain the input/output features of each layer through sampling, even in the absence of data. Features from multiple concept LoRAs are combined to generate the fused gradient, which is used for layer-wise updating. Compared to weight fusion [3], gradient fusion aligns the inference behavior of each individual concept, significantly reducing identity loss. ",
|
| 148 |
+
"bbox": [
|
| 149 |
+
174,
|
| 150 |
+
353,
|
| 151 |
+
825,
|
| 152 |
+
505
|
| 153 |
+
],
|
| 154 |
+
"page_idx": 2
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"type": "text",
|
| 158 |
+
"text": "To demonstrate the capabilities of Mix-of-Show, we introduce regionally controllable sampling for multi-concept generation. Direct multi-concept generation often encounters issues such as missing objects and attribute binding [5, 6]. Recently, spatially controllable sampling (e.g., ControlNet [7], T2I-Adapter [8]) have been introduced to guide diffusion models using spatial hints (e.g., keypose or sketch), which resolve the problem of missing objects but still faces challenges of attribute binding in multi-concept generation. Considering that spatial layout is pre-defined when adopting spatial conditions, we propose injecting region prompts through regional-aware cross-attention. Powered by Mix-of-Show and regionally controllable sampling, we can achieve complex compositions of multiple customized concepts, including characters, objects, and scenes, as illustrated in Fig. 2. In summary, our contributions are as follows: 1) We analyze the challenges of decentralized multiconcept customization. 2) We propose the Mix-of-Show framework, consisting of an embeddingdecomposed LoRA (ED-LoRA) and gradient fusion, to address the concept conflict and identity loss in decentralized multi-concept customization. 3) We introduce regionally controllable sampling to demonstrate the potential of Mix-of-Show in composing multiple customized concepts. ",
|
| 159 |
+
"bbox": [
|
| 160 |
+
174,
|
| 161 |
+
511,
|
| 162 |
+
825,
|
| 163 |
+
704
|
| 164 |
+
],
|
| 165 |
+
"page_idx": 2
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"type": "text",
|
| 169 |
+
"text": "2 Related Work ",
|
| 170 |
+
"text_level": 1,
|
| 171 |
+
"bbox": [
|
| 172 |
+
174,
|
| 173 |
+
723,
|
| 174 |
+
320,
|
| 175 |
+
741
|
| 176 |
+
],
|
| 177 |
+
"page_idx": 2
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "text",
|
| 181 |
+
"text": "2.1 Concept Customization ",
|
| 182 |
+
"text_level": 1,
|
| 183 |
+
"bbox": [
|
| 184 |
+
176,
|
| 185 |
+
753,
|
| 186 |
+
377,
|
| 187 |
+
770
|
| 188 |
+
],
|
| 189 |
+
"page_idx": 2
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "Concept customization aims to extend pretrained diffusion models to support personalized concepts using only a few images. There are two main types of concept tuning methods: embedding tuning (e.g., Textual Inversion [9] and $\\mathrm { P } +$ [4]) and joint embedding-weight tuning (e.g., Dreambooth [10] and Custom Diffusion [11]). Additionally, the community [3] adopts low-rank adapter (LoRA) [2] for concept tuning, which is lightweight and can achieve comparable fidelity to full weight tuning. ",
|
| 194 |
+
"bbox": [
|
| 195 |
+
174,
|
| 196 |
+
779,
|
| 197 |
+
823,
|
| 198 |
+
849
|
| 199 |
+
],
|
| 200 |
+
"page_idx": 2
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "text",
|
| 204 |
+
"text": "Although significant progress has been made in single-concept customization, multi-concept customization remains a challenge. Custom Diffusion [11] proposes co-training of multiple concepts or constrained optimization of several existing concept models. Following this, SVDiff [12] introduces data augmentation to prevent concept mixing in co-training multi-concepts, and Cones [13] discovers concept neurons that can be added to support multiple concepts. However, their methods are typically restricted to fuse 2-3 semantically distinct concepts. In contrast, Mix-of-Show can combine theoretically limitless customized concepts, including those within the same semantic category. ",
|
| 205 |
+
"bbox": [
|
| 206 |
+
176,
|
| 207 |
+
856,
|
| 208 |
+
825,
|
| 209 |
+
911
|
| 210 |
+
],
|
| 211 |
+
"page_idx": 2
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"type": "text",
|
| 215 |
+
"text": "",
|
| 216 |
+
"bbox": [
|
| 217 |
+
176,
|
| 218 |
+
90,
|
| 219 |
+
823,
|
| 220 |
+
133
|
| 221 |
+
],
|
| 222 |
+
"page_idx": 3
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "text",
|
| 226 |
+
"text": "Another research line in concept customization, as explored in studies by Instantbooth [14], ELITE [15], and Jia et al. [16], focuses on achieving fast test-time customization. These methods involve pretraining an encoder on a large-scale dataset specific to the desired category. During inference, when provided with a few representative concept images from the trained category, the encoder extracts features that complement the pretrained diffusion models and support customized generation. However, these methods require training a separate encoder for each category, typically limited to common categories (e.g., person or cats). This limitation hinders their ability to customize and compose more diverse and open-world subjects. ",
|
| 227 |
+
"bbox": [
|
| 228 |
+
174,
|
| 229 |
+
140,
|
| 230 |
+
825,
|
| 231 |
+
251
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 3
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "text",
|
| 237 |
+
"text": "2.2 Decentralized Learning ",
|
| 238 |
+
"text_level": 1,
|
| 239 |
+
"bbox": [
|
| 240 |
+
174,
|
| 241 |
+
270,
|
| 242 |
+
379,
|
| 243 |
+
285
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 3
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "Decentralized or federated learning aims to train models collaboratively across different clients without sharing data. The de facto algorithm for federated learning, FedAvg, was proposed by [17]. This method simply averages the weights of each client’s model to obtain the final model. However, we find that directly applying this simple weight averaging is not ideal for fusing LoRAs of different concepts. To improve over FedAvg, previous works have either focused on local client training [18, 19, 20, 21, 22, 23, 24] or global server aggregation [25, 26, 27, 28, 29, 30]. Motivated by this, we explore the optimal design of single-client tuning and center-node fusion for decentralized multi-concept customization. ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
296,
|
| 253 |
+
825,
|
| 254 |
+
407
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 3
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "2.3 Controllable Multi-Concept Generation ",
|
| 261 |
+
"text_level": 1,
|
| 262 |
+
"bbox": [
|
| 263 |
+
176,
|
| 264 |
+
426,
|
| 265 |
+
490,
|
| 266 |
+
441
|
| 267 |
+
],
|
| 268 |
+
"page_idx": 3
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
"type": "text",
|
| 272 |
+
"text": "Direct multi-concept generation using text prompts alone faces challenges such as missing objects and attribute binding [6, 31, 32, 33, 34]. Previous approaches, like Attend-and-Excite [5] and Structure Diffusion [6], have attempted to address these issues, but the problem still persist, limiting the effectiveness of multi-concept generation. Recent works, such as ControlNet [7] and T2I-Adapter [8], introduce spatial control (e.g., keypose and sketch) and enable more accurate compositions, resolving the problem of missing objects in multi-concept generation. However, attribute binding remains a challenge. In our work, we tackle this challenge through regionally controllable sampling. ",
|
| 273 |
+
"bbox": [
|
| 274 |
+
174,
|
| 275 |
+
454,
|
| 276 |
+
825,
|
| 277 |
+
551
|
| 278 |
+
],
|
| 279 |
+
"page_idx": 3
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"type": "text",
|
| 283 |
+
"text": "3 Methods ",
|
| 284 |
+
"text_level": 1,
|
| 285 |
+
"bbox": [
|
| 286 |
+
174,
|
| 287 |
+
573,
|
| 288 |
+
277,
|
| 289 |
+
590
|
| 290 |
+
],
|
| 291 |
+
"page_idx": 3
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"type": "text",
|
| 295 |
+
"text": "In this section, we provide a brief background on text-to-image diffusion models and concept customization in Sec. 3.1. We then introduce the task formulation of decentralized multi-concept customization in Sec. 3.2, followed by a detailed description of our method in Sec. 3.3 and Sec. 3.4. ",
|
| 296 |
+
"bbox": [
|
| 297 |
+
174,
|
| 298 |
+
606,
|
| 299 |
+
825,
|
| 300 |
+
648
|
| 301 |
+
],
|
| 302 |
+
"page_idx": 3
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"type": "text",
|
| 306 |
+
"text": "3.1 Preliminary ",
|
| 307 |
+
"text_level": 1,
|
| 308 |
+
"bbox": [
|
| 309 |
+
174,
|
| 310 |
+
667,
|
| 311 |
+
295,
|
| 312 |
+
683
|
| 313 |
+
],
|
| 314 |
+
"page_idx": 3
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"type": "text",
|
| 318 |
+
"text": "Text-to-Image Diffusion Models. Diffusion models [35, 36, 37, 38, 39, 40, 41] belong to a class of generative models that gradually introduce noise into an image during the forward diffusion process and learn to reverse this process to synthesize images. When combined with pretrained text embeddings, text-to-image diffusion models [1, 42, 43, 44, 45, 46] are capable of generating high-fidelity images based on text prompts. In this paper, we conduct experiments using Stable Diffusion [1], which is a variant of the text-to-image diffusion model operating in the latent space. Given a condition $c = \\psi ( P ^ { * } )$ , where $P ^ { * }$ is the text prompt and $\\psi$ is the pretrained CLIP text encoder [47], the training objective for stable diffusion is to minimize the denoising objective by ",
|
| 319 |
+
"bbox": [
|
| 320 |
+
173,
|
| 321 |
+
694,
|
| 322 |
+
825,
|
| 323 |
+
805
|
| 324 |
+
],
|
| 325 |
+
"page_idx": 3
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"type": "text",
|
| 329 |
+
"text": "where $z _ { t }$ is the latent feature at timestep $t$ and $\\epsilon _ { \\theta }$ is the denoising unet with learnable parameter $\\theta$ ",
|
| 330 |
+
"bbox": [
|
| 331 |
+
173,
|
| 332 |
+
821,
|
| 333 |
+
810,
|
| 334 |
+
835
|
| 335 |
+
],
|
| 336 |
+
"page_idx": 3
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"type": "text",
|
| 340 |
+
"text": "Embedding Tuning for Concept Customization. Textual Inversion [9] represents the input concept using a unique token $V$ . When provided with a few images of the target concept, the embedding of $V$ is tuned using Eq. 1. After tuning, the embedding for $V$ encodes the essence of the target concept and functions like any other text in the pretrained model. To achieve greater disentanglement and control, $\\mathrm { P } + [ 4 ]$ introduces layer-wise embeddings for concept tokens, denoted as $V ^ { + }$ in this paper. ",
|
| 341 |
+
"bbox": [
|
| 342 |
+
174,
|
| 343 |
+
842,
|
| 344 |
+
825,
|
| 345 |
+
911
|
| 346 |
+
],
|
| 347 |
+
"page_idx": 3
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"type": "text",
|
| 351 |
+
"text": "Single-Concept ",
|
| 352 |
+
"text_level": 1,
|
| 353 |
+
"bbox": [
|
| 354 |
+
361,
|
| 355 |
+
88,
|
| 356 |
+
460,
|
| 357 |
+
101
|
| 358 |
+
],
|
| 359 |
+
"page_idx": 4
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "image",
|
| 363 |
+
"img_path": "images/e5772529799dba2e10b5cfb77bcb3ce865124beb2e41757456223d84c31e2e4e.jpg",
|
| 364 |
+
"image_caption": [
|
| 365 |
+
"Figure 3: Single- and multi-concept customization between the embedding tuning (i.e., Textual Inversion (TI) [9] and $\\mathrm { P } +$ [4]), and joint embedding-weight tuning (i.e., LoRA [3] and our ED-LoRA). $P ^ { * } =$ “Photo of a $V$ , near the beach\". $\\Phi _ { 0 }$ and $\\Delta \\Phi$ denotes the pretrained model and LoRA weight. "
|
| 366 |
+
],
|
| 367 |
+
"image_footnote": [],
|
| 368 |
+
"bbox": [
|
| 369 |
+
205,
|
| 370 |
+
93,
|
| 371 |
+
789,
|
| 372 |
+
289
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 4
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "Low-Rank Adaptation. Low-rank adaptation (LoRA) [2] was initially proposed to adapt largelanguage models to downstream tasks. It operates under the assumption that weight changes during adaptation have a low “intrinsic rank\" and introduces a low-rank factorization of the weight change to obtain the updated weight $W$ , which is given by $W = W _ { 0 } + \\Delta W = W _ { 0 } + B A .$ . Here, $\\mathcal { W } _ { 0 } \\in \\breve { \\mathbb { R } } ^ { d \\times k }$ represents the original weight in the pretrained model, and $B \\in \\mathbb { R } ^ { d \\times r }$ and $A \\in \\mathbb { R } ^ { r \\times k }$ represent the low-rank factors, with $r \\ll \\operatorname* { m i n } ( d , k )$ . Recently, the community [3] has adopted LoRA for fine-tuning diffusion models, leading to promising results. LoRA is typically used as a plug-and-play plugin in pretrained models, but the community also employs weight fusion techniques to combine multiple LoRAs: ",
|
| 379 |
+
"bbox": [
|
| 380 |
+
173,
|
| 381 |
+
349,
|
| 382 |
+
825,
|
| 383 |
+
476
|
| 384 |
+
],
|
| 385 |
+
"page_idx": 4
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "equation",
|
| 389 |
+
"img_path": "images/8447568269c9ccac04c4b5ae21d9a8133832dbdf0a27dc5c77c5c6fa7845300a.jpg",
|
| 390 |
+
"text": "$$\nW = W _ { 0 } + \\sum _ { i = 1 } ^ { n } w _ { i } \\Delta W _ { i } , \\quad { \\mathrm { s . t . } } \\sum _ { i = 1 } ^ { n } w _ { i } = 1 ,\n$$",
|
| 391 |
+
"text_format": "latex",
|
| 392 |
+
"bbox": [
|
| 393 |
+
354,
|
| 394 |
+
481,
|
| 395 |
+
642,
|
| 396 |
+
522
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 4
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "where $w _ { i }$ denotes the normalized importance of different LoRAs. ",
|
| 403 |
+
"bbox": [
|
| 404 |
+
178,
|
| 405 |
+
531,
|
| 406 |
+
606,
|
| 407 |
+
546
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 4
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "3.2 Task Formulation: Decentralized Multi-Concept Customization ",
|
| 414 |
+
"text_level": 1,
|
| 415 |
+
"bbox": [
|
| 416 |
+
174,
|
| 417 |
+
568,
|
| 418 |
+
656,
|
| 419 |
+
583
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 4
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "While custom diffusion [11] has attempted to merge two tuned concepts models into a pretrained model, their findings suggest that co-training with multiple concepts yields better results. However, considering scalability and reusability, we focus on merging single-concept models to support multi-concept customization. We refer to this setting as decentralized multi-concept customization. ",
|
| 426 |
+
"bbox": [
|
| 427 |
+
173,
|
| 428 |
+
595,
|
| 429 |
+
825,
|
| 430 |
+
651
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 4
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "Formally, decentralized multi-concept customization involves a two-step process: single-client concept tuning and center-node concept fusion. As shown in Fig. 1, each of the $n$ clients possesses its own private concept data and tunes the concept model $\\Delta W _ { i }$ . Here, $\\Delta W _ { i }$ represents the changes in network weights, which specifically refers to LoRA weights in our work. We omit discussing the merging of text embeddings, as the tuned embeddings can be seamlessly integrated into the pretrained model without conflicts. ",
|
| 437 |
+
"bbox": [
|
| 438 |
+
174,
|
| 439 |
+
657,
|
| 440 |
+
825,
|
| 441 |
+
741
|
| 442 |
+
],
|
| 443 |
+
"page_idx": 4
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "text",
|
| 447 |
+
"text": "After tuning, the center node gathers all LoRAs to obtain the updated pretrained weight $W$ by: ",
|
| 448 |
+
"bbox": [
|
| 449 |
+
171,
|
| 450 |
+
747,
|
| 451 |
+
792,
|
| 452 |
+
762
|
| 453 |
+
],
|
| 454 |
+
"page_idx": 4
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"type": "text",
|
| 458 |
+
"text": "where $f$ represents the update rule that operates on the original pretrained model weight $W _ { 0 }$ and the $n$ concept LoRAs $\\{ \\Delta W _ { i } , i = 1 \\cdots n \\}$ . One straightforward updating rule $f$ is weight fusion, as illustrated in Eq. 2. Once updated, the new model $W$ should be capable of generating all the concepts introduced in the $n$ LoRAs. ",
|
| 459 |
+
"bbox": [
|
| 460 |
+
174,
|
| 461 |
+
779,
|
| 462 |
+
825,
|
| 463 |
+
833
|
| 464 |
+
],
|
| 465 |
+
"page_idx": 4
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"type": "text",
|
| 469 |
+
"text": "3.3 Mix-of-Show ",
|
| 470 |
+
"text_level": 1,
|
| 471 |
+
"bbox": [
|
| 472 |
+
174,
|
| 473 |
+
854,
|
| 474 |
+
302,
|
| 475 |
+
869
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 4
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "text",
|
| 481 |
+
"text": "In this section, we introduce Mix-of-Show, containing ED-LoRA (in Sec. 3.3.1) for single-client concept tuning, gradient fusion (in Sec. 3.3.2) for center-node concept fusion. ",
|
| 482 |
+
"bbox": [
|
| 483 |
+
174,
|
| 484 |
+
882,
|
| 485 |
+
823,
|
| 486 |
+
911
|
| 487 |
+
],
|
| 488 |
+
"page_idx": 4
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "image",
|
| 492 |
+
"img_path": "images/ce8deee3559dbf5911df99e2811d47511633c69e80e134117c58a4c66e924b04.jpg",
|
| 493 |
+
"image_caption": [
|
| 494 |
+
"Figure 4: Pipeline of Mix-of-Show. In single-client concept tuning, the ED-LoRA adopts the layerwise embedding and multi-word representation. In center node, gradient fusion is adopted to fuse multiple concept LoRAs and then support composing those customized concepts. "
|
| 495 |
+
],
|
| 496 |
+
"image_footnote": [],
|
| 497 |
+
"bbox": [
|
| 498 |
+
207,
|
| 499 |
+
89,
|
| 500 |
+
787,
|
| 501 |
+
252
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 5
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "3.3.1 Single-Client Concept Tuning: ED-LoRA ",
|
| 508 |
+
"text_level": 1,
|
| 509 |
+
"bbox": [
|
| 510 |
+
174,
|
| 511 |
+
311,
|
| 512 |
+
511,
|
| 513 |
+
327
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 5
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "Vanilla LoRA [3] is not suitable for decentralized multi-concept customization due to the issue of concept conflict. To better understand this limitation, we start by examining the distinct roles of embeddings and LoRA weights in concept tuning. ",
|
| 520 |
+
"bbox": [
|
| 521 |
+
174,
|
| 522 |
+
337,
|
| 523 |
+
825,
|
| 524 |
+
378
|
| 525 |
+
],
|
| 526 |
+
"page_idx": 5
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "text",
|
| 530 |
+
"text": "Single-Concept Tuning Setting. We investigate embedding tuning (i.e., Textual Inversion [9] and $\\mathrm { P } +$ [4]) and the joint embedding-weight tuning (i.e., LoRA [3]) on single concept customization. We conduct experiments on both in-domain concept (i.e., directly sampled from the pretrained model), and out-domain concepts. The weights of the pretrained model, including the unet $\\theta$ and the text encoder $\\psi$ , are denoted as $\\Phi _ { 0 } = \\{ \\theta _ { 0 } , \\psi _ { 0 } \\}$ . Given a text prompt $P ^ { * }$ containing the concept $V$ , we visualize the tuned embedding of concept $V$ using the pretrained weights $\\Phi _ { 0 } ( \\bar { P ^ { * } } )$ , and visualize the tuned embedding along with the LoRA weight using $( \\Phi _ { 0 } + \\Delta \\Phi ) ( P ^ { * } )$ . ",
|
| 531 |
+
"bbox": [
|
| 532 |
+
174,
|
| 533 |
+
385,
|
| 534 |
+
825,
|
| 535 |
+
483
|
| 536 |
+
],
|
| 537 |
+
"page_idx": 5
|
| 538 |
+
},
|
| 539 |
+
{
|
| 540 |
+
"type": "text",
|
| 541 |
+
"text": "Analysis. Based on the experiment results in Fig. 3, we draw the following two observations regarding existing embedding tuning and joint embedding-weight tuning approaches. ",
|
| 542 |
+
"bbox": [
|
| 543 |
+
173,
|
| 544 |
+
488,
|
| 545 |
+
823,
|
| 546 |
+
517
|
| 547 |
+
],
|
| 548 |
+
"page_idx": 5
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"type": "text",
|
| 552 |
+
"text": "Observation 1: The embeddings are capable of capturing concepts within the domain of pretrained models, while the LoRA helps capture out-domain information. ",
|
| 553 |
+
"bbox": [
|
| 554 |
+
176,
|
| 555 |
+
522,
|
| 556 |
+
821,
|
| 557 |
+
551
|
| 558 |
+
],
|
| 559 |
+
"page_idx": 5
|
| 560 |
+
},
|
| 561 |
+
{
|
| 562 |
+
"type": "text",
|
| 563 |
+
"text": "In Fig. 3(a, b), we observe that embedding tuning approaches such as Textual Inversion and $\\mathrm { P } +$ struggle to capture out-domain concepts. This is because they attempt to encode all out-domain details (e.g., anime styles or details not modeled by the pretrained model $\\Phi _ { 0 }$ ) within the embedding, resulting in semantic collapse. However, for in-domain concepts sampled from the model, embedding tuning accurately encodes the concept identity within the embedding, benefiting from the accurate modeling of concept details by the pretrained model weights $\\Phi _ { 0 }$ . Furthermore, when jointly tuning the embedding with LoRA, the embedding no longer produces oversaturated outputs. This is because the out-domain information is captured by the pretrained model with LoRA weight shift (i.e., $\\Phi _ { 0 } + \\Delta \\Phi )$ . ",
|
| 564 |
+
"bbox": [
|
| 565 |
+
174,
|
| 566 |
+
556,
|
| 567 |
+
825,
|
| 568 |
+
667
|
| 569 |
+
],
|
| 570 |
+
"page_idx": 5
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"type": "text",
|
| 574 |
+
"text": "Observation 2: Existing LoRA weights encode most of the concept identity and project semantically similar embeddings to visually distinct concepts, leading to conflicts during concept fusion. ",
|
| 575 |
+
"bbox": [
|
| 576 |
+
178,
|
| 577 |
+
674,
|
| 578 |
+
821,
|
| 579 |
+
703
|
| 580 |
+
],
|
| 581 |
+
"page_idx": 5
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
"type": "text",
|
| 585 |
+
"text": "In the joint embedding-LoRA tuning results shown in Fig. 3(c), we observe that directly visualizing the embedding with the pretrained model $\\Phi _ { 0 } ( P ^ { * } )$ yields semantically similar results. However, when the LoRA weights are loaded $( \\Phi _ { 0 } + \\Delta \\Phi ) ( P ^ { * } )$ , the target concept can be accurately captured. This suggests that the majority of the concept identity is encoded within the LoRA weights rather than the embedding itself. However, when attempting to support multiple semantically similar concepts within a single model, it becomes problematic to determine which concept to sample based on similar embeddings, resulting in concept conflicts. As shown in Fig. 3(e), when fused into one model, the identity of each individual concept is lost. ",
|
| 586 |
+
"bbox": [
|
| 587 |
+
174,
|
| 588 |
+
708,
|
| 589 |
+
825,
|
| 590 |
+
819
|
| 591 |
+
],
|
| 592 |
+
"page_idx": 5
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "text",
|
| 596 |
+
"text": "Our Solution: ED-LoRA. Based on the aforementioned observations, our ED-LoRA is designed to preserve more in-domain essence within the embedding while capturing the remaining details using LoRA weights. To achieve this, we enhance the expressiveness of the embedding through decomposed embedding. As illustrated in Fig. 4, we adopt a layer-wise embedding similar to [4] and create a multi-world representation for the concept token $\\mathbf { \\bar { \\rho } } \\mathbf { \\bar { V } } = V _ { r a n d } ^ { + } V _ { c l a s s } ^ { + } )$ . Here, $V _ { r a n d } ^ { + }$ is randomly initialized to capture the variance of different concepts, while $V _ { c l a s s } ^ { + }$ is initialized based on its semantic class to maintain semantic meaning. Both tokens are learnable during concept tuning. As shown in Fig. 3(d), the learned embedding of ED-LoRA effectively preserves the essence of the given concept within the domain of the pretrained model, while LoRA helps capture the other details. ",
|
| 597 |
+
"bbox": [
|
| 598 |
+
174,
|
| 599 |
+
825,
|
| 600 |
+
823,
|
| 601 |
+
912
|
| 602 |
+
],
|
| 603 |
+
"page_idx": 5
|
| 604 |
+
},
|
| 605 |
+
{
|
| 606 |
+
"type": "image",
|
| 607 |
+
"img_path": "images/4673a68c8b4f2a4f892f0475922d670bc5491055fb12481c9dadd706491cd5ab.jpg",
|
| 608 |
+
"image_caption": [
|
| 609 |
+
"Figure 5: Regionally controllable sampling for multi-concept generation. "
|
| 610 |
+
],
|
| 611 |
+
"image_footnote": [],
|
| 612 |
+
"bbox": [
|
| 613 |
+
202,
|
| 614 |
+
88,
|
| 615 |
+
789,
|
| 616 |
+
268
|
| 617 |
+
],
|
| 618 |
+
"page_idx": 6
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "",
|
| 623 |
+
"bbox": [
|
| 624 |
+
174,
|
| 625 |
+
299,
|
| 626 |
+
826,
|
| 627 |
+
340
|
| 628 |
+
],
|
| 629 |
+
"page_idx": 6
|
| 630 |
+
},
|
| 631 |
+
{
|
| 632 |
+
"type": "text",
|
| 633 |
+
"text": "3.3.2 Center-Node Concept Fusion: Gradient Fusion ",
|
| 634 |
+
"text_level": 1,
|
| 635 |
+
"bbox": [
|
| 636 |
+
174,
|
| 637 |
+
359,
|
| 638 |
+
552,
|
| 639 |
+
375
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 6
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "text",
|
| 645 |
+
"text": "At the center node, we have access to all the concept LoRAs and can use these models to update the pretrained model, enabling multi-concept customization. However, the existing weight fusion strategy described in Eq. 2 is insufficient to achieve this goal, as we will discuss further below. ",
|
| 646 |
+
"bbox": [
|
| 647 |
+
174,
|
| 648 |
+
386,
|
| 649 |
+
825,
|
| 650 |
+
428
|
| 651 |
+
],
|
| 652 |
+
"page_idx": 6
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "text",
|
| 656 |
+
"text": "Multi-Concept Fusion Setting. In this experiment, we apply the weight fusion described in Eq. 2 to weighted average $n$ concept LoRAs or ED-LoRAs $\\{ \\Delta \\Phi _ { i } , i = 1 \\cdots n \\}$ into the pretrained model $\\Phi _ { 0 }$ , resulting in a new model $\\Phi$ . We then use the new model $\\Phi ( P _ { i } ^ { * } )$ to sample each concept and compare its identity with the corresponding single-concept sample $( \\bar { \\Phi _ { 0 } } + \\Delta \\Phi ) ( P _ { i } ^ { * } )$ . ",
|
| 657 |
+
"bbox": [
|
| 658 |
+
176,
|
| 659 |
+
434,
|
| 660 |
+
825,
|
| 661 |
+
491
|
| 662 |
+
],
|
| 663 |
+
"page_idx": 6
|
| 664 |
+
},
|
| 665 |
+
{
|
| 666 |
+
"type": "text",
|
| 667 |
+
"text": "Analysis. Based on the results in Fig. 3, we make the following observation about fusion strategy. ",
|
| 668 |
+
"bbox": [
|
| 669 |
+
174,
|
| 670 |
+
496,
|
| 671 |
+
810,
|
| 672 |
+
511
|
| 673 |
+
],
|
| 674 |
+
"page_idx": 6
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"type": "text",
|
| 678 |
+
"text": "Observation 3: Weight fusion leads to identity loss of individual concepts in concept fusion. ",
|
| 679 |
+
"bbox": [
|
| 680 |
+
183,
|
| 681 |
+
517,
|
| 682 |
+
794,
|
| 683 |
+
531
|
| 684 |
+
],
|
| 685 |
+
"page_idx": 6
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"type": "text",
|
| 689 |
+
"text": "As shown in Fig. 3 (multi-concept), we can observe that weight fusion in the case of LoRA leads to significant loss of concept identity due to conflicts between concepts. Even when combined with our ED-LoRA, weight fusion still compromises the identity of each individual concept. In theory, if a concept achieves its complete identity through LoRA weight shift $\\Delta \\Phi ( P ^ { * } )$ , fusing it with $n$ -1 other concept LoRAs requires reducing its weight to $\\begin{array} { r } { { \\frac { 1 } { n } } \\Delta \\Phi ( P ^ { * } ) } \\\\ { . ^ { n } } \\end{array}$ and introducing other concept LoRA weights, which ultimately diminishes the concept’s identity. ",
|
| 690 |
+
"bbox": [
|
| 691 |
+
174,
|
| 692 |
+
537,
|
| 693 |
+
825,
|
| 694 |
+
621
|
| 695 |
+
],
|
| 696 |
+
"page_idx": 6
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"type": "text",
|
| 700 |
+
"text": "Our Solution: Gradient Fusion. Based on the previous analysis, our objective is to preserve the identity of each concept in the fused model by aligning their single-concept inference behavior. Unlike in federated learning [17, 19], where models are typically single-direction classification models that cannot access gradients without data, text-to-image diffusion models have the inherent capability to decode concepts from text prompts. Leveraging this characteristic, we first decode the individual concepts using their respective LoRA weights, as depicted in Fig. 4(b). We then extract the input and output features associated with each LoRA layer. These input/output features from different concepts ate eac, where yer rep $W$ using the following objective:ents the input activation of the $W = \\mathrm { a r g } \\mathrm { m i n } _ { W }$ $\\begin{array} { r } { \\sum _ { i = 1 } ^ { n } | | ( \\boldsymbol { W _ { 0 } } + \\Delta \\boldsymbol { W _ { i } } ) X _ { i } - \\boldsymbol { W } X _ { i } | | _ { F } ^ { 2 } } \\end{array}$ $X _ { i }$ $i$ -th concept, and $| \\cdot | _ { F }$ denotes the Frobenius norm. By adopting this approach, we can fuse different concept LoRAs without accessing the data and without considering their differences during training. The results of our gradient fusion are shown in Fig. 3(f), demonstrating improved preservation of each concept’s identity and consistent stylization across different concepts. ",
|
| 701 |
+
"bbox": [
|
| 702 |
+
173,
|
| 703 |
+
627,
|
| 704 |
+
825,
|
| 705 |
+
808
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 6
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "text",
|
| 711 |
+
"text": "3.4 Regionally Controllable Sampling ",
|
| 712 |
+
"text_level": 1,
|
| 713 |
+
"bbox": [
|
| 714 |
+
176,
|
| 715 |
+
828,
|
| 716 |
+
449,
|
| 717 |
+
843
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 6
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "Direct multi-concept sampling often encounters challenges of missing objects and attribute binding [6, 31, 32, 33, 34]. While spatially controllable sampling methods (e.g., ControlNet [7] and T2IAdapter [8]) can address the issue of missing objects in multi-concept generation, they cannot accurately bind concepts to specific keyposes or sketches. Merely indicating the desired concept ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
176,
|
| 726 |
+
856,
|
| 727 |
+
825,
|
| 728 |
+
911
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 6
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "image",
|
| 734 |
+
"img_path": "images/cc95993d3b666a9ce3e5ce065ce1bcfc3bb753813156fdad7db293fb7d4854bd.jpg",
|
| 735 |
+
"image_caption": [
|
| 736 |
+
"Figure 6: Qualitative comparison on single- and multi-concept customization. "
|
| 737 |
+
],
|
| 738 |
+
"image_footnote": [],
|
| 739 |
+
"bbox": [
|
| 740 |
+
215,
|
| 741 |
+
90,
|
| 742 |
+
779,
|
| 743 |
+
371
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 7
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "table",
|
| 749 |
+
"img_path": "images/f5a77931a57a43fb1447dae5c929dbfe63e4512f5b41dc31600ceae2639515d9.jpg",
|
| 750 |
+
"table_caption": [],
|
| 751 |
+
"table_footnote": [],
|
| 752 |
+
"table_body": "<table><tr><td></td><td>Methods</td><td>Real-Objects Single→Fused</td><td>Real-Characters Single-→Fused</td><td>Real-Scenes Single-→Fused</td><td>Mean Change</td></tr><tr><td rowspan=\"5\">Text-alignment</td><td>Upper Bound</td><td>0.811</td><td>0.767</td><td>0.834</td><td>0.804</td></tr><tr><td>P+ [4]</td><td>0.771-→0.771 (-)</td><td>0.686-→0.686(-)</td><td>0.759-→0.759 (-)</td><td>0.739-→0.739 (-)</td></tr><tr><td>Custom Diffusion [11]</td><td>0.745->0.747(+0.002)</td><td>0.674-0.650 (-0.024)</td><td>0.748-→0.738 (-0.010)</td><td>0.722-0.712(-0.010)</td></tr><tr><td>LoRA [3]</td><td>0.720->0.795 (+0.075)</td><td>0.654->0.700 (+0.046)</td><td>0.717->0.760 (+0.043)</td><td>0.697-→0.752(+0.055)</td></tr><tr><td>Mix-of-Show (Ours)</td><td>0.724-→0.745 (+0.021)</td><td>0.632-→0.662(+0.030)</td><td>0.716-→0.736(+0.020)</td><td>0.691-0.714(+0.024)</td></tr><tr><td rowspan=\"5\">Image-alignment</td><td>Lower Bound</td><td>0.721</td><td>0.471</td><td>0.595</td><td>0.596</td></tr><tr><td>P+ [4]</td><td>0.790→0.790 (-)</td><td>0.670-→0.670 (-)</td><td>0.796→0.796 (-)</td><td>0.752-→0.752(-)</td></tr><tr><td>Custom Diffusion [11]</td><td>0.842-→0.808 (-0.034)</td><td>0.714-→0.694 (-0.020)</td><td>0.804-→0.750 (-0.054)</td><td>0.787-→0.751(-0.036)</td></tr><tr><td>LoRA [3]</td><td>0.864-→0.778 (-0.086)</td><td>0.761-→0.555(-0.206)</td><td>0.824-→0.769 (-0.055)</td><td>0.816-→0.701 (-0.115)</td></tr><tr><td>Mix-of-Show (Ours)</td><td>0.868-→0.846 (-0.022)</td><td>0.802->0.770 (-0.032)</td><td>0.858-→0.838 (-0.020)</td><td>0.843-→0.818(-0.025)</td></tr></table>",
|
| 753 |
+
"bbox": [
|
| 754 |
+
240,
|
| 755 |
+
392,
|
| 756 |
+
761,
|
| 757 |
+
511
|
| 758 |
+
],
|
| 759 |
+
"page_idx": 7
|
| 760 |
+
},
|
| 761 |
+
{
|
| 762 |
+
"type": "text",
|
| 763 |
+
"text": "Table 1: Text-alignment and image-alignment vary between the single-client tuned model and the center-node fused model. The upper bound of text-alignment and the lower bound of image-alignment are computed by replacing the concept’s token (e.g., $V ^ { d o g A ^ { \\prime } }$ ) with its class token (e.g., dog) and sampling using the pretrained model. ",
|
| 764 |
+
"bbox": [
|
| 765 |
+
176,
|
| 766 |
+
511,
|
| 767 |
+
823,
|
| 768 |
+
565
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 7
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "and attribute through a text prompt can lead to attribute binding problems, as in Fig. 5(a), where the identities of three people are mixed, and the \"red dress\" is incorrectly assigned to other concepts. ",
|
| 775 |
+
"bbox": [
|
| 776 |
+
174,
|
| 777 |
+
584,
|
| 778 |
+
820,
|
| 779 |
+
613
|
| 780 |
+
],
|
| 781 |
+
"page_idx": 7
|
| 782 |
+
},
|
| 783 |
+
{
|
| 784 |
+
"type": "text",
|
| 785 |
+
"text": "To address these challenges, we propose a method called regionally controllable sampling. This approach utilizes both a global prompt and multiple regional prompts to describe an image based on spatial conditions. The global prompt provides the overall context, while the regional prompts specify subjects within specific regions, including their attributes and contextual information from the global prompt (e.g., \"near a lake\"). To achieve this, we introduce region-aware cross-attention. Given a global prompt $P _ { g } ^ { * }$ and $n$ regional prompts $P _ { r _ { i } } ^ { * }$ , we first incorporate the global prompt via cross-attention with the latent $z$ by $\\begin{array} { r } { h = \\mathrm { s o f t m a x } \\left( \\frac { Q ( z ) \\dot { K } ( P _ { g } ^ { * } ) } { \\sqrt { d } } \\right) \\cdot V ( P _ { g } ^ { * } ) } \\end{array}$ . Then, we extract the regional latent feature by $z _ { \\mathrm { i } } = z \\odot M _ { i }$ , where $M _ { i }$ represents the binary mask associated with the region specified by $P _ { r _ { i } } ^ { * }$ . We obtain regional features using $h _ { i } = \\mathrm { s o f t m a x } \\left( \\frac { Q ( z _ { i } ) K ( P _ { r _ { i } } ^ { * } ) } { \\sqrt { d } } \\right) \\cdot V ( P _ { r _ { i } } ^ { * } )$ . Finally, we replace the features in the global output with the regional features: $h [ M _ { i } ] = h _ { i }$ . As shown in Fig. 5(b), regionally controllable sampling allows for precise assignment of subjects and attributes, while maintaining a harmonious global context. ",
|
| 786 |
+
"bbox": [
|
| 787 |
+
173,
|
| 788 |
+
618,
|
| 789 |
+
826,
|
| 790 |
+
806
|
| 791 |
+
],
|
| 792 |
+
"page_idx": 7
|
| 793 |
+
},
|
| 794 |
+
{
|
| 795 |
+
"type": "text",
|
| 796 |
+
"text": "4 Experiments ",
|
| 797 |
+
"text_level": 1,
|
| 798 |
+
"bbox": [
|
| 799 |
+
174,
|
| 800 |
+
825,
|
| 801 |
+
312,
|
| 802 |
+
843
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 7
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "text",
|
| 808 |
+
"text": "4.1 Datasets and Implementation Details ",
|
| 809 |
+
"text_level": 1,
|
| 810 |
+
"bbox": [
|
| 811 |
+
174,
|
| 812 |
+
857,
|
| 813 |
+
470,
|
| 814 |
+
872
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 7
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "text",
|
| 820 |
+
"text": "To conduct evaluation for Mix-of-Show, we collect a dataset containing characters, objects, and scenes. For ED-LoRA tuning, we incorporate LoRA layer into the linear layer in all attention (a) Subject identity preservation (i.e., image-alignment) measured by CLIP score between LoRA $^ +$ weight fusion, ED-LoRA $^ +$ weight fusion, and ED-LoRA $^ +$ gradient fusion. Our ED-LoRA $^ +$ gradient fusion achieves the least loss in image-alignment after multi-concept fusion, preserving the best subject identity. ",
|
| 821 |
+
"bbox": [
|
| 822 |
+
174,
|
| 823 |
+
882,
|
| 824 |
+
823,
|
| 825 |
+
911
|
| 826 |
+
],
|
| 827 |
+
"page_idx": 7
|
| 828 |
+
},
|
| 829 |
+
{
|
| 830 |
+
"type": "image",
|
| 831 |
+
"img_path": "images/bb84b011372f1dcfa84cb9df27be037368c975c9853e4d41b8606c112bf16a9d.jpg",
|
| 832 |
+
"image_caption": [
|
| 833 |
+
"Figure 7: Qualitative ablation study of Mix-of-Show. $P ^ { * }$ means the text prompt. $\\Phi _ { 0 }$ and $\\Delta \\Phi$ denotes the pretrained model and LoRA weight, respectively. "
|
| 834 |
+
],
|
| 835 |
+
"image_footnote": [],
|
| 836 |
+
"bbox": [
|
| 837 |
+
205,
|
| 838 |
+
87,
|
| 839 |
+
792,
|
| 840 |
+
306
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 8
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "table",
|
| 846 |
+
"img_path": "images/0e60f07739c096a2e107523c1bea26d635822579d8b70093d09f7b0191991971.jpg",
|
| 847 |
+
"table_caption": [],
|
| 848 |
+
"table_footnote": [],
|
| 849 |
+
"table_body": "<table><tr><td></td><td>Methods</td><td>Real-Objects Single-→Fused</td><td>Real-Characters Single-→Fused</td><td>Real-Scenes Single-→Fused</td><td>Mean Change</td></tr><tr><td rowspan=\"4\">Image-alignment</td><td>Lower Bound</td><td>0.721</td><td>0.471</td><td>0.595</td><td>0.596</td></tr><tr><td>LoRA+ Weight Fusion</td><td>0.864- 0.778 (-0.086)</td><td>0.761-0.555(-0.206)</td><td>0.824->0.769 (-0.055)</td><td>0.816-→0.701 (-0.115)</td></tr><tr><td>ED-LoRA + Weight Fusion</td><td>0.868-→0.798 (-0.070)</td><td>0.802-→0.634 (-0.168)</td><td>0.858->0.816 (-0.042)</td><td>0.843->0.749 (-0.094)</td></tr><tr><td>ED-LoRA + Gradient Fusions</td><td>0.868-→0.846(-0.022)</td><td>0.802-→0.770 (-0.032)</td><td>0.858-→0.838 (-0.020)</td><td>0.843-0.818 (-0.025)</td></tr></table>",
|
| 850 |
+
"bbox": [
|
| 851 |
+
192,
|
| 852 |
+
348,
|
| 853 |
+
810,
|
| 854 |
+
416
|
| 855 |
+
],
|
| 856 |
+
"page_idx": 8
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "text",
|
| 860 |
+
"text": "",
|
| 861 |
+
"bbox": [
|
| 862 |
+
186,
|
| 863 |
+
421,
|
| 864 |
+
810,
|
| 865 |
+
460
|
| 866 |
+
],
|
| 867 |
+
"page_idx": 8
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "image",
|
| 871 |
+
"img_path": "images/059130d36a9ef42952a775ba9803e53ab72a74814a107b2254941b96208e1fb9.jpg",
|
| 872 |
+
"image_caption": [],
|
| 873 |
+
"image_footnote": [],
|
| 874 |
+
"bbox": [
|
| 875 |
+
192,
|
| 876 |
+
465,
|
| 877 |
+
464,
|
| 878 |
+
523
|
| 879 |
+
],
|
| 880 |
+
"page_idx": 8
|
| 881 |
+
},
|
| 882 |
+
{
|
| 883 |
+
"type": "table",
|
| 884 |
+
"img_path": "images/18a44c4d2913f8da365eb99caddaebc6b81591899bc6f9ba6c764406bc2cfa90.jpg",
|
| 885 |
+
"table_caption": [],
|
| 886 |
+
"table_footnote": [],
|
| 887 |
+
"table_body": "<table><tr><td>Human Evaluation</td><td>Image Alignment</td><td>Text Alignment</td></tr><tr><td>ED-LoRA+Weight Fusion</td><td>33.5%</td><td>47.5%</td></tr><tr><td>ED-LoRA + Gradient Fusion</td><td>66.5%</td><td>52.5%</td></tr></table>",
|
| 888 |
+
"bbox": [
|
| 889 |
+
483,
|
| 890 |
+
467,
|
| 891 |
+
812,
|
| 892 |
+
526
|
| 893 |
+
],
|
| 894 |
+
"page_idx": 8
|
| 895 |
+
},
|
| 896 |
+
{
|
| 897 |
+
"type": "text",
|
| 898 |
+
"text": "(b) Human preference study interface on Amazon Mechanical Turk. ",
|
| 899 |
+
"bbox": [
|
| 900 |
+
184,
|
| 901 |
+
532,
|
| 902 |
+
468,
|
| 903 |
+
558
|
| 904 |
+
],
|
| 905 |
+
"page_idx": 8
|
| 906 |
+
},
|
| 907 |
+
{
|
| 908 |
+
"type": "text",
|
| 909 |
+
"text": "(c) Human preference study between weight fusion and gradient fusion for fusing ED-LoRAs. ",
|
| 910 |
+
"bbox": [
|
| 911 |
+
482,
|
| 912 |
+
532,
|
| 913 |
+
812,
|
| 914 |
+
558
|
| 915 |
+
],
|
| 916 |
+
"page_idx": 8
|
| 917 |
+
},
|
| 918 |
+
{
|
| 919 |
+
"type": "text",
|
| 920 |
+
"text": "Table 2: Quantitative ablation study of our main components. (a) Ablation study between the LoRA $^ +$ weight fusion, ED-LoRA $^ +$ weight fusion and our ED-LoRA $^ +$ gradient fusion. (b, c) Human preference study to comparing weight fusion and gradient fusion for fusing our ED-LoRAs. ",
|
| 921 |
+
"bbox": [
|
| 922 |
+
173,
|
| 923 |
+
565,
|
| 924 |
+
823,
|
| 925 |
+
608
|
| 926 |
+
],
|
| 927 |
+
"page_idx": 8
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"type": "text",
|
| 931 |
+
"text": "modules of the text encoder and Unet, with a rank of $r = 4$ in all experiments. We use the Adam [48] optimizer with a learning rate of 1e-3, 1e-5 and 1e-4 for tuning text embedding, text encoder and Unet, respectively. For gradient fusion, we use the LBFGS optimizer [49] with 500 and 50 steps to optimize the text encoder and Unet, respectively. More details are provided in the supplementary. ",
|
| 932 |
+
"bbox": [
|
| 933 |
+
174,
|
| 934 |
+
618,
|
| 935 |
+
825,
|
| 936 |
+
674
|
| 937 |
+
],
|
| 938 |
+
"page_idx": 8
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"type": "text",
|
| 942 |
+
"text": "4.2 Qualitative Comparison ",
|
| 943 |
+
"text_level": 1,
|
| 944 |
+
"bbox": [
|
| 945 |
+
174,
|
| 946 |
+
691,
|
| 947 |
+
380,
|
| 948 |
+
707
|
| 949 |
+
],
|
| 950 |
+
"page_idx": 8
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"type": "text",
|
| 954 |
+
"text": "Single-Concept Results. We compare our ED-LoRA with LoRA [3], Custom Diffusion [11] and $\\mathrm { P } +$ [4] for single-concept customization. The results are shown in Fig. 6 (a). Our ED-LoRA achieves comparable performance to previous methods on customizing objects, while maintaining better identity for character customization. More comparisons are provided in the supplementary. ",
|
| 955 |
+
"bbox": [
|
| 956 |
+
173,
|
| 957 |
+
718,
|
| 958 |
+
825,
|
| 959 |
+
773
|
| 960 |
+
],
|
| 961 |
+
"page_idx": 8
|
| 962 |
+
},
|
| 963 |
+
{
|
| 964 |
+
"type": "text",
|
| 965 |
+
"text": "Multi-Concept Results. We compare Mix-of-Show with LoRA [3], Custom Diffusion [11], and $\\mathrm { P } +$ [4] for decentralized multi-concept customization. For LoRA,we utilize weight fusion to combine the different concepts. In the case of $\\mathrm { P } +$ , we directly incorporate the tuned concept embedding into the pretrained model. And for Custom Diffusion, we follow their approach of constrained optimization to merge the key and value projections in cross-attention. To ensure fair evaluation, we employ the same regionally controllable sampling for multi-concept generation across all models and the results are summarized in Fig. 6 (b). ",
|
| 966 |
+
"bbox": [
|
| 967 |
+
173,
|
| 968 |
+
779,
|
| 969 |
+
825,
|
| 970 |
+
877
|
| 971 |
+
],
|
| 972 |
+
"page_idx": 8
|
| 973 |
+
},
|
| 974 |
+
{
|
| 975 |
+
"type": "text",
|
| 976 |
+
"text": "$\\mathrm { P } +$ [4] and Custom Diffusion [11] only tunes text-related module (i.e., text embedding, or the key and value projection of cross-attention). In contrast, LoRA and Mix-of-Show add LoRA layers to the entire model. The limited scope of tuned modules in $\\mathrm { P } +$ and Custom Diffusion leads to an excessive encoding of out-domain low-level details within the embedding. This leads to unnatural and less desirable outcomes when compared to LoRA and Mix-of-Show. In comparison to LoRA, which loses concept identity after weight fusion, Mix-of-Show effectively preserves the identity of each individual concept. ",
|
| 977 |
+
"bbox": [
|
| 978 |
+
173,
|
| 979 |
+
882,
|
| 980 |
+
821,
|
| 981 |
+
911
|
| 982 |
+
],
|
| 983 |
+
"page_idx": 8
|
| 984 |
+
},
|
| 985 |
+
{
|
| 986 |
+
"type": "text",
|
| 987 |
+
"text": "",
|
| 988 |
+
"bbox": [
|
| 989 |
+
174,
|
| 990 |
+
90,
|
| 991 |
+
825,
|
| 992 |
+
161
|
| 993 |
+
],
|
| 994 |
+
"page_idx": 9
|
| 995 |
+
},
|
| 996 |
+
{
|
| 997 |
+
"type": "text",
|
| 998 |
+
"text": "4.3 Quantitative Comparison ",
|
| 999 |
+
"text_level": 1,
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
174,
|
| 1002 |
+
176,
|
| 1003 |
+
390,
|
| 1004 |
+
191
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 9
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "Following Custom Diffusion [11], we utilize the CLIP [47] text/image encoder to assess text alignment and image alignment. We evaluate on different category of concepts on both single-concept tuned model and multi-concept fused model. We include detailed evaluation setting in the supplementary. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
176,
|
| 1013 |
+
202,
|
| 1014 |
+
823,
|
| 1015 |
+
243
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 9
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "Based on the results presented in Table. 1, both Mix-of-Show and LoRA exhibit superior image alignment compared to other methods, all the while maintaining comparable text alignment in the single-client tuned model. This achievement stems from their fine-tuning the spatial-related layer in Unet (e.g., linear projection layer in self-attention), a critical aspect for accurately capturing the complex concepts’ identity, such as characters. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
174,
|
| 1024 |
+
250,
|
| 1025 |
+
825,
|
| 1026 |
+
319
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 9
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "However, the main difference between LoRA and Mix-of-Show emerges in the context of multiconcept fusion. In the center-node fused model, LoRA experiences a significant decline in image alignment for each concept, progressively deteriorating towards the lower bound. In contrast, our Mix-of-Show method undergoes far less degradation in image alignment after multi-concept fusion. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
174,
|
| 1035 |
+
327,
|
| 1036 |
+
825,
|
| 1037 |
+
382
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 9
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "text",
|
| 1043 |
+
"text": "4.4 Ablation Study ",
|
| 1044 |
+
"text_level": 1,
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
174,
|
| 1047 |
+
397,
|
| 1048 |
+
316,
|
| 1049 |
+
412
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 9
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "Embedding Expressiveness. In Fig. 7(a), it is evident that our decomposed embeddings better preserve the identity of the specified concept compared to the standard text embeddings used in LoRA. This results in a more robust encoding of concept identity. As shown in the quantitative results in Table. 2(a), when LoRA is replaced with ED-LoRA, the identity loss from weight fusion (measured by mean change of image-alignment) is reduced from 0.115 to 0.094. This result verifies that expressive embeddings help reduce identity loss during multi-concept fusion. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
174,
|
| 1058 |
+
422,
|
| 1059 |
+
825,
|
| 1060 |
+
507
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 9
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "Fusion Type. Built with the same ED-LoRAs, we conduct experiments to compare weight fusion and gradient fusion. As shown in Fig. 7(b), gradient fusion effectively preserves concept identity after concept fusion, resulting in superior results for multi-concept sampling. According to the quantitative results in Table. 2(a), gradient fusion significantly reduces the identity loss of weight fusion, decreasing it from 0.094 to 0.025. We also conduct a human evaluation and confirm a clear preference for gradient fusion, as indicated in Table. 2(c). ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
174,
|
| 1069 |
+
512,
|
| 1070 |
+
825,
|
| 1071 |
+
595
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 9
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Regionally Controllable Sampling. As shown in Fig. 7(c), direct sampling lead to attribute binding issues, where the concept identities are mixed. However, our regionally controllable sampling overcomes this problem and achieves correct attribute binding in multi-concept generation. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
174,
|
| 1080 |
+
602,
|
| 1081 |
+
821,
|
| 1082 |
+
645
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 9
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "5 Conclusion ",
|
| 1089 |
+
"text_level": 1,
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
174,
|
| 1092 |
+
662,
|
| 1093 |
+
299,
|
| 1094 |
+
680
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 9
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "In this work, we explore decentralized multi-concept customization and highlight the limitations of existing methods like LoRA tuning and weight fusion, which suffer from concept conflicts and identity loss in this scenario. To overcome these challenges, we propose Mix-of-Show, a framework that combines ED-LoRA for single-client concept tuning and gradient fusion for centernode concept fusion. ED-LoRA preserves individual concept essence in the embedding, avoiding conflicts, while gradient fusion minimizes identity loss during concept fusion. We also introduce regionally controllable sampling to handle attribute binding in multi-concept generation. Experiments demonstrate Mix-of-Show can successfully generate complex compositions of multiple customized concepts, including characters, objects and scenes. ",
|
| 1101 |
+
"bbox": [
|
| 1102 |
+
174,
|
| 1103 |
+
694,
|
| 1104 |
+
825,
|
| 1105 |
+
819
|
| 1106 |
+
],
|
| 1107 |
+
"page_idx": 9
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"type": "text",
|
| 1111 |
+
"text": "Acknowledgements ",
|
| 1112 |
+
"text_level": 1,
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
176,
|
| 1115 |
+
838,
|
| 1116 |
+
338,
|
| 1117 |
+
856
|
| 1118 |
+
],
|
| 1119 |
+
"page_idx": 9
|
| 1120 |
+
},
|
| 1121 |
+
{
|
| 1122 |
+
"type": "text",
|
| 1123 |
+
"text": "This project is supported by the National Research Foundation, Singapore under its NRFF Award NRF-NRFF13-2021-0008, and the Ministry of Education, Singapore, under the Academic Research Fund Tier 1 (FY2022). ",
|
| 1124 |
+
"bbox": [
|
| 1125 |
+
176,
|
| 1126 |
+
869,
|
| 1127 |
+
823,
|
| 1128 |
+
911
|
| 1129 |
+
],
|
| 1130 |
+
"page_idx": 9
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"type": "text",
|
| 1134 |
+
"text": "References \n[1] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. Highresolution image synthesis with latent diffusion models. In CVPR, pages 10684–10695, 2022. 1, 4 \n[2] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021. 1, 3, 5 \n[3] Simo Ryu. Low-rank adaptation for fast text-to-image diffusion fine-tuning. https://github. com/cloneofsimo/lora. 1, 3, 5, 6, 8, 9 \n[4] Andrey Voynov, Qinghao Chu, Daniel Cohen-Or, and Kfir Aberman. $^ { p + }$ : Extended textual conditioning in text-to-image generation. arXiv preprint arXiv:2303.09522, 2023. 3, 4, 5, 6, 8, 9 \n[5] Hila Chefer, Yuval Alaluf, Yael Vinker, Lior Wolf, and Daniel Cohen-Or. Attend-andexcite: Attention-based semantic guidance for text-to-image diffusion models. arXiv preprint arXiv:2301.13826, 2023. 3, 4 \n[6] Weixi Feng, Xuehai He, Tsu-Jui Fu, Varun Jampani, Arjun Akula, Pradyumna Narayana, Sugato Basu, Xin Eric Wang, and William Yang Wang. Training-free structured diffusion guidance for compositional text-to-image synthesis. arXiv preprint arXiv:2212.05032, 2022. 3, 4, 7 \n[7] Lvmin Zhang and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. arXiv preprint arXiv:2302.05543, 2023. 3, 4, 7 \n[8] Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, and Xiaohu Qie. T2i-adapter: Learning adapters to dig out more controllable ability for text-to-image diffusion models. arXiv preprint arXiv:2302.08453, 2023. 3, 4, 7 \n[9] Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. An image is worth one word: Personalizing text-to-image generation using textual inversion. arXiv preprint arXiv:2208.01618, 2022. 3, 4, 5, 6 \n[10] Nataniel Ruiz, Yuanzhen Li, Varun Jampani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. arXiv preprint arXiv:2208.12242, 2022. 3 \n[11] Nupur Kumari, Bingliang Zhang, Richard Zhang, Eli Shechtman, and Jun-Yan Zhu. Multiconcept customization of text-to-image diffusion. arXiv preprint arXiv:2212.04488, 2022. 3, 5, 8, 9, 10 \n[12] Ligong Han, Yinxiao Li, Han Zhang, Peyman Milanfar, Dimitris Metaxas, and Feng Yang. Svdiff: Compact parameter space for diffusion fine-tuning. arXiv preprint arXiv:2303.11305, 2023. 3 \n[13] Zhiheng Liu, Ruili Feng, Kai Zhu, Yifei Zhang, Kecheng Zheng, Yu Liu, Deli Zhao, Jingren Zhou, and Yang Cao. Cones: Concept neurons in diffusion models for customized generation. arXiv preprint arXiv:2303.05125, 2023. 3 \n[14] Jing Shi, Wei Xiong, Zhe Lin, and Hyun Joon Jung. Instantbooth: Personalized text-to-image generation without test-time finetuning. arXiv preprint arXiv:2304.03411, 2023. 4 \n[15] Yuxiang Wei, Yabo Zhang, Zhilong Ji, Jinfeng Bai, Lei Zhang, and Wangmeng Zuo. Elite: Encoding visual concepts into textual embeddings for customized text-to-image generation. arXiv preprint arXiv:2302.13848, 2023. 4 \n[16] Xuhui Jia, Yang Zhao, Kelvin CK Chan, Yandong Li, Han Zhang, Boqing Gong, Tingbo Hou, Huisheng Wang, and Yu-Chuan Su. Taming encoder for zero fine-tuning image customization with text-to-image diffusion models. arXiv preprint arXiv:2304.02642, 2023. 4 \n[17] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pages 1273–1282. PMLR, 2017. 4, 7 \n[18] Qinbin Li, Bingsheng He, and Dawn Song. Model-contrastive federated learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10713–10722, 2021. 4 [19] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine Learning and Systems, 2:429–450, 2020. 4, 7 [20] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning, pages 5132–5143. PMLR, 2020. 4 [21] Durmus Alp Emre Acar, Yue Zhao, Ramon Matas Navarro, Matthew Mattina, Paul N Whatmough, and Venkatesh Saligrama. Federated learning based on dynamic regularization. arXiv preprint arXiv:2111.04263, 2021. 4 [22] Maruan Al-Shedivat, Jennifer Gillenwater, Eric Xing, and Afshin Rostamizadeh. Federated learning via posterior averaging: A new perspective and practical algorithms. arXiv preprint arXiv:2010.05273, 2020. 4 [23] Lixu Wang, Shichao Xu, Xiao Wang, and Qi Zhu. Addressing class imbalance in federated learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages \n10165–10173, 2021. 4 [24] Yujun Shi, Jian Liang, Wenqing Zhang, Vincent YF Tan, and Song Bai. Towards understanding and mitigating dimensional collapse in heterogeneous federated learning. arXiv preprint arXiv:2210.00226, 2022. 4 [25] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. Advances in neural information processing systems, 33:7611–7623, 2020. 4 [26] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019. 4 [27] Mi Luo, Fei Chen, Dapeng Hu, Yifan Zhang, Jian Liang, and Jiashi Feng. No fear of heterogeneity: Classifier calibration for federated learning with non-iid data. Advances in Neural Information Processing Systems, 34, 2021. 4 [28] Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. arXiv preprint arXiv:2002.06440, 2020. 4 [29] Tao Lin, Lingjing Kong, Sebastian U Stich, and Martin Jaggi. Ensemble distillation for robust model fusion in federated learning. Advances in Neural Information Processing Systems, \n33:2351–2363, 2020. 4 [30] Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\\` Sanjiv Kumar, and H Brendan McMahan. Adaptive federated optimization. arXiv preprint arXiv:2003.00295, 2020. 4 [31] Jiahui Yu, Yuanzhong Xu, Jing Yu Koh, Thang Luong, Gunjan Baid, Zirui Wang, Vijay Vasudevan, Alexander Ku, Yinfei Yang, Burcu Karagol Ayan, et al. Scaling autoregressive models for content-rich text-to-image generation. arXiv preprint arXiv:2206.10789, 2022. 4, 7 [32] Kimin Lee, Hao Liu, Moonkyung Ryu, Olivia Watkins, Yuqing Du, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, and Shixiang Shane Gu. Aligning text-to-image models using human feedback. arXiv preprint arXiv:2302.12192, 2023. 4, 7 [33] Xiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao, and Hongsheng Li. Better aligning text-toimage models with human preference. arXiv preprint arXiv:2303.14420, 2023. 4, 7 [34] Wan-Duo Kurt Ma, JP Lewis, W Bastiaan Kleijn, and Thomas Leung. Directed diffusion: Direct control of object placement through attention guidance. arXiv preprint arXiv:2302.13153, 2023. \n4, 7 [35] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840–6851, 2020. 4 [36] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020. 4 [37] Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems, 34:8780–8794, 2021. 4 [38] Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022. 4 \n[39] Kushagra Pandey, Avideep Mukherjee, Piyush Rai, and Abhishek Kumar. Diffusevae: Efficient, controllable and high-fidelity generation from low-dimensional latents. arXiv preprint arXiv:2201.00308, 2022. 4 \n[40] Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. arXiv preprint arXiv:2206.00927, 2022. 4 \n[41] Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. Dpmsolver $^ { \\cdot + + }$ : Fast solver for guided sampling of diffusion probabilistic models. arXiv preprint arXiv:2211.01095, 2022. 4 \n[42] Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479–36494, 2022. 4 \n[43] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022. 4 \n[44] Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021. 4 \n[45] Shuyang Gu, Dong Chen, Jianmin Bao, Fang Wen, Bo Zhang, Dongdong Chen, Lu Yuan, and Baining Guo. Vector quantized diffusion model for text-to-image synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10696–10706, 2022. 4 \n[46] Yogesh Balaji, Seungjun Nah, Xun Huang, Arash Vahdat, Jiaming Song, Karsten Kreis, Miika Aittala, Timo Aila, Samuli Laine, Bryan Catanzaro, et al. ediffi: Text-to-image diffusion models with an ensemble of expert denoisers. arXiv preprint arXiv:2211.01324, 2022. 4 \n[47] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In ICML, pages 8748–8763. PMLR, 2021. 4, 10 \n[48] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 9 \n[49] Dong C Liu and Jorge Nocedal. On the limited memory bfgs method for large scale optimization. Mathematical programming, 45(1-3):503–528, 1989. 9 ",
|
| 1135 |
+
"bbox": [
|
| 1136 |
+
171,
|
| 1137 |
+
79,
|
| 1138 |
+
828,
|
| 1139 |
+
916
|
| 1140 |
+
],
|
| 1141 |
+
"page_idx": 10
|
| 1142 |
+
},
|
| 1143 |
+
{
|
| 1144 |
+
"type": "text",
|
| 1145 |
+
"text": "",
|
| 1146 |
+
"bbox": [
|
| 1147 |
+
171,
|
| 1148 |
+
51,
|
| 1149 |
+
828,
|
| 1150 |
+
917
|
| 1151 |
+
],
|
| 1152 |
+
"page_idx": 11
|
| 1153 |
+
},
|
| 1154 |
+
{
|
| 1155 |
+
"type": "text",
|
| 1156 |
+
"text": "",
|
| 1157 |
+
"bbox": [
|
| 1158 |
+
171,
|
| 1159 |
+
84,
|
| 1160 |
+
828,
|
| 1161 |
+
592
|
| 1162 |
+
],
|
| 1163 |
+
"page_idx": 12
|
| 1164 |
+
}
|
| 1165 |
+
]
|
parse/dev/NnIaEaBfXD/NnIaEaBfXD_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/NnIaEaBfXD/NnIaEaBfXD_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/OgCcfc1m0TO/OgCcfc1m0TO_content_list.json
ADDED
|
@@ -0,0 +1,1336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "LEARNING TO PROMPT FOR VISION-LANGUAGE MODELS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
753,
|
| 10 |
+
145
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
170,
|
| 20 |
+
400,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
234,
|
| 32 |
+
544,
|
| 33 |
+
250
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Vision-language pre-training has recently emerged as a promising alternative for representation learning. It shifts from the tradition of using images and discrete labels for learning a fixed set of weights, seen as visual concepts, to aligning images and raw text for two separate encoders. Such a paradigm benefits from a broader source of supervision and allows zero-shot transfer to downstream tasks since visual concepts can be diametrically generated from natural language, known as prompt. In this paper, we identify that a major challenge of deploying such models in practice is prompt engineering. This is because designing a proper prompt, especially for context words surrounding a class name, requires domain expertise and typically takes a significant amount of time for words tuning since a slight change in wording could have a huge impact on performance. Moreover, different downstream tasks require specific designs, further hampering the efficiency of deployment. To overcome this challenge, we propose a simple approach named context optimization $( C o O p )$ . The main idea is to model context in prompts using continuous representations and perform end-to-end learning from data while keeping the pre-trained parameters fixed. In this way, the design of task-relevant prompts can be fully automated. Experiments on 11 datasets show that CoOp effectively turns pre-trained vision-language models into data-efficient visual learners, requiring as few as one or two shots to beat hand-crafted prompts with a decent margin and able to gain significant improvements when using more shots (e.g., at 16 shots the average gain is around $17 \\%$ with the highest reaching over $5 0 \\%$ ). CoOp also exhibits strong robustness to distribution shift. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
265,
|
| 43 |
+
764,
|
| 44 |
+
569
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
594,
|
| 55 |
+
336,
|
| 56 |
+
609
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "The traditional approach for visual representation learning is to train vision models to predict for a fixed set of object categories using discrete labels (He et al., 2016; Dosovitskiy et al., 2021). However, this approach limits visual recognition systems to closed-set visual concepts defined during training, making them unable to handle new categories once deployed in target environments, since additional data are required for learning a new classifier. Recently, vision-language pre-training such as CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021) has emerged as a promising alternative. The main idea is to align images and raw text using two separate encoders—one for each modality. Through large-scale pre-training, vision-language models are allowed to learn open-set visual concepts and can readily be transferred to downstream tasks. In particular, for each new classification task, one can synthesize the classification weights by feeding natural language describing classes of interest to the text encoder, and compare them with image features produced by the image encoder. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
625,
|
| 66 |
+
825,
|
| 67 |
+
777
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "We observe that for pre-trained vision-language models, the text input, known as prompt, plays a key role in downstream datasets. However, identifying the right prompt is a non-trivial task, which often takes a significant amount of time for words tuning—since a slight change in wording could make a huge difference in performance. For instance, for Caltech101 (Figure 1(a), 2nd vs. 3rd prompt), adding “a” before the class token brings more than $5 \\%$ increase in accuracy. Moreover, prompt engineering also requires expertise about the task and ideally the language model’s underlying mechanism. This is exemplified in Figure 1(b-d) where adding task-relevant context can lead to significant improvements, i.e., “flower” for Flowers102, “texture” for DTD and “satellite” for EuroSAT. Tuning the sentence structure could bring further improvements, e.g., putting “a type of flower” after the class token for Flowers102, keeping only “texture” in the context for DTD, and adding “centered” before “satellite photo” for EuroSAT. However, even with extensive tuning, the resulting prompts are by no means guaranteed to be optimal for these downstream tasks. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
785,
|
| 77 |
+
825,
|
| 78 |
+
924
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/6eeee6523dc87811b455ff6d6a2200c6220898cd79558bf59e027edd9bbd6a1d.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: Prompt engineering vs. context optimization $\\bf ( C o O p )$ . The latter uses only 16 shots for learning in these examples. "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
174,
|
| 91 |
+
98,
|
| 92 |
+
825,
|
| 93 |
+
292
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 1
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "",
|
| 100 |
+
"bbox": [
|
| 101 |
+
174,
|
| 102 |
+
362,
|
| 103 |
+
823,
|
| 104 |
+
390
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "Inspired by recent prompt learning research in NLP (Shin et al., 2020; Jiang et al., 2020; Zhong et al., 2021), we propose context optimization $( C o O p ) ^ { 1 }$ to automate prompt engineering to allow more efficient and task-specific transfer for pre-trained vision-language models. Specifically, we model a prompt’s context using continuous representations which are essentially initialized with random vectors with the same dimension as word embeddings (see Figure 2). The context could be shared among all classes or designed to be class-specific. During training, we simply minimize the prediction error using the cross-entropy loss with respect to the learnable context vectors, while keeping the pre-trained parameters fixed. The gradients can be back-propagated all the way through the text encoder, distilling the rich knowledge encoded in the parameters for learning task-relevant context. ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
396,
|
| 114 |
+
825,
|
| 115 |
+
535
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "To demonstrate the effectiveness of $\\mathrm { C o O p }$ , we benchmark on 11 datasets, which cover a diverse set of visual recognition tasks including classification on generic objects, scenes, actions and fine-grained categories, as well as specialized tasks like recognizing textures and satellite imagery. The results show that CoOp can effectively turn pre-trained vision-language models into data-efficient visual learners, requiring as few as one or two shots to beat hand-crafted prompts with a decent margin. The performance can also be further boosted by using more shots, e.g., at 16 shots the margin over hand-crafted prompts averages at around $17 \\%$ and reaches over $50 \\%$ for the highest. CoOp also outperforms the linear probe alternative known as a strong few-shot learning baseline (Tian et al., 2020), and crucially, demonstrates much stronger robustness to distribution shift. Extensive analysis is also conducted to offer a comprehensive picture on how to apply $\\mathrm { C o O p }$ in practice. The source code for reproducing the experiments will be released to facilitate future research. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
173,
|
| 124 |
+
542,
|
| 125 |
+
825,
|
| 126 |
+
695
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 METHODOLOGY ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
176,
|
| 136 |
+
718,
|
| 137 |
+
341,
|
| 138 |
+
734
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "2.1 VISION-LANGUAGE PRE-TRAINING ",
|
| 145 |
+
"text_level": 1,
|
| 146 |
+
"bbox": [
|
| 147 |
+
176,
|
| 148 |
+
751,
|
| 149 |
+
459,
|
| 150 |
+
766
|
| 151 |
+
],
|
| 152 |
+
"page_idx": 1
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"type": "text",
|
| 156 |
+
"text": "We briefly introduce vision-language pre-training with a particular focus on CLIP (Radford et al., 2021). Our approach is applicable to broader CLIP-like vision-language models. ",
|
| 157 |
+
"bbox": [
|
| 158 |
+
171,
|
| 159 |
+
779,
|
| 160 |
+
823,
|
| 161 |
+
808
|
| 162 |
+
],
|
| 163 |
+
"page_idx": 1
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"type": "text",
|
| 167 |
+
"text": "Models CLIP consists of two encoders, one for images and the other for text. The image encoder aims to map high-dimensional images into a low-dimensional embedding space. The architecture of the image encoder can take the form of a CNN like ResNet-50 (He et al., 2016) or a ViT (Dosovitskiy et al., 2021). On the other hand, the text encoder is built on top of a Transformer (Vaswani et al., 2017) and aims to generate text representations from natural language. ",
|
| 168 |
+
"bbox": [
|
| 169 |
+
174,
|
| 170 |
+
825,
|
| 171 |
+
825,
|
| 172 |
+
895
|
| 173 |
+
],
|
| 174 |
+
"page_idx": 1
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"type": "image",
|
| 178 |
+
"img_path": "images/d2e38be7e5da6fc4ee2ef679849eed58bd900feae21b53f307ebcaa459be26d1.jpg",
|
| 179 |
+
"image_caption": [
|
| 180 |
+
"Figure 2: Overview of context optimization $( \\mathrm { C o O p } )$ . "
|
| 181 |
+
],
|
| 182 |
+
"image_footnote": [],
|
| 183 |
+
"bbox": [
|
| 184 |
+
178,
|
| 185 |
+
102,
|
| 186 |
+
825,
|
| 187 |
+
329
|
| 188 |
+
],
|
| 189 |
+
"page_idx": 2
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "Specifically, given a sequence of words (tokens), such as “a photo of a dog.”, CLIP first converts each one of the token (including punctuation) into a lower-cased byte pair encoding (BPE) representation (Sennrich et al., 2016), which is essentially a unique numeric ID. The vocabulary size in CLIP is 49,152. To facilitate minibatch processing, each text sequence is encompassed with the [SOS] and [EOS] tokens and capped at a fixed length of 77. After that, the IDs are mapped to 512-D word embedding vectors, which are then passed on to the Transformer. Finally, the features at the [EOS] token position are layer normalized and further processed by a linear projection layer. ",
|
| 194 |
+
"bbox": [
|
| 195 |
+
173,
|
| 196 |
+
381,
|
| 197 |
+
825,
|
| 198 |
+
479
|
| 199 |
+
],
|
| 200 |
+
"page_idx": 2
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "text",
|
| 204 |
+
"text": "Training CLIP is trained to align the two embedding spaces learned for images and text respectively. Specifically, the learning objective is formulated as a contrastive loss. Given a batch of image-text pairs, CLIP maximizes the cosine similarity for matched pairs while minimizes the cosine similarity for all other unmatched pairs. To learn diverse visual concepts that are more transferable to downstream tasks, CLIP’s team collects a large training dataset consisting of 400 million image-text pairs. ",
|
| 205 |
+
"bbox": [
|
| 206 |
+
173,
|
| 207 |
+
496,
|
| 208 |
+
825,
|
| 209 |
+
580
|
| 210 |
+
],
|
| 211 |
+
"page_idx": 2
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"type": "text",
|
| 215 |
+
"text": "Zero-Shot Inference Since CLIP is pre-trained to predict whether an image matches a textual description, it naturally fits zero-shot recognition. This is achieved by comparing image features with the classification weights synthesized by the text encoder, which takes as input textual descriptions specifying classes of interest. Formally, let $f$ be image features extracted by the image encoder for an image $_ { \\textbf { \\em x } }$ and $\\{ { w } _ { i } \\} _ { i = 1 } ^ { K }$ a set of weight vectors generated by the text encoder. $K$ denotes the number of classes and each ${ \\pmb w } _ { i }$ is derived from a prompt that could have the form of “a photo of a [CLASS].” where the class token is replaced by the specific class name, such as “cat”, “dog” or “car”. The prediction probability is then computed as ",
|
| 216 |
+
"bbox": [
|
| 217 |
+
173,
|
| 218 |
+
595,
|
| 219 |
+
825,
|
| 220 |
+
708
|
| 221 |
+
],
|
| 222 |
+
"page_idx": 2
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "equation",
|
| 226 |
+
"img_path": "images/4ea1f050fdcd38cd771678ff7f745ab1d6e158bd06c19a639982bdbfdd189f72.jpg",
|
| 227 |
+
"text": "$$\np ( y = i | \\pmb { x } ) = \\frac { \\exp ( < \\pmb { w } _ { i } , \\pmb { f } > / \\tau ) } { \\sum _ { j = 1 } ^ { K } \\exp ( < \\pmb { w } _ { j } , \\pmb { f } > / \\tau ) } ,\n$$",
|
| 228 |
+
"text_format": "latex",
|
| 229 |
+
"bbox": [
|
| 230 |
+
357,
|
| 231 |
+
715,
|
| 232 |
+
640,
|
| 233 |
+
755
|
| 234 |
+
],
|
| 235 |
+
"page_idx": 2
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "text",
|
| 239 |
+
"text": "where $\\tau$ is a temperature parameter learned by CLIP and $< \\cdot , \\cdot >$ denotes cosine similarity. ",
|
| 240 |
+
"bbox": [
|
| 241 |
+
171,
|
| 242 |
+
761,
|
| 243 |
+
767,
|
| 244 |
+
776
|
| 245 |
+
],
|
| 246 |
+
"page_idx": 2
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"type": "text",
|
| 250 |
+
"text": "2.2 CONTEXT OPTIMIZATION ",
|
| 251 |
+
"text_level": 1,
|
| 252 |
+
"bbox": [
|
| 253 |
+
174,
|
| 254 |
+
794,
|
| 255 |
+
392,
|
| 256 |
+
808
|
| 257 |
+
],
|
| 258 |
+
"page_idx": 2
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"type": "text",
|
| 262 |
+
"text": "We propose context optimization $\\left( \\mathbf { C o O p } \\right)$ , which avoids manual prompt tuning by modeling context words with continuous vectors that are end-to-end learned from data. An overview is shown in Figure 2. Specifically, the prompt given to the text encoder $g ( \\cdot )$ is designed with the following form, ",
|
| 263 |
+
"bbox": [
|
| 264 |
+
174,
|
| 265 |
+
820,
|
| 266 |
+
823,
|
| 267 |
+
863
|
| 268 |
+
],
|
| 269 |
+
"page_idx": 2
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"type": "equation",
|
| 273 |
+
"img_path": "images/e8cf1a30c989a575a829248e0391c239307459f19edf91a9bbe78dbc564af4d0.jpg",
|
| 274 |
+
"text": "$$\n{ \\pmb t = [ \\mathsf { V } ] _ { 1 } [ \\mathsf { V } ] _ { 2 } \\ldots [ \\mathsf { V } ] _ { M } [ \\mathsf { C L A S S } ] , }\n$$",
|
| 275 |
+
"text_format": "latex",
|
| 276 |
+
"bbox": [
|
| 277 |
+
392,
|
| 278 |
+
869,
|
| 279 |
+
604,
|
| 280 |
+
887
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 2
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "text",
|
| 286 |
+
"text": "where each $[ \\mathsf { V } ] _ { m } \\ ( m \\in \\{ 1 , \\dots , M \\} )$ is a vector with the same dimension as word embeddings (i.e., 512 for CLIP), and $M$ is a hyperparameter specifying the number of context tokens. Note that the ",
|
| 287 |
+
"bbox": [
|
| 288 |
+
173,
|
| 289 |
+
895,
|
| 290 |
+
825,
|
| 291 |
+
924
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 2
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "context here is shared among all classes, which is called unified context and different from classspecific context that is introduced later. ",
|
| 298 |
+
"bbox": [
|
| 299 |
+
173,
|
| 300 |
+
103,
|
| 301 |
+
823,
|
| 302 |
+
132
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 3
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "By forwarding a prompt $\\pmb { t }$ to the text encoder $g ( \\cdot )$ , we can obtain a classification weight vector representing a visual concept. The prediction probability is computed as ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
173,
|
| 311 |
+
138,
|
| 312 |
+
821,
|
| 313 |
+
167
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 3
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "equation",
|
| 319 |
+
"img_path": "images/29bbd138a93bf5b72ebc444a3ec4510f5663a75add4012039b0e83e9a8e60b8b.jpg",
|
| 320 |
+
"text": "$$\np ( \\boldsymbol { y } = i | \\boldsymbol { x } ) = \\frac { \\exp ( < g ( t _ { i } ) , f > / \\tau ) } { \\sum _ { j = 1 } ^ { K } \\exp ( < g ( t _ { j } ) , f > / \\tau ) } ,\n$$",
|
| 321 |
+
"text_format": "latex",
|
| 322 |
+
"bbox": [
|
| 323 |
+
349,
|
| 324 |
+
174,
|
| 325 |
+
647,
|
| 326 |
+
214
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 3
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "where the class token within each prompt $\\mathbf { \\Delta } _ { t _ { i } }$ is replaced by the corresponding word embedding vector(s) of the $i$ -th class name. ",
|
| 333 |
+
"bbox": [
|
| 334 |
+
174,
|
| 335 |
+
219,
|
| 336 |
+
823,
|
| 337 |
+
248
|
| 338 |
+
],
|
| 339 |
+
"page_idx": 3
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "text",
|
| 343 |
+
"text": "Training is performed to minimize the standard classification loss based on the cross-entropy, and the gradients can be back-propagated all the way through the text encoder $g ( \\cdot )$ , making use of the rich knowledge encoded in the parameters to optimize the context. The design of continuous representations also allows full exploration in the word embedding space, which facilitates the learning of task-relevant context. ",
|
| 344 |
+
"bbox": [
|
| 345 |
+
173,
|
| 346 |
+
253,
|
| 347 |
+
825,
|
| 348 |
+
325
|
| 349 |
+
],
|
| 350 |
+
"page_idx": 3
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"type": "text",
|
| 354 |
+
"text": "Other Variants Other than placing the class token at the end of a sequence as in Equation (2), we can also put it in the middle like ",
|
| 355 |
+
"bbox": [
|
| 356 |
+
171,
|
| 357 |
+
340,
|
| 358 |
+
823,
|
| 359 |
+
369
|
| 360 |
+
],
|
| 361 |
+
"page_idx": 3
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"type": "equation",
|
| 365 |
+
"img_path": "images/6d452da291ed3c0622e33b2a8f84a8e972ac828e61ba4ac2cde3abf260a43959.jpg",
|
| 366 |
+
"text": "$$\n\\mathbf { \\partial } t = [ \\mathbf { V } ] _ { 1 } \\ldots [ \\mathbf { V } ] _ { \\frac { M } { 2 } } [ \\mathbf { C L A S S } ] [ \\mathbf { V } ] _ { \\frac { M } { 2 } + 1 } \\ldots [ \\mathbf { V } ] _ { M } ,\n$$",
|
| 367 |
+
"text_format": "latex",
|
| 368 |
+
"bbox": [
|
| 369 |
+
348,
|
| 370 |
+
376,
|
| 371 |
+
648,
|
| 372 |
+
397
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 3
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "which increases flexibility for learning—theoretically, the prompt is allowed to either fill the latter cells with supplementary descriptions or cut off the sentence earlier by using a termination signal such as full stop. ",
|
| 379 |
+
"bbox": [
|
| 380 |
+
176,
|
| 381 |
+
404,
|
| 382 |
+
823,
|
| 383 |
+
446
|
| 384 |
+
],
|
| 385 |
+
"page_idx": 3
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "Another option is to design class-specific context (CSC) where context vectors are independent to each class, i.e., $[ \\mathbf { V } ] _ { 1 } ^ { i } [ \\mathbf { V } ] _ { 2 } ^ { i } \\dot { \\mathbf { \\Omega } } . . . [ \\mathbf { V } ] _ { M } ^ { i } \\dot { \\neq } [ \\mathbf { V } ] _ { 1 } ^ { j } [ \\mathbf { V } ] _ { 2 } ^ { j } \\dot { \\mathbf { \\Omega } } . . . [ \\mathbf { V } ] _ { M } ^ { j }$ for $i \\neq j$ and $i , j \\in \\{ 1 , \\dots , K \\}$ . As an alternative to unified context, we find that CSC is particularly useful for some fine-grained classification tasks. ",
|
| 390 |
+
"bbox": [
|
| 391 |
+
174,
|
| 392 |
+
453,
|
| 393 |
+
825,
|
| 394 |
+
511
|
| 395 |
+
],
|
| 396 |
+
"page_idx": 3
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"type": "text",
|
| 400 |
+
"text": "3 EXPERIMENTS ",
|
| 401 |
+
"text_level": 1,
|
| 402 |
+
"bbox": [
|
| 403 |
+
176,
|
| 404 |
+
531,
|
| 405 |
+
326,
|
| 406 |
+
547
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 3
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "text",
|
| 412 |
+
"text": "3.1 FEW-SHOT LEARNING ",
|
| 413 |
+
"text_level": 1,
|
| 414 |
+
"bbox": [
|
| 415 |
+
176,
|
| 416 |
+
564,
|
| 417 |
+
370,
|
| 418 |
+
578
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 3
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "Datasets We select 11 publicly available image classification datasets used in CLIP: ImageNet (Deng et al., 2009), Caltech101 (Fei-Fei et al., 2004), OxfordPets (Parkhi et al., 2012), StanfordCars (Krause et al., 2013), Flowers102 (Nilsback & Zisserman, 2008), Food101 (Bossard et al., 2014), FGVCAircraft (Maji et al., 2013), SUN397 (Xiao et al., 2010), DTD (Cimpoi et al., 2014), EuroSAT (Helber et al., 2019) and UCF101 (Soomro et al., 2012) (see Appendix A for their statistics). These datasets constitute a comprehensive benchmark, which covers a diverse set of vision tasks including classification on generic objects, scenes, actions and fine-grained categories, as well as specialized tasks like recognizing textures and satellite imagery. We follow the few-shot evaluation protocol adopted in CLIP (Radford et al., 2021), using 1, 2, 4, 8 and 16 shots for training respectively and deploying models in the full test sets. The average results over three runs are reported for comparison. ",
|
| 425 |
+
"bbox": [
|
| 426 |
+
173,
|
| 427 |
+
590,
|
| 428 |
+
825,
|
| 429 |
+
742
|
| 430 |
+
],
|
| 431 |
+
"page_idx": 3
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "Training Details CoOp has four versions: positioning the class token in the end or middle; unified context vs. CSC. Unless otherwise stated, ResNet-50 (He et al., 2016) is used as the image encoder’s backbone and the number of context tokens $M$ is set to 16. Investigations on other design choices are discussed in Section 3.3. All models are built on top of the open-sourced CLIP.2 CoOp’s context vectors are randomly initialized by drawing from a zero-mean Gaussian distribution with standard deviation equal to 0.02. Training is done with SGD and an initial learning rate of 0.002, which is decayed by the cosine annealing rule. The maximum epoch is set to 200 for 16/8 shots, 100 for 4/2 shots, and 50 for 1 shot (except for ImageNet where the maximum epoch is fixed to 50). To mitigate explosive gradients observed in the early training iterations, we use the warmup trick by fixing the learning rate to $1 e - 5$ during the first epoch. ",
|
| 436 |
+
"bbox": [
|
| 437 |
+
174,
|
| 438 |
+
760,
|
| 439 |
+
825,
|
| 440 |
+
898
|
| 441 |
+
],
|
| 442 |
+
"page_idx": 3
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"type": "image",
|
| 446 |
+
"img_path": "images/ac5b5e3af8e643f6365c510dc971b79d4470f7d68c1a365e0582f84185a398b8.jpg",
|
| 447 |
+
"image_caption": [
|
| 448 |
+
"Figure 3: Main results of few-shot learning on the 11 datasets. Overall, $\\mathrm { C o O p }$ effectively turns CLIP into a strong few-shot learner (solid lines), achieving significant improvements over zero-shot CLIP (stars) and performing favorably against the linear probe alternative (dashed lines). $M$ denotes the context length. “end” or “mid” means putting the class token in the end or middle. CSC means class-specific context. "
|
| 449 |
+
],
|
| 450 |
+
"image_footnote": [],
|
| 451 |
+
"bbox": [
|
| 452 |
+
171,
|
| 453 |
+
95,
|
| 454 |
+
820,
|
| 455 |
+
641
|
| 456 |
+
],
|
| 457 |
+
"page_idx": 4
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"type": "text",
|
| 461 |
+
"text": "Baseline Methods We compare CoOp with two baseline methods. The first is zero-shot CLIP, which is based on hand-crafted prompts. We follow the guideline of prompt engineering introduced by Radford et al. (2021). For generic objects and scenes, “a photo of a [CLASS].” is adopted. For fine-grained categories, task-relevant context is added like “a type of pet” for OxfordPets and “a type of food” for Food101. When it comes to specialized tasks such as recognizing textures in DTD, the prompt is customized as “[CLASS] texture.” where the class names are adjectives like “bubbly” and “dotted”. See Appendix A for the details. The second baseline is linear probe CLIP. As suggested by Radford et al. (2021) and a recent study on few-shot learning (Tian et al., 2020), training a linear classifier on top of high-quality pre-trained models’ features (like CLIP) can easily achieve performance that is on a par with that of state-of-the-art few-shot learning methods, which are often much more sophisticated. We follow the same training method used by Radford et al. (2021) to train linear probe CLIP. ",
|
| 462 |
+
"bbox": [
|
| 463 |
+
173,
|
| 464 |
+
757,
|
| 465 |
+
825,
|
| 466 |
+
924
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 4
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "Comparison with Hand-Crafted Prompts Figure 3 summarizes the results. Our default model is $\\mathrm { C L I P { + } C o O p }$ with the class token positioned in the end. The two different ways of positioning the class token achieve similar performance as their curves highly overlap. From the average performance displayed in the top-left corner, we observe that $\\mathrm { C L I P { + } C o O p }$ is a strong few-shot learner, requiring only two shots on average to obtain a decent margin over zero-shot CLIP. Given 16 shots for training, the average gap brought by $\\mathrm { C o O p }$ can be further increased to around $17 \\%$ . ",
|
| 473 |
+
"bbox": [
|
| 474 |
+
174,
|
| 475 |
+
103,
|
| 476 |
+
825,
|
| 477 |
+
188
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 5
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "Figure 4 ranks the absolute improvements obtained by $\\mathrm { C o O p }$ at 16 shots over hand-crafted prompts. Huge improvements are observed on specialized tasks namely EuroSAT and DTD where the increase in performance reaches over $50 \\%$ and $20 \\%$ respectively. The jumps in performance are also significant (those more than $10 \\%$ ) on most fine-grained datasets including Flowers102, StanfordCars and FGVCAircraft, as well as on scene and action recognition datasets (SUN397 & UCF101). Since ImageNet is a challenging dataset that contains 1,000 classes, the $5 . 0 5 \\%$ improvement is also noteworthy. In contrast, the increases on the two fine-grained datasets, OxfordPets and Food101, are less appealing. By digging into $\\mathrm { C L I P { + } C o O p }$ ’s curves on these two datasets in Figure 3, we find there is a loss of momentum in performance improvements even with more shots used, seemingly an overfitting problem. A potential solution is to impose higher regularizations like increasing the weight decay. Nonetheless, the overall results are strong enough to serve as evidence of CoOp’s capability of learning task-relevant prompts in a data-efficient way. ",
|
| 484 |
+
"bbox": [
|
| 485 |
+
173,
|
| 486 |
+
194,
|
| 487 |
+
825,
|
| 488 |
+
361
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 5
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "text",
|
| 494 |
+
"text": "Comparison with Linear Probe CLIP In terms of the overall performance (Figure 3, topleft), $\\mathrm { C L I P { + } C o O p }$ demonstrates clear advantages over linear probe CLIP. The latter requires 4 shots on average to match the zero-shot’s performance while $\\mathrm { C o O p }$ ’s average gains at 4 shots are already more than $10 \\%$ . It is also clear that the gaps in the extreme low-data regime such as one or two shots are much larger, suggesting that $\\mathrm { C o O p }$ is much more effective than learning a linear classifier from scratch for fewshot learning. We also observe that linear probe CLIP is comparable to $\\mathrm { C L I P { + } C o O p }$ on the two specialized tasks (DTD & EuroSAT) as well as on a couple of fine-grained datasets (Flowers102 & FGVCAircraft)—this is not too surprising as the pre-trained CLIP space has been ",
|
| 495 |
+
"bbox": [
|
| 496 |
+
174,
|
| 497 |
+
378,
|
| 498 |
+
483,
|
| 499 |
+
612
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 5
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "image",
|
| 505 |
+
"img_path": "images/46a412dabce93f3d30b2c503d1d179bed564359fe33170e59b995e92be2edcad.jpg",
|
| 506 |
+
"image_caption": [
|
| 507 |
+
"Figure 4: Comparison with hand-crafted prompts. "
|
| 508 |
+
],
|
| 509 |
+
"image_footnote": [],
|
| 510 |
+
"bbox": [
|
| 511 |
+
503,
|
| 512 |
+
393,
|
| 513 |
+
818,
|
| 514 |
+
568
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 5
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "proved powerful, making the linear probe model a strong competitor. Nevertheless, CoOp’s CSC version can beat linear probe CLIP on the aforementioned datasets, and moreover, shows much better potential when more shots become available. ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
174,
|
| 523 |
+
613,
|
| 524 |
+
825,
|
| 525 |
+
654
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 5
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "Unified vs. Class-Specific Context On average, using unified context leads to better performance. In terms of when to apply CSC and when not to, we have the following suggestions. For generic objects (ImageNet & Caltech101), scenes (SUN397) and actions (UCF101), using unified context is clearly better. Unified context also works better on some fine-grained datasets including OxfordPets and Food101, but on others like StanfordCars, Flowers102 and FGVCAircraft the CSC version is preferred. CSC also yields better performance on the two specialized tasks, DTD and EuroSAT, at 16 shots in particular. However, CSC mostly underperforms unified context in challenging low-data scenarios (fewer than 8 shots), which makes sense because CSC has more parameters than unified context and needs more data for training. ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
174,
|
| 534 |
+
671,
|
| 535 |
+
825,
|
| 536 |
+
796
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 5
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "3.2 ROBUSTNESS TO DISTRIBUTION SHIFT ",
|
| 543 |
+
"text_level": 1,
|
| 544 |
+
"bbox": [
|
| 545 |
+
178,
|
| 546 |
+
814,
|
| 547 |
+
482,
|
| 548 |
+
827
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 5
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "text",
|
| 554 |
+
"text": "Since CoOp requires training on a specific data distribution, it risks learning spurious correlations that are detrimental to generalization in unseen distributions (domains), as suggested in recent studies (Taori et al., 2020; Zhou et al., 2021). On the contrary, zero-shot CLIP is not tied to a specific data distribution and has exhibited strong robustness to distribution shift (Radford et al., 2021). In this section, we aim to unveil how robust CoOp is to distribution shift, in comparison to zero-shot CLIP and the linear probe model. ",
|
| 555 |
+
"bbox": [
|
| 556 |
+
174,
|
| 557 |
+
840,
|
| 558 |
+
825,
|
| 559 |
+
924
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 5
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "table",
|
| 565 |
+
"img_path": "images/74c3f352ee575db2fb9a47e86baac4474a2becc339149b788c761584efb9c744.jpg",
|
| 566 |
+
"table_caption": [
|
| 567 |
+
"Table 1: Evaluation on robustness to distribution shift. $M$ : $\\mathrm { C o O p }$ ’s context length. "
|
| 568 |
+
],
|
| 569 |
+
"table_footnote": [],
|
| 570 |
+
"table_body": "<table><tr><td rowspan=\"3\"></td><td>Source</td><td colspan=\"4\">Target</td></tr><tr><td>ImageNet</td><td>ImageNetV2</td><td>ImageNet-Sketch</td><td>ImageNet-A</td><td>ImageNet-R</td></tr><tr><td>Zero-Shot CLIP</td><td>55.41</td><td>48.08</td><td>31.67</td><td>18.63</td><td>53.45</td></tr><tr><td>Linear Probe CLIP</td><td>53.44</td><td>43.40</td><td>17.63</td><td>11.66</td><td>32.63</td></tr><tr><td>CLIP + CoOp (M=16)</td><td>60.46</td><td>52.17</td><td>31.14</td><td>19.62</td><td>53.31</td></tr><tr><td>CLIP + CoOp (M=8)</td><td>60.90</td><td>52.53</td><td>31.73</td><td>19.97</td><td>54.34</td></tr><tr><td>CLIP + CoOp (M=4)</td><td>60.85</td><td>53.02</td><td>32.99</td><td>20.69</td><td>55.57</td></tr></table>",
|
| 571 |
+
"bbox": [
|
| 572 |
+
186,
|
| 573 |
+
126,
|
| 574 |
+
812,
|
| 575 |
+
244
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 6
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "table",
|
| 581 |
+
"img_path": "images/8e4128b648609d063b4581bcf83d77a0e92e5b5fb8f06d0c3b7329be0897f959.jpg",
|
| 582 |
+
"table_caption": [
|
| 583 |
+
"Table 2: Comparison with prompt ensembling. "
|
| 584 |
+
],
|
| 585 |
+
"table_footnote": [],
|
| 586 |
+
"table_body": "<table><tr><td></td><td>ImageNet</td></tr><tr><td>Prompt engineering</td><td>55.41</td></tr><tr><td>Prompt ensembling</td><td>57.81</td></tr><tr><td>CoOp</td><td>60.46</td></tr></table>",
|
| 587 |
+
"bbox": [
|
| 588 |
+
232,
|
| 589 |
+
282,
|
| 590 |
+
442,
|
| 591 |
+
351
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 6
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "table",
|
| 597 |
+
"img_path": "images/1744cb8e796692d7b210a4648f28edece09d1c9b1570fdf5e5cbe8825132ba6b.jpg",
|
| 598 |
+
"table_caption": [
|
| 599 |
+
"Table 3: Random vs. manual initialization. "
|
| 600 |
+
],
|
| 601 |
+
"table_footnote": [],
|
| 602 |
+
"table_body": "<table><tr><td></td><td>Avg %</td></tr><tr><td>[V][V]2[V]3[V]4</td><td>71.26</td></tr><tr><td>"a photo of a"</td><td>71.51</td></tr></table>",
|
| 603 |
+
"bbox": [
|
| 604 |
+
573,
|
| 605 |
+
282,
|
| 606 |
+
754,
|
| 607 |
+
338
|
| 608 |
+
],
|
| 609 |
+
"page_idx": 6
|
| 610 |
+
},
|
| 611 |
+
{
|
| 612 |
+
"type": "text",
|
| 613 |
+
"text": "Datasets The source dataset is ImageNet. The target datasets are ImageNetV2 (Recht et al., 2019), ImageNet-Sketch (Wang et al., 2019), ImageNet-A (Hendrycks et al., 2021b) and ImageNetR (Hendrycks et al., 2021a), all of which have compatible class names with ImageNet allowing seamless transfer for the prompts learned by CoOp. ImageNetV2 is a reproduced test set using different sources while following ImageNet’s data collection process. ImageNet-Sketch contains sketch images belonging to the same 1,000 ImageNet classes. Both ImageNet-A and -R contain 200 classes derived from a subset of ImageNet’s 1,000 classes. The former consists of real-world adversarially filtered images that cause current ImageNet classifiers to produce low results, whereas the latter features a rendition of the ImageNet classes in diverse image styles such as paintings, cartoons and sculptures. ",
|
| 614 |
+
"bbox": [
|
| 615 |
+
173,
|
| 616 |
+
376,
|
| 617 |
+
825,
|
| 618 |
+
515
|
| 619 |
+
],
|
| 620 |
+
"page_idx": 6
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"type": "text",
|
| 624 |
+
"text": "Results Table 1 summarizes the results. It is surprising that $\\mathrm { C L I P { + } C o O p }$ exhibits stronger robustness than zero-shot CLIP to distribution shift, despite exposure to the source dataset. This suggests that the learned prompts are also generalizable. Moreover, it is interesting to see that using fewer context tokens leads to better robustness. More results with different vision backbones are provided in Appendix B.1 where the conclusion remains the same. In contrast, linear probe CLIP obtains much worse results on these target datasets, exposing its weakness in domain generalization. ",
|
| 625 |
+
"bbox": [
|
| 626 |
+
174,
|
| 627 |
+
530,
|
| 628 |
+
825,
|
| 629 |
+
614
|
| 630 |
+
],
|
| 631 |
+
"page_idx": 6
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"type": "text",
|
| 635 |
+
"text": "3.3 FURTHER ANALYSIS ",
|
| 636 |
+
"text_level": 1,
|
| 637 |
+
"bbox": [
|
| 638 |
+
176,
|
| 639 |
+
632,
|
| 640 |
+
356,
|
| 641 |
+
646
|
| 642 |
+
],
|
| 643 |
+
"page_idx": 6
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "text",
|
| 647 |
+
"text": "Comparison with Prompt Ensembling Radford et al. (2021) have suggested that additional improvements can be obtained by ensembling over multiple zero-shot classifiers generated using different hand-crafted prompts, such as “a photo of the large [CLASS].”, “a bad photo of the [CLASS].” and “a origami [CLASS].”, which reflect a different scale, view and abstraction respectively for an image. We are interested to know whether the prompts learned by $\\mathrm { C o O p }$ can still maintain advantages when compared with prompt ensembling. For fair comparison, we use the select prompts from Radford et al. (2021), which have been extensively tuned on ImageNet, to construct the ensemble classifier. Table 2 presents the results of prompt engineering (i.e., using a single hand-crafted prompt), prompt ensembling and CoOp, confirming that $\\mathrm { C o O p }$ is still the best performing method. Additional results are provided in Appendix B.2 to show that $\\mathrm { C o O p }$ also beats prompt ensembling when more advanced vision backbones are used. Given the potential of prompt ensembling, future work could investigate how to improve CoOp from the ensembling perspective. ",
|
| 648 |
+
"bbox": [
|
| 649 |
+
174,
|
| 650 |
+
657,
|
| 651 |
+
825,
|
| 652 |
+
824
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 6
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "Context Length How many context tokens should be used? And is it better to have more context tokens? The results in Section 3.2 suggest having shorter context length benefits domain generalization. Here we study this hyperparameter for source datasets. Specifically, we repeat experiments on the 11 datasets by varying the context length from 4 to 8 to 16. The average results are shown in Figure 5(a), which indicate that having more context tokens leads to better performance and that positioning the class token in the middle gains more momentum with longer context length. To sum up, there is no golden rule for selecting perfect context length since one needs to balance between performance and robustness to distribution shift. See Appendix B.3 for the dataset-specific results. ",
|
| 659 |
+
"bbox": [
|
| 660 |
+
174,
|
| 661 |
+
840,
|
| 662 |
+
823,
|
| 663 |
+
924
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 6
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "image",
|
| 669 |
+
"img_path": "images/519f0153c8ecc9cc7177d00f1acf28c5ca44154e86714b6beefc33ff40b1b1dd.jpg",
|
| 670 |
+
"image_caption": [
|
| 671 |
+
"Figure 5: Investigations on CoOp’s context length and various vision backbones. "
|
| 672 |
+
],
|
| 673 |
+
"image_footnote": [],
|
| 674 |
+
"bbox": [
|
| 675 |
+
236,
|
| 676 |
+
99,
|
| 677 |
+
761,
|
| 678 |
+
276
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 7
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "text",
|
| 684 |
+
"text": "",
|
| 685 |
+
"bbox": [
|
| 686 |
+
169,
|
| 687 |
+
330,
|
| 688 |
+
823,
|
| 689 |
+
358
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 7
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "text",
|
| 695 |
+
"text": "Vision Backbones Figure 5(b) summarizes the results on the 11 datasets using a variety of vision backbones covering both CNNs and ViTs. The results are expected: the more advanced the backbone, the better the performance. The gap between CoOp and hand-crafted prompts is significant across all architectures. See Appendix B.4 for the dataset-specific results. ",
|
| 696 |
+
"bbox": [
|
| 697 |
+
174,
|
| 698 |
+
375,
|
| 699 |
+
823,
|
| 700 |
+
429
|
| 701 |
+
],
|
| 702 |
+
"page_idx": 7
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"type": "text",
|
| 706 |
+
"text": "Initialization We compare random initialization with manual initialization. The latter uses the embeddings of “a photo of a” to initialize the context vectors for the 11 datasets. For fair comparison, we also set the context length to 4 when using random initialization. Table 3 suggests a “good” initialization only brings a small improvement. Though further tuning of the initialization words might help, in practice we suggest using the simple random initialization method. ",
|
| 707 |
+
"bbox": [
|
| 708 |
+
174,
|
| 709 |
+
445,
|
| 710 |
+
825,
|
| 711 |
+
515
|
| 712 |
+
],
|
| 713 |
+
"page_idx": 7
|
| 714 |
+
},
|
| 715 |
+
{
|
| 716 |
+
"type": "text",
|
| 717 |
+
"text": "Interpreting the Learned Prompts is difficult because the context vectors are optimized in a continuous space. We resort to an indirect way by searching within the vocabulary for words that are closest to the learned vectors based on the Euclidean distance. Note that CLIP (Radford et al., 2021) uses the BPE representation (Sennrich et al., 2016) for tokenization, so the vocabulary includes subwords that frequently appear in text, such as “hu” (subsumed by many words like “hug” and “human”). Table 4 shows the searched results on some datasets. We observe that a few words are somewhat relevant to the tasks, such as “enjoyed” for Food101, “fluffy” and “paw” for OxfordPets, and “pretty” for DTD. But when connecting all the nearest words together, the prompts do not make much sense. We also observe that when using manual initialization (like “a photo of a”), the nearest words for the converged vectors are mostly the ones used for initialization. We conjecture that the learned vectors might encode meanings that are beyond the existing vocabulary. Overall, we are unable to draw any firm conclusion based on the observations because using nearest words to interpret the learned prompts could be inaccurate—the semantics of the vectors is not necessarily correlated with the nearest words. ",
|
| 718 |
+
"bbox": [
|
| 719 |
+
174,
|
| 720 |
+
531,
|
| 721 |
+
825,
|
| 722 |
+
724
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 7
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "4 RELATED WORK ",
|
| 729 |
+
"text_level": 1,
|
| 730 |
+
"bbox": [
|
| 731 |
+
176,
|
| 732 |
+
744,
|
| 733 |
+
344,
|
| 734 |
+
761
|
| 735 |
+
],
|
| 736 |
+
"page_idx": 7
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"type": "text",
|
| 740 |
+
"text": "Vision-Language Models have recently demonstrated great potential in learning generic visual representations and allowing zero-shot transfer to a variety of downstream classification tasks (Radford et al., 2021; Jia et al., 2021; Zhang et al., 2020). To our knowledge, the recent developments in vision-language learning, particularly CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021), are largely driven by advances in the following three areas: i) text representation learning with Transformers (Vaswani et al., 2017), ii) large-minibatch contrastive representation learning (Chen et al., 2020; He et al., 2020; Henaff et al. ´ , 2020), and iii) web-scale training datasets—CLIP benefits from 400 million curated image-text pairs while ALIGN exploits 1.8 billion noisy image-text pairs. ",
|
| 741 |
+
"bbox": [
|
| 742 |
+
174,
|
| 743 |
+
776,
|
| 744 |
+
825,
|
| 745 |
+
888
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 7
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "text",
|
| 751 |
+
"text": "The idea of mapping images and text onto a common embedding space has been studied since nearly a decade ago (Socher et al., 2013; Frome et al., 2013; Elhoseiny et al., 2013), but with drastically different technologies. For text features extraction, early work has mainly utilized pre-trained word vectors (Socher et al., 2013; Frome et al., 2013) or the hand-crafted TF-IDF features (Elhoseiny et al., 2013; Lei Ba et al., 2015). Matching images and text features has been formulated as metric learning (Frome et al., 2013), multi-label classification (Joulin et al., 2016; Gomez et al., 2017), n-gram language learning (Li et al., 2017), and the recently proposed captioning (Desai & Johnson, 2021). Our work is orthogonal to recent research in vision-language models, aiming to facilitate the deployment of such models in downstream datasets. ",
|
| 752 |
+
"bbox": [
|
| 753 |
+
174,
|
| 754 |
+
896,
|
| 755 |
+
821,
|
| 756 |
+
924
|
| 757 |
+
],
|
| 758 |
+
"page_idx": 7
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"type": "table",
|
| 762 |
+
"img_path": "images/06f1bd2481b9fa851ae02e253ed329919e89fc8075a0857f4345b144c0649785.jpg",
|
| 763 |
+
"table_caption": [
|
| 764 |
+
"Table 4: The nearest words for each of the 16 context vectors learned by $\\mathrm { C o O p }$ , with their distances shown in parentheses. N/A means non-Latin characters. "
|
| 765 |
+
],
|
| 766 |
+
"table_footnote": [],
|
| 767 |
+
"table_body": "<table><tr><td>#</td><td>ImageNet|</td><td>Food101</td><td>OxfordPets|</td><td>DTD|</td><td>UCF101</td></tr><tr><td>1</td><td>potd (1.7136)</td><td>lc (0.6752)</td><td>tosc (2.5952)</td><td>boxed (0.9433)</td><td>|meteorologist (1.5377)</td></tr><tr><td>2</td><td>that (1.4015)</td><td>enjoyed (0.5305)</td><td>judge (1.2635)</td><td>seed (1.0498)</td><td>exe (0.9807)</td></tr><tr><td>3</td><td>filmed (1.2275)</td><td>beh (0.5390)</td><td>fluffy (1.6099)</td><td>anna (0.8127)</td><td>parents (1.0654)</td></tr><tr><td>4</td><td>fruit (1.4864)</td><td>matches (0.5646)</td><td>cart (1.3958)</td><td>mountain (0.9509)</td><td>masterful (0.9528)</td></tr><tr><td></td><td>.,.. (1.5863)</td><td>nytimes (0.6993)</td><td>harlan (2.2948)</td><td>eldest (0.7111)</td><td>fe (1.3574)</td></tr><tr><td></td><td>(1.7502)</td><td>prou (0.5905)</td><td>paw (1.3055)</td><td>pretty (0.8762)</td><td>thof (1.2841)</td></tr><tr><td></td><td>excluded (1.2355)</td><td>lower r(0.5390)</td><td>incase (1.2215)</td><td>faces (0.7872)</td><td>where (0.9705)</td></tr><tr><td></td><td>cold (1.4654)</td><td>N/A</td><td>bie (1.5454)</td><td>honey (1.8414)</td><td>kristen (1.1921)</td></tr><tr><td></td><td>stery (1.6085)</td><td>minute (0.5672)</td><td>snuggle (1.1578)</td><td>series (1.6680)</td><td>imam (1.1297)</td></tr><tr><td></td><td>warri (1.3055)</td><td>~ (0.5529)</td><td>along (1.8298)</td><td>coca (1.5571)</td><td>near (0.8942)</td></tr><tr><td>11</td><td>marvelcomics (1.5638)</td><td>well (0.5659)</td><td>lenjoyment (2.3495)</td><td>moon (1.2775)</td><td>tummy (1.4303)</td></tr><tr><td>12</td><td>.: (1.7387)</td><td>ends (0.6113)</td><td>jt (1.3726)</td><td>1h (1.0382)</td><td>hel (0.7644)</td></tr><tr><td>13</td><td>N/A</td><td>mis (0.5826)</td><td>improving (1.3198)</td><td>won (0.9314)</td><td>boop (1.0491)</td></tr><tr><td>14</td><td>lation (1.5015)</td><td>somethin (0.6041)</td><td>srsly (1.6759)</td><td>replied (1.1429)</td><td>N/A</td></tr><tr><td>15</td><td>muh (1.4985)</td><td>seminar (0.5274)</td><td>asteroid (1.3395)</td><td>sent (1.3173)</td><td>facial (1.4452)</td></tr><tr><td>16</td><td>.# (1.9340)</td><td>N/A</td><td>N/A</td><td>piedmont (1.5198)</td><td>during (1.1755)</td></tr></table>",
|
| 768 |
+
"bbox": [
|
| 769 |
+
178,
|
| 770 |
+
141,
|
| 771 |
+
821,
|
| 772 |
+
371
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 8
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "text",
|
| 778 |
+
"text": "",
|
| 779 |
+
"bbox": [
|
| 780 |
+
174,
|
| 781 |
+
411,
|
| 782 |
+
825,
|
| 783 |
+
508
|
| 784 |
+
],
|
| 785 |
+
"page_idx": 8
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"type": "text",
|
| 789 |
+
"text": "Prompt Learning in NLP Knowledge probing for large pre-trained language models, formally defined by Petroni et al. (2019) as “fill-in-the-blank” cloze tests, has recently sparked interest in prompt learning research in NLP (Shin et al., 2020; Jiang et al., 2020; Li & Liang, 2021; Zhong et al., 2021; Lester et al., 2021; Gao et al., 2020; Liu et al., 2021b). The basic idea of knowledge probing is to induce pre-trained language models to generate answers given cloze-style prompts, which can benefit a number of downstream tasks, such as sentiment analysis. Jiang et al. (2020) propose to generate candidate prompts through text mining and paraphrasing, and identify the optimal ones that give the highest training accuracy. Shin et al. (2020) introduce a gradient-based approach, which searches for tokens with the largest gradient changes in the label likelihood. Most related to our work are continuous prompt learning methods (Zhong et al., 2021; Li & Liang, 2021; Lester et al., 2021) which optimize continuous vectors in the word embedding space. A drawback of such methods compared to searching discrete tokens is the lack of a clear way to visualize what “words” are learned for the vectors. We refer readers to Liu et al. (2021a) for a comprehensive survey in the topic of prompt learning in NLP. ",
|
| 790 |
+
"bbox": [
|
| 791 |
+
173,
|
| 792 |
+
540,
|
| 793 |
+
825,
|
| 794 |
+
734
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 8
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "text",
|
| 800 |
+
"text": "5 CONCLUSION ",
|
| 801 |
+
"text_level": 1,
|
| 802 |
+
"bbox": [
|
| 803 |
+
176,
|
| 804 |
+
771,
|
| 805 |
+
318,
|
| 806 |
+
786
|
| 807 |
+
],
|
| 808 |
+
"page_idx": 8
|
| 809 |
+
},
|
| 810 |
+
{
|
| 811 |
+
"type": "text",
|
| 812 |
+
"text": "We present $\\mathrm { C o O p }$ , a differentiable approach that focuses on continuous prompt learning to facilitate the deployment of pre-trained vision-language models in downstream datasets. The results on the 11 datasets serve as strong evidence of CoOp’s effectiveness in data-efficient learning. The learned prompts are proved much more task-relevant than hand-crafted prompts reflected by the huge improvements in performance, as well as stronger in robustness to distribution shift. In terms of limitation, CoOp requires explicit access to the pre-trained model parameters, which might be unavailable when only the APIs of pre-trained models are provided. An interesting future direction is thus to investigate “black-box” prompt learning. ",
|
| 813 |
+
"bbox": [
|
| 814 |
+
174,
|
| 815 |
+
811,
|
| 816 |
+
825,
|
| 817 |
+
924
|
| 818 |
+
],
|
| 819 |
+
"page_idx": 8
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"type": "text",
|
| 823 |
+
"text": "REFERENCES ",
|
| 824 |
+
"text_level": 1,
|
| 825 |
+
"bbox": [
|
| 826 |
+
174,
|
| 827 |
+
102,
|
| 828 |
+
287,
|
| 829 |
+
118
|
| 830 |
+
],
|
| 831 |
+
"page_idx": 9
|
| 832 |
+
},
|
| 833 |
+
{
|
| 834 |
+
"type": "text",
|
| 835 |
+
"text": "Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101–mining discriminative components with random forests. In ECCV, 2014. ",
|
| 836 |
+
"bbox": [
|
| 837 |
+
176,
|
| 838 |
+
126,
|
| 839 |
+
823,
|
| 840 |
+
155
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 9
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "text",
|
| 846 |
+
"text": "Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. ",
|
| 847 |
+
"bbox": [
|
| 848 |
+
171,
|
| 849 |
+
162,
|
| 850 |
+
823,
|
| 851 |
+
193
|
| 852 |
+
],
|
| 853 |
+
"page_idx": 9
|
| 854 |
+
},
|
| 855 |
+
{
|
| 856 |
+
"type": "text",
|
| 857 |
+
"text": "Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In CVPR, 2014. ",
|
| 858 |
+
"bbox": [
|
| 859 |
+
171,
|
| 860 |
+
202,
|
| 861 |
+
823,
|
| 862 |
+
231
|
| 863 |
+
],
|
| 864 |
+
"page_idx": 9
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"type": "text",
|
| 868 |
+
"text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. ",
|
| 869 |
+
"bbox": [
|
| 870 |
+
169,
|
| 871 |
+
239,
|
| 872 |
+
823,
|
| 873 |
+
270
|
| 874 |
+
],
|
| 875 |
+
"page_idx": 9
|
| 876 |
+
},
|
| 877 |
+
{
|
| 878 |
+
"type": "text",
|
| 879 |
+
"text": "Karan Desai and Justin Johnson. Virtex: Learning visual representations from textual annotations. In CVPR, 2021. ",
|
| 880 |
+
"bbox": [
|
| 881 |
+
169,
|
| 882 |
+
277,
|
| 883 |
+
823,
|
| 884 |
+
308
|
| 885 |
+
],
|
| 886 |
+
"page_idx": 9
|
| 887 |
+
},
|
| 888 |
+
{
|
| 889 |
+
"type": "text",
|
| 890 |
+
"text": "Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. ",
|
| 891 |
+
"bbox": [
|
| 892 |
+
176,
|
| 893 |
+
315,
|
| 894 |
+
823,
|
| 895 |
+
359
|
| 896 |
+
],
|
| 897 |
+
"page_idx": 9
|
| 898 |
+
},
|
| 899 |
+
{
|
| 900 |
+
"type": "text",
|
| 901 |
+
"text": "Mohamed Elhoseiny, Babak Saleh, and Ahmed Elgammal. Write a classifier: Zero-shot learning using purely textual descriptions. In ICCV, 2013. ",
|
| 902 |
+
"bbox": [
|
| 903 |
+
171,
|
| 904 |
+
367,
|
| 905 |
+
823,
|
| 906 |
+
397
|
| 907 |
+
],
|
| 908 |
+
"page_idx": 9
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"type": "text",
|
| 912 |
+
"text": "Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. In CVPR-W, 2004. ",
|
| 913 |
+
"bbox": [
|
| 914 |
+
176,
|
| 915 |
+
406,
|
| 916 |
+
823,
|
| 917 |
+
436
|
| 918 |
+
],
|
| 919 |
+
"page_idx": 9
|
| 920 |
+
},
|
| 921 |
+
{
|
| 922 |
+
"type": "text",
|
| 923 |
+
"text": "Andrea Frome, Greg Corrado, Jonathon Shlens, Samy Bengio, Jeffrey Dean, Marc’Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NeurIPS, 2013. ",
|
| 924 |
+
"bbox": [
|
| 925 |
+
173,
|
| 926 |
+
444,
|
| 927 |
+
823,
|
| 928 |
+
473
|
| 929 |
+
],
|
| 930 |
+
"page_idx": 9
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"type": "text",
|
| 934 |
+
"text": "Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723, 2020. ",
|
| 935 |
+
"bbox": [
|
| 936 |
+
174,
|
| 937 |
+
482,
|
| 938 |
+
823,
|
| 939 |
+
512
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 9
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "text",
|
| 945 |
+
"text": "Lluis Gomez, Yash Patel, Marc¸al Rusinol, Dimosthenis Karatzas, and CV Jawahar. Self-supervised ˜ learning of visual features through embedding images into text topic spaces. In CVPR, 2017. ",
|
| 946 |
+
"bbox": [
|
| 947 |
+
173,
|
| 948 |
+
521,
|
| 949 |
+
823,
|
| 950 |
+
550
|
| 951 |
+
],
|
| 952 |
+
"page_idx": 9
|
| 953 |
+
},
|
| 954 |
+
{
|
| 955 |
+
"type": "text",
|
| 956 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. ",
|
| 957 |
+
"bbox": [
|
| 958 |
+
173,
|
| 959 |
+
559,
|
| 960 |
+
821,
|
| 961 |
+
588
|
| 962 |
+
],
|
| 963 |
+
"page_idx": 9
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"type": "text",
|
| 967 |
+
"text": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. ",
|
| 968 |
+
"bbox": [
|
| 969 |
+
173,
|
| 970 |
+
597,
|
| 971 |
+
823,
|
| 972 |
+
626
|
| 973 |
+
],
|
| 974 |
+
"page_idx": 9
|
| 975 |
+
},
|
| 976 |
+
{
|
| 977 |
+
"type": "text",
|
| 978 |
+
"text": "Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2019. ",
|
| 979 |
+
"bbox": [
|
| 980 |
+
174,
|
| 981 |
+
635,
|
| 982 |
+
825,
|
| 983 |
+
678
|
| 984 |
+
],
|
| 985 |
+
"page_idx": 9
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"type": "text",
|
| 989 |
+
"text": "Olivier J. Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, S. M. Ali Eslami,´ and Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. In ¨ ICML, 2020. ",
|
| 990 |
+
"bbox": [
|
| 991 |
+
174,
|
| 992 |
+
686,
|
| 993 |
+
825,
|
| 994 |
+
729
|
| 995 |
+
],
|
| 996 |
+
"page_idx": 9
|
| 997 |
+
},
|
| 998 |
+
{
|
| 999 |
+
"type": "text",
|
| 1000 |
+
"text": "Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, Dawn Song, Jacob Steinhardt, and Justin Gilmer. The many faces of robustness: A critical analysis of out-of-distribution generalization. ICCV, 2021a. ",
|
| 1001 |
+
"bbox": [
|
| 1002 |
+
174,
|
| 1003 |
+
738,
|
| 1004 |
+
825,
|
| 1005 |
+
795
|
| 1006 |
+
],
|
| 1007 |
+
"page_idx": 9
|
| 1008 |
+
},
|
| 1009 |
+
{
|
| 1010 |
+
"type": "text",
|
| 1011 |
+
"text": "Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. In CVPR, 2021b. ",
|
| 1012 |
+
"bbox": [
|
| 1013 |
+
171,
|
| 1014 |
+
804,
|
| 1015 |
+
823,
|
| 1016 |
+
833
|
| 1017 |
+
],
|
| 1018 |
+
"page_idx": 9
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"type": "text",
|
| 1022 |
+
"text": "Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021. ",
|
| 1023 |
+
"bbox": [
|
| 1024 |
+
174,
|
| 1025 |
+
843,
|
| 1026 |
+
823,
|
| 1027 |
+
886
|
| 1028 |
+
],
|
| 1029 |
+
"page_idx": 9
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"type": "text",
|
| 1033 |
+
"text": "Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? ACL, 2020. ",
|
| 1034 |
+
"bbox": [
|
| 1035 |
+
173,
|
| 1036 |
+
895,
|
| 1037 |
+
821,
|
| 1038 |
+
924
|
| 1039 |
+
],
|
| 1040 |
+
"page_idx": 9
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "text",
|
| 1044 |
+
"text": "Armand Joulin, Laurens Van Der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In ECCV, 2016. \nJonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In ICCV-W, 2013. \nJimmy Lei Ba, Kevin Swersky, Sanja Fidler, et al. Predicting deep zero-shot convolutional neural networks using textual descriptions. In ICCV, 2015. \nBrian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. arXiv preprint arXiv:2104.08691, 2021. \nAng Li, Allan Jabri, Armand Joulin, and Laurens van der Maaten. Learning visual n-grams from web data. In ICCV, 2017. \nXiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190, 2021. \nPengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. arXiv preprint arXiv:2107.13586, 2021a. \nXiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. Gpt understands, too. arXiv preprint arXiv:2103.10385, 2021b. \nSubhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013. \nMaria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In ICVGIP, 2008. \nOmkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In CVPR, 2012. \nFabio Petroni, Tim Rocktaschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, ¨ and Sebastian Riedel. Language models as knowledge bases? In EMNLP, 2019. \nAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In ICML, 2021. \nBenjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In ICML, 2019. \nRico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, 2016. \nTaylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. In EMNLP, 2020. \nRichard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher D Manning, and Andrew Y Ng. Zero-shot learning through cross-modal transfer. In NeurIPS, 2013. \nKhurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. \nRohan Taori, Achal Dave, Vaishaal Shankar, Nicholas Carlini, Benjamin Recht, and Ludwig Schmidt. Measuring robustness to natural distribution shifts in image classification. In NeurIPS, 2020. \nYonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenenbaum, and Phillip Isola. Rethinking few-shot image classification: a good embedding is all you need? In ECCV, 2020. ",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
169,
|
| 1047 |
+
70,
|
| 1048 |
+
826,
|
| 1049 |
+
929
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 10
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
171,
|
| 1058 |
+
103,
|
| 1059 |
+
823,
|
| 1060 |
+
132
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 11
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. In NeurIPS, 2019. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
173,
|
| 1069 |
+
140,
|
| 1070 |
+
821,
|
| 1071 |
+
170
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 11
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In CVPR, 2010. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
171,
|
| 1080 |
+
178,
|
| 1081 |
+
821,
|
| 1082 |
+
208
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 11
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "Yuhao Zhang, Hang Jiang, Yasuhide Miura, Christopher D Manning, and Curtis P Langlotz. Contrastive learning of medical visual representations from paired images and text. arXiv preprint arXiv:2010.00747, 2020. ",
|
| 1089 |
+
"bbox": [
|
| 1090 |
+
174,
|
| 1091 |
+
215,
|
| 1092 |
+
823,
|
| 1093 |
+
258
|
| 1094 |
+
],
|
| 1095 |
+
"page_idx": 11
|
| 1096 |
+
},
|
| 1097 |
+
{
|
| 1098 |
+
"type": "text",
|
| 1099 |
+
"text": "Zexuan Zhong, Dan Friedman, and Danqi Chen. Factual probing is [mask]: Learning vs. learning to recall. In NAACL, 2021. ",
|
| 1100 |
+
"bbox": [
|
| 1101 |
+
169,
|
| 1102 |
+
267,
|
| 1103 |
+
823,
|
| 1104 |
+
297
|
| 1105 |
+
],
|
| 1106 |
+
"page_idx": 11
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"type": "text",
|
| 1110 |
+
"text": "Kaiyang Zhou, Ziwei Liu, Yu Qiao, Tao Xiang, and Chen Change Loy. Domain generalization in vision: A survey. arXiv preprint arXiv:2103.02503, 2021. ",
|
| 1111 |
+
"bbox": [
|
| 1112 |
+
171,
|
| 1113 |
+
306,
|
| 1114 |
+
823,
|
| 1115 |
+
335
|
| 1116 |
+
],
|
| 1117 |
+
"page_idx": 11
|
| 1118 |
+
},
|
| 1119 |
+
{
|
| 1120 |
+
"type": "text",
|
| 1121 |
+
"text": "APPENDIX ",
|
| 1122 |
+
"text_level": 1,
|
| 1123 |
+
"bbox": [
|
| 1124 |
+
176,
|
| 1125 |
+
103,
|
| 1126 |
+
263,
|
| 1127 |
+
117
|
| 1128 |
+
],
|
| 1129 |
+
"page_idx": 12
|
| 1130 |
+
},
|
| 1131 |
+
{
|
| 1132 |
+
"type": "text",
|
| 1133 |
+
"text": "A DATASETS DETAILS ",
|
| 1134 |
+
"text_level": 1,
|
| 1135 |
+
"bbox": [
|
| 1136 |
+
178,
|
| 1137 |
+
140,
|
| 1138 |
+
375,
|
| 1139 |
+
156
|
| 1140 |
+
],
|
| 1141 |
+
"page_idx": 12
|
| 1142 |
+
},
|
| 1143 |
+
{
|
| 1144 |
+
"type": "text",
|
| 1145 |
+
"text": "The detailed statistics of the 11 datasets, as well as the four variants of ImageNet, are shown in Table 5. The hand-crafted prompts used for zero-shot CLIP are also detailed in the table. For Caltech101, the “BACKGROUND Google” and “Faces easy” classes are discarded. For the video dataset, UCF101, the middle frame of each video is used as input to the image encoder. ",
|
| 1146 |
+
"bbox": [
|
| 1147 |
+
174,
|
| 1148 |
+
176,
|
| 1149 |
+
825,
|
| 1150 |
+
232
|
| 1151 |
+
],
|
| 1152 |
+
"page_idx": 12
|
| 1153 |
+
},
|
| 1154 |
+
{
|
| 1155 |
+
"type": "table",
|
| 1156 |
+
"img_path": "images/142cf5c4483de3165244cbdd1c44de5a52168f1027ac3fb3997a3e15942e2b6f.jpg",
|
| 1157 |
+
"table_caption": [
|
| 1158 |
+
"Table 5: Datasets statistics. "
|
| 1159 |
+
],
|
| 1160 |
+
"table_footnote": [],
|
| 1161 |
+
"table_body": "<table><tr><td>Dataset</td><td>Classes</td><td>Train</td><td>Val</td><td>Test</td><td>Hand-crafted prompt</td></tr><tr><td>ImageNet</td><td>1,000</td><td>1.28M</td><td>N/A</td><td>50.000</td><td>“a photo of a [CLASS]."</td></tr><tr><td>Caltech101</td><td>100</td><td>4,128</td><td>1,649</td><td>2,465</td><td>“a photo of a [CLASS].”</td></tr><tr><td>OxfordPets</td><td>37</td><td>2.944</td><td>736</td><td>3,669</td><td>“a photo of a[CLASS], a type of pet.”</td></tr><tr><td>StanfordCars</td><td>196</td><td>6,509</td><td>1,635</td><td>8,041</td><td>“a photo of a [CLASS].”</td></tr><tr><td>Flowers102</td><td>102</td><td>4.093</td><td>1,633</td><td>2.463</td><td>“a photo of a [CLASS],a type of flower.”</td></tr><tr><td>Food101</td><td>101</td><td>50,500</td><td>20,200</td><td>30,300</td><td>“a photo of [CLASS], a type of food.”</td></tr><tr><td>FGVCAircraft</td><td>100</td><td>3,334</td><td>3,333</td><td>3,333</td><td>“a photo of a [CLASS],a type of aircraft."”</td></tr><tr><td>SUN397</td><td>397</td><td>15,880</td><td>3,970</td><td>19,850</td><td>“a photo of a [CLASS].”</td></tr><tr><td>DTD</td><td>47</td><td>2,820</td><td>1,128</td><td>1,692</td><td>"[CLASS] texture."</td></tr><tr><td>EuroSAT</td><td>10</td><td>13,500</td><td>5,400</td><td>8,100</td><td>“a centered satelite photo of [CLASS]."</td></tr><tr><td>UCF101</td><td>101</td><td>7,639</td><td>1,898</td><td>3,783</td><td>“a photo of a person doing [CLASS]."</td></tr><tr><td>ImageNetV2</td><td>1,000</td><td>N/A</td><td>N/A</td><td>10.000</td><td>“a photo of a [CLASS].”</td></tr><tr><td>ImageNet-Sketch</td><td>1,000</td><td>N/A</td><td>N/A</td><td>50,889</td><td>“a photo of a [CLASS].”</td></tr><tr><td>ImageNet-A</td><td>200</td><td>N/A</td><td>N/A</td><td>7,500</td><td>“a photo of a [CLASS].”</td></tr><tr><td>ImageNet-R</td><td>200</td><td>N/A</td><td>N/A</td><td>30,000</td><td>“a photo of a [CLASS].”</td></tr></table>",
|
| 1162 |
+
"bbox": [
|
| 1163 |
+
178,
|
| 1164 |
+
277,
|
| 1165 |
+
818,
|
| 1166 |
+
501
|
| 1167 |
+
],
|
| 1168 |
+
"page_idx": 12
|
| 1169 |
+
},
|
| 1170 |
+
{
|
| 1171 |
+
"type": "text",
|
| 1172 |
+
"text": "B ADDITIONAL RESULTS ",
|
| 1173 |
+
"text_level": 1,
|
| 1174 |
+
"bbox": [
|
| 1175 |
+
176,
|
| 1176 |
+
542,
|
| 1177 |
+
398,
|
| 1178 |
+
559
|
| 1179 |
+
],
|
| 1180 |
+
"page_idx": 12
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"type": "text",
|
| 1184 |
+
"text": "B.1 ROBUSTNESS EXPERIMENTS ",
|
| 1185 |
+
"text_level": 1,
|
| 1186 |
+
"bbox": [
|
| 1187 |
+
176,
|
| 1188 |
+
579,
|
| 1189 |
+
415,
|
| 1190 |
+
593
|
| 1191 |
+
],
|
| 1192 |
+
"page_idx": 12
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"type": "text",
|
| 1196 |
+
"text": "In addition to ResNet-50, we further experiment with more advanced architectures including ResNet-101, ViT-B/32 and ViT-B/16, all of which have pre-trained weights available from CLIP’s GitHub repository. The results are shown in Table 6 where we can draw the same conclusion as the main paper: CoOp offers stronger robustness than hand-crafted prompts and using fewer context tokens benefits domain generalization. ",
|
| 1197 |
+
"bbox": [
|
| 1198 |
+
174,
|
| 1199 |
+
607,
|
| 1200 |
+
825,
|
| 1201 |
+
678
|
| 1202 |
+
],
|
| 1203 |
+
"page_idx": 12
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"type": "text",
|
| 1207 |
+
"text": "B.2 PROMPT ENGINEERING, PROMPT ENSEMBLING AND COOP ",
|
| 1208 |
+
"text_level": 1,
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
176,
|
| 1211 |
+
702,
|
| 1212 |
+
625,
|
| 1213 |
+
717
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 12
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "text",
|
| 1219 |
+
"text": "Table 7 provides more comprehensive comparisons covering a variety of vision backbones. The observations are similar to those discussed in the main paper: prompt ensembling is clearly better than prompt engineering; and CoOp demonstrates consistent advantages over prompt ensembling. ",
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
174,
|
| 1222 |
+
731,
|
| 1223 |
+
825,
|
| 1224 |
+
773
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 12
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"type": "text",
|
| 1230 |
+
"text": "B.3 CONTEXT LENGTH ",
|
| 1231 |
+
"text_level": 1,
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
176,
|
| 1234 |
+
796,
|
| 1235 |
+
349,
|
| 1236 |
+
810
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 12
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "text",
|
| 1242 |
+
"text": "Figure 6 shows detailed results of using different context lengths for CoOp on each of the 11 datasets. The average performance, displayed in the top-left corner, suggests that using more context tokens is better. There are three exceptions: on ImageNet, OxfordPets, and Food101, the performance is saturated and the improvements diminish when the context length is increased. As discussed in the main paper, selecting a proper length needs to balance between performance on source datasets and robustness to distribution shift in unseen domains. We suggest practitioners use a validation set to identify the optimal context length for their applications. ",
|
| 1243 |
+
"bbox": [
|
| 1244 |
+
174,
|
| 1245 |
+
825,
|
| 1246 |
+
825,
|
| 1247 |
+
924
|
| 1248 |
+
],
|
| 1249 |
+
"page_idx": 12
|
| 1250 |
+
},
|
| 1251 |
+
{
|
| 1252 |
+
"type": "table",
|
| 1253 |
+
"img_path": "images/a38f223cd360e8c339bfa063b5b080f33a766a09182290c8b09297dd679b19b6.jpg",
|
| 1254 |
+
"table_caption": [
|
| 1255 |
+
"Table 6: Comparison with zero-shot CLIP on robustness to distribution shift using different vision backbones. $M$ : CoOp’s context length. "
|
| 1256 |
+
],
|
| 1257 |
+
"table_footnote": [],
|
| 1258 |
+
"table_body": "<table><tr><td rowspan=\"3\">Method</td><td rowspan=\"2\">Source</td><td colspan=\"4\">Target</td></tr><tr><td>ImageNetV2</td><td>ImageNet-Sketch</td><td>ImageNet-A</td><td>ImageNet-R</td></tr><tr><td colspan=\"7\">ResNet-50</td></tr><tr><td>Zero-Shot CLIP</td><td>55.41</td><td>48.08</td><td>31.67</td><td>18.63</td><td>53.45</td></tr><tr><td>CLIP + CoOp (M=16)</td><td>60.46</td><td>52.17</td><td>31.14</td><td>19.62</td><td>53.31</td></tr><tr><td>CLIP + CoOp (M=4)</td><td>60.85</td><td>53.02</td><td>32.99</td><td>20.69</td><td>55.57</td></tr><tr><td colspan=\"7\">ResNet-101</td></tr><tr><td>Zero-Shot CLIP</td><td>58.72</td><td>51.57</td><td>36.73</td><td>25.11</td><td>62.15</td></tr><tr><td>CLIP + CoOp (M=16)</td><td>64.39</td><td>55.00</td><td>37.54</td><td>26.31</td><td>61.73</td></tr><tr><td>CLIP + CoOp (M=4)</td><td>63.99</td><td>55.45</td><td>39.11</td><td>27.25</td><td>63.58</td></tr><tr><td colspan=\"7\">ViT-B/32</td></tr><tr><td>Zero-Shot CLIP</td><td>59.88</td><td>51.98</td><td>39.22</td><td>27.44</td><td>63.79</td></tr><tr><td>CLIP + CoOp (M=16)</td><td>64.92</td><td>55.90</td><td>38.79</td><td>28.77</td><td>63.45</td></tr><tr><td>CLIP + CoOp (M=4)</td><td>64.88</td><td>56.21</td><td>40.17</td><td>29.64</td><td>64.60</td></tr><tr><td colspan=\"7\">ViT-B/16</td></tr><tr><td>Zero-Shot CLIP</td><td>64.71</td><td>58.71</td><td>44.77</td><td>43.37</td><td>72.49</td></tr><tr><td>CLIP + CoOp (M=16)</td><td>70.13</td><td>62.23</td><td>44.82</td><td>44.30</td><td>72.98</td></tr><tr><td>CLIP + CoOp (M=4)</td><td>70.11</td><td>62.66</td><td>46.27</td><td>45.46</td><td>74.33</td></tr></table>",
|
| 1259 |
+
"bbox": [
|
| 1260 |
+
196,
|
| 1261 |
+
140,
|
| 1262 |
+
802,
|
| 1263 |
+
409
|
| 1264 |
+
],
|
| 1265 |
+
"page_idx": 13
|
| 1266 |
+
},
|
| 1267 |
+
{
|
| 1268 |
+
"type": "table",
|
| 1269 |
+
"img_path": "images/8a618c10a2faf56a44d88a15af2bc6916c72e5eaf21bc92b15f2fe9c5a78a98f.jpg",
|
| 1270 |
+
"table_caption": [
|
| 1271 |
+
"Table 7: Comparison with prompt engineering and prompt ensembling on ImageNet using different vision backbones. "
|
| 1272 |
+
],
|
| 1273 |
+
"table_footnote": [],
|
| 1274 |
+
"table_body": "<table><tr><td>Method</td><td>ResNet-50</td><td>ResNet-101</td><td>ViT-B/32</td><td>ViT-B/16</td></tr><tr><td>Prompt engineering</td><td>55.41</td><td>58.72</td><td>59.88</td><td>64.71</td></tr><tr><td>Prompt ensembling</td><td>57.81</td><td>60.49</td><td>62.01</td><td>67.31</td></tr><tr><td>CoOp</td><td>60.46</td><td>64.39</td><td>64.92</td><td>70.13</td></tr></table>",
|
| 1275 |
+
"bbox": [
|
| 1276 |
+
251,
|
| 1277 |
+
462,
|
| 1278 |
+
745,
|
| 1279 |
+
529
|
| 1280 |
+
],
|
| 1281 |
+
"page_idx": 13
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"type": "text",
|
| 1285 |
+
"text": "B.4 VISION BACKBONES",
|
| 1286 |
+
"text_level": 1,
|
| 1287 |
+
"bbox": [
|
| 1288 |
+
174,
|
| 1289 |
+
554,
|
| 1290 |
+
361,
|
| 1291 |
+
568
|
| 1292 |
+
],
|
| 1293 |
+
"page_idx": 13
|
| 1294 |
+
},
|
| 1295 |
+
{
|
| 1296 |
+
"type": "text",
|
| 1297 |
+
"text": "Figure 7 provides the detailed per-dataset results for various vision backbones. The more advanced the backbone, the better the performance. ",
|
| 1298 |
+
"bbox": [
|
| 1299 |
+
171,
|
| 1300 |
+
579,
|
| 1301 |
+
825,
|
| 1302 |
+
609
|
| 1303 |
+
],
|
| 1304 |
+
"page_idx": 13
|
| 1305 |
+
},
|
| 1306 |
+
{
|
| 1307 |
+
"type": "image",
|
| 1308 |
+
"img_path": "images/7bd083dec703f717d056c6706bed8b2e87c884e465d2647b4592bc7ac32f4f49.jpg",
|
| 1309 |
+
"image_caption": [
|
| 1310 |
+
"Figure 6: Dataset-specific results of using different context lengths for $\\mathrm { C o O p }$ "
|
| 1311 |
+
],
|
| 1312 |
+
"image_footnote": [],
|
| 1313 |
+
"bbox": [
|
| 1314 |
+
171,
|
| 1315 |
+
229,
|
| 1316 |
+
821,
|
| 1317 |
+
765
|
| 1318 |
+
],
|
| 1319 |
+
"page_idx": 14
|
| 1320 |
+
},
|
| 1321 |
+
{
|
| 1322 |
+
"type": "image",
|
| 1323 |
+
"img_path": "images/e376adee1533442b59570843ade271ec904fdfa6b43683581ebb382ccfbce32e.jpg",
|
| 1324 |
+
"image_caption": [
|
| 1325 |
+
"Figure 7: Results on the 11 datasets using a variety of vision backbones. "
|
| 1326 |
+
],
|
| 1327 |
+
"image_footnote": [],
|
| 1328 |
+
"bbox": [
|
| 1329 |
+
171,
|
| 1330 |
+
236,
|
| 1331 |
+
828,
|
| 1332 |
+
761
|
| 1333 |
+
],
|
| 1334 |
+
"page_idx": 15
|
| 1335 |
+
}
|
| 1336 |
+
]
|
parse/dev/OgCcfc1m0TO/OgCcfc1m0TO_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/QYvFUlF19n/QYvFUlF19n_content_list.json
ADDED
|
@@ -0,0 +1,1365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "In-Context Learning Creates Task Vectors ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
278,
|
| 8 |
+
90,
|
| 9 |
+
719,
|
| 10 |
+
110
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Roee Hendel Tel Aviv University roee.hendel@mail.tau.ac.il ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
119,
|
| 19 |
+
142,
|
| 20 |
+
381,
|
| 21 |
+
192
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Mor Geva Google DeepMind pipek@google.com ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
418,
|
| 30 |
+
142,
|
| 31 |
+
583,
|
| 32 |
+
192
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Amir Globerson Tel Aviv University, Google gamir@tauex.tau.ac.il ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
635,
|
| 41 |
+
142,
|
| 42 |
+
865,
|
| 43 |
+
193
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Abstract ",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
263,
|
| 53 |
+
253,
|
| 54 |
+
339,
|
| 55 |
+
268
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "In-context learning (ICL) in Large Language Models (LLMs) has emerged as a powerful new learning paradigm. However, its underlying mechanism is still not well understood. In particular, it is challenging to map it to the “standard” machine learning framework, where one uses a training set $S$ to find a best-fitting function $f ( x )$ in some hypothesis class. Here we make progress on this problem by showing that the functions learned by ICL often have a very simple structure: they correspond to the transformer LLM whose only inputs are the query $x$ and a single “task vector” calculated from the training set. Thus, ICL can be seen as compressing $S$ into a single task vector $\\pmb \\theta ( S )$ and then using this task vector to modulate the transformer to produce the output. We support the above claim via comprehensive experiments across a range of models and tasks.1 ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
144,
|
| 64 |
+
282,
|
| 65 |
+
457,
|
| 66 |
+
552
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "1 Introduction ",
|
| 73 |
+
"text_level": 1,
|
| 74 |
+
"bbox": [
|
| 75 |
+
117,
|
| 76 |
+
581,
|
| 77 |
+
257,
|
| 78 |
+
598
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Large language models have improved dramatically over the last several years. One striking property of these models is that they can learn new rules from very few demonstrations. For instance, a model can be prompted with the input $\\ddot { \\bf \\Phi } ^ { \\prime \\prime } A p p l e R e d _ { \\mathrm { \\tiny { + } } }$ , Lime Green, $C o r n ^ { \\prime \\prime }$ and produce the output “Yellow”. The model has thus learned a mapping based on just two examples, which it can apply correctly to new examples. This capability, referred to as InContext Learning (ICL), has been used extensively, yielding impressive empirical results (Brown et al., 2020; Liu et al., 2023; Dong et al., 2022). ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
115,
|
| 87 |
+
609,
|
| 88 |
+
485,
|
| 89 |
+
800
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Given this success, it is natural to ask what is the underlying mechanism behind ICL. Namely, how does the model internally use the demonstrations $S$ and the query $x$ to produce the required output? Here we approach this question by utilizing the concept of a hypothesis class from statistical learning theory (Shalev-Shwartz and Ben-David, 2014). In the learning-theoretic formulation, one typically considers a hypothesis class $\\mathcal { H }$ , where every element of $\\mathcal { H }$ is a function $h ( x ; \\pmb \\theta )$ , operating on the input $x$ , and specified by a parameter vector $\\pmb \\theta$ . For example, if $\\boldsymbol { x } \\in \\mathbb { R } ^ { d }$ then the class $\\mathcal { H }$ could be the set of linear classifiers, defined by a coefficient vector $\\pmb \\theta$ as $h ( x ; \\pmb \\theta ) = \\pmb \\theta \\cdot \\boldsymbol x$ . Learning algorithms seek an element $h \\in \\mathcal H$ that fits the training set well. This is known as Empirical Risk Minimization. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
117,
|
| 98 |
+
803,
|
| 99 |
+
485,
|
| 100 |
+
882
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "image",
|
| 106 |
+
"img_path": "images/645ad2893396bf235956d739c40ce7fdf8197fb850d5f7dc50426d8f35556bd3.jpg",
|
| 107 |
+
"image_caption": [
|
| 108 |
+
"Figure 1: ICL as learning in a Hypothesis Class. In ICL, one provides an LLM with a prompt including demonstrations $S$ of some task, and a query $x$ . The model generates the output for $x$ (here “Yellow”). We show that the underlying process can be broken down into two parts: $\\mathcal { A }$ , a “learning algorithm” (marked in blue), computes a query-agnostic vector $\\pmb \\theta ( S )$ , which we view as a parameter of a function in a hypothesis class. The second part, denoted by $f$ and marked in yellow, is the application of the rule defined by $\\pmb \\theta$ on the query $x$ , without direct dependence on $S$ . "
|
| 109 |
+
],
|
| 110 |
+
"image_footnote": [],
|
| 111 |
+
"bbox": [
|
| 112 |
+
521,
|
| 113 |
+
254,
|
| 114 |
+
877,
|
| 115 |
+
510
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "",
|
| 122 |
+
"bbox": [
|
| 123 |
+
512,
|
| 124 |
+
693,
|
| 125 |
+
882,
|
| 126 |
+
868
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 0
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "It is unclear whether ICL operates in such a way because the prediction is performed via $T ( [ S , x ] )$ , where $T$ is typically an auto-regressive transformer and $[ S , x ]$ is a concatenation of the tokens in $S$ and $x$ . Thus, in the general case, it can be an arbitrary function that operates on $S$ and $x$ to produce the output. This can include “non-parametric” methods such as nearest-neighbor. Recent work has begun to explore this question. For example, it was shown that when training a transformer from scratch to perform linear regression in context, the emerging learning algorithm is similar to Stochastic Gradient Descent (Akyürek et al., 2022; von Oswald et al., 2022). However, for LLMs performing more complex natural language tasks, it is not at all clear what the hypothesis space may be. ",
|
| 133 |
+
"bbox": [
|
| 134 |
+
510,
|
| 135 |
+
872,
|
| 136 |
+
882,
|
| 137 |
+
920
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 0
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "",
|
| 144 |
+
"bbox": [
|
| 145 |
+
117,
|
| 146 |
+
84,
|
| 147 |
+
485,
|
| 148 |
+
292
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "In this work, we show that on a wide range of tasks, ICL in LLMs can be viewed as working on a very natural hypothesis space. We argue that, given a training set $S$ , the transformer maps it into a “task vector” $\\pmb \\theta ( S )$ that essentially represents the mapping/rule described in $S$ .2 Namely, given the transformer $T$ and a vector $\\pmb \\theta$ , we can construct a new function $f ( x ; \\pmb \\theta )$ that implements the task. The function $f$ is very similar to the original transformer applied to $x$ without demonstrations but instead modulated by $\\pmb \\theta$ (see Fig. 2). ",
|
| 155 |
+
"bbox": [
|
| 156 |
+
115,
|
| 157 |
+
294,
|
| 158 |
+
487,
|
| 159 |
+
470
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Our view is also related to soft prompts (Lester et al., 2021), since both approaches modulate the function of the transformer towards a particular task. However, in ICL, task vectors are calculated in the forward pass rather than being fine-tuned. ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
115,
|
| 168 |
+
472,
|
| 169 |
+
485,
|
| 170 |
+
550
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "Our contributions include proposing a hypothesis-class based mechanistic view of ICL, and conducting experiments to validate our view on a range of publicly available LLMs and a diverse set of tasks. Our results further the understanding of ICL and may have practical implications for the efficient adaptation of LLMs to perform specific tasks. ",
|
| 177 |
+
"bbox": [
|
| 178 |
+
115,
|
| 179 |
+
552,
|
| 180 |
+
487,
|
| 181 |
+
680
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "2 A Hypothesis Class View of ICL ",
|
| 188 |
+
"text_level": 1,
|
| 189 |
+
"bbox": [
|
| 190 |
+
117,
|
| 191 |
+
692,
|
| 192 |
+
423,
|
| 193 |
+
708
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 1
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "Motivated by the hypothesis class view of learning theory, our goal is to understand if ICL maps the set of demonstrations $S$ to a function on the query $x$ and how this mapping occurs. Specifically, we seek to see if ICL converts $S$ into $\\pmb \\theta$ - the “parameters” of a function within a certain hypothesis space. Our empirical findings suggest this view is applicable, shedding light on the structure of the hypothesis space on which ICL can be viewed to operate. ",
|
| 200 |
+
"bbox": [
|
| 201 |
+
115,
|
| 202 |
+
718,
|
| 203 |
+
487,
|
| 204 |
+
862
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 1
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "2.1 Theoretical Framework ",
|
| 211 |
+
"text_level": 1,
|
| 212 |
+
"bbox": [
|
| 213 |
+
512,
|
| 214 |
+
84,
|
| 215 |
+
742,
|
| 216 |
+
99
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 1
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "We use $T$ to denote a decoder-only transformer LLM, $S$ to denote the set of demonstrations (i.e. training examples) used as input to ICL, and $x$ to denote the query that ICL is asked to provide an output for. We use $T ( [ S , x ] )$ to denote the output of ICL on the concatenation of $S$ and $x$ . ",
|
| 223 |
+
"bbox": [
|
| 224 |
+
512,
|
| 225 |
+
107,
|
| 226 |
+
882,
|
| 227 |
+
200
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 1
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "To demonstrate that ICL operates within a hypothesis space, we aim to show that its underlying mechanism can be broken down into two parts: ",
|
| 234 |
+
"bbox": [
|
| 235 |
+
510,
|
| 236 |
+
203,
|
| 237 |
+
882,
|
| 238 |
+
249
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 1
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "text",
|
| 244 |
+
"text": "• A “Learning Algorithm” (denoted by $\\mathcal { A }$ ) that maps $S$ into a “task vector” $\\underline { { \\pmb \\theta } }$ , independent of the query $x$ . Given that attention layers can access both $S$ and $x$ , this independence is not trivial. • A “Rule Application” (denoted by $f$ ) which maps the query $x$ to the output, based on $\\theta \\equiv$ $A ( S )$ , without direct dependence on $S$ . Again, this independence is not trivial. ",
|
| 245 |
+
"bbox": [
|
| 246 |
+
510,
|
| 247 |
+
254,
|
| 248 |
+
882,
|
| 249 |
+
384
|
| 250 |
+
],
|
| 251 |
+
"page_idx": 1
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"type": "text",
|
| 255 |
+
"text": "Thus, we consider the following mapping from a set of demonstrations and a query to the predicted output: $T ( [ S , x ] ) = f ( x ; \\mathcal { A } ( S ) )$ . ",
|
| 256 |
+
"bbox": [
|
| 257 |
+
510,
|
| 258 |
+
387,
|
| 259 |
+
882,
|
| 260 |
+
436
|
| 261 |
+
],
|
| 262 |
+
"page_idx": 1
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"type": "text",
|
| 266 |
+
"text": "If we can break down the forward pass of the LLM into the above two components, we can view ICL as operating on the following hypothesis class: $\\mathcal { H } = \\{ f ( \\cdot ; \\pmb { \\theta } ) \\mid \\pmb { \\theta } \\}$ . In the next section we propose an implementation of such a class. ",
|
| 267 |
+
"bbox": [
|
| 268 |
+
512,
|
| 269 |
+
437,
|
| 270 |
+
882,
|
| 271 |
+
516
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 1
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "2.2 A Proposed Hypothesis Class ",
|
| 278 |
+
"text_level": 1,
|
| 279 |
+
"bbox": [
|
| 280 |
+
514,
|
| 281 |
+
527,
|
| 282 |
+
784,
|
| 283 |
+
544
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 1
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "There are many possible realizations of the above framework, that correspond to different choices of $\\mathcal { A }$ and $f$ . We next describe the realization we focus on, which naturally follows from the transformer architecture. We consider an ICL setting as in Fig. 1, where the input ends with a query $x$ (i.e., Corn) followed by an $\\ \" \\ \"$ symbol. As mentioned above, we view learning as composed of two steps: calculating a parameter vector $\\pmb \\theta$ based on the training sample $S$ , and applying the rule defined by this parameter vector to the query $x$ . A presumably simple way for a transformer to do this is for the first $L$ layers of the representations to calculate $\\pmb \\theta$ and then for the remaining layers to take $\\pmb \\theta$ and $x$ as input and produce an output. See Fig. 1. Recall that $S$ and $x$ are accessible to the transformer at any layer, presenting a challenge with our view. ",
|
| 290 |
+
"bbox": [
|
| 291 |
+
512,
|
| 292 |
+
549,
|
| 293 |
+
882,
|
| 294 |
+
822
|
| 295 |
+
],
|
| 296 |
+
"page_idx": 1
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "In the following sections, we address this challenge and present experiments validating our view. Namely, we show that we can isolate our proposed $\\mathcal { A }$ and $f$ in the forward pass of LLMs performing ICL. We also show that the $\\pmb \\theta$ vectors are interpretable and correspond to learned tasks. ",
|
| 301 |
+
"bbox": [
|
| 302 |
+
510,
|
| 303 |
+
825,
|
| 304 |
+
884,
|
| 305 |
+
920
|
| 306 |
+
],
|
| 307 |
+
"page_idx": 1
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"type": "image",
|
| 311 |
+
"img_path": "images/b1462f81480432c61f2ee2f547f166224ca31d7f14231ed0dccd57648a867e5a.jpg",
|
| 312 |
+
"image_caption": [
|
| 313 |
+
"Figure 2: Separating $\\mathcal { A }$ and $f$ . To make $\\pmb { \\theta }$ independent of the query $x$ , we use a dummy query $( x ^ { \\prime } = { \\mathsf { P l u m } } )$ and use the representation of at the $L ^ { t h }$ layer as $\\pmb { \\theta }$ The vector $\\pmb { \\theta }$ is then patched at the same layer during a forward pass of a transformer that only takes $x$ and as input, to prevent the direct dependence of $f$ on $S$ . "
|
| 314 |
+
],
|
| 315 |
+
"image_footnote": [],
|
| 316 |
+
"bbox": [
|
| 317 |
+
119,
|
| 318 |
+
77,
|
| 319 |
+
485,
|
| 320 |
+
326
|
| 321 |
+
],
|
| 322 |
+
"page_idx": 2
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "text",
|
| 326 |
+
"text": "3 Validity of the Hypothesis Class View ",
|
| 327 |
+
"text_level": 1,
|
| 328 |
+
"bbox": [
|
| 329 |
+
117,
|
| 330 |
+
428,
|
| 331 |
+
468,
|
| 332 |
+
444
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 2
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "We first show that separating the forward pass into the two distinct components $\\mathcal { A }$ and $f$ , defined in $\\ S 2 . 2$ , maintains the high accuracy of ICL. ",
|
| 339 |
+
"bbox": [
|
| 340 |
+
115,
|
| 341 |
+
455,
|
| 342 |
+
487,
|
| 343 |
+
501
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 2
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "3.1 Separating $\\mathcal { A }$ and $f$ ",
|
| 350 |
+
"text_level": 1,
|
| 351 |
+
"bbox": [
|
| 352 |
+
117,
|
| 353 |
+
514,
|
| 354 |
+
314,
|
| 355 |
+
530
|
| 356 |
+
],
|
| 357 |
+
"page_idx": 2
|
| 358 |
+
},
|
| 359 |
+
{
|
| 360 |
+
"type": "text",
|
| 361 |
+
"text": "We face some challenges in a regular forward pass: first, the initial $L$ layers that correspond to $\\mathcal { A }$ , updating the representations of to create $\\pmb \\theta$ , can attend to the query $x$ . Thus, they may depend on $x$ creating an unwanted dependence of $\\pmb \\theta$ on $x$ . Second, the remaining layers that correspond to $f$ , may directly access $S$ , instead of using only $x$ and $\\pmb \\theta$ . ",
|
| 362 |
+
"bbox": [
|
| 363 |
+
115,
|
| 364 |
+
537,
|
| 365 |
+
487,
|
| 366 |
+
648
|
| 367 |
+
],
|
| 368 |
+
"page_idx": 2
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "text",
|
| 372 |
+
"text": "We propose the following procedure to tackle these challenges: to solve the first problem, we introduce a “dummy query” $x ^ { \\prime }$ and calculate the representations of using that query. We use the representation of after the first $L$ layers, calculated using $x ^ { \\prime }$ , as the vector $\\pmb \\theta$ (as demonstrated on the left side of Fig. 2). An alternative was to block attention to $x$ , but it led to poor performance. To solve the second problem of calculating $f ( x , \\pmb \\theta )$ without allowing direct dependence on $S$ , we perform a forward pass of the transformer only on $x$ and ,3 and “patch” the $\\pmb \\theta$ we previously extracted at the $L$ th layer of the (right side of Fig. 2).4 ",
|
| 373 |
+
"bbox": [
|
| 374 |
+
115,
|
| 375 |
+
650,
|
| 376 |
+
487,
|
| 377 |
+
858
|
| 378 |
+
],
|
| 379 |
+
"page_idx": 2
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "table",
|
| 383 |
+
"img_path": "images/1bb730054f7b40d1663b8874799161203b37f76a462f09d58ae76dadb9f09f5d.jpg",
|
| 384 |
+
"table_caption": [
|
| 385 |
+
"Table 1: A representative subset of the tasks used in the study with input output examples. "
|
| 386 |
+
],
|
| 387 |
+
"table_footnote": [],
|
| 388 |
+
"table_body": "<table><tr><td>Category</td><td>Task</td><td>Example</td></tr><tr><td rowspan=\"4\">Algorithmic</td><td>Next letter</td><td>a→b</td></tr><tr><td>List first</td><td>a,b,c→a</td></tr><tr><td>List last</td><td>a,b,c →c</td></tr><tr><td>To uppercase</td><td>a→A</td></tr><tr><td>Translation</td><td>French to English Spanish to English</td><td>bonjour → hello hola →hello</td></tr><tr><td rowspan=\"2\">Linguistic</td><td>Present to gerund</td><td>go →going</td></tr><tr><td>Singular to plural Antonyms</td><td>cat →cats</td></tr><tr><td rowspan=\"2\">Knowledge</td><td></td><td>happy →sad</td></tr><tr><td>Country to Capital Person to Language</td><td>France→Paris Macron→French</td></tr></table>",
|
| 389 |
+
"bbox": [
|
| 390 |
+
510,
|
| 391 |
+
79,
|
| 392 |
+
880,
|
| 393 |
+
256
|
| 394 |
+
],
|
| 395 |
+
"page_idx": 2
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "image",
|
| 399 |
+
"img_path": "images/c6f675e3dbab78d89a3314b4c7a5d2f23804ac76676d51ae39fa9061982665d6.jpg",
|
| 400 |
+
"image_caption": [
|
| 401 |
+
"Figure 3: Accuracy for each choice of the intermediate layer $L$ , averaged across all tasks. Solid lines show average values, and shaded areas standard deviations. "
|
| 402 |
+
],
|
| 403 |
+
"image_footnote": [],
|
| 404 |
+
"bbox": [
|
| 405 |
+
515,
|
| 406 |
+
294,
|
| 407 |
+
878,
|
| 408 |
+
438
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 2
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "3.2 Tasks and Models ",
|
| 415 |
+
"text_level": 1,
|
| 416 |
+
"bbox": [
|
| 417 |
+
512,
|
| 418 |
+
502,
|
| 419 |
+
695,
|
| 420 |
+
517
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 2
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "Tasks We consider a diverse set of 18 tasks across 4 categories: algorithmic, translation, linguistic, and factual knowledge. For simplicity, we limit ourselves to single-token outputs. A representative subset of the tasks is described in Tab. 1. A complete detailed table, as well as more information regarding the data, are provided in $\\ S$ A.1. ",
|
| 427 |
+
"bbox": [
|
| 428 |
+
512,
|
| 429 |
+
524,
|
| 430 |
+
882,
|
| 431 |
+
636
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 2
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "Models We use multiple open LLMs: LLaMA 7B, 13B, and 30B (Touvron et al., 2023), GPT-J 6B (Wang and Komatsuzaki, 2021), and Pythia 2.8B, 6.9B, and 12B (Biderman et al., 2023). ",
|
| 438 |
+
"bbox": [
|
| 439 |
+
510,
|
| 440 |
+
645,
|
| 441 |
+
882,
|
| 442 |
+
709
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 2
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "3.3 Finding $L$ ",
|
| 449 |
+
"text_level": 1,
|
| 450 |
+
"bbox": [
|
| 451 |
+
512,
|
| 452 |
+
721,
|
| 453 |
+
633,
|
| 454 |
+
737
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 2
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "The mechanism we described in $\\ S 2 . 2$ has a free parameter - the layer $L$ where $\\mathcal { A }$ ends and $f$ begins. We use the proposed $( A , f )$ implementation for different choices of $L$ and evaluate the accuracy on a development set to find the best layer. ",
|
| 461 |
+
"bbox": [
|
| 462 |
+
510,
|
| 463 |
+
743,
|
| 464 |
+
882,
|
| 465 |
+
822
|
| 466 |
+
],
|
| 467 |
+
"page_idx": 2
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"text": "Fig. 3 shows the accuracy on the development set, for different choices of $L$ . We focus here on the LLaMA models and include the rest in $\\ S \\ A . 2$ . Interestingly, all models exhibit a performance peak at a similar intermediate layer, irrespective of their parameters and layer count differences. ",
|
| 472 |
+
"bbox": [
|
| 473 |
+
510,
|
| 474 |
+
825,
|
| 475 |
+
884,
|
| 476 |
+
920
|
| 477 |
+
],
|
| 478 |
+
"page_idx": 2
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "image",
|
| 482 |
+
"img_path": "images/847c071ab6adb42cfbd83fd0170d00dee6623acafea24be5c5c688ce18666b9a.jpg",
|
| 483 |
+
"image_caption": [
|
| 484 |
+
"Figure 4: Average accuracy across all tasks for each model, using each of the three procedures: Baseline, Regular and Hypothesis. "
|
| 485 |
+
],
|
| 486 |
+
"image_footnote": [],
|
| 487 |
+
"bbox": [
|
| 488 |
+
112,
|
| 489 |
+
85,
|
| 490 |
+
457,
|
| 491 |
+
330
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 3
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "3.4 Accuracy of Hypothesis Based Prediction ",
|
| 498 |
+
"text_level": 1,
|
| 499 |
+
"bbox": [
|
| 500 |
+
115,
|
| 501 |
+
398,
|
| 502 |
+
484,
|
| 503 |
+
413
|
| 504 |
+
],
|
| 505 |
+
"page_idx": 3
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"type": "text",
|
| 509 |
+
"text": "We next compare the accuracy of the $( A , f )$ mechanism to that of a regular forward pass performing ICL. For each model and task, we evaluate the following three procedures: ",
|
| 510 |
+
"bbox": [
|
| 511 |
+
115,
|
| 512 |
+
419,
|
| 513 |
+
487,
|
| 514 |
+
482
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 3
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "• Regular An application of the LLM to the demonstrations $S$ and query $x$ . Namely $T ( [ S , x ] )$ , as in regular ICL. • Hypothesis Our proposed procedure from $\\ S \\ 3 . 1$ where $\\mathcal { A }$ generates $\\pmb \\theta$ using a dummy $x ^ { \\prime }$ , and $f ( \\cdot ; \\pmb \\theta )$ is applied to $x$ by running the transformer on $[ x , ]$ with $\\pmb \\theta$ patched at layer $L$ of . • Baseline A forward pass of the LLM only on $x$ without demonstrations $S$ . That is, $T ( [ x , ] )$ . This is the same as the application of $f$ from our separated procedure, but without patching $\\pmb \\theta$ . ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
115,
|
| 523 |
+
487,
|
| 524 |
+
487,
|
| 525 |
+
668
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 3
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "Fig. 4 shows the average accuracy across all tasks of these 3 procedures, for each model. Full results are reported in Tab. 6 in $\\ S \\ A . 2$ . Across all models, our procedure maintains around $80 \\%$ of the accuracy of regular ICL, while the baseline reaches only $10 \\%$ . This shows that our proposed separation to $\\mathcal { A }$ and $f$ provides a good empirical approximation of the process underlying ICL. ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
115,
|
| 534 |
+
671,
|
| 535 |
+
485,
|
| 536 |
+
800
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 3
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "4 Robustness of Task Vectors ",
|
| 543 |
+
"text_level": 1,
|
| 544 |
+
"bbox": [
|
| 545 |
+
117,
|
| 546 |
+
813,
|
| 547 |
+
381,
|
| 548 |
+
829
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 3
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "text",
|
| 554 |
+
"text": "In our setting, $\\pmb \\theta$ is derived from $S$ and a dummy query $x ^ { \\prime }$ . It is natural to examine the robustness of $\\pmb \\theta$ to variations in these inputs. Intuitively, if it represents the task, it should remain stable across different $S$ and $x ^ { \\prime }$ values. ",
|
| 555 |
+
"bbox": [
|
| 556 |
+
115,
|
| 557 |
+
840,
|
| 558 |
+
487,
|
| 559 |
+
919
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 3
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "image",
|
| 565 |
+
"img_path": "images/6821e9ba0f7e01f6926fe37ad014dbd9f980ec99ed3351edc3f0b06cb13137ef.jpg",
|
| 566 |
+
"image_caption": [
|
| 567 |
+
"Figure 5: A t-SNE plot of task vectors. A 2D t-SNE plot visualizing 50 task vectors for each task, each generated from a different choice of $S$ and $x ^ { \\prime }$ using LLaMA 7B. Points are color-coded according to the task. Each task can be seen to form its own distinct cluster. "
|
| 568 |
+
],
|
| 569 |
+
"image_footnote": [],
|
| 570 |
+
"bbox": [
|
| 571 |
+
521,
|
| 572 |
+
86,
|
| 573 |
+
873,
|
| 574 |
+
328
|
| 575 |
+
],
|
| 576 |
+
"page_idx": 3
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"type": "text",
|
| 580 |
+
"text": "To test this, we use LLaMA 7B to generate 50 task vectors per task with varied $S$ and $x ^ { \\prime }$ and conduct two analyses. ",
|
| 581 |
+
"bbox": [
|
| 582 |
+
512,
|
| 583 |
+
424,
|
| 584 |
+
882,
|
| 585 |
+
470
|
| 586 |
+
],
|
| 587 |
+
"page_idx": 3
|
| 588 |
+
},
|
| 589 |
+
{
|
| 590 |
+
"type": "text",
|
| 591 |
+
"text": "Geometry of $\\pmb \\theta$ A t-SNE dimensionality reduction (Fig. 5) reveals that the task vectors form distinct clusters, each containing task vectors of a single task. Fig. 9 further shows proximity between tasks of the same category, strengthening the idea that they encapsulate task understanding. ",
|
| 592 |
+
"bbox": [
|
| 593 |
+
510,
|
| 594 |
+
482,
|
| 595 |
+
882,
|
| 596 |
+
579
|
| 597 |
+
],
|
| 598 |
+
"page_idx": 3
|
| 599 |
+
},
|
| 600 |
+
{
|
| 601 |
+
"type": "text",
|
| 602 |
+
"text": "Variability of $\\pmb \\theta$ Fig. 8 shows histograms of distances within and across tasks. It can be seen that vectors within the same task are closer than those between different tasks, indicating that $\\pmb \\theta$ is stable within tasks and not highly influenced by $x ^ { \\prime }$ or $S$ . ",
|
| 603 |
+
"bbox": [
|
| 604 |
+
510,
|
| 605 |
+
589,
|
| 606 |
+
882,
|
| 607 |
+
670
|
| 608 |
+
],
|
| 609 |
+
"page_idx": 3
|
| 610 |
+
},
|
| 611 |
+
{
|
| 612 |
+
"type": "text",
|
| 613 |
+
"text": "5 Dominance of $\\pmb \\theta$ Patching ",
|
| 614 |
+
"text_level": 1,
|
| 615 |
+
"bbox": [
|
| 616 |
+
512,
|
| 617 |
+
683,
|
| 618 |
+
761,
|
| 619 |
+
701
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 3
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "In $\\ S 3$ we prevented $f$ from directly accessing $S$ . However, in a regular forward pass during ICL, the last token can attend to $S$ . Here we verify that even in this case, $f$ mainly uses the task vector $\\pmb \\theta$ , without directly accessing the demonstrations $S$ . To this end, we use a pair of tasks, $A$ and $B$ , sharing the input space but differing on the output. We first use a “Regular” forward pass, where we provide the model with demonstrations $S$ for task $A$ (denoted $S _ { A }$ ), to verify the model can perform this task using ICL. Then, we do a “Conflicting” forward pass, still providing $S _ { A }$ , while injecting $\\pmb { \\theta } _ { B }$ . For more details, refer to Fig. 6 in $\\ S \\mathrm { A } . 1$ . ",
|
| 626 |
+
"bbox": [
|
| 627 |
+
510,
|
| 628 |
+
711,
|
| 629 |
+
884,
|
| 630 |
+
920
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 3
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "table",
|
| 636 |
+
"img_path": "images/b4eccfa83657ea88b3d969f0ba13dccf82b0f7b4020c81b4538a52671a5ab59a.jpg",
|
| 637 |
+
"table_caption": [
|
| 638 |
+
"Table 2: Conflicting tasks experiment results. The model’s accuracy on the relevant task ( $A$ in “Regular” and $B$ in “Conflicting”) is displayed for both scenarios. "
|
| 639 |
+
],
|
| 640 |
+
"table_footnote": [],
|
| 641 |
+
"table_body": "<table><tr><td>Task A(S)</td><td>Task B (0)</td><td>Regular Task A</td><td>Conflicting Task B</td></tr><tr><td>Next Letter</td><td>To Upper</td><td>0.92</td><td>0.77</td></tr><tr><td>List Last</td><td>List First</td><td>0.95</td><td>0.78</td></tr><tr><td>Present to Past</td><td> to Gerund</td><td>0.96</td><td>0.95</td></tr></table>",
|
| 642 |
+
"bbox": [
|
| 643 |
+
122,
|
| 644 |
+
82,
|
| 645 |
+
480,
|
| 646 |
+
159
|
| 647 |
+
],
|
| 648 |
+
"page_idx": 4
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"type": "text",
|
| 652 |
+
"text": "In Tab.2, the “Regular” forward pass shows high accuracy on task $A$ $( 9 0 \\% + )$ , as anticipated. However, the “Conflicting” forward pass yields high accuracy on task $B$ , corresponding to the injected task vector $\\pmb \\theta$ . This implies that the model mainly relies on $\\pmb \\theta$ , largely disregarding the demonstrations $S$ for task $A$ . We note that the accuracy on task $B$ is slightly low, likely consistent with the performance dip seen in Fig. 6, and potentially further affected by the presence of $S$ . ",
|
| 653 |
+
"bbox": [
|
| 654 |
+
117,
|
| 655 |
+
222,
|
| 656 |
+
487,
|
| 657 |
+
381
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 4
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "text",
|
| 663 |
+
"text": "6 Interpreting $\\pmb \\theta$ ",
|
| 664 |
+
"text_level": 1,
|
| 665 |
+
"bbox": [
|
| 666 |
+
117,
|
| 667 |
+
397,
|
| 668 |
+
272,
|
| 669 |
+
413
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 4
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "The learned vector $\\pmb \\theta$ intuitively captures information about the task demonstrated by $S$ . Here we provide evidence supporting this interpretation. Since $\\pmb \\theta$ is an intermediate hidden state of the transformer, we can employ a vocabulary projection method (nostalgebraist, 2020; Dar et al., 2022). Namely, we examine the top tokens in the distribution over the vocabulary induced by the hidden state. ",
|
| 676 |
+
"bbox": [
|
| 677 |
+
115,
|
| 678 |
+
425,
|
| 679 |
+
487,
|
| 680 |
+
552
|
| 681 |
+
],
|
| 682 |
+
"page_idx": 4
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "Tab. 3 shows the top tokens for three tasks for LLaMA 13B (more models and tasks are provided in Tab. 7 in $\\ S \\mathbf { A }$ ). In multiple cases, we observe tokens that directly describe the task. Importantly, these terms never explicitly appeared in the context. For example in the task of translation from French to English, we observe tokens such as “English” and “translate”. This supports our view that $\\pmb \\theta$ carries significant, non-trivial semantic information about the task. ",
|
| 687 |
+
"bbox": [
|
| 688 |
+
115,
|
| 689 |
+
556,
|
| 690 |
+
487,
|
| 691 |
+
714
|
| 692 |
+
],
|
| 693 |
+
"page_idx": 4
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "text",
|
| 697 |
+
"text": "7 Related Work ",
|
| 698 |
+
"text_level": 1,
|
| 699 |
+
"bbox": [
|
| 700 |
+
117,
|
| 701 |
+
731,
|
| 702 |
+
268,
|
| 703 |
+
746
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 4
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "Emergence of ICL A key question with ICL is how it emerges as a capability from pre-training the LLMs. Levine et al. (2022) provides results in this direction that highlight the importance of training data structure. Xie et al. use probabilistic analysis and model pre-training data using Hidden Markov Models to theoretically explain the emergence of ICL, while Chan et al. (2022) empirically explore the effect of several distributional properties of the pre-training data. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
115,
|
| 712 |
+
759,
|
| 713 |
+
485,
|
| 714 |
+
919
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 4
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "table",
|
| 720 |
+
"img_path": "images/ee0a7109723b43cbc28b446274c4839e8a7f49801ca0d7da8ab7cb5efe2c7cfd.jpg",
|
| 721 |
+
"table_caption": [
|
| 722 |
+
""
|
| 723 |
+
],
|
| 724 |
+
"table_footnote": [
|
| 725 |
+
"Table 3: The top 10 tokens in the distribution induced by the task vector, for one task per category. "
|
| 726 |
+
],
|
| 727 |
+
"table_body": "<table><tr><td>Task</td><td>Toptokensinthetaskvectorprojection</td></tr><tr><td>Previous Letter</td><td>e,y,unknown,alphabet,preceding,c Cad,zA,dit,bill</td></tr><tr><td>FR-EN</td><td>Mason, gram,immer,Santi,latin, utter,Span,Conc,English,equivalent</td></tr><tr><td>Present Gerund</td><td>cin, thats,gram, Lorenzo, cian, Simple to Isabel,uld,berto,partici,Sah</td></tr><tr><td>Country Capital</td><td>Paris, its,capital, central, Conc, cities, administrative, Los, Madrid, London</td></tr></table>",
|
| 728 |
+
"bbox": [
|
| 729 |
+
514,
|
| 730 |
+
85,
|
| 731 |
+
880,
|
| 732 |
+
246
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 4
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "Meta-Learning in Transformers Studies by Akyürek et al. (2022); von Oswald et al. (2022); Garg et al. focus on the meta-learning capabilities of transformers. They typically train models from scratch on elementary tasks such as linear regression, drawing theoretical parallels with algorithms like Gradient Descent and demonstrating how transformers could implement them. A key assumption of these works is a known parameter space within which gradient descent operates. Our work focuses on identifying such a parameter space for LLMs. ",
|
| 739 |
+
"bbox": [
|
| 740 |
+
512,
|
| 741 |
+
298,
|
| 742 |
+
882,
|
| 743 |
+
475
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 4
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "ICL in LLMs Olsson et al. (2022) identify “induction heads” in transformers as a likely main mechanism of ICL. Dai et al. (2022) provide empirical evidence for the connection of ICL to Gradient Descent in LLMs, focusing on classification tasks. Concurrent work by Merullo et al. (2023) also explores a phenomenon similar to the task vectors we study here, where a single vector can encode learned functions. Our findings are complementary to theirs, and future work could explore the relationship between the two more closely. ",
|
| 750 |
+
"bbox": [
|
| 751 |
+
512,
|
| 752 |
+
495,
|
| 753 |
+
884,
|
| 754 |
+
670
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 4
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "text",
|
| 760 |
+
"text": "8 Conclusions ",
|
| 761 |
+
"text_level": 1,
|
| 762 |
+
"bbox": [
|
| 763 |
+
512,
|
| 764 |
+
694,
|
| 765 |
+
647,
|
| 766 |
+
709
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 4
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "text",
|
| 772 |
+
"text": "Through this exploration of ICL in LLMs, we have shed light on a new perspective of ICL learning mechanisms. We have revealed a simple and elegant structure: ICL functions by compressing a given training set into a single task vector, which then guides the transformer to generate appropriate outputs given queries. Our work provides a stepping stone towards understanding how LLMs perform ICL. In light of our findings, future work could focus on understanding how the task vector is constructed as well as how it is used to calculate the output. ",
|
| 773 |
+
"bbox": [
|
| 774 |
+
512,
|
| 775 |
+
727,
|
| 776 |
+
882,
|
| 777 |
+
919
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 4
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "Limitations ",
|
| 784 |
+
"text_level": 1,
|
| 785 |
+
"bbox": [
|
| 786 |
+
117,
|
| 787 |
+
84,
|
| 788 |
+
216,
|
| 789 |
+
99
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 5
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "text",
|
| 795 |
+
"text": "We study relatively simple tasks, whereas ICL can learn to perform more complex tasks, such as solving arithmetic reasoning problems. It remains to be seen if and how the mechanisms we observe here will translate to these cases. E.g., our approach focuses on cases where a single task vector suffices, while more complex ICL cases may require more elaborate parameterization. We also focus on tasks where the output is a single token, while some other tasks require multi-token outputs. ",
|
| 796 |
+
"bbox": [
|
| 797 |
+
117,
|
| 798 |
+
109,
|
| 799 |
+
485,
|
| 800 |
+
268
|
| 801 |
+
],
|
| 802 |
+
"page_idx": 5
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"type": "text",
|
| 806 |
+
"text": "Finally, as noted above, we do not provide a mechanistic explanation for how the task vector is formed or how it is used. Namely, we do not explain how the transformer performs these calculations using its parameters. ",
|
| 807 |
+
"bbox": [
|
| 808 |
+
117,
|
| 809 |
+
271,
|
| 810 |
+
485,
|
| 811 |
+
349
|
| 812 |
+
],
|
| 813 |
+
"page_idx": 5
|
| 814 |
+
},
|
| 815 |
+
{
|
| 816 |
+
"type": "text",
|
| 817 |
+
"text": "Acknowledgements ",
|
| 818 |
+
"text_level": 1,
|
| 819 |
+
"bbox": [
|
| 820 |
+
117,
|
| 821 |
+
361,
|
| 822 |
+
284,
|
| 823 |
+
376
|
| 824 |
+
],
|
| 825 |
+
"page_idx": 5
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"type": "text",
|
| 829 |
+
"text": "This project is funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation program (grant ERC HOLI 819080). ",
|
| 830 |
+
"bbox": [
|
| 831 |
+
117,
|
| 832 |
+
386,
|
| 833 |
+
487,
|
| 834 |
+
448
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 5
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "text",
|
| 840 |
+
"text": "References ",
|
| 841 |
+
"text_level": 1,
|
| 842 |
+
"bbox": [
|
| 843 |
+
117,
|
| 844 |
+
475,
|
| 845 |
+
211,
|
| 846 |
+
491
|
| 847 |
+
],
|
| 848 |
+
"page_idx": 5
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"type": "text",
|
| 852 |
+
"text": "Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou. 2022. What learning algorithm is in-context learning? investigations with linear models. arXiv preprint arXiv:2211.15661. ",
|
| 853 |
+
"bbox": [
|
| 854 |
+
117,
|
| 855 |
+
498,
|
| 856 |
+
487,
|
| 857 |
+
549
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 5
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "text",
|
| 863 |
+
"text": "Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. 2023. Pythia: A suite for analyzing large language models across training and scaling. arXiv preprint arXiv:2304.01373. ",
|
| 864 |
+
"bbox": [
|
| 865 |
+
117,
|
| 866 |
+
558,
|
| 867 |
+
485,
|
| 868 |
+
637
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 5
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "text",
|
| 874 |
+
"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. ",
|
| 875 |
+
"bbox": [
|
| 876 |
+
117,
|
| 877 |
+
645,
|
| 878 |
+
485,
|
| 879 |
+
722
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 5
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "text",
|
| 885 |
+
"text": "Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022. A survey for in-context learning. arXiv preprint arXiv:2301.00234. ",
|
| 886 |
+
"bbox": [
|
| 887 |
+
510,
|
| 888 |
+
85,
|
| 889 |
+
882,
|
| 890 |
+
139
|
| 891 |
+
],
|
| 892 |
+
"page_idx": 5
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"type": "text",
|
| 896 |
+
"text": "Shivam Garg, Dimitris Tsipras, Percy Liang, and Gregory Valiant. What can transformers learn incontext? a case study of simple function classes. In Advances in Neural Information Processing Systems. ",
|
| 897 |
+
"bbox": [
|
| 898 |
+
512,
|
| 899 |
+
147,
|
| 900 |
+
882,
|
| 901 |
+
199
|
| 902 |
+
],
|
| 903 |
+
"page_idx": 5
|
| 904 |
+
},
|
| 905 |
+
{
|
| 906 |
+
"type": "text",
|
| 907 |
+
"text": "Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. 2023. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations. ",
|
| 908 |
+
"bbox": [
|
| 909 |
+
510,
|
| 910 |
+
209,
|
| 911 |
+
882,
|
| 912 |
+
274
|
| 913 |
+
],
|
| 914 |
+
"page_idx": 5
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"type": "text",
|
| 918 |
+
"text": "Stephanie Chan, Adam Santoro, Andrew Lampinen, Jane Wang, Aaditya Singh, Pierre Richemond, James McClelland, and Felix Hill. 2022. Data distributional properties drive emergent in-context learning in transformers. Advances in Neural Information Processing Systems, 35:18878–18891. ",
|
| 919 |
+
"bbox": [
|
| 920 |
+
117,
|
| 921 |
+
732,
|
| 922 |
+
485,
|
| 923 |
+
810
|
| 924 |
+
],
|
| 925 |
+
"page_idx": 5
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"type": "text",
|
| 929 |
+
"text": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. arXiv preprint arXiv:2104.08691. ",
|
| 930 |
+
"bbox": [
|
| 931 |
+
512,
|
| 932 |
+
285,
|
| 933 |
+
882,
|
| 934 |
+
323
|
| 935 |
+
],
|
| 936 |
+
"page_idx": 5
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"type": "text",
|
| 940 |
+
"text": "Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Zhifang Sui, and Furu Wei. 2022. Why can gpt learn in-context? language models secretly perform gradient descent as meta optimizers. arXiv preprint arXiv:2212.10559. ",
|
| 941 |
+
"bbox": [
|
| 942 |
+
115,
|
| 943 |
+
819,
|
| 944 |
+
487,
|
| 945 |
+
871
|
| 946 |
+
],
|
| 947 |
+
"page_idx": 5
|
| 948 |
+
},
|
| 949 |
+
{
|
| 950 |
+
"type": "text",
|
| 951 |
+
"text": "Yoav Levine, Noam Wies, Daniel Jannai, Dan Navon, Yedid Hoshen, and Amnon Shashua. 2022. The inductive bias of in-context learning: Rethinking pretraining example design. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net. ",
|
| 952 |
+
"bbox": [
|
| 953 |
+
512,
|
| 954 |
+
332,
|
| 955 |
+
882,
|
| 956 |
+
411
|
| 957 |
+
],
|
| 958 |
+
"page_idx": 5
|
| 959 |
+
},
|
| 960 |
+
{
|
| 961 |
+
"type": "text",
|
| 962 |
+
"text": "Guy Dar, Mor Geva, Ankit Gupta, and Jonathan Berant. 2022. Analyzing transformers in embedding space. arXiv preprint arXiv:2209.02535. ",
|
| 963 |
+
"bbox": [
|
| 964 |
+
115,
|
| 965 |
+
879,
|
| 966 |
+
489,
|
| 967 |
+
919
|
| 968 |
+
],
|
| 969 |
+
"page_idx": 5
|
| 970 |
+
},
|
| 971 |
+
{
|
| 972 |
+
"type": "text",
|
| 973 |
+
"text": "Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9):1–35. ",
|
| 974 |
+
"bbox": [
|
| 975 |
+
510,
|
| 976 |
+
420,
|
| 977 |
+
884,
|
| 978 |
+
487
|
| 979 |
+
],
|
| 980 |
+
"page_idx": 5
|
| 981 |
+
},
|
| 982 |
+
{
|
| 983 |
+
"type": "text",
|
| 984 |
+
"text": "Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in gpt. Advances in Neural Information Processing Systems, 35:17359–17372. ",
|
| 985 |
+
"bbox": [
|
| 986 |
+
510,
|
| 987 |
+
495,
|
| 988 |
+
882,
|
| 989 |
+
548
|
| 990 |
+
],
|
| 991 |
+
"page_idx": 5
|
| 992 |
+
},
|
| 993 |
+
{
|
| 994 |
+
"type": "text",
|
| 995 |
+
"text": "Jack Merullo, Carsten Eickhoff, and Ellie Pavlick. 2023. Language models implement simple word2vec-style vector arithmetic. arXiv preprint arXiv:2305.16130. ",
|
| 996 |
+
"bbox": [
|
| 997 |
+
510,
|
| 998 |
+
557,
|
| 999 |
+
882,
|
| 1000 |
+
596
|
| 1001 |
+
],
|
| 1002 |
+
"page_idx": 5
|
| 1003 |
+
},
|
| 1004 |
+
{
|
| 1005 |
+
"type": "text",
|
| 1006 |
+
"text": "nostalgebraist. 2020. interpreting gpt: the logit lens. LessWrong. ",
|
| 1007 |
+
"bbox": [
|
| 1008 |
+
510,
|
| 1009 |
+
606,
|
| 1010 |
+
882,
|
| 1011 |
+
632
|
| 1012 |
+
],
|
| 1013 |
+
"page_idx": 5
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"type": "text",
|
| 1017 |
+
"text": "Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. 2022. In-context learning and induction heads. arXiv preprint arXiv:2209.11895. ",
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
510,
|
| 1020 |
+
642,
|
| 1021 |
+
882,
|
| 1022 |
+
707
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 5
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "Shai Shalev-Shwartz and Shai Ben-David. 2014. Understanding machine learning: From theory to algorithms. Cambridge university press. ",
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
510,
|
| 1031 |
+
717,
|
| 1032 |
+
882,
|
| 1033 |
+
756
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 5
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "text",
|
| 1039 |
+
"text": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971. ",
|
| 1040 |
+
"bbox": [
|
| 1041 |
+
512,
|
| 1042 |
+
765,
|
| 1043 |
+
882,
|
| 1044 |
+
843
|
| 1045 |
+
],
|
| 1046 |
+
"page_idx": 5
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"type": "text",
|
| 1050 |
+
"text": "Johannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento, Alexander Mordvintsev, Andrey Zhmoginov, and Max Vladymyrov. 2022. Transformers learn in-context by gradient descent. arXiv preprint arXiv:2212.07677. ",
|
| 1051 |
+
"bbox": [
|
| 1052 |
+
510,
|
| 1053 |
+
853,
|
| 1054 |
+
882,
|
| 1055 |
+
919
|
| 1056 |
+
],
|
| 1057 |
+
"page_idx": 5
|
| 1058 |
+
},
|
| 1059 |
+
{
|
| 1060 |
+
"type": "text",
|
| 1061 |
+
"text": "Ben Wang and Aran Komatsuzaki. 2021. GPT-J6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoflolz/ mesh-transformer-jax. ",
|
| 1062 |
+
"bbox": [
|
| 1063 |
+
115,
|
| 1064 |
+
85,
|
| 1065 |
+
487,
|
| 1066 |
+
139
|
| 1067 |
+
],
|
| 1068 |
+
"page_idx": 6
|
| 1069 |
+
},
|
| 1070 |
+
{
|
| 1071 |
+
"type": "text",
|
| 1072 |
+
"text": "Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. In International Conference on Learning Representations. ",
|
| 1073 |
+
"bbox": [
|
| 1074 |
+
115,
|
| 1075 |
+
148,
|
| 1076 |
+
489,
|
| 1077 |
+
200
|
| 1078 |
+
],
|
| 1079 |
+
"page_idx": 6
|
| 1080 |
+
},
|
| 1081 |
+
{
|
| 1082 |
+
"type": "text",
|
| 1083 |
+
"text": "A Appendix ",
|
| 1084 |
+
"text_level": 1,
|
| 1085 |
+
"bbox": [
|
| 1086 |
+
117,
|
| 1087 |
+
84,
|
| 1088 |
+
236,
|
| 1089 |
+
99
|
| 1090 |
+
],
|
| 1091 |
+
"page_idx": 7
|
| 1092 |
+
},
|
| 1093 |
+
{
|
| 1094 |
+
"type": "text",
|
| 1095 |
+
"text": "Here we provide additional details and results. ",
|
| 1096 |
+
"bbox": [
|
| 1097 |
+
119,
|
| 1098 |
+
109,
|
| 1099 |
+
458,
|
| 1100 |
+
123
|
| 1101 |
+
],
|
| 1102 |
+
"page_idx": 7
|
| 1103 |
+
},
|
| 1104 |
+
{
|
| 1105 |
+
"type": "text",
|
| 1106 |
+
"text": "A.1 Additional Details ",
|
| 1107 |
+
"text_level": 1,
|
| 1108 |
+
"bbox": [
|
| 1109 |
+
117,
|
| 1110 |
+
134,
|
| 1111 |
+
307,
|
| 1112 |
+
149
|
| 1113 |
+
],
|
| 1114 |
+
"page_idx": 7
|
| 1115 |
+
},
|
| 1116 |
+
{
|
| 1117 |
+
"type": "text",
|
| 1118 |
+
"text": "Full Task Descriptions Our study covers 18 tasks in 4 categories: Algorithmic, Translation, Linguistic and Knowledge. A detailed description of all tasks is provided in Tab. 5. ",
|
| 1119 |
+
"bbox": [
|
| 1120 |
+
115,
|
| 1121 |
+
155,
|
| 1122 |
+
487,
|
| 1123 |
+
218
|
| 1124 |
+
],
|
| 1125 |
+
"page_idx": 7
|
| 1126 |
+
},
|
| 1127 |
+
{
|
| 1128 |
+
"type": "text",
|
| 1129 |
+
"text": "Model Details More details on the models used in the study are provided in Tab. 4. ",
|
| 1130 |
+
"bbox": [
|
| 1131 |
+
115,
|
| 1132 |
+
227,
|
| 1133 |
+
487,
|
| 1134 |
+
258
|
| 1135 |
+
],
|
| 1136 |
+
"page_idx": 7
|
| 1137 |
+
},
|
| 1138 |
+
{
|
| 1139 |
+
"type": "text",
|
| 1140 |
+
"text": "Task Data Here we detail the sources of the data for each task. The accompanying GitHub repository contains the data itself as well as the code used to create it. ",
|
| 1141 |
+
"bbox": [
|
| 1142 |
+
115,
|
| 1143 |
+
267,
|
| 1144 |
+
487,
|
| 1145 |
+
330
|
| 1146 |
+
],
|
| 1147 |
+
"page_idx": 7
|
| 1148 |
+
},
|
| 1149 |
+
{
|
| 1150 |
+
"type": "text",
|
| 1151 |
+
"text": "• Algorithmic: Generated programatically. • Translation: For each language pair, the most frequent words in the source language are first retrieved from https://github.com/frekwencja/ most-common-words-multilingual and are then translated to the destination language using the open-source package nltk. • Linguistic: The data for the tenses tasks is parsed from https://github.com/Drulac/ English-Verbs-Conjugates. The data for the plural-singular task is taken from https://github.com/sindresorhus/ irregular-plurals. Finally, the data for the antonyms task is taken from https://github.com/SuzanaK/english_ synonyms_antonyms_list. • Knowledge Data for the knowledge tasks is taken from the counterfactual dataset introduced in (Meng et al., 2022). ",
|
| 1152 |
+
"bbox": [
|
| 1153 |
+
136,
|
| 1154 |
+
336,
|
| 1155 |
+
487,
|
| 1156 |
+
699
|
| 1157 |
+
],
|
| 1158 |
+
"page_idx": 7
|
| 1159 |
+
},
|
| 1160 |
+
{
|
| 1161 |
+
"type": "text",
|
| 1162 |
+
"text": "Conflicting Tasks Experiment In Fig. 6, we provide more details and a visualization of the experiment described in $\\ S 5$ . ",
|
| 1163 |
+
"bbox": [
|
| 1164 |
+
115,
|
| 1165 |
+
706,
|
| 1166 |
+
489,
|
| 1167 |
+
752
|
| 1168 |
+
],
|
| 1169 |
+
"page_idx": 7
|
| 1170 |
+
},
|
| 1171 |
+
{
|
| 1172 |
+
"type": "text",
|
| 1173 |
+
"text": "A.2 Additional Results ",
|
| 1174 |
+
"text_level": 1,
|
| 1175 |
+
"bbox": [
|
| 1176 |
+
117,
|
| 1177 |
+
763,
|
| 1178 |
+
310,
|
| 1179 |
+
777
|
| 1180 |
+
],
|
| 1181 |
+
"page_idx": 7
|
| 1182 |
+
},
|
| 1183 |
+
{
|
| 1184 |
+
"type": "text",
|
| 1185 |
+
"text": "Finding $\\mathcal { A }$ and $f$ Fig. 7 shows results similar to Fig. 3, but for different models. It is interesting to observe that the curves are similar across differentsized models. ",
|
| 1186 |
+
"bbox": [
|
| 1187 |
+
115,
|
| 1188 |
+
784,
|
| 1189 |
+
487,
|
| 1190 |
+
846
|
| 1191 |
+
],
|
| 1192 |
+
"page_idx": 7
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"type": "text",
|
| 1196 |
+
"text": "Detailed results for Fig. 4. Fig. 4 presented results for our $( A , f )$ hypothesis-based approach, averaged across tasks. Table. 6 provides these results for all the specific tasks considered. ",
|
| 1197 |
+
"bbox": [
|
| 1198 |
+
115,
|
| 1199 |
+
856,
|
| 1200 |
+
489,
|
| 1201 |
+
919
|
| 1202 |
+
],
|
| 1203 |
+
"page_idx": 7
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"type": "text",
|
| 1207 |
+
"text": "Dependence of $\\mathcal { A }$ on $x$ Fig. 9 and Fig. 8 provide more results on the geometry of the $\\pmb \\theta$ vectors (see main text for discussion). ",
|
| 1208 |
+
"bbox": [
|
| 1209 |
+
510,
|
| 1210 |
+
84,
|
| 1211 |
+
882,
|
| 1212 |
+
131
|
| 1213 |
+
],
|
| 1214 |
+
"page_idx": 7
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"type": "text",
|
| 1218 |
+
"text": "Inspecting Task Vectors Tab. 7 is an expanded version of Tab. 3, providing more vocabulary projections of $\\pmb \\theta$ for additional tasks and on multiple LLMs. ",
|
| 1219 |
+
"bbox": [
|
| 1220 |
+
510,
|
| 1221 |
+
142,
|
| 1222 |
+
882,
|
| 1223 |
+
204
|
| 1224 |
+
],
|
| 1225 |
+
"page_idx": 7
|
| 1226 |
+
},
|
| 1227 |
+
{
|
| 1228 |
+
"type": "table",
|
| 1229 |
+
"img_path": "images/bdeaad8203ce988fb04b7b1fa00c0a3a69b6d320e632d6b62d6b721429a257ce.jpg",
|
| 1230 |
+
"table_caption": [],
|
| 1231 |
+
"table_footnote": [
|
| 1232 |
+
"Table 4: The models used in the study, with architectural information. "
|
| 1233 |
+
],
|
| 1234 |
+
"table_body": "<table><tr><td>Model</td><td>Parameters</td><td>Dimension</td><td>Layers</td><td>Heads</td></tr><tr><td rowspan=\"3\">LLaMA</td><td>7B</td><td>4096</td><td>32</td><td>32</td></tr><tr><td>13B</td><td>5120</td><td>40</td><td>40</td></tr><tr><td>30B</td><td>6656</td><td>60</td><td>52</td></tr><tr><td>GPT-J</td><td>6B</td><td>4096</td><td>28</td><td>16</td></tr><tr><td rowspan=\"3\">Pythia</td><td>2.8B</td><td>2560</td><td>32</td><td>32</td></tr><tr><td>6.9B</td><td>4096</td><td>32</td><td>32</td></tr><tr><td>12B</td><td>5120</td><td>36</td><td>40</td></tr></table>",
|
| 1235 |
+
"bbox": [
|
| 1236 |
+
510,
|
| 1237 |
+
214,
|
| 1238 |
+
892,
|
| 1239 |
+
334
|
| 1240 |
+
],
|
| 1241 |
+
"page_idx": 7
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"type": "table",
|
| 1245 |
+
"img_path": "images/6fee6ad387cdb3cf71d97132ddf83c76f92012f6eb2723e7910aaf6e86c34f11.jpg",
|
| 1246 |
+
"table_caption": [],
|
| 1247 |
+
"table_footnote": [
|
| 1248 |
+
"Table 5: The tasks used in the study with input output examples. "
|
| 1249 |
+
],
|
| 1250 |
+
"table_body": "<table><tr><td>Category</td><td>Task</td><td>Description</td><td>Example</td></tr><tr><td></td><td>List first</td><td>Givena list of letters,output the first letter</td><td>a,b,c→a</td></tr><tr><td rowspan=\"4\">Algorithmic</td><td>List last</td><td>Given a list of letters,output the last letter</td><td>a,b,c →c</td></tr><tr><td>Next letter</td><td>Given a letter in the English alphabet,output the next letter</td><td>a→b</td></tr><tr><td>Previous letter</td><td>Given a letter in the English alphabet,output theb → a previous letter</td><td></td></tr><tr><td>To lowercase</td><td>Given an uppercase letter, output the correspond-A -a ing lowercase letter</td><td></td></tr><tr><td></td><td>To uppercase</td><td>Given a lowercase letter,output the correspond-a→A ing uppercase letter</td><td></td></tr><tr><td rowspan=\"4\">Translation</td><td>French to English</td><td>Given a word in French, translate to English</td><td>bonjour → hello</td></tr><tr><td>Spanish to English English to Spanish</td><td>Given a word in Spanish,translate to English</td><td>hola →hello</td></tr><tr><td></td><td>Given a word in English, translate to Spanish</td><td>hola → hello</td></tr><tr><td>English to Spanish</td><td>Given a word in English,translate to French</td><td>hola →hello</td></tr><tr><td rowspan=\"4\">Linguistic</td><td>Present to gerund</td><td>given an English verb in present simple tense, output the corresponding gerund form</td><td>go →going</td></tr><tr><td>Present to past</td><td>given an English verb in present simple tense, output the corresponding verb in past simple</td><td>go →went</td></tr><tr><td>Singular to plural</td><td>Given an English noun in singular form,output the plural form</td><td>catcats</td></tr><tr><td>Antonyms</td><td>Given an English adjective,output an antonym</td><td>happy →sad</td></tr><tr><td rowspan=\"4\">Knowledge</td><td>Country to Capital</td><td>Given a name of a country,output the name of the capital city</td><td>France→Paris</td></tr><tr><td>Person to Language</td><td>Given a name of a person,output their nativeMacron →French language</td><td></td></tr><tr><td>Location to Continent</td><td>Given a name of a person,output their nativeParis → Europe</td><td></td></tr><tr><td>Religion</td><td>language Given a name of a location or a person,outputMuhammad -→ Islam the associated religion</td><td></td></tr></table>",
|
| 1251 |
+
"bbox": [
|
| 1252 |
+
146,
|
| 1253 |
+
300,
|
| 1254 |
+
853,
|
| 1255 |
+
689
|
| 1256 |
+
],
|
| 1257 |
+
"page_idx": 8
|
| 1258 |
+
},
|
| 1259 |
+
{
|
| 1260 |
+
"type": "image",
|
| 1261 |
+
"img_path": "images/f824870186321922b342056cd83c71cd3bccc028307f243e4e7b838e13c6fb75.jpg",
|
| 1262 |
+
"image_caption": [
|
| 1263 |
+
"Figure 6: Conflicting tasks experiment. In the “Regular” scenario (top), the model is simply provided with demonstrations $S _ { A }$ for Task $A$ (e.g. outputting the previous letter in the alphabet). In the “Conflicting” scenario (bottom), the model is still provided with demonstrations for Task $A$ , but we inject a task vector $\\pmb \\theta ( S _ { B } )$ from a conflicting Task $B$ (e.g. outputting the next letter in the alphabet). "
|
| 1264 |
+
],
|
| 1265 |
+
"image_footnote": [],
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
240,
|
| 1268 |
+
117,
|
| 1269 |
+
695,
|
| 1270 |
+
833
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 9
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "image",
|
| 1276 |
+
"img_path": "images/bbfb4ad92653bb93ae8b724a4a2b9f92ecd1de158f69e4a2944644ece0ec01db.jpg",
|
| 1277 |
+
"image_caption": [
|
| 1278 |
+
"Figure 7: Accuracy for each choice of $L$ (the intermediate layer where the task vector is injected), averaged across all tasks. The solid line represents the average value, and the shaded area depicts the standard deviation. "
|
| 1279 |
+
],
|
| 1280 |
+
"image_footnote": [],
|
| 1281 |
+
"bbox": [
|
| 1282 |
+
122,
|
| 1283 |
+
338,
|
| 1284 |
+
877,
|
| 1285 |
+
637
|
| 1286 |
+
],
|
| 1287 |
+
"page_idx": 10
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"type": "table",
|
| 1291 |
+
"img_path": "images/80db02fde068955eb02751e1be67742a920fb1aada85aeb9ca9e0c84336b8087.jpg",
|
| 1292 |
+
"table_caption": [
|
| 1293 |
+
"Table 6: Complete results for Figure 4, reported for all tasks and models. "
|
| 1294 |
+
],
|
| 1295 |
+
"table_footnote": [],
|
| 1296 |
+
"table_body": "<table><tr><td colspan=\"3\"></td><td rowspan=\"2\">Baseline</td><td rowspan=\"2\">Hypothesis</td><td rowspan=\"2\">Regular</td></tr><tr><td>Model</td><td>method Task type</td><td>Task name</td></tr><tr><td>GPT-J 6B</td><td>Algorithmic</td><td></td><td>0.30</td><td>0.74</td><td>0.98</td></tr><tr><td rowspan=\"20\"></td><td rowspan=\"4\"></td><td>List first List last</td><td>0.24</td><td>0.64</td><td>1.00</td></tr><tr><td>Next letter</td><td>0.16</td><td>1.00</td><td>0.86</td></tr><tr><td>Prev letter</td><td>0.10</td><td>0.36</td><td>0.42</td></tr><tr><td>To lower</td><td>0.00</td><td>0.46</td><td>1.00</td></tr><tr><td rowspan=\"5\">Knowledge</td><td></td><td>0.00</td><td>0.94</td><td>1.00</td></tr><tr><td>To upper</td><td>0.19</td><td>0.72</td><td>0.80</td></tr><tr><td>Country capital</td><td>0.03</td><td>0.58</td><td>0.70</td></tr><tr><td>Location continent</td><td>0.09</td><td>0.68</td><td>0.78</td></tr><tr><td>Location religion</td><td>0.02</td><td>0.82</td><td>0.82</td></tr><tr><td rowspan=\"5\">Linguistic</td><td>Person language</td><td>0.43</td><td>0.68</td><td>0.78</td></tr><tr><td>Antonyms</td><td></td><td>0.90</td><td>0.98</td></tr><tr><td>Plural singular</td><td>0.08 0.00</td><td>0.88</td><td></td></tr><tr><td>Present simple gerund</td><td></td><td>0.76</td><td>0.98 0.96</td></tr><tr><td>Present simple past simple</td><td>0.02 0.14</td><td></td><td>0.56</td></tr><tr><td rowspan=\"8\">LLaMA 13B</td><td>Translation En es En fr</td><td>0.16</td><td>0.34 0.36</td><td>0.54</td></tr><tr><td>Es en</td><td></td><td>0.70</td><td>0.74</td></tr><tr><td>Fr en</td><td>0.06 0.13</td><td>0.66</td><td>0.76</td></tr><tr><td>Algorithmic List first</td><td>0.77</td><td>1.00</td><td>1.00</td></tr><tr><td>List last</td><td>0.07</td><td>0.70</td><td>0.92</td></tr><tr><td>Next letter</td><td>0.31</td><td>1.00</td><td>0.94</td></tr><tr><td>Prev letter</td><td>0.05</td><td>0.34</td><td>0.50</td></tr><tr><td rowspan=\"5\">Knowledge</td><td>To lower</td><td>0.00</td><td>0.94</td><td>1.00</td></tr><tr><td>To upper</td><td>0.00</td><td>0.94</td><td>1.00</td></tr><tr><td>Country capital</td><td>0.17</td><td>0.84</td><td>0.86</td></tr><tr><td>Location continent</td><td>0.01</td><td>0.70</td><td>0.80</td></tr><tr><td>Location religion</td><td>0.10</td><td>0.74</td><td>0.84</td></tr><tr><td rowspan=\"8\"></td><td></td><td></td><td>0.76</td><td>0.88</td></tr><tr><td rowspan=\"3\">Linguistic</td><td>Person language</td><td>0.02 0.19</td><td>0.74</td><td>0.80</td></tr><tr><td>Antonyms Plural singular</td><td>0.24</td><td>0.84</td><td>0.88</td></tr><tr><td>Present simple gerund</td><td>0.00</td><td>0.96</td><td>0.96</td></tr><tr><td rowspan=\"4\">Translation</td><td>Present simple past simple</td><td>0.01</td><td>1.00</td><td>0.98</td></tr><tr><td>En es</td><td>0.05</td><td>0.78</td><td>0.82</td></tr><tr><td>En fr</td><td>0.15</td><td>0.70</td><td>0.84</td></tr><tr><td>Es en</td><td>0.29</td><td>0.76</td><td>0.88</td></tr><tr><td rowspan=\"6\">LLaMA30B</td><td>Fren</td><td>0.25</td><td>0.54</td><td>0.72</td></tr><tr><td>Algorithmic List first</td><td>0.96</td><td>0.98</td><td>1.00</td></tr><tr><td>List last</td><td>0.02</td><td>0.64</td><td>0.96</td></tr><tr><td>Next letter</td><td>0.30</td><td>0.98</td><td>0.96</td></tr><tr><td>Prev letter</td><td>0.02</td><td>0.56</td><td>0.80</td></tr><tr><td>To lower</td><td>0.00</td><td>1.00</td><td>1.00</td></tr><tr><td rowspan=\"8\"></td><td>To upper</td><td>0.00</td><td>0.90</td><td>1.00</td></tr><tr><td>Knowledge Country capital</td><td>0.27</td><td>0.72</td><td>0.88</td></tr><tr><td>Location religion</td><td>Location continent</td><td>0.01 0.70 0.05</td><td>0.86</td></tr><tr><td>Person language</td><td></td><td>0.70 0.72</td><td>0.88</td></tr><tr><td>Linguistic</td><td></td><td>0.01 0.76</td><td>0.90</td></tr><tr><td></td><td>Antonyms</td><td>0.37 0.84</td><td>0.82</td></tr><tr><td></td><td>Plural singular</td><td>0.21</td><td>0.90</td></tr><tr><td rowspan=\"5\">Translation</td><td> Present simple gerund</td><td>0.00</td><td>0.76</td><td>0.98</td></tr><tr><td>Present simple past simple En es</td><td>0.02</td><td>0.98</td><td>1.00</td></tr><tr><td></td><td>0.07</td><td>0.74 0.80</td><td>0.78</td></tr><tr><td>En fr</td><td>0.10</td><td></td><td>0.86</td></tr><tr><td>Es en</td><td>0.24</td><td>0.70</td><td>0.88</td></tr><tr><td rowspan=\"8\">LLaMA7B</td><td rowspan=\"8\">Algorithmic</td><td>Fren</td><td>0.20</td><td>0.62</td><td>0.78</td></tr><tr><td>List first</td><td>0.87</td><td>0.98</td><td>1.00</td></tr><tr><td>List last Next letter</td><td>0.03 0.03</td><td>1.00 0.94</td><td>1.00 0.88</td></tr><tr><td>Prev letter</td><td>0.04</td><td>0.52</td><td>0.58</td></tr><tr><td>To lower</td><td>0.00</td><td>0.74</td><td>1.00</td></tr><tr><td>Toupper</td><td>0.00</td><td>0.60</td><td>1.00</td></tr><tr><td>Knowledge</td><td></td><td>0.82</td><td>0.86</td></tr><tr><td>Country capital</td><td>0.28</td><td></td><td></td></tr><tr><td rowspan=\"5\">Linguistic</td><td>Location continent</td><td>0.02</td><td>0.68</td><td>0.72</td></tr><tr><td>Location religion</td><td>0.12</td><td>0.84</td><td>0.94</td></tr><tr><td>Person language</td><td>0.02</td><td>0.68</td><td>0.78</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Antonyms Plural singular</td><td>0.33 0.15</td><td>0.74 0.84</td><td>0.76 0.88</td></tr></table>",
|
| 1297 |
+
"bbox": [
|
| 1298 |
+
200,
|
| 1299 |
+
84,
|
| 1300 |
+
803,
|
| 1301 |
+
917
|
| 1302 |
+
],
|
| 1303 |
+
"page_idx": 11
|
| 1304 |
+
},
|
| 1305 |
+
{
|
| 1306 |
+
"type": "table",
|
| 1307 |
+
"img_path": "images/a4fdb411b028e536903735f015ecc53a68fd78eff2f3b9d9583230426a5e9ce9.jpg",
|
| 1308 |
+
"table_caption": [],
|
| 1309 |
+
"table_footnote": [],
|
| 1310 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">Task type</td><td rowspan=\"2\">method Task name</td><td rowspan=\"2\">Baseline</td><td rowspan=\"2\">Hypothesis</td><td rowspan=\"2\">Regular</td></tr><tr><td></td></tr><tr><td rowspan=\"12\">Pythia 12B</td><td></td><td>Present simple gerund</td><td>0.00</td><td>0.74</td><td>0.90</td></tr><tr><td></td><td>Present simple past simple</td><td>0.02</td><td>0.94</td><td>0.92</td></tr><tr><td>Translation</td><td>En es</td><td>0.07</td><td>0.78</td><td>0.76</td></tr><tr><td>En fr</td><td></td><td>0.04</td><td>0.78</td><td>0.88</td></tr><tr><td>Es en</td><td></td><td>0.21</td><td>0.68</td><td>0.92</td></tr><tr><td>Fr en</td><td></td><td>0.15</td><td>0.66</td><td>0.70</td></tr><tr><td>Algorithmic</td><td></td><td>0.53</td><td>0.98</td><td>0.96</td></tr><tr><td></td><td>List first List last</td><td>0.09</td><td>0.98</td><td>1.00</td></tr><tr><td></td><td>Next letter</td><td>0.15</td><td>0.96</td><td>0.76</td></tr><tr><td></td><td>Prev letter</td><td>0.00</td><td>0.24</td><td>0.42</td></tr><tr><td></td><td>To lower</td><td>0.02</td><td>1.00</td><td>1.00</td></tr><tr><td></td><td>To upper</td><td>0.00</td><td>0.98</td><td>1.00</td></tr><tr><td></td><td>Knowledge Country capital</td><td></td><td>0.19</td><td>0.58 0.82</td></tr><tr><td></td><td>Location continent</td><td>0.01</td><td>0.68</td><td>0.80</td></tr><tr><td></td><td>Location religion</td><td>0.07</td><td>0.64</td><td>0.78</td></tr><tr><td>Linguistic</td><td>Person language</td><td>0.01</td><td>0.72</td><td>0.86</td></tr><tr><td></td><td>Antonyms</td><td>0.34</td><td>0.72</td><td>0.74</td></tr><tr><td></td><td>Plural singular</td><td>0.18</td><td>0.80</td><td>0.84</td></tr><tr><td></td><td></td><td>Present simple gerund</td><td>0.00</td><td>0.86 0.96</td></tr><tr><td rowspan=\"4\"></td><td>Translation En es</td><td>Present simple past simple 0.01 0.10</td><td>0.76 0.44</td><td>0.94</td></tr><tr><td>En fr</td><td></td><td>0.48</td><td>0.72 0.54</td></tr><tr><td>Es en</td><td>0.16</td><td>0.68</td><td>0.80</td></tr><tr><td>Fr en</td><td>0.05 0.14</td><td>0.68</td><td>0.80</td></tr><tr><td>Pythia 2.8B</td><td>Algorithmic List first</td><td></td><td></td><td></td></tr><tr><td rowspan=\"6\"></td><td rowspan=\"5\"></td><td></td><td>0.69 0.06</td><td>0.96 0.98</td><td>1.00 1.00</td></tr><tr><td>List last Next letter</td><td>0.42</td><td>0.86</td><td>0.90</td></tr><tr><td></td><td></td><td>0.22</td><td>0.48</td></tr><tr><td>Prev letter To lower</td><td>0.01</td><td>1.00</td><td>1.00</td></tr><tr><td>To upper</td><td>0.00</td><td>1.00</td><td>1.00</td></tr><tr><td>Knowledge</td><td>Country capital</td><td>0.00 0.18</td><td>0.70</td><td></td></tr><tr><td rowspan=\"12\"></td><td></td><td>Location continent</td><td>0.01</td><td>0.62</td><td>0.76 0.72</td></tr><tr><td></td><td>Location religion</td><td>0.08</td><td>0.76</td><td>0.82</td></tr><tr><td>Linguistic</td><td>Person language</td><td>0.00</td><td>0.82</td><td>0.82</td></tr><tr><td></td><td>Antonyms</td><td>0.37</td><td>0.68</td><td>0.76</td></tr><tr><td></td><td>Plural singular</td><td>0.13</td><td>0.70</td><td>0.78</td></tr><tr><td>Translation</td><td>Present simple gerund</td><td>0.00</td><td>0.86</td><td>0.96</td></tr><tr><td rowspan=\"8\">Pythia 6.9B</td><td></td><td>Present simple past simple 0.03</td><td>0.80</td><td>0.92</td></tr><tr><td>En es</td><td>0.10</td><td>0.26</td><td>0.76</td></tr><tr><td>En fr</td><td>0.16</td><td>0.28</td><td>0.60</td></tr><tr><td>Es en</td><td>0.08</td><td>0.76</td><td>0.82</td></tr><tr><td>Fr en</td><td>0.10</td><td>0.64</td><td>0.82</td></tr><tr><td>Algorithmic List first</td><td>0.43</td><td>1.00</td><td>0.98</td></tr><tr><td>List last Next letter</td><td>0.08</td><td>0.60</td><td>0.98</td></tr><tr><td rowspan=\"5\"></td><td></td><td>0.01</td><td>0.66</td><td>0.86</td></tr><tr><td>Prev letter</td><td>0.04</td><td>0.28</td><td>0.32</td></tr><tr><td>To lower</td><td>0.00</td><td>1.00</td><td>1.00</td></tr><tr><td>To upper</td><td>0.00</td><td>0.94</td><td>1.00</td></tr><tr><td>Country capital</td><td>0.21</td><td>0.76</td><td>0.82</td></tr><tr><td rowspan=\"4\"></td><td>Knowledge</td><td></td><td></td><td></td><td>0.78</td></tr><tr><td></td><td>Location continent Location religion</td><td>0.01 0.10</td><td>0.62 0.80</td><td>0.80</td></tr><tr><td>Person language</td><td></td><td>0.01</td><td>0.76</td><td>0.80</td></tr><tr><td>Linguistic Antonyms</td><td></td><td>0.33</td><td>0.72</td><td>0.74</td></tr><tr><td rowspan=\"5\">Translation</td><td>Plural singular</td><td>0.14</td><td>0.78</td><td></td><td>0.88</td></tr><tr><td></td><td>Present simple gerund</td><td>0.00</td><td>0.82</td><td>0.94</td></tr><tr><td>Present simple past simple</td><td></td><td>0.02</td><td>0.88</td><td>0.96</td></tr><tr><td>En es</td><td></td><td>0.11</td><td>0.46</td><td>0.70</td></tr><tr><td>En fr</td><td></td><td></td><td>0.36</td><td>0.60</td></tr><tr><td rowspan=\"5\"></td><td></td><td></td><td>0.21</td><td></td><td></td></tr><tr><td>Es en</td><td></td><td>0.06</td><td>0.72</td><td>0.82</td></tr><tr><td>Fr en</td><td></td><td>0.14</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>0.66</td><td>0.74</td></tr></table>",
|
| 1311 |
+
"bbox": [
|
| 1312 |
+
200,
|
| 1313 |
+
97,
|
| 1314 |
+
803,
|
| 1315 |
+
845
|
| 1316 |
+
],
|
| 1317 |
+
"page_idx": 12
|
| 1318 |
+
},
|
| 1319 |
+
{
|
| 1320 |
+
"type": "image",
|
| 1321 |
+
"img_path": "images/99de30da4084a43607e1cdbd4997f82613ce2ee103ba3498cb28af7c9b1c42e3.jpg",
|
| 1322 |
+
"image_caption": [
|
| 1323 |
+
"Figure 8: Task Vector Variability. For each task, two histograms are shown: (blue) the distribution of distances between different task vectors of this task, created from different $S$ and $x ^ { \\prime }$ ; (orange) the distribution of distances between task vectors of the task and of other tasks. "
|
| 1324 |
+
],
|
| 1325 |
+
"image_footnote": [],
|
| 1326 |
+
"bbox": [
|
| 1327 |
+
164,
|
| 1328 |
+
178,
|
| 1329 |
+
815,
|
| 1330 |
+
783
|
| 1331 |
+
],
|
| 1332 |
+
"page_idx": 13
|
| 1333 |
+
},
|
| 1334 |
+
{
|
| 1335 |
+
"type": "image",
|
| 1336 |
+
"img_path": "images/33967c8c4670e52e6ca449e3668b7561d518db8447809022ff2e7ddc23f7a45b.jpg",
|
| 1337 |
+
"image_caption": [
|
| 1338 |
+
"Figure 9: A 2D t-SNE plot, visualizing 50 task vectors for each task, each generated from a different choice of $S$ and $x$ using LLaMA 7B. Points are color-coded according to task category, such as algorithmic or translation. Each task can be seen to form its own distinct cluster. The labels provide the full name of the task in the cluster. "
|
| 1339 |
+
],
|
| 1340 |
+
"image_footnote": [],
|
| 1341 |
+
"bbox": [
|
| 1342 |
+
122,
|
| 1343 |
+
263,
|
| 1344 |
+
877,
|
| 1345 |
+
696
|
| 1346 |
+
],
|
| 1347 |
+
"page_idx": 14
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"type": "table",
|
| 1351 |
+
"img_path": "images/69ffafd8b7ed82056df745d9fd85758df242d18e119aba623e7dfee1eaaa1870.jpg",
|
| 1352 |
+
"table_caption": [],
|
| 1353 |
+
"table_footnote": [
|
| 1354 |
+
"Table 7: The top 20 tokens in the distribution induced by the task vector, for one task per category. "
|
| 1355 |
+
],
|
| 1356 |
+
"table_body": "<table><tr><td>Model</td><td>Task</td><td>Tokens</td></tr><tr><td rowspan=\"4\">LLaMA 13B</td><td>Prev Letter</td><td>e,y,unknown,alphabet,preceding,c,Cad,zA,dit,bill,closer,etc, Stuart,aa,null,cin,ads,g,ulo,Ku</td></tr><tr><td>FR-EN</td><td>Mason,gram,immer,Santi,latin,utter, Span,Conc,English, equivalent,engl,Usage,none,pron,ulo,translate,adu,Wiel,grammar, ML</td></tr><tr><td>Present Simple to Gerund</td><td>e cin, thats,gram,Lorenzo,cian,Isabel,uld,berto,partici,Sah, reporting,eing,tc,Roberto,habit,Writing,etc,ientos,ores,Dutch</td></tr><tr><td>Country Capital</td><td>Paris,its,capital,central,Conc,cities,administrative,Los,Madrid, London,San,Isabel,exec,Ar,Bel,Wars,name,capit,Battle,History</td></tr><tr><td rowspan=\"4\">Pythia 12B</td><td>Prev Letter</td><td>r,b,a,d,m,e,p,n,t,u,h,f,c,in,g,s,the,ar,l,×</td></tr><tr><td>FR-EN</td><td>in,and,m,d,a,or,out,the,t,o,so,c,con,have,act,e,s,is, all,to</td></tr><tr><td>to Gerund</td><td>Present Simple in,t,m,r,a,and,the,ing,action,d,o,e,current,simple,te,w, not,have,out,what</td></tr><tr><td></td><td>CountryCapital the,in,a,C,N,B,L,M,T,P,S,R,G,and,F,I,K,U,D,H</td></tr><tr><td rowspan=\"4\">GPT-J 6B</td><td>Prev Letter</td><td>b,c,ν,g,s,name,i,ro,n,j,d,t,A,ai,com,m,ust,test, active,k</td></tr><tr><td>FR-EN</td><td>other,name,the,true,is,social,s,active,time,car,type,money, F,force,a,public,heart,one,ms,life</td></tr><tr><td>Present Simple to Gerund</td><td>getting, storing,working,moving,playing,doing,making,driving, shooting,picking, being, sending,putting,selling,watching, changing,taking,collecting,feeding,reading</td></tr><tr><td>Country Capital</td><td>London,Paris,New,West,Berlin,South,Tokyo,San,Chicago,City, Moscow,Jerusalem, Amsterdam,Philadelphia,East, Madrid,Vienna, Beijing,Mexico,Germany</td></tr></table>",
|
| 1357 |
+
"bbox": [
|
| 1358 |
+
131,
|
| 1359 |
+
299,
|
| 1360 |
+
868,
|
| 1361 |
+
692
|
| 1362 |
+
],
|
| 1363 |
+
"page_idx": 15
|
| 1364 |
+
}
|
| 1365 |
+
]
|
parse/dev/QYvFUlF19n/QYvFUlF19n_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/QYvFUlF19n/QYvFUlF19n_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ.md
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# VECTORMAPNET: END-TO-END VECTORIZED HD MAP LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Autonomous driving systems require a good understanding of surrounding environments, including moving obstacles and static High-Definition (HD) semantic map elements. Existing methods approach the semantic map p·roblem by offline manual annotation, which suffers from serious scalability issues. Recent learning-based methods produce dense rasterized segmentation predictions to construct maps. However, these predictions do not include instance information of individual map elements and require heuristic post-processing to obtain vectorized maps. To tackle these challenges, we introduce an end-to-end vectorized HD map learning pipeline, termed VectorMapNet. VectorMapNet takes onboard sensor observations and predicts a sparse set of polylines in the bird’s-eye view. This pipeline can explicitly model the spatial relation between map elements and generate vectorized maps that are friendly to downstream autonomous driving tasks. Extensive experiments show that VectorMapNet achieve strong map learning performance on both nuScenes and Argoverse2 dataset, surpassing previous state-of-the-art methods by $1 4 . 2 \mathrm { m A P }$ and 14.6mAP. Qualitatively, we also show that VectorMapNet is capable of generating comprehensive maps and capturing more fine-grained details of road geometry. To the best of our knowledge, VectorMapNet is the first work designed towards end-to-end vectorized map learning from onboard observations.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Autonomous driving system requires an understanding of map elements on the road, including lanes, pedestrian crossing, and traffic signs, to navigate the world. Such map elements are typically provided by pre-annotated High-Definition (HD) semantic maps in existing pipelines (Rong et al., 2020). These methods suffer from serious scalability issues as human efforts are heavily involved in annotating HD maps. Recent works (Li et al., 2021; Philion & Fidler, 2020; Roddick & Cipolla, 2020) explore the problem of online HD semantic map learning, where the goal is to use onboard sensors (e.g. LiDARs and cameras) to estimate map elements on-the-fly.
|
| 12 |
+
|
| 13 |
+
Most recent methods (Roddick & Cipolla, 2020; Yang et al., 2018; Philion & Fidler, 2020; Zhou & Krähenbühl, 2022) consider HD semantic map learning as a semantic segmentation problem in bird’s-eye view (BEV), which rasterizes map elements into pixels and assigns each pixel with a class label. This formulation makes it straightforward to leverage fully convolutional networks. However, rasterized maps are not an ideal map representation for autonomous driving, for three reasons. First, rasterized maps lack instance information which is necessary to distinguish map elements with the same class label but different semantics, e.g. left boundary and right boundary. Second, it is hard to enforce spatial consistency within the predicted rasterized maps, e.g. nearby pixels might have contradicted semantics or geometries. Third, 2D rasterized maps are incompatible with most autonomous driving systems which consume instance-level 2D/3D vectorized maps for motion forecasting and planning.
|
| 14 |
+
|
| 15 |
+
To alleviate these issues and produce vectorized outputs, HDMapNet (Li et al., 2021) generates semantic, instance, and directional maps and vectorizes these three maps with a hand-designed post-processing algorithm. However, HDMapNet still relies on the rasterized map predictions, and its heuristic post-processing step complicates the pipeline and restricts the model’s scalability and performance.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: An overview of VectorMapNet. Sensor data is encoded to BEV features in the same coordinate as map elements. VectorMapNet detects the locations of map elements from BEV features by leveraging element queries. The vectorized HD map is built upon a sparse set of polylines that are generated from the detection results. Since polylines have encoded direction information, we can infer semantic information (e.g. drivable area) from the polylines. It worth noting that the drivable area is inferred from several disjoint boundaries and is non-trivial to model as one object.
|
| 19 |
+
|
| 20 |
+
In this paper, we propose an end-to-end vectorized HD map learning model named VectorMapNet, which does not involve a dense set of semantic pixels. Instead, it represents map elements as a set of polylines that are closely related to downstream tasks, e.g. motion forecasting (Gao et al., 2020). Therefore, the map learning problem boils down to predicting a sparse set of polylines from sensor observations in our paper. Specifically, we pose it as a detection problem and leverage set detection and sequence generation methods. First, VectorMapNet aggregates features generated from different modalities (e.g. camera images and LiDAR) into a common BEV feature space. Then, it detects map elements’ locations based on learnable element queries and BEV features. Finally, we decode element queries to polylines for every map elements. An overview of VectorMapNet is shown in Figure 1.
|
| 21 |
+
|
| 22 |
+
Our experiments show that VectorMapNet achieves state-of-the-art performance on the public nuScenes dataset (Caesar et al., 2020) and Argoverse2 (Wilson et al., 2021), outperforming HDMapNet and another baseline by at least $1 4 . 2 \mathrm { m A P } .$ Qualitatively, we find that VectorMapNet builds a more comprehensive map compared to previous works and is capable of capturing fine details, e.g. jagged boundaries. Furthermore, we feed our predicted vectorized HD map into a downstream motion forecasting module, and show the compatibility and effectiveness of the predicted map.
|
| 23 |
+
|
| 24 |
+
To summarize, the contributions of the paper are as follows:
|
| 25 |
+
|
| 26 |
+
• VectorMapNet is an end-to-end HD semantic map learning method. Unlike previous works, we pose map learning as an set prediction problem and directly predict vectorized outputs from sensor observations without requiring map rasterization or post-processing.
|
| 27 |
+
• Jointly modeling the geometry and topological relations of map elements is challenging. We leverage polylines as primitives to model complex map shapes and decompose the model into two
|
| 28 |
+
parts to mitigate this difficulty: a map element detector and a polyline generator.
|
| 29 |
+
• VectorMapNet achieves state-of-the-art HD semantic map learning performance on both nuScenes and Argoverse2 datasets. Qualitative results and downstream evaluations also validate our design choices.
|
| 30 |
+
|
| 31 |
+
# 2 VECTORMAPNET
|
| 32 |
+
|
| 33 |
+
Problem formulation. Similar to HDMapNet (Li et al., 2021), our task is to model map elements in a vectorized form using data from onboard sensors, e.g. RGB cameras and/or LiDARs. These map elements include but are not limited to $:$ Road boundaries, boundaries of roads that split roads and sidewalks. Typically, they are curves with irregular shapes and arbitrary lengths; Lane dividers, boundaries of the lanes in the road. Usually they are straight lines; Pedestrian crossings, regions with white markings where pedestrians can legally cross the road. Usually they are quadrilaterals. These elements are critical for autonomous driving, but these elements typically have diverse geometries and semantic meaning. For example, in HD semantic maps, lanes are usually represented as curves, pedestrian crossings are often represented as polygons.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 2: The network architecture of VectorMapNet. The top row is the pipeline of VectorMapNet generating polylines from raw sensor inputs. The bottom row illustrates detailed structures and inference procedures of three primary components of VectorMapNet: BEV feature extractor, map element detector, and polyline generator. Numbers in polyline embeddings indicate predicted vertex indexes.
|
| 37 |
+
|
| 38 |
+
The heterogeneous nature of map elements calls for a unified vectorized representation. We opt to use N polylines Vpoly = {V poly1 , $\mathcal { V } ^ { \mathrm { p o l y } } = \{ V _ { 1 } ^ { \mathrm { p o l y } } , \dots , V _ { N } ^ { \mathrm { p o l y } } \}$ as primitives to represent these map elements in a map $\mathcal { M }$ . Each polyline $V _ { i } ^ { \mathrm { p o l y } } = \{ v _ { i , n } \in \mathbb { R } ^ { 2 } | n = 1 , \ldots , N _ { v } \}$ is a collection of $N _ { v }$ ordered vertices $\boldsymbol { v } _ { i , n }$ In practice, we converts vector HD maps from different public datasets to polylines by applying the Ramer–Douglas–Peucker algorithm (Ramer, 1972).
|
| 39 |
+
|
| 40 |
+
Why Polyline? Using polylines to represent map elements has three main advantages: (1) HD maps are typically composed of a mixture of different geometries, such as points, lines, curves, and polygons. Polylines are a flexible primitive that can represent these geometric elements effectively. (2) The order of polyline vertices is a natural way to encode the direction of map elements, which is vital to driving. (3) The polyline representation has been widely used by downstream autonomous driving modules, such as motion forecasting (Gao et al., 2020).
|
| 41 |
+
|
| 42 |
+
Method overview. We formulate this task as a sparse set detection problem. Specifically, we represent a map $\mathcal { M }$ by a sparse set of polylines, and the task is to learn a model that extracts information from sensors to predict these primitives for representing the semantic map.
|
| 43 |
+
|
| 44 |
+
First, we map sensor data from sensor-view to a canonical BEV representation $\mathcal { F } _ { \mathrm { B E V } }$ . Then the remaining task is to model polylines based on $\mathcal { F } _ { \mathrm { B E V } }$ . However, map elements exhibit complicated and diverse structural and location patterns, learning both of them jointly can be challenging. Thus, we decouple the task into two parts: (1) A scene-level element detection task that locates and classifies all map elements by predicting element keypoints $\mathcal { A } = \{ A _ { i } \in \mathbb { R } ^ { k \times 2 } | i = 1 , \dots , N \}$ and their class labels $\mathcal { L } = \{ l _ { i } \in \mathbb { Z } | i = 1 , \ldots , N \}$ ; (2) An object-level sequence generation task that produces a sequence of polyline vertices for each detected map element $( A _ { i } , l _ { i } )$ . The definition of element keypoint representation $\mathcal { A }$ is described in $\ S 2 . 2$ .
|
| 45 |
+
|
| 46 |
+
Correspondingly, VectorMapNet employs three modules to model these three tasks, as shown in Figure 2. (1) A BEV feature extractor that lifts sensor observations to BEV space $( \ S 2 . 1 )$ ; (2) A map element detector that predicts map element keypoints $\mathcal { A }$ and class labels $\mathcal { L }$ T $\lbrace \lbrace 2 . 2 )$ ; (3) A polyline generator that completes the shapes of the HD map elements conditioned on keypoints and class labels $( \ S 2 . 3 )$ .
|
| 47 |
+
|
| 48 |
+
# 2.1 BEV FEATURE EXTRACTOR
|
| 49 |
+
|
| 50 |
+
The BEV feature extractor lifts various modality inputs into a unified feature space and aggregates these features into a canonical representation termed BEV features $\mathcal { F } _ { \mathrm { B E V } }$ . We consider two common modalities: surrounding camera images $\mathcal { T }$ and LiDAR points $\mathcal { P }$ .
|
| 51 |
+
|
| 52 |
+
Camera branch. We use ResNet to extract features from images, followed by a feature transformation module from image space to BEV space. VectorMapNet does not rely on certain feature transformation approaches and we opt to use a simple but popular variant of IPM, which produces BEV features of $\dot { \mathcal { F } } _ { \mathrm { B E V } } ^ { \mathcal { T } } \in \mathbb { R } ^ { W \times H \times C _ { 1 } ^ { \bullet } }$ . The detailed structure can be found in Appendix C.3.
|
| 53 |
+
|
| 54 |
+
LiDAR branch. For LiDAR data $\mathcal { P }$ , we use a variant of PointPillars (Lang et al., 2019) with dynamic voxelization (Zhou et al., 2020), which divides the 3D space into multiple pillars and uses $\dot { \mathcal { F } } _ { \mathrm { B E V } } ^ { \mathcal { P } } \in \mathbb { R } ^ { \dot { W } \times H \times C _ { 2 } }$ uds to learn pillar-wise feature maps. We denote this feature map in BEV as.
|
| 55 |
+
|
| 56 |
+
For sensor fusion, we obtain the BEV features $\mathcal { F } _ { \mathrm { B E V } } \in \mathbb { R } ^ { W \times H \times \left( C _ { 1 } + C _ { 2 } \right) }$ by concatenating $\mathcal { F } _ { \mathrm { B E V } } ^ { \mathcal { Z } }$ and $\mathcal { F } _ { \mathrm { B E V } } ^ { \mathcal { P } }$ BEV, and then process the concatenated result with a two-layer convolutional network. An overview of the BEV feature extractor is shown at the bottom-left of Figure 2.
|
| 57 |
+
|
| 58 |
+
# 2.2 MAP ELEMENT DETECTOR
|
| 59 |
+
|
| 60 |
+
After obtaining BEV features, the goal of map element detector is to infer element keypoints $a _ { i , j }$ from the BEV features $\mathcal { F } _ { \mathrm { B E V } }$ . We leverage a variant of transformer set prediction detector (Carion et al., 2020) to achieve this goal. This detector represents map elements’ locations and categories by predicting their element keypoints $\mathcal { A }$ and class labels $\mathcal { L }$ .
|
| 61 |
+
|
| 62 |
+
Keypoint representations. In object detection problems, people use bounding box to abstract the shape of an object. Here we use $k$ key point locations $A _ { i } = \bar { \{ a _ { j } \in \mathbb { R } ^ { 2 } | j = 1 , . . . , k \} }$ , to represent the outline of a map element. However, defining keypoints for map elements is not straightforward since their are diverse. We conduct an ablation study to investigate the performance of different choices in $\ S \ 3 . 3$ .
|
| 63 |
+
|
| 64 |
+
Element queries. The query inputs of the detector are learnable element queries $\{ q _ { i } ^ { \mathrm { e l e m } } \in \mathbb { R } ^ { k \times d } | i =$ $1 , \ldots , N _ { \operatorname* { m a x } } \}$ , where $d$ is the hidden embedding size, and the $i$ -th element query $q _ { i } ^ { \mathrm { e l e m } }$ is composed of $k$ keypoint embeddings $q ^ { \mathrm { k p } } \colon q _ { i } ^ { \mathrm { e l e m } } = \{ q _ { i , j } ^ { \mathrm { k p } } \in \mathbb { R } ^ { d } | j = 1 , \ldots , k \}$ .
|
| 65 |
+
|
| 66 |
+
Architecture. The overall architecture of the map element detector includes a transformer decoder (Vaswani et al., 2017) and a prediction head, as shown at the bottom-middle of Figure 2. The decoder transforms the element queries using multi-head self-/cross-attention mechanisms. In particular, we use the deformable attention module (Zhu et al., 2020) as the decoder’s cross attention module, where each element query has a 2D location grounding. It improves interpretability and accelerates training convergence (Li et al., 2022).
|
| 67 |
+
|
| 68 |
+
The prediction head has two MLPs, which decodes element queries into element keypoints $a _ { i , j } =$ $\mathrm { M L P } _ { \mathrm { k p } } ( q _ { i , j } ^ { \mathrm { k p } } )$ and their class labels $l _ { i } = \mathrm { M L P } _ { \mathrm { c l s } } ( [ q _ { i , 1 } ^ { \mathrm { k p } } , \dots , q _ { i , k } ^ { \mathrm { k p } } ] )$ , respectively. $[ \cdot ]$ is a concatenation operator. Each keypoint embedding $q _ { i , j } ^ { \mathrm { k p } }$ in the map element detector consists of two learnable parts. The first parts is a keypoint position embedding $\{ e _ { j } ^ { \mathrm { k p } } \in \mathbb { R } ^ { d } | j = 1 , \dots , k \}$ , indicating which position in an element keypoint the point belongs to. The second embedding $\{ e _ { i } ^ { \mathrm { p } } \in \mathbb { R } ^ { d } | i = 1 , \dots , N _ { \operatorname* { m a x } } \}$ encodes which map element the keypoint belongs to. The keypoint embedding $q _ { i , j } ^ { \mathrm { k p } }$ is the addition of these two embeddings $e _ { i } ^ { \mathrm { p } } + e _ { j } ^ { \mathrm { k p } }$ .
|
| 69 |
+
|
| 70 |
+
# 2.3 POLYLINE GENERATOR
|
| 71 |
+
|
| 72 |
+
Given the label and keypoints of map elements, the goal of polyline generator is to generate detailed geometrical shape of map elements. Specifically, polyline generator models a distribution $p ( V _ { i } ^ { \mathrm { p o l y } } | a _ { i } , l _ { i } , \mathcal { F } _ { \mathrm { B E V } } ^ { f } )$ over the vertices of each polyline, conditioned on the initial layout (i.e., ele-ass labels) and BEV features. To estimate this distribution, we decompose the joint distribution over V polyi as a product of a series of conditional vertex coordinate distributions.
|
| 73 |
+
|
| 74 |
+
Specifically, we transform each polyline $V _ { i } ^ { \mathrm { p o l y } } = \{ v _ { i , n } \in \mathbb { R } ^ { 2 } | n = 1 , \ldots , N _ { v } \}$ into a flattened sequence $\{ v _ { i , n _ { \cdot } } ^ { f } \in \mathbb { R } | n = 1 , \dots , 2 N _ { v } \}$ by concatenating coordinates values of polyline vertices and add an additional End of Sequence token $( E O S )$ at the end of each sequence, and the target distribution turns into:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
p ( V _ { i } ^ { \mathrm { p o l y } } | a _ { i } , l _ { i } , \mathcal { F } _ { \mathrm { B E V } } ; \theta ) = \prod _ { n = 1 } ^ { 2 N _ { v } } p ( v _ { i , n } ^ { f } | v _ { i , < n } ^ { f } , a _ { i } , l _ { i } , \mathcal { F } _ { \mathrm { B E V } } ) .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
We model this distribution using an autoregressive network that outputs the parameters of a predictive distribution at each step for the next vertex coordinate. This predictive distribution is defined over all possible discrete vertex coordinate values and $E O S$ .
|
| 81 |
+
|
| 82 |
+
Vertices as discrete variables. Using discrete distributions to model polyline vertices has the advantage of representing arbitrary shapes, i.e., categorical distributions can easily represent various polylines, such as multi-modal, skewed, peaked, or long-tailed, that are commonly seen in our task. Thus, we quantize the coordinate values into discrete tokens and model each token with a categorical distribution. We also conduct an ablation study in Appendix D.2 to investigate other modeling choices.
|
| 83 |
+
|
| 84 |
+
Architecture. The autoregressive network we choose is a vanilla transformer (Vaswani et al., 2017) (see the bottom-right of Figure 2). Each polyline’s keypoint coordinates and class label are tokenized and fed in as the query inputs of the transformer decoder. Then a sequence of vertex tokens are fed into the transformer iteratively, integrating BEV features with cross-attention, and decoded as polyline vertices. Note that the generator can generate all polylines in parallel.
|
| 85 |
+
|
| 86 |
+
Following PolyGen (Nash et al., 2020), we use an addition of three learned embeddings as the embedding of each vertex token: Coordinate Embedding, indicating whether the token represents $x$ or $y$ coordinate; Position Embedding, representing which vertex the token belongs to; Value Embedding, expressing the token’s quantized coordinate value.
|
| 87 |
+
|
| 88 |
+
# 2.4 LEARNING
|
| 89 |
+
|
| 90 |
+
We train our model by minimizing the sum of map element detector loss and polyline generator loss:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\mathcal { L } = \mathcal { L } _ { d e t } + \mathcal { L } _ { g e n }
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
Map element detector loss. Following (Wang et al., 2022; Zhu et al., 2020), the detector is trained with bipartite matching loss, thus avoiding post-processing steps like non-maximum suppression (NMS). We describe the detail of the loss function in Appendix C.4.
|
| 97 |
+
|
| 98 |
+
Polyline generator loss. Polyline generator is trained to maximize the log-probability of the polyline vertices. We use negative log-likelihood as its loss function:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\mathcal { L } _ { g e n } = - \frac { 1 } { 2 N _ { v } } \sum _ { n = 1 } ^ { 2 N _ { v } } \log \hat { p } ( v _ { i , n } ^ { f } | v _ { i , < n } ^ { f } , a _ { i } , l _ { i } , \mathcal { F } _ { \mathrm { B E V } } ^ { f } ) ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\hat { p } ( v _ { i , n } ^ { f } | \ldots )$ is the conditional probability of discr e coordinate value $v _ { i , n } ^ { f }$ , and $\boldsymbol { v } _ { i , < n } ^ { f }$ are ground truth discrete coordinate values with index less than $n$ . The default training strategy is teacher forcing, meaning that we use ground truth keypoints as generator input. To avoid the exposure bias (Bengio et al., 2015), we further experiment with first training with teacher forcing, and then fine-tuning with predicted keypoints.
|
| 105 |
+
|
| 106 |
+
# 3 EXPERIMENTS
|
| 107 |
+
|
| 108 |
+
Experiment protocol. We conduct experiments on the nuScenes (Caesar et al., 2020) and Argoverse2 (Wilson et al., 2021). Following HDMapNet (Li et al., 2021), we assess the quality of a predicted HD map by comparing its components (i.e., polylines) with ground truth, while the only difference is the selection of distance measure for in TP/FP matching. Both HDMapNet [1] and our paper use Chamfer distance for matching (Chamfer AP). Additionally, we also propose another distance metric termed Frechet distance (Fréchet AP), which better measures the distance between polylines by considering the order of vertices. The definitions of Chamfer AP and Fréchet AP are in $\ S \ A . 2$ . The details of dataset settings (§ A.1), implementations $( \ S \mathrm { ~ C ~ } )$ , and metrics (§ A.2) are presented in the Appendix as well.
|
| 109 |
+
|
| 110 |
+
Table 1: Results on nuScenes dataset. Fusion denotes the model using both images and LiDAR points as inputs. Methods with fine-tune means the model is applied two stage training strategy introduced in $\ S \ : 2 . 4$
|
| 111 |
+
|
| 112 |
+
<table><tr><td>Methods</td><td>APped</td><td> APdivider</td><td>APboundary</td><td>mAP</td></tr><tr><td>STSU (Can et al., 2021)</td><td>7.0</td><td>11.6</td><td>16.5</td><td>11.7</td></tr><tr><td>HDMapNet (Camera) (Li et al., 2021)</td><td>14.4</td><td>21.7</td><td>33.0</td><td>23.0</td></tr><tr><td>HDMapNet (LiDAR) (Li et al.,2021)</td><td>10.4</td><td>24.1</td><td>37.9</td><td>24.1</td></tr><tr><td>HDMapNet (Fusion) (Li et al., 2021)</td><td>16.3</td><td>29.6</td><td>46.7</td><td>31.0</td></tr><tr><td>VectorMapNet (Camera)</td><td>36.1</td><td>47.3</td><td>39.3</td><td>40.9</td></tr><tr><td>VectorMapNet (Camera) + fine-tune</td><td>42.5</td><td>51.4</td><td>44.1</td><td>46.0</td></tr><tr><td>VectorMapNet (LiDAR)</td><td>25.7</td><td>37.6</td><td>38.6</td><td>34.0</td></tr><tr><td>VectorMapNet (Fusion)</td><td>37.6</td><td>50.5</td><td>47.5</td><td>45.2</td></tr><tr><td>VectorMapNet (Fusion) + fine-tune</td><td>48.2</td><td>60.1</td><td>53.0</td><td>53.7</td></tr></table>
|
| 113 |
+
|
| 114 |
+
# 3.1 COMPARISON WITH BASELINES
|
| 115 |
+
|
| 116 |
+
Comparison on nuScenes dataset. We choose two closely related models, HDMapNet (Li et al., 2021) and STSU (Can et al., 2021) as our baselines. For HDMapNet, we directly take its vectorized results. STSU uses a transformer module to detect the moving objects and centerline segments. It uses an association head to piece the segments together as the road graph. In order to adapt STSU to our task, we use a two-layer MLP to predict lane segments and only keep its object branch and polyline branch. We report the average precision that uses Chamfer distance as the threshold to determine the positive matches with ground truth. $\{ 0 . 5 , 1 . 0 , 1 . 5 \}$ are the predefined thresholds of Chamfer distance AP.
|
| 117 |
+
|
| 118 |
+
As shown in Table 1, VectorMapNet outperforms HDMapNet by a large margin under all settings $\left( + 1 7 . 9 \mathrm { m A P } \right.$ in Camera, $+ 9 . 9 \mathrm { m A P }$ in LiDAR, and $+ 1 4 . 2 \mathrm { m A P }$ in Fusion). Compared to camera-only and LiDAR-only, sensor fusion introduces $+ 4 . 3 \mathrm { \ m A P }$ improvement and $+ 1 1 . 2$ mAP improvement, respectively. As described in $\ S \ : 2 . 4$ , our two stage training strategy further boosts the performance of both camera-only and sensor fusion methods by $+ 6 . 9$ mAP and $+ 8 . 5 \mathrm { m A P }$ , respectively. STSU is $- 2 9 . 2 \mathrm { m A P }$ lower than VectorMapNet. Since STSU treats all map elements as a set of fixed-size segments, we hypothesize that ignoring the fine geometry of map elements hurts the performance significantly.
|
| 119 |
+
|
| 120 |
+
Results on Argoverse2. We further compare HDMapNet and VectorMapNet on Argoverse2 dataset, shown in Table 2. Since Argoverse2 provides z-axis annotations, we give VectorMapNet results both in 2D and 3D.
|
| 121 |
+
|
| 122 |
+
In many cases of Argoverse2, the annotated boundaries and divider lines overlap with each other, making it difficult for models to separate them. It results in a drop in performance of both methods, especially in $\mathbf { A P } _ { d i v i d e r }$ of HDMapNet (21. $7 ~ \mathrm { A P } _ { d i v i d e r }$ to $5 . 7 \ \mathrm { A P } _ { d i v i d e r } )$ because its rasterized representation fails to handle these cases. In contrast, VectorMapNet remains competent, showing the advantage of using vectorized representation to represent overlapping elements.
|
| 123 |
+
|
| 124 |
+
Table 2: Results on Argoverse2 dataset.
|
| 125 |
+
|
| 126 |
+
<table><tr><td></td><td></td><td colspan="4">Frechet Distance</td><td colspan="4">Chamfer Distance</td></tr><tr><td>Keypoint Representaion</td><td>#dim</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td></tr><tr><td>HDMapNet (Camera) Li et al. (2021)</td><td>2</td><td></td><td>-</td><td>1</td><td>-</td><td>13.1</td><td>5.7</td><td>37.6</td><td>18.8</td></tr><tr><td>VectorMapNet (Camera)</td><td>2</td><td>43.2</td><td>45.5</td><td>52.0</td><td>46.9</td><td>38.3</td><td>36.1</td><td>39.2</td><td>37.9</td></tr><tr><td>VectorMapNet (Camera)</td><td>3</td><td>41.7</td><td>42.3</td><td>49.9</td><td>44.6</td><td>36.5</td><td>35.0</td><td>36.2</td><td>35.8</td></tr></table>
|
| 127 |
+
|
| 128 |
+
# 3.2 QUALITATIVE ANALYSIS
|
| 129 |
+
|
| 130 |
+
Benefits of using polylines as primitives. From visualizations, we find that using polylines as primitives has brought us two benefits compared with baselines: First, polylines effectively encode the detailed geometries of map elements, e.g. the corners of boundaries (see the red ellipses in Figure 3). Second, polyline representations prevent VectorMapNet from generating ambiguous results, as it consistently encodes direction information. In contrast, Rasterized methods are prone to falsely generating loopy curves (see the blue ellipses in Figure 3). These ambiguities hinder safe autonomous driving. Therefore, the polyline is a desired primitive for map learning, as it can reflect real-world road layouts and explicitly encode directions.
|
| 131 |
+
|
| 132 |
+
Benefits of posing map learning as a detection problem. VectorMapNet works in a top-down detection manner: it models the topology of the map and the map element locations first, and then generates map element details. Visualizations show that VectorMapNet capture the map elements comprehensively, including the small elements close to edges. The high mAP of VectorMapNet over other baselines further confirms this observation. Surprisingly, Figure 4 shows that VectorMapNet can find the map elements that are not annotated in the HD map provided by the dataset.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 3: Qualitative results generated by VectorMapNet and baselines. We use camera images as inputs for comparisons. The areas enclosed by red and blue ellipses show that VectorMapNet can preserve sharp corners, and polyline representations prevent VectorMapNet from generating ambiguous self-looping results. Since the lack of directional information, HDMapNet and STSU cannot infer drivable areas from their predictions. It worth noting that the drivable area is inferred from several disjoint boundaries and is non-trivial to model as one object.
|
| 136 |
+
|
| 137 |
+
# 3.3 ABLATION STUDIES
|
| 138 |
+
|
| 139 |
+
We list ablation studies for keypoint representation here. For more ablation studies, please refer to Appendix D in the Appendix.
|
| 140 |
+
|
| 141 |
+
Table 3: Ablation study of keypoint representaions. $k$ is the keypoint number of each keypoint representation.
|
| 142 |
+
|
| 143 |
+
<table><tr><td></td><td colspan="5">Fréchet Distance</td><td colspan="4">Chamfer Distance</td></tr><tr><td>Keypoint Representaion</td><td>k</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td></tr><tr><td>Bbox</td><td>2</td><td>47.4</td><td>46.9</td><td>62.8</td><td>52.4</td><td>36.1</td><td>47.3</td><td>39.3</td><td>40.9</td></tr><tr><td>SME</td><td>3</td><td>47.0</td><td>47.4</td><td>56.9</td><td>50.4</td><td>27.6</td><td>34.4</td><td>35.4</td><td>32.5</td></tr><tr><td>Extreme</td><td>4</td><td>41.7</td><td>47.3</td><td>59.0</td><td>49.4</td><td>30.4</td><td>33.1</td><td>37.3</td><td>33.6</td></tr></table>
|
| 144 |
+
|
| 145 |
+
Keypoint representations. Since there is no straightforward keypoint design to represent map elements with few fixed number of points, we propose three simple representations as shown in Figure 5: Bounding Box (Bbox), which is the smallest box enclosing a polyline, and its keypoints are defined as the top-right and bottom-left points of the box; Start-Middle-End (SME), which samples the start, middle, and end point from a polyline; Extreme Points, which are the left-most, right-most, top-most, and bottom-most points of a polyline.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 4: An example of VectorMapNet detecting unlabeled map elements. The red ellipses indicate two pedestrian crossings that are missing in ground truth annotations, while VectorMapNet detects it correctly. All the predictions are generated from camera images.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 5: Three different keypoint representations are proposed here: Bounding Box $\scriptstyle ( \mathrm { k } = 2$ ), SME $( \mathbf { k } { = } 3 )$ , and Extreme Points $( \mathrm { k } { = } 4 )$ , where $k$ has the same definition in $\ S \ O 2$ . The arrow line indicates the direction of the example polyline, and the arrow dash lines indicate the vertices order of keypoint representations.
|
| 152 |
+
|
| 153 |
+
We experiment with these representations and list the results in Table 3. Our results show that the bounding box representation leads to the best mean average performance in both metrics, outperforming others by 2.0 Fréchet mAP and 7.3 Chamfer mAP.
|
| 154 |
+
|
| 155 |
+
# 3.4 VECTORIZED HD MAPS FOR MOTION FORECASTING
|
| 156 |
+
|
| 157 |
+
Since predicting future motions in the complex environment heavily relies on the map information, we investigate the effectiveness of our predicted HD map in this downstream motion forecasting task.
|
| 158 |
+
|
| 159 |
+
Task Settings. In our setting, the motion forecasting model aims to predict a target agent’s 6 plausible future trajectories (3 seconds) from past trajectories (1 second) of agents and an HD semantic map which covers an area of $6 0 m \times 3 0 m$ . We generate data by sampling from nuScenes tracking dataset. We first retrieve agents observed in the tracking dataset and then select agents with complete 3-second future observations as the target agents. As a result, the dataset consists of 25,645 training samples and 5,460 test samples. We use three different input settings to investigate the performance of our predicted HD map: past trajectories, past trajectories with the ground truth HD map, and past trajectories with the map predicted by VectorMapNet. The motion forecaster we used is mmTransformer (Liu et al., 2021) which can optionally take vectorized maps and trajectories as inputs.
|
| 160 |
+
|
| 161 |
+
Table 4: Predicted map for motion forecasting. There are three input settings: past trajectories (denoted as Traj.), past trajectories with the human-annotated HD map from the nuScenes (denoted as Traj. $+ \mathrm { G . T }$ . Map), and past trajectories with the predicted map from VectorMapNet (denoted as Traj. $^ +$ Pred. Map). The predicted map greatly improves the prediction performance compared with the model that only use past trajectories.
|
| 162 |
+
|
| 163 |
+
<table><tr><td>Prediction Model Inputs</td><td>minADE↓</td><td>minFDE↓</td><td>MR@2m↓</td></tr><tr><td>Traj.</td><td>0.909</td><td>1.577</td><td>19.6</td></tr><tr><td>Traj. + G.T. Map</td><td>0.779</td><td>1.390</td><td>18.0</td></tr><tr><td>Traj. + Pred. Map</td><td>0.826</td><td>1.477</td><td>18.2</td></tr></table>
|
| 164 |
+
|
| 165 |
+
Results. To evaluate the performance of motion forecasting under different input settings, we report results on three commonly used metrics (Chang et al., 2019): minimum average displacement error (minADE), minimum final displacement error (minFDE) and miss rate (MR). To get the results, these metrics only account for the best trajectory out of 6 predicted trajectories. Results in Table 4 show that the map predicted by VectorMapNet has encoded environment information that greatly helps the motion forecaster, compared with the model that only takes past trajectories as inputs. The gap between the ground-truth map and the predicted map is not big either, especially in terms of MR $( - 0 . 2 \% )$ . We think future research could further close the performance gap.
|
| 166 |
+
|
| 167 |
+
# 4 RELATED WORKS
|
| 168 |
+
|
| 169 |
+
Semantic map learning. Annotating semantic maps attracts plenty of interests thanks to autonomous driving. Recently, semantic map learning is formulated as a semantic segmentation problem (Mattyus et al., 2015) and is solved by using aerial images (Máttyus et al., 2016), LiDAR points (Yang et al., 2018), and HD panorama (Wang et al., 2016). The crowdsourcing tags (Wang et al., 2015) are used to improve the performance of fine-grained segmentation. Instead of using offline data, recent works focus on understanding BEV semantics from onboard camera images (Lu et al., 2019; Yang et al., 2021), and videos (Can et al., 2020). Only using onboard sensors as model input is particularly challenging as the inputs and target map lie in different coordinate systems. Recently, several crossview learning approaches (Philion & Fidler, 2020; Pan et al., 2020; Li et al., 2021; Zhou & Krähenbühl, 2022; Wang et al., 2022; Chen et al., 2022) leverage the geometric structure of scenes to mitigate the mismatch between sensor inputs and BEV representations. Some methods (Casas et al., 2021; Sadat et al., 2020) use pixel-level semantic maps to solve downstream tasks, but the entire downstream pipeline needs to be redesigned to accommodate these rasterized map inputs. Beyond pixel-level semantic maps, our work extracts a consistent vectorized map around vehicles from surrounding cameras or LiDARs, which suits for existing downstream tasks like motion forecasting (Gao et al., 2020; Zhao et al., 2020; Liu et al., 2021) without modifications.
|
| 170 |
+
|
| 171 |
+
Lane detection. Lane detection aims to separate lane segments from road scenes precisely. Most lane detection algorithms (Pan et al., 2018; Neven et al., 2018) use a pixel-level segmentation technique combined with sophisticated post-processing. Another line of work leverages the predefined proposal to achieve high accuracy and fast inference speed. These methods typically involve handcrafted elements such as vanishing points (Lee et al., 2017), polynomial curves (Van Gansbeke et al., 2019), line segments (Li et al., 2019), and Bézier curves (Feng et al., 2022) to model proposals. In addition to using perspective view cameras as inputs, (Homayounfar et al., 2018) and (Liang et al., 2019) extract lane segments from overhead highway cameras and LiDAR imagery with a recurrent neural network. Instead of discovering the road’s topology via boundaries detection, STSU (Can et al., 2021) and LaneGraphNet (Zürn et al., 2021) construct lane graphs from centerline segments that are encoded by Bézier curves and line segments, respectively. To model complex geometries in the urban environment, we leverage polylines to represent all the map elements in perceptual scopes.
|
| 172 |
+
|
| 173 |
+
Geometric data modeling. Another line of work closely related to VectorMapNet is geometric data generation. These methods typically treat geometric elements as a sequence, such as primitive parts of furniture (Li et al., 2017; Mo et al., 2019), states of sketch strokes (Ha & Eck, 2017), vertices of $n$ -gon mesh (Nash et al., 2020) , and parameters of SVG primitives (Carlier et al., 2020). These methods generate these sequences by leveraging autoregressive models (e.g. Transformer). Since the directly modeling sequence is challenging for long-range centerline maps, HDMapGen (Mi et al., 2021) views the map as a two-level hierarchy. It produces a global and local graph separately with a hierarchical graph RNN. Instead of treating geometric elements as a sequence generation problem, LETR (Xu et al., 2021) models line segment as a detection problem and tackle it with a query-based detector. Unlike the above approaches that focus on single-level geometric modelings, such as scene level (e.g. line segments in an image) or object-level (e.g. furniture), VectorMapNet is designed to address both the scene level and object level geometric modeling. Specifically, VectorMapNet constructs a map by modeling the global relationship between map elements in the scene and the local geometric details inside each element.
|
| 174 |
+
|
| 175 |
+
Learning vector representations from images VectorMapNet bears some similarities with predicting vector graphics from raster images. In this field, several recent works (Carlier et al., 2020) and (Reddy et al., 2021) use different vector object representations to define generative models of vector images.
|
| 176 |
+
|
| 177 |
+
(Ganin et al., 2021) converts images to CAD, CanvasVAE (Yamaguchi, 2021) learns vectorized canvas layouts from images, and (Liu et al., 2022) generates vectorized stroke primitives from raster line drawing. The instance segmentation community has also been concerned with a similar task of detecting object contours in a vector form from an image. These methods (Zhang et al., 2022; Acuna et al., 2018; Liang et al., 2020) initialize a contour for every object instance and then refine the vertex positions of the contour. These methods use highly domain-dependent architectures; therefore, it would be a non-trivial task to adapt them for our task that requires detecting and generating different map elements with different semantic information and different geometry from the real-world 3D space.
|
| 178 |
+
|
| 179 |
+
# 5 CONCLUSIONS
|
| 180 |
+
|
| 181 |
+
We present VectorMapNet, an end-to-end model to tackle the HD semantic map learning problem. Unlike existing works, VectorMapNet uses polylines as the primitives to represent vectorized HD map elements. To learn these polylines, we decompose the learning problem into a detection and a generation problem. Our experiments show that VectorMapNet can generate coherent and complex geometries for urban map elements, benefiting from the polyline primitives. We believe that this novel way to learn HD maps provides a new perspective on the HD semantic map learning problem.
|
| 182 |
+
|
| 183 |
+
Reproducibility Statement. We detail the implementation steps and experiment settings in Appendix C.
|
| 184 |
+
|
| 185 |
+
# REFERENCES
|
| 186 |
+
|
| 187 |
+
David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Efficient interactive annotation of segmentation datasets with polygon-rnn $^ { + + }$ . 2018.
|
| 188 |
+
|
| 189 |
+
Pankaj K Agarwal, Rinat Ben Avraham, Haim Kaplan, and Micha Sharir. Computing the discrete fréchet distance in subquadratic time. SIAM Journal on Computing, 43(2):429–449, 2014.
|
| 190 |
+
|
| 191 |
+
Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. Advances in neural information processing systems, 28, 2015.
|
| 192 |
+
|
| 193 |
+
Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuscenes: A multimodal dataset for autonomous driving. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11621–11631, 2020.
|
| 194 |
+
|
| 195 |
+
Yigit Baran Can, Alexander Liniger, Ozan Unal, Danda Paudel, and Luc Van Gool. Understanding bird’s-eye view semantic hd-maps using an onboard monocular camera. arXiv preprint arXiv:2012.03040, 2020.
|
| 196 |
+
|
| 197 |
+
Yigit Baran Can, Alexander Liniger, Danda Pani Paudel, and Luc Van Gool. Structured bird’seye-view traffic scene understanding from onboard images. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15661–15670, 2021.
|
| 198 |
+
|
| 199 |
+
Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European conference on computer vision, pp. 213–229. Springer, 2020.
|
| 200 |
+
|
| 201 |
+
Alexandre Carlier, Martin Danelljan, Alexandre Alahi, and Radu Timofte. Deepsvg: A hierarchical generative network for vector graphics animation. Advances in Neural Information Processing Systems, 33:16351–16361, 2020.
|
| 202 |
+
|
| 203 |
+
Sergio Casas, Abbas Sadat, and Raquel Urtasun. Mp3: A unified model to map, perceive, predict and plan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14403–14412, 2021.
|
| 204 |
+
|
| 205 |
+
Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, et al. Argoverse: 3d tracking and forecasting with rich maps. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8748–8757, 2019.
|
| 206 |
+
|
| 207 |
+
Xuanyao Chen, Tianyuan Zhang, Yue Wang, Yilun Wang, and Hang Zhao. Futr3d: A unified sensor fusion framework for 3d detection. arXiv preprint arXiv:2203.10642, 2022.
|
| 208 |
+
|
| 209 |
+
Thomas Eiter and Heikki Mannila. Computing discrete fréchet distance. 1994.
|
| 210 |
+
|
| 211 |
+
Zhengyang Feng, Shaohua Guo, Xin Tan, Ke Xu, Min Wang, and Lizhuang Ma. Rethinking efficient lane detection via curve modeling. arXiv preprint arXiv:2203.02431, 2022.
|
| 212 |
+
|
| 213 |
+
Yaroslav Ganin, Sergey Bartunov, Yujia Li, Ethan Keller, and Stefano Saliceti. Computer-aided design as language. Advances in Neural Information Processing Systems, 34:5885–5897, 2021.
|
| 214 |
+
|
| 215 |
+
Jiyang Gao, Chen Sun, Hang Zhao, Yi Shen, Dragomir Anguelov, Congcong Li, and Cordelia Schmid. Vectornet: Encoding hd maps and agent dynamics from vectorized representation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11525–11533, 2020.
|
| 216 |
+
|
| 217 |
+
David Ha and Douglas Eck. A neural representation of sketch drawings. arXiv preprint arXiv:1704.03477, 2017.
|
| 218 |
+
|
| 219 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 220 |
+
|
| 221 |
+
Namdar Homayounfar, Wei-Chiu Ma, Shrinidhi Kowshika Lakshmikanth, and Raquel Urtasun. Hierarchical recurrent attention networks for structured online maps. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3417–3426, 2018.
|
| 222 |
+
|
| 223 |
+
Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83–97, 1955.
|
| 224 |
+
|
| 225 |
+
Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12697–12705, 2019.
|
| 226 |
+
|
| 227 |
+
Seokju Lee, Junsik Kim, Jae Shin Yoon, Seunghak Shin, Oleksandr Bailo, Namil Kim, Tae-Hee Lee, Hyun Seok Hong, Seung-Hoon Han, and In So Kweon. Vpgnet: Vanishing point guided network for lane and road marking detection and recognition. In Proceedings of the IEEE international conference on computer vision, pp. 1947–1955, 2017.
|
| 228 |
+
|
| 229 |
+
Feng Li, Hao Zhang, Shilong Liu, Jian Guo, Lionel M Ni, and Lei Zhang. Dn-detr: Accelerate detr training by introducing query denoising. arXiv preprint arXiv:2203.01305, 2022.
|
| 230 |
+
|
| 231 |
+
Jun Li, Kai Xu, Siddhartha Chaudhuri, Ersin Yumer, Hao Zhang, and Leonidas Guibas. Grass: Generative recursive autoencoders for shape structures. ACM Transactions on Graphics (TOG), 36 (4):1–14, 2017.
|
| 232 |
+
|
| 233 |
+
Qi Li, Yue Wang, Yilun Wang, and Hang Zhao. Hdmapnet: A local semantic map learning and evaluation framework. arXiv preprint arXiv:2107.06307, 2021.
|
| 234 |
+
|
| 235 |
+
Xiang Li, Jun Li, Xiaolin Hu, and Jian Yang. Line-cnn: End-to-end traffic line detection with line proposal unit. IEEE Transactions on Intelligent Transportation Systems, 21(1):248–258, 2019.
|
| 236 |
+
|
| 237 |
+
Justin Liang, Namdar Homayounfar, Wei-Chiu Ma, Shenlong Wang, and Raquel Urtasun. Convolutional recurrent network for road boundary extraction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9512–9521, 2019.
|
| 238 |
+
|
| 239 |
+
Justin Liang, Namdar Homayounfar, Wei-Chiu Ma, Yuwen Xiong, Rui Hu, and Raquel Urtasun. Polytransform: Deep polygon transformer for instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9131–9140, 2020.
|
| 240 |
+
|
| 241 |
+
Hanyuan Liu, Chengze Li, Xueting Liu, and Tien-Tsin Wong. End-to-end line drawing vectorization. 2022.
|
| 242 |
+
|
| 243 |
+
Yicheng Liu, Jinghuai Zhang, Liangji Fang, Qinhong Jiang, and Bolei Zhou. Multimodal motion prediction with stacked transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7577–7586, 2021.
|
| 244 |
+
|
| 245 |
+
Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in adam. 2018.
|
| 246 |
+
|
| 247 |
+
Chenyang Lu, Marinus Jacobus Gerardus van de Molengraft, and Gijs Dubbelman. Monocular semantic occupancy grid mapping with convolutional variational encoder–decoder networks. IEEE Robotics and Automation Letters, 4(2):445–452, 2019.
|
| 248 |
+
|
| 249 |
+
Hanspeter A Mallot, Heinrich H Bülthoff, JJ Little, and Stefan Bohrer. Inverse perspective mapping simplifies optical flow computation and obstacle detection. Biological cybernetics, 64(3):177–185, 1991.
|
| 250 |
+
|
| 251 |
+
Gellert Mattyus, Shenlong Wang, Sanja Fidler, and Raquel Urtasun. Enhancing road maps by parsing aerial images around the world. In Proceedings of the IEEE international conference on computer vision, pp. 1689–1697, 2015.
|
| 252 |
+
|
| 253 |
+
Gellért Máttyus, Shenlong Wang, Sanja Fidler, and Raquel Urtasun. Hd maps: Fine-grained road segmentation by parsing ground and aerial images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3611–3619, 2016.
|
| 254 |
+
|
| 255 |
+
Lu Mi, Hang Zhao, Charlie Nash, Xiaohan Jin, Jiyang Gao, Chen Sun, Cordelia Schmid, Nir Shavit, Yuning Chai, and Dragomir Anguelov. Hdmapgen: A hierarchical graph generative model of high definition maps. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4227–4236, 2021.
|
| 256 |
+
|
| 257 |
+
Kaichun Mo, Paul Guerrero, Li Yi, Hao Su, Peter Wonka, Niloy Mitra, and Leonidas J Guibas. Structurenet: Hierarchical graph networks for 3d shape generation. arXiv preprint arXiv:1908.00575, 2019.
|
| 258 |
+
|
| 259 |
+
Charlie Nash, Yaroslav Ganin, SM Ali Eslami, and Peter Battaglia. Polygen: An autoregressive generative model of 3d meshes. In International Conference on Machine Learning, pp. 7220–7229. PMLR, 2020.
|
| 260 |
+
|
| 261 |
+
Davy Neven, Bert De Brabandere, Stamatios Georgoulis, Marc Proesmans, and Luc Van Gool. Towards end-to-end lane detection: an instance segmentation approach. In 2018 IEEE intelligent vehicles symposium (IV), pp. 286–291. IEEE, 2018.
|
| 262 |
+
|
| 263 |
+
Bowen Pan, Jiankai Sun, Ho Yin Tiga Leung, Alex Andonian, and Bolei Zhou. Cross-view semantic segmentation for sensing surroundings. IEEE Robotics and Automation Letters, 5(3):4867–4873, 2020.
|
| 264 |
+
|
| 265 |
+
Xingang Pan, Jianping Shi, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Spatial as deep: Spatial cnn for traffic scene understanding. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
|
| 266 |
+
|
| 267 |
+
Jonah Philion and Sanja Fidler. Lift, splat, shoot: Encoding images from arbitrary camera rigs by implicitly unprojecting to 3d. In European Conference on Computer Vision, pp. 194–210. Springer, 2020.
|
| 268 |
+
|
| 269 |
+
Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 652–660, 2017.
|
| 270 |
+
|
| 271 |
+
Urs Ramer. An iterative procedure for the polygonal approximation of plane curves. Comput. Graph. Image Process., 1:244–256, 1972.
|
| 272 |
+
|
| 273 |
+
Pradyumna Reddy, Michael Gharbi, Michal Lukac, and Niloy J Mitra. Im2vec: Synthesizing vector graphics without vector supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7342–7351, 2021.
|
| 274 |
+
|
| 275 |
+
Thomas Roddick and Roberto Cipolla. Predicting semantic map representations from images using pyramid occupancy networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11138–11147, 2020.
|
| 276 |
+
|
| 277 |
+
Guodong Rong, Byung Hyun Shin, Hadi Tabatabaee, Qiang Lu, Steve Lemke, Marti ¯ n, š Možeiko, Eric Boise, Geehoon Uhm, Mark Gerow, Shalin Mehta, et al. Lgsvl simulator: A high fidelity simulator for autonomous driving. arXiv preprint arXiv:2005.03778, 2020.
|
| 278 |
+
|
| 279 |
+
Abbas Sadat, Sergio Casas, Mengye Ren, Xinyu Wu, Pranaab Dhawan, and Raquel Urtasun. Perceive, predict, and plan: Safe motion planning through interpretable semantic representations. In European Conference on Computer Vision, pp. 414–430. Springer, 2020.
|
| 280 |
+
|
| 281 |
+
Wouter Van Gansbeke, Bert De Brabandere, Davy Neven, Marc Proesmans, and Luc Van Gool. Endto-end lane detection through differentiable least-squares fitting. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pp. 0–0, 2019.
|
| 282 |
+
|
| 283 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
|
| 284 |
+
|
| 285 |
+
Shenlong Wang, Sanja Fidler, and Raquel Urtasun. Holistic 3d scene understanding from a single geo-tagged image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3964–3972, 2015.
|
| 286 |
+
|
| 287 |
+
Shenlong Wang, Min Bai, Gellert Mattyus, Hang Chu, Wenjie Luo, Bin Yang, Justin Liang, Joel Cheverie, Sanja Fidler, and Raquel Urtasun. Torontocity: Seeing the world with a million eyes. arXiv preprint arXiv:1612.00423, 2016.
|
| 288 |
+
|
| 289 |
+
Yue Wang, Vitor Campagnolo Guizilini, Tianyuan Zhang, Yilun Wang, Hang Zhao, and Justin Solomon. Detr3d: 3d object detection from multi-view images via 3d-to-2d queries. In Conference on Robot Learning, pp. 180–191. PMLR, 2022.
|
| 290 |
+
|
| 291 |
+
Benjamin Wilson, William Qi, Tanmay Agarwal, John Lambert, Jagjeet Singh, Siddhesh Khandelwal, Bowen Pan, Ratnesh Kumar, Andrew Hartnett, Jhony Kaesemodel Pontes, Deva Ramanan, Peter Carr, and James Hays. Argoverse 2: Next generation datasets for self-driving perception and forecasting. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks (NeurIPS Datasets and Benchmarks 2021), 2021.
|
| 292 |
+
|
| 293 |
+
Yifan Xu, Weijian Xu, David Cheung, and Zhuowen Tu. Line segment detection using transformers without edges. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4257–4266, 2021.
|
| 294 |
+
|
| 295 |
+
Kota Yamaguchi. Canvasvae: Learning to generate vector graphic documents. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5481–5489, 2021.
|
| 296 |
+
|
| 297 |
+
Bin Yang, Ming Liang, and Raquel Urtasun. Hdnet: Exploiting hd maps for 3d object detection. In Conference on Robot Learning, pp. 146–155. PMLR, 2018.
|
| 298 |
+
|
| 299 |
+
Weixiang Yang, Qi Li, Wenxi Liu, Yuanlong Yu, Yuexin Ma, Shengfeng He, and Jia Pan. Projecting your view attentively: Monocular road scene layout estimation via cross-view transformation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15536–15545, 2021.
|
| 300 |
+
|
| 301 |
+
Tao Zhang, Shiqing Wei, and Shunping Ji. E2ec: An end-to-end contour-based method for highquality high-speed instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4443–4452, 2022.
|
| 302 |
+
|
| 303 |
+
Hang Zhao, Jiyang Gao, Tian Lan, Chen Sun, Benjamin Sapp, Balakrishnan Varadarajan, Yue Shen, Yi Shen, Yuning Chai, Cordelia Schmid, et al. Tnt: Target-driven trajectory prediction. arXiv preprint arXiv:2008.08294, 2020.
|
| 304 |
+
|
| 305 |
+
Brady Zhou and Philipp Krähenbühl. Cross-view transformers for real-time map-view semantic segmentation. arXiv preprint arXiv:2205.02833, 2022.
|
| 306 |
+
|
| 307 |
+
Yin Zhou, Pei Sun, Yu Zhang, Dragomir Anguelov, Jiyang Gao, Tom Ouyang, James Guo, Jiquan Ngiam, and Vijay Vasudevan. End-to-end multi-view fusion for 3d object detection in lidar point clouds. In Conference on Robot Learning, pp. 923–932. PMLR, 2020.
|
| 308 |
+
|
| 309 |
+
Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020.
|
| 310 |
+
|
| 311 |
+
Jannik Zürn, Johan Vertens, and Wolfram Burgard. Lane graph estimation for scene understanding in urban driving. IEEE Robotics and Automation Letters, 6(4):8615–8622, 2021.
|
| 312 |
+
|
| 313 |
+
# A EXPERIMENT SETUP
|
| 314 |
+
|
| 315 |
+
# A.1 DATASET
|
| 316 |
+
|
| 317 |
+
nuScenes We experiment on nuScenes (Caesar et al., 2020) dataset, which contains 1000 sequences of recordings collected by autonomous driving cars. Each episode is annotated at $2 \mathrm { H z }$ and contains 6 camera images and LiDAR sweeps. Our dataset setup and pre-processing steps are identical to that of HDMapNet (Li et al., 2021), which includes three categories of map elements – pedestrian crossing, divider, and road boundary – from the nuScenes dataset.
|
| 318 |
+
|
| 319 |
+
Argoverse2 We further conduct experiments on Argoverse2 (Wilson et al., 2021) dataset. Like nuScenes, it contains 1000 logs (700, 150, 150 for training, validation and test set). Each episode provides 15s of $2 0 \mathrm { H z }$ camera images, $1 0 \mathrm { H z }$ LiDAR sweeps and a vectorized map. We use the same pre-processing settings as on nuScenes dataset.
|
| 320 |
+
|
| 321 |
+
# A.2 METRICS
|
| 322 |
+
|
| 323 |
+
In contrast to existing methods which generate rasterized results, our method does not require rasterizing curves on grids. Therefore, we opt not to use Intersection-Over-Union (IoU) as a metric. We use a distance-based metric to evaluate the similarity between predicted curves and ground-truth curves. We follow the instance-level evaluation metric proposed by HDMapNet (Li et al., 2021) to compare the instance-level detection performance of our model to baseline methods. The metric is average precision (AP), where positive/negative samples are based on geometric similarity, more concretely, Chamfer distance and Fréchet distance. For clarity, we call the AP based on Chamfer distance and Fréchet distance as Chamfer AP and Fréchet AP, respectively.
|
| 324 |
+
|
| 325 |
+
Chamfer distance. Chamfer distance is a distance measure that quantifies the similarity between two unordered sets. The Chamfer distance is an evaluation metric that quantifies the similarity between two unordered sets by taking into account the distance of each permutation of the elements of set as follows:
|
| 326 |
+
|
| 327 |
+
$$
|
| 328 |
+
D _ { c h a m f e r } ( S _ { 1 } , S _ { 2 } ) = \frac { 1 } { 2 } ( \frac { 1 } { | S _ { 1 } | } \sum _ { p \in S _ { 1 } } \operatorname* { m i n } _ { q \in S _ { 2 } } \| p , q \| _ { 2 } + \frac { 1 } { | S _ { 2 } | } \sum _ { q \in S _ { 2 } } \operatorname* { m i n } _ { p \in S _ { 1 } } \| q , p \| _ { 2 } ) .
|
| 329 |
+
$$
|
| 330 |
+
|
| 331 |
+
In our experiments, we use chamfer distance to calculate the distance between a prediction and a ground truth polyline set, and each polyline set is represented by uniformly sampling a polyline to $N _ { p t s }$ vertices, where $N _ { p t s }$ is set to 100 in our experiments.
|
| 332 |
+
|
| 333 |
+
Fréchet distance. The order of polyline vertices is not measured by Chamfer distance. Therefore, we introduce Fréchet distance as an additional measure. Fréchet distance is a measure of similarity of curves that takes both the positions and the order of the points along the curves into consideration. Our implementation is based on discrete Fréchet distance (Eiter & Mannila, 1994; Agarwal et al., 2014).
|
| 334 |
+
|
| 335 |
+
We use the discrete version of Fréchet distance (Eiter & Mannila, 1994; Agarwal et al., 2014) to evaluate the geometric similarity between two polyline $P$ and $Q$ . We denote $\sigma ( P )$ as a sequence of endpoints of the line segments of $P$ . In particular, $\sigma ( P ) = ( p _ { 1 } , \dots , p _ { m } )$ is a sequence with $m$ vertices that uniformly sampled from the original input polyline $P$ , where each position of $P$ between $p _ { i }$ and $p _ { i + 1 }$ can be approximated by using an affine transformation that is $p _ { i + \lambda } = ( 1 - \lambda ) p _ { i } + \lambda p _ { i + 1 }$ and the $m$ in our experiment is set as 100.
|
| 336 |
+
|
| 337 |
+
Let $P$ and $Q$ be polyline and $\sigma ( P ) = ( u _ { 1 } , \ldots , u _ { p } ) $ and $\sigma ( Q ) = ( v _ { 1 } , . . . , v _ { q } )$ the corresponding sequences. A coupling $L$ is a sequence of distinct pairs between $\sigma ( P )$ and $\sigma ( Q )$ :
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
( u _ { a _ { 1 } } , v _ { b _ { 1 } } ) , \ldots , ( u _ { a _ { m } } , v _ { b _ { m } } ) .
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
These indexes $\{ a _ { 1 } , \ldots , a _ { m } \}$ and $\{ b _ { 1 } , \ldots , b _ { m } \}$ are nondecreasing surjection such that $a _ { 1 } ~ = ~ 1$ , $a _ { m } = p , b _ { 1 } = 1 , b _ { m } =$ $b _ { m } = q$ and for all $i < j \in \{ 1 , \ldots , q \} , a _ { i } \leq a _ { j }$ and $b _ { i } \leq b _ { j }$ .
|
| 344 |
+
|
| 345 |
+
We define the norm $\lVert L \rVert$ of the $L$ is the length of the longest pair in $L$ , that is,
|
| 346 |
+
|
| 347 |
+
$$
|
| 348 |
+
\| L \| = \operatorname* { m a x } _ { i = 1 , \ldots , m } d ( u _ { a _ { i } } , v _ { b _ { i } } ) .
|
| 349 |
+
$$
|
| 350 |
+
|
| 351 |
+
The discrete Fréchet distance between polyline $P$ and $Q$ is defined to be
|
| 352 |
+
|
| 353 |
+
This equation indicates that the distance of discrete Fréchet distance is the minimum norm of all possible couplings. To Find the coupling plausible $L$ that has the minimum norm, we use a Dynamic programming-based algorithm that is described in Algorithm 1.
|
| 354 |
+
|
| 355 |
+
# Algorithm 1: The Algorithm of Discrete Fréchet Distance
|
| 356 |
+
|
| 357 |
+
Input: polyline $P = ( u _ { 1 } , \ldots , u _ { p } ) $ and $Q = ( v _ { 1 } , \ldots , v _ { q } )$ .
|
| 358 |
+
Output: $\delta _ { d F } ( P , Q )$
|
| 359 |
+
$c a :$ an 2d array of real with size of $( p \times q )$ ;
|
| 360 |
+
Function $c ( i , j )$ if $c a ( i , j ) > - 1$ then return $c a ( i , j )$ ; else if $i = 1$ and $j = 1$ then $c a ( i , j ) : = d ( u 1 , v 1 )$ ; else if $i > 1$ and $j = 1$ then $c a ( i , j ) : = \operatorname* { m a x } \{ c ( i - 1 , 1 ) , d ( u _ { i } , v _ { 1 } ) \}$ ; else if $i = 1$ and $j > 1$ then $c a ( i , j ) : = \operatorname* { m a x } \{ c ( 1 , j - 1 ) , d ( u _ { 1 } , v _ { j } ) \} ;$ ; else if $i > 1$ and $j > 1$ then $c a ( i , j ) : = \operatorname* { m a x } ^ { } \{ \operatorname* { m i n } ( c ( i - 1 , j ) , c ( i - 1 , j - 1 ) , c ( i , j - 1 ) ) , d ( u _ { i } , v _ { j } ) \} ;$ else $c a ( i , j ) : = \infty$ ; end return $c a ( i , j )$ ;
|
| 361 |
+
end
|
| 362 |
+
begin for $i = 1$ to p do for $j = 1$ to q do $\mathrm { c a ( i , j ) } \mathrel { \mathop : } = - 1 . 0 $ ; end end return $c ( p , q )$ ;
|
| 363 |
+
end
|
| 364 |
+
|
| 365 |
+
B MORE VISUALIZATIONS OF VECTORMAPNET (FUSION)
|
| 366 |
+
|
| 367 |
+
We visualized three cases of VectorMapNet (Fusion) and VectorMapNet (Camera) to demonstrate that LiDAR information can complement visual information to generate more robust map predictions. In the first case, the camera view is constrained by the nearby vehicles, so it can not provide helpful surrounding information. LiDAR sensor bypasses the nearby vehicle and provides some cue for VectorMapNet to generate a better result than its camera-only counterpart (see Figure 6). For the second case (see Figure 7), the model cannot detect the nearby parking gate because it locates in the blind zone of cameras. In contrast, the LiDAR provides depth information and helps the VectorMapNet(Fusion) detect the missing lane boundary. LiDAR points can prevent the model from falsely detecting map elements in bad weather conditions as well. As shown in Figure 8, some puddles are near the intersection. With the light reflection, these puddles visually look like a lane boundary. However, the LiDAR data shows that there does not have any bump in there. Unlike the camera-only model, this depth information from LiDAR helps our fusion model not generate a non existed lane boundary.
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 6: When the ego car cameras are occluded by the nearby vehicles, VectorMapNet(Camera) can not precept the surrounding map. With the depth cue from LiDAR, VectorMapNet(Fusion) can generate a more plausible result than its camera counterpart.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 7: The blind area of onboard cameras may cause our model to miss the map elements closed ego vehicle. In contrast, we can easily find that LiDAR data has sensed some obstacles near the ego vehicle in the right-most column. With these cues, our fusion model detects the missed lane boundary by our camera-only model.
|
| 374 |
+
|
| 375 |
+
# C IMPLEMENTATION DETAILS
|
| 376 |
+
|
| 377 |
+
# C.1 OVERALL ARCHITECTURES.
|
| 378 |
+
|
| 379 |
+
BEV feature extractor outputs a feature map with a size of (200, 100, 128). It uses ResNet50 (He et al., 2016) for shared CNN backbone. We use a single layer PointNet (Qi et al., 2017) whose outputs have 64 dimensions as the LiDAR backbone to aggregate LiDAR points into a pillar. We set the number of element queries $N _ { \mathrm { m a x } }$ in map element detector as 100. The transformer decoders we used in map element detector and polyline generator both have 6 decoder layers, and their hidden embeddings’ size is 256. For the output space of polyline generator, we divide the map space (see $\ S \ : 2 . 3 )$ evenly into $2 0 0 \times 1 0 0$ rectangular grids, and each grid has a size of $0 . 3 m \times 0 . 3 m$ .
|
| 380 |
+
|
| 381 |
+

|
| 382 |
+
Figure 8: The qualitative results of VectorMapNet in bad weather conditions. VectorMapNet(Camera) falsely detects these puddles near the intersection as a lane boundary. The fusion result shows that the miss detection issue can be resolved by combining the depth information.
|
| 383 |
+
|
| 384 |
+
# C.2 TRAINING SETTINGS.
|
| 385 |
+
|
| 386 |
+
We train all our models on 8 GTX3090 GPUs for 110 epochs with a total batch size of 32. We use AdamW (Loshchilov & Hutter, 2018) optimizer with a gradient clipping norm of 5.0. For the learning rate schedule, we use a step schedule that multiplies a learning rate by 0.1 at epoch 100 and has a linear warm-up period at the first 5000 steps. The dropout rate for all modules is 0.2, following the transformer’s settings (Vaswani et al., 2017). Data augmentation is only deployed during polyline generator’s training; specifically, two I.I.D. Gaussian noises are added to each input vertex’s $x$ and $y$ coordinates with a probability of 0.3.
|
| 387 |
+
|
| 388 |
+
# C.3 MODEL DETAILS
|
| 389 |
+
|
| 390 |
+
Camera Branch of Map Feature Extractor. For image data $\mathcal { T }$ , we use a shared CNN backbone to obtain each camera’s image features in the camera space, then use the Inverse Perspective Mapping (IPM) (Mallot et al., 1991) technique to transform these features into BEV space. Since the depth information is missing in camera images, we follow one common approach that assumes the ground is mostly planar and transforms the images to BEV via homography. Without knowing the exact height of the ground plane, this homography is not an accurate transformation. To alleviate this issue, we transform the image features into four BEV planes with different heights ( we use $( - 1 m , 0 m , 1 m , 2 m )$ in practice). The camera BEV features $\mathcal { F } _ { \mathrm { B E V } } ^ { \mathcal { Z } } \in \mathbb { R } ^ { W \times H \times C _ { 1 } }$ are the concatenation of these feature maps.
|
| 391 |
+
|
| 392 |
+
# C.4 LOSS
|
| 393 |
+
|
| 394 |
+
Loss settings. The loss function of map element detector is a linear combination of three parts: a negative log-likelihood for element keypoint classification, a smooth L1 loss, and an IoU loss for keypoints regression. The coefficients of these loss components are $2 , 0 . 1 , 1$ . The matching cost of map element detector is the same as the loss combination. The loss function of polyline generator is a negative log-likelihood. We train VectorMapNet by simply summing up these losses.
|
| 395 |
+
|
| 396 |
+
map element detector loss. To get the loss, we first establish a correspondence between the groundtruth $( { \mathcal { A } } , { \mathcal { L } } )$ and the prediction $( \bar { \mathcal { A } } , \hat { \mathcal { L } } )$ . Assuming the number of ground-truth map element keypoints $N$ is smaller than the number of predictions $N _ { m a x }$ , and we pad the set of ground-truth $( { \mathcal { A } } , { \mathcal { L } } )$ with ∅s (no object) up to $N _ { m a x }$ . The correspondence $\sigma$ is a permutation of $N _ { m a x }$ elements $\sigma \in \mathcal { P }$ with the lowest cost: σ∈P PNmaxj=1 −1(lj ̸=∅)pˆσ(j)(lj ) + −1(lj ̸=∅)Lkeypoint(aj , aˆσ(j)), where $\hat { p } _ { \sigma ( j ) } ( l _ { j } )$ is the probability of class label $l _ { j }$ for the prediction with index $\sigma ( j )$ , and the loss of keypoints parameters $\mathcal { L } _ { k e y p o i n t }$ is an addition of a smooth L1 loss and an IoU loss. With these notations we define the loss of detector as:
|
| 397 |
+
|
| 398 |
+
$$
|
| 399 |
+
\mathcal { L } _ { d e t } = \sum _ { j = 1 } ^ { N _ { m a x } } - \log \hat { p } _ { \sigma ^ { * } ( j ) } ( l _ { j } ) + \mathbb { 1 } _ { ( l _ { j } \neq \emptyset ) } \mathcal { L } _ { k e y p o i n t } \big ( a _ { j } , \hat { a } _ { \sigma ^ { * } ( j ) } \big ) ,
|
| 400 |
+
$$
|
| 401 |
+
|
| 402 |
+
where $\sigma ^ { * }$ is the optimal assignment computed by Hungarian algorithm (Kuhn, 1955).
|
| 403 |
+
|
| 404 |
+
# D MORE ABLATION STUDIES
|
| 405 |
+
|
| 406 |
+
# D.1 CURVE SAMPLING STRATEGIES
|
| 407 |
+
|
| 408 |
+
Table 5: Ablation study of curves sampling strategies.
|
| 409 |
+
|
| 410 |
+
<table><tr><td></td><td colspan="4">Frechet Distance</td><td colspan="4">Chamfer Distance</td></tr><tr><td>Vertex Sampling Method</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td></tr><tr><td>curvature-based</td><td>47.0</td><td>47.4</td><td>56.9</td><td>50.4</td><td>27.6</td><td>34.4</td><td>35.4</td><td>32.5</td></tr><tr><td>fixed interval</td><td>26.0</td><td>23.6</td><td>37.1</td><td>28.9</td><td>14.6</td><td>17.6</td><td>18.7</td><td>17.0</td></tr></table>
|
| 411 |
+
|
| 412 |
+
We use two approaches to sample polylines. The first is based on the original nuScenes setting (Caesar et al., 2020), which samples vertices at the position where the curvature changes are beyond a certain threshold. The second is to sample the vertices at fixed intervals $( 1 m )$ . We compare our methods under these two sampling strategies and the results are shown in Table 5. The curvature-based sampling outperforms its fixed-sampling counterpart by a large margin and achieves a leading 21.5 Fréchet mAP and 15.5 Chamfer mAP. We hypothesize that the fixed-sampling method involves a large set of redundant vertices that have negligible contributions to the geometry, thus under-weighs the essential vertices (e.g. the vertices at the corner of a polyline) in the learning process.
|
| 413 |
+
|
| 414 |
+
# D.2 VERTEX MODELING METHODS.
|
| 415 |
+
|
| 416 |
+
Table 6: Ablation study of vertex modeling methods.
|
| 417 |
+
|
| 418 |
+
<table><tr><td></td><td colspan="4">Frechet Distance</td><td colspan="4">Chamfer Distance</td></tr><tr><td>Modeling Method</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td><td>APped</td><td>APdivider</td><td>APboundary</td><td>mAP</td></tr><tr><td>discrete</td><td>47.0</td><td>47.4</td><td>56.9</td><td>50.4</td><td>27.6</td><td>34.4</td><td>35.4</td><td>32.5</td></tr><tr><td>continuous</td><td>38.0</td><td>41.6</td><td>46.1</td><td>41.9</td><td>26.5</td><td>28.1</td><td>30.1</td><td>26.5</td></tr></table>
|
| 419 |
+
|
| 420 |
+
We investigate both discrete and continuous ways to model polyline vertices. The discrete version of polyline generator is described in $\ S \ : 2 . 3$ . With the same model structure, we follow SketchRNN (Ha & Eck, 2017) and use mixture of Gaussian distributions to model the vertices of polylines as continuous variables. The comparison is shown in Table 6. We find that using discrete embeddings vertex coordinates results in a considerable gain in performance, with Chamfer mAP increasing from 18.2 to 32.5 and the Fréchet mAP increasing from 26.8 to 50.4. These improvements suggest that the nonlocal characteristic of categorical distribution helps our model to capture complex vertex coordinate distributions.
|
parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Qx8lUU8CzQ/Qx8lUU8CzQ_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/S9GpoS2TmN/S9GpoS2TmN.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/S9GpoS2TmN/S9GpoS2TmN_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/TySnJ-0RdKI/TySnJ-0RdKI.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/TySnJ-0RdKI/TySnJ-0RdKI_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/TySnJ-0RdKI/TySnJ-0RdKI_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/UW5A3SweAH/UW5A3SweAH.md
ADDED
|
Binary file (53.5 kB). View file
|
|
|
parse/dev/UW5A3SweAH/UW5A3SweAH_content_list.json
ADDED
|
@@ -0,0 +1,984 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "LM-Nav: Robotic Navigation with Large Pre-Trained Models of Language, Vision, and Action ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
102,
|
| 9 |
+
821,
|
| 10 |
+
151
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Dhruv $\\mathbf { S h a h } ^ { \\dagger \\beta }$ , Błazej Osi ˙ nski ´ †\u0000!, Brian Ichter\u0000, Sergey Levine\u0000\u0000 \u0000UC Berkeley, !University of Warsaw, \u0000Robotics at Google ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
271,
|
| 19 |
+
175,
|
| 20 |
+
728,
|
| 21 |
+
207
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract: Goal-conditioned policies for robotic navigation can be trained on large, unannotated datasets, providing for good generalization to real-world settings. However, particularly in vision-based settings where specifying goals requires an image, this makes for an unnatural interface. Language provides a more convenient modality for communication with robots, but contemporary methods typically require expensive supervision, in the form of trajectories annotated with language descriptions. We present a system, LM-Nav, for robotic navigation that enjoys the benefits of training on unannotated large datasets of trajectories, while still providing a high-level interface to the user. Instead of utilizing a labeled instruction following dataset, we show that such a system can be constructed entirely out of pre-trained models for navigation (ViNG), image-language association (CLIP), and language modeling (GPT-3), without requiring any fine-tuning or language-annotated robot data. LM-Nav extracts landmarks names from an instruction, grounds them in the world via the image-language model, and then reaches them via the (vision-only) navigation model. We instantiate LM-Nav on a real-world mobile robot and demonstrate long-horizon navigation through complex, outdoor environments from natural language instructions. ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
233,
|
| 30 |
+
238,
|
| 31 |
+
764,
|
| 32 |
+
473
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "1 Introduction ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
176,
|
| 42 |
+
493,
|
| 43 |
+
310,
|
| 44 |
+
511
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "One of the central challenges in robotic learning is to enable robots to perform a wide variety of tasks on command, following high-level instructions from humans. This requires robots that can understand human instructions, and are equipped with a large repertoire of diverse behaviors to execute such instructions in the real world. Prior work on instruction following in navigation has largely focused on learning from trajectories annotated with textual instructions [1–5]. This enables understanding of textual instructions, but the cost of data annotation impedes wide adoption. On the other hand, recent work has shown that learning robust navigation is possible through goalconditioned policies trained with self-supervision. These utilize large, unlabeled datasets to train vision-based controllers via hindsight relabeling [6–11]. They provide scalability, generalization, and robustness, but usually involve a clunky mechanism for goal specification, using locations or images. In this work, we aim to combine the strengths of both approaches, enabling a robotic navigation system to execute natural language instructions by leveraging the capabilities of pretrained models without any user-annotated navigational data. Our method uses these models to construct an “interface” that humans can use to communicate desired tasks to robots. This system enjoys the impressive generalization capabilities of the pre-trained language and vision-language models, enabling the robotic system to accept complex high-level instructions. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
174,
|
| 53 |
+
525,
|
| 54 |
+
825,
|
| 55 |
+
746
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Our main observation is that we can utilize off-the-shelf pre-trained models trained on large corpora of visual and language datasets — that are widely available and show great few-shot generalization capabilities — to create this interface for embodied instruction following. To achieve this, we combine the strengths of two such robot-agnostic pre-trained models with a pre-trained navigation model. We use a visual navigation model (VNM: ViNG [11]) to create a topological “mental map” of the environment using the robot’s observations from a prior exploration of the environment. Given free-form textual instructions, we use a pre-trained large language model (LLM: GPT-3 [12]) to decode the instructions into a sequence of textual landmarks. We then use a vision-language model (VLM: CLIP [13]) for grounding these textual landmarks in the topological map, by inferring a joint likelihood over the landmarks and nodes. A novel search algorithm is then used to plan a path for the robot, which is then executed by VNM. While reducing the task of language following to a combination of grounding and subgoal selection discards a lot of useful cues such as relations and verbs, we find that it is still sufficient to follow a variety of natural language instructions. ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
174,
|
| 64 |
+
752,
|
| 65 |
+
825,
|
| 66 |
+
863
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "image",
|
| 72 |
+
"img_path": "images/cdb206c3d407ba510326ccf7d1004e366652f1c06fc8d0d6cf1b7fd1a3e778c8.jpg",
|
| 73 |
+
"image_caption": [
|
| 74 |
+
"Figure 1: Embodied instruction following with LM-Nav: Our system takes as input a set of raw observations from the target environment and free-form textual instructions (left), deriving an actionable plan using three pretrained models: a large language model (LLM) for extracting landmarks, a vision-and-language model (VLM) for grounding, and a visual navigation model (VNM) for execution. This enables LM-Nav to follow textual instructions in complex environments purely from visual observations (right) without any fine-tuning. "
|
| 75 |
+
],
|
| 76 |
+
"image_footnote": [],
|
| 77 |
+
"bbox": [
|
| 78 |
+
209,
|
| 79 |
+
90,
|
| 80 |
+
787,
|
| 81 |
+
227
|
| 82 |
+
],
|
| 83 |
+
"page_idx": 1
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "",
|
| 88 |
+
"bbox": [
|
| 89 |
+
174,
|
| 90 |
+
311,
|
| 91 |
+
825,
|
| 92 |
+
381
|
| 93 |
+
],
|
| 94 |
+
"page_idx": 1
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"type": "text",
|
| 98 |
+
"text": "Our primary contribution is Large Model Navigation, or LM-Nav, an embodied instruction following system that combines three large independently pre-trained models — a robotic control model that utilizes visual observations and physical actions (VNM), a vision-language model that grounds images in text but has no context of embodiment (VLM), and a large language model that can parse and translate text but has no sense of visual grounding or embodiment (LLM) — to enable longhorizon instruction following in complex, real-world environments. We present the first instantiation of a robotic system that combines the confluence of pre-trained vision-and-language models with $a$ goal-conditioned controller, to derive actionable plans without any fine-tuning in the target environment. Notably, all three models are trained on large-scale datasets, with self-supervised objectives, and used off-the-shelf with no fine-tuning — no human annotations of the robot navigation data are necessary to train LM-Nav. We show that LM-Nav is able to successfully follow natural language instructions in pre-explored environments over the course of 100s of meters of complex, suburban navigation, while disambiguating paths with fine-grained commands. ",
|
| 99 |
+
"bbox": [
|
| 100 |
+
173,
|
| 101 |
+
387,
|
| 102 |
+
825,
|
| 103 |
+
566
|
| 104 |
+
],
|
| 105 |
+
"page_idx": 1
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"type": "text",
|
| 109 |
+
"text": "2 Related Work ",
|
| 110 |
+
"text_level": 1,
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
588,
|
| 114 |
+
321,
|
| 115 |
+
604
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Early works in augmenting navigation policies with natural language commands use statistical machine translation [14] to discover data-driven patterns to map free-form commands to a formal language defined by a grammar [15–19]. However, these approaches tend to operate on structured state spaces. Our work is closely inspired by methods that instead reduce this task to a sequence prediction problem [1, 20, 21]. Notably, our goal is similar to the task of VLN — leveraging fine-grained instructions to control a mobile robot solely from visual observations [1, 2]. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
174,
|
| 124 |
+
621,
|
| 125 |
+
825,
|
| 126 |
+
704
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "However, most recent approaches to VLN use a large dataset of simulated trajectories — over 1M demonstrations — annotated with fine-grained language labels in indoor [1, 3–5, 22] and driving scenarios [23–28], and rely on sim-to-real transfer for deployment in simple indoor environments [29, 30]. However, this necessitates building a photo-realistic simulator resembling the target environment, which can be challenging for unstructured environments, especially for the task of outdoor navigation. Instead, LM-Nav leverages free-form textual instructions to navigate a robot in complex, outdoor environments without access to any simulation or any trajectory-level annotations. ",
|
| 133 |
+
"bbox": [
|
| 134 |
+
174,
|
| 135 |
+
710,
|
| 136 |
+
825,
|
| 137 |
+
808
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Recent progress in using large-scale models of natural language and images trained on diverse data has enabled applications in a wide variety of textual [31–33], visual [13, 34–38], and embodied domains [39–44]. In the latter category, approaches either fine-tune embeddings from pre-trained models on robot data with language labels [39, 40, 44], assume that the low-level agent can execute textual instructions (without addressing control) [41], or assume access to a set of text-conditioned skills that can follow atomic textual commands [42]. All of these approaches require access to lowlevel skills that can follow rudimentary textual commands, necessitating language annotations for robotic experience and a strong assumption on the robot’s capabilities. In contrast, we combine these pre-trained vision and language models with pre-trained visual policies that do not use any language annotations [11, 45] without fine-tuning these models for the task of VLN. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
174,
|
| 146 |
+
814,
|
| 147 |
+
825,
|
| 148 |
+
911
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "",
|
| 155 |
+
"bbox": [
|
| 156 |
+
176,
|
| 157 |
+
92,
|
| 158 |
+
823,
|
| 159 |
+
133
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 2
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Data-driven approaches to vision-based mobile robot navigation often use photorealistic simulators [46–49] or supervised data collection [50] to learn goal-reaching policies directly from raw observations. Self-supervised methods for navigation [6–11, 51] instead can use unlabeled datasets of trajectories by automatically generating labels using onboard sensors and hindsight relabeling. While such policies are adept at navigating to goal locations or images, they may be unable to parse high-level instructions such as free-form text. LM-Nav uses self-supervised policies trained in a large number of prior environments, augmented with pre-trained vision and language models for parsing natural language instructions, and deploys them in novel real-world environments without any fine-tuning. We emphasize that while LM-Nav relies on a pre-built topological graph, similar to prior work [11, 51, 52], this assumption may be relaxed by incorporating exploration heuristics in unseen environments [53], and can be an interesting avenue for future work. ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
174,
|
| 168 |
+
140,
|
| 169 |
+
825,
|
| 170 |
+
291
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 2
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "3 Preliminaries ",
|
| 177 |
+
"text_level": 1,
|
| 178 |
+
"bbox": [
|
| 179 |
+
174,
|
| 180 |
+
308,
|
| 181 |
+
318,
|
| 182 |
+
324
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 2
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "LM-Nav consists of three large, pretrained models for processing language, associating images with language, and visual navigation. ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
174,
|
| 191 |
+
334,
|
| 192 |
+
418,
|
| 193 |
+
390
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 2
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "Large language models are generative models of text trained on large corpora of internet text using selfsupervised learning. LM-Nav uses the GPT-3 LLM [12] to parse instructions into a sequence of landmarks. ",
|
| 200 |
+
"bbox": [
|
| 201 |
+
174,
|
| 202 |
+
397,
|
| 203 |
+
418,
|
| 204 |
+
478
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 2
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "image",
|
| 210 |
+
"img_path": "images/683d73805d3e7939564aeea5baaab91d102767414128f5e981392e281743c41e.jpg",
|
| 211 |
+
"image_caption": [
|
| 212 |
+
"Figure 2: LM-Nav uses CLIP to infer a joint distribution over textual landmarks and image observations. VNM infers a goalconditioned distance function and policy that can control the robot. "
|
| 213 |
+
],
|
| 214 |
+
"image_footnote": [],
|
| 215 |
+
"bbox": [
|
| 216 |
+
431,
|
| 217 |
+
338,
|
| 218 |
+
821,
|
| 219 |
+
426
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 2
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"text": "Vision-and-language models refer to models that can associate images and text, e.g. image captioning, visual question-answering, etc. [54–56]. We use the CLIP VLM [13], a model that jointly encodes images and text into a shared embedding space, to jointly encode a set of landmark descriptions $t$ obtained from the LLM and a set of images $i _ { k }$ to obtain their VLM embeddings $\\{ T , I _ { k } \\}$ (see Fig. 3). Computing the cosine similarity between these embeddings, followed by a softmax operation results in probabilities $P ( i _ { k } | t )$ , corresponding to the likelihood that image $i _ { k }$ corresponds to the string $t$ . LM-Nav uses this probability to align landmark descriptions with images. ",
|
| 226 |
+
"bbox": [
|
| 227 |
+
174,
|
| 228 |
+
486,
|
| 229 |
+
823,
|
| 230 |
+
582
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 2
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "Visual navigation models learn navigational affordances directly from visual observations [11, 51, 57–59], associating images and actions through time. We use the ViNG VNM [11], a goalconditioned model that predicts temporal distances between pairs of images and the corresponding actions to execute (see Fig. 3). The VNM serves two purposes: (i) given a set of observations in the target environment, the distance predictions from the VNM can be used to construct a topological graph $\\mathcal { G } ( V , E )$ that represents a “mental map” of the environment; (ii) given a “walk” (i.e., a sequence of connected subgoals to the goal), VNM can control the robot along this plan. The topological graph $\\mathcal { G }$ is an important abstraction that allows a simple interface for planning over past experience in the environment and has been successfully used in prior work to perform long-horizon navigation [52, 53, 60]. To deduce connectivity in $\\mathcal { G }$ , we use a combination of learned distance estimates, temporal proximity (during data collection), and spatial proximity (using GPS measurements). For more details on the construction of this graph, see Appendix B. ",
|
| 237 |
+
"bbox": [
|
| 238 |
+
174,
|
| 239 |
+
588,
|
| 240 |
+
825,
|
| 241 |
+
755
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 2
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "text",
|
| 247 |
+
"text": "4 LM-Nav: Instruction Following with Pre-Trained Models ",
|
| 248 |
+
"text_level": 1,
|
| 249 |
+
"bbox": [
|
| 250 |
+
174,
|
| 251 |
+
770,
|
| 252 |
+
683,
|
| 253 |
+
787
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 2
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "LM-Nav combines the components discussed earlier to follow natural language instructions in the real world. The LLM parses free-form instructions into a list of landmarks $\\bar { \\ell }$ (Sec. 4.2), the VLM associates these landmarks with nodes in the graph by estimating the probability that each node $\\bar { v }$ corresponds to each $\\bar { \\ell }$ , $P ( \\bar { v } | \\bar { \\ell } )$ (Sec. 4.3), and the VNM is used to infer how effectively the robot can navigate between each pair of nodes in the graph, denoted by a probability $P ( \\overline { { v _ { i } , v _ { j } } } )$ . To find the optimal “walk” on the graph that both (i) adheres to the provided instructions and (ii) minimizes traversal cost, we derive a probabilistic objective (Sec. 4.1) and show how it can be optimized using a graph search algorithm (Sec. 4.4). This walk is executed in the real world by the VNM model. ",
|
| 260 |
+
"bbox": [
|
| 261 |
+
174,
|
| 262 |
+
800,
|
| 263 |
+
825,
|
| 264 |
+
911
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 2
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "image",
|
| 270 |
+
"img_path": "images/b1b2fa82edac16a0120d2339e823fea7b58d398d56531b5f850a8a9b7f4f41bd.jpg",
|
| 271 |
+
"image_caption": [
|
| 272 |
+
"Figure 3: System overview: (a) VNM uses a goal-conditioned distance function to infer connectivity between the set of raw observations and constructs a topological graph. (b) LLM translates natural language instructions into a sequence of textual landmarks. (c) VLM infers a joint probability distribution over the landmark descriptions and nodes in the graph, which is used by (d) a graph search algorithm to derive the optimal walk through the graph. (e) The robot drives following the walk in the real world using the VNM policy. "
|
| 273 |
+
],
|
| 274 |
+
"image_footnote": [],
|
| 275 |
+
"bbox": [
|
| 276 |
+
194,
|
| 277 |
+
88,
|
| 278 |
+
805,
|
| 279 |
+
270
|
| 280 |
+
],
|
| 281 |
+
"page_idx": 3
|
| 282 |
+
},
|
| 283 |
+
{
|
| 284 |
+
"type": "text",
|
| 285 |
+
"text": "4.1 Problem Formulation ",
|
| 286 |
+
"text_level": 1,
|
| 287 |
+
"bbox": [
|
| 288 |
+
174,
|
| 289 |
+
354,
|
| 290 |
+
362,
|
| 291 |
+
368
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 3
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "Given a sequence of landmark descriptions $\\bar { \\ell } = \\ell _ { 1 } , \\ell _ { 2 } , . . . , \\ell _ { n }$ extracted from the language command, our method needs to determine a sequence of waypoints $\\bar { v } = v _ { 1 } , v _ { 2 } , . . . , v _ { k }$ to command to the robot. Typically, $k \\geq n$ , since each landmark needs to be visited, but the traversal might require other waypoints in between the landmarks. Finding $\\bar { v }$ can formulated as a probabilistic inference problem. A key element in this formulation is access to a distribution $p ( v _ { i } | \\ell _ { j } )$ for each graph vertex $v _ { i }$ and landmark description $\\ell _ { j }$ . Recall that the graph vertices correspond to images observed by the robot, and thus, $p ( v _ { i } | \\ell _ { i } )$ represents a distribution over images given a language description. This can be obtained from the VLM. Intuitively, the full likelihood that we need to optimize to determine the robot’s plan will now depend on two terms: likelihoods of the form $p ( v _ { t _ { i } } | \\ell _ { i } )$ that describe how likely $v _ { t _ { i } }$ is to correspond to $\\ell _ { i }$ for an assignment $t _ { 1 } , t _ { 2 } , \\ldots , t _ { n }$ , and traversability likelihoods $p ( \\overline { { v _ { i } , v _ { i + 1 } } } )$ that describe how likely is the robot to be able to reach $v _ { i + 1 }$ from $v _ { i }$ . ",
|
| 298 |
+
"bbox": [
|
| 299 |
+
173,
|
| 300 |
+
378,
|
| 301 |
+
825,
|
| 302 |
+
531
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 3
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "While we can use a variety of traversability likelihood functions, a simple choice is to use a discounted Markovian model, where the discount $\\gamma$ models the probability of exiting at each time step, leading to a termination probability of $1 - \\gamma$ at each step, and a probability of reaching $v _ { i + 1 }$ given by $\\gamma ^ { D ( v _ { i } , v _ { i + 1 } ) }$ , where $D ( v _ { i } , v _ { i + 1 } )$ is the estimated number of time steps the robot needs to travel from $v _ { i }$ to $v _ { i + 1 }$ , which is predicted by the VNM. While other traversability likelihoods could also be used, this choice is a convenient consequence of goal-conditioned reinforcement learning formulations [61, 62], and thus, the log-likelihood corresponds to $D ( v _ { i } , v _ { i + 1 } )$ . We can use these likelihoods to derive the probability that a given sequence $\\bar { v }$ can be traversed successfully, which we denote with the auxiliary Bernoulli random variable $c _ { \\bar { v } }$ (i.e., $c _ { \\bar { v } } = 1$ implies that $\\bar { v }$ was traversed successfully): ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
173,
|
| 311 |
+
536,
|
| 312 |
+
825,
|
| 313 |
+
664
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 3
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "equation",
|
| 319 |
+
"img_path": "images/0fea46c5e5dbad94cd7a067fb7f96f59cce3892aef82ee65468e42c0756d338c.jpg",
|
| 320 |
+
"text": "$$\nP ( c _ { \\bar { v } } = 1 | \\bar { v } ) = \\prod _ { 1 \\leq i < T } P ( \\overline { { v _ { i } , v _ { i + 1 } } } ) = \\prod _ { 1 \\leq i < T } \\gamma ^ { D ( v _ { i } , v _ { i + 1 } ) } ,\n$$",
|
| 321 |
+
"text_format": "latex",
|
| 322 |
+
"bbox": [
|
| 323 |
+
313,
|
| 324 |
+
667,
|
| 325 |
+
683,
|
| 326 |
+
703
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 3
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "The full likelihood used for planning is then given by: ",
|
| 333 |
+
"bbox": [
|
| 334 |
+
176,
|
| 335 |
+
707,
|
| 336 |
+
529,
|
| 337 |
+
722
|
| 338 |
+
],
|
| 339 |
+
"page_idx": 3
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "equation",
|
| 343 |
+
"img_path": "images/eb30ba09161ddf104d131c3a36eb45fdf5730ef90239b25b0589f37187f2bd7c.jpg",
|
| 344 |
+
"text": "$$\nP ( \\operatorname { s u c c e s s } | \\bar { v } , \\bar { \\ell } ) \\propto P ( c _ { \\bar { v } } = 1 | \\bar { v } ) P ( \\bar { v } | \\bar { \\ell } ) = \\prod _ { 1 \\leq j < k } \\gamma ^ { D ( v _ { j } , v _ { j + 1 } ) } \\operatorname* { m a x } _ { 1 \\leq t _ { 1 } \\leq \\ldots \\leq t _ { n } \\leq k } \\prod _ { 1 \\leq i \\leq n } P ( v _ { t _ { i } } | \\ell _ { i } ) .\n$$",
|
| 345 |
+
"text_format": "latex",
|
| 346 |
+
"bbox": [
|
| 347 |
+
187,
|
| 348 |
+
726,
|
| 349 |
+
790,
|
| 350 |
+
761
|
| 351 |
+
],
|
| 352 |
+
"page_idx": 3
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"type": "text",
|
| 356 |
+
"text": "4.2 Parsing Free-Form Textual Instructions ",
|
| 357 |
+
"text_level": 1,
|
| 358 |
+
"bbox": [
|
| 359 |
+
174,
|
| 360 |
+
773,
|
| 361 |
+
490,
|
| 362 |
+
790
|
| 363 |
+
],
|
| 364 |
+
"page_idx": 3
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "The user specifies the route they want the robot to take using natural language, while the objective above is defined in terms of a sequence of desired landmarks. To extract this sequence from the user’s natural language instruction we employ a large language model, which in our prototype is GPT-3 [12]. We used a prompt with 2 examples of correct landmarks’ extractions, followed by the description to be translated by the LLM. Examples of instructions and landmarks extracted by the model can be found in Fig. 4. The prompt was selected to disambiguate nuanced cases, e.g. when order of landmarks in the text is different than in the expected path (see example in Fig. 4 a). For details of the “prompt engineering” please see Appendix A. ",
|
| 369 |
+
"bbox": [
|
| 370 |
+
173,
|
| 371 |
+
800,
|
| 372 |
+
825,
|
| 373 |
+
912
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 3
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "4.3 Visually Grounding Landmark Descriptions ",
|
| 380 |
+
"text_level": 1,
|
| 381 |
+
"bbox": [
|
| 382 |
+
176,
|
| 383 |
+
92,
|
| 384 |
+
519,
|
| 385 |
+
106
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 4
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "As discussed in Sec. 4.1, a crucial element of selecting the walk through the graph is computing $\\bar { P } ( v _ { i } | \\ell _ { j } )$ , the probability that landmark description $v _ { i }$ refers to node $\\ell _ { j }$ (see Eqn. 2). With each node containing an image taken during initial data collection, the probability can be computed using CLIP [13] in the way described in Sec. 3 as the retrieval task. As presented in Fig. 2, we apply CLIP to the image at node $v _ { i }$ and caption prompt in the form of “This is a photo of a $I \\ell _ { j } J ^ { \\prime \\prime }$ . To go from CLIP model outputs, which are logits, to probabilities we use $\\begin{array} { r l } { P ( v _ { i } | \\ell _ { j } ) } & { { } = } \\end{array}$ $\\frac { \\exp { \\mathrm { C L I P } ( v _ { i } , \\ell _ { j } ) } } { \\sum _ { v \\in V } \\exp { \\mathrm { C L I P } ( v , \\ell _ { j } ) } }$ . The resulting probability $P ( v _ { i } | \\ell _ { j } )$ ",
|
| 392 |
+
"bbox": [
|
| 393 |
+
174,
|
| 394 |
+
117,
|
| 395 |
+
477,
|
| 396 |
+
333
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 4
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "Algorithm 1: Graph Search ",
|
| 403 |
+
"text_level": 1,
|
| 404 |
+
"bbox": [
|
| 405 |
+
503,
|
| 406 |
+
122,
|
| 407 |
+
689,
|
| 408 |
+
136
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 4
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "1: Input: Landmarks $( \\ell _ { 1 } , \\ell _ { 2 } , \\dots , \\ell _ { n } )$ . \n2: Input: Graph $\\mathcal { G } ( V , E )$ . \n3: Input: Starting node $S$ . \n4: $\\forall i \\mathop { = } 0 , . . . , n \\ Q [ i , v ] = - \\infty$ \nv V \n5: $Q [ 0 , S ] = 0$ \n6: Dijkstra algorithm $( { \\mathcal { G } } , Q [ 0 , * ] )$ \n7: for $_ { i }$ in $1 , 2 , \\ldots , n$ do \n8: $\\forall v \\in V Q [ i , v ] = Q [ i - 1 , v ] + { \\mathrm { C L I P } } ( v , \\ell _ { i } )$ \n9: Dijkstra algorithm $( \\mathcal { G } , \\boldsymbol { Q } [ i , * ] )$ \n10: end for \n11: destination = $: \\arg \\operatorname* { m a x } ( Q [ n , * ] )$ \n12: return backtrack(destination, $Q [ n , * ] )$ ",
|
| 415 |
+
"bbox": [
|
| 416 |
+
504,
|
| 417 |
+
138,
|
| 418 |
+
828,
|
| 419 |
+
305
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 4
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": ", together with the inferred edges’ distances will be used to select the optimal walk. ",
|
| 426 |
+
"bbox": [
|
| 427 |
+
171,
|
| 428 |
+
319,
|
| 429 |
+
776,
|
| 430 |
+
334
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 4
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "4.4 Graph Search for the Optimal Walk ",
|
| 437 |
+
"text_level": 1,
|
| 438 |
+
"bbox": [
|
| 439 |
+
174,
|
| 440 |
+
352,
|
| 441 |
+
464,
|
| 442 |
+
367
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 4
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "As described in Sec. 4.1, LM-Nav aims at finding a walk ${ \\bar { v } } = ( v _ { 1 } , v _ { 2 } , \\ldots , v _ { k } )$ that maximizes the probability of successful execution of $\\bar { v }$ that adheres to the given list of landmarks $\\bar { \\ell }$ . We can define a function $R ( \\bar { v } , \\bar { t } )$ for a monotonically increasing sequence of indices $\\bar { t } = ( t _ { 1 } , t _ { 2 } , \\ldots , t _ { n } )$ : ",
|
| 449 |
+
"bbox": [
|
| 450 |
+
174,
|
| 451 |
+
378,
|
| 452 |
+
826,
|
| 453 |
+
421
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 4
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "equation",
|
| 459 |
+
"img_path": "images/fd44da91cd2d3aecfae4e4c84f63bf9280125d51a2cfcb3ff42869dde524b03c.jpg",
|
| 460 |
+
"text": "$$\nR ( \\bar { v } , \\bar { t } ) : = \\sum _ { i = 1 } ^ { n } \\mathbf { C } \\mathbf { L } \\mathbf { I } \\mathbf { P } ( v _ { t _ { i } } , \\ell _ { i } ) - \\alpha \\sum _ { j = 1 } ^ { T - 1 } D ( v _ { j } , v _ { j + 1 } ) , \\mathrm { w h e r e } \\alpha = - \\log \\gamma .\n$$",
|
| 461 |
+
"text_format": "latex",
|
| 462 |
+
"bbox": [
|
| 463 |
+
266,
|
| 464 |
+
429,
|
| 465 |
+
733,
|
| 466 |
+
474
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 4
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "$R$ has the property that $( \\bar { v } )$ maximizes $P ( { \\mathrm { s u c c e s s } } | { \\bar { v } } , { \\bar { \\ell } } )$ defined in Eqn. 2, if and only if there exists $\\bar { t }$ such that $( \\bar { v } , \\bar { t } )$ maximizes $R$ . In order to find such $( { \\bar { v } } , { \\bar { t } } )$ , we employ dynamic programming. In particular we define a helper function $Q ( i , v )$ for $i \\in \\{ 0 , 1 , \\ldots , n \\}$ , $v \\in V$ : ",
|
| 473 |
+
"bbox": [
|
| 474 |
+
174,
|
| 475 |
+
484,
|
| 476 |
+
825,
|
| 477 |
+
527
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 4
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "equation",
|
| 483 |
+
"img_path": "images/3c4e4c478a8ad14f8e62b20f169e9389acb9921301fefb1094842cc5342735d2.jpg",
|
| 484 |
+
"text": "$$\nQ ( i , v ) = \\operatorname * { m a x } _ { \\bar { v } = ( v _ { 1 } , v _ { 2 } , \\ldots , v _ { j } ) , v _ { j } = v } R ( \\bar { v } , \\bar { t } ) .\n$$",
|
| 485 |
+
"text_format": "latex",
|
| 486 |
+
"bbox": [
|
| 487 |
+
374,
|
| 488 |
+
535,
|
| 489 |
+
624,
|
| 490 |
+
571
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 4
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "text",
|
| 496 |
+
"text": "$Q ( i , v )$ represents the maximal value of $R$ for a walk ending in $v$ that visited the landmarks up to index $i$ . The base case $Q ( 0 , v )$ visits none of the landmarks, and its value of $R$ is simply equal to minus the length of shortest path from the starting node $S$ . For $i > 0$ we have: ",
|
| 497 |
+
"bbox": [
|
| 498 |
+
173,
|
| 499 |
+
582,
|
| 500 |
+
825,
|
| 501 |
+
625
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 4
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "equation",
|
| 507 |
+
"img_path": "images/8a28ff9891fc63014438410b72c40f58901525205294395db82fa1affc907079.jpg",
|
| 508 |
+
"text": "$$\nQ ( i , v ) = \\operatorname* { m a x } \\bigg ( Q ( i - 1 , v ) + \\mathbf { C L I P } ( v , \\ell _ { i } ) , \\operatorname* { m a x } _ { w \\in \\mathrm { n e i g h b o r s } ( v ) } Q ( i , w ) - \\alpha \\cdot D ( v , w ) \\bigg ) .\n$$",
|
| 509 |
+
"text_format": "latex",
|
| 510 |
+
"bbox": [
|
| 511 |
+
227,
|
| 512 |
+
631,
|
| 513 |
+
769,
|
| 514 |
+
666
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 4
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "The base case for DP is to compute $Q ( 0 , V )$ . Then, in each step of $\\mathsf { D P } i = 1 , 2 , \\hdots , n$ we compute $Q ( i , v )$ . This computation resembles the Dijkstra algorithm ([63]). In each iteration, we pick the node $v$ with the largest value of $Q ( i , v )$ and update its neighbors based on the Eqn. 5. Algorithm 1 summarizes this search process. The result of this algorithm is a walk $\\bar { v } = ( \\bar { v _ { 1 } } , v _ { 2 } , \\ldots , v _ { k } )$ that maximizes the probability of successfully carrying out the instruction. Such a walk can be executed by VNM, using its action estimates to sequentially navigate to these nodes. ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
173,
|
| 523 |
+
675,
|
| 524 |
+
825,
|
| 525 |
+
761
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 4
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "5 System Evaluation ",
|
| 532 |
+
"text_level": 1,
|
| 533 |
+
"bbox": [
|
| 534 |
+
174,
|
| 535 |
+
781,
|
| 536 |
+
361,
|
| 537 |
+
799
|
| 538 |
+
],
|
| 539 |
+
"page_idx": 4
|
| 540 |
+
},
|
| 541 |
+
{
|
| 542 |
+
"type": "text",
|
| 543 |
+
"text": "We now describe our experiments deploying LM-Nav in a variety of outdoor settings to follow highlevel natural language instructions with a small ground robot (Clearpath Jackal UGV platform — see Fig. 1(right) for image and Appendix C for details). For all experiments, the weights of LLM, VLM, and VNM are frozen — there is no fine-tuning or annotation in the target environment. We evaluate the complete system, as well as the individual components of LM-Nav, to understand its strengths and limitations. Our experiments demonstrate the ability of LM-Nav to follow high-level instructions, disambiguate paths, and reach goals that are up to $8 0 0 \\mathrm { m }$ away. ",
|
| 544 |
+
"bbox": [
|
| 545 |
+
173,
|
| 546 |
+
813,
|
| 547 |
+
825,
|
| 548 |
+
911
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 4
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "image",
|
| 554 |
+
"img_path": "images/7f0b953760dc44b7c1418a299c2122cf58d20f27f2a7435a50bde205cb38b011.jpg",
|
| 555 |
+
"image_caption": [
|
| 556 |
+
"Figure 4: Qualitative examples of LM-Nav in real-world environments executing textual instructions (left). The landmarks extracted by LLM (highlighted in text) are grounded into visual observations by VLM (center; overhead image not available to the robot). The resulting walk of the graph is executed by VNM (right). "
|
| 557 |
+
],
|
| 558 |
+
"image_footnote": [],
|
| 559 |
+
"bbox": [
|
| 560 |
+
174,
|
| 561 |
+
89,
|
| 562 |
+
821,
|
| 563 |
+
251
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 5
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "text",
|
| 569 |
+
"text": "5.1 Following Instructions with LM-Nav ",
|
| 570 |
+
"text_level": 1,
|
| 571 |
+
"bbox": [
|
| 572 |
+
176,
|
| 573 |
+
311,
|
| 574 |
+
465,
|
| 575 |
+
327
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 5
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "In each evaluation environment, we first construct the graph by manually driving the robot and collecting image and GPS observations. The graph is constructed automatically using the VNM to predict relative distances between images in these trajectories. We tested our system on 20 queries in 2 environments, corresponding to a combined length of over 6km. The instructions include prominent landmarks that can be identified from the robot’s observations, e.g., buildings and stop signs. ",
|
| 582 |
+
"bbox": [
|
| 583 |
+
174,
|
| 584 |
+
338,
|
| 585 |
+
823,
|
| 586 |
+
407
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 5
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "Fig. 4 shows qualitative examples of the path taken by the robot. In Fig. 4(a), LM-Nav is able to successfully localize the simple landmarks from its prior traversal and find a short path to the goal. While there are multiple stop signs in the environment, the objective in Eqn. 2 causes the robot to pick the correct one, minimizing overall trajectory length. Fig. 4(b) highlights LM-Nav’s ability to follow complex instructions with multiple landmarks — despite the possibility of taking a shorter route directly to the final landmark, the robot follows a path that correctly visits all of the landmarks. ",
|
| 593 |
+
"bbox": [
|
| 594 |
+
173,
|
| 595 |
+
412,
|
| 596 |
+
825,
|
| 597 |
+
497
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 5
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "Missing landmarks. While LM-Nav is effective at finding a path through landmarks extracted from instructions, it relies on the assumption that the landmarks (i) exist in the environment, and (ii) can be identified by the VLM. Fig. 4(c) illustrates a case where the executed path fails to visit one of the landmarks — a fire hydrant — and takes a path that goes around the top of the building rather than the bottom. This failure mode is attributed to the the inability of the VLM to detect a fire hydrant from the robot’s observations. On independently evaluating the efficacy of the VLM at retrieving landmarks (see Sec. 5.3), we find that despite being the best off-the-shelf model for our task, CLIP is unable to retrieve a small number of “hard” landmarks, including fire hydrants and cement mixers. In many practical cases, the robot is still successful in finding a path that visits the remaining landmarks. ",
|
| 604 |
+
"bbox": [
|
| 605 |
+
174,
|
| 606 |
+
503,
|
| 607 |
+
509,
|
| 608 |
+
751
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 5
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "image",
|
| 614 |
+
"img_path": "images/cddfa480832567c85f538dec77051e38f41222da437d61826e4c6d64957b8bbe.jpg",
|
| 615 |
+
"image_caption": [
|
| 616 |
+
"Figure 5: LM-Nav can successfully disambiguate instructions with same start-goal locations that differ slightly. The landmarks are underscored in text and their locations are marked with pins. "
|
| 617 |
+
],
|
| 618 |
+
"image_footnote": [],
|
| 619 |
+
"bbox": [
|
| 620 |
+
524,
|
| 621 |
+
503,
|
| 622 |
+
821,
|
| 623 |
+
676
|
| 624 |
+
],
|
| 625 |
+
"page_idx": 5
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"type": "text",
|
| 629 |
+
"text": "Disambiguation with instructions. Since the objective of LM-Nav is to follow instructions, and not merely to reach the final goal, different instructions may lead to different traversals. Fig. 5 shows an example where modifying the instruction can disambiguate multiple paths to the goal. Given the shorter prompt (blue), LM-Nav prefers the more direct path. On specifying a more fine-grained route (magenta), LM-Nav takes an alternate path that passes a different set of landmarks. ",
|
| 630 |
+
"bbox": [
|
| 631 |
+
174,
|
| 632 |
+
757,
|
| 633 |
+
825,
|
| 634 |
+
827
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 5
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "5.2 Quantitative Analysis ",
|
| 641 |
+
"text_level": 1,
|
| 642 |
+
"bbox": [
|
| 643 |
+
174,
|
| 644 |
+
843,
|
| 645 |
+
362,
|
| 646 |
+
858
|
| 647 |
+
],
|
| 648 |
+
"page_idx": 5
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"type": "text",
|
| 652 |
+
"text": "To quantify the performance of LM-Nav, we introduce the following metrics. A walk found by the graph search is successful, if (1) it matches the path intended by the user or (2) if the landmark images extracted by the search algorithm contain said landmarks (i.e. if the path visits landmarks with the same description, even if not exactly the same). Planning success is the fraction of successful walks found by the search algorithm. Efficiency of a walk is defined as the ratio of the lengths of the described route and the executed one; the value is clipped at a maximum of 1 to account for the cases when the LM-Nav executes a path shorter than the user intended. For a set of queries, we report the average efficiency over successful experiments. The planning efficiency is similarly defined as the ratio of the length of the described and planned routes. Finally, number of disengagements is the average number of human interventions per experiment due to unsafe maneuvers. ",
|
| 653 |
+
"bbox": [
|
| 654 |
+
176,
|
| 655 |
+
869,
|
| 656 |
+
823,
|
| 657 |
+
911
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 5
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "table",
|
| 663 |
+
"img_path": "images/03235a2bb14ba3f31f315bc06285278832e86446832a6a3c9d419b04189f5285.jpg",
|
| 664 |
+
"table_caption": [
|
| 665 |
+
"Table 1: Quantifying navigational instruction following with LM-Nav over 20 experiments. LM-Nav can successfully plan a path to the goal, and follow it efficiently, over 100s of meters. Ablating the VNM (GPS-Nav) severely hurts performance due to frequent disengagements inability to reason about collisions with obstacles. "
|
| 666 |
+
],
|
| 667 |
+
"table_footnote": [],
|
| 668 |
+
"table_body": "<table><tr><td>System</td><td>Environment</td><td>Net Success ↑</td><td>Efficiency ↑</td><td>#Diseng.↓</td><td>Planning ↑</td></tr><tr><td>GPS-Nav (No VNM)</td><td>EnvSmall-10</td><td>0.23</td><td>0.93</td><td>0.75</td><td>0.9</td></tr><tr><td rowspan=\"2\"> LM-Nav (Ours)</td><td>EnvSmall-10</td><td>0.8</td><td>0.96</td><td>0.1</td><td>0.9</td></tr><tr><td> EnvLarge-10</td><td>0.8</td><td>0.89</td><td>0</td><td>0.8</td></tr></table>",
|
| 669 |
+
"bbox": [
|
| 670 |
+
189,
|
| 671 |
+
89,
|
| 672 |
+
808,
|
| 673 |
+
161
|
| 674 |
+
],
|
| 675 |
+
"page_idx": 6
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"type": "table",
|
| 679 |
+
"img_path": "images/ebaaa87166711051cbd5ac7ffff6e1176c2d162084b0c708ee70403dd2e5c678.jpg",
|
| 680 |
+
"table_caption": [
|
| 681 |
+
"Table 2: GPT-3 consistently outperforms alternatives in parsing free-form instructions into landmarks. "
|
| 682 |
+
],
|
| 683 |
+
"table_footnote": [],
|
| 684 |
+
"table_body": "<table><tr><td>LLM Candidate</td><td>Avg.Extraction Success</td></tr><tr><td>Noun Chunks</td><td>0.88</td></tr><tr><td>fairseq-1.3B [64]</td><td>0.52</td></tr><tr><td>fairseq-13B [64]</td><td>0.76</td></tr><tr><td>GPT-J-6B [65]</td><td>0.80</td></tr><tr><td>GPT-NeoX-20B [66]</td><td>0.72</td></tr><tr><td>GPT-3 [12]</td><td>1.0</td></tr></table>",
|
| 685 |
+
"bbox": [
|
| 686 |
+
184,
|
| 687 |
+
223,
|
| 688 |
+
496,
|
| 689 |
+
327
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 6
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "table",
|
| 695 |
+
"img_path": "images/72cddcb1e34e3b74e9af37204a78124e850ffc65384442d6440deecc18ceff35.jpg",
|
| 696 |
+
"table_caption": [
|
| 697 |
+
"Table 3: CLIP-ViT produces the most reliable landmark detections from visual observations. "
|
| 698 |
+
],
|
| 699 |
+
"table_footnote": [],
|
| 700 |
+
"table_body": "<table><tr><td>VLM Candidate</td><td>Detection Rate</td></tr><tr><td>Faster-RCNN [67]</td><td>0.07</td></tr><tr><td>ViLD [36]</td><td>0.38</td></tr><tr><td>CLIP-ViT [13]</td><td>0.87</td></tr></table>",
|
| 701 |
+
"bbox": [
|
| 702 |
+
545,
|
| 703 |
+
236,
|
| 704 |
+
785,
|
| 705 |
+
303
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 6
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "text",
|
| 711 |
+
"text": "",
|
| 712 |
+
"bbox": [
|
| 713 |
+
174,
|
| 714 |
+
376,
|
| 715 |
+
825,
|
| 716 |
+
473
|
| 717 |
+
],
|
| 718 |
+
"page_idx": 6
|
| 719 |
+
},
|
| 720 |
+
{
|
| 721 |
+
"type": "text",
|
| 722 |
+
"text": "Table 1 summarizes the quantitative performance of the system over 20 instructions. LM-Nav generates a successful walk for $8 5 \\%$ of them, and causes disengagement only once (an average of 1 intervention per $6 . 4 \\mathrm { k m }$ of traversals). Investigating the planning failure modes suggests that the most critical component of our system is the ability of VLM to detect certain landmarks, e.g. a fire hydrant, and in challenging lighting conditions, e.g. underexposed images. ",
|
| 723 |
+
"bbox": [
|
| 724 |
+
174,
|
| 725 |
+
479,
|
| 726 |
+
825,
|
| 727 |
+
549
|
| 728 |
+
],
|
| 729 |
+
"page_idx": 6
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"type": "text",
|
| 733 |
+
"text": "5.3 Dissecting LM-Nav ",
|
| 734 |
+
"text_level": 1,
|
| 735 |
+
"bbox": [
|
| 736 |
+
174,
|
| 737 |
+
568,
|
| 738 |
+
346,
|
| 739 |
+
582
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 6
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "To understand the influence of each of the components of LM-Nav, we conduct experiments to evaluate these components in isolation. For more details about these experiments, see Appendix D. ",
|
| 746 |
+
"bbox": [
|
| 747 |
+
176,
|
| 748 |
+
593,
|
| 749 |
+
823,
|
| 750 |
+
622
|
| 751 |
+
],
|
| 752 |
+
"page_idx": 6
|
| 753 |
+
},
|
| 754 |
+
{
|
| 755 |
+
"type": "text",
|
| 756 |
+
"text": "To evaluate the performance of LLM candidates in parsing instructions into an ordered list of landmarks, we compare GPT-3 (used by LM-Nav) to other state-of-the-art pre-trained language models — fairseq [64], GPT-J-6B [65], and GPT-NeoX-20B [66] — as well as a simple baseline using spaCy NLP library [68] that extracts base noun phrases, followed by filtering. In Table 2 we report the average extraction success for all the methods on the 20 prompts used in Section 5.2. GPT-3 significantly outperforms other models, owing to its superior representation capabilities and in-context learning [69]. The noun chunking performs surprisingly reliably, correctly solving many simple prompts. For further details on these experiments, see Appendix D.2. ",
|
| 757 |
+
"bbox": [
|
| 758 |
+
173,
|
| 759 |
+
627,
|
| 760 |
+
825,
|
| 761 |
+
739
|
| 762 |
+
],
|
| 763 |
+
"page_idx": 6
|
| 764 |
+
},
|
| 765 |
+
{
|
| 766 |
+
"type": "text",
|
| 767 |
+
"text": "To evaluate the VLM’s ability to ground these textual landmarks in visual observations, we set up an object detection experiment. Given an unlabeled image from the robot’s on-board camera and a set of textual landmarks, the task is to retrieve the corresponding label. We run this experiment on a set of 100 images from the environments discussed earlier, and a set of 30 commonly-occurring landmarks. These landmarks are a combination of the landmarks retrieved by the LLM in our ",
|
| 768 |
+
"bbox": [
|
| 769 |
+
176,
|
| 770 |
+
746,
|
| 771 |
+
823,
|
| 772 |
+
815
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 6
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "table",
|
| 778 |
+
"img_path": "images/9db95e65b238c1205e9410b9cc8c6354630107bc75aeb8fee365ba9f16d00d14.jpg",
|
| 779 |
+
"table_caption": [],
|
| 780 |
+
"table_footnote": [],
|
| 781 |
+
"table_body": "<table><tr><td></td><td colspan=\"2\">EnvSmall-10</td><td colspan=\"2\">EnvLarge-10</td></tr><tr><td>Planner</td><td>Pl. Success ↑</td><td>Pl. Efficiency 个</td><td>Pl. Success ↑</td><td>Pl. Efficiency ↑</td></tr><tr><td>Max Likelihood</td><td>0.6</td><td>0.69</td><td>0.2</td><td>0.17</td></tr><tr><td>LM-Nav (Ours)</td><td>0.9</td><td>0.80</td><td>0.8</td><td>0.99</td></tr></table>",
|
| 782 |
+
"bbox": [
|
| 783 |
+
228,
|
| 784 |
+
825,
|
| 785 |
+
766,
|
| 786 |
+
892
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 6
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"text": "Table 4: Ablating the search algorithm (Sec. 4.4) gives a max likelihood planner that ignores reachability information, resulting in inefficient plans that are up to $6 \\times$ longer than LM-Nav for the same instruction. ",
|
| 793 |
+
"bbox": [
|
| 794 |
+
169,
|
| 795 |
+
902,
|
| 796 |
+
825,
|
| 797 |
+
929
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 6
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "experiments from Sec. 5.1 and manually curated ones. We report the detection successful if any of the top 3 predictions adhere to the contents of the image. We compare the retrieval success of our VLM (CLIP) with some object detection alternatives — Faster-RCNN-FPN [67, 70], a state-of-theart object detection model pre-trained on MS-COCO [71, 72], and ViLD [36], an open-vocabulary object detector based on CLIP and Mask-RCNN [73]. To evaluate against the closed-vocabulary baseline, we modify the setup by projecting the landmarks onto the set of MS-COCO class labels. We find that CLIP outperforms baselines by a wide margin, suggesting that its visual model transfers very well to robot observations (see Table 3). Despite deriving from CLIP, ViLD struggles with detecting complex landmarks like “manhole cover” and “glass building”. Faster-RCNN is unable to detect common MS-COCO objects like “traffic light”, “person” and ”stop sign”, likely due to the on-board images being out-of-distribution for the model. ",
|
| 804 |
+
"bbox": [
|
| 805 |
+
174,
|
| 806 |
+
90,
|
| 807 |
+
825,
|
| 808 |
+
243
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 7
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "text",
|
| 814 |
+
"text": "To understand the importance of the VNM, we run an ablation experiment of LM-Nav without the navigation model. Using GPS-based distance estimates and a na¨ıve straight line controller between nodes of the topological graph. Table 1 summarizes these results — without VNM’s ability to reason about obstacles and traversability, the system frequently runs into small obstacles such as trees and curbs, resulting in failure. Fig. 6 illustrates such a case — while such a controller works well on open roads, it fails to reason about connectivity around buildings or obstacles and results in collisions with a curb, a tree, and a wall in 3 individual attempts. This illustrates that using a learned policy and distance function from the VNM is critical for LM-Nav to successfully navigate in complex environments. ",
|
| 815 |
+
"bbox": [
|
| 816 |
+
174,
|
| 817 |
+
250,
|
| 818 |
+
566,
|
| 819 |
+
443
|
| 820 |
+
],
|
| 821 |
+
"page_idx": 7
|
| 822 |
+
},
|
| 823 |
+
{
|
| 824 |
+
"type": "image",
|
| 825 |
+
"img_path": "images/1fd697708f3f005cfd11d088453ea2d6a9c9e122560ee6881cc81923adf7b255.jpg",
|
| 826 |
+
"image_caption": [
|
| 827 |
+
"Figure 6: GPS-Nav (red) fails to execute a plan due to its inability to reason about traversability through obstacles, while LM-Nav (blue) succeeds. "
|
| 828 |
+
],
|
| 829 |
+
"image_footnote": [],
|
| 830 |
+
"bbox": [
|
| 831 |
+
583,
|
| 832 |
+
258,
|
| 833 |
+
821,
|
| 834 |
+
359
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 7
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "text",
|
| 840 |
+
"text": "Lastly, to understand the importance of the two components of the graph search objective (Eqn. 3), we ran a set of ablations where the graph search only depends on $P \\overline { { ( \\bar { v } | \\dot { \\ell } ) } }$ , i.e. Max Likelihood Planning, which only picks the most likely landmark without reasoning about topological connectivity or traversability. Table 4 shows that such a planner suffers greatly in the form of efficiency, because it does not utilize the spatial organization of nodes and their connectivity. For more details on these experiments, and qualitative examples, see Appendix D. ",
|
| 841 |
+
"bbox": [
|
| 842 |
+
174,
|
| 843 |
+
449,
|
| 844 |
+
823,
|
| 845 |
+
534
|
| 846 |
+
],
|
| 847 |
+
"page_idx": 7
|
| 848 |
+
},
|
| 849 |
+
{
|
| 850 |
+
"type": "text",
|
| 851 |
+
"text": "6 Discussion ",
|
| 852 |
+
"text_level": 1,
|
| 853 |
+
"bbox": [
|
| 854 |
+
174,
|
| 855 |
+
545,
|
| 856 |
+
294,
|
| 857 |
+
563
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 7
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "text",
|
| 863 |
+
"text": "We presented Large Model Navigation, a robotic system that can execute textual instructions in the real-world without requiring any human annotations for navigation trajectories. LM-Nav combines three pre-trained models: the LLM, which parses instructions into a list of landmarks; the VLM, which infers joint probabilities between these landmarks and visual observations from the environment; and the VNM, which estimates navigational affordances (distances between landmarks) and control actions. Each model is pre-trained on its own dataset, and we show that the complete system can execute a variety of user-specified instructions in real-world environments — choosing the correct sequence of landmarks by leveraging language and spatial context — and handle mistakes (such as missing landmarks). We also analyze the impact of each pre-trained model on the full system. ",
|
| 864 |
+
"bbox": [
|
| 865 |
+
174,
|
| 866 |
+
570,
|
| 867 |
+
825,
|
| 868 |
+
695
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 7
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "text",
|
| 874 |
+
"text": "Limitations and future work. The most prominent limitation of LM-Nav is its reliance on landmarks: while the user can specify any instruction they want, LM-Nav only focuses on the landmarks and disregards any verbs, propositions, adverbs, etc. (e.g., “go straight for three blocks” or “drive past the dog very slowly”), which can be lossy. Grounding such nuances is an important direction for future work. Additionally, LM-Nav uses a VNM that is specific to outdoor navigation with the Jackal robot, which limits wider adoption for other robot embodiments and sensor suites. An exciting direction for future work would be to swap in a “general navigation model” [74] that can be utilized broadly across robots, analogous to how the LLM and VLM handle any text or image. In its current form, LM-Nav provides a simple and attractive prototype for how pre-trained models can be combined to solve complex robotic tasks, and illustrates that these models can serve as an “interface” to robotic controllers that are trained without any language annotations. One of the implications of this result is that further progress on self-supervised robotic policies (e.g., goal-conditioned policies) can directly benefit instruction following systems. More broadly, understanding how modern pretrained models enable effective decomposition of robotic control may enable broadly generalizable systems in the future, and we hope that LM-Nav will serve as a step in this direction. ",
|
| 875 |
+
"bbox": [
|
| 876 |
+
174,
|
| 877 |
+
702,
|
| 878 |
+
825,
|
| 879 |
+
909
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 7
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "text",
|
| 885 |
+
"text": "Acknowledgments ",
|
| 886 |
+
"text_level": 1,
|
| 887 |
+
"bbox": [
|
| 888 |
+
174,
|
| 889 |
+
92,
|
| 890 |
+
303,
|
| 891 |
+
106
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 8
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "This research was supported by DARPA Assured Autonomy, DARPA RACER, Toyota Research Institute, ARL DCIST CRA W911NF-17-2-0181, and AFOSR. BO was supported by the Fulbright Junior Research Award granted by the Polish-U.S. Fulbright Commission. We would like to thank Alexander Toshev for pivotal discussions in early stages of the project. We would also like to thank Kuan Fang, Siddharth Karamcheti, Albertyna Osinska, Vijay Badrinarayanan, and Philip J. Ball for ´ useful discussions and feedback. ",
|
| 898 |
+
"bbox": [
|
| 899 |
+
174,
|
| 900 |
+
114,
|
| 901 |
+
825,
|
| 902 |
+
198
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 8
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "References ",
|
| 909 |
+
"text_level": 1,
|
| 910 |
+
"bbox": [
|
| 911 |
+
174,
|
| 912 |
+
218,
|
| 913 |
+
266,
|
| 914 |
+
233
|
| 915 |
+
],
|
| 916 |
+
"page_idx": 8
|
| 917 |
+
},
|
| 918 |
+
{
|
| 919 |
+
"type": "text",
|
| 920 |
+
"text": "[1] P. Anderson, Q. Wu, D. Teney, J. Bruce, M. Johnson, N. Sunderhauf, I. Reid, S. Gould, and ¨ A. van den Hengel. Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3674–3683, 2018. 1, 2 \n[2] J. Gu, E. Stefani, Q. Wu, J. Thomason, and X. Wang. Vision-and-language navigation: A survey of tasks, methods, and future directions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022. 2 [3] A. Ku, P. Anderson, R. Patel, E. Ie, and J. Baldridge. Room-Across-Room: Multilingual vision-and-language navigation with dense spatiotemporal grounding. In Conference on Empirical Methods for Natural Language Processing (EMNLP), 2020. 2 [4] V. Jain, G. Magalhaes, A. Ku, A. Vaswani, E. Ie, and J. Baldridge. Stay on the path: Instruction fidelity in vision-and-language navigation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2019. \n[5] A. Yan, X. E. Wang, J. Feng, L. Li, and W. Y. Wang. Cross-lingual vision-language navigation, 2019. 1, 2 [6] T. Manderson, J. C. Gamboa, S. Wapnick, J. Tremblay, H. Zhao, F. Shkurti, D. Meger, and G. Dudek. Self-supervised, goal-conditioned policies for navigation in unstructured environments. 2010. 1, 3 \n[7] B. Sofman, E. L. Ratliff, J. A. D. Bagnell, J. Cole, N. Vandapel, and A. T. Stentz. Improving robot navigation through self-supervised online learning. Journal of Field Robotics: Special Issue on Machine Learning Based Robotics in Unstructured Environments, 2006. \n[8] D. Gandhi, L. Pinto, and A. Gupta. Learning to fly by crashing. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017. \n[9] A. Kouris and C.-S. Bouganis. Learning to fly by myself: A self-supervised cnn-based approach for autonomous navigation. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2018. \n[10] G. Kahn, A. Villaflor, B. Ding, P. Abbeel, and S. Levine. Self-Supervised Deep RL with Generalized Computation Graphs for Robot Navigation. In IEEE International Conference on Robotics and Automation (ICRA), 2018. \n[11] D. Shah, B. Eysenbach, G. Kahn, N. Rhinehart, and S. Levine. ViNG: Learning Open-World Navigation with Visual Goals. In IEEE International Conference on Robotics and Automation (ICRA), 2021. 1, 3 \n[12] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language models are few-shot learners. In Advances in Neural Information Processing Systems, 2020. 1, 3, 4, 7 \n[13] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, 2021. 2, 3, 5, 7, 1 \n[14] P. Koehn. Statistical Machine Translation. Cambridge University Press, 2009. 2 \n[15] Y. W. Wong and R. Mooney. Learning for semantic parsing with statistical machine translation. In Proceedings of the Human Language Technology Conference of the NAACL, Main Conference, 2006. 2 \n[16] C. Matuszek, D. Fox, and K. Koscher. Following directions using statistical machine translation. In 2010 5th ACM/IEEE International Conference on Human-Robot Interaction (HRI), 2010. \n[17] D. L. Chen and R. J. Mooney. Learning to interpret natural language navigation instructions from observations. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011. \n[18] S. Tellex, T. Kollar, S. Dickerson, M. R. Walter, A. G. Banerjee, S. Teller, and N. Roy. Understanding natural language commands for robotic navigation and mobile manipulation. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011. \n[19] C. Matuszek, E. Herbst, L. Zettlemoyer, and D. Fox. Learning to Parse Natural Language Commands to a Robot Control System. 2013. 2 \n[20] N. Shimizu and A. Haas. Learning to follow navigational route instructions. In Proceedings of the 21st International Joint Conference on Artificial Intelligence, IJCAI’09, 2009. 2 \n[21] H. Mei, M. Bansal, and M. R. Walter. Listen, attend, and walk: Neural mapping of navigational instructions to action sequences. In AAAI, 2016. 2 \n[22] M. Shridhar, J. Thomason, D. Gordon, Y. Bisk, W. Han, R. Mottaghi, L. Zettlemoyer, and D. Fox. ALFRED: A Benchmark for Interpreting Grounded Instructions for Everyday Tasks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2 \n[23] H. Chen, A. Suhr, D. Misra, N. Snavely, and Y. Artzi. Touchdown: Natural language navigation and spatial reasoning in visual street environments. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 \n[24] K. M. Hermann, M. Malinowski, P. Mirowski, A. Banki-Horvath, K. Anderson, and R. Hadsell. Learning to follow directions in street view. CoRR, 2019. \n[25] P. Mirowski, A. Banki-Horvath, K. Anderson, D. Teplyashin, K. M. Hermann, M. Malinowski, M. K. Grimes, K. Simonyan, K. Kavukcuoglu, A. Zisserman, and R. Hadsell. The streetlearn environment and dataset. CoRR, 2019. \n[26] A. B. Vasudevan, D. Dai, and L. Van Gool. Talk2nav: Long-range vision-and-language navigation with dual attention and spatial memory. Int. J. Comput. Vision, 2021. \n[27] D. K. Misra, A. Bennett, V. Blukis, E. Niklasson, M. Shatkhin, and Y. Artzi. Mapping instructions to actions in 3d environments with visual goal prediction. In E. Riloff, D. Chiang, J. Hockenmaier, and J. Tsujii, editors, Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, 2018. \n[28] V. Blukis, N. Brukhim, A. Bennett, R. A. Knepper, and Y. Artzi. Following high-level navigation instructions on a simulated quadcopter with imitation learning. CoRR, 2018. 2 \n[29] J. Krantz, E. Wijmans, A. Majumdar, D. Batra, and S. Lee. Beyond the nav-graph: Visionand-language navigation in continuous environments. In Computer Vision – ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XXVIII, 2020. 2 \n[30] P. Anderson, A. Shrivastava, J. Truong, A. Majumdar, D. Parikh, D. Batra, and S. Lee. Simto-real transfer for vision-and-language navigation. In Proceedings of the 2020 Conference on Robot Learning, 2021. 2 \n[31] T. Wolf, L. Debut, V. Sanh, J. Chaumond, C. Delangue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, and J. Brew. Huggingface’s transformers: State-of-the-art natural language processing. CoRR, 2019. 2 \n[32] R. Thoppilan, D. D. Freitas, J. Hall, N. Shazeer, A. Kulshreshtha, H. Cheng, A. Jin, T. Bos, L. Baker, Y. Du, Y. Li, H. Lee, H. S. Zheng, A. Ghafouri, M. Menegali, Y. Huang, M. Krikun, D. Lepikhin, J. Qin, D. Chen, Y. Xu, Z. Chen, A. Roberts, M. Bosma, Y. Zhou, C. Chang, I. Krivokon, W. Rusch, M. Pickett, K. S. Meier-Hellstern, M. R. Morris, T. Doshi, R. D. Santos, T. Duke, J. Soraker, B. Zevenbergen, V. Prabhakaran, M. Diaz, B. Hutchinson, K. Olson, A. Molina, E. Hoffman-John, J. Lee, L. Aroyo, R. Rajakumar, A. Butryna, M. Lamm, V. Kuzmina, J. Fenton, A. Cohen, R. Bernstein, R. Kurzweil, B. Aguera-Arcas, C. Cui, M. Croak, E. H. Chi, and Q. Le. Lamda: Language models for dialog applications. CoRR, 2022. \n[33] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, M. Petrov, H. Khlaaf, G. Sastry, P. Mishkin, B. Chan, S. Gray, N. Ryder, M. Pavlov, A. Power, L. Kaiser, M. Bavarian, C. Winter, P. Tillet, F. P. Such, D. Cummings, M. Plappert, F. Chantzis, E. Barnes, A. Herbert-Voss, W. H. Guss, A. Nichol, A. Paino, N. Tezak, J. Tang, I. Babuschkin, S. Balaji, S. Jain, W. Saunders, C. Hesse, A. N. Carr, J. Leike, J. Achiam, V. Misra, E. Morikawa, A. Radford, M. Knight, M. Brundage, M. Murati, K. Mayer, P. Welinder, B. McGrew, D. Amodei, S. McCandlish, I. Sutskever, and W. Zaremba. Evaluating large language models trained on code. CoRR, 2021. 2 \n[34] A. Ramesh, P. Dhariwal, A. Nichol, C. Chu, and M. Chen. Hierarchical text-conditional image generation with clip latents, 2022. 2 \n[35] C. Saharia, W. Chan, S. Saxena, L. Li, J. Whang, E. Denton, S. K. S. Ghasemipour, B. K. Ayan, S. S. Mahdavi, R. G. Lopes, T. Salimans, J. Ho, D. J. Fleet, and M. Norouzi. Photorealistic text-to-image diffusion models with deep language understanding, 2022. \n[36] X. Gu, T.-Y. Lin, W. Kuo, and Y. Cui. Open-vocabulary object detection via vision and language knowledge distillation. In International Conference on Learning Representations, 2022. 7, 8 \n[37] C. Jia, Y. Yang, Y. Xia, Y.-T. Chen, Z. Parekh, H. Pham, Q. Le, Y.-H. Sung, Z. Li, and T. Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In Proceedings of the 38th International Conference on Machine Learning, 2021. \n[38] H. Song, L. Dong, W. Zhang, T. Liu, and F. Wei. CLIP models are few-shot learners: Empirical studies on VQA and visual entailment. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022. 2 \n[39] M. Shridhar, L. Manuelli, and D. Fox. Cliport: What and where pathways for robotic manipulation. In Proceedings of the 5th Conference on Robot Learning (CoRL), 2021. 2 \n[40] E. Jang, A. Irpan, M. Khansari, D. Kappler, F. Ebert, C. Lynch, S. Levine, and C. Finn. BC-z: Zero-shot task generalization with robotic imitation learning. In 5th Annual Conference on Robot Learning, 2021. 2 \n[41] W. Huang, P. Abbeel, D. Pathak, and I. Mordatch. Language models as zero-shot planners: Extracting actionable knowledge for embodied agents. arXiv preprint arXiv:2201.07207, 2022. 2 \n[42] M. Ahn, A. Brohan, N. Brown, Y. Chebotar, O. Cortes, B. David, C. Finn, K. Gopalakrishnan, K. Hausman, A. Herzog, D. Ho, J. Hsu, J. Ibarz, B. Ichter, A. Irpan, E. Jang, R. J. Ruano, K. Jeffrey, S. Jesmonth, N. Joshi, R. Julian, D. Kalashnikov, Y. Kuang, K.-H. Lee, S. Levine, Y. Lu, L. Luu, C. Parada, P. Pastor, J. Quiambao, K. Rao, J. Rettinghouse, D. Reyes, P. Sermanet, N. Sievers, C. Tan, A. Toshev, V. Vanhoucke, F. Xia, T. Xiao, P. Xu, S. Xu, and M. Yan. Do as i can, not as i say: Grounding language in robotic affordances. In arXiv preprint arXiv:2204.01691, 2022. 2 \n[43] A. Zeng, M. Attarian, B. Ichter, K. Choromanski, A. Wong, S. Welker, F. Tombari, A. Purohit, M. Ryoo, V. Sindhwani, J. Lee, V. Vanhoucke, and P. Florence. Socratic models: Composing zero-shot multimodal reasoning with language. arXiv, 2022. 2 \n[44] A. Khandelwal, L. Weihs, R. Mottaghi, and A. Kembhavi. Simple but effective: Clip embeddings for embodied ai. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2 \n[45] D. Shah, B. Eysenbach, N. Rhinehart, and S. Levine. Rapid exploration for open-world navigation with latent goal models. In 5th Annual Conference on Robot Learning, 2021. 3 \n[46] Manolis Savva\\*, Abhishek Kadian\\*, Oleksandr Maksymets\\*, Y. Zhao, E. Wijmans, B. Jain, J. Straub, J. Liu, V. Koltun, J. Malik, D. Parikh, and D. Batra. Habitat: A Platform for Embodied AI Research. In IEEE/CVF International Conference on Computer Vision (ICCV), 2019. 3 \n[47] F. Xia, A. R. Zamir, Z.-Y. He, A. Sax, J. Malik, and S. Savarese. Gibson env: real-world perception for embodied agents. In Computer Vision and Pattern Recognition (CVPR), 2018 IEEE Conference on, 2018. \n[48] M. Savva, A. X. Chang, A. Dosovitskiy, T. Funkhouser, and V. Koltun. MINOS: Multimodal indoor simulator for navigation in complex environments. arXiv:1712.03931, 2017. \n[49] E. Kolve, R. Mottaghi, D. Gordon, Y. Zhu, A. Gupta, and A. Farhadi. AI2-THOR: an interactive 3d environment for visual AI. CoRR, 2017. 3 \n[50] A. Francis, A. Faust, H. T. L. Chiang, J. Hsu, J. C. Kew, M. Fiser, and T. W. E. Lee. LongRange Indoor Navigation With PRM-RL. IEEE Transactions on Robotics, 2020. 3 \n[51] N. Hirose, F. Xia, R. Mart´ın-Mart´ın, A. Sadeghian, and S. Savarese. Deep visual MPC-policy learning for navigation. IEEE Robotics and Automation Letters, 2019. 3 \n[52] X. Meng, N. Ratliff, Y. Xiang, and D. Fox. Scaling Local Control to Large-Scale Topological Navigation. In IEEE International Conference on Robotics and Automation (ICRA), 2020. 3 \n[53] D. Shah and S. Levine. Viking: Vision-based kilometer-scale navigation with geographic hints. In Robotics: Science and Systems (RSS), 2022. 3 \n[54] J.-B. Alayrac, J. Donahue, P. Luc, A. Miech, I. Barr, Y. Hasson, K. Lenc, A. Mensch, K. Millican, M. Reynolds, R. Ring, E. Rutherford, S. Cabi, T. Han, Z. Gong, S. Samangooei, M. Monteiro, J. Menick, S. Borgeaud, A. Brock, A. Nematzadeh, S. Sharifzadeh, M. Binkowski, R. Barreira, O. Vinyals, A. Zisserman, and K. Simonyan. Flamingo: a visual language model for few-shot learning, 2022. 3 \n[55] L. H. Li, M. Yatskar, D. Yin, C.-J. Hsieh, and K.-W. Chang. Visualbert: A simple and performant baseline for vision and language. In Arxiv, 2019. \n[56] Y.-C. Chen, L. Li, L. Yu, A. E. Kholy, F. Ahmed, Z. Gan, Y. Cheng, and J. Liu. Uniter: Universal image-text representation learning. In ECCV, 2020. 3 \n[57] N. Savinov, A. Dosovitskiy, and V. Koltun. Semi-Parametric Topological Memory for Navigation. In International Conference on Learning Representations, 2018. 3 \n[58] D. S. Chaplot, D. Gandhi, S. Gupta, A. Gupta, and R. Salakhutdinov. Learning to Explore using Active Neural SLAM. In International Conference on Learning Representations (ICLR), 2020. \n[59] E. Wijmans, A. Kadian, A. Morcos, S. Lee, I. Essa, D. Parikh, M. Savva, and D. Batra. DDPPO: Learning Near-Perfect PointGoal Navigators from 2.5 Billion Frames. In International Conference on Learning Representations (ICLR), 2020. 3 \n[60] J. Bruce, N. Sunderhauf, P. Mirowski, R. Hadsell, and M. Milford. Learning deployable navigation policies at kilometer scale from a single traversal. In A. Billard, A. Dragan, J. Peters, and J. Morimoto, editors, Proceedings of The 2nd Conference on Robot Learning, 2018. 3 ",
|
| 921 |
+
"bbox": [
|
| 922 |
+
171,
|
| 923 |
+
241,
|
| 924 |
+
826,
|
| 925 |
+
915
|
| 926 |
+
],
|
| 927 |
+
"page_idx": 8
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"type": "text",
|
| 931 |
+
"text": "",
|
| 932 |
+
"bbox": [
|
| 933 |
+
171,
|
| 934 |
+
56,
|
| 935 |
+
826,
|
| 936 |
+
915
|
| 937 |
+
],
|
| 938 |
+
"page_idx": 9
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"type": "text",
|
| 942 |
+
"text": "",
|
| 943 |
+
"bbox": [
|
| 944 |
+
171,
|
| 945 |
+
45,
|
| 946 |
+
826,
|
| 947 |
+
921
|
| 948 |
+
],
|
| 949 |
+
"page_idx": 10
|
| 950 |
+
},
|
| 951 |
+
{
|
| 952 |
+
"type": "text",
|
| 953 |
+
"text": "",
|
| 954 |
+
"bbox": [
|
| 955 |
+
169,
|
| 956 |
+
45,
|
| 957 |
+
826,
|
| 958 |
+
898
|
| 959 |
+
],
|
| 960 |
+
"page_idx": 11
|
| 961 |
+
},
|
| 962 |
+
{
|
| 963 |
+
"type": "text",
|
| 964 |
+
"text": "[61] L. P. Kaelbling. Learning to achieve goals. In IJCAI, pages 1094–1099, 1993. 4 ",
|
| 965 |
+
"bbox": [
|
| 966 |
+
171,
|
| 967 |
+
896,
|
| 968 |
+
735,
|
| 969 |
+
912
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 11
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "[62] K. Hartikainen, X. Geng, T. Haarnoja, and S. Levine. Dynamical Distance Learning for SemiSupervised and Unsupervised Skill Discovery. In International Conference on Learning Representations, 2020. 4 \n[63] E. W. Dijkstra. A note on two problems in connexion with graphs. Numerische mathematik, 1959. 5 \n[64] M. Artetxe, S. Bhosale, N. Goyal, T. Mihaylov, M. Ott, S. Shleifer, X. V. Lin, J. Du, S. Iyer, R. Pasunuru, et al. Efficient large scale language modeling with mixtures of experts. arXiv preprint arXiv:2112.10684, 2021. 7 \n[65] B. Wang and A. Komatsuzaki. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoflolz/mesh-transformer-jax, 2021. 7 \n[66] S. Black, S. Biderman, E. Hallahan, Q. Anthony, L. Gao, L. Golding, H. He, C. Leahy, K. McDonell, J. Phang, M. Pieler, U. S. Prashanth, S. Purohit, L. Reynolds, J. Tow, B. Wang, and S. Weinbach. Gpt-neox-20b: An open-source autoregressive language model, 2022. 7 \n[67] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, 2015. 7, 8 \n[68] M. Honnibal, I. Montani, S. Van Landeghem, and A. Boyd. spacy: Industrial-strength natural language processing in python. 2020. 7 \n[69] F. Rong. Extrapolating to unnatural language processing with gpt-3’s in-context learning: The good, the bad, and the mysterious. http://ai.stanford.edu/blog/ in-context-learning/, 2021. Accessed: 2022-06-04. 7, 1 \n[70] T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid ´ networks for object detection. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 8 \n[71] T.-Y. Lin, M. Maire, S. J. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. ´ Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 8 \n[72] Y. Wu, A. Kirillov, F. Massa, W.-Y. Lo, and R. Girshick. Detectron2. https://github.com/ facebookresearch/detectron2, 2019. 8 \n[73] K. He, G. Gkioxari, P. Dollar, and R. Girshick. Mask r-cnn. In ´ 2017 IEEE International Conference on Computer Vision (ICCV), 2017. 8 \n[74] D. Shah, A. Sridhar, A. Bhorkar, N. Hirose, and S. Levine. GNM: A General Navigation Model to Drive Any Robot. In arXiV, 2022. URL https://arxiv.org/abs/2210.03370. 8 ",
|
| 976 |
+
"bbox": [
|
| 977 |
+
171,
|
| 978 |
+
92,
|
| 979 |
+
826,
|
| 980 |
+
647
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 12
|
| 983 |
+
}
|
| 984 |
+
]
|
parse/dev/UW5A3SweAH/UW5A3SweAH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/UW5A3SweAH/UW5A3SweAH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|