Bag-of-Vector Embeddings of Dependency Graphs for Semantic Induction

James Henderson, Diana Nicoleta Popa, James Henderson 0001arXiv 2017

Abstract

This paper introduces Bag-of-Vector Embeddings (BoVEs), a nonparametric approach for representing linguistic dependency graphs in a continuous, differentiable space. By utilizing tensor factorization, BoVEs represent sentences as a collection of vectors—one per token—that encode both lexical identity and structural roles. Unlike fixed-length sentence embeddings that suffer from information bottlenecks, BoVEs scale with sentence length and capture syntactic context. Evaluations on Semantic Textual Similarity (STS) and Natural Language Inference (SNLI) tasks demonstrate that BoVEs effectively leverage structural information to outperform standard bag-of-words baselines.

Introduction

A central challenge in Natural Language Processing (NLP) is the effective representation of complex linguistic structures. While word-level embeddings like Word2Vec and GloVe provide robust continuous representations for individual tokens, extending these to sentences often involves "squishing" variable-length inputs into fixed-length vectors. This creates a representation bottleneck where detail is lost as sentence complexity increases. Conversely, discrete graph representations (e.g., dependency trees) preserve structure but lack the differentiability and ease of similarity measurement found in vector spaces.

The authors propose Bag-of-Vector Embeddings (BoVEs) as a middle ground. BoVEs are nonparametric, meaning the representation size grows with the input, while remaining entirely continuous. This allows for the preservation of structural nuances without the constraints of a fixed-length bottleneck.

Methodology: Tensor Factorization for Graphs

The core of the BoVE framework is a tensor factorization approach inspired by the RESCAL model used in relational databases. A linguistic graph is decomposed into two primary components: properties and relations.

The Representation

As illustrated in Figure 1, a sentence $s$ is represented by:

  • $W_s$ (Property Matrix): A matrix indicating unary predicates, such as the word identity or Part-of-Speech tags, associated with each node.
  • $X_s$ (Relation Tensor): A 3D tensor capturing binary relations (e.g., "subject" or "adverbial modifier" dependencies) between nodes.
Figure 1: Representation of a dependency graph for "Mary runs often" as a property matrix $W_s$ and a relation tensor $X_s$.

Factorization and Inference

The model learns to reconstruct these discrete indicators using continuous latent vectors ($E_s$). Properties are predicted via the dot product of a node vector and a property vector ($P$), while relations are predicted using a bilinear form involving two node vectors and a relation matrix ($R$).

Training involves learning global "type" embeddings for words, tags, and relations across a large corpus (e.g., CoNLL 2009) using Alternating Least Squares (ALS) or Stochastic Gradient Descent (SGD). During inference, these type embeddings are frozen. For a new sentence, the model iteratively updates the token-specific vectors ($E_s$) to minimize reconstruction error. This process effectively propagates structural information through the graph, resulting in "word-in-context" vectors where a word's representation is influenced by its syntactic role (e.g., subject vs. object).

Experimental Setup

The model was trained on the CoNLL 2009 syntactic dependency corpus, using pre-trained GoogleNews Word2Vec vectors for initialization. Evaluation focused on two key semantic tasks:

  1. Semantic Textual Similarity (STS 2014/2015): Measuring the correlation between model-predicted similarity and human ratings. This utilizes alignment-based scoring like Earth Mover's Distance to compare the "bags" of vectors.
  2. Natural Language Inference (SNLI): An unsupervised evaluation to determine logical entailment between sentence pairs.

Results and Discussion

BoVEs were compared against a standard bag-of-words baseline using Word2Vec, which ignores syntactic structure.

Semantic Textual Similarity

BoVEs showed consistent improvements over the baseline across most sub-datasets in STS 2014 and 2015. For instance, the mean score in 2014 improved from 0.6429 to 0.6480. These results suggest that incorporating syntactic context via factorization provides a more nuanced understanding of sentence similarity.

Natural Language Inference

The impact of structural information was more pronounced in the SNLI task. BoVEs achieved an average precision of 64.01%, significantly outperforming the Word2Vec baseline's 63.04%. This statistical significance underscores the importance of capturing logical and structural dependencies for tasks involving complex reasoning.

Conclusion

BoVEs offer a flexible, nonparametric alternative to fixed-length sentence embeddings. By contextualizing word vectors through graph factorization, the model captures structural information that simple bag-of-words models miss.

Future work may address the computational complexity of the ALS algorithm, which currently requires inverting large matrices ($r^2 \times r^2$), limiting the rank of the embeddings. Additionally, while this study focused on unsupervised settings, BoVEs could serve as powerful inputs for supervised deep learning architectures, potentially further enhancing performance on downstream NLP tasks.

Summary updated

Abstract

Vector-space models, from word embeddings to neural network parsers, have many advantages for NLP. But how to generalise from fixed-length word vectors to a vector space for arbitrary linguistic structures is still unclear. In this paper we propose bag-of-vector embeddings of arbitrary linguistic graphs. A bag-of-vector space is the minimal nonparametric extension of a vector space, allowing the representation to grow with the size of the graph, but not tying the representation to any specific tree or graph structure. We propose efficient training and inference algorithms based on tensor factorisation for embedding arbitrary graphs in a bag-of-vector space. We demonstrate the usefulness of this representation by training bag-of-vector embeddings of dependency graphs and evaluating them on unsupervised semantic induction for the Semantic Textual Similarity and Natural Language Inference tasks.
BibTeX
@misc{henderson2017bag,
  author = {James Henderson and Diana Nicoleta Popa and James Henderson},
  title = {{Bag-of-Vector Embeddings of Dependency Graphs for Semantic Induction}},
  year = {2017},
  eprint = {1710.00205},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.00205},
}
Figure