Natural Language Processing

How programs analyze and generate text. The tasks, the processing pipeline and where the Academics section covers each step, bags of words and the synonym problem shown with three sentences, word vectors computed from co-occurrence counts in the million-word Brown corpus with their neighbors, their antonym problem and a failed analogy, word2vec, attention and the transformer, encoders such as BERT and decoders such as GPT, and the caveats that apply to every evaluation of a language system. Worked problems on TF-IDF for the three reviews, why attention divides by the square root of the key length, and shifted PMI on the Brown corpus.

Counting words, the simplest representation of text, misses meaning. Of this article's three film reviews, the two with opposite meanings have a cosine of 0.75 and the two that agree have 0; TF-IDF lowers the first to 0.290 but cannot raise the second. Word vectors from co-occurrence in the million-word Brown corpus (positive PMI, reduced by SVD to 100 dimensions) find real similarities (monday and tuesday 0.84). But they rate antonyms as similar (wonderful and terrible 0.51) and fail the king − man + woman analogy (queen ranks 95th), which needs billions of words. Attention, $\operatorname{softmax}(QK^{\mathsf T}/\sqrt{d_k})V$, represents each word in context; dividing by $\sqrt{d_k}$ keeps random dot products at variance 1. BERT keeps the transformer's encoder and GPT its decoder.

Consider three short film reviews:

  1. The film was wonderful.
  2. The film was terrible.
  3. A movie that is great.

Reviews 1 and 3 say nearly the same thing, and review 2 says the opposite. Count the words in each and compare the counts, the simplest way a program can represent text, and the result is reversed. Reviews 1 and 2 share three of their four words, and the cosine similarity of their word-count vectors is 0.75. Reviews 1 and 3 share no word at all, and their cosine is 0. A representation that cannot see that film and movie name the same thing, or that wonderful and terrible are opposites, misses most of what the sentences say.

Natural language processing (NLP) is the part of artificial intelligence concerned with programs that analyze, transform and generate human language. This article follows the main line of its development as a sequence of answers to the problem the three reviews pose: how to represent text so that a program can work with its meaning. It starts from the count-based representations that the Academics section develops for search, computes word vectors from a public corpus to show both what they capture and what they miss, and ends with the attention mechanism and the transformer, on which current language models are built. The library's Language Models from Scratch builds one of those models step by step, and the generative AI and prompt engineering articles take up how they generate text and how they are used.

Tasks and the pipeline

NLP covers a wide range of tasks. Classification assigns a label to a text: spam or not, the topic of a news story, the sentiment of a review. Information extraction pulls structured facts out of text, such as the names of people and organizations or the dates and amounts in a contract. Translation, summarization and simplification transform a text into another text. Question answering and dialogue respond to a request. Generation produces new text, from a short continuation to a long report.

Before 2018 or so, most systems for these tasks were built as a pipeline of separate steps, and the steps are still worth knowing, because they show what a program must do with raw text and because search engines and many classifiers still use them. The Academics section on information retrieval covers each in depth:

  • Tokenization splits a character sequence into units, usually words or pieces of words, with decisions to make about apostrophes, hyphens, numbers and languages written without spaces (Tokenization).
  • Normalization maps variant forms to one: case folding, removing accents, expanding abbreviations (Token Normalization).
  • Stop-word removal drops very common function words. It shrinks an index but has costs: with a typical English stop list the query to be or not to be disappears entirely, and web search engines largely stopped using stop lists (Stop Words). For sentiment, removing not reverses meaning.
  • Stemming and lemmatization reduce words to a common base. A stemmer such as Porter's strips suffixes by rule, so connected, connecting and connection all become connect; a lemmatizer uses a dictionary and the word's part of speech, so it can map better to good (Stemming and Lemmatization, The Porter Stemmer).
  • Representation turns the processed tokens into numbers a model can use, which is the subject of most of this article.

Modern language models fold most of these steps into the model. They tokenize text into subword pieces with a learned vocabulary, usually by byte-pair encoding, and leave case, morphology and function words for the network to handle; the library's BPE Tokenization for the Shakespeare GPT shows what that changes in practice.

Bags of words

