Elamur Research

Bayesian Hierarchical Words Representation Learning

Paper · 2020 · Oren Barkan, Idan Rejwan, Avi Caciularu et al.

Summary

A word can be easy to place in a dictionary and hard to place in an embedding. If it appears only a few times in a training corpus, its neighbors in those sentences offer limited evidence about its meaning. Bayesian Hierarchical Words Representation, or BHWR, uses a lexical hierarchy to supply some of that missing evidence. It learns word embeddings from the words that occur near each other in text and from the broader categories that connect them in WordNet. The paper asks whether learning from both sources improves the agreement between machine-generated similarity scores and human judgments, particularly for infrequent words.

The paper illustrates the idea with anode and cathode, which share the parent electrode. If the corpus provides ample evidence about cathode, learning can carry some of that information into the representation of electrode. That parent then gives a sparsely observed anode an informed starting position. If the corpus supplies more evidence about anode, its representation can move in a direction supported by its own occurrences. BHWR represents each word with probability distributions over vectors. The authors use variational Bayes to approximate those distributions and estimate similarity while accounting for uncertainty about the vectors.

The authors train on the annotated SemCor corpus, using WordNet hypernyms as parents. Across the full word-similarity evaluations, BHWR obtains an average Spearman rank correlation of 33.6%, compared with 28.8% for Bayesian Skip-Gram and 27.6% for Skip-Gram. Applying a separate lexical refinement step raises BHWR’s average to 36.8%. In the evaluation restricted to words that occur in the training corpus five times or less, the average is 29.5% for BHWR and 33.4% for its refined version. The advantages appear across several benchmarks, although the size of the advantage varies and the refinement step slightly lowers BHWR’s score on the rare-word portion of WordSim-353. The reported evidence concerns similarity rankings learned from a small annotated corpus. The paper leaves open how the method performs with larger training corpora and on other tasks.

Deep dive: Bayesian Hierarchical Words Representation Learning

Bayesian Hierarchical Words Representation uses WordNet and corpus co-occurrences to learn word embeddings, with gains on rare-word similarity. · about 32 minutes to read

The problem and its context

What a training corpus can tell us about a word

A word embedding gives a word a numerical position that can be compared with the positions of other words. The idea behind learning these positions from text is that patterns of usage carry information about both meaning and grammatical behavior. Words used in similar environments can acquire related representations even when nobody has written a rule connecting them. An embedding therefore condenses many observations about usage into something a system can compare directly. This is a practical application of distributional semantics.

The observations are unevenly distributed. A well-attested word may occur in enough different sentences for recurring patterns to stand out. With a sparsely attested word, the same procedure has little basis for distinguishing a typical environment from a coincidence. A nearby word could be informative about meaning, or it could reflect the subject of the only passage in which the target occurred. The problem is especially relevant when the whole corpus is small. A learning procedure can make efficient use of the contexts available to it, but there is still a limit to what those contexts establish about a particular word.

The paper describes earlier embedding work chiefly in terms of how it makes use of co-occurrence. A predictive method can learn which words tend to appear near a given target. Other work cited in the introduction also established the value of distributed vectors on linguistic tasks. The authors situate their contribution alongside Skip-Gram, GloVe, and word vectors enriched with subword information.

BHWR addresses a particular shortage of evidence. A sparse word may have a well-described relationship to another word even though the training corpus gives few direct examples of its use. A broader lexical category can connect the sparse word with related words that are better attested. Such links carry a different kind of information from a context window. A window records proximity in a particular passage. A hypernym link says that a more general term subsumes the more specific word or meaning. The proposal brings that part of lexical semantics into the learning procedure.

The electrode example identifies the difficulty more precisely. A rich corpus record for cathode does little for anode unless some connection lets what is learned about cathode affect the estimate for anode. A shared parent provides a route for that transfer. The parent itself may be poorly represented in the text. For the route to work in that case, learning must let evidence from a child change the parent’s representation. That is a stronger requirement than consulting a fixed vector for the parent whenever a rare child needs one.

Uncertainty and the use of lexical knowledge

Limited evidence also raises the question of what a learned position means. A conventional point estimate returns a vector. That vector can be compared with another word’s vector, but it does not itself describe the range of positions still compatible with the observations. A Bayesian treatment assigns a distribution over possible positions. Its center describes where the word is estimated to be, and its spread expresses uncertainty under the assumptions of the method. The authors argue that this distinction helps with rare words because a handful of observations can make a point estimate particularly sensitive to noise.

Bayesian Skip-Gram is the closest predecessor identified in the paper. It gives the authors a way to compare BHWR with an existing probabilistic embedding method. Bayesian Skip-Gram already handles uncertainty about vectors, while its formulation supplies no route for WordNet parent and child relationships. The research question is consequently narrower than whether probabilistic embeddings alone help. The authors want to know what changes when the prior for a word depends on related entries in a taxonomy and their representations are estimated together.

A separate line of work uses semantic lexicons to refine vectors after training. The paper discusses the retrofitting procedure of Faruqui and colleagues, which takes embeddings that already exist and adjusts them using lexical relations. The timing matters. A training-time hierarchy can affect how the procedure interprets the original corpus evidence. A refinement step sees the representations produced by training and adjusts them afterward. The paper compares these routes and also tests their combination. In the combined configuration, refinement can use relations such as synonymy, which are outside BHWR’s hypernym hierarchy.

