Compressed Self-Attention for Deep Metric Learning with Low-Rank Approximation

Abstract

In this paper, we apply self-attention (SA) mechanism to boost the performance of deep metric learning. However, due to the pairwise similarity measurement, the cost of storing and manipulating the complete attention maps makes it infeasible for large inputs. To solve this problem, we propose a compressed self-attention with low-rank approximation (CSALR) module, which significantly reduces the computation and memory costs without sacrificing the accuracy. In CSALR, the original attention map is decomposed into a landmark attention map and a combination coefficient map with a small number of landmark feature vectors sampled from the input feature map by average pooling. Thanks to the efficiency of CSALR, we can apply CSALR to high-resolution shallow convolutional layers and implement a multi-head form of CSALR, which further boosts the performance. We evaluate the proposed CSALR on person reidentification which is a typical metric learning task. Extensive experiments shows the effectiveness and efficiency of CSALR in deep metric learning and its superiority over the baselines.

Cite

Text

Chen et al. "Compressed Self-Attention for Deep Metric Learning with Low-Rank Approximation." International Joint Conference on Artificial Intelligence, 2020. doi:10.24963/IJCAI.2020/285

Markdown

[Chen et al. "Compressed Self-Attention for Deep Metric Learning with Low-Rank Approximation." International Joint Conference on Artificial Intelligence, 2020.](https://mlanthology.org/ijcai/2020/chen2020ijcai-compressed/) doi:10.24963/IJCAI.2020/285

BibTeX

@inproceedings{chen2020ijcai-compressed,
  title     = {{Compressed Self-Attention for Deep Metric Learning with Low-Rank Approximation}},
  author    = {Chen, Ziye and Gong, Mingming and Ge, Lingjuan and Du, Bo},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year      = {2020},
  pages     = {2058-2064},
  doi       = {10.24963/IJCAI.2020/285},
  url       = {https://mlanthology.org/ijcai/2020/chen2020ijcai-compressed/}
}