Elamur Research

On the accuracy of self-normalized log-linear models

Paper · 2015 · Jacob Andreas, Maxim Rabinovich, Dan Klein et al.

Summary

To assign a probability to a word, a language model can give the word a score and then divide its exponentiated score by the total across the vocabulary. The division is easy. Obtaining the total can be expensive, especially when a translation system requests scores for particular words over and over. Self-normalization moves some of that work into training. It encourages the total to stay near one, so the system can use the score for a requested word as an approximate log probability. The authors ask when a log-linear model can learn to do this while still assigning high probability to the observed answers.

The paper approaches the question from the input and the output sides. On the input side, a fixed set of weights can normalize exactly on a whole surface in feature space. Inputs near such a surface are promising because the log of the total changes slowly enough with the features under bounded weights. On the output side, the authors compare the best ordinary likelihood fit with the best fit required to keep its log normalizers near a common target. They bound the loss by constructing a feasible fit with smaller weights. If the original fit predicts distributions close to uniform, shrinking the weights toward a uniform predictor costs little likelihood. A separate argument gives a favorable bound when each input has a clearly preferred output under the paper’s discrete feature assumptions.

The authors also construct a case in which the log normalizer continues to vary substantially even after changing the weights in every way that preserves the conditional probabilities. This matters because a single poorly normalized fit could simply have used an inconvenient set of scores. The construction shows that, within the specified feature family, the variation can persist across equivalent representations. It gives a lower bound on that variation. A lower bound on the likelihood cost of moving to a different, better-normalized conditional distribution remains open.

Experiments on synthetic inputs vary how sharply the generating distribution favors particular outputs. The reported likelihood gap is small towards the almost uniform and sharply concentrated ends of the sweep and larger in between. Relaxing the normalization requirement also reduces the gap. A translation language model supplies a comparison for the normalization–likelihood tradeoff. The results explain why the shortcut can be inexpensive in likelihood in some settings and why the distribution of inputs and the pattern of predictions across them matter.

Deep dive: On the accuracy of self-normalized log-linear models

This paper explains when log-linear models can skip an expensive normalization step and how much predictive likelihood that shortcut can cost. · about 34 minutes to read

The problem and its context

When a score needs a denominator

Suppose a system has already decided which candidate word it wants to evaluate. A log-linear predictor can obtain a score for that word by combining features with learned weights. To turn the score into a probability, it exponentiates the score and divides by the total exponentiated score over all candidates. The total is called the normalizer. Its logarithm is the log normalizer, also called the log partition function. To obtain a log probability, the system subtracts the log normalizer from the original score.

The same correction applies to all candidates at a given input. Adding it or leaving it out therefore preserves their order at that input. The correction can change when the input changes, however. If a decoder is comparing hypotheses with different contexts, the scores it adds along one hypothesis can be missing different corrections from those along another. A system can therefore need probabilities or comparable log scores even when it only wants to evaluate a few candidate words at each step. This is where repeatedly summing over a large vocabulary becomes costly.

The motivating system comes from Fast and Robust Neural Network Joint Models for Statistical Machine Translation. As described by the authors, the system used a feed-forward neural predictor with a softmax output during machine translation decoding. Softmax is the operation that exponentiates the output scores and divides by their sum. A decoder could query the predictor millions of times, so computing that sum on every query was a substantial burden. Training the predictor to keep its log normalizer near zero made the individual output activations usable as approximate log probabilities.

Zero is a meaningful target here. The underlying total is positive, so a log normalizer of zero means that the total is one and the scores require no correction. A positive log normalizer means that the raw log scores are larger than the normalized log probabilities, and a negative one means that they are smaller. A squared penalty on the log scale treats errors of equal size in those directions alike. It also measures the error in the same units as the log scores a decoder would use.

The expense takes other forms when the output is something other than a word. In a structured prediction problem, there may be a combinatorial set of possible outputs and a substantial dynamic program for summing over them. With continuous outputs, normalization requires an integral. The paper places its definitions in this broader setting before specializing to finite output spaces and particular feature constructions for several of its results. The step from the vocabulary example to the general formulation matters because summing a finite list and integrating a density impose different conditions on whether a normalizer exists at all.

What earlier approaches changed

The direct penalty used in the motivating translation work adds a training preference to the ordinary likelihood objective. A fit receives credit for predicting the observed label and loses credit when the log normalizer is far from zero. In the objective the paper reproduces, computing that penalty requires the log normalizer during training. The intended savings come when the trained predictor is queried. The strength of the penalty determines how much the fit is allowed to give up in likelihood to make that saving possible.

The paper also describes noise-contrastive estimation as a route to self-normalization. It uses a classification task to distinguish samples associated with the distribution of interest from samples drawn from a noise distribution. The formulation permits normalizers to be represented by estimates and learned with the other parameters. Fixing those estimates to one is another choice, and the paper cites Decoding with Large-Scale Neural Language Models Improves Translation for empirical evidence of self-normalizing behavior with that choice. The two training approaches provide different ways to arrive at scores intended for use without a fresh normalizer calculation.

Other approaches described in the paper aim to make normalization itself cheaper. Quadrature, herding and Monte Carlo methods approximate sums or integrals. A hierarchical softmax changes how a probability is assigned in the finite case. It places the outputs at the leaves of a binary tree and obtains a leaf’s probability by multiplying the probabilities of the decisions along its path. The paper describes the resulting computation as logarithmic in the number of outputs, compared with work linear in that number for the ordinary finite sum. It also identifies a restriction on the distributions that can be represented this way and limits the comparison to discrete outputs.

