Elamur Research

Adaptive Semiparametric Language Models

Paper · 2021 · Dani Yogatama, Cyprien de Masson d'Autume and Lingpeng Kong

Summary

The words immediately before a blank frequently give a good indication of what comes next. A name or a recurring phrase can be harder to complete if the relevant example lies outside the span a language model can read. Adaptive Semiparametric Language Models asks whether a predictor can handle both situations by keeping examples available in a separate store and learning when those examples should influence its answer. The authors call their system SPALM. It uses a transformer to read the current block of text, a temporary cache to carry forward representations from the preceding block, and a persistent database to find training contexts that resemble the current one.

The database holds an entry for every training token. The key is a vector made from the text that preceded that token, and the value is the token that actually followed. A separately trained transformer supplies the keys and encodes the queries. For each prediction, a nearest-neighbor search returns a small collection of continuations from comparable contexts. SPALM embeds those continuations, gives them weights using its own current representation, and combines their weighted average with the representation built from recent text. A learned gate makes that last choice afresh at every position. Because the search encoder stays fixed, neighbors for the training positions can be found in advance while the prediction network learns how to use them.

The authors compare SPALM with a plain transformer, the cache-equipped transformer-XL, and kNN-LM, which adds a nearest-neighbor probability distribution at evaluation time. On WikiText-103, SPALM alone does marginally better than kNN-LM on the development split and marginally worse on the test split. Combining SPALM's output with the neighbor distribution gives the best reported WikiText-103 result, a test perplexity of 17.6. SPALM alone leads on the WMT news test and on the enwik8 character benchmark. Adding the neighbor distribution to its output brings no further gain on either of those datasets.

The analyses help explain why the same retrieval strategy can have different effects. On the development splits, the closest training context supplies the exact next token in 33% of WikiText-103 cases, 44% of WMT cases, and 70% of enwik8 cases. Yet the learned gate favors recent context more strongly on enwik8 than on WMT. A correct character in the retrieved set may add little when nearby characters already make the answer likely. The system still performs the search at every position, and preparing all those searches is its main cost. According to the authors, obtaining training neighbors took 6–8 hours using 1,000 CPUs for WikiText-103 and enwik8, while the WMT run took 18 hours using 9,000 CPUs.

Deep dive: Adaptive Semiparametric Language Models

SPALM predicts the next token by combining recent text with examples retrieved from its training corpus, using a gate that adapts to each context. · about 38 minutes to read

The problem and its context

What goes missing when the window ends

In next-token prediction, the input ends immediately before the item to be predicted. A token is the unit the system reads and predicts. The paper works with word-based units in some experiments and individual characters in another. At each position, the predictor assigns probabilities to the possible next tokens. Its success depends on giving a high probability to what actually comes next, whether the cue is the preceding character, an earlier mention in the same text, or a familiar continuation seen during training.

The authors start from a distinction between what a network learned during training and what it can inspect as it reads. Training can put recurring patterns into the weights of a transformer. Increasing its size can improve prediction, and the paper cites Megatron-LM among the works illustrating this approach. But increasing the number of weights does not extend the span of text presented to the network at a given position. The transformer described in the paper uses attention between positions, so the cost of that computation grows quadratically with the length of the input. In practice, the network operates on a bounded window even if it has many parameters.

Knowledge in the weights is also hard to inspect directly. An investigator can give the system a sentence with a missing word or formulate a prompt, then examine the response. The authors connect this issue to Language Models as Knowledge Bases?. An explicit store makes a particular part of the process more accessible to inspection. The investigator can look at which training continuations a query brought back. The predictor still has learned weights, and looking at the retrieved items tells only part of the story of how those weights produce the final distribution.

The paper draws a design analogy with specialized memory systems in people. Someone following a sentence or conversation can keep a limited amount of recent material available. They can also draw on particular experiences from much earlier, while more general knowledge serves another purpose. The authors take from this account the idea that different kinds of information can have different storage and access mechanisms. Their engineering hypothesis is that assigning recent context, past examples, and computation to distinct parts of an architecture can help train a better predictor. The analogy motivates the division of labor. The paper's experiments concern text prediction.

Recent history and earlier examples

The first route to more context is to retain something from earlier in the sequence being read. When a transformer processes a block, it produces hidden states, vectors that summarize information available at positions in that block. Transformer-XL carries states forward so that subsequent blocks can attend to them. The cache supplies more of the sequence without requiring the predictor to rerun the earlier block every time it advances. Its contents are tied to where the reader is in the current text.

The paper places this design alongside other attempts to give transformers a wider working context, including the Compressive Transformer and Reformer. It also discusses an older use of a cache in which entries pair hidden states with recently observed outputs. A cache-based predictor can use those pairs to make a distribution of its own, then combine it with the main distribution. The Continuous Cache and Pointer Sentinel Mixture Models are part of this background. A useful distinction for following SPALM is whether a cache supplies additional states to the attention calculation or separately contributes probabilities over possible outputs.

The other route makes past training examples available regardless of where the current text happens to be. A search can find an earlier use of an expression in a different document. Relevance in this case comes from comparing vectors for the contexts, so a nearby entry in the search results can come from far away in the corpus. Nearest Neighbor Language Models is the closest precedent discussed in the paper. Its kNN-LM procedure builds a probability distribution from retrieved tokens and mixes it with the distribution from an already trained predictor. Attaching the search component during evaluation is practical because the existing predictor can be kept as it is.

In the kNN-LM comparison, a development set determines how much probability weight the neighbor distribution receives. The chosen weight then applies throughout that corpus. A position where the immediately preceding text is decisive receives the same mixture coefficient as a position where a training example supplies an important clue. The authors' question is whether the predictor can learn a finer-grained way to use the retrieved information. SPALM moves the combination inside the prediction network, where it can change the representation that is subsequently scored against the vocabulary.

Earlier retrieval systems also differed in what they asked a search to return. Generating Sentences by Editing Prototypes starts from a retrieved sentence and generates by editing a prototype. The paper also describes systems for question answering that store questions paired with answers or index passages, as in REALM. For machine translation, related work stores material from source and target sentences. Those examples explain why the unit of retrieval matters. SPALM is evaluated on the probability of the next item in a sequence, so its store associates each indexed context with the immediate continuation.