The authors also cite work that uses a hierarchy for document categorization and concept clustering, and work that introduces lexical knowledge into contextualized embeddings. A contextualized representation can vary with the use of a word in a particular passage. The representation studied here is attached to a vocabulary entry and can be compared across a word-pair benchmark without using the test sentence to recalculate the vectors. The authors therefore treat such contextual work as related background and choose comparison systems that share their focus on non-contextual word representations. The cited examples of the contextual approach include GlossBERT and SenseBERT.

The combination of a prior and corpus evidence gives the authors a way to state how a word can benefit from the hierarchy under different training conditions. With little direct evidence, the parent’s position can have considerable influence. With repeated observations, the word’s own contexts can support a departure from that position. The intended outcome is a representation that inherits information where evidence is scarce and can still express distinctions supported by the text.

The method, step by step

From windows of text to distributions over vectors

BHWR receives a corpus and a taxonomy over vocabulary entries. From the corpus it constructs pairs of words. A pair observed within a sampled window becomes a positive example. The procedure also generates artificial pairs for which the second word is sampled from a frequency-based distribution. Those pairs are negative examples. Training uses both types to estimate vectors whose inner products help distinguish the observed pairs from the sampled ones.

A word can appear as the focus of a window or as one of the words around that focus. BHWR has a vector for each of those roles. It also keeps separate vectors for a word when it serves as a parent in the taxonomy. In the electrode example, the parent representation of electrode carries information that can guide anode and cathode. A leaf representation of electrode can also be informed by its own participation in corpus pairs. Keeping these representations separate lets the word’s taxonomic role and its corpus behavior influence learning through distinct terms.

The parent vectors provide the centers of the prior distributions for the entries below them. When an entry has several parents, the prior center is their average. A parent vector can itself depend on a higher category. The likelihood, which scores the corpus examples, depends directly on the leaf vectors. The parent vectors receive evidence through their probabilistic relationship with the leaves and with other parent vectors. These connections are what allow information to travel beyond the word pairs the procedure actually observes.

The exact posterior distribution over all of these vectors is hard to compute. The authors approximate it with a separate Gaussian distribution for each vector. Training updates their means and precisions, along with auxiliary quantities that make the corpus likelihood easier to handle. For a new word pair, the resulting distributions support a predictive score. In evaluation, BHWR combines a score from the target side with a score from the context side.

From corpus and taxonomy to word similarity

The steps in order.

From corpus and taxonomy to word similarityStep 1: Build parent and child sets from the taxonomy1. Build parent and child sets from the taxonomyStep 2: Sample observed and negative corpus pairs2. Sample observed and negative corpus pairsStep 3: Initialize Gaussian estimates for vocabulary vectors3. Initialize Gaussian estimates for vocabulary vectorsStep 4: Update the bounds for pair likelihoods4. Update the bounds for pair likelihoodsStep 5: Update parent and leaf estimates until convergence5. Update parent and leaf estimates until convergenceStep 6: Score word pairs in both vector roles6. Score word pairs in both vector rolesStep 7: Average the role-specific scores7. Average the role-specific scores

Building the training pairs and the taxonomy

Write the vocabulary as W, with an index set ℐ. Each i in ℐ designates a word wᵢ. The paper gives each index a set of parent indices and a set of child indices. In the formulas below, πᵢ is the parent set for i, and ωᵢ is its child set. The parent sets describe where a word’s prior center comes from. The child sets describe which priors can change when a parent vector changes. This distinction becomes important when estimating the parent vectors.

The corpus is a sequence of word occurrences. The procedure visits each position t and samples a window radius, written cₜ, from the integers up to the maximum radius c. It pairs the word at t with the other words inside that window, excluding the focus position itself. The indices in a training pair identify vocabulary entries, although the examples are generated by visiting positions in the corpus. If a word pair is encountered repeatedly, its occurrences contribute repeatedly. Treating the collection as a multiset preserves that evidence.

The negative examples retain the focus word and replace its context partner with a draw from a distribution based on the frequency of individual words. The unigram frequencies are raised to 0.75 before normalization. This changes how strongly the sampling distribution favors the most frequent words. The reference label for a generated example is positive for an observed neighbor and negative for a sampled partner. A sampled negative supplies a comparison for training. It is not a claim that the words can never occur together or are semantically unrelated.

For each example, let i denote the context-side index and j the target-side index in the likelihood notation. The vector uᵢ represents the entry on the context side and vⱼ the entry on the target side. Let dᵢⱼ be the label associated with that example. This notation follows the pair through the probability calculation. If a pair of vocabulary entries appears several times in the example collection, each occurrence has its own contribution.

The probability assigned to a pair

The connection between a pair of vectors and the observed label is the logistic sigmoid. For a real-valued input, the sigmoid is

σ(a) = 1 / (1 + exp(−a))

Here σ is the sigmoid, a is its input, and exp is the exponential function. The output is between zero and one. When the input increases, so does the output. A dot product can therefore be converted into a number suitable for a probability.

The paper writes the likelihood of a labeled example as

p(dᵢⱼ | uᵢ, vⱼ) = σ(dᵢⱼ uᵢᵀvⱼ)

Here p denotes probability, the vertical bar means “given,” and uᵢᵀvⱼ is the dot product of the context vector for i and target vector for j. The superscript ᵀ denotes transpose. For a positive example, dᵢⱼ equals 1, so a larger dot product gives the observed label a higher probability. For a negative example, dᵢⱼ equals −1, reversing the sign of the sigmoid input. Holding the vectors fixed, the full likelihood multiplies these contributions over the examples.