These earlier approaches establish the practical motivation for the paper’s question. Prior theoretical work had examined how many observations were needed to learn self-normalizing parameters for a restricted family. The authors focus on a different issue. Even with enough data to tell whether the normalization penalty will generalize, a predictor might have to change the probabilities it assigns to get its log normalizers into the desired range. The paper studies how large that change can be in likelihood and when a given conditional distribution leaves any freedom to avoid it.

The method, step by step

From a score to a conditional probability

The paper starts with a parameter vector and a feature vector for an input paired with a proposed output. A feature could describe the input, the output or their interaction. The inner product of the two vectors gives the score. To form a conditional probability or density, the authors allow a non-negative base weight for the output and divide out the total weight. This formulation encompasses the ordinary finite softmax and also allows the total to be expressed as an integral.

Fitting and using a self-normalizing log-linear predictor

The steps in order.

Fitting and using a self-normalizing log-linear predictorStep 1: Represent each input and candidate output with features1. Represent each input and candidate output with featuresStep 2: Form scores using shared learned parameters2. Form scores using shared learned parametersStep 3: Compute the log normalizer during fitting3. Compute the log normalizer during fittingStep 4: Fit likelihood with a normalization requirement4. Fit likelihood with a normalization requirementStep 5: Compare against the unconstrained likelihood fit5. Compare against the unconstrained likelihood fitStep 6: Use raw scores as approximate log probabilities6. Use raw scores as approximate log probabilities
pη(y | x) = h(y) exp(ηᵀT(x, y) − A(x, η))

Here, pη is the conditional probability or density indexed by η, the vector of learned parameters. The input is x and the proposed output is y. The base weight h(y) is non-negative. The feature map T takes x and y together and returns a vector in the same space as η. The superscript ᵀ forms the inner product of η with that vector, and exp is the exponential function. A(x, η) is the log normalizer.

A(x, η) = log ∫𝒴 h(y) exp(ηᵀT(x, y)) dμ(y)

Here, A is the log normalizer at input x and parameters η. The output space is 𝒴. The integration variable y ranges over that space, and μ is the measure used to total the mass. The functions h and T supply the base weight and feature vector for each output, ᵀ denotes the inner product, exp is exponentiation and log is the natural logarithm. When the integral is positive and finite, the density integrates to one with respect to μ.

For a finite list of outputs with counting measure and equal unit base weights, integration becomes a sum. This is the case closest to the translation example. Each word contributes its exponentiated score to the total. With a nonconstant base weight, the log of that weight is also part of the raw log score wherever the weight is positive. Across both cases, A is the correction shared by all outputs at a given input.

The paper assumes that the Euclidean norm of every feature vector is at most R and that the Euclidean norm of the parameter vector is at most B. A Euclidean norm measures the length of a vector. Bounding these lengths limits the largest change in score that the proofs have to allow. The authors also assume a constant feature, written x₀ = 1, with associated weight η₀. An output-independent constant allows the scores, and therefore the log normalizer, to be shifted together. The probabilities survive such a shift because exactly the same quantity is added to their scores and subtracted by normalization.

How the training objective encourages small corrections

The objective from the neural translation work illustrates what changes in training. It evaluates each observed word under the normalized predictor, then charges an additional cost for a large correction. Written so that the two uses of the correction are visible, the objective is as follows.

maximize over W: ∑ᵢ [N(yᵢ | xᵢ; W) − Lᵢ(W) − α Lᵢ(W)²]

Here, W denotes the network weights. The index i ranges over training examples, xᵢ is an input and yᵢ its observed output. N is the network’s output activation for the given input and output. Lᵢ(W) is the log normalizer for the input in example i, and α is the weight assigned to its squared penalty. The sum combines the normalized log probability and the penalty across the training examples.

Lᵢ(W) = log ∑ᵧ′ exp(N(y′ | xᵢ; W))

Here, Lᵢ is the correction at training example i, W gives the network weights and xᵢ is the example’s input. The symbol y′ ranges over all possible outputs in the sum. N is the activation for that candidate, exp turns it into a positive weight and log gives the logarithm of the total.

The first two terms of the objective reward probability assigned to the observed output. Their difference is the actual log probability, so changing a whole row of scores by a common amount would leave those terms unchanged. The penalty supplies a preference among score representations that likelihood alone can treat as equivalent. If reducing the penalty requires changing the relative scores as well, the two parts of the objective compete. Adjusting α changes the strength of that competition.

The authors analyze a simpler parameterization than the whole feed-forward network. They work with features whose scores are linear in a common weight vector. Those features can also be the output of earlier layers of a trained network. If the earlier layers are held fixed and the last layer alone is retrained, its parameters enter in the form the paper analyzes. This explains the relationship between the motivating neural objective and the theoretical setting while keeping the feature map fixed during the analysis.

Exact normalization and the role of the inputs

For fixed weights, exact self-normalization is a property of a set of inputs. On that set, the weighted scores already have total mass one before any division. The authors write the set as a zero level of the log normalizer.

Sη = {x ∈ 𝒳 : A(x, η) = 0}

Here, Sη is the set associated with parameters η, 𝒳 is the space of possible inputs and x is an element of that space. A(x, η) is the log normalizer. Its value zero defines membership in Sη.