The two memory spans address different situations even when both contain cues for the same token. A name repeated in the article being read may be recoverable from a recent cached state. The first mention of that name in the article may instead benefit from an earlier occurrence in the training corpus. Integrating these sources also gives the authors a reason to work with vectors. A token retrieved from text can vote directly in an output distribution, but a record from a different kind of store may need to be represented before it can contribute to prediction. The authors present that broader use as a motivation for their architecture.

The method, step by step

From the current prefix to the next token

SPALM makes a prediction using two representations built for different purposes. The prediction network reads the local sequence and can attend to cached states from the preceding sequence. Its final state represents the particular position where a prediction is due. A separate transformer reads the current context to produce a query for the long-term store. The query finds training positions with comparable contexts. From those positions, SPALM takes the tokens that followed and turns them into vectors in its own embedding space.

The retrieval result is therefore a list of continuations that have occurred before. Their usefulness can differ even if the corresponding contexts all passed the similarity search. SPALM compares each continuation's embedding with its prediction state to decide how much each contributes to a single memory vector. It then uses the gate to blend that vector with the state computed from recent text. The resulting vector supplies the scores from which the system gets next-token probabilities.

How SPALM predicts the next token

The steps in order.

How SPALM predicts the next tokenStep 1: Read the current block and attend to cached states1. Read the current block and attend to cached statesStep 2: Encode the current context with the frozen transformer2. Encode the current context with the frozen transformerStep 3: Find similar training contexts in the database3. Find similar training contexts in the databaseStep 4: Embed the tokens that followed those contexts4. Embed the tokens that followed those contextsStep 5: Weight and combine the retrieved embeddings5. Weight and combine the retrieved embeddingsStep 6: Blend memory and recent context with the gate6. Blend memory and recent context with the gateStep 7: Score possible next tokens7. Score possible next tokens

These operations involve two kinds of similarity. The encoder that built the index places similar contexts near one another for search. The prediction network then makes its own comparison between the current state and the retrieved token embeddings. This second comparison need not follow the original retrieval order. Search decides what information is available to the prediction network. Attention and the gate determine how that information enters the computation.

The objective and the local window

The paper writes the conditional probability of the next token using this notation.

p(xₜ₊₁ ∣ x≤ₜ; W)

Here xₜ₊₁ is the token to be predicted at the position after t. The symbol x≤ₜ denotes the sequence available through position t, and ∣ means that the probability is conditioned on that sequence. The p denotes a probability assigned by the predictor. The semicolon separates the conditioning input from W, the parameters in this statement of the objective. The output can be evaluated for any candidate token. During training, the probability of interest is the one assigned to the continuation in the corpus.

The paper expresses training in terms of corpus log likelihood.

ℒ = ∑ₜ₌₀ᵀ log p(xₜ₊₁ ∣ x≤ₜ; W)

ℒ is the log likelihood. The summation symbol ∑ adds the terms over positions indexed by t, from 0 through the upper bound T as written by the authors. T denotes the length of the corpus in their word-based formulation, and x₀ is their sentence-start symbol. The log takes the logarithm of the probability assigned to the actual next token xₜ₊₁. The prefix x≤ₜ supplies the conditioning information, and W denotes the parameters. Making the sum larger rewards the system for assigning more probability to the observed continuations.

The sequence in the conditional probability is a statement of the prediction problem. How much of it can enter a particular computation is an architectural choice. The local transformer takes a recent window, written as follows.

x̃≤ₜ = [xₜ₋ₙ₊₁, …, xₜ]    (n = N)

x̃≤ₜ is the truncated sequence ending at t. The paper's N, written as n in the subscript here, is the local window length. The window starts at t − N + 1 and ends at t. Square brackets preserve the order of the tokens, and the ellipsis stands for those between the endpoints. Each layer computes new representations using self-attention, the operation through which a position combines information from the relevant positions available to it. Stacking these layers gives the predictor a representation of the latest position that incorporates material within the window.

In SPALM, the local branch is extended with a cache. The span of earlier tokens represented by that cache is described by the following indexing.

x̃≤ₜ₋ₙ = [xₜ₋ₙ₋ₘ₊₁, …, xₜ₋ₙ]    (n = N, m = M)

The left-hand side names the extended context ending just before the local window. M, rendered as m in the subscripts, is the number of preceding positions retained, and N, rendered as n, is the size of the current window. xₜ₋ₙ₋ₘ₊₁ is the oldest token in that extended context and xₜ₋ₙ is the newest. The intervening tokens are represented by the ellipsis. The system actually keeps their hidden states from an earlier forward computation, so it can bring their representations into attention when processing the present block.

How the short-term cache enters attention

Let hᵣᵢ be the working network's vector for the token at position i in layer r. The paper calls the collection of current states at that layer Hʳ. It uses Eʳ for the extended-context states carried into the calculation. The description of the cached states includes a stop-gradient operation.

Eʳ = [SG(hʳₜ₋ₙ₋ₘ₊₁), …, SG(hʳₜ₋ₙ)]    (n = N, m = M)

Eʳ is the ordered collection of cached vectors at layer r, and hʳ with a position subscript denotes a hidden vector at that position. Again, N is the local window length, M is the length of the preceding span, and t is the current position. SG is the stop-gradient function. The forward calculation can read the values of those vectors. When training propagates a loss backward, the operation cuts the gradient at the cached states, so the earlier computation that produced them does not have to be revisited. The ellipsis covers the other cached positions.

The current and cached states provide input to attention at each layer. The attention calculation forms queries, keys, and values from hidden representations. The query specifies what a position seeks, keys are compared with it, and values carry the information that can be combined. The paper uses relative positional encodings in this operation, so the calculation has information about positions relative to one another. The result gives the current states for the next layer, Hʳ⁺¹, where r + 1 denotes the layer following r. The final state hᴿₜ is the vector for the current position at the last layer, R.

The cache contributes before that final state is used by the gate. A coefficient favoring hᴿₜ therefore favors whatever the predictor has already made of the current window and its accessible recent history. It could reflect a clue in either place. The database lookup uses a different kind of key and a different scope. Its keys come from the separately pretrained transformer, and they represent contexts throughout the training corpus.

Building the corpus store and querying it

Each example in the persistent store is made at a training position. The authors first train a plain transformer for next-token prediction. They run it over training text and use the final-layer state at a position i as the key dᵢ for that position's context. The value is xᵢ₊₁, the observed token immediately after i. Indexing every context-continuation pair means that a token occurring in many positions can appear as a value many times, with a different context key for each occurrence. The database preserves these occurrences as separate examples of how the relevant contexts continued.

