Abstract
Recent work has demonstrated that vector offsets obtained by subtracting pretrained word embedding vectors can be used to predict lexical relations with surprising accuracy. Inspired by this finding, in this paper, we extend the idea to the document level, in generating document-level embeddings, calculating the distance between them, and using a linear classifier to classify the relation between the documents. In the context of duplicate detection and dialogue act tagging tasks, we show that document-level difference vectors have utility in assessing document-level similarity, but perform less well in multi-relational classification.
Introduction
In Natural Language Processing (NLP), word embeddings like word2vec revealed that semantic relations are often encoded as linear offsets in vector space (e.g., $king - man \approx queen - woman$). While this "word analogy" property is well-documented at the lexical level, its applicability to entire documents remains an open question. This study explores whether the difference between document embeddings—termed DOCDIFFVEC—can effectively capture relations between documents, specifically focusing on similarity (duplicate detection) and discourse (dialogue act tagging).
Methodology
The researchers propose a simple framework where the relationship between two documents is modeled by the element-wise absolute difference of their embedding vectors: $|h_1 - h_2|$. To evaluate the intrinsic quality of these difference vectors, they are fed into a linear-kernel Support Vector Machine (SVM). This choice of a simple classifier ensures that performance reflects the representational power of the embeddings rather than the complexity of the model.
The study evaluates several embedding types:
- Unsupervised: Averaging of word vectors (word2vec, GloVe, Paragram) and "WR" (weighted averaging with PCA).
- Supervised: State-of-the-art models like Infersent (trained on natural language inference) and BiLSTM-NMT (trained on paraphrase data).
- Baselines: The classic doc2vec (dbow) model.
Experimental Setup
The framework was tested on two distinct benchmarks:
- CQAdupstack: A dataset of question threads from StackExchange used for binary duplicate thread detection.
- CNET Forum Dataset: A collection of forum posts used for dialogue act (DA) tagging across 12 relation types (e.g., Question-Answer, Answer-Answer).
Results and Discussion
Duplicate Detection
For binary similarity tasks, DOCDIFFVEC proved highly effective. Supervised models, particularly Infersent, excelled in this domain. This is likely due to their training on sentence-level entailment, which aligns well with identifying duplicate content.
As shown in Figure 1, both Infersent and dbow (WIKI) achieved a top AUC of 0.91, significantly outperforming simple unsupervised averaging methods (~0.75).
Dialogue Act Tagging
The performance shifted dramatically when moving to multi-relational discourse tasks. In dialogue act tagging, simpler models often outperformed their complex supervised counterparts.
As illustrated in Figure 2, the Average (word2vec) model achieved the highest score (0.65), surpassing the heuristic baseline (0.64) and the more sophisticated Infersent model (0.56). This suggests that current supervised encoders may be over-specialized for similarity and struggle with the nuances of discourse relations.
A key challenge identified is the "Zero-Vector Trap": related posts often share significant vocabulary, leading to very similar vectors. Consequently, their difference vector $|h_1 - h_2|$ approaches zero, making it difficult for a linear classifier to distinguish between different types of relations (e.g., Question-Answer vs. Answer-Answer) based solely on content difference.
Conclusion
While DOCDIFFVEC is a powerful tool for assessing document similarity, it faces limitations in multi-relational discourse classification. These tasks often rely on extra-linguistic factors—such as author identity or thread position—that standard text-only embeddings do not capture. Future work may involve non-linear classifiers or specialized relation modeling (e.g., TransR-style) to better handle complex document-level interactions.
Summary updated