Any input distribution supported on Sη can use those weights with exact normalization on its support. The condition says nothing about whether the resulting probabilities resemble the desired conditional probabilities. It does establish that, for normalization alone, the arrangement of inputs in feature space can matter more than how many inputs the distribution contains. A whole collection can share exact normalization if its features lie on the appropriate level set.

The paper gives an example with inputs log 2 and −log 2 and labels −1 and 1. The score uses the product of input and label, together with a constant weighted by log(2/5). Reversing the sign of the input switches which label receives the larger score. The same exponentiated weights still enter the total, so the reversal leaves the log normalizer at zero. This example shows how genuine changes in the predicted distribution can coexist with a fixed total.

For another geometric view, the paper considers a finite output space with a block of weights for each label. Each block takes an inner product with the same input representation. In this setting, the log normalizer is the logarithm of a sum over the class-specific scores after exponentiation.

A(x, η) = log ∑ᵧ exp(ηᵧᵀt(x))

Here, x is the input, η collects all class weights and ηᵧ is the block for class y. The function t maps the input to its feature vector. The superscript ᵀ denotes the inner product. The sum ranges over classes y, exp exponentiates their scores and log gives the log normalizer A.

When the class scores are convex functions of x, this log normalizer is convex in x. Its sublevel regions are convex. The paper uses their boundaries to describe the exact-normalization surfaces in its examples. A distribution can thus spread its support along a surface while retaining exact normalization under the same weights. The corresponding question with the roles reversed can have different geometry. For a fixed distribution of inputs, the region of weights meeting a squared normalization tolerance can be non-convex. The paper illustrates this with a small feature map and a uniform distribution on the inputs 1 and 2.

Approximate normalization and distance in feature space

Approximate normalization lets the authors discuss inputs away from the exact surface. They give an error on a rare input less weight than the same error on a common input by averaging over the input distribution. Squaring the error prevents positive and negative log corrections from canceling and gives larger deviations more influence.

Eₚ[A(X, η)²] < δ²

Here, p is the input distribution, X is a random input from p and Eₚ is expectation under that distribution. A(X, η) is the log normalizer with parameters η, and δ is the tolerance. The square on A measures distance from zero, and δ² is the threshold on the expected squared distance.

This quantity includes the effect of a systematic offset. If all log normalizers are equal to the same non-zero value, their variance around their mean is zero, while their squared error around zero is positive. A constant feature can absorb a common offset when the necessary weight is available. The distinction becomes important when the paper moves from its training criterion, which uses deviation about a specified target, to a lower bound on variance, which measures variation after centering.

To discuss nearby inputs, the authors compare feature vectors. One input is close to another for this purpose when replacing it changes the feature vector by little across the full output space. Checking all outputs is relevant because every output contributes to A. Closeness on features for the observed label alone would leave the contributions of the remaining labels uncontrolled.

Eₚ[infₓ⋆∈S supᵧ∈𝒴 ‖T(X, y) − T(x⋆, y)‖₂] ≤ D

Here, p is the input distribution and Eₚ averages over its random input X. The set S is the reference set of inputs, and x⋆ is a candidate member of S. The infimum chooses the least distance available over those candidates. The supremum considers the largest feature change over outputs y in 𝒴. The function T produces a feature vector, the symbol ‖·‖₂ denotes Euclidean length and D bounds the resulting expected distance.

The comparison is useful because if all scores change by a small amount, the log of the total can change by at most that amount. Bounded parameter length transfers a bound on the change in features to all the scores. This gives the pointwise reason that inputs near an exactly normalizing set tend to have small log corrections. The paper presents a BD approximate-normalization claim from its closeness definition. The statement and its proof have discrepancies concerning the target level and the moment being bounded, which affect how that claim can be read. The pointwise argument explains the geometry, while the stated expected-square guarantee calls for the qualifications discussed below.

Comparing the best two likelihood fits

The central accuracy question begins with a collection of input–output pairs. The authors sum the log probabilities assigned to the observed outputs. Maximizing that sum gives the ordinary maximum-likelihood fit. A second optimization seeks the best likelihood among parameters whose squared log normalizers satisfy a constraint on the observed inputs.

ℓ(η | x, y) = ∑ᵢ log pη(yᵢ | xᵢ)

Here, ℓ is the log likelihood, η is the parameter vector and x and y denote the collections of observed inputs and labels. The index i runs over paired observations. The conditional probability or density pη at observation i is evaluated at output yᵢ given input xᵢ. The logarithm converts these values to additive contributions.

V(η) = (1/n) ∑ᵢ A(xᵢ, η)²

Here, V is the empirical mean squared log normalizer for parameters η, n counts the observations and i indexes them. The input in example i is xᵢ, and A is the log normalizer evaluated there. The square is taken separately for each example.

η̂ = argmaxη ℓ(η | x, y)

Here, η̂ is an unconstrained maximum-likelihood parameter within the model under consideration. The argmax chooses a value of the parameter vector η that maximizes the log likelihood ℓ on observed inputs x and labels y.

η̂δ = argmaxη: V(η) ≤ δ ℓ(η | x, y)

Here, η̂δ is a maximum-likelihood parameter subject to the empirical normalization constraint. The argmax ranges over parameter vectors η whose statistic V(η) is at most δ, as written in the estimator definition. The quantity being maximized is the log likelihood ℓ on observations x and y. The paper also uses δ as a tolerance in log-normalizer units in its bounds, with a squared tolerance in the approximate-normalization definition. These conventions matter when interpreting the bound formulas.

