DOI QR코드

DOI QR Code

윈도우 주의 모듈 기반 트랜스포머를 활용한 이미지 분류 방법

Window Attention Module Based Transformer for Image Classification

  • 김상훈 (건국대학교 전기전자공학부) ;
  • 김원준 (건국대학교 전기전자공학부)
  • Kim, Sanghoon (Department of Electrical and Electronics Engineering, Konkuk University) ;
  • Kim, Wonjun (Department of Electrical and Electronics Engineering, Konkuk University)
  • 투고 : 2022.05.21
  • 심사 : 2022.06.27
  • 발행 : 2022.07.30

초록

최근 소개된 트랜스포머(Transformer)를 이용한 이미지 분류 방법들은 기존 합성곱 신경망 기반 방법 대비 괄목할 만한 성능 향상을 보여주고 있다. 지역적 특성을 효과적으로 고려하기 위해 이미지 영역을 복수의 윈도우 영역으로 나누어 트랜스포머를 적용하는 방법에 대한 연구가 활발히 진행되어 왔으나, 윈도우 간 관계 및 중요도에 대한 학습은 여전히 부족한 상황이다. 본 논문에서는 이러한 문제점을 극복하기 위해 각 윈도우의 중요도를 학습에 반영할 수 있는 트랜스포머 구조를 제안한다. 제안하는 방법은 각 윈도우 영역에 대한 자기주의(Self-attention) 연산을 기반으로 압축과 완전 연결 계층(Fully Connected Layer)을 통해 각 윈도우 영역의 중요도를 계산한다. 계산된 중요도는 윈도우 영역들 간의 관계를 학습한 가중치로써 각 윈도우 영역에 곱해져 특징 값을 재조정 한다. 실험 결과를 통해 제안하는 방법이 기존 트랜스포머 기반 방법의 성능을 효과적으로 향상 시킬 수 있음을 보인다.

Recently introduced image classification methods using Transformers show remarkable performance improvements over conventional neural network-based methods. In order to effectively consider regional features, research has been actively conducted on how to apply transformers by dividing image areas into multiple window areas, but learning of inter-window relationships is still insufficient. In this paper, to overcome this problem, we propose a transformer structure that can reflect the relationship between windows in learning. The proposed method computes the importance of each window region through compression and a fully connected layer based on self-attention operations for each window region. The calculated importance is scaled to each window area as a learned weight of the relationship between the window areas to re-calibrate the feature value. Experimental results show that the proposed method can effectively improve the performance of existing transformer-based methods.

키워드

과제정보

이 논문은 정부(과학기술정보통신부)의 재원으로 한국연구재단의 지원을 받아 수행된 연구임 (No. 2020R1F1A1068080).

참고문헌

  1. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, "Attention is all you need," in Proc. Conf. Neural Inf. Process. Syst., pp. 5998-6008, Dec. 2017. doi: https://doi.org/10.48550/arXiv.1706.03762
  2. A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, "An image is worth 16x16 words: Transformers for image recognition at scale," in Proc. Int. Conf. Learn. Represent., May 2021. doi: https://doi.org/10.48550/arXiv.2010.11929
  3. Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, S. Lin, and B. Guo, "Swin transformer: Hierarchical vision transformer using shifted windows," in Proc. IEEE Int. Conf. Comput. Vis., pp. 10012-10022, Oct. 2021. doi: https://doi.org/10.1109/iccv48922.2021.00986
  4. X. Dong, J. Bao, D. Chen, W. Zhang, N. Yu, L. Yuan, D. Chen, and B. Guo, "CSWin transformer: A general vision transformer backbone with cross-shaped windows," 2021, arXiv:2107.00652. [Online]. Available: https://arxiv.org/abs/2107.00652 doi: https://doi.org/10.48550/arXiv.2107.00652
  5. J. Yang, C. Li, P. Zhang, X. Dai, B. Xiao, L. Yuan, and J. Gao, "Focal self-attention for local-global interactions in vision transformers," 2021, arXiv:2107.00641. [Online]. Available: https://arxiv.org/abs/2107.00641 doi: https://doi.org/10.48550/arXiv.2107.00641
  6. X. Chu, Z.Tian, Y. Wang, B. Zhang, H. Ren, X. Wei, H. Xia, and C. Shen, "Twins: Revisiting the design of spatial attention in vision transformers," in Proc. Conf. Neural Inf. Process. Syst., pp. 9355-9366, Dec. 2021. doi: https://doi.org/10.48550/arXiv.2104.13840
  7. J. Deng, W. Dong, R. Socher, LJ. Li, K. Li, and Li Fei-Fei, "ImageNet: A large-scale hierarchical image database," in Proc. IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 248-255, Jun. 2009. doi: https://doi.org/10.1109/cvpr.2009.5206848
  8. J. Hu, L. Shen, and G. Sun, "Squeeze-and-Excitation Networks," in Proc. IEEE Int. Conf. Comput. Vis. Pattern Recognit., pp. 7132-7141, Jun. 2018. doi: https://doi.org/10.1109/cvpr.2018.00745
  9. R. Muller, S. Kornblith, and G. E. Hinton, "When does label smoothing help?," in Proc. Conf. Neural Inf. Process. Syst., pp. 4696-4705, Dec. 2019. doi: https://doi.org/10.48550/arXiv.1906.02629
  10. A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S.Chilamkurthy, B. Steiner, L. Fang, J. Bai, S. Chintala, "PyTorch: An imperative style, high-performance deep learning library," in Proc. Conf. Neural Inf. Process. Syst., pp. 8024-8035, Dec. 2019. doi: https://doi.org/10.48550/arXiv.1912.01703
  11. J. L. Ba, J. R. Kiros, and G. E. Hinton, "Layer normalization," 2016, arXiv:1607.06450. [Online]. Available: https://arxiv.org/abs/1607.06450 doi: https://doi.org/10.48550/arXiv.1607.06450
  12. I. Loshchilov and F. Hutter, "Decoupled weight decay regularization," 2017, arXiv:1711.05101. [Online]. Available: https://arxiv.org/abs/1711.05101 doi: https://doi.org/10.48550/arXiv.1711.05101