Unifying Nonlocal Blocks for Neural Networks

Authors:
  • LZLei Zhu
    Lei Zhu
  • QSQi She
    Qi She
  • DLDuo Li
    Duo Li
  • YLYanye Lu
    Yanye Lu
  • XKXuejing Kang
    Xuejing Kang
  • JHJie Hu
    Jie Hu
  • CWChanghu Wang
    Changhu Wang

Abstract
The nonlocal-based blocks are designed for capturing long-range spatial-temporal dependencies in computer vision tasks. Although having shown excellent performance, they still lack the mechanism to encode the rich, structured information among elements in an image or video. In this paper, to theoretically analyze the property of these nonlocal-based blocks, we provide a new perspective to interpret them, where we view them as a set of graph filters generated on a fully-connected graph. Specifically, when choosing the Chebyshev graph filter, a unified formulation can be derived for explaining and analyzing the existing nonlocal-based blocks (e.g., nonlocal block, nonlocal stage, double attention block). Furthermore, by concerning the property of spectral, we propose an efficient and robust spectral nonlocal block, which can be more robust and flexible to catch long-range dependencies when inserted into deep neural networks than the existing nonlocal blocks. Experimental results demonstrate the clear-cut improvements and practical applicabilities of our method on image classification, action recognition, semantic segmentation, and person re-identification tasks.