Δℓ(η̂, η̂δ) = (1/n)[ℓ(η̂ | x, y) − ℓ(η̂δ | x, y)]

Here, Δℓ is the likelihood gap per observation, η̂ is the ordinary fit and η̂δ is the constrained fit. The two values of ℓ evaluate the same observed inputs x and outputs y, and n counts those observations. The difference isolates the maximum likelihood lost when the normalization requirement is imposed within the chosen family.

The gap is about probability assignments. Top-label accuracy would ask only which candidate has the highest score. A change to the weights can preserve that candidate for every input while changing the probability given to the observed output. The resulting likelihood gap can therefore register a loss even when all the top-label decisions stay the same. This is particularly relevant to the authors’ proof, which scales scores together and can preserve their order.

For an upper bound, it suffices to find any feasible parameters and calculate what likelihood they retain. The constrained optimum can do at least as well. The paper chooses a simple candidate along the line from the ordinary fit towards zero. This is a proof construction. Training the constrained fit can exploit other directions in weight space as well.

Scaling toward a uniform predictor

Scaling the weights down brings the log normalizer closer to the value at zero weights. With unit base weights and a finite measure on outputs, the zero-weight value is the logarithm of the measure of the output space. It is independent of x. A shared offset allows the target to be moved when the goal is a log normalizer near zero. The construction controls the difference from the constant reference value by bounding each inner product using the parameter norm and the feature bound.

α = δ/(R‖η̂‖₂)

Here, α is the scaling factor used to form a candidate from the ordinary fit η̂ in the regime where shrinking is needed. The tolerance in the shrinkage argument is δ in log-normalizer units, R bounds the Euclidean length of the feature vectors and ‖η̂‖₂ is the Euclidean length of the fitted weights. When the norm estimate already puts the ordinary fit inside the intended tolerance, the construction can keep the original weights.

Likelihood changes along this line in a way controlled by the convexity of the log normalizer. At a point between zero and the fitted weights, the log normalizer is at most the weighted interpolation of its values at the endpoints. The observed-label score itself interpolates exactly. Subtracting the former from the latter gives a lower bound on the likelihood at the scaled weights. The long-run form of the comparison relates the gap to the distance between the original predictive distribution and a uniform distribution.

Δℓ(η̂, η̂δ) ≤ (1 − δ/(R‖η̂‖₂)) Eₚ[KL(pη(· | X) ‖ Unif)]

Here, Δℓ is the average likelihood gap between the ordinary fit η̂ and constrained fit η̂δ. The quantities δ and R respectively denote the log-normalizer tolerance in the shrinkage argument and the feature norm bound. The expression ‖η̂‖₂ measures the size of the ordinary parameter vector. The expectation Eₚ averages over inputs X drawn from p. The symbol pη(· | X) denotes the conditional distribution over outputs at the unrestricted parameters in the population comparison, and Unif is the uniform output distribution. KL denotes Kullback–Leibler divergence, which averages the log probability ratio under the first distribution. The dot indicates that the divergence uses the entire output distribution.

The comparison is asymptotic and uses the finite-measure setting in the paper. Its implication is easiest to see when the predictor already gives the possible outputs similar probabilities. Moving toward a uniform predictor then changes what the distribution says about the data by little. The expected divergence makes that statement across inputs. It compares a separate conditional distribution with uniform at each input and then averages the comparisons. Comparing a pooled output histogram with uniform would answer a different question.

The penalty becomes easy to satisfy for sufficiently small weights because the most any score can move away from its value at zero is bounded by the norm of the weights and R. The likelihood cost of attaining that sufficient condition can still be a loose estimate. A parameter vector can produce similar totals across the inputs through the arrangement of its scores, even when its length is large. The proof uses a norm bound because it gives a constructive feasible point with a tractable likelihood comparison.

Why confident predictions can also tolerate scaling

The bound using divergence from uniform helps most near the uniform end. The authors use the same scaling direction to analyze a different favorable case, with a finite set of labels, Boolean inputs and a distinct highest-scoring label at every input. The features for a label are the input indicators placed in that label’s block. The winning score must stay separated from the competing scores along the relevant scaling direction. In that situation, a scale reduction can leave most of the probability on the same label.

The proof studies the curvature of the observed-data log likelihood around the ordinary optimum. For an interior optimum, the first-order change in the summed likelihood vanishes. The remaining change depends on the distance moved and on the curvature along the segment. For the log-linear family, the negative curvature comes from the covariance of the feature vectors under the predicted distribution. Covariance here measures how much the features of a randomly drawn output vary together at a fixed input. If nearly every draw yields the same output, its features vary little.

Δℓ(η̂, η̂δ) ≤ b(‖η‖₂ − δ/R)² exp(−cδ/R)

Here, Δℓ is the per-observation likelihood gap between the ordinary fit η̂ and the constrained fit η̂δ. The parameter vector η is the unrestricted one in the bound, and ‖η‖₂ is its Euclidean length. The tolerance is δ in log-normalizer units, R bounds feature length and exp is the exponential function. The constants b and c depend on the distribution, with the positive score separation entering into the curvature argument through c.