p(𝒟 | U, V) = ∏₍ᵢ,ⱼ₎∈𝓘 σ(dᵢⱼ uᵢᵀvⱼ)

Here 𝒟 is the collection of observed labels, U and V collect the context and target leaf vectors, and 𝓘 is the multiset of training examples. The symbol ∏ tells us to multiply the factor for each element, counting repeated examples. This use of 𝓘 refers to training pairs, while ℐ denotes the vocabulary index set. No parent vector appears directly in this product. The taxonomy influences the likelihood indirectly because it helps determine the leaf vectors that enter the dot products.

How the parents enter the prior

Let hᵘᵢ and hᵛᵢ be the parent vectors associated with entry i on the context and target sides. The superscripts ᵘ and ᵛ identify the side. Let Hᵘ and Hᵛ collect these vectors over the vocabulary. For the context side, the paper centers the prior for an entry at the average of the parent vectors above it.

sᵘᵢ = (∑ₙ∈πᵢ hᵘₙ) / |πᵢ|  if πᵢ ≠ ∅, and 0⃗ otherwise

Here sᵘᵢ is the context-side prior center for entry i. The sum runs over the parent indices n in πᵢ, and |πᵢ| is the number of such indices. The symbol ∅ denotes the empty set and 0⃗ is a zero vector. An entry with no parent therefore has a prior centered at the origin. The target-side center uses the same rule and the vectors in Hᵛ.

The same center is used for the entry’s leaf and parent priors on a given side. On the context side, the Gaussian factors for the parent vectors are

p(Hᵘ | τₕᵘ) = ∏ᵢ∈ℐ 𝒩(hᵘᵢ; sᵘᵢ, τₕᵘ⁻¹I)

Here 𝒩(z; m, C) is the Gaussian density for vector z with mean m and covariance matrix C. The semicolon inside the density separates its argument from its parameters. The context-side parent precision τₕᵘ is a scalar. Its reciprocal multiplies the identity matrix I to give the isotropic covariance. All coordinates of a prior factor have the same variance, and its covariance has no off-diagonal entries. Though the left-hand side is a prior over the collection, the factor for each entry can depend on other vectors in that collection through the center sᵘᵢ.

The leaf prior on the context side is

p(U | Hᵘ, τᵤ) = ∏ᵢ∈ℐ 𝒩(uᵢ; sᵘᵢ, τᵤ⁻¹I)

Here τᵤ is the precision for context leaf vectors. It controls how tightly a leaf prior is concentrated around its parent average. The target side has the corresponding families p(Hᵛ | τₕᵛ) and p(V | Hᵛ, τᵥ). The symbols τₕᵛ and τᵥ are the target-side parent and leaf precisions. Larger scalar prior precision means that a departure from the center carries a stronger penalty in the prior density.

These expressions describe the generative direction of the hierarchy. Parent values give prior centers to their children. Estimating values after seeing data creates a route in the other direction. A likelihood that favors certain leaf positions also affects which parent positions are plausible. If cathode has strongly supported positions in its distributions, the learned parent representation for electrode can reflect that evidence. The prior center for anode then depends on the resulting estimate for electrode. The propagation is a consequence of estimating linked quantities together.

The joint density and the prediction the authors want

The authors collect the vectors into θ and the precision hyper-parameters into 𝒯. The allocation of corpus and hierarchy terms can be written as

p(𝒟, θ | 𝒯) = p(𝒟 | θ) p(θ | 𝒯)

Here θ consists of U, V, Hᵘ, and Hᵛ. The collection 𝒯 contains τᵤ, τᵥ, τₕᵘ, and τₕᵛ. The term p(𝒟 | θ) is the corpus likelihood, which uses the leaf vectors. The term p(θ | 𝒯) is the prior over all the vectors, assembled from the parent and leaf factors on both sides. The product gives a joint density for the vector values and the observed labels at fixed prior precisions.

For a new pair, the quantity of interest is the probability of a positive label after taking the existing evidence into account.

p(dᵢⱼ* = 1 | 𝒟, 𝒯) = ∫ σ(uᵢᵀvⱼ) p(θ | 𝒟, 𝒯) dθ

Here dᵢⱼ* is the label for the queried pair. The integral averages the positive-label probability over possible vector collections θ, weighted by their posterior density p(θ | 𝒟, 𝒯). The differential dθ indicates integration over the vector parameters. The expression clarifies the difference between prediction using a distribution and prediction at a chosen vector position. Each plausible position contributes according to its posterior weight, and the sigmoid is evaluated before averaging.

This is the co-occurrence prediction defined by the training setup. For evaluation, the authors adapt it to word similarity by considering inner products between vectors in the same role. The fitting problem comes first. The normal priors and logistic likelihood do not yield an exact posterior of a convenient form, so evaluating the predictive integral requires an approximation to the joint posterior.

Approximating the posterior with separate factors

Variational Bayes chooses a tractable distribution and fits it to approximate the posterior. BHWR uses a fully factorized distribution. In the authors’ setup, each vector gets its own factor.

q(θ) = (∏ᵢ∈ℐ q(uᵢ)) (∏ᵢ∈ℐ q(vᵢ)) (∏ᵢ∈ℐ q(hᵘᵢ)) (∏ᵢ∈ℐ q(hᵛᵢ))