The bag-of-words model represents a document by the words it contains and how often, ignoring their order. James, Witten, Hastie and Tibshirani (2021, §10.4) call it "the simplest and most common featurization" and present it in its simplest form, which records only whether each word is present; counting how often each word occurs is the usual refinement. Each document becomes a vector with one entry per vocabulary word, almost all of them zero. Weighting the counts by how rare each word is across the collection gives TF-IDF, and measuring the angle between two such vectors gives cosine similarity, the score behind the vector space model of search. The same vectors feed classifiers such as naive Bayes, which the Academics section works for text classification, and models of themes such as topic models. Classifiers can also work on the geometry of the vectors directly, assigning a document to the class whose centroid or nearest labeled neighbors it is closest to (Vector Space Classification).

The representation is crude and surprisingly effective. It is fast, it needs no labeled data to build, and for deciding what a document is about the presence of a handful of words is usually enough. Its limits are the ones the three reviews expose. Order is lost, so dog bites man and man bites dog are the same bag. Different words are unrelated: in the vector for review 1, the film dimension has nothing to do with the movie dimension of review 3, so related documents that use different words look unrelated. Latent Semantic Indexing was an early answer to the second problem, finding a smaller set of dimensions in which words that occur in similar documents end up close together.

Word vectors from co-occurrence

The answer that took hold is to represent each word by the company it keeps. The distributional hypothesis, usually traced to Harris (1954) and Firth (1957) and cited here by attribution, holds that words occurring in similar contexts tend to have similar meanings. If Monday and Tuesday are both often preceded by on and next and followed by morning and night, a program can infer that they are similar without being told what either means.

The procedure can be carried out with nothing more than counting and linear algebra. The worked example below uses the Brown corpus, which its compilers titled a standard corpus of present-day edited American English: about a million words drawn from news, fiction, government documents and other genres (Francis and Kučera, 1964, revised 1971 and 1979; used in the NLTK distribution). Its 500 files contain 1,161,192 tokens in 57,340 sentences; keeping lowercased words made only of letters leaves 981,716 words of 40,234 distinct types.

  1. Count. For the 10,000 most frequent words, count how often each pair occurs within two words of each other in the same sentence. This gives a $10{,}000 \times 10{,}000$ matrix $M$ with 969,270 nonzero cells.
  2. Reweight. Raw counts are dominated by frequent words: almost every word co-occurs with the. Pointwise mutual information compares how often word $w$ and context word $c$ co-occur with how often they would if they were independent, $$\text{PMI}(w, c) = \log_2 \frac{p(w, c)}{p(w)\, p(c)},$$ where $p(w, c)$ is the share of all co-occurrence counts in cell $(w, c)$ and $p(w)$, $p(c)$ are the shares of the row and column totals. Positive values mean the pair occurs together more often than chance. Setting negative values to zero gives positive PMI (PPMI).
  3. Compress. A truncated singular value decomposition, computed exactly, keeps the 100 strongest dimensions of the PPMI matrix, as in principal component analysis and LSI. Each word is now a dense vector of 100 numbers, normalized to length 1, called a word embedding.

Similar words should now have vectors that point in similar directions. The five nearest neighbors by cosine similarity, for a few words, are:

Word (count) Nearest neighbors (cosine)
monday (68) friday 0.84, tuesday 0.84, wednesday 0.83, sunday 0.82, night 0.80
walked (159) ran 0.82, climbed 0.81, rolled 0.78, moved 0.77, drove 0.77
red (197) white 0.75, crimson 0.69, yellow 0.69, black 0.69, sox 0.66
church (348) student 0.71, churches 0.68, presbyterian 0.67, catholic 0.66, baptist 0.66
boy (242) girl 0.75, woman 0.69, man 0.68, lady 0.65, fellow 0.64
money (265) extra 0.63, credit 0.62, capital 0.60, raising 0.60, fair 0.59

Nobody told the program that Monday is a day, that walked is a verb of motion in the past tense, or that crimson is a color. It found each from about a million words of text, along with the corpus's own habits: sox is near red because of a baseball team. Three limits are as instructive as the successes.

Similar is not synonymous. The cosine between wonderful and terrible is 0.51 and between good and bad 0.64, because opposites appear in the same contexts (the film was ___). Distributional similarity measures relatedness of use, and antonyms are closely related in use. A sentiment classifier built on such vectors must learn the difference from labeled data.

Rare words get poor vectors. Film occurs 96 times in the corpus and movie only 29, and their cosine is a modest 0.31; king (88 occurrences) has as its nearest neighbors the names Lewis and Morgan and the words finally and letter, which reflects how the word happens to be used in this corpus more than what it means.