A prediction at position t uses the same pretrained encoder to produce the query vector dₜ from the current window. The authors use ScaNN, a quantization-based search implementation, to perform approximate maximum inner product search. An inner product gives a score for a pair of vectors by multiplying corresponding coordinates and adding the products. The search uses those scores to find training contexts close to the query under the encoder's representation. An approximate procedure makes this practical on the authors' corpora without requiring an exhaustive comparison for every token.

The outputs of the lookup are denoted y₁, …, yₖ when indexing a collection of K retrieved values. Each y is a stored continuation token, and K is the requested number of neighbors. The paper often describes the search as k-nearest neighbors and uses upper-case K as the bound when summing over returned entries. The query and the keys describe preceding contexts. The values supply the continuations that will enter prediction. A search can therefore return a useful continuation even when the input token just before it in the training example differs from the one at the end of the current context.

SPALM looks up the retrieved tokens in the embedding matrix used by the working predictor. An embedding is a vector associated with a token. It can be used by the predictor as an input representation and, in this architecture, to interpret what comes back from memory. The search keys and these retrieved-token embeddings are distinct. The keys govern which entries are found. The embeddings govern how the returned tokens can contribute after they have been found. During SPALM training, the embeddings can change while the search keys stay fixed. Word embeddings

Turning retrieved tokens into one vector

The first combination inside SPALM is a weighted average of the retrieved embeddings. The paper uses attention with the final prediction state itself as the query.

mₜ = ∑ₖ₌₁ᴷ [exp(yₖᵀ hᴿₜ) / ∑ⱼ₌₁ᴷ exp(yⱼᵀ hᴿₜ)] yₖ

mₜ is the vector summarizing long-term memory for position t. In this equation yₖ and yⱼ denote embeddings, and k and j index entries in the list of K retrieved tokens. hᴿₜ is the current position's state from the top layer R of the predictor. The transpose mark ᵀ makes yₖᵀ hᴿₜ the inner product between a retrieved embedding and that state. The exp function exponentiates each score. The sum over j in the denominator normalizes the scores to give a set of positive weights that add to one. The outer sum over k multiplies each embedding by its weight and adds the resulting vectors.

This attention calculation can assign different weight to successive retrieval ranks because its score is computed from the retrieved tokens and the working state. An entry with a strong context match in the database might have a continuation that matters less to the immediate prediction. Conversely, the token from a weaker match in retrieval can receive more attention if its embedding fits the prediction state. If the same token appears in multiple returned entries, each occurrence contributes through its own term in the sum. The retrieval step and the attention step give SPALM separate ways to narrow and interpret the evidence.

The authors use the working state directly as the attention query. A projection of that state before the comparison could have added more parameters, so they leave such a transformation to future work. They also tried using neighbor distance as a bias in the attention over the embeddings in preliminary experiments. It brought no reported improvement, and the final aggregation equation uses the inner products shown above. Distance still has a role in selecting the candidates through the search procedure.

The gate and the output probabilities

Once SPALM has the retrieved summary and the state computed from its recent context, the paper gives this compact expression for the gate.

gₜ = σ(wᵍᵀ hᴿₜ)

gₜ is the gate at position t, hᴿₜ is the final predictor state at that position, and wᵍ denotes the learned gate parameters. The ᵀ mark transposes the gate weights for application to the state. The sigmoid σ maps a score to a value between zero and one. The paper labels wᵍ a vector in the equation's explanation, which would make the product a scalar if read as an ordinary dot product. Its description of the gate analysis instead treats the gate as having a coefficient for each hidden dimension. In that reading, the written projection is applied to produce a score for each gate component, with the sigmoid operating on those scores separately. The paper's vector interpretation is also the one used by the elementwise blend.

zₜ = (1 − gₜ) ⊙ mₜ + gₜ ⊙ hᴿₜ

zₜ is the blended vector that will be used for prediction at position t. mₜ is the retrieved-memory summary, and hᴿₜ is the working state incorporating local and cached context. The symbol ⊙ is elementwise multiplication. The 1 in 1 − gₜ provides the complement of the gate coefficient in each dimension. Where a coefficient is near one, the corresponding part of zₜ comes chiefly from the working state. Where it is near zero, the corresponding part comes chiefly from retrieved memory. Intermediate values give a contribution to both.

This mechanism allows a single prediction to draw on the two sources in different proportions in different coordinates. Its coefficients also change with the current state, so a pattern of reliance appropriate to one position can differ from what the predictor uses at the next. The gate is computed from hᴿₜ. It does not read a correctness signal for any retrieved token, and the contents of the retrieved list enter the calculation through mₜ. The trained gate can therefore learn which recent states tend to benefit from memory, while the attention weights determine which returned tokens are emphasized for that position.

The output uses a softmax over possible tokens.

p(xₜ₊₁ ∣ x≤ₜ) = softmax(zₜ; W)

p(xₜ₊₁ ∣ x≤ₜ) gives the conditional probability for a particular candidate xₜ₊₁ after the prefix x≤ₜ. zₜ is the vector used to score the candidates. In this equation the paper uses W specifically for the shared embedding matrix, whose token representations are used on the input and output sides. The semicolon separates the vector being scored from the matrix used for scoring. softmax converts the resulting scores across candidates into probabilities that sum to one. For the word-based experiments, the authors implement the output calculation with adaptive softmax. The shared embeddings follow the approach in Tying Word Vectors and Word Classifiers.

A retrieved continuation contributes through the weighted vector, so its influence can extend beyond the probability of that particular token. The output scores depend on how the blended vector relates to the whole vocabulary. A token can gain probability even if it was absent from the retrieved list, and a token can appear in that list without receiving the largest probability. This makes the system different in operation from a predictor that treats the retrieved tokens as votes directly in vocabulary space.

What is learned and what is prepared in advance

Training proceeds in stages. After the authors train the plain transformer and encode the training contexts, they freeze that encoder. The store and the query representation used for a given training position are consequently fixed during SPALM training. The neighbor lists can be computed ahead of time, so the working predictor can reuse them instead of querying a changing index on every pass over the data. The authors say the ensuing training is almost as fast by wall-clock time as training a plain transformer-XL once the neighbors have been prepared.

