kelseye commited on
Commit
59fbe48
·
verified ·
1 Parent(s): a364b20

Upload folder using huggingface_hub (part 15)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/dev/9_gsMA8MRKQ/images/8818d7bf77db4861679b7367b69cbccafc9fcd25986a2789b3585483287b887c.jpg +3 -0
  2. parse/dev/9_gsMA8MRKQ/images/917b96e2e1ad3cb9b87469b04c2a5b5c00b1b2ab31fee0606f5c348f1eed59fc.jpg +3 -0
  3. parse/dev/9_gsMA8MRKQ/images/93458215572ab7b42f8c1f90de0a83ab08153848dff855e773fedad75334eb50.jpg +3 -0
  4. parse/dev/9_gsMA8MRKQ/images/95877027654d4e7efacc70fe0ea767c5ac7ad71f59ff63bc34e24d713921b658.jpg +3 -0
  5. parse/dev/9_gsMA8MRKQ/images/9baeeac16f552e7c4b410cc4f653835e81698d31174a2226e1b284a645499a89.jpg +3 -0
  6. parse/dev/9_gsMA8MRKQ/images/9dc205e69ac66032e8c3730db431b89372dad8cb9267517c3912f705e914d3e2.jpg +3 -0
  7. parse/dev/9_gsMA8MRKQ/images/a15cf53b9eb5345d528ea5085ef3f28b634342d6ee81892dfbad0735d3381396.jpg +3 -0
  8. parse/dev/9_gsMA8MRKQ/images/a2e7363901e3b8916d3c35e0904ad12673e6e3f08744311688069bd06eeec87e.jpg +3 -0
  9. parse/dev/9_gsMA8MRKQ/images/a421452925d55e5bba73aef6f80750f27a7c1f59bed7ff0061b5a5caaa36cb23.jpg +3 -0
  10. parse/dev/9_gsMA8MRKQ/images/ac4e7c4a4f9c3000968e4a3b53010233dfe57a66b85938953eb34d3ba62d3c81.jpg +3 -0
  11. parse/dev/9_gsMA8MRKQ/images/b4805cf873028523a5f45447f469a86c759710dcd5271485d9edcbd87ed6a097.jpg +3 -0
  12. parse/dev/9_gsMA8MRKQ/images/b5f194ae83af40d923a0521a039031d8b9e099608076a58bb14fd82e21bea59e.jpg +3 -0
  13. parse/dev/9_gsMA8MRKQ/images/cd63d00d933be5c5694f80f0a4e368fd64bbf4e814a54d6b8e9b3be31149c83b.jpg +3 -0
  14. parse/dev/9_gsMA8MRKQ/images/d1f2d2eb681615ca5a4d842d9aee22669c35f43c6cc7f16b44fc1dd3db2e97b8.jpg +3 -0
  15. parse/dev/9_gsMA8MRKQ/images/d265382966b07f51d851971e323dbbdc7768866de6440dfd7556f7fd3dc52a34.jpg +3 -0
  16. parse/dev/9_gsMA8MRKQ/images/d44c305c6d08936691936e02908618c70c5a6aeab147af89df79b50d52d6df8a.jpg +3 -0
  17. parse/dev/9_gsMA8MRKQ/images/de250759338aab6eaf3aab7244869d5619400bfee86d39e593bfe1a83dd1b98e.jpg +3 -0
  18. parse/dev/9_gsMA8MRKQ/images/e9963aa034c4dcce463b362ca0f27c9b77deb00f3aab18bf6f61ff34e484850c.jpg +3 -0
  19. parse/dev/9_gsMA8MRKQ/images/eb6593fcb990afb0b57efcab44d51bd768e29f752012f9ea9bf5c20cb5c4105c.jpg +3 -0
  20. parse/dev/9_gsMA8MRKQ/images/ebedb03ce5a18467e0c534e08eaedb3b2f0dd93adc1d69db1c2655aceaba2c14.jpg +3 -0
  21. parse/dev/9_gsMA8MRKQ/images/f56c1dee06a8332744ec880b0dc39f4f3a5efa195bc1dbb8dbdf0cd39eaf2129.jpg +3 -0
  22. parse/dev/9_gsMA8MRKQ/images/f7e0dd85be81a02cc1bea81ff652a041ecc85f8d814f8c01b7c42615d821b3e1.jpg +3 -0
  23. parse/dev/9_gsMA8MRKQ/images/fec3c1410696e05698971c5d01f4e403aaad66f3984ee9149b0579d00276b6ee.jpg +3 -0
  24. parse/dev/9_gsMA8MRKQ/images/ffcaa5f88ddbd09770b9302079283a13d14990896e3d33524de2aa01b1d326b5.jpg +3 -0
  25. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ.md +243 -0
  26. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_content_list.json +1147 -0
  27. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_layout.pdf +3 -0
  28. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_middle.json +0 -0
  29. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_model.json +0 -0
  30. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_origin.pdf +3 -0
  31. parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_span.pdf +3 -0
  32. parse/dev/9h3KsOVXhLZ/images/1bb8bb00097fc003ed50452c518b133bb61db7f0945a63e73169aacad6d425e8.jpg +3 -0
  33. parse/dev/9h3KsOVXhLZ/images/3bba2b7d42766c9ff3a4f32481a61ce95bd523e3be23e40ee2e48340e3add62a.jpg +3 -0
  34. parse/dev/9h3KsOVXhLZ/images/430b51ce3631780d398a75dc7794e5aba609c20ad0b960bb5a5dca0210f1fdbb.jpg +3 -0
  35. parse/dev/9h3KsOVXhLZ/images/73828994b44f600185e85d70e76927cce9520e5ccd019e4f95bdf479fb194855.jpg +3 -0
  36. parse/dev/9h3KsOVXhLZ/images/74ca43b58bc04880ee39b4edeb852b7901f8ee82b6bd92c8f29c4e183958a2b7.jpg +3 -0
  37. parse/dev/9h3KsOVXhLZ/images/875790817d6f8f66d0085f280abbbf833d6cc0a510a1acc60b86080a75f38e4e.jpg +3 -0
  38. parse/dev/9h3KsOVXhLZ/images/a44e35c837372cddc6d07e6849d74323e28bf2af4ffd3ab4776283ad76cf9d69.jpg +3 -0
  39. parse/dev/9h3KsOVXhLZ/images/a87f4b17ae97d04fa2ccec404354fa712c08104ebdca9eedde6266d69c1cc000.jpg +3 -0
  40. parse/dev/9h3KsOVXhLZ/images/b7a6628efd2eae2119392aade7e89ec4e64d2435bd65751772febfd9330744d7.jpg +3 -0
  41. parse/dev/9h3KsOVXhLZ/images/bbec3b18183201f9ed3782f1477a1e4082f6dcb762564bffeab908496dfdcf90.jpg +3 -0
  42. parse/dev/9h3KsOVXhLZ/images/bff5b4163414025c27ee09c6e9bfb93d55e373aa201c681052eec140b863d86c.jpg +3 -0
  43. parse/dev/9h3KsOVXhLZ/images/ceb1ea2031ef2c2e53af6c2d1dc3d1053361e969b449e58a2d842f8df5d040e9.jpg +3 -0
  44. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP.md +427 -0
  45. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_content_list.json +0 -0
  46. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_layout.pdf +3 -0
  47. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_middle.json +0 -0
  48. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_model.json +0 -0
  49. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_origin.pdf +3 -0
  50. parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_span.pdf +3 -0
parse/dev/9_gsMA8MRKQ/images/8818d7bf77db4861679b7367b69cbccafc9fcd25986a2789b3585483287b887c.jpg ADDED

Git LFS Details

  • SHA256: e3447f74a55f032976d435596c8d90ff1d3027dfe9b9cd82e4e8c001c5338404
  • Pointer size: 130 Bytes
  • Size of remote file: 92 kB
parse/dev/9_gsMA8MRKQ/images/917b96e2e1ad3cb9b87469b04c2a5b5c00b1b2ab31fee0606f5c348f1eed59fc.jpg ADDED

Git LFS Details

  • SHA256: ba7089e036cf52e3224fd636836fd93d2dfba9bc5d83c09f433e82d819c7c191
  • Pointer size: 129 Bytes
  • Size of remote file: 6.77 kB
parse/dev/9_gsMA8MRKQ/images/93458215572ab7b42f8c1f90de0a83ab08153848dff855e773fedad75334eb50.jpg ADDED

Git LFS Details

  • SHA256: 1f2e8db9dab31d7ab8a5b3b50b3308a71e6ea1de16e23e175d7d8b3b6e4af406
  • Pointer size: 129 Bytes
  • Size of remote file: 7.47 kB
parse/dev/9_gsMA8MRKQ/images/95877027654d4e7efacc70fe0ea767c5ac7ad71f59ff63bc34e24d713921b658.jpg ADDED

Git LFS Details

  • SHA256: 17fc5cb51c12a5de3e6f843a1426e6d0302557f34bfa98db427cd89cc325ac6c
  • Pointer size: 130 Bytes
  • Size of remote file: 18.4 kB
parse/dev/9_gsMA8MRKQ/images/9baeeac16f552e7c4b410cc4f653835e81698d31174a2226e1b284a645499a89.jpg ADDED

Git LFS Details

  • SHA256: ca5b97f934a8b328970242b311bc4c94af6d7c828b306e8ccd96e0b3c68c4d2c
  • Pointer size: 130 Bytes
  • Size of remote file: 36.2 kB
parse/dev/9_gsMA8MRKQ/images/9dc205e69ac66032e8c3730db431b89372dad8cb9267517c3912f705e914d3e2.jpg ADDED

Git LFS Details

  • SHA256: 63583569f14a9cc2becc74a63973469e315a924a3a33e44b5e4990f63369a8ce
  • Pointer size: 129 Bytes
  • Size of remote file: 4.34 kB
parse/dev/9_gsMA8MRKQ/images/a15cf53b9eb5345d528ea5085ef3f28b634342d6ee81892dfbad0735d3381396.jpg ADDED

Git LFS Details

  • SHA256: 41a9a00e0c33f109dbb495f34efb7ce8d032bbe596e8f254931a0cf582c18152
  • Pointer size: 130 Bytes
  • Size of remote file: 15.5 kB
parse/dev/9_gsMA8MRKQ/images/a2e7363901e3b8916d3c35e0904ad12673e6e3f08744311688069bd06eeec87e.jpg ADDED

Git LFS Details

  • SHA256: fe44bf68d65aa8fc7c8ef1f069cac0fe9192de78791f23fbdb222f9135677b67
  • Pointer size: 130 Bytes
  • Size of remote file: 76.2 kB
parse/dev/9_gsMA8MRKQ/images/a421452925d55e5bba73aef6f80750f27a7c1f59bed7ff0061b5a5caaa36cb23.jpg ADDED

Git LFS Details

  • SHA256: f41095de829dd204563c25599ca8a7421cc387c47333d893ef7aba11b05f30b4
  • Pointer size: 130 Bytes
  • Size of remote file: 29.1 kB
parse/dev/9_gsMA8MRKQ/images/ac4e7c4a4f9c3000968e4a3b53010233dfe57a66b85938953eb34d3ba62d3c81.jpg ADDED

Git LFS Details

  • SHA256: 1ec58f28defd1681a79713f2300cd89156391764693dc55bcb3cb8d605d1c755
  • Pointer size: 130 Bytes
  • Size of remote file: 14 kB
parse/dev/9_gsMA8MRKQ/images/b4805cf873028523a5f45447f469a86c759710dcd5271485d9edcbd87ed6a097.jpg ADDED

Git LFS Details

  • SHA256: e2a5d8aea3eefdaeb6b49bb1bfaa6d67733a0203926faafb30a0d9df27977869
  • Pointer size: 129 Bytes
  • Size of remote file: 7.2 kB
parse/dev/9_gsMA8MRKQ/images/b5f194ae83af40d923a0521a039031d8b9e099608076a58bb14fd82e21bea59e.jpg ADDED

Git LFS Details

  • SHA256: 9eac8fdf0c2c17956eb8573d531d01159a0fb6ed51616b7a95af6feb0f2d16e1
  • Pointer size: 129 Bytes
  • Size of remote file: 5.32 kB
parse/dev/9_gsMA8MRKQ/images/cd63d00d933be5c5694f80f0a4e368fd64bbf4e814a54d6b8e9b3be31149c83b.jpg ADDED

Git LFS Details

  • SHA256: 1d5c9832a63b0f0e326fdda1aeee4568c5320a8df49a45896dcc9081ab9fd3e8
  • Pointer size: 129 Bytes
  • Size of remote file: 5.04 kB
parse/dev/9_gsMA8MRKQ/images/d1f2d2eb681615ca5a4d842d9aee22669c35f43c6cc7f16b44fc1dd3db2e97b8.jpg ADDED

Git LFS Details

  • SHA256: 9b30d38eebc8ce02f88d143ef9f158f04bee45460ad3a602cfc84af2785f4f9a
  • Pointer size: 130 Bytes
  • Size of remote file: 31.9 kB
parse/dev/9_gsMA8MRKQ/images/d265382966b07f51d851971e323dbbdc7768866de6440dfd7556f7fd3dc52a34.jpg ADDED

Git LFS Details

  • SHA256: ea358d84fbd8ab030cda79e002cf46c4a3ab5206c9e38717f7e30e625b38974c
  • Pointer size: 129 Bytes
  • Size of remote file: 8.83 kB
parse/dev/9_gsMA8MRKQ/images/d44c305c6d08936691936e02908618c70c5a6aeab147af89df79b50d52d6df8a.jpg ADDED

Git LFS Details

  • SHA256: a0a86c2f655c233b0f5435c42af70a84e6cd6904551428c6468a3ed25db8fc85
  • Pointer size: 130 Bytes
  • Size of remote file: 23.4 kB
parse/dev/9_gsMA8MRKQ/images/de250759338aab6eaf3aab7244869d5619400bfee86d39e593bfe1a83dd1b98e.jpg ADDED

Git LFS Details

  • SHA256: 922f0b064d05f079bf1318141881487668bd8aed4700b3cf399126b18a908633
  • Pointer size: 130 Bytes
  • Size of remote file: 30.3 kB
parse/dev/9_gsMA8MRKQ/images/e9963aa034c4dcce463b362ca0f27c9b77deb00f3aab18bf6f61ff34e484850c.jpg ADDED

Git LFS Details

  • SHA256: ac69da1589d3777be696dd7056b40c9d3b06df51a4db582fa1f40a6f505013fc
  • Pointer size: 130 Bytes
  • Size of remote file: 70.5 kB
parse/dev/9_gsMA8MRKQ/images/eb6593fcb990afb0b57efcab44d51bd768e29f752012f9ea9bf5c20cb5c4105c.jpg ADDED

Git LFS Details

  • SHA256: 997634a5fc2ca666a6ff8d7d8cea46cbdbc05b546cb8b128a3c111b4c5af7292
  • Pointer size: 129 Bytes
  • Size of remote file: 3.82 kB
parse/dev/9_gsMA8MRKQ/images/ebedb03ce5a18467e0c534e08eaedb3b2f0dd93adc1d69db1c2655aceaba2c14.jpg ADDED

Git LFS Details

  • SHA256: 938dad3ee66b972b7130b0f8cf7837ace569bb54e3994b6a8e2321a25108e574
  • Pointer size: 131 Bytes
  • Size of remote file: 101 kB
parse/dev/9_gsMA8MRKQ/images/f56c1dee06a8332744ec880b0dc39f4f3a5efa195bc1dbb8dbdf0cd39eaf2129.jpg ADDED

Git LFS Details

  • SHA256: b22b1299fb9e1e5920e04f2c8b6a06d6410e338e09578d22d973686eeaedf036
  • Pointer size: 129 Bytes
  • Size of remote file: 6.1 kB
parse/dev/9_gsMA8MRKQ/images/f7e0dd85be81a02cc1bea81ff652a041ecc85f8d814f8c01b7c42615d821b3e1.jpg ADDED

Git LFS Details

  • SHA256: e41fd2fd1e5c5e3faac3ad756a2622acba1c472614ac19c92aad372ba7db750d
  • Pointer size: 130 Bytes
  • Size of remote file: 30.2 kB
parse/dev/9_gsMA8MRKQ/images/fec3c1410696e05698971c5d01f4e403aaad66f3984ee9149b0579d00276b6ee.jpg ADDED

Git LFS Details

  • SHA256: c276917a7efdac08d4a41c03d66450095ebee85a458fee521a626bc4187d98be
  • Pointer size: 130 Bytes
  • Size of remote file: 30.9 kB
parse/dev/9_gsMA8MRKQ/images/ffcaa5f88ddbd09770b9302079283a13d14990896e3d33524de2aa01b1d326b5.jpg ADDED