The appendix bounds the covariance entries using the probabilities of the winning class and its competitors. The winner’s indicator has little variation if it is nearly always active. Each competitor’s indicator also varies little if that class occurs with very low probability. The paper then bounds the largest eigenvalue of the covariance, which controls the greatest curvature in any direction. This turns a statement about separated scores into a statement about how much likelihood can change along the shrinkage path.

A unique winner is useful here because a positive scaling factor leaves the ordering in place. What matters to the bound is how much probability can move among the labels after that scaling. If the top scores are nearly tied, the constants need not yield the same favorable behavior as when the margin is substantial. Conversely, if each input has a strong favorite, the identity of that favorite can vary across inputs without removing the underlying argument about concentration.

Testing whether a different representation could normalize

A large log-normalizer variance for fitted weights can be an artifact of how the scores are represented. In a multiclass linear predictor, adding the same function of the input to all class scores cancels out of the probabilities. The log normalizer changes by that function, though. The paper therefore asks for the smallest variance across all weight vectors that produce the same conditional distribution on the inputs under consideration.

η ∼ η′   ⇔   pη(y | X) = pη′(y | X) for all y, almost surely under p

Here, η and η′ are parameter vectors, and ∼ means that their conditional distributions are equivalent under the input distribution p. The symbols pη and pη′ are the two conditional distributions, y is an output and X is a random input. Almost surely permits exceptions on inputs of probability zero.

V⋆(η) = infη′ ∼ η Varₚ[A(X, η′)]

Here, V⋆ is the smallest attainable log-normalizer variance for the conditionals represented by η. The infimum ranges over equivalent vectors η′. The operator Varₚ measures variance over inputs X drawn from p, and A is the log normalizer evaluated at those inputs and the candidate equivalent weights. The varying η′ in A expresses the minimization across representations intended by the definition and used in the projection argument.

For the finite multiclass case, the paper gives each class its own copy of the input coordinates. Pairwise log odds depend only on differences between class scores. If the inputs span the feature space, equality of these odds forces the difference between the two parameterizations to be the same vector in every class block. Every such difference is also sufficient for equivalence. Adding one linear function of x across the classes is therefore the full freedom available in this setup.

T(k, x)ₖ′ⱼ = δₖₖ′xⱼ

Here, T is the joint feature vector for input x and proposed class k. Its coordinate indexed by class block k′ and input coordinate j is T(k, x)ₖ′ⱼ. The symbol δₖₖ′ is the class-matching indicator, equal to one when the classes match and zero otherwise, and xⱼ is the jth coordinate of the input.

Once the set of allowable changes is known, optimizing over equivalent parameters becomes a least-squares calculation on functions of the inputs. The authors first center the log normalizer by subtracting its mean. They also center each input coordinate. Removing the best linear combination of those centered coordinates then removes all the variation that an equivalent parameterization can absorb.

V⋆(η) = ‖Ãη − Proj𝒞 Ãη‖₂²

Here, V⋆ is the optimal variance at parameters η and Ãη is the function of input obtained by subtracting the mean from A(x, η). The space 𝒞 consists of linear combinations of centered input coordinates, and Proj𝒞 computes the orthogonal projection onto that space. In this equation, the squared norm ‖·‖₂² is the expectation of the squared residual under the input distribution. The residual is the part of the centered log normalizer that the allowed common score shift cannot remove.

The hard example uses an input distribution uniform on a Boolean hypercube. The authors choose class weights so that the largest score behaves differently on different parts of that cube. A large positive scaling makes the largest score a useful approximation to the log normalizer. Where there is a separated winner, the other exponentiated scores have rapidly diminishing influence. The proof exploits the fact that a common linear shift has too little flexibility to follow the changes in the winning score across the cube.

V⋆(η) ≥ ‖η‖₂²/[32d(d − 1)] − 4K exp(−√(1 − 1/d)‖η‖₂/[2(d − 1)])‖η‖₂

Here, V⋆ is the minimum variance over equivalent parameterizations, η is the positively scaled weight vector on the constructed direction and ‖η‖₂ is its Euclidean length. The dimension of the Boolean input vectors is d and the number of classes is K. The square root and exp appear in the correction for using the maximum score in place of the log normalizer. This is the form of the inequality printed in the body of the paper. The last appendix display uses a different constant in the leading term.

The construction treats the largest score as a function defined on the cube. A common score shift has to act on the coordinates consistently everywhere. The proof compares pairs of points obtained by complementing coordinates within a face of the cube. For enough such pairs, a linear correction must either miss a target score or create a difference that itself contributes to the squared error. This is how a conflict visible in the shape of the score function turns into an average residual over the input distribution.

The projection and the shrinkage analyses ask related but different questions. Projection keeps the probabilities fixed and searches for a better score representation. Shrinkage allows the probabilities to change and measures how much likelihood a feasible change might cost. A large projection residual shows a limit on what can be achieved while keeping the probabilities identical. It leaves open what can be achieved by changing them slightly.

Experiments and results

Generating conditional distributions with different concentrations

The authors use synthetic inputs to explore the relationship between the shape of the conditional distribution and the price of normalization. They generate random sparse feature vectors and initial weights. Sparse means that many coordinates in an input vector are zero. They then scale the initial scoring weights and draw labels from the resulting conditional distribution, giving them a collection of training pairs for each setting. Changing that scale controls how much the alternative outputs compete with the highest-scoring ones.

Y | X = x ∼ pτη(· | x)

