Reverse-engineering Language: A Study on the Semantic Compositionality of German Compounds
Paper · 2015 · Corina Dima
Summary
An unfamiliar compound can be understandable as soon as we recognize its parts. The German noun Apfelbaum, for example, combines Apfel, meaning apple, with Baum, meaning tree. Could a computational system do something similar with word embeddings, which represent words as lists of numbers learned from their contexts? The paper turns that question into a reconstruction task. German commonly writes a compound as a single word, so the author can learn a vector for the whole compound directly from text. That gives her a target against which to test a vector built from its parts.
The study uses a filtered set of 34,497 compound entries from GermaNet. Each entry identifies the compound, its modifier and its head. The author learns the underlying word vectors from a 10 billion token German corpus and keeps them fixed while learning how to combine them. Some of the composition methods simply reuse or combine the original constituent vectors. Others learn transformations from examples. The paper introduces Addmask and Wmask, which learn to adjust each word’s vector according to its role in the compound. A word used as a modifier can receive a different adjustment from the same word used as a head.
The test asks where the correct compound appears when dictionary entries are ordered by their similarity to the reconstructed vector. Wmask, which combines the adjusted vectors through a shared transformation, gives the strongest overall retrieval results at every representation size tested. With 300-dimensional vectors, its median rank on the 6901 test compounds is 6, compared with 174 for the baseline that uses the head alone. The rank at the third quartile improves from 884 for that baseline to 24 for Wmask. Fulladd, an earlier method that learns a shared transformation for each constituent position, also reaches a median rank of 6 in that setting.
The results show that the relation between a German compound’s corpus representation and those of its parts can be learned well enough to retrieve the compound from a large dictionary. They also show why the choice of measurement matters. The weakest method trails Wmask much more sharply in retrieval rank than in average squared error, the criterion used for training. The evidence comes from compounds and constituents frequent enough to have their own corpus vectors. How well the same approach would represent newly coined compounds or work with unfamiliar constituents remains an open question.
Deep dive: Reverse-engineering Language: A Study on the Semantic Compositionality of German Compounds
This study tests how well the meanings of German compound nouns can be reconstructed from their parts using word vectors and learned masks. · about 37 minutes to read
The problem and its context
From individual words to compound nouns
A corpus can tell us a great deal about a word that appears frequently enough. If the contexts in which it occurs resemble those of another word, a representation learned from those contexts can put the words near each other. This is the starting point of distributional semantics. The paper asks what happens when a useful expression consists of parts that can also occur independently. The number of well-formed expressions that speakers can create makes direct observation a limited strategy. A rule that combines existing representations could extend it to expressions for which the corpus offers little evidence.
Compounding offers a way to study that problem close to the word level. In the description of compounds adopted by the paper, the parts can function independently elsewhere in the language. Their combination can have a meaning that a reader understands through those parts. In Apfelbaum, Baum names the general kind of thing, which makes it the head. Apfel specifies the kind of tree, which makes it the modifier. The distinction gives the two inputs different jobs from the outset. A procedure that treats those inputs identically can still exploit their individual meanings, but it gives up the information carried by their positions.
The experiment is concerned with the immediate constituents of a compound. For Apfelbaum, both constituents can be illustrated with straightforward independent words. For other entries, a constituent can itself be a compound. The registry used by the study supplies the immediate split, so a whole expression can be handled through the same modifier-and-head interface even when one part has internal structure. This makes the study a question about one composition step at a time.
The challenge in lexical semantics is that a part can contribute differently across combinations. The paper illustrates this with company car and car factory. The first expression refers to a vehicle, with car as its head. The second refers to a factory, and the aspect of car that matters to the expression is its status as something the factory produces. A representation learned for car in isolation can contain information that is useful in both expressions. The composition rule then needs a way to give that information different weight in the two positions.
This is one reason the paper frames the problem as learning from examples. The familiar intuition that a compound gets much of its meaning from its parts leaves room for several computational interpretations. One might assume the head does most of the work. One might add information from both constituents, or give each position a transformation of its own. One might also assume that a particular word contributes in a characteristic way that is hard to express with a single rule for all words. These choices set different requirements for the amount and variety of evidence needed to learn the rule.
Why German makes the question measurable
The paper motivates the problem with an earlier analysis of a German news corpus. In the 28 million words of the APA corpus, compounds made up 47% of distinct word types and 7% of running tokens. Among the compounds, 83% had a frequency of 5 or lower. A type is a distinct vocabulary entry, while a token is an occurrence in the text. The difference between the type and token counts explains why the problem can be important even when compounds account for a modest share of the words a corpus reader encounters. A lexicon may have to deal with many different compound forms whose individual contexts are scarce.
German gives the paper a practical way to check a proposed construction rule. Compounds are generally written continuously, so a corpus procedure that estimates representations for words can estimate one for Apfelbaum just as it can for Apfel or Baum. The compound vector is consequently available as a separate source of evidence. The author can compare a vector produced from the two constituents with one estimated from uses of the complete expression. In this setup, the same spelling convention that helps define the object of study also makes the reference representation possible.
The term reverse-engineering describes that direction of inquiry. The author starts with existing compounds, their established splits and their corpus representations. A successful rule recovers enough of the reference representation from the parts to locate the whole expression in the vector space. The study therefore uses observed compounds to learn and check a rule motivated by the much broader problem of representing productive vocabulary.
What earlier approaches contributed
The paper situates its starting point in work on distributed word representations. It cites Natural Language Processing (almost) from Scratch, Distributed Representations of Words and Phrases and GloVe as examples of work that produces useful representations for individual words. It treats the construction of reusable representations for longer expressions as a further problem. A compound is a tractable case because the experiment can compare the output of a composition rule with a corpus representation of the specific expression.
Earlier work by Mitchell and Lapata supplied several of the basic alternatives. A system can carry forward one constituent, combine corresponding coordinates by addition or multiplication, or use one vector’s direction to reshape the other. These operations differ in what they preserve. Addition carries both inputs into the resulting vector. Multiplication ties each coordinate in the output to both inputs on that coordinate. An operation tied to one input’s direction can treat that constituent as having a distinct role. Together, these choices provide checks on how much benefit comes from learning a more elaborate rule.
The paper also draws on earlier work that uses matrices to change vectors. In work by Baroni and Zamparelli, a lexical item can have its own matrix, giving it a distinct way to act on a partner vector. Another approach shares matrices across words according to their positions, as in Estimating Linear Models for Compositional Distributional Semantics. The paper also adapts ideas from work on recursive phrase representations, including Semantic Compositionality through Recursive Matrix-Vector Spaces. In the compound experiment, these ideas are used for the immediate combination of a modifier and a head.
The paper places this study alongside research on other kinds of morphological complexity. It cites work on English morphologically complex words by Lazaridou and colleagues, and the German study Obtaining a Better Understanding of Distributional Models of German Derivational Morphology. The earlier experiments the author considers closest in the size of their training and test material concern adjective–noun combinations. Those connections make the German compound evaluation a test of whether successful composition techniques carry over to a different kind of expression. The new masking methods add a further question about how much freedom an individual word needs when it participates in a compound.
The method, step by step
Establishing the vectors and the training examples
The experiment begins by learning a common coordinate system for the words. The paper uses the GloVe representation method on raw German text taken from DECOW14AX. GloVe estimates word vectors using evidence about which words occur in one another’s contexts. At this stage, an entry such as Apfelbaum is learned from contexts in which the compound occurs. Its representation comes from those contexts even though the later composition step will use the vectors for Apfel and Baum.
The underlying corpus contains 10 billion tokens. The paper gives the full vocabulary size as 50M unique words and uses a vocabulary of 1,029,270 words after applying a minimum frequency of 100. It trains separate spaces of 50, 100, 200 and 300 dimensions. A dimension is a coordinate of the vector. Increasing the dimension gives the representation more coordinates and changes the size of the transformations that the composition methods can learn. Each space is trained separately, so the comparison concerns what happens when the experiment uses word representations of different sizes.
The author uses the default GloVe training settings with the modifications described in the paper. The co-occurrence matrix uses a symmetric context, looking 10 words to the left and 10 words to the right of the target. Each space is trained for 15 iterations. After training, the vectors are normalized with the L2 norm, using scikit-learn. The procedure first normalizes across features and then across samples. Features are the coordinates of the representation, and samples here are the word vectors. L2 normalization scales an array by its Euclidean length. Applying it in these two directions amounts to scaling the features across words and then scaling each word representation across its features.
The examples for learning composition come from GermaNet 9.0. Its list contains 54,759 compounds with splits first produced automatically and then manually corrected. Each example gives the identity of the compound and its immediate modifier and head. This matters because the position of each constituent is supplied as part of the data. The learning problem begins after the split, with the roles already assigned.
A GermaNet entry enters the experiment only when each of its three words occurs at least 500 times in the corpus used to learn the vectors. The frequency requirement therefore applies to both predictors and targets. A frequent modifier and head alone would give the method reliable inputs, but a sparsely observed compound could still provide an uncertain target. By filtering all three words, the study tries to make the reconstruction problem about the composition rule under reasonably well-observed conditions.
After filtering, 34,497 entries remain. They are shuffled before being divided into training, test and development portions using the 70-20-10 rule. The training portion supplies examples for estimating the parameters of the composition rules. The development portion is used to assess tuning choices. The test portion supplies the final comparisons. The word vectors themselves were learned from the corpus before this allocation of compound triples, so the split applies to supervision for the composition stage.
The full filtered dataset contains 8580 distinct words in the modifier and head positions taken together. Its dictionary contains 41,732 unique words, counting compounds as well as constituents. The difference between the constituent inventory and the dictionary matters for evaluation. The composition rule takes constituents as its inputs, while the eventual search can return any member of the larger dictionary. A total of 1345 compounds also occur as a modifier or head of another compound. Where that happens, the input to the immediate composition step is the corpus vector for the constituent as a whole.
Learning and testing compound reconstruction
The steps in order.
Defining what the rule must reconstruct
An observed vector, in the terminology of the study, is a vector estimated directly from corpus contexts. A composed vector is produced by applying a rule to the observed vectors of the modifier and the head. All three observed words belong to the same space, and the output of the rule returns to that space. The resulting reconstruction can therefore be compared coordinate by coordinate with its target during training and compared with other dictionary vectors during evaluation.
cᶜᵒᵐᵖ = f(mᵒᵇˢ, hᵒᵇˢ)
Here cᶜᵒᵐᵖ is the composed vector for the compound. The superscript comp identifies a representation produced by composition. The superscript obs identifies a corpus-estimated representation. mᵒᵇˢ is the modifier’s observed vector and hᵒᵇˢ is the head’s observed vector. f is the composition function, and the equals sign defines the output of that function for the given inputs. Each vector has n real-valued coordinates, where n is the dimensionality of the word space.
The available training target for every example is the observed vector of the compound. Training seeks to bring the composed vector close to it under squared error. Squaring makes coordinate deviations contribute positively regardless of which vector has the larger value. It also gives larger deviations more influence than smaller ones. The objective displayed by the paper aggregates this coordinate error over the training compounds.
J = ∑ᵢ₌₁^|C| (1/n) ∑ⱼ₌₁^n (cᶜᵒᵐᵖ[i,j] − cᵒᵇˢ[i,j])²
J is the training objective, and C is the set of training compounds. The bars in |C| indicate the number of entries in that set. The outer ∑ adds the contributions indexed by i, from the first training entry to |C|. The inner ∑ runs over the n coordinates, indexed by j from 1 to n. The two bracketed expressions refer to coordinate j of the composed vector and the observed compound vector for instance i. The minus sign takes their difference and the superscript ² squares it. The factor 1/n averages the squared deviations over the coordinates. The displayed expression sums these per-compound errors. Averaging over the training entries as well would rescale the objective by a constant for that training set.
The coordinate loss gives a direct signal about what the composition rule needs to change. For instance, if the rule consistently puts a constituent’s contribution in the wrong direction, the discrepancy recurs across training compounds containing that constituent. During fitting, the parameters available to that rule can respond to those discrepancies. The constituent and compound vectors learned from the corpus remain fixed, so any improvement in reconstruction within a vector space comes from changing the composition function.
Rules that use the constituent vectors directly
The paper switches to a compact notation for comparing the candidate rules. It calls the modifier vector u, the head vector v and the composed output p. The direct baselines give a useful starting point because they show how much of the retrieval task is possible using a single constituent.
p = v
p is the predicted representation and v is the head vector. The equality means that the head is used unchanged. This is the main baseline. A compound often denotes a kind of whatever its head denotes, so the head provides meaningful evidence even before the modifier is considered. Baum already puts Apfelbaum in the vicinity of trees if the corpus space captures that relationship.
p = u
p again denotes the predicted compound vector, and u is the modifier vector used unchanged. The head and modifier baselines together check the value of constituent position. The modifier can give a clue about a property or association of the compound. The head gives a clue about the category to which the compound belongs.
p = u ⊙ v
p is the output, and u and v are the modifier and head vectors. The symbol ⊙ denotes multiplication of corresponding coordinates. Each output coordinate depends only on the values at the same coordinate in the two inputs. A small value on either input can suppress the product there. The operation shares the same rule across all words and treats the two inputs symmetrically.
p = (u · u)v + (λ − 1)(u · v)u
p is the resulting vector, and u and v are again the modifier and the head. The centered dot · denotes a dot product, which multiplies corresponding coordinates and sums the products. The term u · u gives the squared length of u, and u · v measures their alignment with their lengths taken into account. λ is the dilation parameter, and the constant 1 sets the reference point for the second term. The first term scales v by u · u. The second term scales u by the product of λ − 1 and u · v. The plus sign adds those scaled vectors. This makes dilation sensitive to which constituent occupies which position. In particular, the adjustment is directed along the modifier vector.
p = 0.5u + 0.5v
p is the predicted vector. The constant 0.5 weights the modifier u, and the same constant weights the head v. The plus sign sums the scaled coordinates. This baseline constructs the average of the constituent vectors. It allows both words to contribute while imposing the same balance on every compound.
p = λu + βv
p is the output, u is the modifier vector and v is the head vector. Here λ and β are scalar coefficients multiplying the modifier and head, respectively. The plus sign combines the scaled vectors. The paper estimates the coefficients from the training set. The learned balance is shared between compounds, and each scalar multiplies every coordinate of its corresponding vector. The rule can learn that one position typically deserves more weight while retaining the same treatment across the vocabulary.
These operations put different restrictions on the changes that can be made to a constituent vector. With equal or weighted addition, a useful coordinate contributes directly to the corresponding output coordinate. With coordinate-wise multiplication, its contribution depends on the other word’s value at that same coordinate. Dilation ties the adjustment to alignment between the two vectors. A general matrix transformation can use information from multiple input coordinates to construct one output coordinate. The next group of rules explores how to assign such transformations.
Rules that learn matrix transformations
In Lexfunc, the modifier is associated with a matrix that acts on the head. One way to think of this is that the modifier specifies how a head’s representation should change when it is used with that modifier. The fitted matrix is shared among the training examples that contain that word in the modifier position.
p = Uv
p is the composed vector, and v is the fixed observed head vector. U is the matrix associated with the particular modifier. It has n rows and n columns, with n equal to the length of the head vector. The juxtaposition Uv means matrix–vector multiplication. Each coordinate of p is formed from the head coordinates using weights in the corresponding row of U. The modifier’s role in this rule is expressed through its learned matrix.
The DISSECT implementation supplies one version of Lexfunc. It needs a matrix estimated from training occurrences of the modifier, which creates a coverage problem when that word has never appeared in the position. The author also builds a version that assigns an initial matrix to each dictionary word, so a prediction can still be produced for an unseen modifier.
U = I + ε
U is the initial matrix for a modifier, I is the identity matrix and ε denotes a matrix of small Gaussian perturbations added to it. The identity matrix leaves a vector unchanged when applied to it. The plus sign indicates that the perturbations are added to that identity. A modifier with no training evidence retains a matrix close to the identity, so the output stays close to the observed head. The rule can move away from that initial behavior when the modifier has examples from which to learn.
Fulladd uses matrices too, but shares them according to position. Every training example can contribute evidence about how the modifier transformation should behave and how the head transformation should behave. This changes the amount of evidence supporting each parameter and removes the need to estimate a separate dense transformation for each modifier.
p = M₁u + M₂v
p is the compound prediction, and u and v are the fixed modifier and head vectors. M₁ is the matrix shared across modifiers and M₂ is the matrix shared across heads. Each has n rows and n columns, with n denoting the number of coordinates per vector. M₁u and M₂v are matrix–vector products. The plus sign combines the transformed modifier and head by coordinate-wise addition. Words still enter with their distinct corpus vectors, while their positions determine which common transformation they receive.
The paper calls another candidate Matrix in its results. It starts by placing the constituent vectors end to end. The shared transformation takes this longer input back to a vector of the original size. After that, it applies a nonlinear function to each output coordinate.
p = g(W[u; v])
p is the compound prediction. u is the modifier vector and v is the head vector. In [u; v], the brackets and semicolon denote concatenation, with the modifier coordinates followed by the head coordinates. The result is a column of length 2n, where n is the length of either component. W is a shared matrix with n rows and 2n columns. Multiplying by W brings the output back to n coordinates. g applies the hyperbolic tangent, also called tanh, to each coordinate of that product. The nonlinearity changes the way an output coordinate responds as the matrix product grows in magnitude. The order in the concatenation lets the matrix use different weights for the two constituent positions.
Fulllex gives the words their own transformations before it uses a global combination. It brings together two design choices already present elsewhere in the comparison, namely matrices tied to individual words and a shared nonlinear combination at the end.
p = g(W[Vu; Uv])
p is the composed vector. u and v are the fixed modifier and head vectors. V is the learned matrix of the head and acts on u. U is the learned matrix of the modifier and acts on v. Both word-specific matrices are n by n, where n is the number of coordinates in a constituent vector. The matrix–vector products Vu and Uv express how each word’s matrix acts on the other word’s vector. The brackets and semicolon concatenate these products in the order shown. W maps the 2n coordinates of the concatenated input back to n coordinates, and g applies tanh to each coordinate. This gives the individual words a way to influence the transformations while the same final combination is used across examples.
The difference between Fulladd and the word-specific matrix rules is consequential for training. Under a shared transformation, uncommon constituents can benefit from evidence about how the position behaves across all compounds. A word-specific matrix can express something distinctive about an individual word, provided its training combinations supply enough evidence. Fulllex makes this choice for both constituents and also has a shared final stage. The mask methods start from the premise that word-specific behavior is worth retaining, then restrict what its parameters can do.
Applying a mask for each word and role
A mask in this paper is a vector of weights, with one weight for each coordinate of the original word vector. For each dictionary word, the author provides a mask for appearances as a modifier and a mask for appearances as a head. The two can learn independently. In the company car and car factory examples, the representation of car comes from the same underlying vector, while the role determines which mask is applied to it.
Each mask starts with all its entries set to 1. Multiplication by that initial mask leaves the original vector unchanged. Training can then adjust the weights of individual coordinates. This is a more restricted transformation than a dense word-specific matrix. A mask can alter a coordinate’s contribution based on that coordinate’s supplied value. The mask itself has no step that transfers information between coordinates. The shared transformation in Wmask can mix coordinates after this adjustment.
uₘ = u ⊙ u′
uₘ is the masked modifier representation. u is the observed modifier vector, and u′, read as u prime, is the learned modifier mask for that word. The subscript m marks the modifier role. ⊙ multiplies each coordinate of u by the matching coordinate of u′. The output has the same dimensionality as the input. A reduced mask weight can reduce that coordinate’s contribution even though the underlying observed vector stays fixed.
vₕ = v ⊙ v″
vₕ is the masked head representation. v is the observed head vector, and v″, read as v double prime, is the learned head mask for that word. The subscript h marks the head role. As before, ⊙ denotes multiplication of corresponding coordinates. If a word occurs in both roles, the lookup for an occurrence as a head is separate from the lookup for an occurrence as a modifier.
Addmask combines these adjusted vectors directly. Ordinary weighted addition assigns a single scalar to all modifier coordinates and a single scalar to all head coordinates. Addmask can set a distinct weight on each coordinate for each word in the appropriate role. Its combination step then preserves the coordinate structure of the two masked inputs.
p = u ⊙ u′ + v ⊙ v″
p is the predicted vector for the compound. u and v are the observed modifier and head vectors. u′ is the modifier mask associated with the word represented by u, and v″ is the head mask associated with the word represented by v. Each ⊙ forms a masked vector through coordinate-wise multiplication. The plus sign adds the two resulting vectors coordinate by coordinate. The learned behavior is located in the masks, while the addition follows the same fixed rule for all compounds.
Wmask uses the same masking step and changes the final combination. With a shared matrix, the rule can take the evidence retained or amplified by the masks and use it across output coordinates. The nonlinear step follows the same pattern as in Matrix.
p = g(W[u ⊙ u′; v ⊙ v″])
p denotes the composed vector. u and v denote the observed vectors for the modifier and head. u′ and v″ are their role-specific masks. Each ⊙ multiplies matching coordinates, after which the brackets and semicolon concatenate the masked modifier and head in that order. W is the shared matrix that maps the 2n input coordinates to n output coordinates, where n is the size of a word vector. g is the element-wise tanh applied after the matrix product. The masks supply adjustments specific to the words and roles, and W learns a combination that is shared across compounds.
For a dictionary of words, the masks can be organized as separate collections for the two roles. The implementation uses lookup table layers that take a word’s index and return its mask for the requested position. The modifier index addresses the modifier table and the head index addresses the head table. This makes the operation specific to word identity even when two words have similar corpus vectors. Their masks are stored and learned separately.
This design also specifies what a word can contribute when there are few training examples for one of its roles. Its vector remains available because the corpus stage learned it independently. Its mask in that role has only the adjustments supported by the composition training examples that reach it. With no such examples, the all-ones initialization provides an unchanged vector for the composition stage. Wmask can still apply its shared transformation to that vector. This is a consequence of the architecture and initialization, and the experiment assesses it as part of aggregate performance.
Fitting the composition rules
The paper uses DISSECT implementations for the direct rules and several earlier learned methods. It includes both the DISSECT and reimplemented versions of Lexfunc in its comparison. The author also implements Matrix, Fulllex and the two mask methods in Torch7. The phrase composition methods had been used inside more elaborate recursive architectures, so the implementations here extract the operations needed to predict a compound from its immediate constituents. The paper reports that the author makes the implementations of the new composition methods available through her website.
For the Torch7 implementations, the paper uses mean squared error as the training criterion and Adagrad as the optimization procedure. Examples are processed in mini-batches of 100 samples. A mini-batch contributes training errors together before a parameter update. Back-propagation assigns responsibility for those errors to the trainable parameters through the operations that made the prediction. In the mask methods, it updates the lookup entries used by the batch. For Wmask, the shared composition matrix is also part of the learned rule.
The author tests hyper-parameter choices using the development set and uses early stopping to limit overfitting. Early stopping limits training according to performance during fitting so that continued improvement on training examples does not dictate how long the procedure runs. The paper’s central separation remains in force throughout this process. Corpus training sets the observed vectors, and composition training fits a mapping among those fixed representations. This separation makes the ensuing test a comparison of rules operating on the same underlying evidence within each representation size.
Experiments and results
How a reconstructed vector is scored
The main evaluation uses the 6901 compounds in the test split. For each compound, the system generates a vector from the given modifier and head. To evaluate the prediction, the predicted vector is compared with the observed vectors for all 41,732 distinct words listed in the dataset’s dictionary. It orders the candidates by cosine semantic similarity. In this application, cosine similarity measures alignment between the predicted and observed vectors. A candidate receives a higher similarity when its direction is closer to the direction of the prediction.
The rank is the position of the compound’s own observed vector in that ordering. If the compound is the nearest neighbor, its rank is 1. The candidate set includes words other than the correct compound, including constituents and other compounds. A method that points towards the right broad category may still leave many candidates ahead of the intended target. In that way the experiment tests the specificity of the reconstruction as well as whether it lands somewhere in a suitable part of the space.
The ranking uses a cutoff of 1000. The paper assigns a capped rank when the correct vector is outside the nearest 1000 neighbors and uses ≥ 1K in the results table. This preserves the distinction between successful retrieval within the examined range and a result at the cutoff, while leaving the ordering farther down the dictionary unresolved. As a result, a group of entries at the cutoff can represent predictions whose exact retrieval quality varies beyond what is recorded.
The author summarizes ranks by their first, second and third quartiles, called Q1, Q2 and Q3. These are the thresholds for the best-ranked 25%, 50% and 75% of test examples, respectively. A Q1 of 2 means that the best-ranked 25% of examples receive ranks of 1 or 2. Q2 is the median. A Q3 of 24 means a rank of 24 covers the best-ranked 75% of the test set. These summaries help distinguish a method that succeeds often near the top from one that also holds up as the evaluation includes harder examples.
How the baselines compare with learned composition
The head alone gives a substantially better baseline than the modifier alone. For the 300-dimensional space, the head baseline has a median test rank of 174, while the modifier baseline has a median rank of 808. The head baseline’s first quartile is 29 and its third quartile is 884. These figures fit the linguistic role of the head as a guide to the compound’s category. They also show how much ambiguity remains when the predicted vector represents that category without an adjustment for the modifier.
Simple additive rules help. In the same 300-dimensional space, equal-weight addition reaches a median rank of 120, and learned scalar weights reach 105. Their third-quartile ranks are 553 and 503, respectively. Dilation has a median of 181. The coordinate-wise multiplicative rule reaches the ranking cutoff across the test results, failing to provide the useful guidance associated with it in the earlier study the paper discusses.
Learned matrix transformations reach a different range of median ranks. The 300-dimensional Matrix result is 7, as is the Addmask result. Fulladd and Wmask both reach 6. Fulllex reaches 26. The reimplemented Lexfunc, which covers the full set via its initialization, has a median rank of 51. The DISSECT version has a median rank of 47 on the 88.5% of test examples it covers. That last figure is conditional on the eligible examples, a difference worth keeping in mind when reading it alongside full-test ranks.
Median retrieval rank on the German compound test set with 300-dimensional vectors
Shared transformations and learned masks bring the correct compounds much closer to the top of the dictionary ranking.
The numbers
| System or setting | median rank |
|---|---|
| Head only | 174 |
| Equal-weight addition | 120 |
| Weighted addition | 105 |
| Fulllex | 26 |
| Matrix | 7 |
| Addmask | 7 |
| Fulladd | 6 |
| Wmask (this paper) | 6 |
These median results tell only part of the story about the strongest methods. At 300 dimensions, the first quartile is 2 for Matrix, Fulladd and Wmask, and 3 for Addmask. At the third quartile, Matrix has rank 29, while Addmask and Fulladd each have 27. Wmask reaches 24. The equality at the median for Fulladd and Wmask therefore coexists with a better third quartile for Wmask. The result is a stronger retrieval threshold when the comparison extends further into the distribution of test examples.
Third-quartile retrieval rank on the German compound test set with 300-dimensional vectors
Wmask reaches the strongest retrieval threshold among the leading methods at the third quartile.
The numbers
| System or setting | third-quartile rank |
|---|---|
| Matrix | 29 |
| Addmask | 27 |
| Fulladd | 27 |
| Wmask (this paper) | 24 |
Seen together, the comparisons put two kinds of improvement in perspective. The big change from the head baseline to the leading learned methods comes from incorporating the two constituents through systematic adjustments. The advantage among the leading learned methods is smaller on the reported quartiles. Wmask’s result represents the strongest overall performance in this experiment, with several of the simpler learned rules already retrieving the correct compound near the top of the dictionary for a substantial share of the test set.
What changes with vector size
Across representation sizes, Wmask has a first-quartile rank of 2 in every setting. Its median is 9 at 50 dimensions, 7 at 100 dimensions and 6 at both 200 and 300 dimensions. Its third-quartile ranks over those same settings are 64, 35, 25 and 24. The head baseline also improves with dimensionality, with median ranks of 445, 202, 197 and 174. The Wmask advantage over the head is therefore a feature of the comparison across sizes. The larger spaces also make the head itself a more effective starting point.
Wmask third-quartile retrieval rank by vector size on the German compound test set
The retrieval threshold improves as Wmask uses larger word vectors.
The numbers
| System or setting | third-quartile rank |
|---|---|
| Wmask with 50 dimensions | 64 |
| Wmask with 100 dimensions | 35 |
| Wmask with 200 dimensions | 25 |
| Wmask with 300 dimensions (this paper) | 24 |
The relative order of other learned rules varies with vector size and with the quartile being considered. At 50 dimensions, Addmask has a median rank of 12. Fulllex has a median of 18, and Matrix and Fulladd each have a median of 19. By 200 dimensions, Matrix, Addmask and Fulladd all have a median of 7, while Fulllex has a median of 16 and Wmask has a median of 6. At 300 dimensions, Fulllex’s median is 26. The pattern is consistent with assessing the learned rule and the space together. Additional coordinates provide more information, and they also give transformations more parameters to estimate.
The comparison by size does more than establish the best quartile in the table. A rule can have the same median in different spaces while changing the results for particular compounds. Wmask illustrates this at 200 and 300 dimensions, where the median is identical and the third quartile improves. A test over the paired ranks can detect changes across the set of compounds that a single quartile masks.
What the statistical tests and squared error add
The author examines four of the strongest methods in the statistical analysis, namely Matrix, Fulladd, Addmask and Wmask. For the 300-dimensional setting, a Friedman test over their ranks finds a significant difference with p < 0.01. The methods make predictions for the same compounds, so the comparison can use the matched outcomes rather than treating their results as unrelated samples.
The paper follows this test with Wilcoxon signed-rank comparisons and Bonferroni corrections for the pairwise tests. It reports p < 0.01 for every pair except Matrix and Addmask, for which it reports p = 0.9. That exception concerns the paired ranks over the test examples. It allows for differences in particular predictions and for the small differences seen in the quartiles. It also illustrates why the equality of a median is insufficient to establish that two methods behave the same across test items.
For Wmask evaluated across the different dimensions, the paper reports a significant difference with p < 0.01 and finds improvements with increasing size in the pairwise comparisons, also at p < 0.01. This is compatible with the shared median of 6 at 200 and 300 dimensions. The rank distribution can shift as some compounds move up or down the candidate ordering while the median remains fixed.
The paper also computes mean squared error between the composed vector and the observed vector on the test set. The strongest methods by rank are also the strongest under squared error, but the spread of the scores looks different. The study describes the squared error of the multiplicative rule as twice that of Wmask. In the ranking, the multiplicative rule gives the observed targets ranks of ≥ 1000, while Wmask gives ranks of ≤ 25 to 75% of the test data in the result highlighted by the paper. Squared error measures the distance to the one target, coordinate by coordinate. Rank also depends on how many other dictionary vectors compete successfully with that target. A squared-error comparison therefore gives a different view of how much practical retrieval performance changes.
The paper reports that prior adjective–noun studies closest in training and test scale gave their best results to the lexical function approach, with their lowest median ranks above 100. In the German compound experiment, the strongest median is 6. The comparison provides context for how well the compound reconstruction worked under its own conditions. The earlier task concerns adjective–noun composition, so its reported median does not serve as a controlled benchmark for improvement on the same examples.
What the ablations show
The paper offers comparisons between related composition rules and between representation sizes, along with coverage and metric analyses, rather than a systematic ablation of every component of Wmask. Some pairs of methods vary a single visible architectural choice. Their results help explain which parts of the design are associated with better retrieval and where the experiment leaves the mechanism uncertain.
Adding masks before a shared transformation
Matrix provides the closest direct comparison for the value of masking in Wmask. Both methods concatenate their inputs, use a shared matrix to return to the original vector size, and apply the same nonlinearity. Matrix passes the original vectors into this operation. Wmask passes in the word- and position-specific masked vectors. At 300 dimensions, Matrix has a median rank of 7 and a third quartile of 29, while Wmask has a median of 6 and a third quartile of 24. The paper’s pairwise significance result for the two methods is p < 0.01 in that setting.
This comparison connects Wmask’s improvement to allowing those extra adjustments before the shared composition step. Each constituent vector already identifies a different word in Matrix. The masks give Wmask a further ability to learn updates specific to that word and its role, which can modify what the common transformation receives. The study does not look inside the learned masks to see which coordinates account for the gains. The retrieval evidence supports the usefulness of the adjustment, while the example involving car motivates a linguistic interpretation for it.
Changing the combination after masking
Addmask and Wmask give each word the same kind of role-specific parameters. Addmask adds the resulting vectors. Wmask uses the shared transformation and tanh. For the 300-dimensional test, Addmask reaches a median of 7 and a third quartile of 27, while Wmask reaches 6 and 24. This is evidence that a more flexible combination can make better use of the masked inputs in the reported setup.
The comparison changes both the shared linear transformation of the concatenated inputs and the subsequent nonlinearity. It gives evidence for that combination stage as a whole. The design does not report the intermediate comparison that would hold the learned matrix in place and vary only the use of tanh. Similarly, the masks in each method are fitted with the rest of its own rule. The scores concern two complete trained systems whose masking capacity is similar, and the masks themselves may learn different adjustments.
Addmask and Matrix offer a complementary comparison. Addmask has word-specific adjustments with simple addition, while Matrix has a richer global combination with the original vectors. Their 300-dimensional medians are both 7, and the paired Wilcoxon result is p = 0.9. Each gives the composition process a different kind of flexibility. The strong Wmask result shows what happened when the study brought these kinds of flexibility together in one rule.
Sharing parameters and learning from sparse examples
The matrix comparisons distinguish changes tied to individual words from changes shared across all words in a position. Fulladd, which fits shared position matrices, beats Lexfunc and Fulllex on the German compound task. The author suggests that the training material can support the shared matrices more effectively than it supports the larger set of word-specific matrix parameters. Each example helps fit Fulladd’s two position transformations, while an individual word’s dense matrix depends on evidence connected to that word.
The size of the role-specific adjustments matters to that explanation. The masks use 2n parameters per word, corresponding to n coordinates for each role. The dense word-specific approaches estimate matrices of n² parameters. A mask makes the learning problem smaller by allowing each word to rescale its coordinates independently. The corpus vector still brings in evidence learned across the text. The global matrix in Wmask can mix the adjusted coordinates using a transformation estimated from many compounds.
Lexfunc’s coverage problem makes scarcity visible at the level of particular examples. The standard DISSECT implementation cannot compose 11.5% of the test data because the modifier has not appeared as a modifier in the training split. Initializing matrices close to the identity makes the reimplementation able to return a vector there. The DISSECT score applies to the 88.5% with usable modifier training evidence. Both the corresponding change in evaluated examples and the reimplementation matter when interpreting the two scores. The comparison demonstrates the benefit to coverage of an explicit starting behavior, while the aggregate results leave open how well that behavior ranks the missing cases by themselves.
The evidence for the author’s parameter-estimation explanation is indirect. The paper compares rules that differ in both their parameter counts and the operations they can express. It does not trace learning as each modifier gains additional examples. Fulladd’s success and the stronger results of the mask methods are consistent with the idea that a smaller word-specific adjustment fits the available evidence better. A direct analysis of how performance varies with the training evidence for each role would be needed to locate that effect more precisely.
Varying the representation and the measurement
The representation-size analysis tests whether a method’s result is tied to a particular vector space. Wmask leads across the sizes evaluated and improves significantly as size increases. The improvement appears in the third quartile even where the median stops changing. For a composition method, this matters because changing the vector size affects both the supplied representation and the number of weights in some of the learned operations. The result is an effect of the larger representation setting as a whole.
The multiplicative rule’s weak showing is a different kind of diagnostic. The author offers normalization and incompatibility with the GloVe representations as possible explanations for why a method that had worked well in earlier experiments performs poorly here. The comparison retains the same normalization and representation family across the composition rules. Its result is therefore local to these spaces. The experiment gives grounds for asking whether the product operation is sensitive to how the coordinates were learned and scaled, while leaving the proposed explanations untested.
Finally, the rank and squared-error analyses clarify which notion of success is being improved. Squared error asks how closely the prediction approaches the target vector. The ranking asks whether the prediction is specific enough to distinguish the target from similar candidates. The leading methods do well by both criteria, yet the difference between the weakest rule and Wmask is much sharper in retrieval. This finding motivates the paper’s question about training objectives. It leaves open whether an objective more closely aligned with retrieval could improve the rankings or change the relative performance of the composition rules.
Limitations
Limits the author identifies
The author filters the compounds and their constituents because the reconstruction target and both inputs need to be learned from enough corpus contexts to be useful. The minimum count of 500 for every member of a triple serves that purpose. The results consequently describe a favorable observational regime. The paper introduces productive compounding as a reason for constructing representations, while using compounds frequent enough to yield observable references for evaluation. This is a practical way to design the test and also bounds the setting in which its results apply.
The standard Lexfunc implementation presents a coverage limit that the paper names and addresses. Some test modifiers have no occurrence in the corresponding training position. A word-specific matrix learned exclusively from those occurrences is unavailable in such cases. The reimplementation’s initialization gives the system a way to make a prediction. It leaves the modifier close to an identity transformation when no examples have arrived to change it, so the prediction then draws primarily on the head. Learning a distinctive effect for the modifier still requires evidence.
The author also flags uncertainty about what caused several of the comparisons. The available examples may be insufficient for the dense word-specific transformations, and the normalization or the GloVe representation may account for the weak multiplicative result. These explanations are offered as interpretations. The paper explicitly calls for further work on how the choice of objective affects compound composition. Its conclusion identifies existing English compound datasets as a setting for future investigation.
Further limits visible in the setup
The reference in this study is a corpus-estimated word vector. That provides a consistent and testable target, especially after filtering for frequency. It also defines what counts as success. A high rank means the predicted vector is well enough aligned with the expected corpus vector to retrieve it within the dictionary. The authors do not evaluate whether a person would accept a definition inferred from that vector, whether the procedure recognizes the relation between the constituents, or whether the learned representation improves a separate task. Such evaluations would answer questions about compound meaning beyond corpus-vector reconstruction.
The examples are split at the level of compound entries. Reuse of words across roles is a property of the data, and many training and test items can draw on the same constituent inventory. The paper’s coverage result shows that some modifiers have no training example in the modifier position. It does not report a separate assessment designed around holding out all occurrences of selected constituent words or families of compounds. The headline ranks thus summarize generalization to held-out entries under the randomized split. They leave open how good the composition choices are when tested specifically on unfamiliar constituents.
There are also two distinct meanings of “unseen” in this setup. A test compound is held out from the examples used to fit composition. Its corpus vector has already been learned because that vector will serve as the evaluation target. In deployment, a reason to use composition would be to represent a word with too few corpus occurrences to learn a useful vector for the whole. The rule’s inputs are compatible with that motivation, since they consist of the constituent representations and their role information. But the paper’s test cannot directly check agreement with an independently well-estimated target for a compound that lacks such an estimate.
The treatment of compounds that serve as constituents places a boundary around claims about recursion. A compound can participate as a modifier or head elsewhere in the dataset, and its observed vector can be used in that position. The immediate composition rule therefore accommodates compounds as inputs. The study does not evaluate a procedure that must first compose an inner compound, feed its predicted vector into a higher step and then assess how well errors accumulate through that sequence. This matters when extending the method from the supplied immediate split to larger structures.
The split itself is another source of supervision. GermaNet supplies a corrected modifier and head for each included word. The experiment can isolate composition because the inputs already have the intended identity and order. An application that receives only a written compound would need to determine its constituents before using this rule. The reported retrieval scores are conditional on having the supplied split. They do not measure the effect of ambiguities or errors introduced by a compound splitter.
The paper also begins from the idea that the role of a word can influence which aspects of its meaning matter. The masks operationalize a general adjustment for each word in each role. Every appearance of a given word as a modifier receives the same modifier mask, and every appearance as a head receives the same head mask. Different partner words still contribute differently through their own vectors and through the subsequent combination. The study does not show that any mask coordinate corresponds to a recognizable sense, or that the role distinction captures different uses within the same position. The linguistic explanation is a motivation for the parameterization, and the evidence for its value is retrieval performance.
Lastly, a rank is conditional on the candidate dictionary used to compute it. Including more similar candidates or changing the mix of compounds and constituents could alter the positions of the observed targets without changing the predictions themselves. The 1000 cutoff further limits comparisons at the weak end, where many failures receive the same recorded treatment. Quartiles make the broad spread of outcomes readable, but they do not identify which compounds account for it. Frequency, ambiguity of meaning and the relation between the parts are possible dimensions of variation within the test set. The experiment’s aggregate comparisons leave their individual contributions unresolved.
What came after
The paper’s conclusion points toward testing a composition rule specific to compounds on existing English datasets. This would extend the question beyond the German setup, where the consistently written compound provides a convenient corpus target. The cited English datasets were proposed as material for future experiments. There is no documented follow-up here that establishes how the masking approach performed on them or how a later study built on the German results.
Cite
Cite as Corina Dima. 2015. Reverse-engineering Language: A Study on the Semantic Compositionality of German Compounds. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{corina2015reverse,
title = {{Reverse-engineering Language: A Study on the Semantic Compositionality of German Compounds}},
author = {Corina Dima},
booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
year = {2015},
doi = {10.18653/v1/d15-1188},
url = {https://doi.org/10.18653/v1/d15-1188}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dima-2015-reverse-engineering-language-study-semantic/