Here q(θ) is the approximate joint posterior, and each q on the right is the approximate marginal density for the indicated vector. The products treat distinct vectors as independent under q. A factor can nonetheless describe covariance among the coordinates of its own vector. The independence assumption simplifies integration over the collection. It does not remove the dependencies from the joint density used to fit the factors. A child’s fitted mean continues to depend on its parents’ current estimates, which in turn depend on that fitted mean.

The authors choose the factors by minimizing the Kullback–Leibler divergence from q to the exact posterior. This divergence measures the discrepancy between the two distributions in the direction that weights the log density ratio by q. An equivalent objective is to maximize the variational lower bound expressed as

ℒ(q) = ∫ q(θ) log[p(𝒟, θ | 𝒯) / q(θ)] dθ

Here ℒ(q) is the variational objective and log is the natural logarithm. The numerator is the joint density, and the denominator is the approximating density. Averaging their log ratio under q makes it possible to formulate the optimization without evaluating the normalizing constant of the exact posterior.

With the other factors held fixed, the general variational update can be written in normalized log form as

log q*(z) = E_q(θ∖z)[log p(𝒟, θ | 𝒯)] + C

Here z is one vector from θ, q*(z) is its updated factor, and θ∖z means all vectors in θ other than z. The expectation E_q(θ∖z) averages with respect to the current factors for those vectors. The constant C is independent of z and makes the exponential of the right-hand side integrate to one. The update makes the vector agree with the parts of the joint density that involve it while averaging over the current uncertainty about the other vectors.

The difficulty lies in the likelihood part of that expectation. The log of a sigmoid of a dot product is not quadratic in the vector being updated. A Gaussian update would be straightforward if the log density had a quadratic form in that vector. The authors obtain a tractable form by replacing the log likelihood with a bound.

The quadratic bound for the logistic likelihood

For each training example, the authors introduce a variational quantity ξᵢⱼ. It controls the point at which a quadratic lower bound meets the log sigmoid. The coefficient used in that bound is

λ(a) = (σ(a) − 1/2) / (2a)

Here λ is the coefficient function, a is its scalar argument, and σ is the sigmoid. In the updates the coefficient is evaluated at a bound parameter ξᵢⱼ. Its value determines the strength of the quadratic term for that example.

The bound for a single labeled interaction can be written as

log σ(dᵢⱼ bᵢⱼ) ≥ log σ(ξᵢⱼ) + (dᵢⱼ bᵢⱼ − ξᵢⱼ)/2 − λ(ξᵢⱼ)(bᵢⱼ² − ξᵢⱼ²)

Here bᵢⱼ stands for the inner product uᵢᵀvⱼ. The label dᵢⱼ takes values 1 and −1, so squaring the signed inner product yields bᵢⱼ². The symbol ≥ indicates a lower bound. The term linear in bᵢⱼ carries the sign of the label. The quadratic term depends on the size of the inner product. Summing this expression across the example multiset gives the lower bound on the log likelihood used in the updates.

The square of an inner product would involve both vectors if optimized jointly. In a factor update, the other vector is averaged over its current distribution. The remaining expression is quadratic in the vector being updated. It therefore combines with the Gaussian prior terms to give a Gaussian factor. This is the practical reason for introducing the bound. The training loop can update a mean vector and a precision matrix without integrating a product of logistic functions at every step.

The authors choose the bound parameter from the expected square of the inner product. Using the moments of the current Gaussian factors, the update is

ξᵢⱼ = √tr[(Σᵤᵢ + μᵤᵢμᵤᵢᵀ)(Σᵥⱼ + μᵥⱼμᵥⱼᵀ)]

Here μᵤᵢ and μᵥⱼ are the current means of the factors for uᵢ and vⱼ, and Σᵤᵢ and Σᵥⱼ are their covariance matrices. The products of a mean with its transpose are outer products. Each expression in parentheses is the second-moment matrix of the corresponding vector. The trace tr adds the diagonal entries of the matrix product, yielding the expected squared inner product under the factorized distribution. The square root gives ξᵢⱼ. The bound is thus adjusted to the uncertainty in both vectors, as well as to the locations of their means.

Updating the leaves and parents

A Gaussian factor can be specified by its mean μ and precision matrix P. Precision is the inverse of covariance. A leaf update combines its prior with every training example in which the corresponding vector participates. Let 𝓘ᵢ denote the context-side examples for i, indexed by their target partner j with repetitions retained. The updated context leaf precision is

Pᵤᵢ = τᵤI + 2∑ⱼ∈𝓘ᵢ λ(ξᵢⱼ) E_q[vⱼvⱼᵀ]

Here Pᵤᵢ is the precision matrix of the factor for uᵢ, τᵤI is its prior precision matrix, and E_q[vⱼvⱼᵀ] is the second moment of the partner vector under the current target-side factor. The second moment is its covariance plus the outer product of its mean, as in the update for ξᵢⱼ. The coefficient inside the sum is set by the bound for the example. Each observation can add precision in directions associated with its partner representation.

The corresponding mean is

μᵤᵢ = Pᵤᵢ⁻¹[(1/2)∑ⱼ∈𝓘ᵢ dᵢⱼ μᵥⱼ + τᵤ E_q[sᵘᵢ]]

Here μᵤᵢ is the updated mean vector and Pᵤᵢ⁻¹ is the covariance from the just-computed precision. The summed term adds a signed contribution from each partner mean μᵥⱼ, using the example label dᵢⱼ. The other term contributes the expected taxonomy center E_q[sᵘᵢ], weighted by the prior precision τᵤ. This expectation is the average of the parent means when parents are present and the zero vector otherwise. If the example sum is empty, the mean reduces to the expected prior center. If training pairs are available, their signed evidence and contributed precision jointly determine how the estimate moves.