Here, Y is the generated label, X is the random input and x is the particular input being labeled. The symbol ∼ means that Y is drawn from the displayed conditional distribution. The distribution pτη uses the generating weight vector η scaled by τ, the paper’s temperature parameter. The dot represents the output whose value is sampled. In the paper’s parameterization, the scale multiplies the scores through the weights.

With weights close to zero, the synthetic generator in the softmax setting places similar probabilities on the available labels. Larger positive scales magnify score differences. At inputs with a unique highest score, the resulting conditional distribution becomes increasingly concentrated on that label. Changing the scale varies the labels the generator is likely to produce while preserving the underlying score orderings wherever they are strict. This gives the authors a way to change conditional concentration without changing the feature construction to obtain each operating point.

The fitted predictor is self-normalized on the generated training pairs. The comparison comes from the unconstrained likelihood fit for the gap. The experiments report normalization error and likelihood on the scale of the preceding analysis. They also characterize the synthetic settings by expected KL divergence from uniform. This quantity can be small because most input-specific distributions are fairly flat. At the other end, it can be large because the predictions are strongly concentrated across the inputs. It is measured for a conditional distribution at each input before averaging.

The synthetic sweep serves a different purpose from the language-model comparison. Synthetic generation gives the experimenters control over the sharpness of the conditionals. The language-model data come from the self-normalized translation work used to motivate the analysis. They supply a practical comparison curve on the normalization–likelihood plot. The paper labels the synthetic curves by their divergence from uniform and the language-model curve LM. It does not give a named corpus or split for that curve in its experimental account.

What the tradeoff curves show

In the first plot, the authors vary how much normalization error the fit may tolerate and track the likelihood gap. Across the curves, the gap decreases as the constraint is relaxed. The comparison within a curve holds the underlying source of data fixed. Its main change is how narrowly the fitted weights have to satisfy the normalization criterion. The resulting plot shows how much likelihood can be recovered as the feasible region grows.

There is also a direct reason to expect this direction of change. Each relaxation permits all the parameter settings that were already feasible and may permit others with higher likelihood. The best attainable likelihood within the relaxed set can therefore improve. The empirical value of the plot is that it exhibits the tradeoff for several synthetic settings and includes a language-model comparison. The sign of the relationship follows from the optimization setup. The shape and practical size of the tradeoff depend on the data and fitted scores.

The other plot examines the likelihood gap as the synthetic predictive distributions become more peaked. The gap rises and then falls as expected divergence from uniform increases. At the nearly uniform end, there is little predictive structure to lose when moving toward a uniform reference fit. At the sharply concentrated end, a scale reduction can preserve most of the mass on the preferred labels. Between those ends, the experiments show more likelihood at stake. Intermediate average divergence by itself cannot tell whether the inputs have similarly intermediate conditionals or whether they mix flat and sharp conditionals.

The experimental discussion reports these results through curves and their qualitative direction. It gives no written numerical ordinate for a specific synthetic or language-model operating point, no numerical likelihood difference for a named split, and no written speed or translation-quality measurement for the comparison. The exact calculations in the paper give a numerical comparison on a different scale. They show that changing the input can change the preferred label while leaving the log-normalizer error at zero. The following comparison uses the analytical construction, with both input settings tied.

Log-normalizer error on the paper’s exactly normalizable example

Reversing the input reverses the preferred label while preserving exact normalization.

Log-normalizer error on the paper’s exactly normalizable exampleInput log 2 (this paper): 0Input log 2 (this paper)0Input −log 2: 0Input −log 20
The numbers
System or settingSquared log-normalizer error
Input log 2 (this paper)0
Input −log 20

The chart concerns a specified feature map and fixed weights. There is no fitted test split in that example. The experimental curves answer the complementary question of what happens when normalization is imposed on a likelihood fit across generated observations. The zero error in the analytical case gives a reference for what perfect normalization means, while the experimental results concern how much likelihood different datasets and tolerances allow the fit to retain.

What the ablations show

The paper offers controlled comparisons of normalization tolerance, predictive concentration and equivalent parameterizations in place of a component-removal ablation.

Changing the tolerance for the same data

Varying the normalization tolerance asks whether the likelihood loss follows from the requirement being imposed. For a given synthetic setting, the generating distribution defines one modeling problem. A tighter tolerance restricts the fits that qualify. A looser tolerance gives the estimator room to preserve more of the original conditional probabilities. The downward tradeoff curves show the observed gap becoming smaller with that extra freedom.

This comparison is also a way to read the two roles of a log normalizer. In an exact probability calculation, its value can be large or small because it will always be subtracted. In a system that intends to omit the subtraction, its size becomes part of the fit’s suitability for use. The experiment changes how much the fit is allowed to differ on this second criterion and measures the cost on the first. It does not change the underlying definition of likelihood.

The language-model curve extends that comparison to the kind of predictor that motivated the work. It illustrates the coexistence of a practical normalization–likelihood tradeoff and the corresponding synthetic curves. The paper does not pair this curve with the same temperature sweep on translation data. As a result, the translation comparison bears on tolerance and likelihood, while the designed concentration analysis rests on the synthetic intervention.

Changing concentration with the score structure held in place

The scale intervention changes the probability of drawing labels from the generator. It preserves the feature representation and the score orderings, so the effect can be discussed in terms of changed probabilities without introducing a new underlying class-ranking rule at every setting. That is useful because a likelihood gap is sensitive to probabilities among similarly ranked alternatives. The same preferred class can have much different probability under more and less aggressive scaling.

