Sparse Sinkhorn Attention
Paper · 2020 · Yi Tay, Dara Bahri, Yang Liu et al.
Summary
A word near the end of a long passage may depend on something much earlier. A Transformer’s attention layer can make that connection directly by comparing every position with every other position, but the memory needed for those comparisons grows quadratically with sequence length. Restricting each position to a fixed window saves memory and also removes direct access to anything outside that window. Sparse Sinkhorn Attention asks whether the contents of the sequence can help decide which distant positions should share a window.
The authors divide the sequence into blocks of consecutive tokens. A small network reads a summary of each block and predicts how the blocks should be rearranged. A procedure called Sinkhorn balancing turns these predictions into a matrix that behaves like a soft permutation. The same rearrangement is then applied to the keys and values, which carry the information that attention can consult and retrieve. The queries remain in their original order. A query can therefore compare itself with a block that now falls inside its computational window even though the block began far away. The rearrangement is differentiable, so the task used to train the Transformer also trains the sorting network.
The paper adapts this idea to different kinds of sequence processing. For prediction from left to right, it restricts both the information used to choose a rearrangement and the positions that attention may read. For encoding, where the whole input is available, a variant called SortCut places blocks in a learned order and keeps only a budgeted prefix of the reordered keys and values. The authors also test a mixture that adds the output of dense attention to the sparse output. That variant retains the quadratic cost of the dense branch.
The experiments cover integer sorting, prediction of text, pixel-by-pixel image generation, sentiment classification, and natural language inference. Sparse Sinkhorn Attention beats the tested local and Sparse Transformer baselines in the text prediction experiments, while the comparison with dense attention depends on the setting. Dense attention does better on character-level text prediction and on the larger sub-word configuration. The mixture leads the reported text prediction comparisons, while ordinary Sparse Sinkhorn Attention leads on pixel-wise image generation. SortCut stays close to the other attention variants on sentiment classification, and both Sinkhorn variants beat dense attention in the paper’s inference setup. In the authors’ analysis of sub-word prediction, a simple linear sorter works well, and the preferred settings use a soft rearrangement with relatively few balancing passes.
Deep dive: Sparse Sinkhorn Attention
Sparse Sinkhorn Attention learns to rearrange blocks of a sequence so that local attention windows can reach distant inputs at lower memory cost. · about 40 minutes to read
The problem and its context
What a fixed window leaves out
In self-attention, a sequence supplies both the positions seeking information and the positions offering it. Each position is represented by a vector. The attention layer uses a query vector to express what a position can use, a key vector to score a possible source, and a value vector to carry the information retrieved from that source. A dot product compares the query with the key. The resulting scores determine how strongly the available values contribute to the output at the query position. Dense self-attention gives every query a direct comparison with every eligible key, as in Attention Is All You Need.
For a long input, the score matrix has a dimension for the queries and another for the keys. Both dimensions grow with the input. The resulting memory cost is a concern even when many of the candidate positions turn out to be of little use. The authors also raise a modeling question. If a long input contains irrelevant material, requiring attention to consider a smaller set of sources may favor useful behavior. They treat that possibility as a reason to investigate sparse attention alongside the resource savings.
Local attention provides a direct way to restrict the candidate set. The paper traces this idea to work on machine translation and discusses versions that divide the input into windows or blocks. In a block-local layer, a query is compared with keys in its own block. These comparisons are easy to organize, and their extent is determined by the block size. The restriction also means that a distant source is unavailable to that query in that layer. A word immediately across a block boundary can be excluded for the same reason as a word much farther away. Which pairs can interact depends on the partition established before the input is read. Effective Approaches to Attention-based Neural Machine Translation.
The paper takes that fixed partition as a starting point. It keeps blocks of consecutive positions as the units of computation and changes which source block occupies a given window. If the rearrangement brings a distant source into range, the layer can use its original token-level information without constructing scores against the entire sequence. Working with blocks also preserves the internal order and grouping of neighboring tokens. The choice matters because the purpose of the rearrangement is to recover some long-distance access while still processing short contiguous stretches of the original input.
The paper calls the resulting reach quasi-global. Blocks can be drawn from across an input during encoding, so the possible source for a window has a broad range. The number of sources directly available to any query remains limited. Dense attention and this learned window therefore offer different kinds of access. Dense attention scores individual query–key pairs across the eligible context. Sparse Sinkhorn Attention first makes a coarser assignment from the input and then spends its token-level computation inside the resulting windows.
Other ways to reach beyond the window
Sparse Transformer also organizes attention around a limited set of comparisons. As described by the authors, it combines local connections with strided ones, and different attention heads can use different patterns. A stride lets some queries reach distant positions according to a prescribed arrangement. Sparse Sinkhorn Attention instead predicts assignments from the current sequence. The paper also distinguishes the computation an attention pattern calls for from the machinery needed to run it efficiently. It describes Sparse Transformer as relying on specialized GPU kernels for efficient execution, with consequences for portability to TPU environments. Generating Long Sequences with Sparse Transformers.
The paper discusses several proposals that expand reach through other mechanisms. Reformer uses locality-sensitive hashing to organize attention, bringing positions together through hashing as part of its approach to reducing memory. Transformer-XL carries cached hidden states across segments through recurrence. That line of work motivates the paper’s mention of compressing older sequence information. These approaches address access to context through different objects: a hash assignment, stored states, or compressed representations of earlier material. The Sinkhorn proposal operates on a rearrangement of the current sequence’s blocks. Reformer, Compressive Transformers.
Star Transformer offers another example in the paper’s account. It replaces dense connections with a star-shaped arrangement that includes a shared relay. A position can receive indirectly mediated information through the relay. The authors note that the setup supports linear-time computation but complicates causal masking, which restricts access to information from the future during decoding. That issue matters to their own design. They want to use learned rearrangements both when encoding an entire input and when generating an output from left to right.
A separate line of earlier work concerns the attention weights themselves. Hard attention restricts the sources on which a prediction can depend. The authors discuss this as a possible way to filter noisy input and point to comparisons with sparse output selection, including Sparsemax and mixtures that select among experts. Sparse Sinkhorn Attention puts much of the selection before token-level scoring. Its ordinary windowed form limits the edges for which scores are computed, even if the retained scores have soft weights. SortCut goes further by removing a portion of the rearranged source sequence before attention reads it. Show, Attend and Tell.
Why learn the rearrangement through the task?
An ordinary permutation selects a destination for every block. Such a choice can change abruptly when two candidate assignments exchange rank. The authors wanted a sorting operation whose parameters could receive gradients during training. Their starting point is Sinkhorn ranking, which repeatedly rescales the rows and columns of a matrix. Earlier work discussed in the paper uses Sinkhorn balancing and Gumbel noise to learn latent permutations. The new application is to put this operation inside an attention layer, where it determines the sources available to local computation. Ranking via Sinkhorn Propagation, Categorical Reparameterization with Gumbel-Softmax.
Here, sorting has a different meaning from arranging integers in ascending order. The desired order of the blocks is latent. The sorter receives no target rank for a paragraph, a stretch of characters, or a group of pixels. Its output is judged indirectly through the prediction made by the Transformer. For integer sorting, the required output sequence does have a known order, but that order supervises the sequence-to-sequence task. A useful hidden arrangement of the input blocks can differ from the order of the integers in the final output. The distinction allows the same mechanism to be used for tasks with no natural target ordering of their inputs.
The method, step by step
From input blocks to attention windows
Consider a query in a late block of a sequence. Under fixed block-local attention, its candidates come from that same part of the input. Under Sparse Sinkhorn Attention, a sorting network first produces scores for moving blocks around. The attention layer leaves the query where it is and applies the predicted arrangement to the keys and values. The query can now see whichever source arrived in its window. When the assignment is soft, that source can be a weighted combination of blocks.
The sorter works from a pooled representation of each block, while attention still works with individual token vectors. Pooling tells the sorter something about a block’s contents. The operation that actually moves a block uses the full ordered array of its token representations. This distinction explains how a coarse routing decision can preserve information at a finer resolution for the attention computation.
From sequence blocks to sparse attention outputs
The steps in order.
Summarizing a block and scoring its assignments
Let the input comprise ℓ token vectors of width d. The paper’s symbols for block length vary, so the equations below use B for the length of a block and Nᵦ for the number of blocks. The partition is described in terms of equal blocks. Each block contributes a row to the sorter’s input. The first operation compresses its token vectors by summation.
X′ = ψₚ(X)
X is the input array of token vectors. The function ψₚ pools the tokens in each block, and X′ is the resulting array with Nᵦ rows and d features per row. The prime distinguishes the pooled array from the full sequence. In the ordinary encoding variant, pooling is a sum over the tokens belonging to that block.
X′ᵢ = ∑ⱼ∈𝓑ᵢ Xⱼ
X′ᵢ is the summary of block i. The set 𝓑ᵢ contains the token positions in that block, j runs over those positions, and Xⱼ is the vector for token j. The summation adds vectors feature by feature. Expressing the bounds through block membership captures the operation described by the authors and gives each token a single block. Internal token order is available to the attention layer through the full vectors, even though the sum used by the sorter discards that order within the block.
Rᵢ = P(X′ᵢ)
Rᵢ is the row of assignment scores predicted from block i. P is a trainable function with a d-dimensional input and Nᵦ outputs. X′ᵢ is the vector obtained by pooling the block. Each entry of Rᵢ scores an assignment involving another block position. Collecting the rows produces the square score array R. A row on its own can favor the same position that another row favors. The balancing stage gives the rows and columns a shared allocation constraint.
The paper offers a feed-forward network with rectified linear activations as an example of P. A rectified linear activation preserves a positive input and maps a negative input to zero. Using the stated output width of the sorter, the example can be written as follows.
P(u) = σ(Wᵦ σ(Wₚu + bₚ) + bᵦ)
The vector u is a block summary, P is the scoring function, and σ is the rectified linear activation. Wₚ and bₚ are the first layer’s weights and bias, and Wᵦ and bᵦ are the output layer’s weights and bias. The first affine operation maps between d-dimensional vectors. The last produces the Nᵦ scores required for block assignment. The printed dimensions for the output weight use the paper’s block-length symbol where the description of P requires the number of block positions. The functional requirement is that the score array have a row and a column for each block. The authors also test simpler choices for P.
Turning scores into a soft permutation
A permutation matrix has a single entry equal to 1 in each row and column, with its other entries equal to 0. Multiplying by such a matrix moves a block intact to its assigned row. A doubly stochastic matrix relaxes the entry constraint. Its entries are non-negative and each row and column still sums to 1. It can distribute a row’s weight across several columns, so multiplication can blend blocks. In a square array the collection of doubly stochastic matrices is called the Birkhoff polytope. A doubly stochastic matrix is a convex combination of permutation matrices. That is the direction of the relationship that explains the relaxation.
Sinkhorn balancing begins by exponentiating the score array. It then alternates row and column normalization. Starting with positive entries enables each normalization to divide by a positive sum in the ordinary, unmasked setting.
S⁰(R) = exp(R)
R is the square score matrix and S⁰(R) is its state before the alternating passes. The exponential exp is applied separately to each entry. The superscript 0 labels the initialization. It does not indicate exponentiation of the entire matrix.
Fᵣ(Z)ᵢⱼ = Zᵢⱼ / ∑ⱼ′ Zᵢⱼ′
Z is a positive matrix at the row-normalization step. Fᵣ denotes row normalization. The indices i and j name the entry’s row and column, and j′ ranges across the columns of row i. Each numerator is divided by the sum for its own row.
F꜀(Z)ᵢⱼ = Zᵢⱼ / ∑ᵢ′ Zᵢ′ⱼ
F꜀ denotes column normalization of the matrix Z. The numerator is its entry at row i and column j. The index i′ ranges across all rows of column j, and the denominator is that column’s sum. In an alternating pass, the input to this operation is the matrix that has just been normalized by rows.
Sᵏ(R) = F꜀(Fᵣ(Sᵏ⁻¹(R)))
Sᵏ(R) denotes the state after pass k, and Sᵏ⁻¹(R) is the previous state. Fᵣ and F꜀ are the row and column operations, respectively. Each operation imposes its own sum constraint. Because it changes entries shared with the other operation, a column pass can move row sums away from their targets. Repeating the pair of operations brings both sets of sums toward the desired values.
S(R) = limₖ→∞ Sᵏ(R)
S(R) is the limiting balanced assignment, k is the pass index, and limₖ→∞ denotes the limit as that index grows without bound. The paper invokes a support condition for convergence and starts ordinary balancing from exponentiated scores. The implementation runs a finite, user-chosen number of passes, written Nₖ in this part of the paper. Its output is therefore an approximation to the limiting assignment. The finite series of operations can be differentiated along with the rest of the layer.
The authors perform the normalization in the log domain for numerical stability. Dividing a positive entry by a sum corresponds to subtracting the logarithm of that sum from the entry’s logarithm. Written with explicit summation indices, the row operation has the following form.
L′ᵢⱼ = Lᵢⱼ − log(∑ⱼ′ exp(Lᵢⱼ′))
L is the input matrix of log entries and L′ is the matrix after the row step. The entry indices are i and j, and j′ runs over columns in row i. The functions exp and log convert between entries and their logarithms. The same logarithm of the row sum is subtracted across that row.
L′ᵢⱼ = Lᵢⱼ − log(∑ᵢ′ exp(Lᵢ′ⱼ))
In this column version, L is the current matrix of log entries and L′ is the result of the column step. The indices i and j again select an entry, and i′ runs over rows in column j. The subtraction uses the logarithm of the sum of the positive entries in that column. These indexed expressions describe the intended row and column operations without relying on the orientation of the all-ones vectors used to write them in matrix form.
Adding noise and controlling how sharp the assignment is
The paper uses a Gumbel perturbation in the sorter. The perturbation changes the scores before balancing, while a temperature determines how strongly differences between perturbed scores affect the result. The authors draw standard Gumbel noise independently for the entries. The operation can be written using a separate symbol for the resulting assignment, since the paper uses S for both the noisy operator and the balancing inside it.
T = S((R + ε) / τ)
T is the assignment applied to a blocked sequence, S is the Sinkhorn balancing operation evaluated with the chosen number of passes, and R is the input score matrix. The matrix ε contains the Gumbel noise, and τ is the temperature. The division applies to every perturbed score. Lower temperatures sharpen the assignment toward the behavior of a discrete permutation. A softer assignment can preserve useful contributions from multiple source blocks. The temperature controls the assignment among blocks, whereas the softmax later in the layer controls the weighting of values seen by each query.
Rearranging full blocks and computing attention
To apply the assignment, the layer first reshapes the token sequence so that each row contains a complete block. Each row of that array includes all B token vectors of the block, in order. Multiplication then acts across blocks and leaves the within-block coordinate intact. The result is unfolded into a token sequence for attention.
Xₛ = U(T B(X))
Xₛ is the rearranged sequence. In this equation, B(·) is a reshaping function, while the standalone B used for shapes denotes block length. B(X) has Nᵦ rows of width B times d. T is the balanced assignment, with a row for the resulting block slot and a column for the source in this multiplication convention. U is the reverse reshaping operation. A permutation puts a single source in each slot. A soft assignment combines the vectors at corresponding offsets in its source blocks. The paper also uses R for the matrix in this multiplication after balancing. Using T here distinguishes it from the scores before balancing.
The attention layer forms query, key, and value arrays. It applies the same sorting operator to keys and values so that the source represented by a key is paired with the corresponding value. The queries keep their original indexing. The paper writes the ordinary block-local score as an additional term along with the score using a sorted key. Its prose specifies that only entries within permitted windows are computed. Let g identify the local window for a position in the query array or the rearranged source array.
Aᵢⱼ = Qᵢ ψₛ(K)ⱼᵀ + Qᵢ Kⱼᵀ, for g(i) = g(j)
Aᵢⱼ is the attention score for query position i and eligible source slot j. Qᵢ is the query vector, Kⱼ is the original key at slot j, and ψₛ(K)ⱼ is the key in the same slot after block sorting. The superscript ᵀ transposes a vector for the dot product. The condition involving g specifies the window. The paper’s printed index test uses a length symbol already assigned to the entire sequence elsewhere. The block-based interpretation follows the description of the implemented computation. Entries outside these windows are excluded from normalization. A literal zero logit at every excluded entry in a dense softmax would give those entries positive weight.
Y = Softmax(A) ψₛ(V)
Y is the output array, A is the array of permitted scores, and Softmax normalizes the scores over eligible source slots for each query. V contains the values, and ψₛ(V) uses the same block assignment as ψₛ(K). Multiplying by the resulting values gives a weighted combination at each query position. In the equation as written by the authors, the local dot product contributes to the score, and the final value array is the rearranged one.
The same structure extends to multiple attention heads. A head is a parallel attention computation that can learn its own way of reading the input. In this implementation each head learns its own sorter. Heads therefore have the capacity to give a query different rearranged neighborhoods even though the original sequence has a common partition.
Yɢ = Fₕ([Y₁ ⋯ Yₙₕ])
Yɢ is the combined multi-head output. Y₁ through Yₙₕ are the head outputs, nₕ is the number of heads, and the brackets concatenate their features. Fₕ is a learned linear projection from the concatenated width to the output width. The head outputs enter this projection at the same query positions, which is possible because rearrangement is applied on the source side.
Preventing a decoder from reading the future
In an encoder that has the entire input, the block sorter may use any of that input. Autoregressive decoding has a different condition. Predictions are made in order, and information from later positions must be unavailable to an earlier prediction. The authors identify several points where a content-dependent rearrangement could violate that condition. Moving a later block into an earlier slot could expose its contents. The scores that decide where blocks go could also depend on future embeddings, even if the later values are eventually excluded. The balancing operation is another possible route because a row or column sum can combine scores from several positions.
For content-based scoring, the causal sorter uses a cumulative sum of embeddings at a block’s entry instead of a sum over the full block. The paper describes the first token of a block as its representative position for this operation. A prefix formulation makes the indexing convention explicit.
X′ᵢ = ∑ⱼ≤sᵢ Xⱼ
X′ᵢ is the causal summary used for block i. The index sᵢ denotes the first token position of that block, j ranges over input positions up through sᵢ, and Xⱼ is the embedding at position j. R is then obtained by applying the same trainable scoring function P to these prefix summaries. Each block can carry information accumulated before it, while its summary excludes the later tokens within it and the blocks that follow.
Causal Sinkhorn balancing also uses a triangular mask during normalization. The authors give the following rule in their masking coordinates.
Mᵢⱼ = 1 if j ≥ i, and 0 otherwise
Mᵢⱼ is the mask entry at indices i and j. The values 1 and 0 identify retained and excluded entries, respectively, and ≥ is the ordering test in the paper’s mask notation. The mask is used in the row and column normalizers to exclude contributions from the future. In the log-domain interpretation, the normalizing sums collect positive contributions only from eligible entries. The row and column indices in the display refer to the assignment array. The causal requirement on tokens is stated separately in terms of their original order.
The paper explicitly masks a source block if it is moved earlier than its original position. A block with original index i cannot become readable at a position p earlier than i merely because the sorting network assigned it to that slot. Consequently, some assignments can leave parts of a window masked. The authors argue that this favors useful moves between nearby blocks and gives the sorting network some influence over which material remains available. These restrictions apply to the attention computation itself as well as to the prediction of the assignment. Masking the final scores alone would leave a route for future information through the choice of sorting weights.
The integer experiment uses the sparse mechanism on both sides of a sequence-to-sequence Transformer. The decoder must produce the ordered output under the causal constraint, while the encoder can inspect the complete input it was asked to sort. The same distinction explains why the text prediction and image generation experiments need a decoding-compatible mechanism and why the classification experiments are a setting for testing more aggressive truncation. Sequence to Sequence Learning with Neural Networks.
Cutting the source sequence or adding a dense branch
SortCut uses the predicted arrangement to decide which source blocks survive a budget. After sorting, it keeps a prefix of the reordered keys and the matching prefix of the values. It then lets the queries attend to this shortened source. Moving a useful block toward the front can therefore determine whether its representations enter the attention computation at all. Merely giving a block a small attention weight would still require the layer to score it. Truncation removes that work for the discarded part of the source.
Y = Softmax(Q (ψₛ(K)[:n])ᵀ) ψₛ(V)[:n]
Y is the resulting output, Q contains all query vectors, K and V are the keys and values, and ψₛ is the shared sorting operation. The notation [:n] retains the prefix specified by the budget n, and ᵀ transposes the retained key array for comparison with the queries. Softmax distributes each query’s weight over this reduced source set. The authors describe the selection as a hard cut over reordered blocks. The underlying assignment can still be soft before the cut. A retained block slot may therefore contain contributions from more than one original block.
The cut is straightforward for encoding, because the input is already assembled when the sorter chooses what to retain. The authors qualify its use during autoregressive decoding. A cut of this type can be used there only if self-attention is explicitly computed again at every step. The usual SortCut experiment is consequently an encoder experiment. The need to refresh the choice as the prefix changes is separate from limiting the number of sources read by an individual query.
The mixture variant serves a different purpose. It adds a full dot-product attention branch to the sparse sorted branch. Each branch produces an output at the original query positions, and the two outputs are added.
Y = Softmax(A) ψₛ(V) + Softmax(QKᵀ) V
Y is the mixture output, A contains the sparse branch’s scores, and ψₛ(V) is the rearranged value array. QKᵀ is the dense array of query–key dot products, using Q for queries, K for keys, and ᵀ for transpose. V is the original value array. Each Softmax normalizes its own branch’s scores over the appropriate sources. The addition lets the output depend on both the learned arrangement and the unrestricted dot-product branch. It also restores quadratic attention complexity.
Training and the accounting for memory
The sorting network is trained jointly with the Transformer on the task at hand. The block assignments influence the attention output, that output influences the prediction, and gradients pass back through the rearrangement and the finite balancing passes. The paper uses Tensor2Tensor as the experimental framework. Across experiments, its general tuning grid for the Gumbel Sinkhorn temperature is 0.25, 0.50, 0.75, and 1.0. The candidate numbers of balancing passes are 2, 5, 10, and 20. The block size depends on the task and its sequence lengths. The task-specific settings matter because the sorter’s assignment array and the attention layer’s local windows respond differently to the choice of partition. Tensor2Tensor.
The paper gives the following decomposition in its introduction for the memory complexity of ordinary Sparse Sinkhorn Attention.
O(B² + Nᵦ²)
O denotes the asymptotic order of growth under the stated accounting, B is the block length, and Nᵦ is the number of blocks. The B² term is associated with attention comparisons within a block window, and Nᵦ² is associated with the square block assignment array. The partition relates those two quantities to the sequence length as follows.
B = ℓ / Nᵦ
B is the block length, ℓ is the token sequence length, and Nᵦ is the number of equal blocks. The comparison in the introduction is with dense attention’s O(ℓ²) memory, where ℓ again denotes the sequence length. The paper gives an illustrative memory-saving factor of 240 times for ℓ = 1024 and Nᵦ = 64. It presents this as a complexity illustration. The dedicated complexity section repeats the expression with inconsistent symbols, so the introductory formula and the shapes of the two arrays are the clearest statement of the intended factorization.
For SortCut, the dedicated complexity section includes both the attention cost after truncation and the cost of the full block assignment.
O(ℓ Nₖ + Nᵦ²)
O again denotes the order of memory growth. The variable ℓ is the length of the query sequence, Nₖ is the retained source budget in this complexity expression, and Nᵦ is the number of blocks in the assignment array. Here Nₖ describes the truncation budget, while the same notation elsewhere describes the number of balancing passes. The paper uses n in the truncation equation to refer to the budget. Attention can scale linearly in the sequence length when its retained source budget is fixed. The full expression also requires the block assignment term to stay within that growth bound before the total can be described as linear.
Experiments and results
The experiments put the attention mechanism in settings with distinct information needs. Integer sorting requires a sequence-to-sequence output whose correctness depends on the whole input. Text and image prediction test decoding under a causal restriction. Sentiment classification and natural language inference test encoders, including the SortCut variant. The paper reports the ordering of systems across these tasks. Numeric entries are absent from the main results tables, so most comparisons can be stated only in direction, alongside the numerical settings that define them. The sub-word discussion also gives a range for the advantage over local attention.
Integer sorting and generalization to longer inputs
The algorithmic sorting task comes from Tensor2Tensor, where it is named algorithmic_sort_problem. Each input is a sequence of integers, and the target is the corresponding sorted sequence. The authors train on inputs of length 256 and describe evaluating on length 512 to test whether the learned behavior transfers to longer sequences. The dataset has 100K training examples and 1000 test examples. All compared Transformers are trained for 200k steps with the base settings. Sparse Sinkhorn Attention is used in the encoder and decoder of the proposed system.
The authors assess the outputs by exact match and edit distance. Exact match counts test sequences for which the entire result is correct. Edit distance gives a measure of how far an output is from its correct counterpart, with lower values preferred. The two measurements ask different questions. A sequence with a small number of mistakes still fails exact match, while edit distance can distinguish that output from one that is far from the required order.
The comparison includes a dense Transformer, a block-local Transformer, and Sparse Transformer. The authors report that the Sinkhorn Transformer leads the comparison. Sparse Transformer also beats the dense variant, while fixed local attention places last. The result is consistent with the need to connect information across different parts of the input and with the usefulness of a sparse pattern for this particular task. It gives no measurement of what the sorter knew about the target order at any intermediate layer. The sorting table caption labels sequences of length 256, whereas the experimental setup describes the length-512 test. The paper reports the result ordering without making the connection between that caption and the longer test explicit.
Subword prediction on LM1B
The text prediction experiments use the One Billion Word Benchmark, referred to as LM1B. One experiment predicts word pieces, which are units produced by splitting text into vocabulary items that can be smaller than whole words. The setup uses 32k word pieces and shuffled sentences. The authors use packed batches in Tensor2Tensor with the configurations named lmx_base and lmx_h2k_f8k. The table caption identifies the Base setting as 50M parameters and the Big setting as 430M. Training runs for 300K steps on 16 TPU V2 chips.
The baseline comparison includes dense attention, fixed local attention, and Sparse Transformer. For Sinkhorn and local attention, the authors vary the block length over 16, 32, and 64. Their Sparse Transformer implementation uses the fixed attention scheme with a block length of 64 and stride 8. It simulates the restricted pattern using masking in Tensor2Tensor. Consequently, the baseline tests the effect of that attention pattern on prediction under this setup. The authors do not run the specialized CUDA implementation in the TPU comparison.
Perplexity is the main reported metric. A lower value corresponds to better prediction of the observed text. At both parameter scales, the sparse Sinkhorn variant beats the tested local-attention configurations and Sparse Transformer. The paper describes the Sinkhorn advantage over local attention at each tested block setting as 2-3 perplexity points. For the Base configuration, Sinkhorn also beats the dense Transformer at block lengths 32 and 64 and stays competitive at 16. In the Big configuration, dense attention retains the advantage over sparse Sinkhorn. The mixture gives the best result in the sub-word comparison.
The separate published-results comparison is on per-word perplexity. The paper describes its best result as competitive with High Budget MoE and Evolved Transformer. It falls short of Mesh-TensorFlow, which the authors describe as using 5 billion parameters in the comparison. The authors distinguish works reporting per-word perplexity from those reporting per-token perplexity. That distinction matters because the unit of prediction changes what the perplexity represents. The specialized comparison is evidence about the reported benchmark score, while the efficiency argument relies on the sparse layer’s structure. Mesh-TensorFlow.
Character prediction on LM1B
The character-level version uses sequences of up to 1024 characters and a fixed block length of 128. Breaking the prediction into individual characters gives the attention layer a longer sequence of positions to work through. The authors report their metric as bytes per character. Both Base and Big compare the sparse Sinkhorn variant with local attention, Sparse Transformer, and the dense Transformer, with a separate mixture comparison.
Sparse Sinkhorn Attention improves on both efficient baselines at both sizes. The authors identify local attention as particularly weak and suggest that its restricted context contributes to that result. Dense attention gives a better character prediction score than any of the efficient alternatives. The Sinkhorn mixture improves on dense attention at both sizes and leads the comparison. These observations distinguish the roles of the variants. The sparse configuration gives a better result than the other sparsification patterns tested, while the mixture shows the result of retaining full attention and adding the learned arrangement.
The following chart uses numerical LM1B settings reported in the paper. Its metric is the count of balancing passes, a measure of work inside the sorter. The starred setting is the lower end of the range the authors favor on perplexity. The direction in the chart applies to the cost of balancing, and the chart does not assign perplexity scores to those settings.
Balancing-pass counts for the Sparse Sinkhorn Attention tuning settings on LM1B
The lower end of the favored range uses fewer balancing passes than the other favored setting.
The numbers
| System or setting | balancing passes |
|---|---|
| Lower tuning setting | 2 |
| Sinkhorn lower favored setting (this paper) | 5 |
| Sinkhorn upper favored setting | 10 |
| Upper tuning setting | 20 |
Pixel-by-pixel generation on CIFAR-10
In the image experiment, the task is to generate an image as a sequence of predictions, without an external conditioning input. The authors use CIFAR-10 and flatten the images into what the paper calls sequences of 3076 bits. The sequence presentation requires a causal attention mechanism. The test is about predicting the next component from the prefix of the flattened image, so earlier and later positions are defined by that sequence order. The compared systems use the base configuration, train for 500K steps, and use a batch size of 1.
The metric is described as bytes per dimension, abbreviated Bpd. Ordinary Sinkhorn gives the best reported result. Local attention is the weakest baseline, and Sinkhorn also improves on Sparse Transformer when their local window is held the same. The latter comparison narrows what differs between the methods. The prescribed sparse pattern and the learned block arrangement both extend reach, while the extent of the local window is controlled. The comparison concerns prediction quality under the tested configurations.
Adding the dense branch makes the result worse than ordinary Sinkhorn in this experiment. The authors suggest that limiting the reachable context in a learned way may be useful for the image task. This result also supplies a boundary for the mixture’s wins on LM1B. The experiment shows that adding the dense branch can change performance in either direction across the paper’s tasks. It does not identify the content or original distance of the source blocks responsible for the image result.
Sentiment classification and natural language inference
The sentiment experiments use IMDb and the Stanford Sentiment Treebank, referred to as SST. The encoders operate on words or characters, with maximum lengths of 512 for word inputs and 2048 for character inputs. The authors use a tiny Transformer with 2 layers and keep its settings the same between the dense and Sinkhorn versions. Token embeddings start from random initialization. Training runs for 15,000 steps for IMDb and SST. The classification experiments use batches of 4096 tokens and run on a single V100 GPU. Learning Word Vectors for Sentiment Analysis, Recursive Deep Models for Semantic Compositionality.
The ordinary Sinkhorn encoder is competitive with or improves on dense attention across the sentiment conditions, according to the authors. SortCut gives similar performance to both ordinary Sinkhorn and the dense baseline across the tested settings. Since these are encoding tasks, the cut is allowed to use a rearrangement chosen with access to the input as a whole. The reported outcome supports the feasibility of shortening the source used by attention in these configurations. The prose leaves the per-dataset classification scores and split details unspecified.
Natural language inference uses Stanford NLI and MultiNLI, identified in the results as SNLI and MNLI. The task concerns the relation between a premise and a hypothesis. In the Tensor2Tensor setup, the authors concatenate the two texts into a single sequence and feed that sequence to the tiny Transformer. The embeddings again start randomly, and training runs for 500,000 steps. The initial concatenation means that the encoder must process evidence from both texts within the combined sequence. Stanford NLI, MultiNLI.
Both ordinary Sinkhorn and SortCut outperform the dense Transformer under that setup. The result gives a case in which truncating the rearranged source can coexist with stronger classification performance than the dense baseline achieves. The authors explicitly distinguish their experimental protocol from the standard use of the inference datasets. The comparison is therefore between attention mechanisms inside the paper’s common setup. Its ordering cannot be transferred directly to systems trained with a different protocol.
What the ablations show
A simple scoring function suffices in the tested setting
The main ablation study is on LM1B with block length 32. It varies the function that produces the sorting scores, tests tying keys to values, and tests omitting Sinkhorn normalization. The paper compares the variants using perplexity, with lower scores preferred. The best scoring function in the reported comparison is a linear layer. That result matters because the proposed routing mechanism has two distinguishable components: the scoring function assigns preferences, then the balancing procedure couples those preferences across blocks. The linear variant shows that the scorer can be simple in this setting.
The experiment addresses the scorer’s complexity within one attention design. A linear layer can assign a different coefficient to each feature of a block summary when scoring each destination. It can therefore give different assignments to different inputs. Sinkhorn balancing operates on those preferences across the full score array. The finding concerns the tested LM1B configuration. The paper does not establish that the same scorer leads on image generation or for every block size. It also gives no numerical margins in the description of this comparison.
The study separately examines shared parameters for keys and values. The proposed attention layer already uses the same sorting matrix on those two arrays. Sharing the sorter keeps the key at a source slot aligned with the value that will be read from that slot. Sharing the key and value transformations imposes an additional constraint on what they represent. The authors observe that tying them generally hurts the tested result. That observation supports keeping the key used for comparison and the value used for retrieval as distinct representations, even when their block arrangement is coupled.
Balancing matters, and the favored assignments are soft
The authors set the number of passes to 0 to test the sorting operation without Sinkhorn normalization. That condition performs worst among the reported variants in the ablation. The result points to a benefit from coordinating the assignment through row and column balancing, beyond merely producing block-dependent scores. It does not isolate which normalization axis contributes more or show that the matrices must reach exact doubly stochastic form. The practical experiment uses a finite sequence of passes, and its success criterion is perplexity.
For the temperature study, the authors vary the setting while keeping the other choices fixed. The preferred temperature on LM1B is 0.75. Their overall observation is that softer assignments perform better than assignments pushed towards hard permutations. This result gives the soft relaxation a role beyond providing gradients. Within the compared conditions, preserving weight across several possible sources can accompany better prediction. The study does not track individual block assignments closely enough to establish which mixtures are helpful, or whether a particular task would favor a different degree of sharpness.
The number-of-passes study likewise favors a finite, modest setting. The authors report a favorable range of 5-10 passes. Omitting sorting gives very poor prediction in this analysis, and going beyond 20 passes appears to worsen perplexity. The comparison separates the computation’s mathematical stopping goal from the prediction goal. Repeated normalization aims to satisfy the row and column sum constraints. The useful setting is judged by how the resulting attention performs. The study measures the latter and leaves the exact relationship between balance residuals and prediction error unresolved.
Comparisons that help interpret the mechanism
Some task comparisons complement the dedicated ablations. On sub-word LM1B, testing ordinary Sinkhorn and local attention at the same block lengths helps distinguish the effects of block size and learned rearrangement. If the result came only from providing larger raw windows, the comparisons at a fixed block length would offer little reason to prefer the sorting mechanism. The positive comparison at each reported length shows that the source assignment can matter even when both systems start from the same block size. It does not separate the full mechanism into effects from noise, balancing, and the extra local score term.
The mixture and ordinary sparse versions test the effect of retaining a dense path alongside the sorted one. On both language prediction tasks, the mixture is strongest in the reported comparisons. On pixel-wise generation, ordinary Sinkhorn leads the mixture. These are direct comparisons of configurations whose accessible context differs substantially. The language results support the authors’ hypothesis that the sorted branch can contribute alongside full attention. The image result supports investigating a restricted view as part of the design for that task. It gives no standalone estimate of the benefit of each individual block choice.
SortCut supplies a different comparison. It changes how many keys and values reach the final attention calculation and how they are selected. The similarity of the sentiment results and the favorable inference comparison show that the cut can preserve task performance under the tested encoder setups. A fixed cut in original order or another source-selection scheme would be needed to isolate the advantage of the learned ordering at the same budget. The reported evidence concerns SortCut as an integrated method.
Limitations
Limits the authors state
The authors qualify the computational benefit of the mixture directly. It includes dense self-attention, so its complexity returns to the quadratic form. Its wins on word-piece and character prediction cannot be used as the scores of the cheaper sparse architecture. The relevant quality comparison for that architecture is ordinary Sinkhorn versus the dense and efficient baselines. Those comparisons include losses to dense attention on character prediction and in the Big sub-word configuration.
The paper also confines ordinary use of SortCut to the encoder. A decoder using the same kind of dynamic cut must recompute self-attention at every timestep. That condition matters for a method intended to save work. The encoder classification comparisons establish how SortCut behaves when the input is available for a single content-based selection. They give no corresponding performance or cost result for the repeated computation required in decoding.
The authors note that their Sparse Transformer baseline is a simulation of its attention pattern using masks. They use that implementation to make the prediction comparison on their framework and hardware. Differences in the runtime or memory behavior of efficient kernels are a separate question. Similarly, the authors explicitly qualify the natural language inference comparisons because the protocol departs from standard use of the datasets. Their discussion of LM1B comparisons acknowledges that perplexity based on words and perplexity based on tokens are reported on different bases.
Limits of what the experiments establish
The complexity discussion describes the storage associated with the attention window and routing array. A complete layer also handles token vectors, multiple heads, and repeated normalization. How many windows are live at once depends on the implementation. The illustrated factor of 240 times is an analytical comparison for a specified partition. There is no matching measurement of peak memory or elapsed time attached to that example. The dedicated complexity section gives an expression for ordinary Sinkhorn with inconsistent terms, and the SortCut discussion retains a squared block-count term. Those details matter if the partition changes with sequence length. A linear budget for token attention does not on its own bound the cost of constructing every block assignment.
Balancing is justified through the behavior of the ordinary positive-matrix procedure. The decoder applies a mask and uses a finite number of passes. Its function in the paper is to restrict the inputs to normalization so that future positions cannot influence current outputs. The analysis does not supply an independent convergence study for the masked procedure. It also does not compare causal routing with several alternative causal assignment schemes under the same attention budget. The decoding experiments demonstrate the tested construction as a whole.
The routing operation offers a way for distant context to enter a local calculation. The experiments do not trace how often a distant source is chosen, the typical distance of chosen sources, or the proportion of an assignment that behaves like a single moved block. These questions are especially pertinent because the temperature ablation favors soft assignments. A query may receive a blend of representations occupying the same within-block offset, and a strong end-task score cannot tell how much of the gain came from any particular source. The evidence supports broader possible access and useful prediction behavior under sparsity. It provides little detail about the organization of the learned order itself.
Several comparisons are conditional on their training regimes. Shuffling the LM1B sentences defines the context that can be used in the text prediction benchmark. Flattening the images defines a different ordering problem from predicting text. The inference experiments concatenate two texts in a small encoder with randomly initialized embeddings. These choices make the broad evaluation possible, but they also leave each result tied to a particular representation of the input. A win on the sorting task or an encoder task does not establish the same ranking in long-document generation, other decoding regimes, or larger architectures.
The result descriptions give directional comparisons across a wide range of tasks, with limited numerical detail for most of them. In particular, the reported ordering does not yield per-split margins on the classification tasks, an effect size for the image comparison, or separate exact-match and edit-distance scores for each sorting system. The length discrepancy between the sorting setup and the table caption adds uncertainty about which condition the reported table describes. Claims about generalization are strongest at the level of the study design: the authors train at one specified length and describe testing at a longer one. The reported text does not support quantifying how much performance transfers.
What came after
Surveys and benchmarks widened the comparison
Subsequent citing work approaches the same problem from several directions. The scope of the survey Efficient Transformers places the sorting-based method within the broader effort to organize alternatives to dense attention. That framing matters to the interpretation of Sparse Sinkhorn Attention. The paper evaluates one way of controlling which pairs interact, alongside a few baselines on tasks chosen for the original study. A survey can treat learned block assignments as one design choice among methods that address the costs of long sequences. The citation establishes that the survey engages with the work at that broader level. Efficient Transformers: A Survey.
Long Range Arena takes the benchmark route for evaluation. Its stated purpose is to provide a benchmark for efficient Transformers. That is a different use of the research problem from the original paper’s task-by-task evaluation. In Sparse Sinkhorn Attention, a plausible advantage is that learned windows can bring distant sources into direct reach. A benchmark centered on long-range behavior makes that general question an explicit subject of comparison across approaches. The citation alone leaves open which Sparse Sinkhorn variants, if any, the benchmark runs and how they score. Long Range Arena.
BAMBOO also addresses assessment, with a benchmark framed around the capacity to handle long texts. The connection is the shared question of how a system uses an extended input. Sparse Sinkhorn Attention changes the information accessible to an individual layer, and a long-text benchmark asks how well complete systems perform when that broader capacity is needed. Those are complementary levels of analysis. A citation to the attention method establishes a link between the research questions while leaving the details of any implementation or comparison unspecified. BAMBOO.
Other architectures changed how positions exchange information
FNet addresses token mixing through Fourier transforms. Its title identifies a mechanism that differs from scoring and rearranging blocks for local attention. The shared problem is how positions in a sequence can exchange information without depending on the ordinary dense attention calculation. In Sparse Sinkhorn Attention, an assignment is learned from the block contents and determines the scope of token-level scoring. FNet presents token mixing itself as the operation to redesign. Its citation relates the work to the same efficiency discussion, without establishing reuse of Sinkhorn balancing. FNet.
Synthesizer revisits how self-attention is formed. That direction addresses a different stage of the computation. In the original Sinkhorn paper, learned sorting helps choose the source slots that a query will see, and query–key dot products still score the permitted comparisons. Work that rethinks self-attention can cite that approach as part of the exploration of which parts of standard attention can change. The stated scope gives no basis for identifying a shared sorting implementation. Synthesizer.
Random Feature Attention introduces random features into the study of attention. Its connection to Sparse Sinkhorn Attention is at the level of alternative attention computations. One method is described in terms of features, while the original paper reorganizes access to block sources before computing local scores. The Devil in Linear Transformer addresses linear Transformer computation, another approach to the costs that motivate sparse routing. Both works cite the original paper. Their titles identify distinct research directions and leave the details of the citations and any direct comparisons open. Random Feature Attention, The Devil in Linear Transformer.
MoBA has a closer structural connection in its stated subject, mixture of block attention for long contexts. Both studies make blocks central to the attention problem. The original paper’s specific operation is to learn a relaxed permutation, apply it to source blocks, and compute local comparisons in the resulting windows. A later block-attention architecture can revisit how blocks are selected or combined. The citation and title support that common framing. They do not establish that MoBA applies the original paper’s balancing, causal mask, or SortCut operation. MoBA.
Long-document work moved the question into particular tasks
Efficient Attentions for Long Document Summarization brings the efficiency question to text summarization. A long document gives an attention mechanism more material to organize, and summarization provides a task in which information from different parts of the document may matter. The link to Sparse Sinkhorn Attention lies in that problem of reaching relevant text with limited attention computation. The original paper studies sentiment and inference as encoder tasks, so the move to summarization shifts the task being used to investigate long-input efficiency. The citation does not identify which attention mechanisms the summarization study implements or compares. Efficient Attentions for Long Document Summarization.
LongT5 frames efficient treatment of long sequences as a text-to-text problem. That brings input processing and output generation into the same architectural question, an issue the original work addresses through separate encoding and causally restricted decoding variants. The relationship here is between the tasks and design constraints addressed by the papers. The cited work’s title does not identify a sorting-based transfer, establish an outcome for SortCut, or specify an evaluation against the Sinkhorn Transformer. LongT5.
ERNIE-Doc approaches the long-document problem through retrospective processing, as indicated by its stated scope. This makes the treatment of earlier context the point of connection. Sparse Sinkhorn Attention can move an eligible earlier block into a current window, subject to its causal restrictions when decoding. Retrospective long-document processing addresses access to earlier material at the document level. The citation relates these research aims without identifying a common block allocation procedure. ERNIE-Doc.
Work on retrieval and long context expands the question to include what information is brought into a context in the first place. Sparse Sinkhorn Attention starts from positions that are already represented inside its input. Its learned selection changes what a layer can read from that input. The stated scope of Retrieval meets Long Context connects context size to the separate problem of obtaining relevant material. This relationship follows from the topics of the works. The citation does not show that the retrieval study uses the proposed sorter. Retrieval meets Long Context.
Serving and reasoning supplied other measures of scale
The surveys on efficient inference and generative serving address broader levels of computation than the block attention layer alone. A Survey on Efficient Inference takes inference efficiency as its subject. Towards Efficient Generative Serving spans algorithms and systems in its stated scope. This broadening makes the original distinction between an attention operation’s analytical cost and the behavior of a complete implementation especially relevant. Sparse Sinkhorn Attention offers a factorization of the comparisons and tests its effect on task quality. A serving study can consider such layer choices in a larger account of the computation needed to generate outputs. The citing relationship does not specify how either survey assesses the method in practice. A Survey on Efficient Inference, Towards Efficient Generative Serving.
Barriers to Discrete Reasoning with Transformers surveys reasoning through depth, exactness, and bandwidth. Its stated scope gives a different perspective on a question that the original paper encounters in its integer sorting experiment: what connections are available when a task requires coordinated information across a sequence? The Sinkhorn mechanism changes which blocks exchange information directly. The reasoning survey places bandwidth among several dimensions along which such computational limits can be discussed. The citation links these concerns without giving a later exactness result for the original sorting experiment or a theoretical guarantee for its learned assignments. Barriers to Discrete Reasoning with Transformers.
Cite
Cite as Yi Tay, Dara Bahri, Yang Liu, Donald Metzler and Da-Cheng Juan. 2020. Sparse Sinkhorn Attention. arXiv (Cornell University).
@misc{tay2020sparse,
title = {{Sparse Sinkhorn Attention}},
author = {Yi Tay, Dara Bahri, Yang Liu, Donald Metzler and Da-Cheng Juan},
year = {2020},
doi = {10.48550/arxiv.2002.11296},
eprint = {2002.11296},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2002.11296}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/tay-2020-sparse-sinkhorn-attention/
References
- Adams, R. P. and Zemel, R. S. Ranking via sinkhorn propagation. arXiv preprint arXiv:1106.1925, 2011. our card
- Baevski, A. and Auli, M. Adaptive input representations for neural language modeling. arXiv preprint arXiv:1809.10853, 2018. our card
- Bowman, S. R., Angeli, G., Potts, C., and Manning, C. D. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326, 2015. our card
- Chelba, C., Mikolov, T., Schuster, M., Ge, Q., Brants, T., Koehn, P., and Robinson, T. One billion word benchmark for measuring progress in statistical language modeling. 2013. our card
- Child, R., Gray, S., Radford, A., and Sutskever, I. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. our card
- Dai, Z., Yang, Z., Yang, Y., Carbonell, J., Le, Q. V., and Salakhutdinov, R. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019. OpenAlex ↗ · Scholar ↗
- Guo, Q., Qiu, X., Liu, P., Shao, Y., Xue, X., and Zhang, Z. Star-transformer. arXiv preprint arXiv:1902.09113, 2019. OpenAlex ↗ · Scholar ↗
- Jang, E., Gu, S., and Poole, B. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. our card
- Kitaev, N., Kaiser, L., and Levskaya, A. Reformer: The efficient transformer. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=rkgNKkHtvB. our card
- Luong, M.-T., Pham, H., and Manning, C. D. Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025, 2015. our card
- Maas, A. L., Daly, R. E., Pham, P. T., Huang, D., Ng, A. Y., and Potts, C. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies-volume 1, pp. 142–150. Association for Computational Linguistics, 2011. our card
- Martins, A. and Astudillo, R. From softmax to sparsemax: A sparse model of attention and multi-label classification. In International Conference on Machine Learning, pp. 1614–1623, 2016. OpenAlex ↗ · Scholar ↗
- Mena, G., Belanger, D., Linderman, S., and Snoek, J. Learning latent permutations with gumbel-sinkhorn networks. arXiv preprint arXiv:1802.08665, 2018. OpenAlex ↗ · Scholar ↗
- Parmar, N., Vaswani, A., Uszkoreit, J., Kaiser, Ł., Shazeer, N., Ku, A., and Tran, D. Image transformer. arXiv preprint arXiv:1802.05751, 2018. OpenAlex ↗ · Scholar ↗
- Qiu, J., Ma, H., Levy, O., tau Yih, S. W., Wang, S., and Tang, J. Blockwise self-attention for long document understanding, 2020. URL https://openreview.net/forum?id=H1gpET4YDB. OpenAlex ↗ · Scholar ↗
- Rae, J. W., Potapenko, A., Jayakumar, S. M., Hillier, C., and Lillicrap, T. P. Compressive transformers for long-range sequence modelling. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=SylKikSYDH. our card
- Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q., Hinton, G., and Dean, J. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017. OpenAlex ↗ · Scholar ↗
- Shazeer, N., Cheng, Y., Parmar, N., Tran, D., Vaswani, A., Koanantakool, P., Hawkins, P., Lee, H., Hong, M., Young, C., et al. Mesh-tensorflow: Deep learning for supercomputers. In Advances in Neural Information Processing Systems, pp. 10414–10423, 2018. our card
- Shen, T., Zhou, T., Long, G., Jiang, J., Wang, S., and Zhang, C. Reinforced self-attention network: a hybrid of hard and soft attention for sequence modeling. arXiv preprint arXiv:1801.10296, 2018a. OpenAlex ↗ · Scholar ↗
- Shen, T., Zhou, T., Long, G., Jiang, J., and Zhang, C. Bi-directional block self-attention for fast and memory-efficient sequence modeling. arXiv preprint arXiv:1804.00857, 2018b. OpenAlex ↗ · Scholar ↗
- Sinkhorn, R. A relationship between arbitrary positive matrices and doubly stochastic matrices. The annals of mathematical statistics, 350 (2):0 876–879, 1964. OpenAlex ↗ · Scholar ↗
- So, D. R., Liang, C., and Le, Q. V. The evolved transformer. arXiv preprint arXiv:1901.11117, 2019. OpenAlex ↗ · Scholar ↗
- Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A. Y., and Potts, C. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. our card
- Sutskever, I., Vinyals, O., and Le, Q. V. Sequence to sequence learning with neural networks. arXiv preprint arXiv:1409.3215, 2014. our card
- Tay, Y., Wang, S., Tuan, L. A., Fu, J., Phan, M. C., Yuan, X., Rao, J., Hui, S. C., and Zhang, A. Simple and effective curriculum pointer-generator networks for reading comprehension over long narratives. arXiv preprint arXiv:1905.10847, 2019. OpenAlex ↗ · Scholar ↗
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. our card
- Vaswani, A., Bengio, S., Brevdo, E., Chollet, F., Gomez, A. N., Gouws, S., Jones, L., Kaiser, L., Kalchbrenner, N., Parmar, N., Sepassi, R., Shazeer, N., and Uszkoreit, J. Tensor2tensor for neural machine translation. CoRR, abs/1803.07416, 2018. URL http://arxiv.org/abs/1803.07416. our card
- Williams, A., Nangia, N., and Bowman, S. R. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426, 2017. our card
- Xu, K., Ba, J., Kiros, R., Cho, K., Courville, A., Salakhudinov, R., Zemel, R., and Bengio, Y. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pp. 2048–2057, 2015. our card