The working predictor learns from the next-token likelihood using the retrieved tokens as part of its calculation. The gate parameters are the additional learned parameters that the authors identify once the database is given. The attention over neighbors reuses the prediction state and the shared embedding matrix, and the embeddings of retrieved tokens are updated through that matrix. As a result, the retrieval candidate set can stay fixed while the predictor improves how it represents candidates, weights them, and blends their contribution with the information in the cache.

A fixed database also defines the evaluation procedure. The model searches training examples when it encounters a new evaluation position. It can use the preceding evaluation text through its local window and working cache. The long-term store stays based on training data throughout evaluation. The authors distinguish this static evaluation from methods that adapt the predictor or grow a memory as evaluation tokens arrive. A system trained jointly with its search encoder would be another design, and the authors leave that experiment open.

How the baseline combines the same kind of evidence

The kNN-LM comparison helps locate the change SPALM introduces. The paper expresses the output mixture of kNN-LM as follows.

p(xₜ₊₁ ∣ x≤ₜ) = λ pLM(xₜ₊₁ ∣ x≤ₜ) + (1 − λ) pkNN(xₜ₊₁ ∣ x≤ₜ)

On the left, p is the combined next-token probability given the prefix x≤ₜ, and xₜ₊₁ is the candidate continuation. On the right, pLM is the probability from the pretrained predictor, and pkNN is the probability estimated from the retrieved neighbors. The coefficient λ is the share given to the predictor, and 1 − λ is the complementary share given to the neighbor distribution. The authors tune the coefficient on the development set, so individual positions in the evaluated corpus use the same chosen weight. The neighbor distribution itself still varies with the query.

SPALM's gate and this mixture coefficient have different jobs. A kNN-LM coefficient operates on two distributions that have already been computed over vocabulary items. SPALM's gate operates on components of a hidden vector before candidate probabilities exist. The operations can also be composed. After SPALM produces its output distribution, that distribution can take the place of pLM in the interpolation. The experiments test that combination as well as the architecture on its own.

Experiments and results

What the comparisons measure

The experiments evaluate next-token probabilities on English text. WikiText-103 and WMT use word-based prediction, and enwik8 uses characters. For the word-based datasets, the paper reports perplexity. Perplexity falls as the predictor assigns more probability, on average in log terms, to the tokens that actually occur. For enwik8, the paper reports bits per character, the average cost in bits that the predicted probabilities assign to the observed character sequence. Lower values are better on both measures. The paper evaluates probabilities across the sequence, so getting the reference token as the highest-ranking answer is only one way a predictor can do well.

The plain transformer supplies a local-window baseline. Transformer-XL adds recent cached states. The kNN-LM comparison adds a long-term neighbor distribution to a pretrained predictor's output. SPALM incorporates neighbors into the learned representation used to make that output. The authors also test an output interpolation on top of SPALM. Comparing these variants helps distinguish gains from a wider working context, gains from retrieving outside that context, and gains from a particular way of combining evidence. The variants still differ in more than a single operation when the comparison changes how retrieval enters training as well as how it enters prediction.

The authors use Adam to update the trainable parameters. For the word-based tasks, adaptive softmax is used to compute output probabilities. The dropout rate is 0.25, which governs the amount of activation masking used during training. Training runs to convergence with batch size 256 on 128 Tensor Processing Units. The architecture sizes and memory spans are set separately for the datasets. Within a dataset, the memory spans and the number of neighbors give the context needed to interpret the baseline comparisons.

The results also include a diagnostic for the search itself. On each development split, the authors count positions at which the closest retrieved context supplies exactly the reference continuation. That percentage can be compared across evaluation settings, with the different token units in mind. The enwik8 setting has the highest rate in this diagnostic. The chart shows search matches, while perplexity and bits per character measure the behavior of the final predictors.

Top-neighbor exact continuation matches on the development splits

Exact matches are most frequent in the enwik8 character setting.

Top-neighbor exact continuation matches on the development splitsWikiText-103 word prediction: 33WikiText-103 word prediction33WMT word prediction: 44WMT word prediction44enwik8 character prediction (this paper): 70enwik8 character prediction (this paper)70
The numbers
System or settingExact match %
WikiText-103 word prediction33
WMT word prediction44
enwik8 character prediction (this paper)70

The rates are 33% for WikiText-103, 44% for WMT, and 70% for enwik8 on their respective development splits. A search can return the correct token at a lower rank and miss this measure. It can also provide a relevant near miss that improves the probability distribution when used with nearby text. On a character task, a high match rate can coexist with a strong local predictor that already assigns the same character a high probability. The diagnostic answers how frequently a particular training continuation is recovered by search and leaves open how much value that recovery adds.

WikiText-103

The WikiText-103 systems have 18 layers, a hidden size of 512, and a reported total of 142M parameters. The sequence length is 512. Transformer-XL uses a short-term memory length of 512 in training. At test time, the authors report comparisons with short-term memory lengths of 512 and 3072. SPALM and kNN-LM use 4 retrieved neighbors in this experiment. The kNN-LM distribution over the retrieved tokens uses neighbor distances, and its pretrained prediction component is transformer-XL. The authors consider the interpolation weights in the following set.

Λ = {0.05, 0.1, 0.2, 0.3, 0.4}

Λ labels the set of candidate values for λ, the weight on the pretrained predictor in the preceding mixture formula. Each number is an alternative evaluated on the WikiText-103 development set. Braces denote a set of choices, and commas separate those choices. The development set is thus part of selecting a corpus-wide weight before evaluating the interpolation.

Transformer-XL improves on the plain transformer in the authors' WikiText-103 comparison. Using kNN-LM improves on transformer-XL at both reported test cache lengths. Standalone SPALM and kNN-LM are close. SPALM has the edge on the development set, and kNN-LM has the edge on the test set. That ordering matters because the experiment supports the value of integrated retrieval and shows a small reversal between the two ways of using it. The standalone architecture's test result should be read together with the stronger result from combining it with the neighbor distribution.

The best WikiText-103 test perplexity reported in the prose is 17.6, achieved by interpolating SPALM with the kNN distribution. Both paths use the same 4 retrieved neighbors for a given position. In one path SPALM contextualizes their influence through the attention and gate learned during training. In the other, the neighbor distribution supplies probability directly at evaluation. Since the candidate lists are shared, the gain from the combination points to how the evidence is represented and used. Finding additional training examples is unnecessary to explain that particular improvement.