Analogies need far more data. Mikolov, Chen, Corrado and Dean (2013, §1) cite the finding, from earlier work by Mikolov, Yih and Zweig (2013), that vector("King") − vector("Man") + vector("Woman") is closest to the vector of Queen. With the Brown vectors, the five words closest to that combination are shelley, lewis, katie, jane and marriage; queen ranks 95th. The regularity is a property of vectors trained on billions of words, not of the method alone.

word2vec

Mikolov et al. (2013) made word vectors cheap to train at that scale. Their two architectures replace counting and factorization with a shallow network trained on a prediction task: the continuous bag-of-words (CBOW) model predicts a word from its neighbors, and the skip-gram model predicts the neighbors from the word (§3). The trained weights of the network are the word vectors. They report learning high-quality vectors from a 1.6-billion-word dataset in less than a day, and they introduced a test of 8,869 semantic and 10,675 syntactic analogy questions on which skip-gram did particularly well on the semantic part (abstract, §4.1, §4.3). Later analysis showed that methods of this kind are closely related to factorizing a shifted PMI matrix like the one above, which is part of why the count-based example behaves like a small word2vec; that analysis is by Levy and Goldberg (2014). Word embeddings proves their theorem with its conditions made explicit. For skip-gram with $k$ negative samples drawn from the unigram distribution of contexts, in a dimension large enough, and with every pair of word and context occurring, the objective is maximized exactly when every dot product of a word vector with a context vector equals the pair's pointwise mutual information, in natural logarithms, less $\ln k$; when some pairs never occur, it has no maximizer. The example above differs in using positive PMI without the shift, compressed by a truncated SVD to 100 dimensions. The library's essay note on distributed representations discusses how such vectors encode many features in a few dimensions.

Words in context: attention and the transformer

A word vector of the kind above is the same in every sentence, so bank has one vector whether it is a river bank or a savings bank. Representing a word in context requires a model that reads the sequence. Recurrent neural networks read one token at a time and carry a summary forward (James et al., 2021, §10.5). Vaswani et al. (2017, §1) describe their limitation: because each step depends on the previous one, their "inherently sequential nature precludes parallelization within training examples", which becomes a bottleneck for long sequences, and information from an early token must survive many steps to influence a late one.

Attention lets every position look at every other position directly. Vaswani et al. (2017, §3.2) describe an attention function as "mapping a query and a set of key-value pairs to an output", where the output is a weighted sum of the values and each weight comes from how well the query matches the corresponding key. In scaled dot-product attention, with the queries, keys and values for a whole sequence stacked as the rows of matrices $Q$, $K$ and $V$,

$$\text{Attention}(Q, K, V) = \operatorname{softmax}\!\left(\frac{Q K^{\mathsf{T}}}{\sqrt{d_k}}\right) V,$$

where $d_k$ is the length of the key vectors and the softmax is taken across each row. Each row of $QK^{\mathsf T}$ scores how relevant every position is to one position; the softmax turns the scores into weights that sum to one; and the output for that position is the weighted average of the value vectors. Because $Q$, $K$ and $V$ are computed from the token representations by learned matrices, the network learns what each position should look for and what it should offer. The library's Building Self-Attention Step by Step derives the formula from a running average of earlier characters and implements it in PyTorch; Assembling the Transformer Block adds several attention heads in parallel, feedforward layers, residual connections and layer normalization. What trained attention heads compute is analyzed in the library's note on A Mathematical Framework for Transformer Circuits, which reads small attention-only transformers as sums of paths and finds heads in two-layer models that compose into induction heads, a mechanism for copying from earlier context.

The transformer is built from such blocks, with information about each token's position added to its embedding, since attention by itself ignores order. Vaswani et al. (2017) introduced it for translation and reported 28.4 BLEU on the WMT 2014 English-to-German task, more than 2 points above the best previous results including ensembles, at a fraction of their training cost (abstract, §6.1). The design trades one cost for another: self-attention needs a number of operations per layer that grows with the square of the sequence length, against linear growth for a recurrent layer, but all positions can be computed at once (Table 1). For the sentence lengths of translation the trade favored attention.

Encoders and decoders

The original transformer has an encoder, which reads the source sentence with attention in both directions, and a decoder, which generates the translation one token at a time, each position attending only to earlier ones. Two families of models later kept one half each.

