Natural language and speech
Algorithms that segment, model, tag, parse, translate and generate human language, and that analyze, recognize and synthesize speech.
- Tokenization and text normalization
- Word and sentence embeddings
- Language modeling
- Text generation and decoding
- Tagging and information extraction
- Syntactic and semantic parsing
- Machine translation and alignment
- Speech analysis and synthesis
- Speech recognition
Problems
- Automatic speech recognition
Transcribe the words spoken in an audio signal into text.
intro - Automatic summarization
Produce a short text that keeps the main content of one or more documents, either by extracting sentences or by writing new ones.
intro - Autoregressive decoding
Given a model that gives the next token's distribution from a prefix, find the most probable output or draw a sample, one token at a time. Sampling is easy; the exact mode is hard.
intro - Language identification
Decide the natural language in which a text or a short string is written, from a fixed set of candidate languages.
intro - Lemmatization
Map each inflected word form in context to its dictionary form, such as was to be, using morphology and the part of speech.
intro - Machine translation
Translate a text in a source language into a fluent text in a target language with the same meaning.
intro - Part-of-speech tagging
Label each word of a sentence with its part of speech, such as noun, verb or adjective, resolving ambiguity from context.
intro - Sentence boundary detection
Decide which periods, question marks and other candidate marks in a text end a sentence, despite abbreviations, numbers and ellipses.
intro - Sentiment analysis
Decide whether a text, sentence or aspect expresses a positive, negative or neutral opinion, or score its polarity.
intro - Sequence labeling
Assign one label from a fixed set to each token of a sequence, using the whole sequence, as in tagging, chunking and entity recognition.
intro - Text-to-speech
Produce natural and intelligible speech audio that says a given input text.
intro - Tokenization
Split a raw text into a sequence of units such as words, punctuation marks, subwords or bytes that later stages of a pipeline process.
intro - Word segmentation
Insert word boundaries into text written without spaces, as in Chinese, Japanese or Thai, or into a string of characters such as a URL.
intro - Constituency parsing
Find the phrase-structure tree of a natural language sentence, with labeled constituents such as NP and VP over spans of words.
core - Coreference resolution
Group the mentions in a text into clusters that refer to the same entity, such as a name, a description and a pronoun.
core - Dependency parsing
Find the dependency tree of a sentence, the head and the relation label of each word.
core - Entity linking
Map each entity mention in a text to its entry in a knowledge base, or to none, using the mention, its context and coherence.
core - Formant estimation
Find the resonance frequencies of the vocal tract over time, often as the angles of the roots of an LPC polynomial.
core - Grapheme-to-phoneme conversion
Predict the sequence of phonemes that spells the pronunciation of a written word, including words not in the lexicon.
core - Keyword spotting
Detect the occurrences of given words or phrases in an audio stream without transcribing all of it.
core - Morphological analysis
Map a word form to its lemma and features, such as cats to cat plus noun plus plural, and the reverse map for generation.
core - Named entity recognition
Find the spans of a text that name entities such as persons, organizations and places, and label each span with its type.
core - Natural language inference
Decide whether a premise sentence entails, contradicts or is neutral toward a hypothesis sentence.
core - Relation extraction
Find pairs of entity mentions in a text and the semantic relation that holds between them, such as born in or employed by.
core - Semantic parsing
Map a sentence to a formal meaning representation, such as a logical form, a database query or a program, that can be executed.
core - Semantic role labeling
Find the predicates of a sentence and label the spans that fill their roles, such as agent, patient and instrument.
core - Sentence alignment
Pair the sentences of a document with those of its translation, allowing one-to-many, many-to-one and unmatched sentences.
core - Sentence embedding
Map a sentence or a short text to one fixed-size vector so that the cosine of two vectors reflects the semantic similarity of the two texts.
core - Speaker diarization
Split an audio recording into segments by speaker and label segments of the same speaker alike, without knowing the speakers.
core - Speaker verification
Decide whether a speech sample comes from a claimed speaker, by comparing it with the speaker's enrolled samples.
core - Text chunking
Split a sentence into non-overlapping, non-nested phrases such as noun and verb groups, usually as BIO sequence labeling.
core - Text normalization for speech
Rewrite numbers, dates, abbreviations and symbols in a text as the words a speaker would say, such as 1999 as nineteen ninety-nine.
core - Voice activity detection
Mark which frames of an audio signal contain speech and which contain only silence or noise.
core - Word alignment
Find which words of a sentence correspond to which words of its translation, as a set of links between positions.
core - Word analogy
Solve a is to b as c is to what, by the word whose vector is closest to b - a + c, a common test of word embeddings.
core - Word sense disambiguation
Choose the intended sense of an ambiguous word in context from a fixed inventory of senses, such as the WordNet synsets of the word.
core - Truecasing
Restore the proper capitalization of text that is all lower case or all upper case, a sequence labeling problem solved for example by a trigram model over case variants with Viterbi decoding.
advanced
Algorithms
- Greedy decoding
At each step emit the single most probable next token, until an end token. Fast, but its output can be far less probable than the most probable sequence.
1 languagesintro - Lesk algorithm
Choose the sense whose dictionary gloss shares the most words with the context of the ambiguous word.
1 languagesintro - Luhn summarization
Luhn's 1958 extractive method: words of medium frequency are significant, and a sentence scores the best (significant words)^2 / length over its clusters of close significant words.
1 languagesintro - Maximum matching segmentation
Segment a string into words by repeatedly taking the longest dictionary word that starts at the current position, from left to right.
1 languagesintro - Penn Treebank tokenization
Rule-based English word tokenization by regular expressions that splits off punctuation and clitics such as n't and 's, as in the Penn Treebank.
1 languagesintro - Additive attention
At each decoder step score each encoder state by a small feedforward network of it and the decoder state, and take the softmax-weighted sum.
1 languagescore - Arc-eager parsing
Transition-based parsing that adds right arcs as early as possible, with moves shift, left-arc, right-arc and reduce, in linear time.
1 languagescore - Arc-standard parsing
Transition-based dependency parsing with a stack, a buffer and the moves shift, left-arc and right-arc between the two top stack words.
1 languagescore - BLEU
The geometric mean of clipped n-gram precisions for n = 1 to 4 against reference translations, times a brevity penalty. Higher is better, from 0 to 1, at the corpus level.
1 languagescore - Brill tagger
Start from the most frequent tag of each word, then apply learned rewrite rules in order, each chosen greedily to fix the most errors.
1 languagescore - Brown clustering
Greedy agglomerative clustering of words that merges the two classes whose merge least lowers the mutual information of a class bigram model.
1 languagescore - Cavnar-Trenkle n-gram text categorization
Identify the language of a text by comparing the rank order of its most frequent character n-grams with stored profiles under the out-of-place distance.
1 languagescore - Cepstral pitch detection
Estimate the pitch period of a voiced frame from the quefrency of the largest peak of the real cepstrum in the plausible range.
1 languagescore - Code-excited linear prediction
Speech coding by an LPC synthesis filter driven by an excitation chosen from codebooks to minimize perceptually weighted error.
1 languagescore - Deleted interpolation
Mix the n-gram estimates of every order with weights fitted by EM on held-out data, often in buckets by the count of the history.
1 languagescore - Dynamic time warping
Align two sequences of feature vectors by dynamic programming over monotone warping paths, minimizing the summed local distances.
1 languagescore - Eisner algorithm
An O(n^3) dynamic program over complete and incomplete spans that finds the best projective dependency tree under arc-factored scores.
1 languagescore - Forced alignment
Find the time span of each word, phone and HMM state of a known transcript by a Viterbi search through the left-to-right HMM built from that transcript.
1 languagescore - Formant synthesis
Make speech by passing a source signal through resonators set to formant frequencies and bandwidths, controlled by rules over time.
1 languagescore - GMM-UBM speaker verification
Verify a claimed speaker by the average log likelihood ratio per frame between a speaker GMM, MAP-adapted from a universal background model, and that background model.
1 languagescore - Gale-Church alignment
Align sentences by dynamic programming with a cost from a Gaussian model of the ratio of character lengths of matched sentences.
1 languagescore - GloVe
Fit word and context vectors whose dot product plus biases matches the log co-occurrence count, by weighted least squares on nonzero counts.
1 languagescore - Good-Turing estimation
Estimate the total chance of the unseen types as N_1/N and replace each count r by r* = (r+1) N_(r+1) / N_r, where N_r is the number of types seen r times.
1 languagescore - Grow-diag-final symmetrization
Combine the alignments of the two directions by starting from their intersection and adding neighbouring links from their union.
1 languagescore - HMM part-of-speech tagger
Tag words with an HMM whose states are tags: tag n-gram transitions and word emissions come from counts with smoothing, and Viterbi finds the best tag sequence in O(n k^(m+1)).
1 languagescore - Head rules
A table that picks the head child of each phrase type, used to lexicalize trees and to convert constituency trees to dependencies.
1 languagescore - Hearst patterns
Extract hyponym and hypernym pairs from text with six hand-chosen lexico-syntactic patterns, such as X such as Y and Y and other X.
1 languagescore - Hobbs algorithm
Resolve a pronoun by a fixed left-to-right, breadth-first walk of the parse trees of the current and earlier sentences, with agreement checks. A heuristic.
1 languagescore - Incremental algorithm for referring expressions
Build a description of a target object by adding attributes in a fixed preference order whenever they rule out some distractor.
1 languagescore - Katz backoff
An n-gram model that uses discounted counts for the n-grams it has seen and backs off to the shorter history, scaled by a weight alpha(h), for the ones it has not.
1 languagescore - Kneser-Ney smoothing
Absolute discounting whose lower order model uses continuation counts, the number of distinct contexts a word follows, rather than raw counts.
1 languagescore - LexRank
Score sentences by the stationary distribution of a random walk on a graph of idf-weighted cosine similarities above a threshold (0.1), with random jumps, found by the power method.
1 languagescore - Maximum spanning tree dependency parsing
Score every possible arc and take the maximum spanning arborescence by Chu-Liu-Edmonds, which allows non-projective trees.
1 languagescore - Mel filter bank
Weight the power spectrum of each frame by triangular filters spaced evenly on the mel scale and take logs of the band energies.
1 languagescore - Mel-frequency cepstral coefficients
Speech features from the discrete cosine transform of the log mel filter bank energies of each frame, keeping the first dozen or so.
1 languagescore - Mention-pair coreference model
Classify each pair of mentions as coreferent or not, then link each mention to its closest (or most probable) earlier mention classified as coreferent.
1 languagescore - Minimum error rate training
Tune the weights of a log-linear model to maximize BLEU on n-best lists by exact line search along one direction at a time.
1 languagescore - Multi-head attention
Run h attention heads in parallel on learned low-dimension projections of queries, keys and values, then concatenate and project the outputs.
1 languagescore - Multiplicative attention
Score each encoder state by its dot product, or bilinear form, with the current decoder state, then take the softmax-weighted sum, over all states or a local window.
1 languagescore - Nucleus sampling
Sample from the smallest set of most probable next tokens whose total probability reaches p, so the candidate set adapts to the shape.
1 languagescore - Phase vocoder
Time-stretch or pitch-shift audio by changing the hop of the STFT and advancing each bin's phase by its estimated instantaneous frequency.
1 languagescore - Phrase pair extraction
Extract every pair of source and target spans consistent with a word alignment, that is with no link leaving the pair.
1 languagescore - Pitch-synchronous overlap-add
Change pitch and duration by cutting windowed segments centered on pitch marks and overlap-adding them at new spacing.
1 languagescore - Punkt sentence tokenizer
Unsupervised sentence boundary detection of Kiss and Strunk. It finds abbreviations, initials and ordinal numbers by collocation statistics on raw text.
1 languagescore - Rabiner-Sambur endpoint detection
Find the start and end of an isolated word from short-time energy thresholds, refined by zero-crossing rate to keep weak fricatives.
1 languagescore - Scaled dot-product attention
Output softmax(Q K^T / sqrt(d_k)) V: each query gets a mix of the value vectors, weighted by how well each key matches it. Costs O(n^2 d) for n tokens.
1 languagescore - Stack decoding for phrase-based translation
Beam search with one stack per number of covered source words, adding phrase translations to hypotheses with a future cost estimate.
1 languagescore - Structured perceptron
Decode each training sentence by Viterbi and add the features of the gold tags minus those of the predicted tags; averaged in practice.
1 languagescore - TextRank
Rank sentences or words by weighted PageRank with d = 0.85 on a graph whose edges weigh word overlap or co-occurrence, then extract the top ones. A heuristic with no training.
1 languagescore - Time-synchronous Viterbi beam search
Decode speech frame by frame, keeping only states whose score is within a beam of the best, with word ends feeding word starts.
1 languagescore - Token passing
Young's view of Viterbi decoding over a network of HMMs, where tokens holding scores and word histories move along arcs each frame.
1 languagescore - Top-k sampling
Keep only the k most probable next tokens, renormalize their probabilities and sample from them.
1 languagescore - Unit selection synthesis
Speech synthesis that picks recorded units from a large database to minimize the sum of target costs and join costs, found by a Viterbi search over the candidates, and joins them.
1 languagescore - Viterbi training
Train an HMM by alternating a Viterbi alignment of the data with re-estimation from the hard counts. It never lowers the best-path likelihood and is a fast stand-in for Baum-Welch.
1 languagescore - Witten-Bell smoothing
Interpolate each n-gram estimate with the lower order, giving the lower order the weight T(h)/(c(h) + T(h)), where T(h) is the number of distinct words seen after the history h.
1 languagescore - WordPiece
Learn subword units by merging the pair that most raises a unigram likelihood, then encode each word by greedy longest match with
1 languagescore - Yarowsky algorithm
Semi-supervised sense disambiguation that grows a decision list from a few seed collocations using one sense per discourse and one sense per collocation.
1 languagescore - A* parsing
Agenda-based exact Viterbi parsing that pops chart items by inside score plus an admissible and monotonic estimate of the outside score.
1 languagesadvanced - Arc-hybrid parsing
A transition system that takes left-arc from arc-eager and right-arc from arc-standard. It has a simple exact dynamic oracle.
1 languagesadvanced - Bayesian HMM tagging
Unsupervised part-of-speech induction with an HMM under sparse Dirichlet priors. The parameters are integrated out, and collapsed Gibbs sampling draws the tags.
1 languagesadvanced - Byte-level BPE
Byte-pair encoding run on the UTF-8 bytes of a text instead of its characters, so the base vocabulary has 256 symbols and no input is out of vocabulary.
1 languagesadvanced - CTC prefix beam search
Beam search over output prefixes of a CTC model that merges paths giving the same prefix, tracking blank and non-blank endings.
1 languagesadvanced - Connectionist temporal classification
A loss for unaligned sequences that sums over all frame labelings with blanks and repeats collapsing to the target, by forward-backward.
1 languagesadvanced - Cross-lingual embedding mapping
Learn a linear, often orthogonal, map from the embedding space of one language to another from a seed dictionary, solved in closed form by SVD.
1 languagesadvanced - Cube pruning
Approximate k-best combination of hypotheses at each chart cell with a language model, exploring a grid of sorted options lazily from a heap.
1 languagesadvanced - DIPRE
Brin's bootstrapping that alternates between finding text patterns around seed pairs and finding new pairs that match the patterns.
1 languagesadvanced - Diverse beam search
Split the beam into groups and penalize each group for tokens chosen by earlier groups at the same step, to return a varied list.
1 languagesadvanced - Entropy-based n-gram pruning
Remove the n-grams whose removal least raises the relative entropy between the original and pruned backoff models, below a threshold.
1 languagesadvanced - Ephraim-Malah estimator
Speech enhancement by the minimum mean squared error estimate of each spectral amplitude under Gaussian models, with decision-directed SNR.
1 languagesadvanced - Fast align
A log-linear reparameterization of IBM model 2 that favors alignments near the diagonal, trained fast by EM with closed-form normalizers.
1 languagesadvanced - Feature structure unification
Merge two feature structures, directed graphs of attribute values, into the most general one that has the information of both, or fail.
1 languagesadvanced - GHKM rule extraction
Extract minimal rules that pair a fragment of the target parse tree with a source string, cutting the word-aligned tree at its frontier nodes.
1 languagesadvanced - Grid beam search
Beam search with one beam per count of satisfied constraint tokens, so that the output must contain given words or phrases.
1 languagesadvanced - HMM-based speech synthesis
Model spectrum, pitch and duration with context-dependent HMMs trained on speech, then pick state durations, generate smooth parameters and drive a vocoder.
1 languagesadvanced - Hard debiasing of word embeddings
Find a bias direction by PCA of differences such as he - she, remove it from neutral words, and equalize pairs of gendered words about it.
1 languagesadvanced - Joint-sequence grapheme-to-phoneme model
Grapheme-to-phoneme conversion with an n-gram model over graphones, pairs of a letter chunk and a phoneme chunk, trained by EM over all joint segmentations and decoded by Viterbi.
1 languagesadvanced - MAP speaker adaptation
Adapt acoustic model parameters by MAP estimation with the speaker-independent model as prior, so well-observed Gaussians move most.
1 languagesadvanced - Maximum likelihood linear regression
Adapt Gaussian means of an acoustic model to a speaker by affine maps shared over classes of Gaussians, fit by EM on little data.
1 languagesadvanced - Maximum likelihood parameter generation
Turn per-frame Gaussian means and variances of static and delta features into the smooth static trajectory of highest likelihood, by one banded linear solve in O(T) time.
1 languagesadvanced - Maximum mutual information training
Train acoustic models to maximize the posterior of the correct transcript against competitors from a lattice, a discriminative criterion.
1 languagesadvanced - Minimum Bayes risk decoding
Choose the candidate output with the least expected loss under the model, for a loss such as 1 - BLEU or the word error rate, often with the expectation estimated from model samples.
1 languagesadvanced - Modified Kneser-Ney smoothing
Kneser-Ney with three discounts, for counts one, two and three or more, set from counts of counts. The best n-gram smoothing in the measurements of Chen and Goodman.
1 languagesadvanced - Morfessor
Unsupervised morphological segmentation of Creutz and Lagus that splits words into morphs by minimizing a two-part MDL code length of lexicon and corpus.
1 languagesadvanced - Neural transition-based dependency parser
A transition parser whose next move is chosen by a feedforward network on embeddings of words, tags and labels near the stack top.
1 languagesadvanced - PLDA scoring
Score two speaker embeddings by the closed form log likelihood ratio that they share one latent speaker variable in a Gaussian PLDA model.
1 languagesadvanced - Perceptual linear prediction
Hermansky's features: a Bark-scale critical band spectrum with equal loudness and cube-root compression, modeled by an all-pole fit.
1 languagesadvanced - Phonetic decision tree state tying
Cluster triphone HMM states by a tree of yes or no questions about phone context, splitting greedily by likelihood gain.
1 languagesadvanced - RAPT pitch tracker
Talkin's pitch tracker. Candidate periods from normalized cross-correlation peaks, then a dynamic program picks the best voiced or unvoiced path.
1 languagesadvanced - RASTA filtering
Band-pass filter the time series of each log spectral band to remove slow channel effects and fast frame-to-frame noise.
1 languagesadvanced - Retrofitting
Post-process word vectors so that words linked in a lexicon such as WordNet move closer, by iterative updates that also keep each near its original.
1 languagesadvanced - Simple Good-Turing
Good-Turing with smoothed counts of counts: fit log N_r against log r by a line, and use it in place of the raw N_r once the two estimates no longer differ significantly.
1 languagesadvanced - Smatch
Score two AMR graphs by the F1 of matching triples under the best variable mapping, found by hill climbing with restarts.
1 languagesadvanced - Smooth inverse frequency embedding
A sentence vector as the weighted mean of its word vectors with weights a / (a + p(w)), minus its projection on the first principal component.
1 languagesadvanced - Stack decoding
Best-first search over partial word sequences ordered by score plus an estimate of the rest, extending the top of a priority queue.
1 languagesadvanced - Statistical model voice activity detection
Decide speech or noise per frame by a likelihood ratio test of Gaussian models of the spectral bins, smoothed by an HMM hangover.
1 languagesadvanced - Stupid backoff
Unnormalized scores for very large n-gram models: the relative frequency if seen, else 0.4 times the score of the shorter n-gram.
1 languagesadvanced - Subword information skip-gram
Skip-gram in which a word vector is the sum of the vectors of its character n-grams, so rare and unseen words still get vectors.
1 languagesadvanced - Swap transition system
Arc-standard parsing with an extra swap move that reorders words, so it builds any non-projective tree, in quadratic time at worst and near linear time on treebanks.
1 languagesadvanced - Translation edit rate
Word insertions, deletions, substitutions and block shifts from a translation to its closest reference, over the reference length. Greedy shifts make it an upper bound on the fewest edits.
1 languagesadvanced - Unigram language model tokenization
Kudo's subword method. Fit a unigram model over pieces by EM, prune pieces that least lower the likelihood, and segment by Viterbi.
1 languagesadvanced - Weight pushing
Move the weights of a weighted automaton toward the initial state using shortest distances to the final states, which aids pruning.
1 languagesadvanced - Weighted determinization
Turn a weighted automaton with the twins property into an equivalent one with at most one transition per label from each state, by subsets with residual weights.
1 languagesadvanced - Weighted transducer composition
Build the transducer of the relation of T1 followed by T2, pairing states and matching labels, with weights combined in the semiring and an epsilon filter.
1 languagesadvanced - Word embedding association test
Measure bias in embeddings by the difference of mean cosine similarities of two target word sets to two attribute sets, with a permutation test.
1 languagesadvanced - Word mover's distance
The distance between two documents as the minimum cost to move the word embeddings of one to those of the other, an earth mover's distance.
1 languagesadvanced - chrF
An F-score of character n-gram precision and recall between a translation and a reference, weighting recall more. Higher is better, from 0 to 1, at the corpus level.
1 languagesadvanced - BERTScore
Score a candidate text against a reference by greedy matching of their contextual token embeddings by cosine, as precision, recall and F1.
1 languagesresearch - BPE-dropout
Apply the BPE merges in order but skip each candidate merge with probability p at training time, which yields random segmentations of each word.
1 languagesresearch - Biaffine dependency parser
Score each head-dependent pair by a biaffine product of BiLSTM vectors, then decode the best tree under those arc scores.
1 languagesresearch - Contrastive search
Choose among the top-k tokens by probability minus a penalty for the maximum cosine similarity of its hidden state to earlier ones.
1 languagesresearch - Direct preference optimization
Fit a language model to preference pairs with a logistic loss on the difference of its log-ratios to a frozen reference model. It optimizes the RLHF objective with no reward model and no sampling.
1 languagesresearch - End-to-end span-ranking coreference
Score every span up to a width as a mention, prune, score each span with its candidate antecedents and a dummy of score 0, train on the marginal likelihood of gold antecedents, then link.
1 languagesresearch - Fast WordPiece tokenization
Linear-time greedy longest-match WordPiece encoding with a trie extended by failure links and failure pops, in the style of Aho-Corasick.
1 languagesresearch - FlashAttention
Exact attention computed in tiles that fit in fast on-chip memory with an online softmax, so the n by n score matrix is never written out.
1 languagesresearch - Lattice-free MMI
MMI training of neural acoustic models in which the denominator is a phone n-gram graph run on the GPU, so no lattices are needed.
1 languagesresearch - Low-rank adaptation
Fine-tune a large model by freezing a weight matrix W0 and training a rank-r update B A, scaled by alpha / r and zero at the start. The update merges into W0, so inference costs nothing extra.
1 languagesresearch - SimCSE
Train sentence encoders by a contrastive loss in which the positive for a sentence is the same sentence passed again under a new dropout mask.
1 languagesresearch - Span-based neural constituency parsing
A neural network scores each labeled span of the sentence, and a CKY-style dynamic program over spans finds the binary tree with the largest total score.
1 languagesresearch - Speculative decoding
A small draft model proposes several tokens. The large model checks them in one pass and accepts each by a rule that keeps its exact distribution.
1 languagesresearch - Stochastic beam search
Beam search on Gumbel-perturbed log-probabilities that draws k sequences without replacement exactly from a sequence model.
1 languagesresearch - Typical sampling
Keep the tokens whose surprisal is closest to the entropy of the next-token distribution, up to mass tau, and sample among them.
1 languagesresearch - pYIN
YIN with a distribution over thresholds that gives many pitch candidates with probabilities, then Viterbi decoding of a pitch HMM.
1 languagesresearch
Data structures
- Word lattice
A directed acyclic graph of word hypotheses with times and scores that compactly holds many alternative transcriptions.
1 languagescore - Confusion network
A lattice reduced to a linear sequence of slots of competing words with posteriors, whose best path approximately minimizes expected word errors.
1 languagesadvanced - Key-value cache
Store the attention keys and values of past tokens during decoding, so each new token costs attention time linear in the length, not quadratic.
1 languagesadvanced
Techniques
- Laplace smoothing
Add one, or a constant k, to every count before normalizing, so no event gets zero probability. Simple, but with a large vocabulary it takes too much mass from seen events.
intro - Pre-emphasis
Filter speech by y[n] = x[n] - a x[n-1] with a near 0.97, which boosts high frequencies before spectral analysis.
intro - Temperature sampling
Sample the next token from softmax(z / T). T below 1 sharpens the distribution toward greedy, T above 1 flattens it toward uniform.
1 languagesintro - Absolute discounting
Subtract a fixed discount D from every nonzero n-gram count and give the freed mass to the lower-order model, with D often set to N_1 / (N_1 + 2 N_2).
core - Back-translation
Translate monolingual target text into the source language with a reverse model, and add the synthetic pairs to the training data.
core - Causal language modeling
Train a network to predict each token from the tokens before it, with a triangular attention mask so no position sees the future.
core - Cepstral mean normalization
Subtract the mean of each cepstral coefficient over an utterance, which approximately removes a fixed channel filter, and often scale to unit variance.
core - Delta features
Append to each frame the slopes of its features over a few neighbouring frames, and the slopes of those, found by linear regression.
1 languagescore - Hierarchical softmax
Replace the softmax over V words by the product of the binary logistic decisions on the path to the word in a binary tree. A balanced tree has paths of length at most ceil(log2 V).
1 languagescore - Lattice rescoring
Rescore the paths of a lattice or n-best list from a first pass with a stronger language or acoustic model.
core - Length normalization
Divide the log probability of each finished beam hypothesis by a function of its length, such as |Y|^alpha, so that beam search does not prefer short outputs.
1 languagescore - Masked language modeling
Train a bidirectional encoder to recover tokens that were masked or replaced at random positions from the rest of the sentence.
core - Negative sampling
Train word vectors by logistic loss that tells observed word-context pairs from k random pairs drawn from a smoothed unigram distribution.
1 languagescore - Sakoe-Chiba band
Restrict the warping path of DTW to the cells within a fixed distance r of the diagonal. This saves time and stops degenerate alignments, but it can miss the optimum.
1 languagescore - Sinusoidal positional encoding
Add to each token vector sines and cosines of its position at geometrically spaced frequencies, so attention can use word order.
1 languagescore - Distant supervision
Label training sentences for relation extraction by matching entity pairs to facts in a knowledge base, accepting noisy labels.
advanced - Dynamic oracle
Train a transition parser on its own possibly wrong configurations, with an oracle that gives the moves that can still reach the best tree.
advanced - HCLG decoding graph
Compose HMM, context, lexicon and grammar transducers into one optimized WFST that maps HMM states to words for search.
advanced - Minimum risk training
Train a sequence model to minimize the expected loss, such as 1 - BLEU, over a sample of its own outputs, renormalized.
1 languagesadvanced - Multilingual neural machine translation
One model translates among many languages by a token that names the target language, and can translate pairs never seen together.
advanced - Noise-contrastive estimation
Fit an unnormalized model by logistic regression that tells data samples from noise samples. It avoids the full softmax over a large vocabulary.
advanced - Parent annotation
Split each nonterminal of the treebank trees by the label of its parent, so a PCFG sees more context. Klein and Manning measured F1 rising from 72.62 to 76.81.
1 languagesadvanced - Repetition penalty
Lower the logits of tokens that already occur in the output, by a factor or by an amount per occurrence, to curb loops.
1 languagesadvanced - Rotary position embedding
Rotate pairs of query and key coordinates by angles proportional to position, so that their dot product depends only on the relative offset.
1 languagesadvanced - Scheduled sampling
During training feed the model its own predicted token instead of the gold one with a probability that grows on a schedule.
advanced - Sequence-level knowledge distillation
Train a small translation model on the beam search outputs of a large one, rather than on the gold targets.
advanced - Shallow fusion
Add a weighted external language model log-probability to the score of an end-to-end recognizer at each step of beam search.
advanced - SpecAugment
Augment speech training data by masking random blocks of frequency channels and time steps of the spectrogram, and by time warping.
advanced - Subword regularization
Sample a different segmentation of each training sentence from a unigram tokenization model, so the network sees many splits and grows robust.
1 languagesadvanced - Supertagging
Assign each word a rich lexical category, such as a CCG category or a TAG elementary tree, by sequence tagging before full parsing.
advanced - Vocal tract length normalization
Warp the frequency axis of each speaker by a factor chosen by maximum likelihood, to reduce differences in vocal tract length.
advanced - Attention with linear biases
Add to each attention score a penalty linear in the distance between query and key, with a fixed slope per head, instead of position vectors.
1 languagesresearch - Chain-of-thought prompting
Put worked reasoning steps into the prompt so that a language model writes steps before its answer. Measured gains on multi-step problems appeared only in models of about 100B parameters.
research - Cross-domain similarity local scaling
Retrieve translations by cosine similarity minus the mean similarity of each word to its k nearest neighbours, which reduces hubness.
research - Grammar-constrained decoding
Mask at each step the tokens that cannot extend the output to a string of a given regular or context-free language, tracked by an automaton.
research - Grouped-query attention
Let groups of query heads share one key head and one value head, which shrinks the key-value cache with little loss in quality.
1 languagesresearch - Instruction tuning
Fine-tune a pretrained language model on tasks written as instructions with answers. Measured gains on unseen tasks appear in large models; FLAN models of 8B and below got worse.
research - Joint CTC-attention
Train an attention encoder-decoder with an extra CTC loss on the encoder, and combine both scores in decoding for monotonic alignment.
research - Reinforcement learning from human feedback
Fit a reward model to human comparisons of outputs, then tune the language model by policy gradient to raise reward under a KL penalty.
research - Replaced token detection
Pretrain an encoder to tell, at every position, whether a small generator network replaced the token, which learns from all positions.
research - Self-consistency
Sample many chain-of-thought answers and return the final answer that occurs most often among them.
research
Concepts
- Distributional hypothesis
Words that occur in similar contexts tend to have similar meanings, so the contexts of a word can stand for its meaning.
intro - Out-of-vocabulary word
A word at test time that is not in the fixed vocabulary of a model. Handled by an UNK token, by smoothing, or by splitting words into subwords.
intro - Contextual word embedding
A vector for each occurrence of a word computed from the whole sentence by a deep network, so one word gets different vectors in different senses.
core - Natural language generation pipeline
The classic split of data-to-text generation into document planning, microplanning with referring expressions, and surface realization.
core - Subword tokenization
Represent words as sequences of frequent pieces learned from data, so that a fixed vocabulary covers every word and rare words share pieces.
core - Exposure bias
A model trained with teacher forcing sees only gold prefixes, but at test time conditions on its own outputs, so errors can compound.
advanced - Label bias problem
In locally normalized models such as MEMMs, states with few successors pass on their mass whatever the input, which motivated CRFs.
advanced - In-context learning
A pretrained language model does a new task from an instruction and a few solved examples in its prompt, with no change to its weights. How well it works is measured, not proved.
research - Inadequacy of the mode
A measured fact: the most probable output of a neural translation model is often empty or too short, so wider beams and exact search can lower the quality.
research - Neural scaling law
Fitted, measured power laws for how the test loss of language models falls with parameters, data and compute. Kaplan et al. (2020) and Hoffmann et al. (2022) fitted different laws.
research
Definitions
- Attachment score
The fraction of words whose predicted head is correct (unlabeled) or whose head and relation label are both correct (labeled).
intro - BIO encoding
Encode spans as token tags B for the first token, I for the next ones and O outside, so span finding becomes sequence labeling.
1 languagesintro - Dependency tree
A rooted tree over the words of a sentence with a labeled arc from each head word to each of its dependents.
intro - Equal error rate
The error rate at the threshold where the false acceptance rate equals the false rejection rate, the usual single number for a verification system.
1 languagesintro - Language model
A probability distribution over finite sequences of tokens, written by the chain rule as a product of the probabilities of each token given those before it, with an end marker.
intro - Mean opinion score
The mean of listener ratings of speech quality or naturalness on a five-point scale, the standard subjective score of TTS.
intro - Mel scale
A pitch scale from listener tests. Speech tools use m = 2595 log10(1 + f/700); other mel formulas exist, such as Slaney's and the 1937 table of Stevens, Volkmann and Newman.
1 languagesintro - Parallel corpus
A collection of texts paired with their translations, aligned at the document or sentence level, the training data of translation models.
intro - Perplexity
The exponential of a model's per-token cross-entropy on held-out text, exp(H) in nats or 2^H in bits, which is the inverse geometric mean of the token probabilities. Lower is better.
intro - Pointwise mutual information
PMI(x, y) = log P(x, y) / (P(x) P(y)), the log ratio of how often two events occur together to how often they would if independent.
intro - Pronunciation lexicon
A list that gives each word of the vocabulary one or more phoneme sequences, linking word models to phone models.
intro - Span-level F1 score
Precision and recall of predicted spans that match a gold span exactly in boundaries and type, combined as their harmonic mean.
1 languagesintro - Treebank
A corpus of sentences annotated with their syntactic trees, used to read off grammars and to train and test parsers.
intro - Word embedding
A map from each word of a vocabulary to a dense real vector, usually of 50 to a few hundred dimensions, fit from text so that words used alike lie close together.
intro - Word error rate
The number of substitutions, deletions and insertions in the minimum edit alignment of hypothesis to reference, over reference length.
1 languagesintro - Word-context matrix
The matrix whose entry (w, c) counts how often word w occurs near context c in a corpus, the raw material of count-based word vectors.
intro - Zero-crossing rate
The fraction of adjacent samples in a frame whose signs differ, high for unvoiced fricatives and low for voiced speech.
intro - Alignment error rate
1 - (|A and S| + |A and P|) / (|A| + |S|) for predicted links A, sure gold links S and possible gold links P.
1 languagescore - PARSEVAL measures
Precision, recall and F1 of the labeled constituent spans of a predicted tree against a gold tree, the standard score of constituency parsers.
core - Positive pointwise mutual information
PPMI(w, c) = max(PMI(w, c), 0), which drops unreliable negative values and makes a sparse word-context weighting that works well for similarity.
core - Projective dependency tree
A dependency tree in which every word between a head and its dependent is a descendant of that head, so arcs drawn above do not cross.
core - ROUGE
Recall-oriented summary metrics based on the overlap of n-grams, or the longest common subsequence, between a candidate and reference summaries.
1 languagescore - Resnik similarity
The similarity of two concepts in a taxonomy as the information content -log P(c) of their most informative common subsumer.
core - Universal part-of-speech tagset
A coarse part-of-speech tagset shared across languages: 12 tags in Petrov, Das and McDonald (2012), and 17 UPOS tags in Universal Dependencies, with mappings from treebank tagsets.
core - Abstract meaning representation
A rooted, directed, labeled graph of concepts and relations that captures who did what to whom in a sentence, abstracting from syntax.
advanced - B-cubed metric
Coreference precision and recall averaged over mentions, from the overlap of the predicted and gold clusters that hold each mention.
1 languagesadvanced - Synchronous context-free grammar
A grammar whose rules rewrite a nonterminal into a pair of strings with linked nonterminals, deriving a source and target sentence together.
advanced
Theorems
- SGNS as implicit matrix factorization
If every dot product w . c is free, the best skip-gram with k negative samples has w . c = PMI(w, c) - log k, so it factorizes a shifted PMI matrix.
advanced - NP-hardness of optimal tokenization
Deciding whether K new pieces or K merges can shrink a corpus to a given number of tokens is NP-complete, so the optimization is NP-hard and greedy BPE is a heuristic.
research
Models
- N-gram language model
A language model that conditions each token only on the n - 1 tokens before it, with probabilities estimated from counts in a corpus and smoothed to fill the zeros.
intro - Noisy channel model of translation
Find the target sentence e that maximizes P(e) P(f | e), a language model times a translation model, for the source sentence f.
intro - Source-channel model of speech recognition
Choose the word sequence W that maximizes P(O | W) P(W), an acoustic model times a language model, for the acoustic features O.
intro - Source-filter model
Speech as a glottal or noise source passed through a vocal tract filter, so the spectrum splits into an excitation and an envelope.
intro - Continuous bag-of-words model
A word2vec model that predicts the center word of a window from the sum or mean of the vectors of the words around it.
1 languagescore - Encoder-decoder model
One network encodes the source sequence into vectors and another generates the target sequence one token at a time from them.
core - GMM-HMM acoustic model
Model each phone by a left-to-right HMM, usually three states, whose emissions are Gaussian mixtures over feature vectors.
core - HMM alignment model
Word alignment as an HMM over source positions, with jump probabilities that depend on the distance between successive aligned positions.
1 languagescore - IBM model 1
A translation model in which each source word is generated by a uniformly chosen target word. EM reaches a global maximum of its concave likelihood, but the maximizer need not be unique.
1 languagescore - IBM model 2
IBM model 1 plus an alignment distribution over source positions that depends on the target position and the sentence lengths.
1 languagescore - Log-linear translation model
Score a translation by a weighted sum of feature functions, such as language and phrase model log-probabilities and penalties.
core - Maximum entropy Markov model
A tagger with a log-linear distribution of each tag given the previous tag and features of the input, decoded by Viterbi.
core - Neural probabilistic language model
Bengio's model that concatenates learned vectors of the previous n - 1 words and feeds them through a hidden layer to a softmax over the vocabulary.
core - Phrase-based translation model
Translate by segmenting the source into phrases, translating each by a phrase table and reordering them, scored by a log-linear model.
core - Recurrent neural network language model
A language model whose recurrent hidden state summarizes the whole history and gives a softmax over the next word at each step.
core - Skip-gram model
A log-linear model that predicts each word in a window around a word from that word's vector. Its learned input vectors are word embeddings.
1 languagescore - Transformer
A network of stacked blocks of self-attention and feedforward layers with residual connections and normalization, with no recurrence.
core - Triphone model
A phone model that depends on the phones to its left and right, which captures coarticulation at the cost of many more models.
core - Two-level morphology
Koskenniemi's model in which parallel finite-state transducers relate lexical and surface forms, so a lexicon and rules give analysis and generation.
core - BERT
A transformer encoder pretrained by masked language modeling and next sentence prediction, then fine-tuned with a small head per task.
advanced - BiLSTM-CRF
A bidirectional LSTM gives each token tag scores, and a linear-chain CRF layer on top adds tag transitions and decodes by Viterbi.
advanced - Cache language model
Interpolate a static language model with a unigram or bigram model of the recent words in the document, since words just used tend to recur.
advanced - Centering theory
A model of local discourse coherence that ranks the entities of each utterance and classifies transitions as continue, retain, smooth shift or rough shift.
advanced - Combinatory categorial grammar
A lexicalized grammar whose words have functor categories such as (S\NP)/NP, combined by application, composition and type raising.
advanced - Dependency model with valence
Klein and Manning's generative model for unsupervised dependency induction, with stop and attach decisions on each side of a head, trained by EM.
advanced - ELMo
Contextual word vectors taken as a learned weighted sum of the layers of a deep bidirectional LSTM language model trained on a large corpus.
advanced - Generative pretrained transformer
A transformer decoder pretrained by causal language modeling on a large corpus, then fine-tuned or prompted for downstream tasks.
advanced - Hierarchical phrase-based translation
Chiang's model of synchronous CFG rules with phrases and gaps learned from aligned text, decoded by CKY-style chart parsing.
advanced - Hybrid DNN-HMM acoustic model
Replace the Gaussian mixtures of an HMM recognizer by a neural network that predicts state posteriors, divided by state priors.
advanced - IBM model 3
A translation model in which each source word has a fertility, the number of target words it produces, plus distortion; trained by approximate EM.
1 languagesadvanced - Inversion transduction grammar
Wu's synchronous grammar in binary normal form whose rules keep or invert the order of two children, biparsing a sentence pair in time cubic in each sentence length.
advanced - Latent-variable PCFG
A PCFG whose nonterminals are split into latent subcategories learned by EM, with repeated split, merge and smoothing rounds.
advanced - Lexicalized PCFG
A PCFG whose nonterminals carry their head word and tag, with rule probabilities factored into head and dependent generation steps.
advanced - Lexicalized reordering model
The probability that a phrase pair is placed monotone, swapped or discontinuous relative to the previous phrase, learned per phrase pair.
advanced - Listen, attend and spell
An attention encoder-decoder recognizer with a pyramidal BiLSTM listener that emits characters without a lexicon or HMM.
advanced - Maximum entropy language model
A log-linear model of the next word given features of the history, such as n-grams and triggers, fit to match feature expectations.
advanced - Paragraph vector
Le and Mikolov's model that learns a vector per document jointly with word vectors, by predicting the words of the document from it.
advanced - Pointer-generator network
An encoder-decoder that at each step mixes generating a word from the vocabulary with copying a source word through its attention weights.
advanced - RNN transducer
A streaming end-to-end model joining an acoustic encoder and a label predictor network, trained by summing over alignments in a lattice.
advanced - Rhetorical structure theory
A theory of discourse that builds a tree over text spans joined by relations such as elaboration or contrast between nucleus and satellite.
advanced - Semi-Markov conditional random field
A CRF over segmentations into labeled spans, with features of whole spans, decoded by a segment Viterbi in O(n L k^2) time.
advanced - Tree-adjoining grammar
A mildly context-sensitive formalism that builds trees from elementary trees by substitution and adjunction, parsed in O(n^6) time.
advanced - i-vector
A low-dimension vector for an utterance, the posterior mean of a latent factor in a factor analysis model of GMM supervectors.
advanced - COMET
A learned translation metric that predicts human scores from multilingual encoder embeddings of the source, hypothesis and reference.
research - Conformer
A speech encoder block that sandwiches self-attention and a convolution module between two half-step feedforward layers.
research - FastSpeech
A non-autoregressive transformer TTS model that repeats each phoneme encoding by its predicted duration and outputs all mel frames in parallel.
research - HiFi-GAN
A GAN vocoder that turns mel spectrograms into waveforms with a convolutional generator, judged by multi-period and multi-scale discriminators.
research - Neural codec language model
TTS as language modeling over the discrete tokens of a neural audio codec, prompted by a few seconds of a speaker to copy an unseen voice.
research - Non-autoregressive translation
Generate all target tokens in parallel, or refine them over a few rounds, given a predicted length, trading quality for speed.
research - Preference reward model
A network that scores a response so that the chance one response is preferred to another is the sigmoid of the score difference.
research - Selective state space model
A linear recurrent layer whose state matrices depend on the input, computed by a parallel scan in time linear in sequence length.
research - Sentence-BERT
A siamese BERT encoder with mean pooling, fine-tuned on sentence pairs so that the cosine of two pooled vectors scores semantic similarity.
research - Tacotron
An attention-based encoder-decoder that maps characters or phonemes to mel spectrogram frames, one step at a time, followed by a vocoder.
research - VITS
End-to-end TTS that joins a conditional VAE, a normalizing flow and adversarial training, and finds durations by monotonic alignment search.
1 languagesresearch - WaveNet
An autoregressive model of raw audio that predicts each mu-law quantized sample from the past with stacks of dilated causal convolutions.
research - wav2vec 2.0
Self-supervised speech pretraining that masks latent frames and learns to pick the true quantized latent among distractors by contrastive loss.
research - x-vector
A speaker embedding from a time-delay neural network with statistics pooling, trained to classify speakers.
research