The authors situate their baselines against published results for transformer-XL, Adaptive Input Representations, the compressive transformer, and kNN-LM. They describe their implementations as performing in the range of the strong results they compare against. The paper also reports a Wilcoxon signed-rank test for log likelihood on WikiText-103 test data. The comparison is between SPALM with the kNN output mixture and transformer-XL, and the reported threshold is p < 0.05. This test supports the stated comparison with transformer-XL. The close standalone comparison with kNN-LM has a different ordering on the two splits and is described in terms of that ordering.

WMT news

The WMT experiment increases the amount of text from which neighbors can be drawn and gives the development and test sets different time periods. The authors construct the corpus from the English part of WMT 2019. News articles from January through October form the training data. They take articles in chronological order from November for development and from December for testing. Each of those sampled evaluation splits has approximately 1 million tokens. The paper says there are almost 100 million tokens available if all articles in either evaluation month are used. It describes the resulting WMT corpus as approximately ten times larger than WikiText-103.

The WMT predictors have 18 layers and hidden size 512, with a reported total of 148 million parameters. The sequence length is 512. Transformer-XL uses a short-term memory length of 512 during training and evaluation. The two retrieval approaches each use 4 neighbors. These settings keep the structure of the word-based comparison close to WikiText-103 while using a different dataset and a chronological evaluation split.

On WMT, kNN-LM improves on transformer-XL and the plain transformer. SPALM has the lowest reported test perplexity among these systems, with a gap the authors describe as considerable. The WMT test log-likelihood comparison between SPALM and transformer-XL meets the reported Wilcoxon signed-rank threshold of p < 0.05. Interpolating the SPALM probabilities with the neighbor distribution does not improve WMT performance. The 17.6 perplexity on WikiText-103 belongs to a different dataset and to the combined system.

The authors suggest one reason the adaptive scheme may help on the news split. A weight selected using November articles has to work on December articles too. If names, topics, or expressions change in frequency across these portions, the value of consulting training continuations can change with them. SPALM applies a learned contextual gate to every position. The difference between development and test behavior is consistent with the authors' concern about transferring a single interpolation weight across time. The experiment observes that transfer under one chronological split. It leaves the individual effects of topic change, corpus size, and the form of the gate entangled.

enwik8

The enwik8 experiment changes the output unit from word-based tokens to characters. Its smaller output space alters the prediction task. A partial spelling can be a strong cue for the next character. At other positions, a name or a formatting convention can give long-term examples a useful role, particularly if a similar sequence occurs in the training text. The authors are interested in whether a gate helps in a regime where local context can already be highly predictive.

The enwik8 network has 24 layers and a hidden size of 512, with 100 million parameters reported in total. The sequence length is 768. The short-term memory length is 1536 in training and 4096 in evaluation. The paper uses two retrieved neighbors per character, a choice the authors relate to the smaller output space and their preliminary experiments. The absolute lengths here refer to positions in a character sequence. The numbers describe the amount of text available to attention only once the unit is taken into account.

Transformer-XL performs better than kNN-LM on this benchmark. SPALM performs better than the other systems in the comparison. The reported Wilcoxon signed-rank threshold for the enwik8 test log-likelihood comparison between SPALM and transformer-XL is p < 0.05. The authors remark that a decrease of 0.01 bits per character is considerable on enwik8. They give that number as context for interpreting the metric. As with WMT, applying the kNN output interpolation to SPALM brings no further benefit.

The enwik8 result is particularly informative alongside the neighbor-match diagnostic. The search often recovers the correct next character, yet the kNN-LM interpolation worsens the result relative to the working-context baseline. Retrieval may be redundant on many positions and misleading on others. A representation-level gate gives SPALM a way to rely heavily on recent text in much of the sequence while still taking advantage of useful retrieved continuations at selected positions. The authors relate this interpretation to their inspection of the learned gate.

What the ablations show

How many neighbors help

The paper varies the number of neighbors used by SPALM and compares perplexity on the WikiText-103 development split. A single neighbor already gives good performance. The authors report a slight improvement with four, after which performance starts to deteriorate at 8 and 16. More retrieved contexts therefore supply more candidates for attention while also creating more opportunities to introduce continuations relevant only in a broad sense. The development result makes the number of examples presented to the gate and attention mechanism a consequential design choice.

The final word-based setting also reflects the baseline comparison. The authors found that kNN-LM benefited from using four neighbors rather than one. Giving both systems the same list size and the same retrieved candidates makes it easier to interpret differences in how those candidates are used. A retrieval system given a different number of neighbors might perform differently for reasons that precede the learned gate. The paper chooses a shared operating point and reports the sensitivity of SPALM to that choice on WikiText-103.

One proposed explanation for declining performance with larger sets is that the search can range across different input tokens. The paper contrasts its neighbor selection with an exact-token restriction used in the prior approach it discusses. The condition can be written as follows.

𝕀(xᵢ = xₜ)

𝕀 is an indicator that is true when the equality inside the parentheses holds and false otherwise. xᵢ is the token at the indexed training position i, and xₜ is the last token in the current query context at position t. The equality checks those input tokens. The continuation stored at the training position is the following token. SPALM allows retrieved contexts whose final input tokens differ. That can help it exploit a related context, and the authors suggest it can also admit more noise as the list grows. The neighbor-count sweep changes the size of the list. It leaves the proposed explanation about the exact-token restriction as an interpretation.

What the search returns in actual sequences

For WMT, the authors inspect a selected example from the development split. Their display aligns the reference sequence with the continuations returned by each search. As more context becomes available in the example, the reference continuation appears more readily among the retrieved candidates. A useful case is Elizabeth Warren. Retrieving the first name can fail, while seeing it in the prefix makes the last name easier to recover from training contexts containing the full name. The case illustrates how retrieval can become substantially more specific after a short prefix identifies what sort of continuation is likely.

The WMT examples also show why an exact-match tally captures only one property of the neighbor list. A candidate can belong to the same class of expressions as the reference even if its spelling or meaning differs. The authors observe this around amounts of money, terms for time, day names, and familiar phrases. The key vectors in the search encode context, and similar contexts can have multiple natural continuations. Some alternatives can be useful evidence about what fits grammatically or thematically even when the reference token itself is absent.