Parent updates depend on the hierarchy on both sides of the entry. For compactness in the next expressions, let mⱼ be |πⱼ|, the number of parents of child j. The context-side parent precision is

Pₕᵘᵢ = [τₕᵘ + ∑ⱼ∈ωᵢ (τₕᵘ + τᵤ)/mⱼ²] I

Here Pₕᵘᵢ is the precision of the factor for parent vector hᵘᵢ. The first term is the precision of its own prior. Each child j in ωᵢ contributes through the child’s parent prior and leaf prior, with precisions τₕᵘ and τᵤ. The squared denominator arises because the parent vector enters the child’s prior center with weight 1/mⱼ. Since i is one of j’s parents, that denominator is defined for every term in the child sum.

The context-side parent mean can be written as

μₕᵘᵢ = Pₕᵘᵢ⁻¹[τₕᵘ E_q[sᵘᵢ] + ∑ⱼ∈ωᵢ ((τₕᵘ μₕᵘⱼ + τᵤ μᵤⱼ)/mⱼ − ((τₕᵘ + τᵤ)/mⱼ²)∑ₙ∈πⱼ∖{i} μₕᵘₙ)]

Here μₕᵘᵢ is the updated mean and Pₕᵘᵢ⁻¹ is the inverse of its updated precision. The first term comes from the parents of i through E_q[sᵘᵢ]. The positive term inside the child sum uses the child’s parent mean μₕᵘⱼ and leaf mean μᵤⱼ. The inner sum over πⱼ∖{i} uses μₕᵘₙ, the means of the other parents of j. It accounts for the part of the child’s prior center those other parents already supply. If there are no other parents for that child, the inner sum is empty. The target-side leaf and parent updates are symmetric, exchanging the roles of the vector families and using the corresponding examples and precisions.

The difference between the leaf and parent updates explains which observations drive a parent. A parent vector has no observed pair likelihood of its own in that role. Its update responds to its children’s estimates. The child’s leaf estimate, in turn, includes evidence coming directly from the text. This is the route from a well-attested child through a parent to a child with little evidence. The update also shows why the strength of the connection can vary. A child with several parents apportions its prior center across them, and the prior precisions govern the strength of the links.

Training and scoring after convergence

The authors start the Gaussian factors with randomly drawn means and identity precision matrices.

μ_z ∼ 𝒩(0⃗, I),   P_z = I

Here z is any vector parameter in θ, μ_z is its initial mean, and P_z is its initial precision. The symbol ∼ indicates a draw from the Gaussian with zero mean and identity covariance I. Training updates the bound parameters and the Gaussian factors, then repeats. The parent and leaf factors on both sides are updated using the same scheme. The paper describes convergence to a local solution because the optimization is non-convex. A stationary solution of the update procedure does not establish that every initialization reaches the same estimate.

After fitting, the authors replace the exact posterior in the predictive integral with q. They then approximate the distribution of the dot product itself by a scalar Gaussian. The Gaussian uses the mean and variance of that dot product under q.

∫ σ(uᵢᵀvⱼ) q(θ) dθ ≈ ∫ σ(x) 𝒩(x; μₓ, σₓ²) dx

Here x is the scalar inner product uᵢᵀvⱼ, μₓ is its mean and σₓ² its variance. The differential dx indicates integration over that scalar. The symbol ≈ marks the approximation. Even when each vector is Gaussian, the distribution of the inner product need not be Gaussian. Matching the first moments allows the authors to work with a scalar density of a familiar form.

They approximate the remaining sigmoid integral using the logistic–Gaussian approximation attributed to MacKay.

∫ σ(x) 𝒩(x; μₓ, σₓ²) dx ≈ σ(μₓ / √(1 + πσₓ²/8))

Here π is the circle constant, distinct from the symbol for a parent set when used with a vocabulary index. The sigmoid σ, dot-product mean μₓ, and variance σₓ² have the meanings above. The variance enters the denominator, so it tempers the magnitude of the mean before the sigmoid is applied. A larger variance moves the score toward the sigmoid’s midpoint at a fixed mean. The similarity scoring procedure therefore uses uncertainty as well as the locations of the learned vector means.

For word similarity, the authors evaluate this approximation with a dot product between the context vectors of the queried words and again with a dot product between their target vectors. They then average the scores.

S(i, j) = [Sᵤ(i, j) + Sᵥ(i, j)] / 2

Here S(i, j) is the reported similarity score for words i and j, Sᵤ(i, j) uses the distribution of uᵢᵀuⱼ, and Sᵥ(i, j) uses the distribution of vᵢᵀvⱼ. Each term uses the same approximate sigmoid integral with the moments of the specified inner product. The authors report that this combination gave better empirical results. They give the benchmark scores for the combined procedure, without a numerical breakdown by vector role.

Experiments and results

The corpus, systems, and evaluation

The training data come from SemCor. The paper reports 37,176 annotated sentences, 820,411 words, and a vocabulary of 11,766 words. WordNet supplies the hypernym links for the hierarchy. The implementation evaluated here therefore depends on both an annotated corpus and an external lexical taxonomy. The authors use SemCor as described in A Semantic Concordance.

