Probabilistic Attention for Interactive Segmentation
arXiv:2106.15338
Abstract
We provide a probabilistic interpretation of attention and show that the standard dot-product attention in transformers is a special case of Maximum A Posteriori (MAP) inference. The proposed approach suggests the use of Expectation Maximization algorithms for online adaptation of key and value model parameters. This approach is useful for cases in which external agents, e.g., annotators, provide inference-time information about the correct values of some tokens, e.g, the semantic category of some pixels, and we need for this new information to propagate to other tokens in a principled manner. We illustrate the approach on an interactive semantic segmentation task in which annotators and models collaborate online to improve annotation efficiency. Using standard benchmarks, we observe that key adaptation boosts model performance ( mIoU) in the low feedback regime and value propagation improves model responsiveness in the high feedback regime. A PyTorch layer implementation of our probabilistic attention model will be made publicly available here: https://github.com/apple/ml-probabilistic-attention.
arXiv commentUpdated with link to GitHub, 17 pages, 8 figures
References in corpus (6)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Neural Machine Translation by Jointly Learning to Align and Translate
- Rethinking Atrous Convolution for Semantic Image Segmentation
- Universal Transformers
- Pay Less Attention with Lightweight and Dynamic Convolutions
- Stand-Alone Self-Attention in Vision Models