Git LFS Details

  • SHA256: 61d1b0389ba09b21ddec56e2dfd9ca567981feec3d794bbe4c109ffe0b484956
  • Pointer size: 130 Bytes
  • Size of remote file: 22.8 kB
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ.md ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SwinTrack: A Simple and Strong Baseline for Transformer Tracking
2
+
3
+ Liting Lin1,2∗ Heng $\mathbf { F a n ^ { 3 * } }$ Zhipeng Zhang4 Yong $\mathbf { X } \mathbf { u } ^ { 1 , 2 }$ Haibin Ling5
4
+
5
+ 1School of Computer Science & Engineering, South China Univ. of Tech., Guangzhou, China 2Peng Cheng Laboratory, Shenzhen, China
6
+ 3Department of Computer Science and Engineering, University of North Texas, Denton, USA 4DiDi Chuxing, Beijing, China 5Department of Computer Science, Stony Brook University, Stony Brook, USA l.lt@mail.scut.edu.cn, heng.fan $@$ unt.edu, zhipeng.zhang.cv $@$ outlook.com yxu@scut.edu.cn, hling $@$ cs.stonybrook.edu
7
+
8
+ # Abstract
9
+
10
+ Recently Transformer has been largely explored in tracking and shown state-of-theart (SOTA) performance. However, existing efforts mainly focus on fusing and enhancing features generated by convolutional neural networks (CNNs). The potential of Transformer in representation learning remains under-explored. In this paper, we aim to further unleash the power of Transformer by proposing a simple yet efficient fully-attentional tracker, dubbed SwinTrack, within classic Siamese framework. In particular, both representation learning and feature fusion in SwinTrack leverage the Transformer architecture, enabling better feature interactions for tracking than pure CNN or hybrid CNN-Transformer frameworks. Besides, to further enhance robustness, we present a novel motion token that embeds historical target trajectory to improve tracking by providing temporal context. Our motion token is lightweight with negligible computation but brings clear gains. In our thorough experiments, SwinTrack exceeds existing approaches on multiple benchmarks. Particularly, on the challenging LaSOT, SwinTrack sets a new record with 0.713 SUC score. It also achieves SOTA results on other benchmarks. We expect SwinTrack to serve as a solid baseline for Transformer tracking and facilitate future research. Our codes and results are released at https://github.com/LitingLin/SwinTrack.
11
+
12
+ # 1 Introduction
13
+
14
+ Visual tracking has seen considerable progress since deep learning. In particular, the recent Transformer [30] has significantly pushed the state-of-the-art in tracking owing to its ability in modeling long-range dependencies. However, existing methods usually leverage Transformer for fusing and enhancing features generated from convolutional neural networks (CNNs), e.g., ResNet [14]. The potential of exploiting Transformer for feature representation learning is largely under-explored.
15
+
16
+ Recently, Vision Transformer (ViT) [7] has exhibited great potential in robust feature representation learning. Particularly, its extension Swin Transformer [23] has achieved state-of-the-art (SOTA) results on multiple tasks. Taking inspiration from this, we argue, besides the feature fusion, the representation learning in tracking can also benefit from Transformer via attention. Thus motivated, we propose to develop a fully attentional tracking framework based on Siamese architecture. Specifically, both the feature representation learning and the feature fusion of template and search region are realized by Transformer. More concretely, we borrow the architecture of the powerful
17
+
18
+ ![](images/bff5b4163414025c27ee09c6e9bfb93d55e373aa201c681052eec140b863d86c.jpg)
19
+ Figure 1: Comparison on LaSOT [9]. Our tracker (SwinTrack-B-384) sets a new record with 0.713 SUC score and still runs efficiently at around $4 5 f p s$ . A lighter version (SwinTrack-T-224) achieves 0.672 SUC score and runs at around $9 6 f p s$ , which is on par with existing SOTAs in accuracy but much faster.
20
+
21
+ Swin Transformer [23] and adapt it to Siamese tracking. Note that, other Transformer architectures can be used. For feature fusion, we introduce a simple homogeneous concatenation-based fusion architecture, without a query-based decoder.
22
+
23
+ Moreover, taking into consideration that tracking is a temporal task, we propose a novel motion token to improve robustness. Inspired by that the target usually moves smoothly in a short period, motion token is represented by the historical target trajectory within a local temporal window. We incorporate the (single) motion token in the decoder of feature fusion to leverage motion information during tracking. Despite being conceptually simple, our motion token can effectively boost tracking performance, with negligible computation.
24
+
25
+ We name our framework SwinTrack. As a pure Transformer framework, SwinTrack enables better interactions inside the feature learning of template and search region and their fusion compared to pure CNN-based [1, 20] and hybrid CNN-Transformer [5, 32, 36] frameworks, leading to more robust performance (see Fig. 1). Fig. 2 demonstrates the architecture of SwinTrack. We conduct extensive experiments on five large-scale benchmarks to verify the effectiveness of SwinTrack, including LaSOT [9], $\mathrm { L a S O T _ { \mathrm { e x t } } }$ [8], TrackingNet [26], GOT-10k [15] and TNL2k [34]. On all benchmarks, SwinTrack achieves promising results and meanwhile runs fast at $4 5 f p s$ . In particular, on the challenging LaSOT, SwinTrack sets a new record of 71.3 SUC score, surpassing the strongest prior tracker [36] (to date) by 3.1 absolute percentage points and crossing the 0.7 SUC threshold for the first time (see Fig. 1 again). It also achieves 49.1 SUC, 84.0 SUC, 72.4 AO and 55.9 SUC scores on $\mathrm { L a S O T _ { e x t } }$ , TrackingNet, GOT-10k and TNL2k respectively, which are better than or on par with state-of-the-arts (SoTAs). In addition, we provide a lighter version of SwinTrack that obtains comparable results to SoTAs but runs much faster at around 98 fps.
26
+
27
+ In summary, our contributions are as follows: (i) We propose SwinTrack, a simple and strong baseline for fully attentional tracking; (ii) We present a simple yet effective motion token, enabling the integration of rich motion context during tracking, further boosting the robustness of SwinTrack, with negligible computation; (iii) Our proposed SwinTrack achieves state-of-the-art performance on multiple benchmarks. We believe SwinTrack further shows the potential of Transformer and expect it to serve as a baseline for future research.
28
+
29
+ # 2 Related Work
30
+
31
+ Siamese Tracking. The Siamese tracking methods formulate tracking as a matching problem and aim to offline learn a generic matching function for this task. The seminal method of [1] introduces a fully convolutional Siamese network for tracking and shows a good balance between accuracy and speed. To improve Siamese tracking in handling scale variation, the work of [20] incorporates the region proposal network (RPN) [27] into the Siamese network and proposes the anchor-based tracker, showing higher accuracy with faster speed. Later, numerous extensions have been presented to improve Siamese tracking, including deeper backbone [19], multi-stage architecture [10, 11], anchor-free Siamese trackers [41], deformable attention [37], to name a few.
32
+
33
+ ![](images/ceb1ea2031ef2c2e53af6c2d1dc3d1053361e969b449e58a2d842f8df5d040e9.jpg)
34
+ Figure 2: Architecture of SwinTrack, which contains three parts including Transformer-based feature representation extraction, Transformer-based feature fusion and prediction head. Our SwinTrack is a simple and neat tracking framework without complex designs such as multi-scale features or temporal template updating, yet demonstrating state-of-the-art performance. Best viewed in color.
35
+
36
+ Transformer in Vision. Transformer [30] originates from natural language processing (NLP) for machine translation and has been introduced to vision recently and shows great potential. The work of [3] first uses Transformer for object detection and achieved promising results. To explore the capability of Transformer in representation learning, the work of [7] applies Transformer to construct backbone network, and the resulting Vision Transformer (ViT) attains excellent performance compared to convolutional networks while requiring fewer training resources, which encourages many extensions upon ViT[29, 4, 38, 33, 23]. Among them, the Swin Transformer [23] has received extensive attention. It proposes a simple shifted window strategy to replace the fixed-patch method in ViT, which significantly improves efficiency and meanwhile demonstrates state-of-the-art results on multiple image tasks. Our work is inspired by Swin Transformer, but differently, we focus on the video task of visual tracking.
37
+
38
+ Transformer in Tracking. Inspired by the success in other fields, researchers have leveraged Transformer for tracking. The method of [5] applies Transformer to enhance and fuse features in the Siamese tracking for improvement. The approach of [32] uses Transformer to exploit temporal features to improve tracking robustness. The work of [36] introduces a new transformer architecture dedicated to visual tracking, explores the Spatio-temporal Transformer by integrating the model updating operations into a Transformer module.
39
+
40
+ Our SwinTrack is related to but significantly different from the above Transformer-based trackers. Specifically, the aforementioned methods mainly apply Transformer to fuse convolutional features and belong to the hybrid CNN-Transformer architecture. Unlike them, SwinTrack is a pure Transformerbased tracking architecture where both representation learning and feature fusion are realized with Transformer, enabling the exploration of better features for robust tracking.
41
+
42
+ # 3 Tracking via Vision-Motion Transformer
43
+
44
+ We present SwinTrack, a vision-motion integrated Transformer for object tracking, in Fig. 2. The proposed framework contains three main components, i.e., the Swin-Transformer backbone for feature extraction, the encoder-decoder network for mixing vision-motion cues, and the head network for localizing targets. In the following sections, we first shortly describe the Swin-Transformer backbone network, then elaborate on the proposed vision-motion encoder-decoder. Afterward, we give a discussion about our method and shortly describe the network head and training loss.
45
+
46
+ # 3.1 Swin-Transformer for Feature Extraction
47
+
48
+ The deep convolutional neural network has significantly improved the performance of trackers. Along with the advancement of trackers, the backbone network has evolved twice: AlexNet [17] and ResNet [14]. Swin-Transformer [23], in comparison to ResNet, can give a more compact feature representation and richer semantic information to assist succeeding networks in better localizing the target objects (demonstrate in the ablation study demonstrated in the ablation study), which is thus chosen for basic feature extraction in our model.
49
+
50
+ Our tracker, following Siamese tracking framework [1], requires a pair of image patches as inputs, i.e., template image $\mathbf { z } \in \overline { { \mathbb { R } } } ^ { H _ { z } \times W _ { z } \times 3 }$ and search region image $\mathbf { x } \in \mathbb { R } ^ { \mathbf { \hat { H } } _ { x } \times W _ { x } \times 3 }$ . As in the typical SwinTransformer procedure, template and search region images are divided to non-overlapped patches and sent to the network, which generates template tokens (dubbed T-tokens) φ(z) ∈ R Hzs Wzs ×C a nd search region tokens (dubbed S-tokens) $\varphi ( \mathbf { x } ) \in \mathbb { R } ^ { \frac { H _ { x } } { s } \frac { W _ { x } } { s } \times C }$ . $s$ is the stride of the backbone network. Since there is no dimension projection in our model, $C$ is the hidden dimension of the whole model.
51
+
52
+ # 3.2 Vision-Motion Representation Learning
53
+
54
+ The essential step for matching-based visual tracking is injecting the template information into the search region. In our framework, we adopt an encoder to fuse the features from the template and the search region, meanwhile, a decoder is arranged to achieve vision-motion representation learning, as illustrated in Fig. 2.
55
+
56
+ Encoder for fusing template and search tokens. The encoder contains a sequence of Transformer blocks where each consists of a multi-head self-attention (MSA) module and a feed-forward network (FFN). FFN contains a two-layers multi-layer perceptron (MLP), GELU activation layer is inserted after the first linear layer. Layer normalization (LN) is always conducted before every module (MSA and FFN). Residual connection is applied to MSA and FFN modules.
57
+
58
+ Before feeding the features into the encoder, the template and search region tokens are concatenated along spatial dimensions to generate a mixing representation $\mathbf { f } _ { m }$ . For each block, the MSA module computes self-attention over mixing union representation, which equals to separately conducting self-attention on T-tokens/S-tokens and meanwhile performing cross-attention between T-tokens and S-tokens, but more efficient. FFN refines the features generated by MSA. When the tokens get out of the encoder, a de-concatenation operation is arranged to decouple the template and search region tokens. The process of encoder can be expressed as:
59
+
60
+ $$
61
+ \begin{array} { r l } & { \mathbf { f } _ { m } ^ { 1 } = \mathrm { C o n c a t } ( \boldsymbol { \varphi } ( \mathbf { z } ) , \boldsymbol { \varphi } ( \mathbf { x } ) ) } \\ & { \qquad \cdots \cdot } \\ & { \mathbf { f } _ { m } ^ { l ^ { \prime } } = \mathbf { f } _ { m } ^ { l } + \mathrm { M S A } ( \mathrm { L N } ( \mathbf { f } _ { m } ^ { l } ) ) } \\ & { \mathbf { f } _ { m } ^ { l + 1 } = \mathbf { f } _ { m } ^ { l ^ { \prime } } + \mathrm { F F N } ( \mathrm { L N } ( \mathbf { f } _ { m } ^ { l ^ { \prime } } ) ) } \\ & { \qquad \cdots } \\ & { \mathbf { f } _ { z } ^ { L } , \mathbf { f } _ { x } ^ { L } = \mathrm { D e C o n c a t } ( \mathbf { f } ^ { L } ) , } \end{array}
62
+ $$
63
+
64
+ where $l$ denotes the $l$ -th layer and $L$ denotes the number of blocks.
65
+
66
+ Decoder for fusing vision and motion information. Before describing the architecture of decoder, we first detail how to generate a motion token (dubbed M-token). Motion token is the embedding of the historical trajectory of the target object. The past object trajectory is represented as a set of target object box coordinates, $T = \left\{ \Phi _ { 1 } , \Phi _ { 2 } , . . . , \Phi _ { t } \right\}$ , where $t$ represents the frame index, o is the bounding box of target object. o is defined by the top-left and bottom-right corners of the target object, denotes as $\Phi _ { t } ^ { - } = \bigl ( o _ { t } ^ { - x _ { 1 } } , o _ { t } ^ { y _ { 1 } } , o _ { t } ^ { x _ { 2 } } , o _ { t } ^ { y _ { 2 } } \bigr )$ . For flexible modeling, a sampling process is required to ensure the following properties: 1) fixed length, 2) focusing on the latest trajectories and 3) reducing redundancy. In our method, we sample object trajectory as:
67
+
68
+ $$
69
+ \begin{array} { r } { \mathcal { T } = \big \{ \Phi _ { s ( 1 ) } , \Phi _ { s ( 2 ) } , . . . , \Phi _ { s ( n ) } \big \} , \mathrm { w h e r e } s ( i ) = m a x ( t - i \times \Delta , 1 ) , } \end{array}
70
+ $$
71
+
72
+ $n$ is the number of sampled object trajectories, $\Delta$ is the fixed sampling interval. For Siamese tracker, the search region is cropped from the input image. In detail, a cropping with resizing operation can be used to describe the process. Giving the point in the input image as $\left( \mathbf { x } _ { i } , \mathbf { y } _ { i } \right)$ , the corresponding point in the search region as $\left( \mathbf { x } _ { o } , \mathbf { y } _ { o } \right)$ , we can formulate the cropping process employed in pre-processing of the Siamese Tracker as $\mathbf { x } _ { o } = ( \mathbf { x } _ { i } - i _ { x } ) s _ { x } + o _ { x }$ and ${ \bf y } _ { o } = ( { \bf y } _ { i } - i _ { y } ) s _ { y } + o _ { y }$ , where $( i _ { x } , i _ { y } )$ is the center of the cropping window in the input image, $( s _ { x } , s _ { y } )$ is the scaling factor, $( o _ { x } , o _ { y } )$ is the center of cropped and scaled window in the search region. We apply the same transformation on the sampled object trajectory to make the object trajectory invariant to the cropping, denoting $\bar { \mathcal { T } } = \{ \bar { \mathbb { D } } _ { s ( 1 ) } , \bar { \mathbb { D } } _ { s ( 2 ) } , . . . , \bar { \mathbb { D } } _ { s ( n ) } \}$ as the result.
73
+
74
+ Then, to embed the transformed object trajectory into the network, we adopt four embedding matrices to embed the elements in box coordinates separately. We denotes the embedding matrix as W ∈ R(g+1)×d, $\^ \mathrm { g }$ controls the embedding granularity of the object trajectory, $d$ is the size of each embedding vector. The last entry of the embedding matrix is used as the padding vector, indicating an invalid state, like object absence or out of the search region. Thus, we normalize the sampled target object box coordinates in the range $[ 1 , \mathbb { g } ]$ , and quantize to integers to get the index of embedding vector:
75
+
76
+ $$
77
+ \begin{array} { r l } & { \hat { T } = \{ \hat { \mathbb { O } } _ { s ( 1 ) } , \hat { \mathbb { O } } _ { s ( 2 ) } , . . . , \hat { \mathbb { O } } _ { s ( n ) } \} , } \\ & { \mathrm { \it ~ \gamma ~ \mathrm { h e r e } ~ } \hat { \mathbb { O } } _ { s ( i ) } = [ \mathrm { n } ( \bar { \mathbb { O } } _ { s ( i ) } ^ { x _ { 1 } } , w ) , \mathrm { n } ( \bar { \mathbb { O } } _ { s ( i ) } ^ { y _ { 1 } } , h ) , \mathrm { n } ( \bar { \mathbb { O } } _ { s ( i ) } ^ { x _ { 2 } } , w ) , \mathrm { n } ( \bar { \mathbb { O } } _ { s ( i ) } ^ { y _ { 2 } } , h ) ] , } \\ & { \mathrm { \it ~ \mathrm { \it ~ \hat { \Omega } ~ } } \mathrm { \ n } ( o , l ) = \left\{ \begin{array} { l l } { \mathrm { \Delta } [ \frac { o } { l } \times \mathbb { g } ] } & { \mathrm { i f ~ } \mathrm { v a l i d } , } \\ { \mathbb { g } + 1 } & { \mathrm { e l s e } , } \end{array} \right. } \end{array}
78
+ $$
79
+
80
+ $( w , h )$ is the size of search region feature map.
81
+
82
+ Finally, the motion token $\mathbf { E } _ { m o t i o n } ~ \in ~ \mathbb { R } ^ { 1 \times d }$ is given by a concatenation of all box coordinate embedding of the sampled object trajectory. FLOPs is negligible because the construction of motion token is just a composition of embedding lookups and token concatenation.
83
+
84
+ The decoder consists of a multi-head cross-attention(MCA) module and a feed-forward network(FFN). The decoder takes the outputsvision-motion representation $\mathbf { f } _ { v m } \in \mathbb { R } ^ { \frac { H _ { x } } { s } \times \frac { W _ { x } } { s } \times C }$ d the motion token as input, generating tof by computing cross-attention over $\mathbf { f } _ { x } ^ { L }$ finaland $\mathrm { C o n c a t } ( { \bf E } _ { m o t i o n } , { \bf f } _ { z } ^ { L } , { \bf f } _ { x } ^ { L } )$ . The decoder is akin to a layer in the encoder, except that the correlation between the template tokens and the search tokens is dropped since we do not need to update the features from the template image in the last layer. The process of the decoder is formulated as:
85
+
86
+ $$
87
+ \begin{array} { r l } & { \mathbf { f } _ { m } ^ { D } = \mathrm { C o n c a t } ( \mathbf { E } _ { m o t i o n } , \mathbf { f } _ { z } ^ { L } , \mathbf { f } _ { x } ^ { L } ) } \\ & { \mathbf { f } _ { v m } ^ { \prime } = \mathbf { f } _ { x } ^ { L } + \mathrm { M C A } ( \mathrm { L N } ( \mathbf { f } _ { x } ^ { L } ) , \mathrm { L N } ( \mathbf { f } _ { m } ^ { D } ) ) } \\ & { \mathbf { f } _ { v m } = \mathbf { f } _ { v m } ^ { \prime } + \mathrm { F F N } ( \mathrm { L N } ( \mathbf { f } _ { v m } ^ { \prime } ) ) . } \end{array}
88
+ $$
89
+
90
+ $\mathbf { f } _ { v m }$ will feed to the head network to generate a classification response map and a bounding box regression map.
91
+
92
+ Positional encoding. Transformer requires a positional encoding to identify the position of the current processing token[30] because the self-attention module is permutation-invariance. We adopt the untied positional encoding [16] as our positional encoding method. The untied positional encoding enhances the expressiveness of the model through untie the positional embeddings from token embeddings with an isolated positional embedding matrix. It also considers the case of special tokens, like the motion token in this paper. We generalize the untied positional encoding to multi-dimensions multi-sources data to comply with concatenated-based fusion in our tracker. See the appendix for the details.
93
+
94
+ # 3.3 Discussion
95
+
96
+ Why concatenated attention? To simplify the description, we call the method described above concatenation-based fusion. To fuse and process features from multiple sources, it is intuitive to perform self-attention on the feature from each source separately and then compute cross-attention across features from different sources. We call this method cross-attention-based fusion. Transformer makes fewer assumptions about the spatial structure of data, which provides great modeling flexibility.
97
+
98
+ In comparison to cross-attention-based fusion, concatenation-based fusion can save computation cost through operation sharing and reduce model parameters through weight sharing. From the perspective of metric learning, weight sharing is an essential design to ensure the metric between two branches of data is symmetric. Through concatenation-based fusion, we implement this property not only in the feature extraction stage but also in the feature fusion stage. In general, concatenation-based fusion improves both efficiency and performance.
99
+
100
+ Why not window-based self/cross-attention? Since we select stage 3 of the Swin-Transformer as the output, the number of tokens involved is significantly reduced, window-based attention cannot save too many FLOPs. Furthermore, considering the extra latency introduced by the window partition and window reverse operations, window-based attention may even be the slower one.
101
+
102
+ Why not a query-based decoder? Derivated from vanilla Transformer decoder, many transformerbased models in vision tasks leverage a learnable query to extract the desired objective features from the encoder, like object queries in [3], target query in [36]. However, in our experiment, a query-based decoder suffers from slow convergence and inferior performance. Most Siamese trackers [20, 35, 13] formulate tracking as a foreground-background classification problem, which can better exploit the background information. The vanilla Transformer decoder is a generative model, the generative approaches are considered not suitable for the classification tasks. In another aspect, learning a general target query for any kind of object might cause a bottleneck. In terms of vanilla Transformer encoder-decoder architecture, SwinTrack is an "encoder" only model. Furthermore, quite a little domain knowledge can be easily applied on a classic Siamese tracker to improve the performance, like introducing the smooth movement assumption by using Hanning penalty window on the response map.
103
+
104
+ Are other forms of motion token feasible? Other forms to construct motion token are possible, such as constructing motion token by summing up the past box coordinate embeddings or representing past object trajectories by one token per box. In our early experiments, we find that the proposed motion token is more effective with the best performance. Summing up the past box coordinate embeddings may result in over-parameterization on the coordinate embeddings. While adding temporal motion representation along with visual features to the single-layer decoder in a multi-token form is ineffective, precise temporal modeling may be required in this form.
105
+
106
+ # 3.4 Head and Loss
107
+
108
+ Head. The head network is split into two branches: classification and bounding box regression. Each of them is a three-layer perceptron. And both of them receives the feature map from the decoder as input to predict the classification response map $r _ { c l s } \in \mathbb { R } ^ { ( H _ { x } \times W _ { x } ) \times 1 }$ and bounding box regression map $\bar { r _ { r e g } } \in \mathbb { R } ^ { ( H _ { x } \times W _ { x } ) \times 4 }$ , respectively.
109
+
110
+ Classification loss. In classification branch, we employ the $I o U$ -aware classification score as the training target and the varifocal loss [39] as the training loss function. IoU-aware design has been very popular recently, but most works consider IoU prediction as an auxiliary branch to assist classification or bounding box regression [41, 2, 35]. To remove the gap between different prediction branches, [39] and [21] replace the hard classification target from the ground-truth value, (i.e., 1 for positive samples, 0 for negative samples), to the IoU between the predicted bounding box and the ground-truth one, which is named the $I o U .$ -aware classification score (IACS). IACS can help the model select a more accurate bounding box prediction candidate from the pool by trying to predict the quality of the bounding box prediction in another branch at the same position. Along with the IACS, the varifocal loss was proposed in [39] to help the IACS approach outperform other IoU-aware designs.
111
+
112
+ The classification loss can be formulated as:
113
+
114
+ $$
115
+ \mathbb { L } _ { c l s } = \mathbb { L } _ { \mathrm { V F L } } ( p , \mathrm { I o U } ( b , \hat { b } ) ) ,
116
+ $$
117
+
118
+ where $p$ denotes the predicted IACS, $b$ denotes the predicted bounding box, and $\hat { b }$ denotes the ground-truth bounding box.
119
+
120
+ Regression loss. For bounding box regression, we employ the generalized IoU loss[28]. The regression loss function can be formulated as:
121
+
122
+ $$
123
+ \mathbb { L } _ { r e g } = \sum _ { j } \mathbb { 1 } _ { \left\{ \mathrm { I o U } ( b _ { j } , \hat { b } ) > 0 \right\} } [ p \mathbb { L } _ { \mathrm { G I o U } } ( b _ { j } , \hat { b } ) ] .
124
+ $$
125
+
126
+ The GIoU loss is weighted by $p$ to emphasize the high classification score samples. The training signals from the negative samples are ignored.
127
+
128
+ # 4 Experiments
129
+
130
+ # 4.1 Implementation
131
+
132
+ Model. We design two variants of SwinTrack with different configurations as follows:
133
+
134
+ • SwinTrack-T-224. Backbone: Swin Transformer-Tiny [23], pretrained with ImageNet-1k; Template size: $[ 1 1 2 \times 1 1 2 ]$ ; Search region size: $[ 2 2 4 \times 2 2 4 ]$ ; $C = 3 8 4$ ; $N = 4$ ;
135
+ • SwinTrack-B-384. Backbone: Swin Transformer-Base [23], pretrained with ImageNet-22k; Template size: $[ 1 9 2 \times 1 9 2 ]$ ; Search region size: $[ 3 8 4 \times 3 8 4 ]$ ; $C = 5 1 2$ ; $N = 8$ ;
136
+
137
+ where $C$ and $N$ are the channel number of the hidden layers in the first stage of Swin Transformer and the number of encoder blocks in feature fusion, respectively. In all variants, we use the output after the third stage of Swin Transformer for feature extraction. Thus, the backbone stride $s$ is 16.
138
+
139
+ For motion token, the number of sampled object trajectory $n$ is set to 16, the fixed sampling interval $\Delta$ is set to 15. If the frame rate of the video sequence is available, the sampling interval is adjusted according to the frame rate. Suppose the frame rate is $\mathbb { f }$ , the new sampling interval is getting by $\mathrm { { \frac { \Delta } { 3 0 } f } }$ , 30 fps is the standard frame rate we assumed. g, which controls the embedding granularity, is set to the same size as the search region feature map, like 14 for SwinTrack-T-224, and 24 for SwinTrack-B-384. For the model for GOT-10k sequences, $n$ is set to 8, $\Delta$ is set to 8, and no frame rate adjustment is applied.
140
+
141
+ Training. We train SwinTrack using the training splits of LaSOT [9], TrackingNet [26], GOT-10k [15] (1,000 videos are removed following [36] for fair comparison) and COCO 2017 [22]. In addition, we report the results of SwinTrack-T-224 and SwinTrack-B-384 with GOT-10k training split only to follow the protocol described in [15].
142
+
143
+ The model is optimized with AdamW [24], with a learning rate of 5e-4, and a weight decay of 1e-4. The learning rate of the backbone is set to 5e-5. We train the network on 8 NVIDIA V100 GPUs for 300 epochs with 131,072 samples per epoch. The learning rate is dropped by a factor of 10 after 210 epochs. A 3-epoch linear warmup is applied to stabilize the training process. DropPath [18] is applied on the backbone and the encoder with a rate of 0.1. For the models trained for the GOT-10k evaluation protocol, to prevent over-fitting, the training epoch is set to 150, and the learning rate is dropped after 120 epochs.
144
+
145
+ For the motion token, the object trajectory for the Siamese training pair is generated with the method described above. The frames that object annotated as absent or out of the video sequence are marked as invalid, the corresponding box coordinates set to $- \infty$ . Since the coarse granularity of the coordinate embedding in our setting is already can be seen as an augmentation of historical object trajectory, no additional data augmentation is applied.
146
+
147
+ Inference. We follow the common procedures for Siamese network-based tracking [1]. The template image is cropped from the first frame of the video sequence. The target object is in the center of the image with a background area factor of 2. The search region is cropped from the current tracking frame, and the image center is the target center position predicted in the previous frame. The background area factor for the search region is 4.
148
+
149
+ Our SwinTrack takes the template image and search region as inputs and output classification map $r _ { c l s }$ and regression map $r _ { r e g }$ . To utilize positional prior in tracking, we apply hanning window penalty on $r _ { c l s }$ , and the final classification map $r _ { c l s } ^ { \prime }$ is obtained via $\boldsymbol { r } _ { c l s } ^ { \prime } = ( 1 - \gamma ) \times \boldsymbol { r } _ { c l s } + \gamma \times \boldsymbol { h }$ , where $\gamma$ is the weight parameter and $h$ is the Hanning window with the same size as $r _ { c l s }$ . The target position is determined by the largest value in $r _ { c l s } ^ { \prime }$ and the scale is estimated based on the corresponding regression results in $r _ { r e g }$ .
150
+
151
+ For the motion token, the predicted confidence score and bounding box are collected on the fly. A confidence threshold $\theta _ { c o n f }$ is applied, if the confidence score given by the classification branch of the head is lower than the threshold, the target object in the current frame is marked as lost by setting the collected bounding box to $- \infty$ . $\theta _ { c o n f }$ is set to 0.4 for LaSOT, the rests are set to 0.3.
152
+
153
+ Table 1: Experiments and comparisons on five benchmarks: LaSOT, $\mathrm { L a S O T _ { e x t } }$ , TrackingNet, GOT10k and TNL2k.
154
+
155
+ <table><tr><td rowspan="2">Tracker</td><td colspan="2">LaSOT[9]</td><td colspan="2">LaSOText [8]</td><td colspan="2">TrackingNet [26]</td><td colspan="3">GOT-10k [15]</td><td colspan="2">TNL2k [34]</td></tr><tr><td>SUC</td><td>P</td><td>SUC</td><td>P</td><td>SUC</td><td>P</td><td>AO</td><td>SR0.5</td><td>SR0.75</td><td>SUC</td><td>P</td></tr><tr><td>C-RPN [10]</td><td>45.5</td><td>44.3</td><td>27.5</td><td>32.0</td><td>66.9</td><td>61.9</td><td>1</td><td>1</td><td>1</td><td>-</td><td>-</td></tr><tr><td>SiamPRN++ [19]</td><td>49.6</td><td>49.1</td><td>34.0</td><td>39.6</td><td>73.3</td><td>69.4</td><td>51.7</td><td>61.6</td><td>32.5</td><td>41.3</td><td>41.2</td></tr><tr><td>Ocean [41]</td><td>56.0</td><td>56.6</td><td>-</td><td>-</td><td>1</td><td>-</td><td>61.1</td><td>72.1</td><td>47.3</td><td>38.4</td><td>37.7</td></tr><tr><td>DiMP [2]</td><td>56.9</td><td>56.7</td><td>39.2</td><td>45.1</td><td>74.0</td><td>68.7</td><td>61.1</td><td>71.7</td><td>49.2</td><td>44.7</td><td>43.4</td></tr><tr><td>LTMU [6]</td><td>57.2</td><td>57.2</td><td>41.4</td><td>47.3</td><td>-</td><td>-</td><td>-</td><td>-</td><td>1</td><td>48.5</td><td>47.3</td></tr><tr><td>SiamR-CNN[31]</td><td>64.8</td><td>1</td><td>1</td><td>1</td><td>81.2</td><td>80.0</td><td>64.9</td><td>72.8</td><td>59.7</td><td>52.3</td><td>52.8</td></tr><tr><td>STMTrack [12]</td><td>60.6</td><td>63.3</td><td>-</td><td>-</td><td>80.3</td><td>76.7</td><td>64.2</td><td>73.7</td><td>57.5</td><td>-</td><td>-</td></tr><tr><td>AutoMatch [40]</td><td>58.3</td><td>59.9</td><td>37.6</td><td>43.0</td><td>76.0</td><td>72.6</td><td>65.2</td><td>76.6</td><td>54.3</td><td>-</td><td>-</td></tr><tr><td>TrDiMP [32]</td><td>63.9</td><td>61.4</td><td>1</td><td>1</td><td>78.4</td><td>73.1</td><td>67.1</td><td>77.7</td><td>58.3</td><td>-</td><td>-</td></tr><tr><td>TransT[5]</td><td>64.9</td><td>69.0</td><td>-</td><td>1</td><td>81.4</td><td>80.3</td><td>67.1</td><td>76.8</td><td>60.9</td><td>51.0</td><td>-</td></tr><tr><td>STARK [36]</td><td>67.1</td><td></td><td></td><td>=</td><td>82.0</td><td>-</td><td>68.8</td><td>78.1</td><td>64.1</td><td>-</td><td>-</td></tr><tr><td>KeepTrack [25]</td><td>67.1</td><td>70.2</td><td>48.2</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>1</td><td>-</td><td>-</td></tr><tr><td>SwinTrack-T-224</td><td>67.2</td><td>70.8</td><td>47.6</td><td>53.9</td><td>81.1</td><td>78.4</td><td>71.3</td><td>81.9</td><td>64.5</td><td>53.0</td><td>53.2</td></tr><tr><td>SwinTrack-B-384</td><td>71.3</td><td>76.5</td><td>49.1</td><td>55.6</td><td>84.0</td><td>82.8</td><td>72.4</td><td>80.5</td><td>67.8</td><td>55.9</td><td>57.1</td></tr></table>
156
+
157
+ # 4.2 Comparisons to State-of-the-arts
158
+
159
+ We conduct experiments and compare SwinTrack with SoTA trackers on five benchmarks.
160
+
161
+ LaSOT. LaSOT [9] consists of 280 videos for test. Tab. 1 shows the results and comparisons with SoTAs. From Tab. 1, we can observe that SwinTrack-T-224 with light architecture reaches SoTA performance with 0.672 SUC and 0.708 PRE scores, which is competitive compared with other Transformer-based trackers, including STARK-ST101 (0.671 SUC score) and TransT (0.649 SUC), and other trackers using complicated designs such as KeepTrack (0.671 SUC) and SiamR-CNN (0.648 SUC score). With a larger backbone and input size, our strongest variant SwinTrack-B-384 sets a new record with 0.713 SUC score, surpassing START-ST101 and KeepTrack by 4.2 absolute percentage points.
162
+
163
+ $\mathbf { L a S O T } _ { \mathrm { e x t } }$ . The recent $\mathrm { L a S O T _ { \mathrm { e x t } } }$ [8] is an extension of LaSOT by adding 150 extra videos. These new sequences are challenging as many similar distractors cause difficulties for tracking. The results of our tracker related to this dataset are an average of three times. KeepTrack uses a complex association technique to handle distractors and achieves a promising 0.482 SUC score as in Tab. 1. Compared with complicated KeepTrack, SwinTrack-T-224 is simple and neat, yet shows comparable performance with 0.476 SUC score. In addition, due to complicated design, KeepTrack runs at less than $2 0 f p s$ , while SwinTrack-T-224 runs in 98 fps, $5 \times$ faster than KeepTrack. When using a larger model, SwinTrack-B-384 shows the best performance with 0.491 SUC score.
164
+
165
+ TrackingNet. We evaluate different trackers on the test set of TrackingNet [26]. From Tab. 1, we observe that our SwinTrack-T-224 achieves a comparable result with 0.811 SUC score. Using a larger model and input size, SwinTrack-B-384 obtains the best performance with 0.840 SUC score, better than STARK-ST101 with 0.820 SUC score and TransT with 0.814 SUC score.
166
+
167
+ GOT-10k. GOT-10k [15] offers 180 videos for test and it requires trackers to be trained using GOT-10k train split only. From Tab. 1, we see that SwinTrack-B-384 achieves the best mAO of 0.724, and SwinTrack-T-224 obtains a mAO of 0.713. Both models outperform other Transformer-based counterparts significantly, including START-ST101 (0.688 mAO), TransT (0.671 mAO) and TrDiMP (0.671 mAO).
168
+
169
+ TNL2k. TNL2k [34] is a newly released tracking dataset with 700 videos for test. As reported in Tab. 1, both models surpass the others. SwinTrack-B-384 set a new state-of-the-art with 0.559 SUC score.
170
+
171
+ Table 2: Comparison on running speed and # parameters with other Transformer-based trackers.
172
+
173
+ <table><tr><td>Tracker</td><td>Speed (fps)</td><td>MACs² (G)</td><td>Params (M)</td></tr><tr><td>TrDiMP [32]</td><td>26</td><td>=</td><td>1</td></tr><tr><td>TransT[5]</td><td>50</td><td>=</td><td>23</td></tr><tr><td>STARK-ST50 [36]</td><td>42</td><td>10.9</td><td>24</td></tr><tr><td>STARK-ST101 [36]</td><td>32</td><td>18.5</td><td>42</td></tr><tr><td>SwinTrack-T-224</td><td>98</td><td>6.4</td><td>23</td></tr><tr><td>SwinTrack-B-384</td><td>45</td><td>69.7</td><td>91</td></tr></table>
174
+
175
+ Table 3: Ablation experiments of SwinTrack on four benchmarks. The experiments are conducted on SwinTrack-T-224 without the motion token. ❶: baseline method, i.e., SwinTrack-T-224 without motion token; $\otimes$ : replacing Transformer backbone in the baseline method with ResNet-50; ❸: replacing our feature fusion with cross attention-based fusion in the baseline method; $\bullet$ : replacing the decoder in baseline with a target query-based; $\pmb { \ 6 }$ : replacing united positional encoding with absolute sine position encoding in the baseline method; $\pmb { \circledcirc }$ : replacing the IoU-aware classification loss with the plain binary cross entropy loss; $\pmb { \ 6 }$ : removing the Hanning penalty window in the baseline method inference.
176
+
177
+ <table><tr><td></td><td>LaSOT SUC (%)</td><td>LaSOText SUC (%)</td><td>TrackingNet SUC (%)</td><td>GOT-10k3 mA0 (%)</td><td>Speed fps</td><td>Params M</td></tr><tr><td>1</td><td>66.7</td><td>46.9</td><td>80.8</td><td>70.9</td><td>98</td><td>22.7</td></tr><tr><td>②</td><td>64.2</td><td>41.8</td><td>79.5</td><td>68.2</td><td>121</td><td>20.0</td></tr><tr><td>③</td><td>66.6</td><td>45.4</td><td>80.2</td><td>69.3</td><td>72</td><td>34.6</td></tr><tr><td>4</td><td>66.6</td><td>43.2</td><td>79.6</td><td>69.0</td><td>91</td><td>25.3</td></tr><tr><td>5</td><td>65.7</td><td>45.0</td><td>80.0</td><td>70.0</td><td>103</td><td>21.6</td></tr><tr><td>6</td><td>66.2</td><td>46.7</td><td>79.4</td><td>68.2</td><td>98</td><td>22.7</td></tr><tr><td>0</td><td>65.7</td><td>46.0</td><td>80.0</td><td>69.6</td><td>98</td><td>22.7</td></tr></table>
178
+
179
+ Efficiency comparison. We report the comparisons of SwinTrack with other Transformer-based trackers in terms of efficiency and complexity. As displayed in Tab. 2, SwinTrack-T-224 with a small model runs the fastest with a speed of 98 fps. Especially, compared with STARK-ST101 and STARK-ST50 with $3 2 f p s$ and $4 2 f p s$ , SwinTrack-T-224 is $3 \times$ and $2 \times$ faster. Despite using a larger model, our SwinTrack-B-384 is still faster than STARK-ST101 and STARK-ST50.
180
+
181
+ # 4.3 Ablation Experiment
182
+
183
+ Comparison with ResNet backbone. We compare the Swin-Transformer backbone with popular ResNet-50 [14]. As shown in Tab. 3 ( $\pmb { \theta }$ vs. $\pmb { \varrho }$ ). The Swin Transformer backbone significantly boosts the performance by $2 . 5 \%$ SUC score in LaSOT, $5 . 1 \%$ SUC score in $\mathrm { L a S O T _ { e x t } }$ . The result shows that the strong appearance modeling capability provided by the Swin Transformer plays a crucial role.
184
+
185
+ Feature fusion. As displayed in Tab. 3 $\pmb { \theta }$ vs. $\pmb { \Theta }$ ), compared with the concatenation-based fusion, the cross attention-based fusion runs at a slower speed, occupies much more memory, and also has an inferior performance on all datasets. Slower speed can be due to the latency brought by the extra operations. The parameter-sharing strategy not only just reduces the number of parameters but also benefits metric learning.
186
+
187
+ Comparison with the query-based decoder. Queries is commonly adopted in the decoder of Transformer network in vision tasks, e.g. object query [3] and target query [36]. Nevertheless, our empirical results in Tab. 3 $\pmb { \ 0 }$ vs. $\pmb { \varrho }$ ) show that a target query-based decoder degrades the tracking performance on all benchmarks, even with $2 \times$ training pairs. As discussed, one possible reason is the generative model is not suitable for classification. Besides, learning a general target query for any kind of object may also be difficult.
188
+
189
+ Position encoding. We compare the united positional encoding used in SwinTrack and the original absolute position encoding in Transformer [30]. Notice, We make a little modification to the original absolute position encoding: Except for the 2D embedding, the index of token source (e.g. 1 for the tokens from the template patch, 2 for the tokens from the search region patch) is also embedded. As shown in Tab. 3 (❶ vs. $\bullet$ ), our method with united positional encoding obtains improvements with 0.8-1.9 absolute percentage points on the benchmarks with negligible loss in speed (98 vs. 103).
190
+
191
+ Table 4: Ablation experiments on our proposed motion token on the tracking performance on four benchmarks. The experiments are conducted on SwinTrack-T-224. ❶: SwinTrack-T-224; ❷: SwinTrack-B-384; $\otimes$ : SwinTrack-T-224 without motion token; ❹: SwinTrack-B-384 without motion token; $\pmb { \ 6 }$ : replacing the motion token in SwinTrack-T-224 with a learnable embedding token.
192
+
193
+ <table><tr><td>SUC (%)</td><td>LaSOT</td><td>LaSOText SUC (%)</td><td>TrackingNet SUC (%)</td><td>GOT-10k mA0 (%)</td><td>Speed fps</td></tr><tr><td>1</td><td>67.2</td><td>47.6</td><td>81.1</td><td>71.3</td><td>96</td></tr><tr><td>②</td><td>71.3</td><td>49.1</td><td>84.0</td><td>72.4</td><td>45</td></tr><tr><td>③</td><td>66.7</td><td>47.0</td><td>80.8</td><td>70.0</td><td>98</td></tr><tr><td>4</td><td>70.2</td><td>48.5</td><td>84.0</td><td>70.7</td><td>45</td></tr><tr><td>6</td><td>66.3</td><td>45.2</td><td>81.2</td><td>70.0</td><td>96</td></tr></table>
194
+
195
+ Loss function. From Tab. 3 $( \bullet \nu . \bullet )$ , we observe that the model trained with varifocal loss significantly outperforms the one with binary cross entropy (BCE) loss without loss of efficiency. This result indicates that the varifocal loss can assist the classification branch of the head to generate an IoU-aware response map, and thus help the tracker to improve the tracking performance.
196
+
197
+ Post processing. One may wonder with highly discriminative Transformer architecture and IoUaware classification loss does the hanning penalty window is still functional, which introduces a strong smooth movement assumption. In the experiments, we remove the hanning penalty window in post-processing, as shown in Tab. 3 $( \pmb { \mathbb { 0 } } \nu s . \pmb { \mathbb { \otimes } } )$ , the performance is dropped by 1.0 SUC for LaSOT, $1 . 3 \mathrm { \ A O }$ for GOT-10k in absolute percentage, and less than $1 \%$ in the SUC metric of other datasets. This suggests that the strong smooth movement assumption is still applicable for our tracker. But compared with the former Transformer-based tracker [5], the performance gap between with and without penalty window post-processing is narrowing.
198
+
199
+ Effectiveness of motion token. We study the effectiveness of the motion token by conducting comparison experiments. As shown in Tab. 4 $\pmb { \mathbb { \otimes } }$ vs. $\pmb { \otimes }$ and $\pmb { \varrho }$ vs. $\pmb { \varrho }$ ), the models with motion token outperforms the models without motion token on all datasets, especially on $\mathrm { L a S O T _ { e x t } }$ and GOT-10k. The results indicate that the motion token can assist the tracker to handle hard similar distractors in $\mathrm { L a S O T _ { e x t } }$ and stabilize the short-term tracking like the sequences in GOT-10k test set. We also study whether the effectiveness of the motion token is simply from the extra embedding vector. We set up an experiment as in Tab. 4 $( \pmb { \Theta } )$ , which replaces the motion token with a learnable embedding token. The result shows that the extra embedding vector has negative impacts indicating the effectiveness of the embedding of object trajectory.
200
+
201
+ # 5 Conclusion
202
+
203
+ In this work, we present SwinTrack, a simple and strong baseline for Transformer tracking. In SwinTrack, both representation learning and feature fusion are implemented with the attention mechanism. Extensive experiments demonstrate the effectiveness of such architecture. Besides, we propose the motion token to enhance the robustness of the tracker by providing the historical object trajectory, showing the flexibility of the Transformer model in architectural design. With the power of sequence-to-sequence model architecture, a context-rich tracker is possible, and more contextual cues can be incorporated. Finally, We hope this work can inspire and facilitate future research.
204
+
205
+ # Acknowledgments and Disclosure of Funding
206
+
207
+ This work is supported by Peng Cheng Laboratory Research Project No. PCL2021A07. Heng Fan and his employer receive no financial support for the research, authorship, and/or publication of this article.
208
+
209
+ # References
210
+
211
+ [1] Bertinetto, L., Valmadre, J., Henriques, J.F., Vedaldi, A., Torr, P.H., 2016. Fully-convolutional siamese networks for object tracking, in: ECCVW. [2] Bhat, G., Danelljan, M., Gool, L.V., Timofte, R., 2019. Learning discriminative model prediction for tracking, in: ICCV. [3] Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., Zagoruyko, S., 2020. End-to-end object detection with transformers, in: ECCV. [4] Chen, C.F.R., Fan, Q., Panda, R., 2021a. Crossvit: Cross-attention multi-scale vision transformer for image classification, in: ICCV. [5] Chen, X., Yan, B., Zhu, J., Wang, D., Yang, X., Lu, H., 2021b. Transformer tracking, in: CVPR. [6] Dai, K., Zhang, Y., Wang, D., Li, J., Lu, H., Yang, X., 2020. High-performance long-term tracking with meta-updater, in: CVPR. [7] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al., 2021. An image is worth 16x16 words: Transformers for image recognition at scale, in: ICLR. [8] Fan, H., Bai, H., Lin, L., Yang, F., Chu, P., Deng, G., Yu, S., Huang, M., Liu, J., Xu, Y., et al., 2021. Lasot: A high-quality large-scale single object tracking benchmark. International Journal of Computer Vision 129, 439–461. [9] Fan, H., Lin, L., Yang, F., Chu, P., Deng, G., Yu, S., Bai, H., Xu, Y., Liao, C., Ling, H., 2019. Lasot: A high-quality benchmark for large-scale single object tracking, in: CVPR.
212
+ [10] Fan, H., Ling, H., 2019. Siamese cascaded region proposal networks for real-time visual tracking, in: CVPR.
213
+ [11] Fan, H., Ling, H., 2021. Cract: Cascaded regression-align-classification for robust visual tracking, in: IROS.
214
+ [12] Fu, Z., Liu, Q., Fu, Z., Wang, Y., 2021. Stmtrack: Template-free visual tracking with space-time memory networks, in: CVPR.
215
+ [13] Han, W., Dong, X., Khan, F.S., Shao, L., Shen, J., 2021. Learning to fuse asymmetric feature maps in siamese trackers, in: CVPR.
216
+ [14] He, K., Zhang, X., Ren, S., Sun, J., 2016. Deep residual learning for image recognition, in: CVPR.
217
+ [15] Huang, L., Zhao, X., Huang, K., 2019. Got-10k: A large high-diversity benchmark for generic object tracking in the wild. IEEE Transactions on Pattern Analysis and Machine Intelligence 43, 1562–1577.
218
+ [16] Ke, G., He, D., Liu, T.Y., 2021. Rethinking positional encoding in language pre-training, in: ICLR.
219
+ [17] Krizhevsky, A., Sutskever, I., Hinton, G.E., 2012. Imagenet classification with deep convolutional neural networks. NIPS .
220
+ [18] Larsson, G., Maire, M., Shakhnarovich, G., 2016. Fractalnet: Ultra-deep neural networks without residuals, in: ICLR.
221
+ [19] Li, B., Wu, W., Wang, Q., Zhang, F., Xing, J., Yan, J.S., 2019. Evolution of siamese visual tracking with very deep networks, in: CVPR.
222
+ [20] Li, B., Yan, J., Wu, W., Zhu, Z., Hu, X., 2018. High performance visual tracking with siamese region proposal network, in: CVPR.
223
+ [21] Li, X., Wang, W., Wu, L., Chen, S., Hu, X., Li, J., Tang, J., Yang, J., 2020. Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection, in: NeurIPS.
224
+ [22] Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L., 2014. Microsoft coco: Common objects in context, in: ECCV.
225
+ [23] Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B., 2021. Swin transformer: Hierarchical vision transformer using shifted windows. ICCV .
226
+ [24] Loshchilov, I., Hutter, F., 2019. Decoupled weight decay regularization, in: ICLR.
227
+ [25] Mayer, C., Danelljan, M., Paudel, D.P., Van Gool, L., 2021. Learning target candidate association to keep track of what not to track, in: ICCV.
228
+ [26] Muller, M., Bibi, A., Giancola, S., Alsubaihi, S., Ghanem, B., 2018. Trackingnet: A large-scale dataset and benchmark for object tracking in the wild, in: ECCV.
229
+ [27] Ren, S., He, K., Girshick, R., Sun, J., 2015. Faster r-cnn: Towards real-time object detection with region proposal networks, in: NIPS.
230
+ [28] Rezatofighi, H., Tsoi, N., Gwak, J., Sadeghian, A., Reid, I., Savarese, S., 2019. Generalized intersection over union .
231
+ [29] Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H., 2021. Training data-efficient image transformers & distillation through attention, in: ICML.
232
+ [30] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I., 2017. Attention is all you need, in: NeurIPS.
233
+ [31] Voigtlaender, P., Luiten, J., Torr, P.H., Leibe, B., 2020. Siam r-cnn: Visual tracking by re-detection, in: CVPR.
234
+ [32] Wang, N., Zhou, W., Wang, J., Li, H., 2021a. Transformer meets tracker: Exploiting temporal context for robust visual tracking, in: CVPR.
235
+ [33] Wang, W., Xie, E., Li, X., Fan, D.P., Song, K., Liang, D., Lu, T., Luo, P., Shao, L., 2021b. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions, in: ICCV.
236
+ [34] Wang, X., Shu, X., Zhang, Z., Jiang, B., Wang, Y., Tian, Y., Wu, F., 2021c. Towards more flexible and accurate object tracking with natural language: Algorithms and benchmark, in: CVPR.
237
+ [35] Xu, Y., Wang, Z., Li, Z., Yuan, Y., Yu, G., 2020. Siamfc++: Towards robust and accurate visual tracking with target estimation guidelines, in: AAAI.
238
+ [36] Yan, B., Peng, H., Fu, J., Wang, D., Lu, H., 2021. Learning spatio-temporal transformer for visual tracking, in: ICCV.
239
+ [37] Yu, Y., Xiong, Y., Huang, W., Scott, M.R., 2020. Deformable siamese attention networks for visual object tracking, in: CVPR.
240
+ [38] Yuan, L., Chen, Y., Wang, T., Yu, W., Shi, Y., Jiang, Z.H., Tay, F.E., Feng, J., Yan, S., 2021. Tokens-to-token vit: Training vision transformers from scratch on imagenet, in: ICCV.
241
+ [39] Zhang, H., Wang, Y., Dayoub, F., Sünderhauf, N., 2021a. Varifocalnet: An iou-aware dense object detector, in: CVPR.
242
+ [40] Zhang, Z., Liu, Y., Wang, X., Li, B., Hu, W., 2021b. Learn to match: Automatic matching network design for visual tracking, in: ICCV.
243
+ [41] Zhang, Z., Peng, H., Fu, J., Li, B., Hu, W., 2020. Ocean: Object-aware anchor-free tracking, in: ECCV.
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_content_list.json ADDED
@@ -0,0 +1,1147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SwinTrack: A Simple and Strong Baseline for Transformer Tracking ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 223,
8
+ 122,
9
+ 776,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Liting Lin1,2∗ Heng $\\mathbf { F a n ^ { 3 * } }$ Zhipeng Zhang4 Yong $\\mathbf { X } \\mathbf { u } ^ { 1 , 2 }$ Haibin Ling5 ",
17
+ "bbox": [
18
+ 214,
19
+ 224,
20
+ 769,
21
+ 241
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1School of Computer Science & Engineering, South China Univ. of Tech., Guangzhou, China 2Peng Cheng Laboratory, Shenzhen, China \n3Department of Computer Science and Engineering, University of North Texas, Denton, USA 4DiDi Chuxing, Beijing, China 5Department of Computer Science, Stony Brook University, Stony Brook, USA l.lt@mail.scut.edu.cn, heng.fan $@$ unt.edu, zhipeng.zhang.cv $@$ outlook.com yxu@scut.edu.cn, hling $@$ cs.stonybrook.edu ",
28
+ "bbox": [
29
+ 192,
30
+ 241,
31
+ 807,
32
+ 340
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 375,
43
+ 535,
44
+ 392
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Recently Transformer has been largely explored in tracking and shown state-of-theart (SOTA) performance. However, existing efforts mainly focus on fusing and enhancing features generated by convolutional neural networks (CNNs). The potential of Transformer in representation learning remains under-explored. In this paper, we aim to further unleash the power of Transformer by proposing a simple yet efficient fully-attentional tracker, dubbed SwinTrack, within classic Siamese framework. In particular, both representation learning and feature fusion in SwinTrack leverage the Transformer architecture, enabling better feature interactions for tracking than pure CNN or hybrid CNN-Transformer frameworks. Besides, to further enhance robustness, we present a novel motion token that embeds historical target trajectory to improve tracking by providing temporal context. Our motion token is lightweight with negligible computation but brings clear gains. In our thorough experiments, SwinTrack exceeds existing approaches on multiple benchmarks. Particularly, on the challenging LaSOT, SwinTrack sets a new record with 0.713 SUC score. It also achieves SOTA results on other benchmarks. We expect SwinTrack to serve as a solid baseline for Transformer tracking and facilitate future research. Our codes and results are released at https://github.com/LitingLin/SwinTrack. ",
51
+ "bbox": [
52
+ 233,
53
+ 409,
54
+ 766,
55
+ 642
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 670,
66
+ 310,
67
+ 686
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Visual tracking has seen considerable progress since deep learning. In particular, the recent Transformer [30] has significantly pushed the state-of-the-art in tracking owing to its ability in modeling long-range dependencies. However, existing methods usually leverage Transformer for fusing and enhancing features generated from convolutional neural networks (CNNs), e.g., ResNet [14]. The potential of exploiting Transformer for feature representation learning is largely under-explored. ",
74
+ "bbox": [
75
+ 174,
76
+ 702,
77
+ 825,
78
+ 771
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Recently, Vision Transformer (ViT) [7] has exhibited great potential in robust feature representation learning. Particularly, its extension Swin Transformer [23] has achieved state-of-the-art (SOTA) results on multiple tasks. Taking inspiration from this, we argue, besides the feature fusion, the representation learning in tracking can also benefit from Transformer via attention. Thus motivated, we propose to develop a fully attentional tracking framework based on Siamese architecture. Specifically, both the feature representation learning and the feature fusion of template and search region are realized by Transformer. More concretely, we borrow the architecture of the powerful ",
85
+ "bbox": [
86
+ 174,
87
+ 777,
88
+ 825,
89
+ 875
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/bff5b4163414025c27ee09c6e9bfb93d55e373aa201c681052eec140b863d86c.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Comparison on LaSOT [9]. Our tracker (SwinTrack-B-384) sets a new record with 0.713 SUC score and still runs efficiently at around $4 5 f p s$ . A lighter version (SwinTrack-T-224) achieves 0.672 SUC score and runs at around $9 6 f p s$ , which is on par with existing SOTAs in accuracy but much faster. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 235,
102
+ 87,
103
+ 754,
104
+ 329
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "Swin Transformer [23] and adapt it to Siamese tracking. Note that, other Transformer architectures can be used. For feature fusion, we introduce a simple homogeneous concatenation-based fusion architecture, without a query-based decoder. ",
111
+ "bbox": [
112
+ 174,
113
+ 422,
114
+ 825,
115
+ 464
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Moreover, taking into consideration that tracking is a temporal task, we propose a novel motion token to improve robustness. Inspired by that the target usually moves smoothly in a short period, motion token is represented by the historical target trajectory within a local temporal window. We incorporate the (single) motion token in the decoder of feature fusion to leverage motion information during tracking. Despite being conceptually simple, our motion token can effectively boost tracking performance, with negligible computation. ",
122
+ "bbox": [
123
+ 174,
124
+ 470,
125
+ 825,
126
+ 554
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "We name our framework SwinTrack. As a pure Transformer framework, SwinTrack enables better interactions inside the feature learning of template and search region and their fusion compared to pure CNN-based [1, 20] and hybrid CNN-Transformer [5, 32, 36] frameworks, leading to more robust performance (see Fig. 1). Fig. 2 demonstrates the architecture of SwinTrack. We conduct extensive experiments on five large-scale benchmarks to verify the effectiveness of SwinTrack, including LaSOT [9], $\\mathrm { L a S O T _ { \\mathrm { e x t } } }$ [8], TrackingNet [26], GOT-10k [15] and TNL2k [34]. On all benchmarks, SwinTrack achieves promising results and meanwhile runs fast at $4 5 f p s$ . In particular, on the challenging LaSOT, SwinTrack sets a new record of 71.3 SUC score, surpassing the strongest prior tracker [36] (to date) by 3.1 absolute percentage points and crossing the 0.7 SUC threshold for the first time (see Fig. 1 again). It also achieves 49.1 SUC, 84.0 SUC, 72.4 AO and 55.9 SUC scores on $\\mathrm { L a S O T _ { e x t } }$ , TrackingNet, GOT-10k and TNL2k respectively, which are better than or on par with state-of-the-arts (SoTAs). In addition, we provide a lighter version of SwinTrack that obtains comparable results to SoTAs but runs much faster at around 98 fps. ",
133
+ "bbox": [
134
+ 173,
135
+ 560,
136
+ 825,
137
+ 741
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "In summary, our contributions are as follows: (i) We propose SwinTrack, a simple and strong baseline for fully attentional tracking; (ii) We present a simple yet effective motion token, enabling the integration of rich motion context during tracking, further boosting the robustness of SwinTrack, with negligible computation; (iii) Our proposed SwinTrack achieves state-of-the-art performance on multiple benchmarks. We believe SwinTrack further shows the potential of Transformer and expect it to serve as a baseline for future research. ",
144
+ "bbox": [
145
+ 174,
146
+ 746,
147
+ 825,
148
+ 829
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 Related Work ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 174,
158
+ 849,
159
+ 321,
160
+ 867
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Siamese Tracking. The Siamese tracking methods formulate tracking as a matching problem and aim to offline learn a generic matching function for this task. The seminal method of [1] introduces a fully convolutional Siamese network for tracking and shows a good balance between accuracy and speed. To improve Siamese tracking in handling scale variation, the work of [20] incorporates the region proposal network (RPN) [27] into the Siamese network and proposes the anchor-based tracker, showing higher accuracy with faster speed. Later, numerous extensions have been presented to improve Siamese tracking, including deeper backbone [19], multi-stage architecture [10, 11], anchor-free Siamese trackers [41], deformable attention [37], to name a few. ",
167
+ "bbox": [
168
+ 173,
169
+ 883,
170
+ 821,
171
+ 911
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "image",
177
+ "img_path": "images/ceb1ea2031ef2c2e53af6c2d1dc3d1053361e969b449e58a2d842f8df5d040e9.jpg",
178
+ "image_caption": [
179
+ "Figure 2: Architecture of SwinTrack, which contains three parts including Transformer-based feature representation extraction, Transformer-based feature fusion and prediction head. Our SwinTrack is a simple and neat tracking framework without complex designs such as multi-scale features or temporal template updating, yet demonstrating state-of-the-art performance. Best viewed in color. "
180
+ ],
181
+ "image_footnote": [],
182
+ "bbox": [
183
+ 178,
184
+ 87,
185
+ 821,
186
+ 253
187
+ ],
188
+ "page_idx": 2
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "",
193
+ "bbox": [
194
+ 174,
195
+ 344,
196
+ 825,
197
+ 428
198
+ ],
199
+ "page_idx": 2
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "Transformer in Vision. Transformer [30] originates from natural language processing (NLP) for machine translation and has been introduced to vision recently and shows great potential. The work of [3] first uses Transformer for object detection and achieved promising results. To explore the capability of Transformer in representation learning, the work of [7] applies Transformer to construct backbone network, and the resulting Vision Transformer (ViT) attains excellent performance compared to convolutional networks while requiring fewer training resources, which encourages many extensions upon ViT[29, 4, 38, 33, 23]. Among them, the Swin Transformer [23] has received extensive attention. It proposes a simple shifted window strategy to replace the fixed-patch method in ViT, which significantly improves efficiency and meanwhile demonstrates state-of-the-art results on multiple image tasks. Our work is inspired by Swin Transformer, but differently, we focus on the video task of visual tracking. ",
204
+ "bbox": [
205
+ 174,
206
+ 435,
207
+ 825,
208
+ 587
209
+ ],
210
+ "page_idx": 2
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "Transformer in Tracking. Inspired by the success in other fields, researchers have leveraged Transformer for tracking. The method of [5] applies Transformer to enhance and fuse features in the Siamese tracking for improvement. The approach of [32] uses Transformer to exploit temporal features to improve tracking robustness. The work of [36] introduces a new transformer architecture dedicated to visual tracking, explores the Spatio-temporal Transformer by integrating the model updating operations into a Transformer module. ",
215
+ "bbox": [
216
+ 174,
217
+ 593,
218
+ 825,
219
+ 676
220
+ ],
221
+ "page_idx": 2
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "Our SwinTrack is related to but significantly different from the above Transformer-based trackers. Specifically, the aforementioned methods mainly apply Transformer to fuse convolutional features and belong to the hybrid CNN-Transformer architecture. Unlike them, SwinTrack is a pure Transformerbased tracking architecture where both representation learning and feature fusion are realized with Transformer, enabling the exploration of better features for robust tracking. ",
226
+ "bbox": [
227
+ 174,
228
+ 683,
229
+ 825,
230
+ 752
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "3 Tracking via Vision-Motion Transformer ",
237
+ "text_level": 1,
238
+ "bbox": [
239
+ 174,
240
+ 786,
241
+ 545,
242
+ 805
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "We present SwinTrack, a vision-motion integrated Transformer for object tracking, in Fig. 2. The proposed framework contains three main components, i.e., the Swin-Transformer backbone for feature extraction, the encoder-decoder network for mixing vision-motion cues, and the head network for localizing targets. In the following sections, we first shortly describe the Swin-Transformer backbone network, then elaborate on the proposed vision-motion encoder-decoder. Afterward, we give a discussion about our method and shortly describe the network head and training loss. ",
249
+ "bbox": [
250
+ 174,
251
+ 827,
252
+ 825,
253
+ 911
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "3.1 Swin-Transformer for Feature Extraction ",
260
+ "text_level": 1,
261
+ "bbox": [
262
+ 176,
263
+ 90,
264
+ 503,
265
+ 106
266
+ ],
267
+ "page_idx": 3
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "The deep convolutional neural network has significantly improved the performance of trackers. Along with the advancement of trackers, the backbone network has evolved twice: AlexNet [17] and ResNet [14]. Swin-Transformer [23], in comparison to ResNet, can give a more compact feature representation and richer semantic information to assist succeeding networks in better localizing the target objects (demonstrate in the ablation study demonstrated in the ablation study), which is thus chosen for basic feature extraction in our model. ",
272
+ "bbox": [
273
+ 173,
274
+ 116,
275
+ 825,
276
+ 200
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "Our tracker, following Siamese tracking framework [1], requires a pair of image patches as inputs, i.e., template image $\\mathbf { z } \\in \\overline { { \\mathbb { R } } } ^ { H _ { z } \\times W _ { z } \\times 3 }$ and search region image $\\mathbf { x } \\in \\mathbb { R } ^ { \\mathbf { \\hat { H } } _ { x } \\times W _ { x } \\times 3 }$ . As in the typical SwinTransformer procedure, template and search region images are divided to non-overlapped patches and sent to the network, which generates template tokens (dubbed T-tokens) φ(z) ∈ R Hzs Wzs ×C a nd search region tokens (dubbed S-tokens) $\\varphi ( \\mathbf { x } ) \\in \\mathbb { R } ^ { \\frac { H _ { x } } { s } \\frac { W _ { x } } { s } \\times C }$ . $s$ is the stride of the backbone network. Since there is no dimension projection in our model, $C$ is the hidden dimension of the whole model. ",
283
+ "bbox": [
284
+ 173,
285
+ 205,
286
+ 826,
287
+ 297
288
+ ],
289
+ "page_idx": 3
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "3.2 Vision-Motion Representation Learning ",
294
+ "text_level": 1,
295
+ "bbox": [
296
+ 176,
297
+ 311,
298
+ 491,
299
+ 327
300
+ ],
301
+ "page_idx": 3
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "The essential step for matching-based visual tracking is injecting the template information into the search region. In our framework, we adopt an encoder to fuse the features from the template and the search region, meanwhile, a decoder is arranged to achieve vision-motion representation learning, as illustrated in Fig. 2. ",
306
+ "bbox": [
307
+ 174,
308
+ 337,
309
+ 825,
310
+ 393
311
+ ],
312
+ "page_idx": 3
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "Encoder for fusing template and search tokens. The encoder contains a sequence of Transformer blocks where each consists of a multi-head self-attention (MSA) module and a feed-forward network (FFN). FFN contains a two-layers multi-layer perceptron (MLP), GELU activation layer is inserted after the first linear layer. Layer normalization (LN) is always conducted before every module (MSA and FFN). Residual connection is applied to MSA and FFN modules. ",
317
+ "bbox": [
318
+ 173,
319
+ 398,
320
+ 825,
321
+ 468
322
+ ],
323
+ "page_idx": 3
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "Before feeding the features into the encoder, the template and search region tokens are concatenated along spatial dimensions to generate a mixing representation $\\mathbf { f } _ { m }$ . For each block, the MSA module computes self-attention over mixing union representation, which equals to separately conducting self-attention on T-tokens/S-tokens and meanwhile performing cross-attention between T-tokens and S-tokens, but more efficient. FFN refines the features generated by MSA. When the tokens get out of the encoder, a de-concatenation operation is arranged to decouple the template and search region tokens. The process of encoder can be expressed as: ",
328
+ "bbox": [
329
+ 173,
330
+ 474,
331
+ 825,
332
+ 571
333
+ ],
334
+ "page_idx": 3
335
+ },
336
+ {
337
+ "type": "equation",
338
+ "img_path": "images/3bba2b7d42766c9ff3a4f32481a61ce95bd523e3be23e40ee2e48340e3add62a.jpg",
339
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { f } _ { m } ^ { 1 } = \\mathrm { C o n c a t } ( \\boldsymbol { \\varphi } ( \\mathbf { z } ) , \\boldsymbol { \\varphi } ( \\mathbf { x } ) ) } \\\\ & { \\qquad \\cdots \\cdot } \\\\ & { \\mathbf { f } _ { m } ^ { l ^ { \\prime } } = \\mathbf { f } _ { m } ^ { l } + \\mathrm { M S A } ( \\mathrm { L N } ( \\mathbf { f } _ { m } ^ { l } ) ) } \\\\ & { \\mathbf { f } _ { m } ^ { l + 1 } = \\mathbf { f } _ { m } ^ { l ^ { \\prime } } + \\mathrm { F F N } ( \\mathrm { L N } ( \\mathbf { f } _ { m } ^ { l ^ { \\prime } } ) ) } \\\\ & { \\qquad \\cdots } \\\\ & { \\mathbf { f } _ { z } ^ { L } , \\mathbf { f } _ { x } ^ { L } = \\mathrm { D e C o n c a t } ( \\mathbf { f } ^ { L } ) , } \\end{array}\n$$",
340
+ "text_format": "latex",
341
+ "bbox": [
342
+ 393,
343
+ 574,
344
+ 604,
345
+ 694
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "where $l$ denotes the $l$ -th layer and $L$ denotes the number of blocks. ",
352
+ "bbox": [
353
+ 173,
354
+ 696,
355
+ 609,
356
+ 712
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Decoder for fusing vision and motion information. Before describing the architecture of decoder, we first detail how to generate a motion token (dubbed M-token). Motion token is the embedding of the historical trajectory of the target object. The past object trajectory is represented as a set of target object box coordinates, $T = \\left\\{ \\Phi _ { 1 } , \\Phi _ { 2 } , . . . , \\Phi _ { t } \\right\\}$ , where $t$ represents the frame index, o is the bounding box of target object. o is defined by the top-left and bottom-right corners of the target object, denotes as $\\Phi _ { t } ^ { - } = \\bigl ( o _ { t } ^ { - x _ { 1 } } , o _ { t } ^ { y _ { 1 } } , o _ { t } ^ { x _ { 2 } } , o _ { t } ^ { y _ { 2 } } \\bigr )$ . For flexible modeling, a sampling process is required to ensure the following properties: 1) fixed length, 2) focusing on the latest trajectories and 3) reducing redundancy. In our method, we sample object trajectory as: ",
363
+ "bbox": [
364
+ 173,
365
+ 717,
366
+ 826,
367
+ 829
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "equation",
373
+ "img_path": "images/a87f4b17ae97d04fa2ccec404354fa712c08104ebdca9eedde6266d69c1cc000.jpg",
374
+ "text": "$$\n\\begin{array} { r } { \\mathcal { T } = \\big \\{ \\Phi _ { s ( 1 ) } , \\Phi _ { s ( 2 ) } , . . . , \\Phi _ { s ( n ) } \\big \\} , \\mathrm { w h e r e } s ( i ) = m a x ( t - i \\times \\Delta , 1 ) , } \\end{array}\n$$",
375
+ "text_format": "latex",
376
+ "bbox": [
377
+ 282,
378
+ 853,
379
+ 714,
380
+ 871
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "$n$ is the number of sampled object trajectories, $\\Delta$ is the fixed sampling interval. For Siamese tracker, the search region is cropped from the input image. In detail, a cropping with resizing operation can be used to describe the process. Giving the point in the input image as $\\left( \\mathbf { x } _ { i } , \\mathbf { y } _ { i } \\right)$ , the corresponding point in the search region as $\\left( \\mathbf { x } _ { o } , \\mathbf { y } _ { o } \\right)$ , we can formulate the cropping process employed in pre-processing of the Siamese Tracker as $\\mathbf { x } _ { o } = ( \\mathbf { x } _ { i } - i _ { x } ) s _ { x } + o _ { x }$ and ${ \\bf y } _ { o } = ( { \\bf y } _ { i } - i _ { y } ) s _ { y } + o _ { y }$ , where $( i _ { x } , i _ { y } )$ is the center of the cropping window in the input image, $( s _ { x } , s _ { y } )$ is the scaling factor, $( o _ { x } , o _ { y } )$ is the center of cropped and scaled window in the search region. We apply the same transformation on the sampled object trajectory to make the object trajectory invariant to the cropping, denoting $\\bar { \\mathcal { T } } = \\{ \\bar { \\mathbb { D } } _ { s ( 1 ) } , \\bar { \\mathbb { D } } _ { s ( 2 ) } , . . . , \\bar { \\mathbb { D } } _ { s ( n ) } \\}$ as the result. ",
387
+ "bbox": [
388
+ 173,
389
+ 882,
390
+ 821,
391
+ 912
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "",
398
+ "bbox": [
399
+ 173,
400
+ 90,
401
+ 825,
402
+ 190
403
+ ],
404
+ "page_idx": 4
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "Then, to embed the transformed object trajectory into the network, we adopt four embedding matrices to embed the elements in box coordinates separately. We denotes the embedding matrix as W ∈ R(g+1)×d, $\\^ \\mathrm { g }$ controls the embedding granularity of the object trajectory, $d$ is the size of each embedding vector. The last entry of the embedding matrix is used as the padding vector, indicating an invalid state, like object absence or out of the search region. Thus, we normalize the sampled target object box coordinates in the range $[ 1 , \\mathbb { g } ]$ , and quantize to integers to get the index of embedding vector: ",
409
+ "bbox": [
410
+ 173,
411
+ 194,
412
+ 826,
413
+ 294
414
+ ],
415
+ "page_idx": 4
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/b7a6628efd2eae2119392aade7e89ec4e64d2435bd65751772febfd9330744d7.jpg",
420
+ "text": "$$\n\\begin{array} { r l } & { \\hat { T } = \\{ \\hat { \\mathbb { O } } _ { s ( 1 ) } , \\hat { \\mathbb { O } } _ { s ( 2 ) } , . . . , \\hat { \\mathbb { O } } _ { s ( n ) } \\} , } \\\\ & { \\mathrm { \\it ~ \\gamma ~ \\mathrm { h e r e } ~ } \\hat { \\mathbb { O } } _ { s ( i ) } = [ \\mathrm { n } ( \\bar { \\mathbb { O } } _ { s ( i ) } ^ { x _ { 1 } } , w ) , \\mathrm { n } ( \\bar { \\mathbb { O } } _ { s ( i ) } ^ { y _ { 1 } } , h ) , \\mathrm { n } ( \\bar { \\mathbb { O } } _ { s ( i ) } ^ { x _ { 2 } } , w ) , \\mathrm { n } ( \\bar { \\mathbb { O } } _ { s ( i ) } ^ { y _ { 2 } } , h ) ] , } \\\\ & { \\mathrm { \\it ~ \\mathrm { \\it ~ \\hat { \\Omega } ~ } } \\mathrm { \\ n } ( o , l ) = \\left\\{ \\begin{array} { l l } { \\mathrm { \\Delta } [ \\frac { o } { l } \\times \\mathbb { g } ] } & { \\mathrm { i f ~ } \\mathrm { v a l i d } , } \\\\ { \\mathbb { g } + 1 } & { \\mathrm { e l s e } , } \\end{array} \\right. } \\end{array}\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 294,
424
+ 316,
425
+ 714,
426
+ 396
427
+ ],
428
+ "page_idx": 4
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "$( w , h )$ is the size of search region feature map. ",
433
+ "bbox": [
434
+ 173,
435
+ 401,
436
+ 478,
437
+ 416
438
+ ],
439
+ "page_idx": 4
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "Finally, the motion token $\\mathbf { E } _ { m o t i o n } ~ \\in ~ \\mathbb { R } ^ { 1 \\times d }$ is given by a concatenation of all box coordinate embedding of the sampled object trajectory. FLOPs is negligible because the construction of motion token is just a composition of embedding lookups and token concatenation. ",
444
+ "bbox": [
445
+ 176,
446
+ 422,
447
+ 823,
448
+ 465
449
+ ],
450
+ "page_idx": 4
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "The decoder consists of a multi-head cross-attention(MCA) module and a feed-forward network(FFN). The decoder takes the outputsvision-motion representation $\\mathbf { f } _ { v m } \\in \\mathbb { R } ^ { \\frac { H _ { x } } { s } \\times \\frac { W _ { x } } { s } \\times C }$ d the motion token as input, generating tof by computing cross-attention over $\\mathbf { f } _ { x } ^ { L }$ finaland $\\mathrm { C o n c a t } ( { \\bf E } _ { m o t i o n } , { \\bf f } _ { z } ^ { L } , { \\bf f } _ { x } ^ { L } )$ . The decoder is akin to a layer in the encoder, except that the correlation between the template tokens and the search tokens is dropped since we do not need to update the features from the template image in the last layer. The process of the decoder is formulated as: ",
455
+ "bbox": [
456
+ 173,
457
+ 472,
458
+ 825,
459
+ 559
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "equation",
465
+ "img_path": "images/875790817d6f8f66d0085f280abbbf833d6cc0a510a1acc60b86080a75f38e4e.jpg",
466
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { f } _ { m } ^ { D } = \\mathrm { C o n c a t } ( \\mathbf { E } _ { m o t i o n } , \\mathbf { f } _ { z } ^ { L } , \\mathbf { f } _ { x } ^ { L } ) } \\\\ & { \\mathbf { f } _ { v m } ^ { \\prime } = \\mathbf { f } _ { x } ^ { L } + \\mathrm { M C A } ( \\mathrm { L N } ( \\mathbf { f } _ { x } ^ { L } ) , \\mathrm { L N } ( \\mathbf { f } _ { m } ^ { D } ) ) } \\\\ & { \\mathbf { f } _ { v m } = \\mathbf { f } _ { v m } ^ { \\prime } + \\mathrm { F F N } ( \\mathrm { L N } ( \\mathbf { f } _ { v m } ^ { \\prime } ) ) . } \\end{array}\n$$",
467
+ "text_format": "latex",
468
+ "bbox": [
469
+ 370,
470
+ 582,
471
+ 627,
472
+ 643
473
+ ],
474
+ "page_idx": 4
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "$\\mathbf { f } _ { v m }$ will feed to the head network to generate a classification response map and a bounding box regression map. ",
479
+ "bbox": [
480
+ 171,
481
+ 654,
482
+ 823,
483
+ 684
484
+ ],
485
+ "page_idx": 4
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "Positional encoding. Transformer requires a positional encoding to identify the position of the current processing token[30] because the self-attention module is permutation-invariance. We adopt the untied positional encoding [16] as our positional encoding method. The untied positional encoding enhances the expressiveness of the model through untie the positional embeddings from token embeddings with an isolated positional embedding matrix. It also considers the case of special tokens, like the motion token in this paper. We generalize the untied positional encoding to multi-dimensions multi-sources data to comply with concatenated-based fusion in our tracker. See the appendix for the details. ",
490
+ "bbox": [
491
+ 173,
492
+ 688,
493
+ 825,
494
+ 800
495
+ ],
496
+ "page_idx": 4
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "3.3 Discussion ",
501
+ "text_level": 1,
502
+ "bbox": [
503
+ 174,
504
+ 815,
505
+ 287,
506
+ 830
507
+ ],
508
+ "page_idx": 4
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "Why concatenated attention? To simplify the description, we call the method described above concatenation-based fusion. To fuse and process features from multiple sources, it is intuitive to perform self-attention on the feature from each source separately and then compute cross-attention across features from different sources. We call this method cross-attention-based fusion. Transformer makes fewer assumptions about the spatial structure of data, which provides great modeling flexibility. ",
513
+ "bbox": [
514
+ 174,
515
+ 842,
516
+ 825,
517
+ 911
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "In comparison to cross-attention-based fusion, concatenation-based fusion can save computation cost through operation sharing and reduce model parameters through weight sharing. From the perspective of metric learning, weight sharing is an essential design to ensure the metric between two branches of data is symmetric. Through concatenation-based fusion, we implement this property not only in the feature extraction stage but also in the feature fusion stage. In general, concatenation-based fusion improves both efficiency and performance. ",
524
+ "bbox": [
525
+ 174,
526
+ 92,
527
+ 825,
528
+ 174
529
+ ],
530
+ "page_idx": 5
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "Why not window-based self/cross-attention? Since we select stage 3 of the Swin-Transformer as the output, the number of tokens involved is significantly reduced, window-based attention cannot save too many FLOPs. Furthermore, considering the extra latency introduced by the window partition and window reverse operations, window-based attention may even be the slower one. ",
535
+ "bbox": [
536
+ 174,
537
+ 181,
538
+ 825,
539
+ 237
540
+ ],
541
+ "page_idx": 5
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Why not a query-based decoder? Derivated from vanilla Transformer decoder, many transformerbased models in vision tasks leverage a learnable query to extract the desired objective features from the encoder, like object queries in [3], target query in [36]. However, in our experiment, a query-based decoder suffers from slow convergence and inferior performance. Most Siamese trackers [20, 35, 13] formulate tracking as a foreground-background classification problem, which can better exploit the background information. The vanilla Transformer decoder is a generative model, the generative approaches are considered not suitable for the classification tasks. In another aspect, learning a general target query for any kind of object might cause a bottleneck. In terms of vanilla Transformer encoder-decoder architecture, SwinTrack is an \"encoder\" only model. Furthermore, quite a little domain knowledge can be easily applied on a classic Siamese tracker to improve the performance, like introducing the smooth movement assumption by using Hanning penalty window on the response map. ",
546
+ "bbox": [
547
+ 173,
548
+ 242,
549
+ 825,
550
+ 409
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "Are other forms of motion token feasible? Other forms to construct motion token are possible, such as constructing motion token by summing up the past box coordinate embeddings or representing past object trajectories by one token per box. In our early experiments, we find that the proposed motion token is more effective with the best performance. Summing up the past box coordinate embeddings may result in over-parameterization on the coordinate embeddings. While adding temporal motion representation along with visual features to the single-layer decoder in a multi-token form is ineffective, precise temporal modeling may be required in this form. ",
557
+ "bbox": [
558
+ 174,
559
+ 415,
560
+ 825,
561
+ 512
562
+ ],
563
+ "page_idx": 5
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "3.4 Head and Loss ",
568
+ "text_level": 1,
569
+ "bbox": [
570
+ 174,
571
+ 529,
572
+ 316,
573
+ 542
574
+ ],
575
+ "page_idx": 5
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Head. The head network is split into two branches: classification and bounding box regression. Each of them is a three-layer perceptron. And both of them receives the feature map from the decoder as input to predict the classification response map $r _ { c l s } \\in \\mathbb { R } ^ { ( H _ { x } \\times W _ { x } ) \\times 1 }$ and bounding box regression map $\\bar { r _ { r e g } } \\in \\mathbb { R } ^ { ( H _ { x } \\times W _ { x } ) \\times 4 }$ , respectively. ",
580
+ "bbox": [
581
+ 174,
582
+ 553,
583
+ 825,
584
+ 612
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "Classification loss. In classification branch, we employ the $I o U$ -aware classification score as the training target and the varifocal loss [39] as the training loss function. IoU-aware design has been very popular recently, but most works consider IoU prediction as an auxiliary branch to assist classification or bounding box regression [41, 2, 35]. To remove the gap between different prediction branches, [39] and [21] replace the hard classification target from the ground-truth value, (i.e., 1 for positive samples, 0 for negative samples), to the IoU between the predicted bounding box and the ground-truth one, which is named the $I o U .$ -aware classification score (IACS). IACS can help the model select a more accurate bounding box prediction candidate from the pool by trying to predict the quality of the bounding box prediction in another branch at the same position. Along with the IACS, the varifocal loss was proposed in [39] to help the IACS approach outperform other IoU-aware designs. ",
591
+ "bbox": [
592
+ 173,
593
+ 618,
594
+ 825,
595
+ 757
596
+ ],
597
+ "page_idx": 5
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "The classification loss can be formulated as: ",
602
+ "bbox": [
603
+ 176,
604
+ 763,
605
+ 464,
606
+ 777
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "equation",
612
+ "img_path": "images/74ca43b58bc04880ee39b4edeb852b7901f8ee82b6bd92c8f29c4e183958a2b7.jpg",
613
+ "text": "$$\n\\mathbb { L } _ { c l s } = \\mathbb { L } _ { \\mathrm { V F L } } ( p , \\mathrm { I o U } ( b , \\hat { b } ) ) ,\n$$",
614
+ "text_format": "latex",
615
+ "bbox": [
616
+ 405,
617
+ 781,
618
+ 589,
619
+ 803
620
+ ],
621
+ "page_idx": 5
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "where $p$ denotes the predicted IACS, $b$ denotes the predicted bounding box, and $\\hat { b }$ denotes the ground-truth bounding box. ",
626
+ "bbox": [
627
+ 174,
628
+ 810,
629
+ 825,
630
+ 840
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Regression loss. For bounding box regression, we employ the generalized IoU loss[28]. The regression loss function can be formulated as: ",
637
+ "bbox": [
638
+ 174,
639
+ 844,
640
+ 823,
641
+ 873
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "equation",
647
+ "img_path": "images/430b51ce3631780d398a75dc7794e5aba609c20ad0b960bb5a5dca0210f1fdbb.jpg",
648
+ "text": "$$\n\\mathbb { L } _ { r e g } = \\sum _ { j } \\mathbb { 1 } _ { \\left\\{ \\mathrm { I o U } ( b _ { j } , \\hat { b } ) > 0 \\right\\} } [ p \\mathbb { L } _ { \\mathrm { G I o U } } ( b _ { j } , \\hat { b } ) ] .\n$$",
649
+ "text_format": "latex",
650
+ "bbox": [
651
+ 357,
652
+ 881,
653
+ 640,
654
+ 915
655
+ ],
656
+ "page_idx": 5
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "The GIoU loss is weighted by $p$ to emphasize the high classification score samples. The training signals from the negative samples are ignored. ",
661
+ "bbox": [
662
+ 173,
663
+ 92,
664
+ 823,
665
+ 119
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "4 Experiments ",
672
+ "text_level": 1,
673
+ "bbox": [
674
+ 174,
675
+ 140,
676
+ 312,
677
+ 156
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "4.1 Implementation ",
684
+ "text_level": 1,
685
+ "bbox": [
686
+ 174,
687
+ 171,
688
+ 325,
689
+ 186
690
+ ],
691
+ "page_idx": 6
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "Model. We design two variants of SwinTrack with different configurations as follows: ",
696
+ "bbox": [
697
+ 173,
698
+ 198,
699
+ 738,
700
+ 213
701
+ ],
702
+ "page_idx": 6
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "• SwinTrack-T-224. Backbone: Swin Transformer-Tiny [23], pretrained with ImageNet-1k; Template size: $[ 1 1 2 \\times 1 1 2 ]$ ; Search region size: $[ 2 2 4 \\times 2 2 4 ]$ ; $C = 3 8 4$ ; $N = 4$ ; \n• SwinTrack-B-384. Backbone: Swin Transformer-Base [23], pretrained with ImageNet-22k; Template size: $[ 1 9 2 \\times 1 9 2 ]$ ; Search region size: $[ 3 8 4 \\times 3 8 4 ]$ ; $C = 5 1 2$ ; $N = 8$ ; ",
707
+ "bbox": [
708
+ 217,
709
+ 223,
710
+ 754,
711
+ 314
712
+ ],
713
+ "page_idx": 6
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "where $C$ and $N$ are the channel number of the hidden layers in the first stage of Swin Transformer and the number of encoder blocks in feature fusion, respectively. In all variants, we use the output after the third stage of Swin Transformer for feature extraction. Thus, the backbone stride $s$ is 16. ",
718
+ "bbox": [
719
+ 178,
720
+ 325,
721
+ 821,
722
+ 367
723
+ ],
724
+ "page_idx": 6
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "For motion token, the number of sampled object trajectory $n$ is set to 16, the fixed sampling interval $\\Delta$ is set to 15. If the frame rate of the video sequence is available, the sampling interval is adjusted according to the frame rate. Suppose the frame rate is $\\mathbb { f }$ , the new sampling interval is getting by $\\mathrm { { \\frac { \\Delta } { 3 0 } f } }$ , 30 fps is the standard frame rate we assumed. g, which controls the embedding granularity, is set to the same size as the search region feature map, like 14 for SwinTrack-T-224, and 24 for SwinTrack-B-384. For the model for GOT-10k sequences, $n$ is set to 8, $\\Delta$ is set to 8, and no frame rate adjustment is applied. ",
729
+ "bbox": [
730
+ 173,
731
+ 372,
732
+ 825,
733
+ 470
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "Training. We train SwinTrack using the training splits of LaSOT [9], TrackingNet [26], GOT-10k [15] (1,000 videos are removed following [36] for fair comparison) and COCO 2017 [22]. In addition, we report the results of SwinTrack-T-224 and SwinTrack-B-384 with GOT-10k training split only to follow the protocol described in [15]. ",
740
+ "bbox": [
741
+ 173,
742
+ 476,
743
+ 825,
744
+ 532
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "The model is optimized with AdamW [24], with a learning rate of 5e-4, and a weight decay of 1e-4. The learning rate of the backbone is set to 5e-5. We train the network on 8 NVIDIA V100 GPUs for 300 epochs with 131,072 samples per epoch. The learning rate is dropped by a factor of 10 after 210 epochs. A 3-epoch linear warmup is applied to stabilize the training process. DropPath [18] is applied on the backbone and the encoder with a rate of 0.1. For the models trained for the GOT-10k evaluation protocol, to prevent over-fitting, the training epoch is set to 150, and the learning rate is dropped after 120 epochs. ",
751
+ "bbox": [
752
+ 174,
753
+ 537,
754
+ 825,
755
+ 636
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "For the motion token, the object trajectory for the Siamese training pair is generated with the method described above. The frames that object annotated as absent or out of the video sequence are marked as invalid, the corresponding box coordinates set to $- \\infty$ . Since the coarse granularity of the coordinate embedding in our setting is already can be seen as an augmentation of historical object trajectory, no additional data augmentation is applied. ",
762
+ "bbox": [
763
+ 174,
764
+ 642,
765
+ 825,
766
+ 712
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "Inference. We follow the common procedures for Siamese network-based tracking [1]. The template image is cropped from the first frame of the video sequence. The target object is in the center of the image with a background area factor of 2. The search region is cropped from the current tracking frame, and the image center is the target center position predicted in the previous frame. The background area factor for the search region is 4. ",
773
+ "bbox": [
774
+ 174,
775
+ 718,
776
+ 825,
777
+ 787
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "Our SwinTrack takes the template image and search region as inputs and output classification map $r _ { c l s }$ and regression map $r _ { r e g }$ . To utilize positional prior in tracking, we apply hanning window penalty on $r _ { c l s }$ , and the final classification map $r _ { c l s } ^ { \\prime }$ is obtained via $\\boldsymbol { r } _ { c l s } ^ { \\prime } = ( 1 - \\gamma ) \\times \\boldsymbol { r } _ { c l s } + \\gamma \\times \\boldsymbol { h }$ , where $\\gamma$ is the weight parameter and $h$ is the Hanning window with the same size as $r _ { c l s }$ . The target position is determined by the largest value in $r _ { c l s } ^ { \\prime }$ and the scale is estimated based on the corresponding regression results in $r _ { r e g }$ . ",
784
+ "bbox": [
785
+ 173,
786
+ 794,
787
+ 825,
788
+ 877
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "For the motion token, the predicted confidence score and bounding box are collected on the fly. A confidence threshold $\\theta _ { c o n f }$ is applied, if the confidence score given by the classification branch of the head is lower than the threshold, the target object in the current frame is marked as lost by setting the collected bounding box to $- \\infty$ . $\\theta _ { c o n f }$ is set to 0.4 for LaSOT, the rests are set to 0.3. ",
795
+ "bbox": [
796
+ 173,
797
+ 883,
798
+ 821,
799
+ 911
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "table",
805
+ "img_path": "images/bbec3b18183201f9ed3782f1477a1e4082f6dcb762564bffeab908496dfdcf90.jpg",
806
+ "table_caption": [
807
+ "Table 1: Experiments and comparisons on five benchmarks: LaSOT, $\\mathrm { L a S O T _ { e x t } }$ , TrackingNet, GOT10k and TNL2k. "
808
+ ],
809
+ "table_footnote": [],
810
+ "table_body": "<table><tr><td rowspan=\"2\">Tracker</td><td colspan=\"2\">LaSOT[9]</td><td colspan=\"2\">LaSOText [8]</td><td colspan=\"2\">TrackingNet [26]</td><td colspan=\"3\">GOT-10k [15]</td><td colspan=\"2\">TNL2k [34]</td></tr><tr><td>SUC</td><td>P</td><td>SUC</td><td>P</td><td>SUC</td><td>P</td><td>AO</td><td>SR0.5</td><td>SR0.75</td><td>SUC</td><td>P</td></tr><tr><td>C-RPN [10]</td><td>45.5</td><td>44.3</td><td>27.5</td><td>32.0</td><td>66.9</td><td>61.9</td><td>1</td><td>1</td><td>1</td><td>-</td><td>-</td></tr><tr><td>SiamPRN++ [19]</td><td>49.6</td><td>49.1</td><td>34.0</td><td>39.6</td><td>73.3</td><td>69.4</td><td>51.7</td><td>61.6</td><td>32.5</td><td>41.3</td><td>41.2</td></tr><tr><td>Ocean [41]</td><td>56.0</td><td>56.6</td><td>-</td><td>-</td><td>1</td><td>-</td><td>61.1</td><td>72.1</td><td>47.3</td><td>38.4</td><td>37.7</td></tr><tr><td>DiMP [2]</td><td>56.9</td><td>56.7</td><td>39.2</td><td>45.1</td><td>74.0</td><td>68.7</td><td>61.1</td><td>71.7</td><td>49.2</td><td>44.7</td><td>43.4</td></tr><tr><td>LTMU [6]</td><td>57.2</td><td>57.2</td><td>41.4</td><td>47.3</td><td>-</td><td>-</td><td>-</td><td>-</td><td>1</td><td>48.5</td><td>47.3</td></tr><tr><td>SiamR-CNN[31]</td><td>64.8</td><td>1</td><td>1</td><td>1</td><td>81.2</td><td>80.0</td><td>64.9</td><td>72.8</td><td>59.7</td><td>52.3</td><td>52.8</td></tr><tr><td>STMTrack [12]</td><td>60.6</td><td>63.3</td><td>-</td><td>-</td><td>80.3</td><td>76.7</td><td>64.2</td><td>73.7</td><td>57.5</td><td>-</td><td>-</td></tr><tr><td>AutoMatch [40]</td><td>58.3</td><td>59.9</td><td>37.6</td><td>43.0</td><td>76.0</td><td>72.6</td><td>65.2</td><td>76.6</td><td>54.3</td><td>-</td><td>-</td></tr><tr><td>TrDiMP [32]</td><td>63.9</td><td>61.4</td><td>1</td><td>1</td><td>78.4</td><td>73.1</td><td>67.1</td><td>77.7</td><td>58.3</td><td>-</td><td>-</td></tr><tr><td>TransT[5]</td><td>64.9</td><td>69.0</td><td>-</td><td>1</td><td>81.4</td><td>80.3</td><td>67.1</td><td>76.8</td><td>60.9</td><td>51.0</td><td>-</td></tr><tr><td>STARK [36]</td><td>67.1</td><td></td><td></td><td>=</td><td>82.0</td><td>-</td><td>68.8</td><td>78.1</td><td>64.1</td><td>-</td><td>-</td></tr><tr><td>KeepTrack [25]</td><td>67.1</td><td>70.2</td><td>48.2</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>1</td><td>-</td><td>-</td></tr><tr><td>SwinTrack-T-224</td><td>67.2</td><td>70.8</td><td>47.6</td><td>53.9</td><td>81.1</td><td>78.4</td><td>71.3</td><td>81.9</td><td>64.5</td><td>53.0</td><td>53.2</td></tr><tr><td>SwinTrack-B-384</td><td>71.3</td><td>76.5</td><td>49.1</td><td>55.6</td><td>84.0</td><td>82.8</td><td>72.4</td><td>80.5</td><td>67.8</td><td>55.9</td><td>57.1</td></tr></table>",
811
+ "bbox": [
812
+ 176,
813
+ 132,
814
+ 821,
815
+ 329
816
+ ],
817
+ "page_idx": 7
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "",
822
+ "bbox": [
823
+ 173,
824
+ 367,
825
+ 823,
826
+ 395
827
+ ],
828
+ "page_idx": 7
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "4.2 Comparisons to State-of-the-arts ",
833
+ "text_level": 1,
834
+ "bbox": [
835
+ 176,
836
+ 417,
837
+ 441,
838
+ 431
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "We conduct experiments and compare SwinTrack with SoTA trackers on five benchmarks. ",
845
+ "bbox": [
846
+ 171,
847
+ 444,
848
+ 761,
849
+ 459
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "LaSOT. LaSOT [9] consists of 280 videos for test. Tab. 1 shows the results and comparisons with SoTAs. From Tab. 1, we can observe that SwinTrack-T-224 with light architecture reaches SoTA performance with 0.672 SUC and 0.708 PRE scores, which is competitive compared with other Transformer-based trackers, including STARK-ST101 (0.671 SUC score) and TransT (0.649 SUC), and other trackers using complicated designs such as KeepTrack (0.671 SUC) and SiamR-CNN (0.648 SUC score). With a larger backbone and input size, our strongest variant SwinTrack-B-384 sets a new record with 0.713 SUC score, surpassing START-ST101 and KeepTrack by 4.2 absolute percentage points. ",
856
+ "bbox": [
857
+ 173,
858
+ 465,
859
+ 825,
860
+ 577
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "$\\mathbf { L a S O T } _ { \\mathrm { e x t } }$ . The recent $\\mathrm { L a S O T _ { \\mathrm { e x t } } }$ [8] is an extension of LaSOT by adding 150 extra videos. These new sequences are challenging as many similar distractors cause difficulties for tracking. The results of our tracker related to this dataset are an average of three times. KeepTrack uses a complex association technique to handle distractors and achieves a promising 0.482 SUC score as in Tab. 1. Compared with complicated KeepTrack, SwinTrack-T-224 is simple and neat, yet shows comparable performance with 0.476 SUC score. In addition, due to complicated design, KeepTrack runs at less than $2 0 f p s$ , while SwinTrack-T-224 runs in 98 fps, $5 \\times$ faster than KeepTrack. When using a larger model, SwinTrack-B-384 shows the best performance with 0.491 SUC score. ",
867
+ "bbox": [
868
+ 173,
869
+ 582,
870
+ 825,
871
+ 694
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "TrackingNet. We evaluate different trackers on the test set of TrackingNet [26]. From Tab. 1, we observe that our SwinTrack-T-224 achieves a comparable result with 0.811 SUC score. Using a larger model and input size, SwinTrack-B-384 obtains the best performance with 0.840 SUC score, better than STARK-ST101 with 0.820 SUC score and TransT with 0.814 SUC score. ",
878
+ "bbox": [
879
+ 174,
880
+ 699,
881
+ 825,
882
+ 755
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "GOT-10k. GOT-10k [15] offers 180 videos for test and it requires trackers to be trained using GOT-10k train split only. From Tab. 1, we see that SwinTrack-B-384 achieves the best mAO of 0.724, and SwinTrack-T-224 obtains a mAO of 0.713. Both models outperform other Transformer-based counterparts significantly, including START-ST101 (0.688 mAO), TransT (0.671 mAO) and TrDiMP (0.671 mAO). ",
889
+ "bbox": [
890
+ 174,
891
+ 762,
892
+ 825,
893
+ 832
894
+ ],
895
+ "page_idx": 7
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "TNL2k. TNL2k [34] is a newly released tracking dataset with 700 videos for test. As reported in Tab. 1, both models surpass the others. SwinTrack-B-384 set a new state-of-the-art with 0.559 SUC score. ",
900
+ "bbox": [
901
+ 174,
902
+ 837,
903
+ 823,
904
+ 878
905
+ ],
906
+ "page_idx": 7
907
+ },
908
+ {
909
+ "type": "table",
910
+ "img_path": "images/73828994b44f600185e85d70e76927cce9520e5ccd019e4f95bdf479fb194855.jpg",
911
+ "table_caption": [
912
+ "Table 2: Comparison on running speed and # parameters with other Transformer-based trackers. "
913
+ ],
914
+ "table_footnote": [],
915
+ "table_body": "<table><tr><td>Tracker</td><td>Speed (fps)</td><td>MACs² (G)</td><td>Params (M)</td></tr><tr><td>TrDiMP [32]</td><td>26</td><td>=</td><td>1</td></tr><tr><td>TransT[5]</td><td>50</td><td>=</td><td>23</td></tr><tr><td>STARK-ST50 [36]</td><td>42</td><td>10.9</td><td>24</td></tr><tr><td>STARK-ST101 [36]</td><td>32</td><td>18.5</td><td>42</td></tr><tr><td>SwinTrack-T-224</td><td>98</td><td>6.4</td><td>23</td></tr><tr><td>SwinTrack-B-384</td><td>45</td><td>69.7</td><td>91</td></tr></table>",
916
+ "bbox": [
917
+ 282,
918
+ 112,
919
+ 715,
920
+ 217
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "table",
926
+ "img_path": "images/1bb8bb00097fc003ed50452c518b133bb61db7f0945a63e73169aacad6d425e8.jpg",
927
+ "table_caption": [
928
+ "Table 3: Ablation experiments of SwinTrack on four benchmarks. The experiments are conducted on SwinTrack-T-224 without the motion token. ❶: baseline method, i.e., SwinTrack-T-224 without motion token; $\\otimes$ : replacing Transformer backbone in the baseline method with ResNet-50; ❸: replacing our feature fusion with cross attention-based fusion in the baseline method; $\\bullet$ : replacing the decoder in baseline with a target query-based; $\\pmb { \\ 6 }$ : replacing united positional encoding with absolute sine position encoding in the baseline method; $\\pmb { \\circledcirc }$ : replacing the IoU-aware classification loss with the plain binary cross entropy loss; $\\pmb { \\ 6 }$ : removing the Hanning penalty window in the baseline method inference. "
929
+ ],
930
+ "table_footnote": [],
931
+ "table_body": "<table><tr><td></td><td>LaSOT SUC (%)</td><td>LaSOText SUC (%)</td><td>TrackingNet SUC (%)</td><td>GOT-10k3 mA0 (%)</td><td>Speed fps</td><td>Params M</td></tr><tr><td>1</td><td>66.7</td><td>46.9</td><td>80.8</td><td>70.9</td><td>98</td><td>22.7</td></tr><tr><td>②</td><td>64.2</td><td>41.8</td><td>79.5</td><td>68.2</td><td>121</td><td>20.0</td></tr><tr><td>③</td><td>66.6</td><td>45.4</td><td>80.2</td><td>69.3</td><td>72</td><td>34.6</td></tr><tr><td>4</td><td>66.6</td><td>43.2</td><td>79.6</td><td>69.0</td><td>91</td><td>25.3</td></tr><tr><td>5</td><td>65.7</td><td>45.0</td><td>80.0</td><td>70.0</td><td>103</td><td>21.6</td></tr><tr><td>6</td><td>66.2</td><td>46.7</td><td>79.4</td><td>68.2</td><td>98</td><td>22.7</td></tr><tr><td>0</td><td>65.7</td><td>46.0</td><td>80.0</td><td>69.6</td><td>98</td><td>22.7</td></tr></table>",
932
+ "bbox": [
933
+ 240,
934
+ 348,
935
+ 758,
936
+ 479
937
+ ],
938
+ "page_idx": 8
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "Efficiency comparison. We report the comparisons of SwinTrack with other Transformer-based trackers in terms of efficiency and complexity. As displayed in Tab. 2, SwinTrack-T-224 with a small model runs the fastest with a speed of 98 fps. Especially, compared with STARK-ST101 and STARK-ST50 with $3 2 f p s$ and $4 2 f p s$ , SwinTrack-T-224 is $3 \\times$ and $2 \\times$ faster. Despite using a larger model, our SwinTrack-B-384 is still faster than STARK-ST101 and STARK-ST50. ",
943
+ "bbox": [
944
+ 174,
945
+ 505,
946
+ 825,
947
+ 574
948
+ ],
949
+ "page_idx": 8
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "4.3 Ablation Experiment ",
954
+ "text_level": 1,
955
+ "bbox": [
956
+ 174,
957
+ 592,
958
+ 359,
959
+ 606
960
+ ],
961
+ "page_idx": 8
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "Comparison with ResNet backbone. We compare the Swin-Transformer backbone with popular ResNet-50 [14]. As shown in Tab. 3 ( $\\pmb { \\theta }$ vs. $\\pmb { \\varrho }$ ). The Swin Transformer backbone significantly boosts the performance by $2 . 5 \\%$ SUC score in LaSOT, $5 . 1 \\%$ SUC score in $\\mathrm { L a S O T _ { e x t } }$ . The result shows that the strong appearance modeling capability provided by the Swin Transformer plays a crucial role. ",
966
+ "bbox": [
967
+ 174,
968
+ 617,
969
+ 825,
970
+ 672
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Feature fusion. As displayed in Tab. 3 $\\pmb { \\theta }$ vs. $\\pmb { \\Theta }$ ), compared with the concatenation-based fusion, the cross attention-based fusion runs at a slower speed, occupies much more memory, and also has an inferior performance on all datasets. Slower speed can be due to the latency brought by the extra operations. The parameter-sharing strategy not only just reduces the number of parameters but also benefits metric learning. ",
977
+ "bbox": [
978
+ 174,
979
+ 679,
980
+ 825,
981
+ 750
982
+ ],
983
+ "page_idx": 8
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Comparison with the query-based decoder. Queries is commonly adopted in the decoder of Transformer network in vision tasks, e.g. object query [3] and target query [36]. Nevertheless, our empirical results in Tab. 3 $\\pmb { \\ 0 }$ vs. $\\pmb { \\varrho }$ ) show that a target query-based decoder degrades the tracking performance on all benchmarks, even with $2 \\times$ training pairs. As discussed, one possible reason is the generative model is not suitable for classification. Besides, learning a general target query for any kind of object may also be difficult. ",
988
+ "bbox": [
989
+ 174,
990
+ 755,
991
+ 825,
992
+ 838
993
+ ],
994
+ "page_idx": 8
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "Position encoding. We compare the united positional encoding used in SwinTrack and the original absolute position encoding in Transformer [30]. Notice, We make a little modification to the original absolute position encoding: Except for the 2D embedding, the index of token source (e.g. 1 for the tokens from the template patch, 2 for the tokens from the search region patch) is also embedded. As shown in Tab. 3 (❶ vs. $\\bullet$ ), our method with united positional encoding obtains improvements with 0.8-1.9 absolute percentage points on the benchmarks with negligible loss in speed (98 vs. 103). ",
999
+ "bbox": [
1000
+ 174,
1001
+ 844,
1002
+ 825,
1003
+ 887
1004
+ ],
1005
+ "page_idx": 8
1006
+ },
1007
+ {
1008
+ "type": "table",
1009
+ "img_path": "images/a44e35c837372cddc6d07e6849d74323e28bf2af4ffd3ab4776283ad76cf9d69.jpg",
1010
+ "table_caption": [
1011
+ "Table 4: Ablation experiments on our proposed motion token on the tracking performance on four benchmarks. The experiments are conducted on SwinTrack-T-224. ❶: SwinTrack-T-224; ❷: SwinTrack-B-384; $\\otimes$ : SwinTrack-T-224 without motion token; ❹: SwinTrack-B-384 without motion token; $\\pmb { \\ 6 }$ : replacing the motion token in SwinTrack-T-224 with a learnable embedding token. "
1012
+ ],
1013
+ "table_footnote": [],
1014
+ "table_body": "<table><tr><td>SUC (%)</td><td>LaSOT</td><td>LaSOText SUC (%)</td><td>TrackingNet SUC (%)</td><td>GOT-10k mA0 (%)</td><td>Speed fps</td></tr><tr><td>1</td><td>67.2</td><td>47.6</td><td>81.1</td><td>71.3</td><td>96</td></tr><tr><td>②</td><td>71.3</td><td>49.1</td><td>84.0</td><td>72.4</td><td>45</td></tr><tr><td>③</td><td>66.7</td><td>47.0</td><td>80.8</td><td>70.0</td><td>98</td></tr><tr><td>4</td><td>70.2</td><td>48.5</td><td>84.0</td><td>70.7</td><td>45</td></tr><tr><td>6</td><td>66.3</td><td>45.2</td><td>81.2</td><td>70.0</td><td>96</td></tr></table>",
1015
+ "bbox": [
1016
+ 287,
1017
+ 152,
1018
+ 710,
1019
+ 257
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "",
1026
+ "bbox": [
1027
+ 176,
1028
+ 290,
1029
+ 821,
1030
+ 332
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Loss function. From Tab. 3 $( \\bullet \\nu . \\bullet )$ , we observe that the model trained with varifocal loss significantly outperforms the one with binary cross entropy (BCE) loss without loss of efficiency. This result indicates that the varifocal loss can assist the classification branch of the head to generate an IoU-aware response map, and thus help the tracker to improve the tracking performance. ",
1037
+ "bbox": [
1038
+ 174,
1039
+ 338,
1040
+ 825,
1041
+ 393
1042
+ ],
1043
+ "page_idx": 9
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Post processing. One may wonder with highly discriminative Transformer architecture and IoUaware classification loss does the hanning penalty window is still functional, which introduces a strong smooth movement assumption. In the experiments, we remove the hanning penalty window in post-processing, as shown in Tab. 3 $( \\pmb { \\mathbb { 0 } } \\nu s . \\pmb { \\mathbb { \\otimes } } )$ , the performance is dropped by 1.0 SUC for LaSOT, $1 . 3 \\mathrm { \\ A O }$ for GOT-10k in absolute percentage, and less than $1 \\%$ in the SUC metric of other datasets. This suggests that the strong smooth movement assumption is still applicable for our tracker. But compared with the former Transformer-based tracker [5], the performance gap between with and without penalty window post-processing is narrowing. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 400,
1051
+ 825,
1052
+ 512
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Effectiveness of motion token. We study the effectiveness of the motion token by conducting comparison experiments. As shown in Tab. 4 $\\pmb { \\mathbb { \\otimes } }$ vs. $\\pmb { \\otimes }$ and $\\pmb { \\varrho }$ vs. $\\pmb { \\varrho }$ ), the models with motion token outperforms the models without motion token on all datasets, especially on $\\mathrm { L a S O T _ { e x t } }$ and GOT-10k. The results indicate that the motion token can assist the tracker to handle hard similar distractors in $\\mathrm { L a S O T _ { e x t } }$ and stabilize the short-term tracking like the sequences in GOT-10k test set. We also study whether the effectiveness of the motion token is simply from the extra embedding vector. We set up an experiment as in Tab. 4 $( \\pmb { \\Theta } )$ , which replaces the motion token with a learnable embedding token. The result shows that the extra embedding vector has negative impacts indicating the effectiveness of the embedding of object trajectory. ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 517,
1062
+ 825,
1063
+ 642
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "5 Conclusion ",
1070
+ "text_level": 1,
1071
+ "bbox": [
1072
+ 174,
1073
+ 670,
1074
+ 299,
1075
+ 688
1076
+ ],
1077
+ "page_idx": 9
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "In this work, we present SwinTrack, a simple and strong baseline for Transformer tracking. In SwinTrack, both representation learning and feature fusion are implemented with the attention mechanism. Extensive experiments demonstrate the effectiveness of such architecture. Besides, we propose the motion token to enhance the robustness of the tracker by providing the historical object trajectory, showing the flexibility of the Transformer model in architectural design. With the power of sequence-to-sequence model architecture, a context-rich tracker is possible, and more contextual cues can be incorporated. Finally, We hope this work can inspire and facilitate future research. ",
1082
+ "bbox": [
1083
+ 174,
1084
+ 707,
1085
+ 825,
1086
+ 804
1087
+ ],
1088
+ "page_idx": 9
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Acknowledgments and Disclosure of Funding ",
1093
+ "text_level": 1,
1094
+ "bbox": [
1095
+ 174,
1096
+ 832,
1097
+ 553,
1098
+ 849
1099
+ ],
1100
+ "page_idx": 9
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "This work is supported by Peng Cheng Laboratory Research Project No. PCL2021A07. Heng Fan and his employer receive no financial support for the research, authorship, and/or publication of this article. ",
1105
+ "bbox": [
1106
+ 174,
1107
+ 869,
1108
+ 823,
1109
+ 911
1110
+ ],
1111
+ "page_idx": 9
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "References ",
1116
+ "text_level": 1,
1117
+ "bbox": [
1118
+ 174,
1119
+ 90,
1120
+ 267,
1121
+ 106
1122
+ ],
1123
+ "page_idx": 10
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "[1] Bertinetto, L., Valmadre, J., Henriques, J.F., Vedaldi, A., Torr, P.H., 2016. Fully-convolutional siamese networks for object tracking, in: ECCVW. [2] Bhat, G., Danelljan, M., Gool, L.V., Timofte, R., 2019. Learning discriminative model prediction for tracking, in: ICCV. [3] Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., Zagoruyko, S., 2020. End-to-end object detection with transformers, in: ECCV. [4] Chen, C.F.R., Fan, Q., Panda, R., 2021a. Crossvit: Cross-attention multi-scale vision transformer for image classification, in: ICCV. [5] Chen, X., Yan, B., Zhu, J., Wang, D., Yang, X., Lu, H., 2021b. Transformer tracking, in: CVPR. [6] Dai, K., Zhang, Y., Wang, D., Li, J., Lu, H., Yang, X., 2020. High-performance long-term tracking with meta-updater, in: CVPR. [7] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al., 2021. An image is worth 16x16 words: Transformers for image recognition at scale, in: ICLR. [8] Fan, H., Bai, H., Lin, L., Yang, F., Chu, P., Deng, G., Yu, S., Huang, M., Liu, J., Xu, Y., et al., 2021. Lasot: A high-quality large-scale single object tracking benchmark. International Journal of Computer Vision 129, 439–461. [9] Fan, H., Lin, L., Yang, F., Chu, P., Deng, G., Yu, S., Bai, H., Xu, Y., Liao, C., Ling, H., 2019. Lasot: A high-quality benchmark for large-scale single object tracking, in: CVPR. \n[10] Fan, H., Ling, H., 2019. Siamese cascaded region proposal networks for real-time visual tracking, in: CVPR. \n[11] Fan, H., Ling, H., 2021. Cract: Cascaded regression-align-classification for robust visual tracking, in: IROS. \n[12] Fu, Z., Liu, Q., Fu, Z., Wang, Y., 2021. Stmtrack: Template-free visual tracking with space-time memory networks, in: CVPR. \n[13] Han, W., Dong, X., Khan, F.S., Shao, L., Shen, J., 2021. Learning to fuse asymmetric feature maps in siamese trackers, in: CVPR. \n[14] He, K., Zhang, X., Ren, S., Sun, J., 2016. Deep residual learning for image recognition, in: CVPR. \n[15] Huang, L., Zhao, X., Huang, K., 2019. Got-10k: A large high-diversity benchmark for generic object tracking in the wild. IEEE Transactions on Pattern Analysis and Machine Intelligence 43, 1562–1577. \n[16] Ke, G., He, D., Liu, T.Y., 2021. Rethinking positional encoding in language pre-training, in: ICLR. \n[17] Krizhevsky, A., Sutskever, I., Hinton, G.E., 2012. Imagenet classification with deep convolutional neural networks. NIPS . \n[18] Larsson, G., Maire, M., Shakhnarovich, G., 2016. Fractalnet: Ultra-deep neural networks without residuals, in: ICLR. \n[19] Li, B., Wu, W., Wang, Q., Zhang, F., Xing, J., Yan, J.S., 2019. Evolution of siamese visual tracking with very deep networks, in: CVPR. \n[20] Li, B., Yan, J., Wu, W., Zhu, Z., Hu, X., 2018. High performance visual tracking with siamese region proposal network, in: CVPR. \n[21] Li, X., Wang, W., Wu, L., Chen, S., Hu, X., Li, J., Tang, J., Yang, J., 2020. Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection, in: NeurIPS. \n[22] Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L., 2014. Microsoft coco: Common objects in context, in: ECCV. \n[23] Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B., 2021. Swin transformer: Hierarchical vision transformer using shifted windows. ICCV . \n[24] Loshchilov, I., Hutter, F., 2019. Decoupled weight decay regularization, in: ICLR. \n[25] Mayer, C., Danelljan, M., Paudel, D.P., Van Gool, L., 2021. Learning target candidate association to keep track of what not to track, in: ICCV. \n[26] Muller, M., Bibi, A., Giancola, S., Alsubaihi, S., Ghanem, B., 2018. Trackingnet: A large-scale dataset and benchmark for object tracking in the wild, in: ECCV. \n[27] Ren, S., He, K., Girshick, R., Sun, J., 2015. Faster r-cnn: Towards real-time object detection with region proposal networks, in: NIPS. \n[28] Rezatofighi, H., Tsoi, N., Gwak, J., Sadeghian, A., Reid, I., Savarese, S., 2019. Generalized intersection over union . \n[29] Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H., 2021. Training data-efficient image transformers & distillation through attention, in: ICML. \n[30] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I., 2017. Attention is all you need, in: NeurIPS. \n[31] Voigtlaender, P., Luiten, J., Torr, P.H., Leibe, B., 2020. Siam r-cnn: Visual tracking by re-detection, in: CVPR. \n[32] Wang, N., Zhou, W., Wang, J., Li, H., 2021a. Transformer meets tracker: Exploiting temporal context for robust visual tracking, in: CVPR. \n[33] Wang, W., Xie, E., Li, X., Fan, D.P., Song, K., Liang, D., Lu, T., Luo, P., Shao, L., 2021b. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions, in: ICCV. \n[34] Wang, X., Shu, X., Zhang, Z., Jiang, B., Wang, Y., Tian, Y., Wu, F., 2021c. Towards more flexible and accurate object tracking with natural language: Algorithms and benchmark, in: CVPR. \n[35] Xu, Y., Wang, Z., Li, Z., Yuan, Y., Yu, G., 2020. Siamfc++: Towards robust and accurate visual tracking with target estimation guidelines, in: AAAI. \n[36] Yan, B., Peng, H., Fu, J., Wang, D., Lu, H., 2021. Learning spatio-temporal transformer for visual tracking, in: ICCV. \n[37] Yu, Y., Xiong, Y., Huang, W., Scott, M.R., 2020. Deformable siamese attention networks for visual object tracking, in: CVPR. \n[38] Yuan, L., Chen, Y., Wang, T., Yu, W., Shi, Y., Jiang, Z.H., Tay, F.E., Feng, J., Yan, S., 2021. Tokens-to-token vit: Training vision transformers from scratch on imagenet, in: ICCV. \n[39] Zhang, H., Wang, Y., Dayoub, F., Sünderhauf, N., 2021a. Varifocalnet: An iou-aware dense object detector, in: CVPR. \n[40] Zhang, Z., Liu, Y., Wang, X., Li, B., Hu, W., 2021b. Learn to match: Automatic matching network design for visual tracking, in: ICCV. \n[41] Zhang, Z., Peng, H., Fu, J., Li, B., Hu, W., 2020. Ocean: Object-aware anchor-free tracking, in: ECCV. ",
1128
+ "bbox": [
1129
+ 171,
1130
+ 119,
1131
+ 828,
1132
+ 912
1133
+ ],
1134
+ "page_idx": 10
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "",
1139
+ "bbox": [
1140
+ 171,
1141
+ 92,
1142
+ 826,
1143
+ 700
1144
+ ],
1145
+ "page_idx": 11
1146
+ }
1147
+ ]
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb080fc80eb573dcdeaa190ea6c15cab48aa0a4f5d6c1dcc4d0c287386ef8c06
3
+ size 560536
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fcbb967bdad48f1906a4d0f16d64ed31db621dc6d117fe8bd4d116e47b46441
3
+ size 436564
parse/dev/9h3KsOVXhLZ/9h3KsOVXhLZ_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1596db1e3dcdd539ae90f4d7a45c2f223d63573affee42473bac003b6014f77a
3
+ size 568294
parse/dev/9h3KsOVXhLZ/images/1bb8bb00097fc003ed50452c518b133bb61db7f0945a63e73169aacad6d425e8.jpg ADDED

Git LFS Details

  • SHA256: 4762abb72e674e695d8f5d83c584e0a4db906de22ae0ae52435aa88695a052d5
  • Pointer size: 130 Bytes
  • Size of remote file: 45.9 kB
parse/dev/9h3KsOVXhLZ/images/3bba2b7d42766c9ff3a4f32481a61ce95bd523e3be23e40ee2e48340e3add62a.jpg ADDED

Git LFS Details

  • SHA256: e1e36381626b96bff78e767c5f3e6fc69293253f500c649a281941356229d60a
  • Pointer size: 130 Bytes
  • Size of remote file: 14.5 kB
parse/dev/9h3KsOVXhLZ/images/430b51ce3631780d398a75dc7794e5aba609c20ad0b960bb5a5dca0210f1fdbb.jpg ADDED

Git LFS Details

  • SHA256: c6b36e75fc68f8aaa1aa288e63762ea1f613d4ae91c21ba86ca94a551fd7efb7
  • Pointer size: 129 Bytes
  • Size of remote file: 5.67 kB
parse/dev/9h3KsOVXhLZ/images/73828994b44f600185e85d70e76927cce9520e5ccd019e4f95bdf479fb194855.jpg ADDED

Git LFS Details

  • SHA256: be5ea837483fa7beafb2d1c8453c60cee601e76ecbdeac49d1d0465952947512
  • Pointer size: 130 Bytes
  • Size of remote file: 32.3 kB
parse/dev/9h3KsOVXhLZ/images/74ca43b58bc04880ee39b4edeb852b7901f8ee82b6bd92c8f29c4e183958a2b7.jpg ADDED

Git LFS Details

  • SHA256: 700693d14b67633c2fdf382d586c8b7cb896913866ead2034fd6fcb4ced967b1
  • Pointer size: 129 Bytes
  • Size of remote file: 3.67 kB
parse/dev/9h3KsOVXhLZ/images/875790817d6f8f66d0085f280abbbf833d6cc0a510a1acc60b86080a75f38e4e.jpg ADDED

Git LFS Details

  • SHA256: 268810369e1d2219cb91ffdcca66040e44255da3af30d1b70e0cb50a69f88cfd
  • Pointer size: 130 Bytes
  • Size of remote file: 12.2 kB
parse/dev/9h3KsOVXhLZ/images/a44e35c837372cddc6d07e6849d74323e28bf2af4ffd3ab4776283ad76cf9d69.jpg ADDED

Git LFS Details

  • SHA256: e5a03a851a5e89befe9f7c9f6ed0ebd30c713eb169ce869a8e85cfc0d721388b
  • Pointer size: 130 Bytes
  • Size of remote file: 34.4 kB
parse/dev/9h3KsOVXhLZ/images/a87f4b17ae97d04fa2ccec404354fa712c08104ebdca9eedde6266d69c1cc000.jpg ADDED

Git LFS Details

  • SHA256: 8e3abdcc53cdacc53758d29724b782ea3a97ddcf7ddae90c53bde13db6a5d614
  • Pointer size: 129 Bytes
  • Size of remote file: 6.62 kB
parse/dev/9h3KsOVXhLZ/images/b7a6628efd2eae2119392aade7e89ec4e64d2435bd65751772febfd9330744d7.jpg ADDED

Git LFS Details

  • SHA256: 006a19290f90342a0a034dea70dfb8f85cd54588aa1961ed977366da7565af89
  • Pointer size: 130 Bytes
  • Size of remote file: 16 kB
parse/dev/9h3KsOVXhLZ/images/bbec3b18183201f9ed3782f1477a1e4082f6dcb762564bffeab908496dfdcf90.jpg ADDED

Git LFS Details

  • SHA256: 9666f7e8ac1c67fbdfe5f4edb5f7b58ebae4b71a5beb462487145f3f24428c29
  • Pointer size: 130 Bytes
  • Size of remote file: 97.7 kB
parse/dev/9h3KsOVXhLZ/images/bff5b4163414025c27ee09c6e9bfb93d55e373aa201c681052eec140b863d86c.jpg ADDED

Git LFS Details

  • SHA256: 4440fbd64fc7f9d848bc004282c1d3df059bf67a907dae00535b51f172c01cf0
  • Pointer size: 130 Bytes
  • Size of remote file: 60.4 kB
parse/dev/9h3KsOVXhLZ/images/ceb1ea2031ef2c2e53af6c2d1dc3d1053361e969b449e58a2d842f8df5d040e9.jpg ADDED

Git LFS Details

  • SHA256: 4c7ac39ec6646d3eb416defc4994cdca404650bab49c52b0f5f70a69730349e1
  • Pointer size: 130 Bytes
  • Size of remote file: 68.7 kB
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP.md ADDED
@@ -0,0 +1,427 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UNIFIED VISUAL TRANSFORMER COMPRESSION
2
+
3
+ Shixing $\mathbf { V } \mathbf { u } ^ { 1 , * }$ , Tianlong $\mathbf { C h e n ^ { 1 , * } }$ , Jiayi Shen2, Huan Yuan3, Jianchao Tan3,
4
+ Sen Yang3, Ji Liu3, Zhangyang Wang1
5
+ 1University of Texas at Austin, 2Texas A&M University, 3Kwai Inc.
6
+ {shixingyu, tianlong.chen, atlaswang}@utexas.edu, asjyjya-617@tamu.edu, {yuanhuan9412, senyang.nlpr, ji.liu.uwisc}@gmail.com, jianchaotan@kuaishou.com
7
+
8
+ # ABSTRACT
9
+
10
+ Vision transformers (ViTs) have gained popularity recently. Even without customized image operators such as convolutions, ViTs can yield competitive performance when properly trained on massive data. However, the computational overhead of ViTs remains prohibitive, due to stacking multi-head self-attention modules and else. Compared to the vast literature and prevailing success in compressing convolutional neural networks, the study of Vision Transformer compression has also just emerged, and existing works focused on one or two aspects of compression. This paper proposes a unified ViT compression framework that seamlessly assembles three effective techniques: pruning, layer skipping, and knowledge distillation. We formulate a budget-constrained, end-to-end optimization framework, targeting jointly learning model weights, layer-wise pruning ratios/masks, and skip configurations, under a distillation loss. The optimization problem is then solved using the primal-dual algorithm. Experiments are conducted with several ViT variants, e.g. DeiT and T2T-ViT backbones on the ImageNet dataset, and our approach consistently outperforms recent competitors. For example, DeiT-Tiny can be trimmed down to $50 \%$ of the original FLOPs almost without losing accuracy. Codes are available online: https://github.com/VITA-Group/UVC.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ Convolution neural networks (CNNs) (LeCun et al., 1989; Krizhevsky et al., 2012; He et al., 2016) have been the de facto architecture choice for computer vision tasks in the past decade. Their training and inference cost significant and ever-increasing computational resources. Recently, drawn by the scaling success of attention-based models (Vaswani et al., 2017) in natural language processing (NLP) such as BERT (Devlin et al., 2018), various works seek to leverage the Transformer architecture to computer vision (Parmar et al., 2018; Child et al., 2019; Chen et al., 2020a). The Vision Transformer (ViT) architecture (Dosovitskiy et al., 2020), and its variants, have been demonstrated to achieve comparable or superior results on a series of image understanding tasks compared to the state of the art CNNs, especially when pretrained on datasets with sufficient model capacity (Han et al., 2021).
15
+
16
+ Despite the emerging power of ViTs, such architecture is shown to be even more resource-intensive than CNNs, making its deployment impractical under resource-limited scenarios. That is due to the absence of customized image operators such as convolution, the stack of self-attention modules that suffer from quadratic complexity with regard to the input size, among other factors. Owing to the substantial architecture differences between CNNs and ViTs, although there is a large wealth of successful CNN compression techniques (Liu et al., 2017; Li et al., 2016; He et al., 2017; 2019), it is not immediately clear whether they are as effective as for ViTs. One further open question is how to best integrate their power for ViT compression, as one often needs to jointly exploit multiple compression means for CNNs (Mishra & Marr, 2018; Yang et al., 2020b; Zhao et al., 2020b).
17
+
18
+ On the other hand, the NLP literature has widely explored the compression of BERT (Ganesh et al., 2020), ranging from unstructured pruning (Gordon et al., 2020; Guo et al., 2019), attention head pruning (Michel et al., 2019) and encoder unit pruning (Fan et al., 2019); to knowledge distillation (Sanh et al., 2019), layer factorization (Lan et al., 2019), quantization (Zhang et al., 2020; Bai et al.,
19
+
20
+ 2020) and dynamic width/depth inference (Hou et al., 2020). Lately, earlier works on compressing ViTs have also drawn ideas from those similar aspects: examples include weight/attention pruning (Zhu et al., 2021; Chen et al., 2021b; Pan et al., 2021a), input feature (token) selection (Tang et al., 2021; Pan et al., 2021a), and knowledge distillation (Touvron et al., 2020; Jia et al., 2021). Yet up to our best knowledge, there has been no systematic study that strives to either compare or compose (even naively cascade) multiple individual compression techniques for ViTs – not to mention any joint optimization like (Mishra & Marr, 2018; Yang et al., 2020b; Zhao et al., 2020b) did for CNNs. We conjecture that may potentially impede more performance gains from ViT compression.
21
+
22
+ This paper aims to establish the first all-in-one compression framework that organically integrates three different compression strategies: (structured) pruning, block skipping, and knowledge distillation. Rather than ad-hoc composition, we propose a unified vision transformer compression (UVC) framework, which seamlessly integrates the three effective compression techniques and jointly optimizes towards the task utility goal under the budget constraints. UVC is mathematically formulated as a constrained optimization problem and solved using the primal-dual algorithm from end to end. Our main contributions are outlined as follows:
23
+
24
+ • We present UVC that unleashes the potential of ViT compression, by jointly leveraging multiple ViT compression means for the first time. UVC only requires to specify a global resource budget, and can automatically optimize the composition of different techniques.
25
+ • We formulate and solve UVC as a unified constrained optimization problem. It simultaneously learns model weights, layer-wise pruning ratios/masks, and skip configurations, under a distillation loss and an overall budget constraint.
26
+ • Extensive experiments are conducted with popular variants of ViT, including several DeiT backbones and T2T-ViT on ImageNet, and our proposal consistently performs better than or comparably with existing methods. For example, UVC on DeiT-Tiny (with/without distillation tokens) yields around $50 \%$ FLOPs reduction, with little performance degradation (only $0 . 3 \% / 0 . 9 \%$ loss compared to the uncompressed baseline).
27
+
28
+ # 2 RELATED WORK
29
+
30
+ # 2.1 VISION TRANSFORMER
31
+
32
+ Transformer (Vaswani et al., 2017) architecture stems from natural language processing (NLP) applications first, with the renowned technique utilizing Self-Attention to exploit information from sequential data. Though intuitively the transformer model seems inept to the special inductive bias of space correlation for images-oriented tasks, it has proved itself of capability on vision tasks just as good as CNNs (Dosovitskiy et al., 2020). The main point of Vision Transformer is that they encode the images by partitioning them into sequences of patches, projecting them into token embeddings, and feeding them to transformer encoders (Dosovitskiy et al., 2020). ViT outperforms convolutional nets if given sufficient training data on various image classification benchmarks.
33
+
34
+ Since then, ViT has been developed to various different variants first on data efficiency towards training, like DeiT (Touvron et al., 2020) and T2T-ViT (Yuan et al., 2021) are proposed to enhance ViT’s training data efficiency, by leveraging teacher-student and better-crafted architectures respectively. Then modifications are made to the general structure of ViT to tackle other popular downstream computer vision tasks, including object detection (Zheng et al., 2020; Carion et al., 2020; Dai et al., 2021; Zhu et al., 2020), semantic segmentation (Wang et al., 2021a;b), image enhancement (Chen et al., 2021a; Yang et al., 2020a), image generation (Jiang et al., 2021), video understanding (Bertasius et al., 2021), and 3D point cloud processing (Zhao et al., 2020a).
35
+
36
+ # 2.2 MODEL COMPRESSION
37
+
38
+ Pruning. Pruning methods can be broadly categorized into: unstructured pruning (Dong et al., 2017; Lee et al., 2018; Xiao et al., 2019) by removing insignificant weight via certain criteria; and structured pruning (Luo et al., 2017; He et al., 2017; 2018; Yu et al., 2018; Lin et al., 2018; Guo et al., 2021; Yu et al., 2021; Chen et al., 2021b; Shen et al., 2021) by zero out parameters in a structured group manner. Unstructured pruning can be magnitude-based (Han et al., 2015a;b), hessian-based (LeCun et al., 1990; Dong et al., 2017), and so on. They result in irregular sparsity, causing sparse matrix operations that are hard to accelerate on hardware (Buluc & Gilbert, 2008; Gale et al., 2019). This can be addressed with structured pruning where algorithms usually calculate an importance score for some group of parameters (e.g., convolutional channels, or matrix rows). Liu et al. (2017) uses the scaling factor of the batch normalization layer as the sensitivity metric. Li et al. (2016) proposes channel-wise summation over weights as the metric. Lin et al. (2020) proposes to use channel rank as sensitivity metric while (He et al., 2019) uses the geometric median of the convolutional filters as pruning criteria. Particularly for transformer-based models, the basic structures that many consider pruning with include blocks, attention heads, and/or fully-connected matrix rows (Chen et al., 2020b; 2021b). For example, (Michel et al., 2019) canvasses the behavior of multiple attention heads and proposes an iterative algorithm to prune redundant heads. (Fan et al., 2019) prunes entire layers to extract shallow models at inference time.
39
+
40
+ Knowledge Distillation. Knowledge distillation (KD) is a special technique that does not explicitly compress the model from any dimension of the network. KD lets a student model leverage ··soft” labels coming from a teacher network (Hinton et al., 2015) to boost the performance of a student model. This can be regarded as a form of compression from the teacher model into a smaller student. The soft labels from the teacher are well known to be more informative than hard labels and leads to better student training (Yuan et al., 2020; Wei et al., 2020)
41
+
42
+ Skip Configuration. Skip connection plays a crucial role in transformers (Raghu et al., 2021), by tackling the vanishing gradient problem (Vaswani et al., 2017), or by preventing their outputs from degenerating exponentially quickly with respect to the network depth (Dong et al., 2021).
43
+
44
+ Meanwhile, transformer has an inborn advantage of a uniform block structure. A basic transformer block contains a Self-Attention module and a Multi-layer Perceptron module, and its output size matches the input size. That implies the possibility to manipulate the transformer depth by directly skipping certain layers or blocks. (Xu et al., 2020) proposes to randomly replace the original modules with their designed compact substitutes to train the compact modules to mimic the behavior of the original modules. (Zhang & He, 2020) designs a Switchable-Transformer Blocks to progressively drop layers from the architecture. To flexibly adjust the size and latency of transformers by selecting adaptive width and depth, DynaBERT (Hou et al., 2020) first trains a width-adaptive BERT and then allows for both adaptive width and depth. LayerDrop (Fan et al., 2019) randomly drops layers at training time; while at test time, it allows for sub-network selection to any desired depth.
45
+
46
+ # 3 METHODOLOGY
47
+
48
+ # 3.1 PRELIMINARY
49
+
50
+ Vision Transformer (ViT) Architecture. To unfold the unified algorithm in the following sections, here we first introduce the notations. There are totally $L$ transformer blocks. In each block $l$ of the ViT, there are two constituents, namely the Multi-head Self-Attention (MSA) module and the MLP module. Uniformly, each MSA for transformer block $l$ has $H$ attention heads originally.
51
+
52
+ In the Multi-head Self-Attention module, $W _ { Q } ^ { ( l ) } , W _ { K } ^ { ( l ) } , W _ { V } ^ { ( l ) }$ are the weights of the three linear projection matrix in block $l$ that uses the block input $X ^ { l }$ to calculate attention matrices: $Q ^ { l } , K ^ { l }$ , ${ \bf \widehat V } ^ { l }$ . The weights of the projection module that follows self-attention calculation are denoted as $W ^ { ( l , 1 ) }$ , represent the first linear projection module in block l. The MLP module consists of two linear projection modules $W ^ { ( l , 2 ) }$ and $\bar { W } ^ { ( l , 3 ) }$ .
53
+
54
+ Compression Targets The main parameters that can be potentially compressed in a ViT block are W (l)Q , $\bar { W } _ { Q } ^ { ( l ) } , W _ { K } ^ { ( l ) } , W _ { V } ^ { \bar { ( l ) } }$ and $W ^ { ( l , 1 ) }$ , $W ^ { ( l , 2 ) }$ , $W ^ { ( l , 3 ) }$ . Our goal is to prune the head number and head dimensions simultaneously inside each layer, associated with the layer level skipping, solved in a unified framework. Currently, we do not extend the scope to reduce other dimensions such as input patch number or token size. However, our framework can also pack these parts together easily.
55
+
56
+ For head number and head dimensions pruning, instead of going into details of QKV computation, we innovate to use $\{ W ^ { ( l , 1 ) } \} _ { 1 \le l \le L }$ to be the proxy pruning targets. Pruning on these linear layers is equivalent to the pruning of head number and head dimension. We also add $\{ W ^ { ( l , 3 ) } \} _ { 1 \leq l \leq L }$ as our pruning targets, since these linear layers do not have dimension alignment issues with other parts, they can be freely pruned, while the output of $\{ W ^ { ( l , 2 ) } \}$ should match with the dimension of block input. We do not prune $W _ { Q } ^ { ( l ) } , W _ { K } ^ { ( l ) } , W _ { V } ^ { ( \bar { l } ) }$ inside each head, since $Q ^ { l } , K ^ { l } ,$ , $V ^ { l }$ should be of the same shape for computing self-attention.
57
+
58
+ ![](images/21e421ed1101839888cf838d9284c553a300e465036c071b49d53e37f58f8890.jpg)
59
+ Figure 1: The overall framework of UVC, that integrates three compression strategies: (1) Pruning within a block: In a transformer block, we targeting on pruning Self-Attention head numbers $( s ^ { ( l , 1 ) } )$ , neuron numbers within a Self-Attention head $( r ^ { l , i } )$ and the hidden size of MLP module $( s ^ { ( l , 3 ) } )$ as well. (2) Skipping manipulation across blocks: When $\mathbf { \chi } _ { g t } ^ { ( l , 0 ) }$ dominates, directly skip block $l$ and send $X ^ { l }$ into block $l + 1$ ; Otherwise, pass $X ^ { l }$ into block $l$ without skip connection. (3) Knowledge distillation: The original uncompressed model is used to provide soft labels for knowledge distillation.
60
+
61
+ Besides, skip connection is recognized as another important component to enhance the performance of ViTs (Raghu et al., 2021). The dimension between $X ^ { l }$ and the output of the linear projection module should be aligned. For this sake, $W ^ { ( l , 2 ) }$ is excluded from our compression. Eventually, the weights to be compressed in our subsequent framework are $\{ W ^ { ( l , 1 ) } , W ^ { ( l , 3 ) } \} _ { 1 \le l \le L }$ .
62
+
63
+ # 3.2 RESOURCE-CONSTRAINED END-TO-END VIT COMPRESSION
64
+
65
+ We target a principled constrained optimization framework jointly optimizing all weights and compression hyperparameters. We consider two strategies to compress ViT: (1) structural pruning of linear projection modules in a ViT block; and (2) adjusting the skipping patterns across different ViT blocks, including skipping/dropping an entire block. The second point, to our best knowledge, is the first time to be ever considered in ViT compression. The full framework is illustrated in Figure 1.
66
+
67
+ Alternatively, the two strategies could be considered as enforcing mixed-level group sparsity: the head dimension level, the head number level, and the block number level. The rationale is: when enforced with the same pruning ratios, models that are under finer-grained sparsity (i.e., pruning in smaller groups) are unfriendly to latency, while models that are under coarser-grained sparsity (i.e., pruning in larger groups) is unfriendly to accuracy. The mixed-level group sparsity can hence more flexibly trade-off between latency and accuracy.
68
+
69
+ The knowledge distillation is further incorporated into the objective to guide the end-to-end process.
70
+ Below we walk through each component one-by-one, before presenting the unified optimization.
71
+
72
+ Pruning within a Block To compress each linear projection module on width, we first denote $s ^ { ( l , 3 ) }$ as the number of columns to be pruned for weights $\bar { W } ^ { ( l , 3 ) }$ . Compression for weights $W ^ { ( l , 1 ) }$ is more complicated as it is decided by two degrees of freedom. As the input tensor to be multiplied with $W ^ { ( l , 1 ) }$ is the direct output of attention heads. Hence, within each layer $l$ , we denote $s ^ { ( l , 1 \bar { ) } }$ to be the attention head numbers that need to be pruned, and $r ^ { ( l , i ) }$ the number of output neurons to be pruned for each attention head $i$ . Figure 2 illustrates the two sparsity levels: the head dimension level as controlled by $r ^ { ( l , i ) }$ , and the head number level as controlled by $s ^ { ( l , 1 ) }$ . They give more flexibility to transformer compression by selecting the optimal architecture in a multi-grained way. We emphasize again that those variables above are not manually picked, but rather optimized globally.
73
+
74
+ Skipping Manipulation across Blocks The next component to jointly optimize is the skip connectivity pattern, across different ViT blocks. For vanilla ViTs, skip connection plays a crucial role in ensuring gradient flow and avoiding feature collapse (Dong et al., 2021). Raghu et al. (2021) suggests that skip connections in ViT are even more influential than in ResNets, having strong effects on performance and representation similarity. However, few existing studies have systematically studied how to strategically adjust skip connections provided a ViT architecture, in order to optimize the accuracy and efficiency trade-off.
75
+
76
+ In general, it is known that more skip connections help CNNs’ accuracy without increasing the parameter volume (Huang et al., 2017); and ViT seems to favor the same trend (Raghu et al., 2021). Moreover, adding a new skip connection over an existing block would allow us to “skip" it during inference, or “drop" it. This represents more aggressive “layer-wise" pruning, compared to the aforementioned element-wise or conventional structural pruning
77
+
78
+ While directly dropping blocks might look aggressive at the first glance, there are two unique enabling factors in ViTs that facilitate so. Firstly, unlike in CNNs, ViTs have uniform internal structures: by default, the input/output sizes of Self-Attention (SA) module, MLP module and thus the entire block, are all identical. That allows to painlessly drop any of those components and directly reconcatenating the others, without causing any feature dimension incompatibility. Secondly, Phang et al. (2021) observed that the top few blocks of fine-tuned transformers can be discarded without hurting performance, even with no further tuning. That is because deeper layer features tend to have high cross-layer similarities (while being dissimilar to early layer features), making additional blocks add little to the discriminative power. Zhou et al. (2021) also reported that in deep ViTs, the attention maps gradually become similar and even nearly identical after certain layers. Such cross-block “feature collapse" justifies our motivation to drop blocks.
79
+
80
+ In view of those, we introduce skip manipulation as a unique compression means to ViT for the first time. Specifically, for each transformer block with the skip connection, we denote $g t ^ { ( l , 0 ) }$ and $g t ^ { ( l , 1 ) }$ as two binary gating variables (summing up to 1), to decide whether to skip this block or not.
81
+
82
+ The Constraints: We next formulate weight sparsity constraints for the purpose of pruning. As discussed in Sec 3.1, the target of the proposed method is to prune the head number and head dimension simultaneously, which can actually be modeled as a two-level group sparsity problem when choosing $\{ W ^ { ( l , 1 ) } \} _ { 1 \leq l \leq L }$ as proxy compression targets. Specifically, the input dimension of $\{ W ^ { ( l , 1 ) } \} _ { 1 \le l \le L }$ is equivalent to the sum of the dimensions of all heads. Then we can put a two-level group sparsity regularization on $\{ W ^ { ( l , 1 ) } \} _ { 1 \le l \le L }$ input dimension to compress head number and head dimension at the same time, as shown in 1a and 1b. $r ^ { ( l , i ) }$ corresponding to the pruned size of $i _ { t h }$ head. $s ^ { ( l , 1 ) }$ means the pruned number of heads. For $\{ W ^ { ( l , 3 ) } \} _ { 1 \le l \le L }$ , it is our compression target, we just perform standard one level group sparsity regularization on its input dimension, as shown in 1c.
83
+
84
+ $$
85
+ \begin{array} { l } { { \displaystyle \sum _ { j } \mathbb { I } \left( \left\| W _ { g _ { i j \cdot } } ^ { ( l , 1 ) } \right\| _ { 2 } ^ { 2 } = 0 \right) \geq r ^ { ( l , i ) } } , } \\ { { \displaystyle \sum _ { i } \mathbb { I } \left( \left\| W _ { g _ { i \cdot } } ^ { ( l , 1 ) } \right\| _ { 2 } ^ { 2 } = 0 \right) \geq s ^ { ( l , 1 ) } } , } \\ { { \displaystyle \sum _ { i } \mathbb { I } \left( \left\| W _ { i , \cdot } ^ { ( l , 3 ) } \right\| _ { 2 } ^ { 2 } = 0 \right) \geq s ^ { ( l , 3 ) } } , } \\ { { \displaystyle \forall l = 1 , 2 , . . . , L , \forall i = 1 , 2 , . . . , H } } \end{array}
86
+ $$
87
+
88
+ where $W _ { i , \mathbf { \alpha } }$ ,. denotes the $i$ -th column of $W ; W _ { g _ { i } }$ ,. denotes the $i$ -th grouped column matrix of $W$ , i.e. the $i$ -th head; and $W _ { g _ { i j } }$ ,. the $j$ -th column of $W _ { g _ { i } , . }$ , which is the $j$ -th column of the $i$ -th head. In other words, in Eqn. 1b, column matrices are grouped by attention heads. Hence among the original $H$ heads in total at block $l$ , at least $s ^ { ( l , 1 ) }$ heads should be discarded. Similarly, Eqn. 1c demands that at least $s ^ { ( l , 3 ) }$ input neurons should be pruned at this linear projection module. Furthermore, Eqn. 1a requests that in the $i$ -th attention head at block $l$ , $r ( l , i )$ of the output units should be set to zeros.
89
+
90
+ Our method is formulated as a resource constrained compression framework, given a target resource budget, it will compress the model until the budget is reached. Given a backbone architecture, the FLOPs is the function of $s , r$ and $_ { g t }$ , denoted as $\mathcal { R } _ { \mathrm { F l o p s } } ( s , r , g t )$ . We have the constraint as:
91
+
92
+ $$
93
+ \mathcal { R } _ { \mathrm { F l o p s } } ( s , r , g t ) \leq \mathcal { R } _ { \mathrm { b u d g e t } } ,
94
+ $$
95
+
96
+ ![](images/90b4da141c9976aa17f972933e0610d05ed073b16981112d3cd54d76bba016db.jpg)
97
+ Figure 2: The two sparsity levels for pruning within a block: the head dimension level as controlled by $r ^ { ( l , i ) }$ , and the head number level as controlled by $s ^ { ( l , 1 ) }$ . When reaching the same pruning ratio, neuron-level sparsity will not remove any head, which is usually unfriendly to latency; while head level sparsity will only remove attention heads, which is usually unfriendly to accuracy.
98
+
99
+ where $\pmb { s } = \{ s ^ { ( l , 1 ) } , s ^ { ( l , 3 ) } \} _ { 1 \leq l \leq L }$ and $\pmb { r } = \{ r ^ { ( l , i ) } \} _ { 1 \leq l \leq L , 1 \leq i \leq H }$ . $\mathcal { R } _ { \mathrm { b u d g e t } }$ is the resource budget. We present detailed flops computation equations in terms of $\pmb { s }$ , $\mathbfit { \Delta } \mathbf { r }$ and $_ { g t }$ in Appendix.
100
+
101
+ Those inequalities can be further rewritten into equation forms to facilitate optimization. As an example, we follow (Tono et al., 2017) to reformulate Eqn. 1b as:
102
+
103
+ $$
104
+ \sum _ { i } \mathbb { I } \left( \left. W _ { \cdot , g _ { i } } \right. _ { 2 } ^ { 2 } = 0 \right) \geq s \Leftrightarrow \left. W _ { \cdot , g } \right. _ { s , 2 } ^ { 2 } = 0 .
105
+ $$
106
+
107
+ where $\| \mathbf { W } _ { \cdot , g } \| _ { s , 2 } ^ { 2 }$ denotes the Frobenius norm of the sub-matrix of $W$ consisting of $s$ groups of $W$ with smallest group norms. Eqn. 1a and Eqn. 1c have same conversions.
108
+
109
+ The Objective: The target objective could be written as ( $\lambda$ is a coefficient):
110
+
111
+ $$
112
+ \operatorname* { m i n } _ { W , g t } \ \mathcal { L } ( W , g t ) = \ell ( W , g t ) + \lambda \ell _ { d i s t i l l } ( W , W _ { t } ) ,
113
+ $$
114
+
115
+ where $W _ { t }$ denotes the weights from teacher model, i.e., the uncompressed transformer model, and $\ell _ { d i s t i l l } ( * , * )$ is defined as the knowledge distillation loss. We choose the simper $\ell _ { 2 }$ norm as its implementation, as its performance was found to be comparable to the more traditional ${ \mathrm { K } } { \mathrm { - } } { \mathrm { L } }$ divergence (Kim et al., 2021).
116
+
117
+ The Final Unified Formulation: Summarizing all above, we arrive at our unified optimization as a mini-max formulation, by leveraging the primal-dual method (Buchbinder & Naor, 2009):
118
+
119
+ $$
120
+ \operatorname* { m i n } _ { W , s , r , g t p , y , z \geq 0 } \operatorname* { m a x } _ { y , s , r , g t \in p , y , z \geq 0 } \operatorname* { m a x } _ { W , s , r , g t p , y , z \geq 0 } \mathcal { L } ( W , g t ) + \underbrace { z \left( R _ { \mathrm { F l o p s } } ( s , r , g t ) - R _ { \mathrm { b u d g e t } } \right) } _ { \mathrm { ~ } } + \underbrace { \sum _ { i = 1 } ^ { N } \sum _ { p , r , g t \geq 0 } \mathcal { L } ( W , g t ) } _ { \mathrm { ~ } } = \mathrm { ~ c ~ o ~ n ~ s ~ t ~ . ~ }
121
+ $$
122
+
123
+ $$
124
+ \sum _ { l = 1 } ^ { L } \left( y ^ { ( l , 1 ) } \left. W _ { \cdot , g } ^ { ( l , 1 ) } \right. _ { \lceil s ^ { ( l , 1 ) } \rceil , 2 } ^ { 2 } + y ^ { ( l , 3 ) } \left. W _ { \cdot , \cdot } ^ { ( l , 3 ) } \right. _ { \lceil s ^ { ( l , 3 ) } \rceil , 2 } ^ { 2 } \right) + \sum _ { l = 1 } ^ { L } \sum _ { i = 1 } ^ { H } p ^ { ( l , i ) } \left. W _ { \cdot , g _ { i } . } ^ { ( l , 1 ) } \right. _ { \lceil r ^ { ( l , i ) } \rceil , 2 } ^ { 2 }
125
+ $$
126
+
127
+ Eventually, we use the solution of the above mini-max problem, i.e. $\pmb { s }$ and $\pmb { r }$ to determine the compression ratio of each layer, and $_ { g t }$ to determine the selection of skip configuration. Here, we select the pruned groups of the parameters by directly ranking columns by their norms, and remove those with the smallest magnitudes.
128
+
129
+ The general updating policy follows the idea of primal-dual algorithm. The full algorithm is outlined in Algorithm 1 in Appendix. We introduce the solutions to each sub-problem in Appendix as well.
130
+
131
+ # 4 EXPERIMENTAL RESULTS
132
+
133
+ Datasets and Benchmarks We conduct experiments for image classification on ImageNet (Krizhevsky et al., 2012). We implement UVC on DeiT (Touvron et al., 2020), which has basically the identical architecture compared with ViT (Dosovitskiy et al., 2020) except for an extra distillation token; and a variant of ViT – T2T-ViT (Yuan et al., 2021), with a special token embedding layer that aggregates neighboring tokens into one token and a backbone with a deep-narrow structure. Experiment has been conducted on DeiT-Tiny/Small/Base and T2T-ViT-14 models. For DeiT-Tiny, we also try it without/with the distillation token. We measure all resource consumptions (including the UVC resource constraints) in terms of inference FLOPs.
134
+
135
+ Training Settings The whole process of our method consists of two steps.
136
+
137
+ • Step 1: UVC training. We firstly conduct the primal-dual algorithm to the pretrained DeiT model to produce the compressed model under the given resource budget. • Step 2: Post training. When we have the sparse model, we finetune it for another round of training to regain its accuracy loss during compression.
138
+
139
+ In the two steps mentioned above, we mainly follow the training settings of DeiT (Touvron et al., 2020) except for a relatively smaller learning rate which benefits finetuning of converged models.
140
+
141
+ For distillation, we select the pretrained uncompressed model to teach the pruned model.
142
+
143
+ Numerically, the learning rate for parameter $z$ is always changing during the primal-dual algorithm process. Thurs, we propose to use a dynamic learning rate for the parameter $z$ that controls the budget constraint. We use a four-step schedule of $\{ 1 , 5 , 9 , \bar { 1 3 } , 1 7 \}$ in practice.
144
+
145
+ Baseline methods We adopt several latest compression methods which fall under two categories:
146
+
147
+ • Category 1: Input Patch Reduction, including $( i )$ PoWER (Goyal et al., 2020) : which accelerates language model BERT inference by eliminating word-vector in a progressive way. $( i i )$ HVT (Pan et al., 2021b): which reduce the token sequence dimension by using max-pooling hierarchically. (iii) PatchSlimming (Tang et al., 2021): which identifies the effective patches in the last layer and then use them to guide the patch selection process of previous layers; and $( i v ) \mathbf { I A - R E D ^ { 2 } }$ (Pan et al., 2021a): which dynamically and hierarchical drops visual tokens at different levels using a learned policy network.
148
+
149
+ • Category 2: Model Weight Pruning, including $( v )$ SCOP (Tang et al., 2020): which is originally a channel pruning method used on CNN, we follow (Tang et al., 2021) and implement it on ViT. $( v i )$ Vision Transformer Pruning (VTP) (Zhu et al., 2021): which trains transformers with sparsity regularization to let important dimensions emerge. (vii) SViTE (Chen et al., 2021b): which jointly optimizes model parameters and explores sparse connectivity throughout training, ending up with one final sparse network. SViTE belongs to the most competitive accuracy-efficiency trade-off achieved so far, for ViT pruning. We choose its structured variant to be fair with UVC.
150
+
151
+ # 4.1 MAIN RESULTS
152
+
153
+ The main results are listed in Tab. 1. Firstly, we notice that most existing methods cannot save beyond $50 \%$ FLOPs without sacrificing too much accuracy. In comparison, UVC can easily go with larger compression rates (up to $\geq 6 0 \%$ FLOPS saving) without compromising as much. For example, when compressing DeiT-Tiny (with distillation token), UVC can trim the model down to a compelling $2 5 0 \%$ of the original FLOPs while losing only $0 . 3 \%$ accuracy (Tab. 3). Especially, compared with the latest SViTE (Chen et al., 2021b) that can only save up to around $30 \%$ FLOPs, we observe UVC to significantly outperform ig at DeiT-Tiny/Small, at less accuracy drops (0.9/0.4, versus 2.1/0.6) with much more aggressive FLOPs savings $( 5 0 . 7 \% / 4 2 . 4 \%$ , versus $2 3 . 7 \% / 3 1 . 6 3 )$ ). For the larger DeiT-Base, while UVC can save $45 \%$ of its FLOPs, we fin that SViTE cannot be stably trained at such high sparsity. UVC also yield comparable accuracy with the other ViT model pruning approach, VTP (Zhu et al., 2021), with more than $10 \%$ FLOPs savings w.r.t. the original backbone.
154
+
155
+ Secondly, UVC obtains strong results compared with Patch Reduction based methods. UVC performs clearly better than IA-RED2 (Pan et al., 2021a) at DeiT-Base, and outperforms HVT (Pan et al., 2021b) on both DeiT-Tiny/Small models, which are latest and strong competitors. Compared to Patch Slimming Tang et al. (2021), UVC at DeiT-Small reaches $7 9 . 4 4 \%$ top-1 accuracy, while the compression ratio measured by FLOPs is comparable. On other models, we observe UVC to generally save more FLOPs, yet also sacrificing more accuracies. Moreover, as we explained in
156
+
157
+ Table 1: Comparison of the vision transformers compressed by UVC with different benchmarks on ImageNet. FLOPs remained denotes the remained ratio of FLOPs to the full-model FLOPs.
158
+
159
+ <table><tr><td>Model</td><td>Method</td><td>Top-1 Acc. (%)</td><td>FLOPs(G)</td><td>FLOPs remained(%)</td></tr><tr><td rowspan="7">DeiT-Tiny</td><td>Baseline</td><td>72.2</td><td>1.3</td><td>100</td></tr><tr><td>SViTE</td><td>70.12 (-2.08)</td><td>0.99</td><td>76.31</td></tr><tr><td>PatchSlimming</td><td>72.0 (-0.2)</td><td>0.7</td><td>53.8</td></tr><tr><td>UVC</td><td>71.8 (-0.4)</td><td>0.69</td><td>53.1</td></tr><tr><td>HVT</td><td>69.7 (-2.5)</td><td>0.64</td><td>49.23</td></tr><tr><td>UVC</td><td>71.3 (-0.9)</td><td>0.64</td><td>49.23</td></tr><tr><td>UVC</td><td>70.6 (-1.6)</td><td>0.51</td><td>39.12</td></tr><tr><td rowspan="8">DeiT-Small</td><td>Baseline</td><td>79.8</td><td>4.6</td><td>100</td></tr><tr><td>SViTE</td><td>79.22 (-0.58)</td><td>3.14</td><td>68.36</td></tr><tr><td>PoWER</td><td>78.3 (-1.5)</td><td>2.7</td><td>58.7</td></tr><tr><td>UVC</td><td>79.44 (-0.36)</td><td>2.65</td><td>57.61</td></tr><tr><td>SCOP</td><td>77.5 (-2.3)</td><td>2.6</td><td>56.4</td></tr><tr><td>PatchSlimming</td><td>79.4 (-0.4)</td><td>2.6</td><td>56.5</td></tr><tr><td>HVT</td><td>78.0 (-1.8)</td><td>2.40</td><td>52.2</td></tr><tr><td>UVC</td><td>78.82 (-0.98)</td><td>2.32</td><td>50.41</td></tr><tr><td rowspan="6">DeiT-Base</td><td>Baseline</td><td>81.8</td><td>17.6</td><td>100</td></tr><tr><td>IA-RED²</td><td>80.3 (-1.5)</td><td>11.8</td><td>67.04</td></tr><tr><td>SViTE</td><td>82.22 (+0.42)</td><td>11.87</td><td>66.87</td></tr><tr><td>VTP</td><td>80.7 (-1.1)</td><td>10.0</td><td>56.8</td></tr><tr><td>PatchSlimming</td><td>81.5 (-0.3)</td><td>9.8</td><td>55.7</td></tr><tr><td>UVC</td><td>80.57 (-1.23)</td><td>8.0</td><td>45.50</td></tr><tr><td rowspan="5">T2T-ViT-14</td><td>Baseline</td><td>81.5</td><td>4.8</td><td>100</td></tr><tr><td>PoWER</td><td>79.9 (-1.6)</td><td>3.5</td><td>72.9</td></tr><tr><td>UVC</td><td>80.4 (-1.1)</td><td>2.90</td><td>60.4</td></tr><tr><td>UVC</td><td>79.6 (-1.9)</td><td>2.47</td><td>51.5</td></tr><tr><td>UVC</td><td>78.9 (-2.6)</td><td>2.11</td><td>44.0</td></tr></table>
160
+
161
+ Table 2: Ablation study on the modules implemented in UVC. The first part present single technique ablation. The second part presents the result to sequentially apply Skip configuration and Pruning.
162
+
163
+ <table><tr><td>Method</td><td colspan="2">DeiT-Tiny Acc. (%) FLOPs remained(%)</td></tr><tr><td>Uncompressed baseline</td><td>72.2</td><td>100</td></tr><tr><td>Only skip manipulation</td><td>68.72</td><td>51.85</td></tr><tr><td>Only pruning within a block</td><td>70.52</td><td>50.69</td></tr><tr><td>Without Knowledge Distillation</td><td>69.34</td><td>51.23</td></tr><tr><td>Skip-&gt;Prune 71.49%-&gt;49.39%</td><td>66.84</td><td>49.39</td></tr><tr><td>Prune-→Skip 69.96%-&gt;54.88%</td><td>69.68</td><td>54.88</td></tr><tr><td>Prune-→Skip 63.25%-&gt;50.73%</td><td>70.02</td><td>50.73</td></tr><tr><td>UvC</td><td>71.3</td><td>49.23</td></tr></table>
164
+
165
+ Section 3.1, those input token reduction methods represent an orthogonal direction to the model weight sparsification way that UVC is pursuing. UVC can also be seamlessly extended to include token reduction into the joint optimization - a future work that we would pursue.
166
+
167
+ Thirdly, we test UVC on compressing T2T-ViT (Yuan et al., 2021). In the last row of Tab. 1, UVC with $\overline { { 4 4 } } \%$ FLOPs achieves only a $2 . 6 \%$ accuracy drop. Meanwhile, UVC achieves a $1 . 9 \%$ accuracy drop with $5 1 . 5 \%$ of the original FLOPs. With $6 0 . 4 \%$ FLOPs, UVC only suffers from a $1 . 1 \%$ accuracy drop, already outperforming PoWER with $7 2 . 9 \%$ FLOPs.
168
+
169
+ As UVC highlights the integration of three different compression techniques into one joint optimization framework, it would be natural to question whether each moving part is necessary for the pipeline, and how they each contribute to the final result. We conduct this ablation study, and the results are presented in Tab. 2.
170
+
171
+ Skip Manipulation only. We first present the result when we only conduct skip manipulation and knowledge distillation in our framework, but not pruning within a block. All other protocols remain unchanged. This two-in-a-way method is actually reduced into LayerDropping (Lin et al., 2018). We have the following findings: Firstly, implementing only skip connection manipulation will incur high instability. During optimization, the objective value fluctuates heavily due to the large architecture changes (adding or removing one whole block) and barely converges to a stable solution. Secondly, only applying skip manipulation will be damaging the accuracy remarkably, e.g., by nearly $4 \%$ drop on DeiT-Tiny. That is expected, as only manipulating the model architecture with such a coarse granularity (keeping or skipping a whole transformer block) is very inflexible and prone to collapse.
172
+
173
+ Pruning within a Block only. We then conduct experiments without using the gating control for skip connections. That leads to only integrating neuron-level and attention-head-level pruning, with knowledge distillation. It turns out to deliver much better accuracy than only skip manipulation, presumably owing to its finer-grained operation. However, it still has a margin behind our joint UVC method, as the latter also benefits from removing block-level redundancy a priori, which is recently observed to widely exist in fine-tuned transformers Phang et al. (2021). Overall, the ablation results endorse the effectiveness of jointly optimizing those components altogether.
174
+
175
+ Applying Individual Compression Methods Sequentially Our method is a joint optimization process for skip configuration manipulation and pruning, but is this joint optimization necessary?
176
+
177
+ To address this curiosity, we mark Prune Skip as the process of pruning first, manipulating skip configuration follows, while Skip Prune vice versa. Note that Skip Prune $7 1 . 4 9 \% 4 9 . 3 9 \%$ denotes the pipeline that use skip configuration first to enforce the model FLOPs to be $7 1 . 4 9 \%$ of the original FLOPs, then apply pruning to further compress the model to $4 9 . 3 9 \%$ . Without loss of generality, we approximate both the pruning procedure and skipping procedure to compress $70 \%$ of the previous model, which will approximately result in a model with $50 \%$ of the original FLOPs. Based on this, we implement: $( i )$ Skip Prune $7 1 . 4 9 \% \to 4 9 . 3 9 \%$ It first compresses the model to $71 \%$ by skipping then applies pruning on the original model and results in the worse performance at $6 6 . 8 4 \%$ . (ii)Prune Skip $6 9 . 9 6 \% 5 4 . 8 8 \%$ It applies pruning to $70 \%$ FLOPs then skipping follows. We observe that applying pruning first can stabilize the choice of skip configuration and result in a top-1 accuracy of $6 9 . 6 8 \%$ . Both results endorse the superior trade-off found by UVC.
178
+
179
+ Furthermore, we design a better setting (Prune Skip $6 3 . 2 5 \% 5 0 . 7 3 \%$ ) to simulate the compression ratio found by UVC. Details can be found in Appendix. The obtained result is much better than previous ones, but still at a $1 \%$ performance gap from the result provided by UVC. We assign the extra credit to jointly optimizing the architecture and model weights.
180
+
181
+ # 5 CONCLUSION
182
+
183
+ In this paper, we propose UVC, a unified ViT compression framework that seamlessly assembles pruning, layer skipping, and knowledge distillation as one. A budget-constrained optimization framework is formulated for joint learning. Experiments demonstrate that UVC can aggressively trim down the prohibit computational costs in an end-to-end way. Our future work will extend UVC to incorporating weight quantization as part of the end-to-end optimization as well.
184
+
185
+ # REFERENCES
186
+
187
+ Haoli Bai, Wei Zhang, Lu Hou, Lifeng Shang, Jing Jin, Xin Jiang, Qun Liu, Michael Lyu, and Irwin King. Binarybert: Pushing the limit of bert quantization. arXiv preprint arXiv:2012.15701, 2020.
188
+
189
+ Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
190
+
191
+ Gedas Bertasius, Heng Wang, and Lorenzo Torresani. Is space-time attention all you need for video understanding? arXiv preprint arXiv:2102.05095, 2021.
192
+
193
+ Niv Buchbinder and Joseph Naor. The design of competitive online algorithms via a primal-dual approach. Now Publishers Inc, 2009.
194
+
195
+ Aydin Buluc and John R Gilbert. Challenges and advances in parallel sparse matrix-matrix multiplication. In 2008 37th International Conference on Parallel Processing, pp. 503–510. IEEE, 2008.
196
+
197
+ 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.
198
+
199
+ Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12299–12310, 2021a.
200
+
201
+ Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, and Ilya Sutskever. Generative pretraining from pixels. In International Conference on Machine Learning, pp. 1691– 1703. PMLR, 2020a.
202
+
203
+ Tianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu, Yang Zhang, Zhangyang Wang, and Michael Carbin. The lottery ticket hypothesis for pre-trained bert networks. Advances in neural information processing systems, 33:15834–15846, 2020b.
204
+
205
+ Tianlong Chen, Yu Cheng, Zhe Gan, Lu Yuan, Lei Zhang, and Zhangyang Wang. Chasing sparsity in vision transformers: An end-to-end exploration. arXiv preprint arXiv:2106.04533, 2021b.
206
+
207
+ Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
208
+
209
+ Zhigang Dai, Bolun Cai, Yugeng Lin, and Junying Chen. Up-detr: Unsupervised pre-training for object detection with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1601–1610, 2021.
210
+
211
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
212
+
213
+ Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. In Advances in Neural Information Processing Systems, pp. 4857–4867, 2017.
214
+
215
+ Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. arXiv preprint arXiv:2103.03404, 2021.
216
+
217
+ 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. arXiv preprint arXiv:2010.11929, 2020.
218
+
219
+ Angela Fan, Edouard Grave, and Armand Joulin. Reducing transformer depth on demand with structured dropout. arXiv preprint arXiv:1909.11556, 2019.
220
+
221
+ Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019.
222
+
223
+ Prakhar Ganesh, Yao Chen, Xin Lou, Mohammad Ali Khan, Yin Yang, Deming Chen, Marianne Winslett, Hassan Sajjad, and Preslav Nakov. Compressing large-scale transformer-based models: A case study on bert. arXiv preprint arXiv:2002.11985, 2020.
224
+
225
+ Mitchell A Gordon, Kevin Duh, and Nicholas Andrews. Compressing bert: Studying the effects of weight pruning on transfer learning. arXiv preprint arXiv:2002.08307, 2020.
226
+
227
+ Saurabh Goyal, Anamitra Roy Choudhury, Saurabh Raje, Venkatesan Chakaravarthy, Yogish Sabharwal, and Ashish Verma. Power-bert: Accelerating bert inference via progressive word-vector elimination. In International Conference on Machine Learning, pp. 3690–3699. PMLR, 2020.
228
+
229
+ Fu-Ming Guo, Sijia Liu, Finlay S Mungall, Xue Lin, and Yanzhi Wang. Reweighted proximal pruning for large-scale language representation. arXiv preprint arXiv:1909.12486, 2019.
230
+
231
+ Yi Guo, Huan Yuan, Jianchao Tan, Zhangyang Wang, Sen Yang, and Ji Liu. Gdp: Stabilized neural network pruning via gates with differentiable polarization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5239–5250, 2021.
232
+
233
+ Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, Zhaohui Yang, Yiman Zhang, and Dacheng Tao. A survey on vision transformer, 2021.
234
+
235
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015a.
236
+
237
+ Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pp. 1135–1143, 2015b.
238
+
239
+ 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.
240
+
241
+ Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4340–4349, 2019.
242
+
243
+ Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017.
244
+
245
+ Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. Amc: Automl for model compression and acceleration on mobile devices. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 784–800, 2018.
246
+
247
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
248
+
249
+ Lu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang, Xiao Chen, and Qun Liu. Dynabert: Dynamic bert with adaptive width and depth. arXiv preprint arXiv:2004.04037, 2020.
250
+
251
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4700–4708, 2017.
252
+
253
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
254
+
255
+ Ding Jia, Kai Han, Yunhe Wang, Yehui Tang, Jianyuan Guo, Chao Zhang, and Dacheng Tao. Efficient vision transformers via fine-grained manifold distillation. arXiv preprint arXiv:2107.01378, 2021.
256
+
257
+ Yifan Jiang, Shiyu Chang, and Zhangyang Wang. Transgan: Two pure transformers can make one strong gan, and that can scale up. Advances in Neural Information Processing Systems, 34, 2021.
258
+
259
+ Taehyeon Kim, Jaehoon Oh, NakYil Kim, Sangwook Cho, and Se-Young Yun. Comparing kullback-leibler divergence and mean squared error loss in knowledge distillation. arXiv preprint arXiv:2105.08919, 2021.
260
+
261
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012.
262
+
263
+ Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942, 2019.
264
+
265
+ Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989.
266
+
267
+ Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In Advances in neural information processing systems, pp. 598–605, 1990.
268
+
269
+ Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. arXiv preprint arXiv:1810.02340, 2018.
270
+
271
+ Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
272
+
273
+ Mingbao Lin, Rongrong Ji, Yan Wang, Yichen Zhang, Baochang Zhang, Yonghong Tian, and Ling Shao. Hrank: Filter pruning using high-rank feature map. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1529–1538, 2020.
274
+
275
+ Shaohui Lin, Rongrong Ji, Yuchao Li, Yongjian Wu, Feiyue Huang, and Baochang Zhang. Accelerating convolutional networks via global & dynamic filter pruning. In IJCAI, pp. 2425–2432, 2018.
276
+
277
+ Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In ICCV, 2017.
278
+
279
+ Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In Proceedings of the IEEE international conference on computer vision, pp. 5058–5066, 2017.
280
+
281
+ Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? arXiv preprint arXiv:1905.10650, 2019.
282
+
283
+ Asit Mishra and Debbie Marr. Apprentice: Using knowledge distillation techniques to improve low-precision network accuracy. In International Conference on Learning Representations, 2018.
284
+
285
+ Bowen Pan, Yifan Jiang, Rameswar Panda, Zhangyang Wang, Rogerio Feris, and Aude Oliva. Ia-red2: Interpretability-aware redundancy reduction for vision transformers. arXiv preprint arXiv:2106.12620, 2021a.
286
+
287
+ Zizheng Pan, Bohan Zhuang, Jing Liu, Haoyu He, and Jianfei Cai. Scalable vision transformers with hierarchical pooling. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 377–386, 2021b.
288
+
289
+ Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In International Conference on Machine Learning, pp. 4055–4064. PMLR, 2018.
290
+
291
+ Jason Phang, Haokun Liu, and Samuel R Bowman. Fine-tuned transformers show clusters of similar representations across layers. arXiv preprint arXiv:2109.08406, 2021.
292
+
293
+ Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? arXiv preprint arXiv:2108.08810, 2021.
294
+
295
+ Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.
296
+
297
+ Jiayi Shen, Haotao Wang, Shupeng Gui, Jianchao Tan, Zhangyang Wang, and Ji Liu. Umec: Unified model and embedding compression for efficient recommendation systems. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum? id $=$ BM---bH_RSh.
298
+
299
+ Yehui Tang, Yunhe Wang, Yixing Xu, Dacheng Tao, Chunjing Xu, Chao Xu, and Chang Xu. Scop: Scientific control for reliable neural network pruning. arXiv preprint arXiv:2010.10732, 2020.
300
+
301
+ Yehui Tang, Kai Han, Yunhe Wang, Chang Xu, Jianyuan Guo, Chao Xu, and Dacheng Tao. Patch slimming for efficient vision transformers. arXiv preprint arXiv:2106.02852, 2021.
302
+
303
+ Katsuya Tono, Akiko Takeda, and Jun-ya Gotoh. Efficient dc algorithm for constrained sparse optimization. arXiv preprint arXiv:1701.08498, 2017.
304
+
305
+ Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020.
306
+
307
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
308
+
309
+ Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Max-deeplab: End-toend panoptic segmentation with mask transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5463–5474, 2021a.
310
+
311
+ Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8741–8750, 2021b.
312
+
313
+ Longhui Wei, An Xiao, Lingxi Xie, Xiaopeng Zhang, Xin Chen, and Qi Tian. Circumventing outliers of autoaugment with knowledge distillation. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part III 16, pp. 608–625. Springer, 2020.
314
+
315
+ Xia Xiao, Zigeng Wang, and Sanguthevar Rajasekaran. Autoprune: Automatic network pruning by regularizing auxiliary parameters. In Advances in Neural Information Processing Systems, pp. 13681–13691, 2019.
316
+
317
+ Canwen Xu, Wangchunshu Zhou, Tao Ge, Furu Wei, and Ming Zhou. Bert-of-theseus: Compressing bert by progressive module replacing. arXiv preprint arXiv:2002.02925, 2020.
318
+
319
+ Fuzhi Yang, Huan Yang, Jianlong Fu, Hongtao Lu, and Baining Guo. Learning texture transformer network for image super-resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5791–5800, 2020a.
320
+
321
+ Haichuan Yang, Yijun Huang, Lam Tran, Ji Liu, and Shuai Huang. On benefits of selection diversity via bilevel exclusive sparsity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5945–5954, 2016.
322
+
323
+ Haichuan Yang, Shupeng Gui, Yuhao Zhu, and Ji Liu. Automatic neural network compression by sparsity-quantization joint learning: A constrained optimization-based approach. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2178–2188, 2020b.
324
+
325
+ Ruichi Yu, Ang Li, Chun-Fu Chen, Jui-Hsin Lai, Vlad I Morariu, Xintong Han, Mingfei Gao, Ching-Yung Lin, and Larry S Davis. Nisp: Pruning networks using neuron importance score propagation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9194–9203, 2018.
326
+
327
+ Shixing Yu, Zhewei Yao, Amir Gholami, Zhen Dong, Michael W Mahoney, and Kurt Keutzer. Hessian-aware pruning and optimal neural implant. arXiv preprint arXiv:2101.08940, 2021.
328
+
329
+ Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. Revisiting knowledge distillation via label smoothing regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3903–3911, 2020.
330
+
331
+ Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet, 2021.
332
+ Minjia Zhang and Yuxiong He. Accelerating training of transformer-based language models with progressive layer dropping. arXiv preprint arXiv:2010.13369, 2020.
333
+ Wei Zhang, Lu Hou, Yichun Yin, Lifeng Shang, Xiao Chen, Xin Jiang, and Qun Liu. Ternarybert: Distillation-aware ultra-low bit bert. arXiv preprint arXiv:2009.12812, 2020.
334
+ Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip Torr, and Vladlen Koltun. Point transformer. arXiv preprint arXiv:2012.09164, 2020a.
335
+ Yang Zhao, Xiaohan Chen, Yue Wang, Chaojian Li, Haoran You, Yonggan Fu, Yuan Xie, Zhangyang Wang, and Yingyan Lin. Smartexchange: Trading higher-cost memory storage/access for lower-cost computation. In 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA), pp. 954–967. IEEE, 2020b.
336
+ Minghang Zheng, Peng Gao, Xiaogang Wang, Hongsheng Li, and Hao Dong. End-to-end object detection with adaptive clustering transformer. arXiv preprint arXiv:2011.09315, 2020.
337
+ Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Zihang Jiang, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer, 2021.
338
+ Mingjian Zhu, Kai Han, Yehui Tang, and Yunhe Wang. Visual transformer pruning. arXiv preprint arXiv:2104.08500, 2021.
339
+ 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.
340
+
341
+ # A APPENDIX
342
+
343
+ # A.1 UPDATING POLICY
344
+
345
+ Updating Weights $W$ Different from other pruning methods in CNN that use fixed pre-trained weights to select the pruned channels/groups with certain pre-defined metrics (Lin et al., 2020; He et al., 2019), here our subproblem could be considered as following dynamic pruning criteria that will be updated along. Specifically, we solve the following subproblem:
346
+
347
+ $$
348
+ \mathrm { P r o x } _ { \eta _ { 1 } S ( y , s , p , r , W ) } ( \bar { W } ) = \mathrm { a r g m i n } _ { W } \frac { 1 } { 2 } \left. W - \bar { W } \right. ^ { 2 } + \eta _ { 1 } S \left( y , s , p , r , W \right) ,
349
+ $$
350
+
351
+ where $\bar { W } = W ^ { t } - \eta _ { 1 } \hat { \nabla } _ { W } \ell \left( W ^ { t } \right)$ . The solution admits a bi-level projection (Yang et al., 2016):
352
+
353
+ $$
354
+ \begin{array}{c} W _ { \cdot , g _ { i j } } ^ { ( l , 1 ) * } = \left\{ \frac { \bar { W } _ { \cdot , g _ { i j } } ^ { ( l , 1 ) } , } { 1 + 2 \eta _ { 1 } p ^ { ( l , i ) } } , \quad \mathrm { ~ i f ~ } \Big \| \bar { W } _ { \cdot , g _ { i j } } ^ { ( l , 1 ) } \Big \| _ { 2 } ^ { 2 } \geq \Big \| W _ { \cdot , g _ { i \mathrm { l e a s t } \cdot \lceil r ^ { ( l , i ) } \rceil } } ^ { ( l , 1 ) } \Big \| _ { 2 } ^ { 2 } , \end{array} \right.
355
+ $$
356
+
357
+ $$
358
+ W _ { \cdot , g _ { i } } ^ { ( l , 1 ) * } = \left\{ \frac { \bar { W } _ { \cdot , g _ { i } } ^ { ( l , 1 ) } , } { 1 + 2 \eta _ { 1 } y ^ { ( l , 1 ) } } \right. \quad \mathrm { i f } \left\| \bar { W } _ { \cdot , g _ { i } } ^ { ( l , 1 ) } \right\| _ { 2 } ^ { 2 } \geq \left\| W _ { \cdot , g _ { \mathrm { l e a s i - } \lceil s ^ { ( l , 1 ) } \rceil } } ^ { ( l , 1 ) } \right\| _ { 2 } ^ { 2 } ,
359
+ $$
360
+
361
+ $$
362
+ W _ { \cdot , i } ^ { ( l , 3 ) * } = \{ \frac { \bar { W } _ { \cdot , i } ^ { ( l , 3 ) } , } { 1 + 2 \eta _ { 1 } y ^ { ( l , 3 ) } } , \quad \mathrm { i f } \| \bar { W } _ { \cdot , i } ^ { ( l , 3 ) } \| _ { 2 } ^ { 2 } \geq \| W _ { \cdot , \mathrm { l e a s t - } \lceil s ^ { ( l , 3 ) } \rceil } ^ { ( l , 3 ) } \| _ { 2 } ^ { 2 } ,
363
+ $$
364
+
365
+ where least- $j$ denotes the index of the (group) columns of $W$ that have $j$ -th least (group) norm.
366
+
367
+ Updating gt $\pmb { g t } ^ { l } = ( \pmb { g t } ^ { ( l , 0 ) } , \pmb { g t } ^ { ( l , 1 ) } )$ are used to generate a binomial categorical distribution to decide whether pass through block $l$ or directly skip it. As the two variables are discrete, we apply the renowned Gumbel-Softmax (GSM) trick (Jang et al., 2016) to obtain differentiable and polarized sampling. For $\pmb { g t } ^ { l } = ( \pmb { g t } ^ { ( l , 0 ) } , \pmb { g t } ^ { ( l , 1 ) } )$ , given i.i.d Gumbel noise $g$ drawn from $G u m b e l ( 0 , 1 )$ distribution, a soft categorical sample can be drawn by
368
+
369
+ $$
370
+ G ^ { l } = G S M ( g t ^ { l } ) = S o f t m a x ( ( l o g ( \pmb { g } t ^ { l } ) + g ) / \tau ) \in \mathbb { R } ^ { 2 } ,
371
+ $$
372
+
373
+ where $G ^ { ( l , 1 ) }$ refers to the continuous possibility to preserve current block $l$ while $G ^ { ( l , 0 ) }$ to drop it.
374
+ Directly applying the chain rule on $\scriptstyle { \mathcal { L } } ( W , g t )$ w.r.t $_ { g t }$ can now calculate $\tilde { \nabla } _ { g t } \mathcal { L } ( W ^ { t } , g t ^ { t } )$ .
375
+
376
+ Also, $_ { g t }$ participates in the calculation of FLOPs, by deciding whether to pass certain blocks. Since passing or skipping a block is a dynamic choice during training, we estimate the FLOPs of the $l$ -th block $\mathcal { R } _ { \mathrm { F l o p s } } ( s , r , g t )$ with skip gating by using its expectation. To be specific,
377
+
378
+ $$
379
+ \begin{array} { r l } & { \mathcal { R } _ { \mathrm { F l o p s } _ { l } } ( s _ { l } , r _ { l } , g t _ { l } ) = \mathbb { E } [ \mathcal { R } _ { \mathrm { F l o p s } _ { l } } ( s _ { l } , r _ { l } , g t _ { l } ) | s _ { l } , r _ { l } ] } \\ & { \quad \quad \quad = G ^ { ( l , 0 ) } \mathcal { R } _ { \mathrm { F l o p s } _ { l } } ( I d e n t i t y ) + G ^ { ( l , 1 ) } \mathcal { R } _ { \mathrm { F l o p s } _ { l } } ( s _ { l } , r _ { l } ) } \\ & { \quad \quad \quad = G ^ { ( l , 1 ) } \mathcal { R } _ { \mathrm { F l o p s } _ { l } } ( s _ { l } , r _ { l } ) } \end{array}
380
+ $$
381
+
382
+ Hence, updating policy for $_ { g t }$ is formulated as:
383
+
384
+ $$
385
+ \begin{array} { r l } & { g t ^ { t + 1 } = g t ^ { t } - \eta _ { 4 } \left( \tilde { \nabla } _ { g t } \mathcal { L } \left( W , g t ^ { t } \right) + \tilde { \nabla } _ { g t } z \left( R _ { \mathrm { F l o p s } } \left( s , r , g t ^ { t } \right) - R _ { \mathrm { b u d g e t } } \right) \right) } \\ & { \qquad = g t ^ { t } - \eta _ { 4 } \left( \tilde { \nabla } _ { g t } \mathcal { L } \left( W , g t ^ { t } \right) + \tilde { \nabla } _ { g t } z R _ { \mathrm { F l o p s } } ( s , r ) G S M ( g t ^ { t } ) \right) } \end{array}
386
+ $$
387
+
388
+ Updating $\pmb { s }$ and $\mathbfit { \Delta } \mathbf { r }$ Similar to the updating policy of $_ { g t }$ , one gradient term w.r.t. $\pmb { s }$ and $\pmb { r }$ are $\tilde { \nabla } _ { s } z \left( R _ { \mathrm { F l o p s } } \left( s , r , g t \right) - R _ { \mathrm { b u d g e t } } \right)$ , $\tilde { \nabla } _ { \boldsymbol { r } } z \left( R _ { \mathrm { F l o p s } } \left( s , \boldsymbol { r } , \boldsymbol { g } t \right) - R _ { \mathrm { b u d g e t } } \right)$ respectively.
389
+
390
+ The other gradient term is calculated on the unified formulation Eqn. 5. Refer to that, $\pmb { s }$ and $\mathbfit { \Delta } \mathbf { r }$ are floating-point numbers during the optimization process. In practise, ceiling functions are operated on them to determine the integer number that should be pruned for each layer. However, the ceiling function ⌈.⌉ is non-differentiable. To solve this problem, we implement Straight-through estimator(STE) (Bengio et al., 2013) to provide a proxy of the gradient when performing the backward pass. We set $\frac { \tilde { \partial } \lceil s \rceil } { \tilde { \partial } s } = 1$
391
+
392
+ As for $\| \mathbf { W } _ { \cdot , g } \| _ { s , 2 } ^ { 2 }$ term in the sparsity loss, we use $\lVert \boldsymbol { W } _ { \cdot , g } \rVert _ { s + 1 , 2 } ^ { 2 } - \lVert \boldsymbol { W } _ { \cdot , g } \rVert _ { s , 2 } ^ { 2 }$ as the proxy of partial derivative of $\| \mathbf { W } _ { \cdot , g } \| _ { s , 2 } ^ { 2 }$ with respect to $s$ :
393
+
394
+ $$
395
+ \frac { \tilde { \partial } \left\| W _ { \cdot , g } \right\| _ { s , 2 } ^ { 2 } } { \tilde { \partial } s } = \left\| W _ { \cdot , g _ { \mathrm { l e a s t } \cdot \mathrm { m i n } \left\{ \mathrm { D i m } ( W ) , s + 1 \right\} } } \right\| _ { 2 } ^ { 2 } ,
396
+ $$
397
+
398
+ where $\operatorname { D i m } ( W )$ is the number of column groups of $W$ . The other two terms in the sparsity loss can be processed similarly.
399
+
400
+ # A.2 MAIN ALGORITHM
401
+
402
+ The general updating policy follows the idea of primal-dual algorithm. The full algorithm is outlined in Algorithm 1.
403
+
404
+ <table><tr><td></td><td colspan="2">Algorithm1: Gradient-based algorithm to solve problem (5) for Unified ViT Compression.</td></tr><tr><td colspan="2">Input: Resource budget Rbudget,learning rates n1, N2, N3, N4, N5, 76, number of total iterations T. Result: Transformer pruned weights W*.</td></tr><tr><td colspan="2">Initialize t=1,W1;</td></tr><tr><td colspan="2">// random or a pre-trained dense model 2 fort←1tordo</td></tr><tr><td colspan="2">Wt+1= ProxmS(yt,st,pt,rt,wt) (Wt -n1VwL(Wt,gt)); 3</td></tr><tr><td colspan="2">// Proximal-SGD gt+1=gt-n2(sS(y+,st,pt,rt,gtt,Wt+1)+zt(RFlops(st,rt,gt)-Rbudget)); 4</td></tr><tr><td colspan="2">// Gradient (STE) Descent</td></tr><tr><td colspan="2">rt+1=rt-n3(S(y,st+1,pt,rt,gtt,Wt+1)+r2+(RFlops(st+1,rt,gt)-Rbudget)); 5</td></tr><tr><td colspan="2">// Gradient (STE) Descent</td></tr><tr><td colspan="2">gt+1=gt-nA ((gtC(Wt+1,gt²)+gtzt (RFlps(8+1,rt+1,gt)-Rbudgt); 6</td></tr><tr><td colspan="2">// Gradient Descent 2t+1=2t+n7(RFlops(st+1,rt+1,gt+1)-Rbudget); 7</td></tr><tr><td colspan="2">// Gradient Ascent 8 // Gradient Ascent</td></tr><tr><td colspan="2">=y(l,1)+s y(l,1)t+1 [[s(l,1)t+1] ; ,2</td></tr><tr><td colspan="2" rowspan="2">yl,3)+ns y(,3)t+1 W(,3)t+1|12</td></tr><tr><td colspan="2">,∀l=1,,L ,</td></tr><tr><td>p(,i)t+1</td><td>[s(l,3)t+1], ,2 W(1)t+1|2 ∀i=1,,H,∀l=1,,L</td></tr></table>
405
+
406
+ 10 W ∗ = W
407
+
408
+ # A.3 VISUALIZATION
409
+
410
+ To reveal more intuitions how UVC optimize the architecture, we present two groups of visualizations:
411
+
412
+ • Sparse connectivity patterns: We first visualize the sparse connectivity patterns in Fig. 3 (a), i.e, how many attention heads are preserved, and how they (sparsely) distribute over all blocks. For the smaller DeiT-Tiny model, UVC tends to more evenly drop attention heads across layers; meanwhile, for the larger DeiT-Base, UVC clearly prefers to drop more attention heads in the early layers.
413
+
414
+ ![](images/930a06420313014f0eaf8b93497ce0147eb00e80a3e3296bbc3be25537362dec.jpg)
415
+ Figure 3: Visualizations of: (a) sparse attention head patterns for DeiT-Tiny (left) and DeiT-Base (right); (b) skip connection patterns for DeiT-Tiny (top) and DeiT-Base (bottom).
416
+
417
+ Table 3: Result with distillation token of DeiT
418
+
419
+ <table><tr><td>Model</td><td>Method</td><td>Top-1 Acc. (%)</td><td>FLOPs(G)</td><td>FLOPs remained(%)</td></tr><tr><td>DeiT-Tiny</td><td>Baseline</td><td>74.4</td><td>1.3</td><td>100</td></tr><tr><td>(dist token)</td><td>UvC</td><td>74.1(-0.3)</td><td>0.66</td><td>50.58</td></tr></table>
420
+
421
+ • Skip connection patterns: We next draw the result of skip connection patterns Fig. 3 (b), showing what layers are learned to be directly skipped under unified optimization. We observe UVC’s obvious tendency to drop later layers, which coincides nicely with the observations by (Phang et al., 2021; Zhou et al., 2021).
422
+
423
+ As is observed in Fig. 3, DeiT-Tiny discarded 2 blocks in total, which results in $84 \%$ of compression ratio. Thus, in Sec. 4.2, to design an optimal architecture for sequentially applying compression methods, we first prune the DeiT-Tiny to $63 \%$ and apply skipping to indulge a $50 \%$ FLOPs’ model to mimick the behavior of UVC.
424
+
425
+ # A.4 EXTRA RESULTS
426
+
427
+ In this section, we present the result of DeiT with distillation token to extract the best performance vision transformer can reach under UVC framework. Results are shown in 3.
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b7b32b88ba22a204bf52d0473fe11e0fb36d27554dd5a33f0ca2dd0d08266f3
3
+ size 1218793
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd44dfd989bfdefc540494a870083f2c64eac9f683b8e071c19437dc371e39db
3
+ size 1020418
parse/dev/9jsZiUgkCZP/9jsZiUgkCZP_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79ca538239c21edb8fe407393788e345a337735fc7c1efc8972c3ad00f1eda51
3
+ size 1222604