BERT (Devlin, Chang, Lee and Toutanova, 2019) keeps the encoder. It is pretrained on unlabeled text with a masked language model objective: 15% of the tokens in each sequence are selected at random, and the model is trained to predict the original tokens from the context on both sides (§3.1). A second pretraining task asks whether one sentence follows another. The pretrained model is then fine-tuned for a specific task with one added output layer (abstract). Their base model has 12 layers and 110 million parameters, the large one 24 layers and 340 million (§3). BERT-style models are suited to understanding tasks: classification, extraction and finding the passage that answers a question.

GPT models keep the decoder. Each position may attend only to earlier positions, and the model is trained to predict the next token, which is the self-supervised setup of the machine learning overview. Devlin et al. (2019, §3) note the contrast: the BERT transformer uses bidirectional self-attention, while the GPT transformer uses "constrained self-attention where every token can only attend to context to its left". Predicting the next token is exactly what generating text requires, and GPT-style models scaled to billions of parameters became the large language models behind the chat assistants in use as of this writing (November 2026). The generative AI article covers what happened as they grew, and the GPT walkthrough builds a small one; its bigram model is the simplest possible next-token predictor, and the final model has 10,788,929 parameters and produces Shakespeare-like text.

Evaluating language systems

Every evaluation of a language system rests on a test set and a measure, and both deserve suspicion.

The measure. Classification tasks can be scored with the measures of Binary Classification Metrics and the Academics section's Evaluating Classifiers. Generated text is harder. Translation is scored by BLEU, which counts overlapping word sequences with reference translations, and summarization by similar overlap measures; both reward matching a reference more than being correct or useful. Human judgments are better and costlier, and they disagree, as the Academics section's Relevance Judgments, Pooling, and Agreement shows for search.

The test set. Models trained on large crawls of the web may have seen the test set. Brown et al. (2020, §4) studied this "data contamination" for GPT-3, noting that it is "a growing problem when training high capacity models on datasets such as Common Crawl, which can potentially include content from test datasets simply because such content often exists on the web" (§1). A model can also score well by exploiting surface patterns: Geirhos et al. (2020, §1) cite a language model that "may appear to have learned to reason" but drops to chance performance when superficial correlations are removed from the dataset.

The prompt. For models used through prompts, the score depends on how the question is asked. Zhao, Wallace, Feng, Klein and Singh (2021, abstract) found that for GPT-3 "the choice of prompt format, training examples, and even the order of the training examples can cause accuracy to vary from near chance to near state-of-the-art". The prompt engineering article returns to this.

The uncertainty. A benchmark score is an estimate from a sample of questions, and two models' scores can differ by chance. The library's note on Adding Error Bars to Evals works through standard errors and paired comparisons for language model evaluations, and Challenges in evaluating AI systems describes the practical difficulties one developer met with six kinds of evaluation.

Worked problems

These problems were written for this article. The first returns to the three reviews, the second derives a step of the attention formula, and the third varies the Brown corpus vectors. The script tools/experiments/data-science/natural-language-processing.py computes every number in them and asserts it.

Problem 1 (what TF-IDF weighting fixes in the three reviews, and what it cannot). Weight the word counts of the three reviews by $\mathit{idf}_t = \log(N/\mathit{df}_t)$, with $N = 3$ documents, and recompute the cosines.

Solution. After lowercasing, the, film and was occur in two reviews, so their idf is $\log(3/2)$; every other word occurs in one review and has idf $\log 3$. Each word occurs once in its review, so the TF-IDF vector of review 1 has three entries $\log 1.5$ (shared with review 2) and one entry $\log 3$ (wonderful), and review 2 the same with terrible. Their cosine is

$$\frac{3(\log 1.5)^2}{3(\log 1.5)^2 + (\log 3)^2} = \frac{3 \times 0.1644}{3 \times 0.1644 + 1.2069} = 0.290$$

with natural logarithms. The base cancels, since changing it multiplies every weight by the same constant, so the site's base-10 convention in TF-IDF gives the same cosine. Of the refinements in Variants of TF-IDF Weighting, sublinear term frequency $1 + \log \mathit{tf}$ changes nothing here, since every count is 1 and $1 + \log 1 = 1$. The weighting has done what it was designed to do: the words the two reviews share are common in the collection, so they count for less, and the cosine falls from 0.75 to 0.290. It cannot raise the cosine of reviews 1 and 3, which share no word, above 0. Reweighting changes how much each shared word counts; only a representation in which different words can be similar, like the word vectors of the next section, gives film and movie anything in common.