The comparison includes Skip-Gram with negative sampling, called SG, and Bayesian Skip-Gram, called BSG. The paper evaluates each of those systems and BHWR both in its original form and with Faruqui and colleagues’ lexical refinement. The suffix -P identifies the post-processed variant. SG supplies a point-estimate baseline. BSG supplies a probabilistic baseline without BHWR’s hierarchical prior. The post-processed versions let all three systems benefit from lexical relations at the refinement stage, regardless of what they could use during the original training.

All systems were trained to convergence. The authors report a sub-sampling parameter of 10, a negative-to-positive example ratio of 1, and an embedding dimension of 50. The reported prior precision settings are given in equal-valued pairs, with values of 0.1 and 0.001. Those are settings of the Gaussian priors, separate from the precision matrices that the variational procedure estimates. The probabilities used to draw negative examples come from the adjusted unigram distribution described in the method.

The full evaluation covers MEN, WordSim-353, and Stanford’s Contextual Word Similarities. It also includes the Rare Words benchmark from Better Word Representations with Recursive Neural Networks for Morphology and SimLex-999. The paper abbreviates these datasets as MEN, WS, SCWS, RW, and SL. They contain human judgments used as the reference for the semantic similarity evaluation.

BHWR and BSG score pairs with the posterior predictive approximation. For SG, the authors average context-side and target-side cosine similarities. Cosine similarity compares the directions of two vectors after accounting for their lengths. Both scoring approaches produce an ordering of pairs for comparison with the reference judgments. Spearman rank correlation measures how the ordering by a system agrees with the ordering by humans. The paper expresses it as a percentage. A score of 42.7% therefore denotes a rank correlation on the named dataset. It should be read separately from either the probability assigned to an individual pair or the proportion of pairs classified correctly.

The full benchmark results

Average Spearman rank correlation across the full word-similarity benchmarks

The hierarchical system leads the unrefined comparison, and its post-processed version has the highest overall average.

Average Spearman rank correlation across the full word-similarity benchmarksSG: 27.6SG27.6BSG: 28.8BSG28.8BHWR (this paper): 33.6BHWR (this paper)33.6SG-P: 31.2SG-P31.2BSG-P: 31.4BSG-P31.4BHWR-P: 36.8BHWR-P36.8
The numbers
System or settingSpearman rank correlation %
SG27.6
BSG28.8
BHWR (this paper)33.6
SG-P31.2
BSG-P31.4
BHWR-P36.8

The full-set averages show that BHWR leads the two unrefined baselines and also exceeds their post-processed averages. BHWR-P has the highest average. The benchmarks differ substantially in their absolute scores, so the average is best read alongside the individual results. Each individual score below is the Spearman rank correlation, expressed as a percentage, for the named benchmark in the full evaluation.

On MEN, BHWR scores 42.7%, ahead of SG at 38.3% and BSG at 35.0%. Lexical refinement raises BHWR-P to 49.9%, while SG-P scores 41.2% and BSG-P scores 40.6%. MEN is a clear example of BHWR’s lead among the unrefined configurations. It is also one of the benchmarks where ordinary Skip-Gram ranks above Bayesian Skip-Gram before either is refined. The overall average advantage of BSG over SG therefore describes a pattern across tasks with individual exceptions.

On SCWS, BHWR reaches 43.2%, BSG 39.6%, and SG 36.2%. With refinement, the scores are 47.6% for BHWR-P, 41.9% for BSG-P, and 41.0% for SG-P. The relative order of the underlying approaches is the same before and after applying refinement. This comparison uses the paper’s word-level scoring procedure even though the benchmark is named for contextual similarity. The results show how that procedure ranks pairs in the evaluation and supply no separate measurement of context sensitivity.

For the complete Rare Words benchmark, the unrefined scores are 28.2% for BHWR, 27.6% for BSG, and 23.0% for SG. The refined variants score 29.2% for BHWR-P, 28.2% for BSG-P, and 27.7% for SG-P. This is a close comparison between the Bayesian approaches. It also matters that RW is a named benchmark. Its full-set results are separate from the analysis that filters words by how often they occur in SemCor, which the authors apply across the benchmarks.

On SimLex-999, BHWR scores 15.6%, SG 13.6%, and BSG 13.2%. BHWR-P leads the refined configurations with 18.5%, followed by SG-P at 14.7% and BSG-P at 14.6%. The hierarchy yields the strongest scores in both groups, even though the overall agreement with the reference ranking is low. SimLex-999 provides the other full-set example in which SG has a higher score than BSG without post-processing.

On WordSim-353, BHWR reaches 38.2%, compared with 28.6% for BSG and 27.0% for SG. The refined scores are 38.6% for BHWR-P, 31.5% for BSG-P, and 31.2% for SG-P. BHWR already leads the other configurations before refinement, and its own score rises slightly with the additional step. The benchmark-level comparison helps distinguish a consistent ordering from a uniform-sized effect. BHWR-P places first on every full benchmark, while how much refinement adds to BHWR varies by benchmark.

Results for words with few corpus occurrences

The paper repeats the similarity evaluation for words that occur in SemCor five times or less. The cutoff uses the training corpus instead of a general frequency list. A word can therefore belong to the rare portion of a benchmark because it has limited evidence in this particular training run. The point of the analysis is to see how well the representations work in the condition that motivated the use of a hierarchy.

Average Spearman rank correlation across the rare-word benchmark portions

Hierarchical learning leads ordinary training, and adding lexical refinement gives the highest average on the rare-word portions.