On enwik8, the authors inspect retrieved continuations in a development example containing ordinary words, names, and formatting. They describe retrieval helping supply characters in words such as before and invasion, in the name Soviet, and in the double square brackets that occur in the corpus. These cases are possible even though the store returns one character per entry. The query represents a preceding sequence, so its neighbors can help complete a larger pattern through a series of individual predictions.

The examples identify what the search supplied. A continuation matching the reference provides a plausible route by which the external store helped, but the baseline could already have learned to predict the same continuation from recent inputs. To investigate the final distribution, the authors also compare probabilities assigned by predictors with different access to context. This brings the analysis closer to the actual next-token metric than simply inspecting whether a neighbor matches.

Where the next-token probability changes

The output analysis uses selected sequences from the WMT test set. The authors look for positions where adding the cache improves the probability of the reference token and for positions where SPALM improves further. The figure uses a gap of 0.1 in assigned probability to flag positions for these comparisons. In one category, transformer-XL and SPALM both put more probability on the reference than the plain transformer by the stated threshold. In the other, SPALM exceeds transformer-XL by that threshold. The markings show which parts of particular sequences motivated the authors' interpretations.

The authors find examples where SPALM helps complete familiar expressions and named entities that occur in training. Jo Swinson and Liberal Democrat are among the cases discussed. A name can be absent from the current article's accessible recent context even when it has appeared in earlier news in the training corpus. Compared with the cache-equipped baseline, SPALM has an additional source from which to recover a likely continuation. The authors see this pattern particularly around first mentions in the accessible text, while stressing the difficulty of identifying a uniform pattern across examples.

Other positions favor transformer-XL. The authors associate some of these cases with a word that has already appeared within cache range. A recent mention can make the correct continuation particularly likely. Long-term examples can bring in alternative continuations, which may spread probability away from the one that the cache alone already supports strongly. The authors describe this as a smoothing effect. It helps explain why access to global examples is compatible with losses on individual tokens even when average test likelihood improves.

This inspection compares full predictors at selected positions. Its value is to put three concrete situations next to one another. The local sequence may contain sufficient cues, the working cache may contain an earlier mention, or the corpus may contain a similar episode absent from the working context. The probabilities reveal differences among the predictors in those situations. They leave open how much of the aggregate gain comes from each situation and how the same trained SPALM predictor would behave if individual retrieved entries were removed.

How the gate uses the two sources

The authors also examine the distribution of gate values on the WMT and enwik8 development splits. On enwik8, the gate values are concentrated near 1. Under the blend equation, those values favor the hidden state formed from nearby text and the cache. On WMT, the values are less concentrated there, suggesting a larger role for the retrieved vector. This observation fits the difference between the benchmarks in how much an output-level neighbor mixture helps. For characters, imposing a fixed share of retrieval probability can be counterproductive even when many retrieved characters are correct.

The paper's heatmaps show some gate dimensions along sequences from the development sets. The authors interpret vertical patterns on WMT as instances in which particular dimensions consistently admit information from long-term memory across a stretch of text. On enwik8, the more horizontal patterns in the example indicate positions where more dimensions admit retrieved information together. The discussion points to the characters forming Egypt. The reported gate has 512 dimensions, and the illustration displays only a small subset. The authors observe both orientations in both datasets and caution against treating the pictured examples as a general map of the gate's behavior.

The notation in the figure captions differs from the notation in the method. The captions call the illustrated quantity z, which is the blended representation in the equations, while the analysis reads the plotted values as gate coefficients. The interpretation that values near one favor recent context follows from gₜ in the blend. Even with that interpretation, a coefficient only controls one part of the vector going into softmax. The output effect also depends on the size and direction of both candidate representations in that dimension and on how the output matrix turns the blend into token scores.

The gate inspection gives a plausible account of the character result and of differences across individual positions. The neighbor sweep gives a more direct comparison because it changes the amount of retrieved evidence. The reported experiments leave a further causal question open. A comparison between otherwise identical predictors with a learned and a fixed representation-level gate would help isolate adaptability itself. The kNN-LM comparison changes several features together, including whether retrieval participates in training, how retrieved tokens are weighted, and where the combination takes place.

Limitations

Limits stated by the authors

The authors identify training-neighbor preparation as the largest practical cost. They report that finding neighbors for WikiText-103 and enwik8 takes 6-8 hours with 1,000 CPUs, and that WMT takes 18 hours with 9,000 CPUs. The work can be distributed across positions, but parallel execution still requires substantial computation. The reported similarity to transformer-XL training time applies after the neighbors have been prepared. Preparing the store also requires training the plain transformer and running it to encode the corpus. The paper's comparison of subsequent training speed does not include those stages in the claim.

The gate regulates the use of retrieval after the candidate search has been performed. On enwik8, many gate values favor the local and short-term representation, yet the system has already paid the cost of fetching candidates for those positions. The authors propose a future design that could decide when a position needs a long-term search and skip lookups elsewhere. That decision would come before the current paper's weighting and blending operations. The authors expect it could save training and evaluation time, and leave the savings and prediction tradeoff to a future experiment.

The authors freeze the search encoder to make it feasible to reuse keys and precompute neighbors. Joint training could let the query and key representations improve in response to the final prediction loss. It would also alter the conditions that make a fixed index reusable. The paper leaves end-to-end training of the full architecture untested. Its successful use of a fixed store establishes that the working predictor can learn with the candidates it has been given. It provides no measurement of how much better or worse a jointly learned retriever would be.

The choice of static evaluation also constrains what the study can establish about adaptation. The long-term database could in principle be updated with new observations, but the authors keep it fixed and exclude dynamic evaluation comparisons. The temporary cache still passes information from earlier positions of the current sequence. An expanding corpus store would add a different kind of adaptation, with evaluation examples remaining available for subsequent searches. The paper provides results for the fixed-store setting.

The authors suggest further uses for the modular architecture, including memories with images or entries from structured knowledge bases. All the retrieved values tested here are immediate continuations in text. The proposed broader application rests on the idea that a vector representation could be supplied for other kinds of records and combined within the architecture. It remains a design possibility. The experiments establish the behavior of the particular token store and gate studied in the paper.

Limits of the comparisons and diagnostics

The empirical scope is English next-token prediction on the named benchmarks. The move from words to characters shows that the approach can operate with distinct output spaces and different ranges of short-term context. It leaves questions about other languages, nontext sequences, and downstream tasks open. Improved perplexity or bits per character establishes better probabilistic prediction within the evaluation. Factual recall, answer accuracy, and longer-form generation would need assessments with their own targets.

