Probabilistic Attention for Interactive Segmentation

Prasad Gabbur, Manjot Bilkhu, Javier Movellan
6/23/2021
cs.CVcs.AIcs.LG

Official code: apple-aiml-research/ml-probabilistic-attention (32 stars, Python, last commit 2026-09-11).

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.

Show full abstract

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 ($\sim10\%$ 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.

View on arXivView PDF

Code Implementations(1)

325PythonApr 8, 20212 months agoNOASSERTION

Similar Papers

Cite this paper

@article{gabbur2021probabilistic,
  title  = {Probabilistic Attention for Interactive Segmentation},
  author = {Prasad Gabbur and Manjot Bilkhu and Javier Movellan},
  year   = {2021},
  eprint = {2106.15338},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.15338}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.15338.svg)](https://codeofpaper.com/paper/2106.15338)

Discussion