Average Spearman rank correlation across the rare-word benchmark portionsSG: 21.4SG21.4BSG: 24.8BSG24.8BHWR (this paper): 29.5BHWR (this paper)29.5SG-P: 27.0SG-P27.0BSG-P: 27.2BSG-P27.2BHWR-P: 33.4BHWR-P33.4
The numbers
System or settingSpearman rank correlation %
SG21.4
BSG24.8
BHWR (this paper)29.5
SG-P27.0
BSG-P27.2
BHWR-P33.4

BHWR has the highest average for the unrefined systems on the rare-word evaluation and exceeds the averages of the post-processed baselines. BHWR-P has the highest average over all configurations. As in the full evaluation, the individual datasets show where that pattern is strongest and where the scores are close. The percentages in the following comparisons are Spearman rank correlations on the rare-word portion of each named benchmark.

On the MEN portion, BHWR scores 37.7%, SG 28.2%, and BSG 27.9%. The refined version of BHWR reaches 46.4%, ahead of BSG-P at 37.2% and SG-P at 37.0%. The refined baselines score close to unrefined BHWR here. Combining refinement with BHWR gives a clearer lead. MEN also shows that the ranking of the two refined baselines can change when the evaluation is restricted by frequency.

On the RW portion, BHWR scores 25.3%, BSG 24.9%, and SG 24.2%. The corresponding post-processed scores are 29.2%, 25.6%, and 25.4% for BHWR-P, BSG-P, and SG-P. This comparison shows a modest lead for training with the hierarchy alone and a clearer lead when it is combined with lexical refinement. On the SCWS portion, BHWR has 31.7%, BSG 27.4%, and SG 23.1%. The post-processed scores are 35.9% for BHWR-P, 30.6% for SG-P, and 30.3% for BSG-P. BHWR leads both groups on this portion even without the external refinement applied to its own vectors.

On the SL portion, BHWR scores 9.9%, BSG 9.4%, and SG 9.2%. BHWR-P scores 12.8%, SG-P 11.2%, and BSG-P 11.0%. As with full SimLex-999, the rankings here have low agreement with the human judgments. The hierarchy improves the comparison with the unrefined baselines, and refinement gives a further increase. The absolute correlation gives context for the size of the result.

The WS portion gives the exception to BHWR-P’s overall lead. BHWR scores 42.9%, ahead of BHWR-P at 42.8%. The other unrefined scores are 34.4% for BSG and 22.5% for SG. The refined baselines reach 32.0% for BSG-P and 30.8% for SG-P. BSG also scores higher without refinement on this portion. This result matters because the averaged scores alone would suggest that refinement helps every system in every evaluation. The dataset-level results support a general improvement with identifiable exceptions.

What the ablations show

What can be learned from the baseline sequence

The paper does not report a component-by-component ablation of BHWR. It offers comparisons among the hierarchical method and the two Skip-Gram baselines, repeats those comparisons with lexical post-processing, and examines the same systems on rare words. These comparisons give several views of the contribution. Each is informative about a different question, and their strength depends on which parts of the training and scoring procedure the compared systems share.

The comparison of SG with BSG addresses the value of a Bayesian treatment in the absence of BHWR’s hierarchy. BSG’s full-evaluation average is higher, as is its average in the rare-word evaluation. In the latter evaluation, the separation between their averages is more pronounced. This is consistent with the authors’ argument that probabilistic treatment helps when evidence about a word is sparse. The scores on MEN and full SimLex-999 show why the interpretation belongs at the level of the observed pattern. The test compares a point-estimate system with a probabilistic system and their associated scoring procedures. It does not hold scoring fixed while varying only the representation of uncertainty.

The comparison of BHWR with BSG more directly concerns the contribution of the taxonomy. Both approaches are probabilistic, and the paper evaluates both with posterior predictive scoring. BHWR leads BSG on each full benchmark and each rare-word benchmark portion. This is the strongest comparison for the claim that a Bayesian embedding can benefit from incorporating parent and child relationships. Its scope is still a comparison between methods. The experiment does not take BHWR itself and replace its linked priors with independent priors while retaining every other training choice. It therefore supports the benefit of the hierarchical formulation as evaluated.

Learning with the hierarchy and refining after training

The post-processing comparison asks how much lexical refinement can recover when the taxonomy was absent during the initial fit. Both BSG and SG improve in their full-evaluation averages after refinement, and both show higher rare-word averages as well. The usefulness of the lexical resource is thus visible even when it enters late. The comparison also gives the baselines a way to use lexical knowledge, which matters when judging whether BHWR’s advantage merely reflects having access to such a resource at all.

BHWR’s unrefined averages exceed those of both refined baselines in the full and rare-word evaluations. That is the most direct evidence here for the value of coupling co-occurrence and taxonomy while learning. The data also qualify how broadly to state that result. On the rare portions of RW and SL, the refined baselines score above unrefined BHWR. On full RW, BSG-P matches BHWR’s 28.2% rank correlation. The advantage of joint learning shows up across the aggregate comparison and many datasets, while post-processing can be competitive on a particular subset.

Applying the refinement to BHWR itself addresses a separate question. If the prior already captured all the useful information that the refinement adds, the combined version would have little room to gain. BHWR-P leads the full-set average and the rare-word average. The authors suggest that the refinement helps because it can use lexical information such as synonyms in addition to the hypernym links available during BHWR training. The comparison establishes that the procedures can complement each other. It does not separately measure the contribution of synonyms or determine which other features of refinement account for the gains. The slight decrease for BHWR-P on the rare WordSim-353 portion also shows that the improvement can depend on the set being evaluated.