The WMT split makes the development-to-test transition meaningful because the articles come from successive months. It motivates the paper's explanation of sensitivity to a corpus-wide interpolation coefficient. At the same time, comparisons across WMT, WikiText-103, and enwik8 change several conditions together. The corpus size, text type, token unit, cache length, and neighbor count can all affect the quantity or usefulness of retrieved evidence. The difference between the WMT and enwik8 gate histograms does not by itself identify which of those properties produced the difference.

The likelihood tests compare specified systems on each test set. The reported p < 0.05 threshold addresses those pairwise comparisons and does not quantify the size of the gain. In particular, the WikiText-103 test compares the combined SPALM system with transformer-XL. That test does not indicate a statistically established standalone SPALM advantage over kNN-LM. The paper's reported ordering on WikiText-103 gives the standalone development edge to SPALM and the test edge to kNN-LM.

The analysis examples make it possible to inspect specific predictions, with a corresponding limit on generalization. The authors select WMT sequences for neighbor and output inspection and plot only a subset of the gate dimensions. A retrieved continuation that matches the reference can be redundant with the cache. A lower gate coefficient can increase the influence of the memory vector without necessarily increasing the probability of the reference. Establishing the contribution of specific neighbors or gate components to a prediction would require intervening on them and measuring the resulting probability. The paper's examples support interpretations of what may have happened in a particular context.

Finally, the memory is both explicit and tied to a trained representation. A stored value is easy to read as a token, but a key is a compressed account of the context learned by the separate transformer. Which training occurrences are recoverable depends on the representation and the approximate search. A missing match can reflect the index, the current query, or the underlying corpus. The first-neighbor match diagnostic measures the outcome of all of those factors together. It cannot on its own locate the reason a useful example was absent.

What came after

Nearest neighbors, learned memory, and scale

Later citing work took up different parts of the problem SPALM addresses. Some work stayed close to token prediction and the cost of consulting past examples. Efficient Nearest Neighbor Language Models puts efficiency at the center of nearest-neighbor prediction. That focus connects directly to the cost SPALM reports for finding candidates at training positions. A gate can learn to give a retrieved vector little influence and still incur the entire search cost. Efficiency is consequently a question about access as well as a question about how the returned evidence is used.

Training Language Models with Memory Augmentation takes up the training side of this design space. SPALM's closest baseline illustrates how retrieval can be attached to a trained predictor. Its own procedure illustrates how the prediction network can learn with the returned examples present, using a fixed search encoder. The later work's focus on training with added memory continues that line of inquiry. Memorizing Transformers likewise makes memory a design concern of the transformer itself. These titles establish a shared research question about how the network gains access to earlier material. They leave the exact relationship to SPALM's gate and frozen datastore unspecified.

Other work makes the scale or form of the retrieved evidence central. Improving language models by retrieving from trillions of tokens takes up retrieval from a much larger pool of text. It continues the question of what becomes available when the evidence a predictor can consult extends beyond its input window. Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval explores automaton-augmented retrieval, bringing a symbolic mechanism into the design of retrieval for language prediction. Lift Yourself Up moves the emphasis to self memory for retrieval-augmented text generation. These are different choices about what a memory draws on and how it is organized, the kind of choice made explicit by SPALM's separation of computation and storage.

From token prediction to questions and dialogue

Other citing papers use retrieval in tasks where the output is judged as an answer or a conversational response. Atlas studies retrieval augmentation in a few-shot learning setting, where the amount of task-specific example information available is central to the evaluation. End-to-End Training of Multi-Document Reader and Retriever for Open-Domain Question Answering focuses on jointly training a retriever and a reader that uses multiple documents. Its task and retrieved units differ from SPALM's next-token setup. Its emphasis on joint training connects to a choice SPALM leaves open when it freezes its search encoder to keep training-time lookups tractable.

The information source also changes in work that augments language processing with internet access. Internet-augmented language models through few-shot prompting for open-domain question answering brings internet augmentation and few-shot prompting to question answering. Internet-Augmented Dialogue Generation applies internet augmentation to generating dialogue. For both, the connection to SPALM is the use of an external information source during prediction. What the external source supplies, and how the predictor receives it, are separate design choices from the fixed store of training continuations.

Retrieval Augmentation Reduces Hallucination in Conversation frames retrieval around the problem of unsupported conversational statements. Language Models that Seek for Knowledge focuses on modular search and generation for dialogue and prompt completion. Modularity is a point of continuity with SPALM. In the token prediction experiments, the architecture asks how much a retrieved continuation should affect the next probability distribution. In dialogue and prompt completion, the modular search question can be posed at the level of the information needed to generate a response. The citing works' titles establish those aims without specifying that they use SPALM's combination mechanism.

Long context and accounts of retrieval

The relationship between reading a long input and searching for relevant material continues in Retrieval meets Long Context Large Language Models. SPALM provides a concrete instance of that relationship. Adding a recent-context cache and adding a corpus lookup are two ways to widen the evidence available to the predictor, and a single architecture can do both. LM-Infinite addresses extreme input lengths through zero-shot length generalization. Chain of Agents takes up long-context tasks through collaboration among multiple predictors. Their connection is to the broader long-context problem, and their titles describe different approaches to it.

The survey and review works place these questions in broader accounts of retrieval-augmented generation and learned knowledge. A Survey on RAG Meeting LLMs surveys retrieval augmentation for large language systems, while Retrieval-based Language Models and Applications covers retrieval-based predictors and their uses. A Review on Language Models as Knowledge Bases approaches the question through the role of a language predictor as a source of knowledge. Challenges and Applications of Large Language Models places the citation in a wider treatment of applications and open problems.

Across these directions, the citation connection establishes that SPALM is part of the conversation about memory, retrieval, and context. The specific contribution available for later work to build on is a demonstrated way to let past examples affect a learned prediction before the output distribution is formed. Its experiments also make the cost boundary concrete. Learning when retrieved information deserves weight and learning when a search is worth performing are different problems, and SPALM trains the predictor to address the first.

Cite

Cite as Dani Yogatama, Cyprien de Masson d'Autume and Lingpeng Kong. 2021. Adaptive Semiparametric Language Models.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1162/tacl_a_00371 · arXiv 2102.02557