Problem 2 (why attention divides by $\sqrt{d_k}$). Vaswani et al. (2017, §3.2.1) scale the dot products because, they suspect, large values push the softmax into regions with very small gradients. Show that the dot product of independent random query and key vectors has variance $d_k$, and measure the effect of the scaling for $d_k = 64$ and 10 keys.

Solution. Let the components $q_i$ and $k_i$ be independent with mean 0 and variance 1, the assumption of the paper's footnote. Each product $q_i k_i$ has mean $E[q_i]E[k_i] = 0$ and variance $E[q_i^2 k_i^2] = E[q_i^2]E[k_i^2] = 1$. The $d_k$ products are independent, so their sum $q \cdot k$ has mean 0 and variance $d_k$, and standard deviation $\sqrt{d_k}$. Dividing by $\sqrt{d_k}$ restores variance 1 whatever the dimension. In 2,000 simulated queries, each against 10 keys, with normal components and $d_k = 64$, the dot products have variance 64.22. Without scaling, the median largest attention weight is 0.949, the median entropy of the weights is 0.33 bits against 3.32 for uniform weights, and in 33.4% of the queries one key takes more than 0.99 of the weight. With scaling the median largest weight is 0.294 and the median entropy 2.84 bits, and no query puts more than 0.99 on one key. A softmax with one weight near 1 has gradients near 0 with respect to every score, because the derivative of $p_i$ with respect to score $j$ is $p_i(\delta_{ij} - p_j)$, and each of these terms is small when one $p$ is near 1 and the others near 0. That is the regime the scaling avoids at the start of training. Trained queries and keys are not independent normal vectors, so the calculation explains the choice of scale rather than proving it optimal. Building Self-Attention Step by Step makes the same argument with a simulation over 8 positions and then uses the scaled form in its model.

