paper-with-me

Papers

Simulating Hard Attention Using Soft Attention

2024-12-13 · Andy Yang, Lena Strobl, David Chiang, Dana Angluin

We study conditions under which transformers using soft attention can simulate hard attention, that is, effectively focus all attention on a subset of positions. First, we examine several subclasses of languages recognized by hard-attention transformers, which can be defined in variants of linear temporal logic. We demonstrate how soft-attention transformers can compute formulas of these logics using unbounded positional embeddings or temperature scaling. Second, we demonstrate how temperature scaling allows softmax transformers to simulate general hard-attention transformers, using a temperature that depends on the minimum gap between the maximum attention scores and other attention scores.

📄 PDF Abstract BibTeX arXiv:2412.09925

Code (0)

등록된 구현이 없습니다.

Tasks

Hard Attention

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Focus 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Latent Alignment and Variational Attention

2018-07-10 · NeurIPS 2018 12 · Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo 외

Neural attention has become central to many state-of-the-art models in natural language processing and related domains. Attention networks are an easy-to-train and effective method for softly simulating alignment; howeve…

Hard AttentionMachine TranslationQuestion AnsweringTranslation+3

Reinforced Self-Attention Network: a Hybrid of Hard and Soft Attention for Sequence Modeling

2018-01-31 · Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang 외

Many natural language processing tasks solely rely on sparse dependencies between a few tokens in a sentence. Soft attention mechanisms show promising performance in modeling local/global dependencies by soft probabiliti…

Hard AttentionNatural Language InferenceSentence

Learning Visual Question Answering by Bootstrapping Hard Attention

2018-08-01 · ECCV 2018 9 · Mateusz Malinowski, Carl Doersch, Adam Santoro, Peter Battaglia

Attention mechanisms in biological perception are thought to select subsets of perceptual information for more sophisticated processing which would be prohibitive to perform on all sensory inputs. In computer vision, how…

Hard AttentionQuestion AnsweringVisual Question AnsweringVisual Question Answering (VQA)

Hard Non-Monotonic Attention for Character-Level Transduction

2018-08-29 · EMNLP 2018 10 · Shijie Wu, Pamela Shapiro, Ryan Cotterell

Character-level string-to-string transduction is an important component of various NLP tasks. The goal is to map an input string to an output string, where the strings may be of different lengths and have characters take…

Hard AttentionImage Captioning

Sigmoid Attention as a Better Substrate for Learned KV Cache Eviction

2026-08-24 · Isaac, Li arxiv

Learned KV-cache eviction often faces a soft-to-hard mismatch: during training, differentiable gates typically attenuate token contributions, whereas inference saves memory only when KV entries are physically removed. We…