@misc{yogatama2021adaptive,
  title = {{Adaptive Semiparametric Language Models}},
  author = {Dani Yogatama, Cyprien {de Masson d'Autume} and Lingpeng Kong},
  year = {2021},
  doi = {10.1162/tacl\_a\_00371},
  eprint = {2102.02557},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1162/tacl_a_00371}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/yogatama-2021-adaptive-semiparametric-language-models/

References

38 references, from the paper's own bibliography.

  1. Alexei Baevski and Michael Auli. 2019. Adaptive input representations for neural language modeling. In Proc. of ICLR. our card
  2. Ankur Bapna and Orhan Firat. 2019. Non-parametric adaptation for neural machine translation. In Proc. of NAACL-HLT. our card
  3. Iz Beltagy, Matthew E. Peters, and Arman Cohan. 2020. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150v2. our card
  4. Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Proc. of NeurIPS. our card
  5. Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, David Belanger, Lucy Colwell, and Adrian Weller. 2021. Rethinking attention with performers. In Proc. of ICLR. our card
  6. Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V. Le, and Ruslan Salakhutdinov. 2019. Transformer-xl: Attentive language models beyond a fixed-length context. In Proc. of ACL. OpenAlex ↗ · Scholar ↗
  7. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proc. of NAACL. our card
  8. Howard Eichenbaum. 2012. Memory systems. Handbook of Psychology, Second Edition, 3. OpenAlex ↗ · Scholar ↗
  9. Edouard Grave, Moustapha M Cisse, , and Armand Joulin. 2017a. Unbounded cache model for online language modeling with open vocabulary. In Proc. of NeurIPS. OpenAlex ↗ · Scholar ↗
  10. Edouard Grave, Armand Joulin, Moustapha Cisse, David Grangier, and Herve Jegou. 2017b. Efficient softmax approximation for gpus. In Proc. of ICML. our card
  11. Edouard Grave, Armand Joulin, and Nicolas Usunier. 2017c. Improving neural language models with a continuous cache. In Proc. of ICLR. our card
  12. Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, and Sanjiv Kumar. 2020. Accelerating large-scale inference with anisotropic vector quantization. In Proc. of ICML. OpenAlex ↗ · Scholar ↗
  13. Kelvin Guu, Tatsunori B. Hashimoto, Yonatan Oren, and Percy Liang. 2018. Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics, 6:437–450. our card
  14. Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. 2020. Realm: Retrieval-augmented language model pre-training. In Proc. of ICML. our card
  15. Marcus Hutter. 2012. The human knowledge compression contest (http://prize.hutter1.net/). OpenAlex ↗ · Scholar ↗
  16. Hakan Inan, Khashayar Khosravi, and Richard Socher. 2017. Tying word vectors and word classifiers: A loss framework for language modeling. In Proc. of ICLR. our card
  17. Lukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. 2017. Learning to remember rare events. In Proc. of ICLR. OpenAlex ↗ · Scholar ↗
  18. Nora Kassner and Hinrich Schutze. 2020. Bert-knn: Adding a knn search component to pretrained language models for better qa. In Proc. of Findings of EMNLP. OpenAlex ↗ · Scholar ↗
  19. Urvashi Khandelwal, Angela Fan, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2021. Nearest neighbor machine translation. In Proc. of ICLR. OpenAlex ↗ · Scholar ↗
  20. Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2020. Generalization through memorization: Nearest neighbor language models. In Proc. of ICLR. our card
  21. Diederik P. Kingma and Jimmy Lei Ba. 2015. Adam: a method for stochastic optimization. In Proc. of ICLR. our card
  22. Nikita Kitaev, Lukasz Kaiser, and Anselm Kevskaya. 2020. Reformer: The efficient transformer. In Proc. of ICLR. our card
  23. Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. 2018. Dynamic evaluation of neural sequence models. In Proc. of ICML. OpenAlex ↗ · Scholar ↗
  24. Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. 2019. Dynamic evaluation of transformer language models. arXiv preprint arXiv:1904.08378v1. OpenAlex ↗ · Scholar ↗
  25. Cyprien de Masson d'Autume, Sebastian Ruder, Lingpeng Kong, and Dani Yogatama. 2019. Episodic memory in lifelong language learning. In Proc. of NeurIPS. OpenAlex ↗ · Scholar ↗
  26. Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. In Proc. of ICLR. our card
  27. Aida Nematzadeh, Sebastian Ruder, and Dani Yogatama. 2020. On memory in human and artificial language processing systems. In Proc. of ICLR Workshop on Bridging AI and Cognitive Science. OpenAlex ↗ · Scholar ↗
  28. Graham Neubig and Chris Dyer. 2016. Generalizing and hybridizing count-based and neural language models. In Proc. of EMNLP. OpenAlex ↗ · Scholar ↗
  29. Fabio Petroni, Tim Rocktaschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H. Miller, and Sebastian Riedel. 2020. Language models as knowledge bases? In Proc. of EMNLP. our card
  30. Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. 2018. Improving language understanding by generative pre-training (https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf). OpenAlex ↗ · Scholar ↗
  31. Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners (https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf). OpenAlex ↗ · Scholar ↗
  32. Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier, and Timothy P. Lillicrap. 2020. Compressive transformers for long-range sequence modelling. In Proc. of ICLR. our card
  33. Edmund T. Rolls. 2000. Memory systems in the brain. Annual Review of Psychology, 51(1):599–630. OpenAlex ↗ · Scholar ↗
  34. Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053v4. our card
  35. E. Tulving. 1985. How many memory systems are there? American Psychologist, 40:385–398. OpenAlex ↗ · Scholar ↗
  36. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Proc. of NIPS. our card
  37. Wenhan Xiong, Xiang Lorraine Li, Srini Iyer, Jingfei Du, Patrick Lewis, William Yang Wang, Yashar Mehdad, Wen tau Yih, Sebastian Riedel, Douwe Kiela, and Barlas Oguz. 2021. Answering complex open-domain questions with multi-hop dense retrieval. In Proc. of ICLR. OpenAlex ↗ · Scholar ↗
  38. Peng Xu, Mostofa Patwary, Mohammad Shoeybi, Raul Puri, Pascale Fung, Anima Anandkumar, and Bryan Catanzaro. 2020. Megatron-cntrl: Controllable story generation with external knowledge using large-scale language models. In Proc. of EMNLP. our card