What the frequency restriction contributes

The rare-word analysis makes the proposed mechanism more relevant to the evaluation. With fewer informative corpus appearances, a prior centered on a learned parent has more opportunity to affect the estimate. Looking only at the full benchmarks could conceal what happens to those entries, since the full sets include a wider range of words. The frequency-restricted portions therefore give direct evidence about performance under sparse corpus support.

They also show that the rare-word advantage should be described with care. The difference between BHWR and BSG is especially apparent on the rare portion of MEN. On RW and SL, the unrefined results are much closer. Some comparisons that favor BHWR on the full set narrow when restricted to rare words. Filtering changes which pairs are ranked together, so a difference between the full and restricted evaluations can reflect the composition of the benchmark portion as well as training frequency. The results establish that the method does well on those portions relative to its baselines. They do not track how a particular word’s representation changes as additional occurrences are introduced.

The authors also report that averaging the predictive scores from the context and target families worked better in practice. They give no separate correlations for each family by itself. The reported scores consequently support the combined scoring rule used in the experiments, while the contribution of either side is not quantified. Similarly, the paper gives the electrode example to explain a possible route of information transfer, but it does not present a measured trajectory for anode, cathode, or their parent. The comparisons concern the outcome of the full learning procedure.

Limitations

Limits acknowledged by the authors

The authors identify the size of the corpus as an important constraint. They describe their absolute similarity results as below results reported for GloVe and attribute that in part to the small training corpus. Their experiment supports a comparison among systems trained in the reported setting. It gives no matched comparison showing how the hierarchical method and that earlier work fare when trained on the same larger corpus. The authors propose evaluating BHWR on larger corpora, which could also relax the reliance on annotated training text.

The paper evaluates word similarity. Its conclusion mentions other linguistic tasks, recommendation, and medical inference as possible extensions. Those are proposed applications. The experiments supply no measurements for them and no account of what would happen if the taxonomy in another application were organized differently from WordNet. The authors also explain why they choose non-contextual baselines. Their comparisons address corpus-trained vocabulary representations, whereas the contextualized work they discuss can use lexical knowledge in task-specific or sentence-dependent ways.

Limits of the experimental design and approximation

The evidence about rare words comes from a single corpus and a single reported frequency cutoff. The benchmark called Rare Words and the portions selected using SemCor frequency are valuable views of sparsity, but neither shows performance over a series of frequency bands. The results do not reveal how quickly a prior matters less as a word becomes better attested. The paper also gives scores for the restricted portions without reporting their pair counts or detailing how the frequency criterion is applied when the two members of a pair have different counts. That limits how precisely the reader can compare the full and restricted results.

The benchmark tables report correlations without uncertainty intervals or a test of differences between configurations. The paper’s descriptions of the size of an improvement should therefore be read as comparisons among the reported scores. The tables establish observed rankings and average correlations. They leave open how stable small differences would be across starting points or training samples. This is relevant because the fitting procedure uses random initialization, produces negative samples, and optimizes a non-convex objective.

The taxonomy is treated as an input. The experiments do not compare several taxonomies, vary their coverage, or deliberately remove links. They also do not give a separate evaluation by the number of parents, by position in the hierarchy, or by the availability of well-attested relatives. Those measurements would speak more directly to the propagation mechanism. The reported gains show what happens when the specified WordNet hierarchy is available. They do not establish that any link to a broader category is helpful, or that a word without an informative parent gains the same benefit.

The probabilistic treatment has limits of its own. The variational distribution retains uncertainty within each vector but represents different vectors with separate factors. It cannot preserve posterior dependence between a child and its parent, even though the training updates let each influence the other. The likelihood bound and the later scalar Gaussian approximation are further steps away from exact posterior prediction. The word-similarity evaluation measures agreement with human rankings. It does not test whether the predicted probabilities are calibrated or whether the posterior spreads accurately describe uncertainty about particular words.

Finally, sharing a parent provides evidence for semantic relatedness while allowing the children to have distinct meanings. The method has a way to learn those distinctions from corpus evidence, but its strength depends on that evidence being available and relevant. The evaluation does not test whether the system can recover the intended sense of an ambiguous word in a new sentence. A rank correlation over benchmark pairs supports a narrower claim about the usefulness of the learned representations for ordering word similarities.

What came after

There is no documented follow-up to describe. The work the authors discuss on lexical refinement, Bayesian Skip-Gram, and contextual representations supplies background and comparison methods. Those studies do not establish how later researchers used BHWR. The paper’s own proposed extensions concern training on larger corpora, including corpora that may lack annotation, and evaluating the hierarchical approach on other linguistic and applied tasks. Those proposals leave open whether its gains on similarity rankings carry over to settings with more corpus evidence or to tasks in which the hierarchy serves a different purpose.

Cite

Cite as Oren Barkan, Idan Rejwan, Avi Caciularu and Noam Koenigstein. 2020. Bayesian Hierarchical Words Representation Learning. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.acl-main.356

@inproceedings{barkan2020bayesian,
  title = {{Bayesian Hierarchical Words Representation Learning}},
  author = {Oren Barkan, Idan Rejwan, Avi Caciularu and Noam Koenigstein},
  booktitle = {Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.356},
  url = {https://doi.org/10.18653/v1/2020.acl-main.356}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/barkan-2020-bayesian-hierarchical-words-representation-learning/