The decline in the gap at the highly concentrated end is the feature of the result that a purely near-uniform explanation would miss. The two bounds account for different reasons a fit can withstand movement towards smaller weights. Near uniformity, the endpoint towards which the fit moves is already similar to the original distribution. Near confident prediction, the likelihood surface can be relatively flat over a range in which the winning labels continue to dominate. A fit in between can have probabilities sensitive enough to changes in score differences for the same normalization requirement to cost more likelihood.

The experiment uses an average divergence to display the sweep. It does not independently manipulate variation in conditional entropy across inputs while fixing that average. Entropy describes how broadly a distribution spreads its probability, so a high-entropy prediction gives substantial weight to more outputs and a low-entropy prediction concentrates weight more heavily. Two collections of conditionals can share an average divergence while placing their sharp and flat predictions on different inputs. The controlled sweep supports the reported rise and fall in its own setup. The suggestion that mixtures can be particularly difficult also draws on the separate construction.

Changing the scores while holding predictions fixed

The equivalence-class analysis supplies a theoretical control. It asks what differences in normalizer variation can arise while conditional likelihood is held fixed at every input. In the multiclass linear case, all probability-preserving changes are common linear shifts under the span assumption. By projecting those shifts out, the paper removes a source of variability that has no likelihood consequence. Residual variation after projection has a stronger interpretation than the raw variance measured from any chosen set of weights.

The maximum-score analysis then identifies a source of that residual. If a single linear function produced the winning score on the whole input space, a common shift could subtract it everywhere. If different regions have different winning linear scores, one global shift has to handle them together. The constructed weights make that requirement costly in squared error on the Boolean inputs. Concentration can thus make the normalizer easier to approximate by the winning score while leaving that winning score difficult to remove with the available features.

This helps distinguish the hard example from the favorable bound for concentrated conditionals. The variance construction asks whether the original predictions themselves admit a score representation with low log-normalizer variation. The upper bound asks how much likelihood a change in the predictions might cost. A fit can have a substantial residual under the first comparison and retain much of its likelihood after a parameter change under the second. The paper’s empirical sweep measures the second quantity. It does not estimate the projection residual for the different synthetic settings.

Limitations

Questions the authors leave open

The authors explicitly leave open a broader characterization of approximately normalizable input distributions. Proximity to a suitable feature-space surface gives a geometric explanation, but useful input distributions need not align well with the particular surfaces analyzed. The authors point to other parameter families and to possible conditions involving sparsity or spectral properties. The results therefore identify ways normalization can be easy without giving a criterion that classifies every practical input distribution.

The authors also ask whether their likelihood upper bounds are tight. Their construction uses the weight norm to bound every score and obtain a sufficient condition for normalization. A fitted predictor can have a large norm and still produce almost constant totals, so the chosen scaling can move the weights farther than a good constrained fit needs to move them. The gap bound is an assurance about a feasible fit. Its looseness depends on how much useful structure the norm estimate leaves out.

A corresponding general likelihood lower bound remains open. The hard construction concerns large variance throughout an equivalence class. A likelihood lower bound would have to account for nearby conditional distributions, including those whose probabilities differ by a small amount and may permit much better normalization. The authors also ask whether the hard construction is stable. An example with a large residual establishes that such behavior is possible. Its practical significance depends partly on whether modest changes to the input distribution or the conditional probabilities preserve the effect.

Qualifications from the setup and statements

The strongest specialized results have different assumptions. The favorable curvature bound uses a finite label set, Boolean inputs, class-specific feature blocks and input-wise winners with score separation. The variance construction additionally specifies a uniform distribution on the Boolean cube. The general log-linear formulation accommodates continuous outputs, while these specialized results and the experimental demonstration use discrete labels. The paper’s extension to a neural predictor with fixed earlier layers also leaves open how the analysis would change if the full network were trained jointly.

The near-uniform likelihood argument is cleanest for the flat base measure used in the finite softmax analysis. In the general density formula, a nonconstant h determines the zero-weight reference distribution. A probability comparison to a uniform reference then needs the assumptions that make that reference the zero-weight fit. There is a separate distinction between averaging a test loss under the actual label distribution and taking a KL divergence under the unrestricted predictor. The asymptotic expected-KL interpretation uses the unrestricted conditional distribution as the reference for the inner expectation. Reading that expression as a general identity for a misspecified fit would require further justification.

The paper uses δ differently in adjacent formulations. Its definition of approximate normalization thresholds expected squared deviation by δ², its constrained-estimator display thresholds V by δ, and the shrinkage argument places δ in log-normalizer units. The safest reading keeps the quantity and its tolerance together at each step. In particular, the scale factor is justified by a bound on deviation in log units. Substituting a threshold on mean squared deviation directly into that scale factor would give the symbol a different meaning from the one used in the proof.

The closeness result has a more substantive mismatch. Exact normalization was defined by a log normalizer equal to zero. The proximity proposition instead names a level of one for the log normalizer, while the proof aims to compare with a unit total. The distance definition averages unsquared feature distances, and the proposed guarantee controls a squared log deviation. The mean of a distance alone does not generally bound its mean square by the square of its mean. The bounded weights support the pointwise comparison that motivates the result. To carry that comparison into the displayed mean-square guarantee, one needs control of squared distances or a suitable uniform bound on them.