Problem 3 (Levy and Goldberg's shift on a small corpus). The word2vec section notes that skip-gram with $k$ negative samples factorizes PMI shifted by $\log k$, while the example used unshifted positive PMI. Repeat the Brown example with $\max(\text{PMI} - \log_2 5, 0)$, the shift for $k = 5$, and compare.

Solution. The shift removes every cell whose PMI is below $\log_2 5 = 2.32$ and lowers the rest, so the number of positive cells of the PPMI matrix (855,905 of the 969,270 nonzero co-occurrence cells) falls to 537,964. The same exact rank-100 SVD then gives these neighbors:

Word Nearest neighbors, shifted PPMI (cosine)
monday wednesday 0.85, sunday 0.85, saturday 0.81, november 0.81, tuesday 0.80
walked looked 0.73, stared 0.72, sat 0.71, peering 0.70, moved 0.69
red coats 0.72, walnut 0.69, sox 0.67, hoover 0.67, lifting 0.66
boy girl 0.63, man 0.63, she 0.62, woman 0.59, himself 0.56

The days of the week survive, and walked now finds verbs of looking and sitting rather than of motion; red loses its colors. The antonym cosines fall (wonderful and terrible from 0.51 to 0.35, good and bad from 0.64 to 0.53), but so does that of the synonyms film and movie, from 0.31 to 0.19, and queen drops from 95th to 199th for the analogy. The cells the shift removes are not those of rare words. The 317,941 removed cells have a median row-word frequency of 418 in the corpus, against 69 for the cells kept, because pointwise mutual information is largest for rare words: a pair of rare words seen together once already has a high PMI. So 82% of the cells that survive record a single co-occurrence, against 53% of those removed. The shift keeps the thinnest evidence and discards moderate associations of common words; that this is why the vectors got worse is a likely explanation, not one measured here. Levy and Goldberg's theorem describes what skip-gram's objective is optimized by; it does not say that the shifted matrix makes better vectors when factorized by SVD, and on this corpus it does not. The comparison is an observation for this corpus and window; Word Embeddings proves the theorem itself.

Open questions

  • How much text does the analogy need? The Brown vectors place queen 95th for king − man + woman. Repeating the PPMI and SVD pipeline on nested samples of a larger public corpus (for example 1, 10 and 100 million words of English Wikipedia) and tracking the rank of queen and the accuracy on Mikolov et al.'s analogy questions would show where the regularity appears.
  • Does a different window separate antonyms from synonyms? The cosine of wonderful and terrible is 0.51 with a window of two words. Recomputing with windows of one, five and ten words, and comparing the cosines of a fixed list of antonym and synonym pairs, would show whether any window size distinguishes the two.
  • How large a test set does a language benchmark need? The evaluation section warns that scores are estimates. Power Analysis for Evaluations gives the sample sizes; applying them to the benchmarks quoted in this article, with their published sizes, would show which reported differences could be detected at all.

Where it leads

The Information Retrieval collection takes the representation question further. Word Embeddings proves the factorization theorem behind word2vec and compares count-based and predictive vectors, and Text Embeddings and Dense Retrieval moves from words to whole passages and retrieval by learned vectors. Mutual Information in the Statistics collection is the expectation of the pointwise quantity used here. Language Models from Scratch builds attention and the transformer in code, and Generative AI, the next article but one, covers what happened as such models grew. Classical tasks such as tagging, parsing and named-entity recognition, and recurrent networks, have no articles of their own yet; the Statistics collection's Hidden Markov Models is the closest treatment of sequence labeling.

In Python

The bag-of-words comparison of the three reviews takes a few lines with scikit-learn:

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity

reviews = ["The film was wonderful.", "The film was terrible.", "A movie that is great."]
X = CountVectorizer().fit_transform(reviews)
print(cosine_similarity(X).round(2))

CountVectorizer lowercases the text and, by default, ignores one-letter tokens such as a, which does not change these three cosines: 0.75 between reviews 1 and 2, and 0 for both pairs with review 3. For the other steps of the pipeline, NLTK and spaCy provide tokenizers, stemmers, lemmatizers and part-of-speech taggers, and the Hugging Face transformers library loads pretrained transformer models such as BERT for classification, extraction and question answering. The word vectors and every number in the Brown corpus example are computed by tools/experiments/data-science/natural-language-processing.py in the site's repository.

References

  • Brown, T. B., Mann, B., Ryder, N., et al. (2020). Language models are few-shot learners. In Advances in Neural Information Processing Systems 33. arXiv:2005.14165. record · 4 pages
  • Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT 2019 (pp. 4171–4186). arXiv:1810.04805. record · 5 pages
  • Firth, J. R. (1957). A synopsis of linguistic theory, 1930–1955. In Studies in Linguistic Analysis (pp. 1–32). Blackwell. Cited by attribution; not read for this article. record
  • Francis, W. N., and Kučera, H. (1964; revised 1971 and 1979). Manual of Information to Accompany A Standard Corpus of Present-Day Edited American English, for Use with Digital Computers (the Brown Corpus Manual). Department of Linguistics, Brown University. Read in the web edition of the 1979 revision hosted by ICAME (icame.info); the corpus is used in the NLTK distribution (nltk_data, corpora/brown.zip). record
  • Geirhos, R., Jacobsen, J.-H., Michaelis, C., Zemel, R., Brendel, W., Bethge, M., and Wichmann, F. A. (2020). Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11), 665–673. arXiv:2004.07780. record · 2 pages
  • Harris, Z. S. (1954). Distributional structure. Word, 10(2–3), 146–162. Cited by attribution; not read for this article. record
  • James, G., Witten, D., Hastie, T., and Tibshirani, R. (2021). An Introduction to Statistical Learning with Applications in R (2nd ed.). Springer. §10.4 and §10.5. record · 39 pages
  • Levy, O., and Goldberg, Y. (2014). Neural word embedding as implicit matrix factorization. In Advances in Neural Information Processing Systems 27, 2177–2185. record · 3 pages
  • Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv:1301.3781. record · 3 pages
  • Mikolov, T., Yih, W., and Zweig, G. (2013). Linguistic regularities in continuous space word representations. In Proceedings of NAACL-HLT 2013 (pp. 746–751). Cited as described by Mikolov, Chen, Corrado and Dean (2013); not read for this article. record
  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems 30. arXiv:1706.03762. record · 9 pages
  • Zhao, Z., Wallace, E., Feng, S., Klein, D., and Singh, S. (2021). Calibrate before use: Improving few-shot performance of language models. In Proceedings of the 38th International Conference on Machine Learning, PMLR 139, 12697–12706. arXiv:2102.09690. record · 2 pages

Reviewed: verified, 23 Nov 2026 · citations checked, 23 Nov 2026 · editorial review, 23 Nov 2026 · 9 revisions