Compressed Self-Attention for Deep Metric Learning
Abstract
In this paper, we aim to enhance self-attention (SA) mechanism for deep metric learning in visual perception, by capturing richer contextual dependencies in visual data. To this end, we propose a novel module, named compressed self-attention (CSA), which significantly reduces the computation and memory cost with a neglectable decrease in accuracy with respect to the original SA mechanism, thanks to the following two characteristics: i) it only needs to compute a small number of base attention maps for a small number of base feature vectors; and ii) the output at each spatial location can be simply obtained by an adaptive weighted average of the outputs calculated from the base attention maps. The high computational efficiency of CSA enables the application to high-resolution shallow layers in convolutional neural networks with little additional cost. In addition, CSA makes it practical to further partition the feature maps into groups along the channel dimension and compute attention maps for features in each group separately, thus increasing the diversity of long-range dependencies and accordingly boosting the accuracy. We evaluate the performance of CSA via extensive experiments on two metric learning tasks: person re-identification and local descriptor learning. Qualitative and quantitative comparisons with latest methods demonstrate the significance of CSA in this topic.
Cite
Text
Chen et al. "Compressed Self-Attention for Deep Metric Learning." AAAI Conference on Artificial Intelligence, 2020. doi:10.1609/AAAI.V34I04.5762Markdown
[Chen et al. "Compressed Self-Attention for Deep Metric Learning." AAAI Conference on Artificial Intelligence, 2020.](https://mlanthology.org/aaai/2020/chen2020aaai-compressed/) doi:10.1609/AAAI.V34I04.5762BibTeX
@inproceedings{chen2020aaai-compressed,
title = {{Compressed Self-Attention for Deep Metric Learning}},
author = {Chen, Ziye and Gong, Mingming and Xu, Yanwu and Wang, Chaohui and Zhang, Kun and Du, Bo},
booktitle = {AAAI Conference on Artificial Intelligence},
year = {2020},
pages = {3561-3568},
doi = {10.1609/AAAI.V34I04.5762},
url = {https://mlanthology.org/aaai/2020/chen2020aaai-compressed/}
}