Discriminative Neural Sentence Modeling by Tree-Based Convolution
Paper · 2015 · Lili Mou, Hao Peng, Ge Li et al.
Summary
A sentence classifier has to decide which words belong together before it can make good use of them. The words that give a review its tone may be separated by other words. In a question, the word that signals the expected answer type may matter because of its grammatical relationship to a phrase elsewhere in the sentence. The authors ask whether a classifier can look for such relationships directly and give evidence from any part of the sentence a short route to the final prediction. Their answer is the tree-based convolutional neural network, or TBCNN, an architecture for text classification.
The classifier starts with a grammatical analysis of the sentence. It can use a constituency tree, which groups words into phrases, or a dependency tree, which connects words to the words that govern them. A learned detector examines a small neighborhood at each tree node. In the constituency version, it distinguishes a parent from its left and right children. In the dependency version, it distinguishes children by the grammatical relations that connect them to the parent. Max pooling then keeps the strongest response for each detector, either across the whole sentence or within separate regions. A strong cue deep in the tree can therefore reach the classifier without having to pass through every higher constituent.
On the Stanford Sentiment Treebank test split, the dependency version reaches 51.4% accuracy with 5 sentiment labels, ahead of the strongest earlier result listed by the paper. Its accuracy after transfer to binary polarity classification is 87.9%, below several of the reported binary results. On the TREC question classification test set, it reaches 96.0% accuracy, ahead of a system that uses extensive hand-built features and rules. The constituency version also performs well and scores below the dependency version in both experiments. The tasks test different uses of a sentence representation, one for sentiment analysis and one for identifying the type of answer a question seeks.
The authors also compare ways of pooling, group test sentences by length, and trace the winning detector responses in a review sentence. Pooling by region gives a modest advantage over global pooling under shared settings. Both tree-based versions outperform a reimplemented recursive baseline across the reported length groups, with a wider gap for sentences containing more than 20 words. The visualization shows how a detector can draw evidence from a word together with its dependents. These analyses connect the accuracy results to the architecture while leaving open how much of the gain comes from shorter paths, the choice of parse, or other differences between the systems.
Deep dive: Discriminative Neural Sentence Modeling by Tree-Based Convolution
Tree-based convolution uses grammatical structure to classify sentences, improving fine-grained sentiment prediction and question classification. · about 34 minutes to read
The problem and its context
A sentence label depends on how words work together
The paper studies supervised sentence classification. The input is a sentence and the answer is a label from a pre-defined set. On the review task, the label describes the sentiment expressed by the sentence. On the question task, it describes the kind of answer being requested. A question that asks for a temperature calls for a numeric answer, for instance. The classifier can identify that category without knowing the temperature. Likewise, a review can contain words associated with favorable reactions while expressing an unfavorable assessment once their context is taken into account.
Useful evidence can occupy a small part of the sentence. It can also be spread across words that participate in the same construction. This creates a choice about what counts as a neighborhood. Successive words form a neighborhood in the written sentence. A phrase and its parts form a neighborhood in a constituency analysis. A governing word and its dependents form a neighborhood in a dependency analysis. Each definition gives a feature detector access to different combinations of words. The paper investigates what happens when the neighborhood is defined by parsing.
The introduction describes several ways researchers had already addressed sentence classification. They could construct indicators for sequences of adjacent words, use parts of dependency trees as features, or design more specialized clues for a particular task. The first kind of indicator uses an n-gram. A dependency subtree feature can include grammatical relationships that a sequence of words leaves implicit. The paper cites work on dependency-tree sentiment classification as an example of using that source of structure.
A second approach was to specify how sentences should be compared. The paper describes support vector machines that use a kernel, a function for measuring similarity between inputs, without requiring the practitioner to list a feature vector for each sentence. Choices about which similarities should count still shape the classifier. Both kernel design and explicit feature engineering therefore give researchers ways to express linguistic judgments about the task. The authors were interested in learning which patterns matter from examples while retaining a grammatical organization of the input.
What sequence convolution and recursive composition offered
Distributed representations provided a starting point for learning such patterns. A word can be associated with a vector of real numbers that serves as its feature representation. The entries give a neural network more material to work with than an identifier for the word alone. The authors point to unsupervised methods for learning word embeddings and to work that extends distributed representation to larger units, including sentences and paragraphs. Learning useful word inputs and learning how to combine them for a label are distinct jobs in the proposed architecture.
In a conventional sentence convolution, a detector takes a window of successive words and produces a response to their combination. The detector is reused as the window moves. Pooling gathers responses into a fixed-size representation that works for sentences of different lengths. A feature can be found wherever its words occur together in the window. The paper discusses systems such as Kim’s sentence CNN and deeper sequence architectures such as the convolutional approach of Kalchbrenner and colleagues.
For a detector in a single sequence layer, interaction is limited to the words within its window. A deeper architecture lets later layers combine evidence from earlier windows. The paper calls these approaches flat because they organize convolution by sequence position and do not explicitly use a parse tree. Its objection concerns the definition of locality. Intervening words can put two grammatically related words outside the reach of a particular sequence window even though a parse puts them beside each other as nodes.
Recursive neural networks offered a way to use grammatical neighborhoods. In the basic constituency version discussed by the authors, the words occupy the leaves of a tree. Each parent gets a representation computed from those of its children. Repeating the operation gives the root a vector for the whole sentence. The root vector serves as input to the classifier. Earlier work had also used other grammatical frameworks, including dependencies, for recursive composition. The paper’s basic reference point is the recursive autoencoder work of Socher and colleagues.
Recursive composition gives the representation a route for combining information over increasingly large parts of the sentence. Earlier variants made these combinations richer through matrix–vector interactions or tensor interactions. The authors associate these changes with a greater ability to capture effects such as negation and exclamation. They also describe long short-term memory as a way to alleviate training difficulties in recursive architectures, including tree-structured LSTMs. Their discussion distinguishes recursion over a grammatical tree from recurrence arranged by sequence order.
The path from evidence to prediction
In a classifier that reads only the root, evidence from a leaf must survive the successive combinations between that leaf and the root. The route also matters in the other direction. During training, back-propagation sends a signal from the prediction error toward the computations that produced it. The paper describes how gradients over long routes can diminish or grow, making it harder to train the network. It also raises a separate issue of representation. A clue useful to the final decision can lose its prominence while being combined with other information at successive ancestors.
The proposed architecture changes where the classifier reads from. A detector at a node can send its response directly to the pooling stage. The response need not be incorporated into every ancestor’s vector before it can contribute to the prediction. That makes detector depth in the parse different from the length of the detector’s route to the classifier. A feature at a low node and one near the root have the same kinds of layers left to traverse after convolution.
This distinction defines the question the rest of the paper investigates. Syntactic neighborhoods supply the input to local feature detectors. Pooling collects those features for a sentence-level decision. Learning through this arrangement tests whether the benefits associated with short routes in sequence convolution can coexist with the explicit grammatical organization used by a recursive network. The constituency version even uses recursion to prepare its node vectors, showing that the proposal concerns where the classification evidence is collected as well as how the input is represented.
The method, step by step
From a sentence to candidate evidence
The classifier starts by obtaining a tree. A constituency tree represents phrases as nodes and words as leaves. A dependency tree represents words as nodes, and its links identify the grammatical relation between a dependent and its governing word. A phrase boundary is therefore a natural organizing unit for the constituency version. A link between words is the natural unit for the version based on dependency parsing.
The next step is to assign a vector to every node. Word nodes can draw on word embeddings. For constituency nodes that stand for phrases, the authors prepare vectors using a recursive computation. Once the vectors are available, a detector looks at the current node and its direct children. The authors apply the same convolution rule throughout the tree. Every position produces a vector of responses, with each entry recording the response of a learned detector at that position.
Those response vectors still belong to specific nodes. A longer sentence generally provides more positions to inspect, and the shape of the tree determines which nodes are grouped into each local window. A classifier needs a consistent input size across sentences. Pooling supplies that size by retaining the maximum for each detector over its assigned positions. It can do this for the tree as a whole or separately for regions. A fully connected hidden layer combines the pooled evidence, and a softmax layer produces probabilities for the sentence labels.
From a parsed sentence to label probabilities
The steps in order.
A detector response and a label probability have different meanings. A detector registers how strongly a local calculation responds to its inputs. A pool value records that detector’s strongest response in a region. The classifier can use several such values together, and a particular response may matter differently for different labels. The paper’s visualization later traces which nodes supplied pool values. The trace is possible because every pooled coordinate has a source in the tree.
How convolution changes when the input is a tree
The paper starts from ordinary sequence convolution to explain the change. A fixed-width window contains embeddings arranged by word position. Concatenation joins those embeddings into a single column so that a transformation can use all the positions together.
y = f(W · [x₁; …; xₜ] + b)
Here t is the number of words in the window, and x₁ through xₜ are their embedding vectors. The brackets enclose the concatenated vector, and the semicolons indicate concatenation in the stated order. The ellipsis stands for the intervening word vectors. W is a learned weight matrix, the centered dot denotes matrix–vector multiplication, and b is a learned bias vector added to the transformed input. f is the activation function, a nonlinear operation applied to the transformed values. y is the output vector for this window. Each of its entries is the response of a feature detector. The equals sign specifies how the output is computed.
The paper calls the size of a word vector nₑ and the number of detectors n꜀. The sequence window has a fixed input width because the number of words and the size of each word vector are fixed. The rows of W correspond to detectors. Its columns provide weights for input coordinates, with a separate block of columns for each word position. A detector can therefore use one part of its weights for one position and another part for a different position. As the window moves, the learned transformation is shared.
One can also think of the transformation as applying the relevant block of weights to each vector separately and adding the transformed vectors. This is the form the authors use to describe convolution on a tree. Which matrix applies to a node can now depend on what the node does in the window.
y = f(Σᵢ₌₁ᵗ Wᵢ · xᵢ + b)
Here y is the detector-response vector for the current subtree, and f is the activation function. t counts nodes in this window, i indexes them, and xᵢ is the vector for node i. Wᵢ is the matrix assigned to that node in the window. Σᵢ₌₁ᵗ adds the contributions from the first node through the last. The centered dot indicates a matrix applied to a node vector, and b supplies the bias for the detectors. Addition combines the transformed vectors and the bias before activation.
If there are nₑ coordinates in each node vector and n꜀ detectors, each matrix has n꜀ rows and nₑ columns. Each transformed node therefore contributes a vector of the same size to the sum. The generic equation leaves the assignment of Wᵢ open. In the constituency version, the relevant property is the node’s position in a binary window. In the dependency version, it is the grammatical relation to the window’s governing word. Making that assignment explicit is what lets the same basic calculation serve both tree types.
The experiments use windows of depth 2. A window at a node takes its children directly into account. Moving the window means evaluating it at other nodes throughout the tree, including leaves. The operation has a fixed depth across sentences. This allows even a small window to combine words with substantial separation in the written sentence when they are linked in a dependency tree. It also gives the constituency version access to phrase information that has already been combined during pretraining.
The constituency version builds phrase vectors first
For c-TBCNN, the authors use the Stanford parser and binarize the constituency trees. Binarization gives the convolution a consistent left-child and right-child arrangement at internal nodes. A leaf represents a word and already has a vector in the embedding space. An internal node represents a constituent, such as a noun phrase, and needs a vector computed from its children. The authors use the recursive composition operation discussed in their account of earlier work.
p = f(W · [c₁; c₂] + b)
Here p is the vector for the parent constituent, and c₁ and c₂ are the vectors for its children in the order used for composition. The bracketed expression concatenates those child vectors, as indicated by the semicolon. W is the parameter matrix of the recursive transformation, and b is its bias vector. The centered dot marks multiplication of the matrix by the combined input, + adds the bias, and f applies the activation. The parameters in this equation belong to the recursive preparation stage.
The computation starts with children whose vectors are already available and proceeds up the tree. Once a parent has a vector, it can serve as a child in the next composition. This gives internal nodes numerical representations before convolution begins. The authors pretrain this recursive network and hold the resulting node representations fixed afterward. A parent vector can thus contain information from farther down its subtree even though the later convolution sees only the parent and its immediate children.
The convolution stage uses separate transformations for the parent and its children. The authors distinguish the constituency parameters from the dependency parameters through a superscript. Parenthesized labels in the formula serve that purpose.
y = f(Wₚ⁽ᶜ⁾ · p + Wₗ⁽ᶜ⁾ · cₗ + Wᵣ⁽ᶜ⁾ · cᵣ + b⁽ᶜ⁾)
Here y is the vector of responses at the current window, and f is the convolutional activation. p represents the parent. cₗ and cᵣ are the left and right child vectors. The subscripts p, l, and r on W select the learned matrix for the parent, left child, and right child, respectively. The superscript (c) designates the constituency version, and b⁽ᶜ⁾ is its convolutional bias. Each centered dot applies a matrix to the corresponding vector. The plus signs combine the results and the bias before activation.
At a leaf, the absent child vectors are set to 0. This is a zero vector in each of the two child positions. The parent term still acts on the leaf’s word vector, and the bias still applies. A detector can respond to a word on its own as well as to a configuration involving a constituent and its children. Both responses enter the same pool of candidate features. The paper illustrates the distinction between the two parse types using a brief sentence in which a speaker expresses affection for something. On the constituency side, the same window can inspect a phrase and its parts at one position and a word alone at another.
There are two learned computations here with different purposes. Recursive preparation constructs the input features at phrase nodes. Convolution reads selected combinations of already available vectors and yields candidate evidence for the classifier. The latter step can give a deeply embedded phrase its own route to pooling. The former can supply a higher node with context from across its subtree. This is the basis for the authors’ suggestion that the constituency version may be particularly able to integrate broader information.
The dependency version shares weights by grammatical relation
In d-TBCNN, a node represents a word. Its children are words governed directly by it. Different words can have different numbers of children, even if they play similar roles elsewhere in their sentences. A window with a dedicated parameter for each child position would require a convention for which child occupies which position. The authors instead use the dependency relation to choose the weight matrix. A child linked by a subject relation gets the matrix for that relation, for instance.
y = f(Wₚ⁽ᵈ⁾ · p + Σᵢ₌₁ⁿ Wᵣ[𝚌ᵢ]⁽ᵈ⁾ · cᵢ + b⁽ᵈ⁾)
Here y is the response vector for the window and f is the activation function. p is the governing word’s vector, and Wₚ⁽ᵈ⁾ is the matrix reserved for the governing word. n is the number of its direct children, i indexes those children, and cᵢ is child i’s vector. The expression r[cᵢ] is the grammatical relation of that child to the governing word. It indexes the matrix written as Wᵣ[𝚌ᵢ]⁽ᵈ⁾. The superscript (d) identifies the dependency version, including its bias b⁽ᵈ⁾. The summation adds one transformed vector per child. The centered dots denote matrix–vector products, and the plus signs combine the parent contribution, the child contributions, and the bias.
A word with many dependents contributes more terms to the same sum. A word with no dependents contributes only the governing-word term and the bias before activation. If children share a relation, the same matrix is applied to their respective word vectors. Summing makes their contribution independent of the order in which they are enumerated within that window. The distinction between grammatical relations remains, since a change to a child’s relation can change the matrix applied to its vector. The experiments retain separate matrices for the 15 most frequent dependency types. Rarer types share a matrix.
The authors view dependency trees as a compact way to express structural information. All nodes have a lexical interpretation, and the relation types carry information about the links. This makes it possible for a local window to combine a governing word with useful arguments or modifiers even when other words intervene in the sentence. The constituency version gets its broader context through composed phrase vectors. The dependency version uses the immediate grammatical connections of the word serving as the window’s center.
The paper characterizes tree convolution as linear in the number of nodes, with cost growing exponentially with window depth in its discussion of extending the window. The stated comparison with flat convolution is conditional on processing the same amount of information at a time. In the reported architecture, shallow windows limit the local computation. Tree construction and the recursive preparation of constituency vectors are separate stages from that convolutional calculation.
Pooling decides which distinctions survive
After convolution, every coordinate in a response vector refers to the same detector at every node. Global max pooling reads one coordinate at a time across all nodes and keeps its largest value. It repeats that operation for each coordinate. The resulting vector has one entry per detector. Its entries may come from different windows, so the pooled vector can represent evidence distributed across the sentence. Global pooling is available for either kind of tree.
Pooling by region keeps some information about where an activation was found. The authors want each region to group positions that are near one another under a meaningful ordering and want the regions to receive comparable amounts of input in expectation. The regions are fixed by heuristics, which are rules for assigning positions to slots, rather than by a classifier trained to recognize particular cue locations. Features within each region still compete coordinate by coordinate.
For c-TBCNN, the paper proposes 3-slot pooling. It describes an upper region and two distinct lower regions, one on either side of the root. The boundary for the upper region is a fraction of the maximum depth of the tree.
ℓ < α · d
Here ℓ denotes the layer of the node producing the feature vector, and d is the maximum depth of the current tree. α is the proportion the authors set to 0.6. The centered dot means multiplication, and < indicates that the node goes to the top slot when its layer is below that threshold in numerical depth. Remaining nodes contribute to the lower-left or lower-right slot according to their position relative to the root. The resulting vectors keep upper-tree evidence available separately from evidence farther down each side.
For d-TBCNN, each response vector can be located by the word that governs its window. The authors can therefore order these vectors as the words appear in the sentence. They divide those positions into k regions and use pooling within each. This recovers some position information at the aggregation stage while keeping the detector’s grammatical neighborhood intact.
(j − 1) · n/k ≤ i ≤ j · n/k
Here i is the sentence position of the word whose convolutional response is being assigned, and n is the number of words in this sentence. In this formula n counts words in the input, whereas in the dependency convolution it counts the current node’s children. k is the number of slots, and j indexes the slot being considered. The slashes denote division and the centered dots denote multiplication. Subtracting 1 from j gives the index used for the lower endpoint. The inequality signs describe the span of positions assigned to the slot. As printed, the spans include both endpoints, so a position exactly on a shared boundary satisfies both adjacent inequalities. The text describes equal allocation and leaves the boundary convention unspecified.
The ordering used to assign a pooled slot belongs to the center of the window. A word on one side of a slot boundary can still contribute as a dependent to a feature centered on the other side. The tree organizes the detector’s inputs, and the word order organizes the resulting response vectors. Keeping these operations distinct explains how the dependency version can preserve rough sentence position without reverting to a window made up of successive words.
The classifier learns from sentence or phrase labels
Pooling provides fixed-size inputs to the fully connected hidden layer. The activations there can combine detector responses from different parts of the tree. The softmax stage turns the final scores into probabilities over the classes for the task. The authors use standard cross-entropy to measure prediction error on a labeled example.
J = −Σᵢ₌₁ᶜ tᵢ · log(yᵢ)
Here J is the loss for one example. The index i runs over classes, and c is the number of classes. tᵢ is the target entry for class i in the one-hot label vector. Only the entry for the correct class is active. yᵢ is the softmax probability for class i, reusing y for the classifier output here. log takes the logarithm of that probability, and the centered dot multiplies by the target entry. The summation collects the class contributions and the preceding minus sign makes the loss decrease as the probability given to the correct class rises.
The supervised training signal starts with this error and is propagated backward. The authors report using minibatch stochastic gradient descent in their detailed sentiment setup. A minibatch provides a group of examples from which to compute an update. In a max pool, the winning activation in a coordinate is the one that supplies that coordinate to the next layer. This gives a response at any eligible position a short connection to the prediction when it wins. A weaker response in that same coordinate within the same slot contributes no value to the pooled input for that example.
The paper uses a squared-weight penalty and dropout for regularization, which restrains how the classifier fits the training data. The weight penalty adds a cost for large weights. Dropout withholds selected inputs or activations during training to reduce reliance on particular components. The paper cites Srivastava and colleagues’ dropout work. It also reports releasing code and results through the authors’ project website. The settings described for the experiments differ by task, particularly in the widths of the learned layers and in whether training updates the word embeddings.
Experiments and results
Sentiment classification on sentences and their phrases
The Stanford Sentiment Treebank contains more than 10,000 movie-review examples, as the paper describes the collection. The fine-grained task sorts judgments into five categories, ranging from strongly negative through negative, neutral, and positive to strongly positive. Its standard split contains 8544 training sentences, 1101 validation sentences, and 2210 test sentences. Accuracy measures the proportion of evaluated sentences assigned the correct label. The validation set is used when choosing settings, and the test set provides the reported comparison with other systems.
The training material differs from the evaluation material in one important respect. The treebank supplies sentiment annotations for phrases within the sentences as well as for the sentences themselves. A recursive classifier can encounter the labeled phrases as part of its work on the full tree. The authors turn the phrases into individual training samples for TBCNN. When they count these examples along with the training sentences, the training set has more than 150,000 entries. Each test or validation prediction, in contrast, is scored against a whole-sentence label. The reported accuracy therefore describes complete review sentences even though phrase labels helped train the classifier. This is a distinctive use of the annotation available in a treebank.
Both variants use the Stanford parser. For the dependency version, the authors train 300-dimensional word2vec embeddings on English Wikipedia. The convolutional layer has 300 units and the final hidden layer has 200. The authors use 2-slot pooling, a minibatch size of 200, and a rectified linear activation, or ReLU. ReLU retains a positive input and maps a negative input to zero. The weight-penalty coefficient is reported as 10⁻⁵. Dropout is 50% for hidden layers and 40% for embeddings. The earlier method used for the word inputs is word2vec.
The constituency classifier uses 3-slot pooling. The paper says that settings such as the optimizer and activation were largely tuned alongside those for the dependency classifier, with changes to some hyper-parameters. It points readers to the project website for the constituency settings. The numerical description of the dependency setup gives the conditions for that result. Some of those conditions cannot be assigned to the constituency version from the main paper alone.
Fine-grained sentiment accuracy
The sentiment comparison covers several ways of representing a sentence. Conventional statistical baselines include a support vector machine and naïve Bayes. Sequence convolutional systems include a shallow convolution and deeper alternatives. Recursive systems range from basic composition with a linear transformation and a nonlinearity to more expressive combinations and tree-structured memory. The authors also report comparisons with recurrent and distributed-vector approaches. These figures come mostly from earlier publications, so the table places TBCNN in the benchmark landscape as it stood in the paper.
For 5-class test accuracy, the dependency version scores 51.4%. The strongest earlier result in the comparison is 51.0 for the tree LSTM reported by Tai and colleagues. The constituency version reaches 50.4%. It places behind those two entries and above the other earlier systems in the table, including the deep recursive baseline at 49.8. The strongest result within the conventional convolutional group is 48.5 for Deep CNN. These results put both tree-convolution variants near the top of the fine-grained comparison, with the dependency version at the head of it.
Stanford Sentiment Treebank fine-grained test accuracy
Dependency tree convolution leads the reported comparison, followed by the strongest earlier tree LSTM.
The numbers
| System or setting | accuracy % |
|---|---|
| Deep CNN | 48.5 |
| Basic recursive network | 43.2 |
| Deep recursive network | 49.8 |
| Tree LSTM from Tai and colleagues | 51.0 |
| Constituency TBCNN | 50.4 |
| Dependency TBCNN (this paper) | 51.4 |
The authors call particular attention to comparisons among shallow architectures that use basic interactions. The basic recursive network has fine-grained test accuracy of 43.2 in the published comparison, and the shallow sequence convolution has 37.4. Both TBCNN variants score higher. This comparison is closest to the question of whether the organization of computation matters when sophisticated composition operations are absent. The broader table then shows how the shallow tree convolution fares against alternatives with memory or deeper computation. The headline fine-grained result describes its standing among those comparisons as well.
The distinct strengths of the baselines matter when interpreting the result. The recursive entries already have access to syntax. The sequence convolutional entries already offer ways to pool evidence outside a recursive root. An advantage over the first group suggests the utility of reading local evidence from across a tree. An advantage over the second is consistent with the utility of grouping words or nodes syntactically. The benchmark result compares complete systems. The paper returns to the proposed path explanation in its analysis by sentence length.
Binary polarity as a transfer setting
Binary polarity classification keeps positive and negative as the targets and excludes neutral test examples. The authors reuse the system trained for the fine-grained task. They reinterpret the 5-way softmax probabilities for the binary decision. The paper says this follows an earlier strategy and avoids having to decide how to handle neutral sub-sentences when training a separate binary classifier. The same learned features are therefore asked to support a coarser prediction.
Under that procedure, the dependency version reports 87.9% binary test accuracy. The constituency version reports 86.8. Several earlier entries score higher than the dependency result, including the multichannel CNN at 88.1 and tree LSTM entries at 88.0. The dependency result is close to those entries, and the broader outcome differs from the fine-grained result. The tree-based classifier leads on fine-grained sentiment, while the binary transfer retains much of its competitiveness under the coarser label scheme.
Stanford Sentiment Treebank binary test accuracy
Dependency tree convolution is competitive after transfer from fine-grained training, while earlier entries attain higher accuracy.
The numbers
| System or setting | accuracy % |
|---|---|
| Non-static CNN | 87.2 |
| Multichannel CNN | 88.1 |
| Tree LSTM from Tai and colleagues | 88.0 |
| Paragraph vector | 87.8 |
| Constituency TBCNN, transferred | 86.8 |
| Dependency TBCNN, transferred (this paper) | 87.9 |
The transfer detail matters because a classifier explicitly trained to distinguish positive from negative can fit that decision directly. The fine-grained classifier was trained to separate degrees of sentiment as well as polarity and neutrality. The binary result asks how well the existing output can be reused once the decision changes. The paper marks binary entries derived from fine-grained training, including both of its own entries. The reported accuracies are comparable as test outcomes, with different training procedures behind some of them.
Classifying questions by expected answer type
The question dataset includes 500 test samples drawn from TREC 10 alongside 5452 annotated sentences. The authors use the standard split. Labels distinguish 6 answer types. The categories include abbreviation, entity, and description, as well as human, location, and numeric. The task is to infer what kind of information would answer a question. The location of a historical event and the temperature of the Earth’s interior are examples of the different classes. Scoring checks the assigned category against the annotation. It does not require the system to retrieve either fact.
The authors chose the task in part because its training set is smaller than the sentiment training collection once the labeled phrases are counted. They reduce the convolutional layer to 30 units and the final hidden layer to 25. The embeddings are frozen during supervised training, so the training error does not update them. Embedding dropout is 30%, and hidden-layer dropout is 5%. Freezing an embedding and dropping it out serve different purposes. Freezing keeps the stored representation fixed. Dropout can still mask part of the input drawn from that representation during training.
The earlier comparison includes neural classifiers and a hand-engineered support vector machine. The latter is the strongest earlier system in the table at 95.0% test accuracy. The paper describes it as using more than 10k features and 60 hand-coded rules. The TBCNN classifiers use parsed structure and learn their classification features. This distinction applies to the feature and rule design for the target task. Grammatical analysis remains a deliberate input to the system.
TREC question classification test accuracy
Dependency tree convolution leads the comparison, ahead of the feature-and-rule system and the other neural classifiers.
The numbers
| System or setting | accuracy % |
|---|---|
| Basic recursive network | 90.2 |
| Adaptive CNN | 92.4 |
| Deep CNN | 93.0 |
| Non-static CNN | 93.6 |
| Constituency TBCNN | 94.8 |
| Feature-and-rule SVM | 95.0 |
| Dependency TBCNN (this paper) | 96.0 |
The dependency version reaches 96.0% test accuracy. The constituency version achieves 94.8%, close to the previous feature-and-rule result and above the earlier neural entries in the comparison. The authors present the dependency result as the first instance they knew of on this task in which a neural classifier beat dedicated feature and rule engineering. That claim concerns question-type classification on this benchmark. Answer retrieval and answer generation are different tasks.
Question classification also changes the character of the evidence available to convolution. A cue can help because of the relation between a question word and the expression that specifies what is requested. A review cue, by comparison, helps because it contributes to an evaluative judgment. The same architecture can learn features for either objective because the detector weights are trained against the corresponding labels. The capacity and dropout choices differ between the experiments, so their results establish that the architecture can be used in both settings under the reported task-specific configurations.
What the ablations show
Pooling by region makes a modest difference
The pooling comparison changes how detector responses are aggregated while keeping a common set of hyper-parameters. The authors discuss another possible test in which each pooling method would receive its own tuning effort. They choose fixed settings to avoid making the outcome depend on how effectively each case could be tuned. All hidden layers are 300-dimensional in this experiment, and the squared-weight penalty is omitted. Each configuration is run with 5 random initializations. The table reports mean fine-grained sentiment accuracy and standard deviation across those runs.
For c-TBCNN, global pooling gives 48.48 ± 0.54 and 3-slot pooling gives 48.69 ± 0.40. For d-TBCNN, global pooling gives 49.39 ± 0.24 and 2-slot pooling gives 49.94 ± 0.63. Every pair of numbers is in accuracy percentage units on the 5-class sentiment test task. The first number is the mean and the second is the standard deviation. The regional settings have higher means in both variants. The size of the variation across initializations is relevant when considering how much confidence to place in that ordering.
The comparison shows that a whole-tree maximum already captures much of the signal the classifiers can use under those settings. Regional maxima can preserve a feature that would otherwise lose to a stronger response elsewhere. That added distinction appears to help, but the paper treats the effect as modest. The dependency runs with regional pooling also have more variation than the dependency runs with global pooling. The authors use the regional configurations in their main experiments. Those experiments have their own tuned settings, so the pooling means and the headline test results describe different protocols.
The authors also note a difference in reported training epochs. An epoch is a pass through the training data. They cite 200 epochs for the deep recursive system that reaches 49.8% on fine-grained sentiment, and say their TBCNNs typically train within 25 epochs. The counts show how the training schedules described by the respective studies differ. Computing time also depends on the work done in an epoch and the training setup. The comparison gives epoch counts and uses them to motivate the authors’ account of efficient information gathering through pooling.
The gap grows for longer sentences
The sentence-length analysis compares the two tree-convolution variants with a basic recursive network reimplemented by the authors. The reimplementation obtains 42.7% overall fine-grained sentiment accuracy, compared with the published 43.2% for the baseline. The authors use the closeness of those results as a check that the reimplementation is a sensible comparison. All three classifiers can then be examined across the same sentence-length groups.
The authors divide sentences into 7 groups at a granularity of 5 words. They group some examples at the shortest and longest ends to smooth the comparison. The groups range in size from 126 to 457 sentences. The paper shows the resulting accuracies graphically. The two TBCNN variants have similar behavior across the groups and outperform the recursive network in each. The gap becomes larger when sentences contain more than 20 words.
The observation fits the proposed distinction between reading from the root and reading at arbitrary tree positions. A longer sentence can create more opportunities for evidence to occur deep inside a parse. In a recursive classifier, a clue at such a location has to be carried through the intermediate representations leading to the root. In TBCNN, a detector can find the clue where it occurs and pass a winning response directly to pooling. That architectural property stays available as sentence length increases.
Length is a measure of the input sequence in this analysis. Parse depth, gradient size, and the actual routes followed by individual clues are separate quantities. Longer and shorter review sentences can also differ in what they say or how much conflicting sentiment they express. The length comparison therefore shows where the relative performance gap is larger. The interpretation in terms of path length is consistent with that pattern and with the architecture. Isolating the path mechanism itself would require a comparison that held other architectural and data differences fixed.
Pooling traces show which windows supplied the features
The authors visualize the dependency classifier on a review sentence whose positive appraisal centers on a striking visual element and the impression it will make on viewers. They perform the trace with global pooling. For each pooled coordinate, they identify the node whose convolutional response supplied the maximum. They then count the fraction of coordinates contributed by each node. The result describes where the pooled vector came from in the example. This is the paper’s qualitative approach to interpretability.
The window that brings together the visual element, the prediction of its effect, and the viewers provides a fraction of 0.24 of the pooled coordinates. The window centered on the visual element and its modifiers supplies 0.19. Common function words, considered as centers of their own windows, contribute little or nothing in this example. A function word can still appear inside a window whose response gets selected. The trace provides a way to distinguish the contribution of a whole local configuration from the response at a single word’s own location.
One comparison makes this distinction concrete. The adjective expressing admiration appears as the center of its own window and as a child in the window centered on the visual element. Its own window contributes 0.07 of the pooled coordinates. The larger window contributes 0.19 even though its central noun is neutral in sentiment when considered by itself. The adjective’s presence in both windows makes it possible to see that the learned detectors respond differently when its grammatical context is available.
A fraction in the trace counts winning coordinates. The hidden layer still has to combine those coordinates, and the final layer still has to assign scores to labels. Two nodes that win similar numbers of coordinates could supply different kinds of evidence, and the downstream layers can assign different importance to those features. The visualization gives a concrete account of which local computations were selected. It stops before assigning a share of the final prediction to every word or grammatical relation.
The two tree variants differ in several ways at once
The dependency version scores higher on the reported fine-grained sentiment and question test sets. It also has the higher mean with global pooling under the shared pooling experiment settings. The authors suggest that the compact representation of grammatical links is especially useful for sentiment compared with the constituency version’s ability to integrate broader context. This is an interpretation of a comparison between complete variants. The dependency version uses word nodes and relation-specific transformations. The constituency version has pretrained phrase vectors and positional transformations. Their main configurations also have different regional pools.
The variant comparison thus answers a practical question about which of the paper’s implementations performed better in its experiments. It leaves room for several explanations of the pattern. The comparison with the basic recursive network offers complementary evidence because both approaches can use syntax while making the prediction accessible in different ways. Taken together, the analyses show that the observed gains extend across sentence-length groups, that changing the pool alone produces a modest shift, and that selected responses can reflect multiword grammatical configurations.
Limitations
Limits the authors identify
The authors describe the constituency pooling rule as a fixed heuristic and leave its improvement for future work. Dividing the constituency tree into more slots while keeping each region coherent and reasonably populated is less straightforward than dividing a sequence of word positions. The proposed rule gives a consistent coarse partition. The paper provides a comparison against global pooling, with a modest improvement under its shared settings, and leaves the choice of more elaborate constituency regions open.
The pooling experiment is also explicitly limited by the choice of hyper-parameters. The authors trade separate tuning for a survey under common settings. That design makes the tested difference easier to read under a single training protocol. It leaves open which pooling method would do best after independent tuning and how sensitive any ordering would be to the regularization or layer widths. The paper presents the fixed-setting results as evidence that pooling choice has a relatively small effect in its experiments.
The binary sentiment experiment is a deliberately simple transfer. The authors identify the handling of neutral phrase examples as a reason they avoided training a separate binary classifier. The resulting accuracy answers how well their fine-grained classifier supports a binary decision by reusing its probabilities. It leaves separately trained binary TBCNN performance undetermined. Since the leaderboard includes results obtained under different training approaches, the marked transfer status belongs in any reading of the binary comparison.
The authors present one dependency visualization in the paper and point to more examples in their project materials. They favor the dependency version for this analysis because every node can be associated with a word. The illustrated trace uses global pooling to make the source of each selected coordinate easier to follow. The main dependency settings instead pool by region. The authors’ example demonstrates a mechanism under a deliberately simple aggregation choice.
Limits visible in the experimental design
The classification accuracy figures establish benchmark performance for the complete systems. TBCNN relies on parser output, learned embeddings, and supervised labels. The experiments do not independently vary the quality of the parse or the availability of phrase annotations. A changed parse can alter which nodes occur together in a window and, in the dependency version, which learned transformation applies. The main comparisons provide no estimate of how much parsing errors affect either task, or how accuracy varies when a different parser supplies the trees.
The rare-relation bucket and the shallow window are further choices bundled into the dependency result. Grouping infrequent relation types limits the number of separate transformations. A depth-2 window brings in immediate children and leaves longer chains to the wider architecture’s combination of features. The paper gives no controlled comparison across different sets of retained relation types or window depths. Its score supports the reported configuration and leaves the value of those individual design choices open.
The claim about short propagation paths is partly architectural and partly empirical. From a convolution response to the classifier, the layers have a short route independent of position in the parse. Passing along that route still depends on selection by max pooling. For the constituency variant, the vector on which a detector operates can already be the result of recursive composition through a deeper subtree. The short-path description applies directly to the placement of convolution and pooling. It does not imply that every piece of underlying lexical information has the same computational history.
The experiments compare published systems that differ in representation, optimization, and other design choices. The strongest earlier tree LSTM and TBCNN address the same fine-grained sentiment task, and their reported accuracies establish a ranking within the table. The paper does not give run-to-run variation for those headline entries comparable to the variation it reports for the pooling experiment. Nor does it report whether their errors occur on the same sentences. A small difference in reported accuracy answers less about reliability than repeated or paired comparisons would.
The tasks are sentence-level classifications with established labels. One uses movie reviews and includes phrase supervision during training. The other asks for the answer type of a question and uses a smaller labeled training set. Together they demonstrate reuse of the architecture across different classification objectives and training conditions. Generalization to other languages, longer documents, or tasks that predict relations between sentences remains outside the experiments. The results also provide no direct measurement of what the representation retains for a downstream use beyond the trained classification objectives.
The visualization has a related scope limit. Selected activations can identify words and configurations worth inspecting. The illustrated fraction counts which windows supplied features, without testing what happens when a selected word or subtree is removed. It therefore supports an account of information routing in that forward computation. A causal account of the predicted sentiment would also need to establish how changing the evidence changes the output.
What came after
Tree-Based Convolution and Heuristic Matching for Natural Language Inference takes the same named convolutional operation into a task involving a relationship between sentences. The original classifier gathers tree-local evidence to label a single input. The later title identifies tree-based convolution together with heuristic matching, placing the convolution in a setting where comparison is part of the prediction problem. It is the clearest direct extension among the citing works because both the operation and the new use are explicit in its title.
Encoding Sentences with Graph Convolutional Networks for Semantic Role Labeling connects sentence encoding to graph convolution and uses it for semantic role labeling. The connection is the use of structured neighborhoods in a convolutional sentence encoder. The graph formulation and the labeling task mark the shift from the original paper’s use of tree windows to gather evidence for a whole-sentence class. The later work’s title specifies that direction of development without identifying which particular pooling or parameter-sharing choices it uses.
A Structured Self-attentive Sentence Embedding approaches sentence representation through structured self-attention. Its connection to the paper is the question of how evidence from separate parts of a sentence becomes a representation of the whole input. TBCNN answers with grammar-defined windows and pooled detector responses. The later work names a different organizing operation for the sentence embedding. The citation places that approach alongside earlier work on structured sentence representation.
Learned in Translation: Contextualized Word Vectors likewise cites the paper and names a different point at which to attach context. Its stated subject is word vectors learned through machine translation. In the dependency version of TBCNN, word vectors enter a classifier that combines them according to the parse. The translation work’s title places contextualization in the word-vector representation itself. The two approaches therefore concern different uses of context in a sentence computation. The citation establishes the relationship to the earlier research, while the title identifies the later work’s own approach.
Cite
Cite as Lili Mou, Hao Peng, Ge Li, Yan Xu, Lu Zhang and Zhi Jin. 2015. Discriminative Neural Sentence Modeling by Tree-Based Convolution. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{mou2015discriminative,
title = {{Discriminative Neural Sentence Modeling by Tree-Based Convolution}},
author = {Lili Mou, Hao Peng, Ge Li, Yan Xu, Lu Zhang and Zhi Jin},
booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
year = {2015},
doi = {10.18653/v1/d15-1279},
url = {https://doi.org/10.18653/v1/d15-1279}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/mou-2015-discriminative-neural-sentence-modeling-tree/