A small example meant to rule out exact normalization also needs qualification. Its feature map includes a constant coordinate. Setting the feature-dependent weights to zero and choosing the constant score appropriately gives the uniform conditional distribution with exact normalization. The later likelihood discussion explicitly uses this freedom. The example is best understood as a warning about compatibility with a desired nontrivial distribution. As written, its unrestricted impossibility claim conflicts with the constant-shift construction.

The variance theorem contains a numerical discrepancy of its own. The leading denominator in the body contains 32, while the final appendix inequality in terms of the parameter norm contains 64. They agree on the intended mechanism and on the form of a growing leading term opposed by a decaying correction. The discrepancy prevents treating the stronger printed constant as established by the last displayed derivation. There is also a point that needs care in the proof’s use of a uniquely winning class. At the all-zero input, the class-block feature map gives equal scores to all classes. A uniform approximation argument based on a positive separation at every Boolean input needs to account for that input separately.

Finally, the experiments report a synthetic concentration sweep and a comparison from a translation language model. Their evidence concerns the behavior of likelihood and normalization error in those settings. The curve descriptions leave the exact magnitude of the experimental effects unspecified in prose. They do not establish held-out accuracy gains, runtime savings or translation quality for a new system trained by the authors. Average squared log-normalizer error also permits individual inputs with larger errors. Its adequacy for a downstream application depends on how those inputs are encountered and how their scores are used.

What came after

Algorithmes à base d’échantillonage pour l’entraînement de modèles de langue neuronaux cites the paper and takes sampling-based training of neural language models as its subject. That subject connects to the earlier paper through the cost of handling a large output space. The accuracy analysis asks when scores obtained by a fitted predictor can replace normalized log probabilities. Sampling-based training addresses how to fit neural predictors when operations over the output space are costly.

The connection is especially close to the discussion of noise-contrastive estimation. The paper describes that approach as using noise samples to turn estimation into a classification problem, and it distinguishes estimating normalizers from fixing their estimates at one. That distinction sets up a question shared by the two subjects. A procedure can reduce the cost of training or scoring, while the predictive consequences of its treatment of the normalizer still need to be assessed. The later citation establishes the connection to sampling-based neural language-model training. Its title and citation alone do not establish which normalization method it used, whether it extended one of the bounds, or what it measured.

Cite

Cite as Jacob Andreas, Maxim Rabinovich, Dan Klein and Michael I. Jordan. 2015. On the accuracy of self-normalized log-linear models. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1506.04147 · arXiv 1506.04147

@misc{andreas2015accuracy,
  title = {{On the accuracy of self-normalized log-linear models}},
  author = {Jacob Andreas, Maxim Rabinovich, Dan Klein and Michael I. Jordan},
  year = {2015},
  doi = {10.48550/arxiv.1506.04147},
  eprint = {1506.04147},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1506.04147}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/andreas-2015-accuracy-self-normalized-log-linear/

References

13 references, from the paper's own bibliography.

  1. Lafferty, J. D.; McCallum, A.; Pereira, F. C. N. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. ICML. 2001; pp 282–289 OpenAlex ↗ · Scholar ↗
  2. McCullagh, P.; Nelder, J. A. Generalized linear models; Chapman and Hall, 1989 OpenAlex ↗ · Scholar ↗
  3. Devlin, J.; Zbib, R.; Huang, Z.; Lamar, T.; Schwartz, R.; Makhoul, J. Fast and robust neural network joint models for statistical machine translation. Proceedings of the Annual Meeting of the Association for Computational Linguistics. 2014 our card
  4. Vaswani, A.; Zhao, Y.; Fossum, V.; Chiang, D. Decoding with large-scale neural language models improves translation. Proceedings of the Conference on Empirical Methods in Natural Language Processing. 2013 our card
  5. Andreas, J.; Klein, D. When and why are log-linear models self-normalizing? Proceedings of the Annual Meeting of the North American Chapter of the Association for Computational Linguistics. 2014 OpenAlex ↗ · Scholar ↗
  6. Bartlett, P. L. IEEE Transactions on Information Theory 1998, 44, 525–536 OpenAlex ↗ · Scholar ↗
  7. Anthony, M.; Bartlett, P. Neural network learning: theoretical foundations; Cambridge University Press, 2009 OpenAlex ↗ · Scholar ↗
  8. Gutmann, M.; Hyvärinen, A. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. Proceedings of the International Conference on Artificial Intelligence and Statistics. 2010; pp 297–304 OpenAlex ↗ · Scholar ↗
  9. O'Hagan, A. Journal of statistical planning and inference 1991, 29, 245–260 OpenAlex ↗ · Scholar ↗
  10. Chen, Y.; Welling, M.; Smola, A. Proceedings of the Conference on Uncertainty in Artificial Intelligence 2010, 109–116 OpenAlex ↗ · Scholar ↗
  11. Doucet, A.; De Freitas, N.; Gordon, N. An introduction to sequential Monte Carlo methods; Springer, 2001 OpenAlex ↗ · Scholar ↗
  12. Morin, F.; Bengio, Y. Proceedings of the International Conference on Artificial Intelligence and Statistics 2005, 246 OpenAlex ↗ · Scholar ↗
  13. Yang, E.; Allen, G.; Liu, Z.; Ravikumar, P. K. Graphical models via generalized linear models. Advances in Neural Information Processing Systems. 2012; pp 1358–1366 OpenAlex ↗ · Scholar ↗