Abstract
Semantic matching is a fundamental task in natural language processing, essential for applications such as question answering and dialogue systems. However, matching long text sequences remains a significant challenge due to the prevalence of noise and complex syntactic structures that can obscure core semantic relationships. This paper introduces the Knowledge Enhanced Hybrid Neural Network (KEHNN), which integrates external prior knowledge (e.g., topics or categories) directly into word representations using a novel "knowledge gate" mechanism. By evaluating text pairs through three distinct channels—word-level, local sequence, and global knowledge—KEHNN captures multi-grained interactions. Our evaluation across two benchmark datasets shows that KEHNN consistently outperforms state-of-the-art models, especially in scenarios involving long-form text.
Introduction
Determining the semantic similarity between two text segments is a cornerstone of modern NLP. Whether identifying if a forum post answers a specific query or selecting the most appropriate response in a multi-turn dialogue, models must bridge the "semantic gap" between different linguistic expressions of the same idea. While deep learning models like DSSM and MV-LSTM have made strides by learning interaction-based representations, they often struggle with long documents. As text length increases, irrelevant details (noise) can overwhelm the signal, leading to semantic drift where the model loses track of the primary topic.
The KEHNN Architecture
The core innovation of this work is the Knowledge Enhanced Hybrid Neural Network (KEHNN). Unlike traditional models that rely solely on the provided text pair, KEHNN leverages external "prior knowledge" to anchor the matching process.
The Knowledge Gate
Inspired by the gating mechanisms in recurrent units like LSTMs, the authors developed a non-linear knowledge gate. This gate operates at the word level, dynamically determining the balance between a word's raw embedding and its associated global context (such as a category embedding or a topic vector). By filtering out noise and emphasizing words that align with the global theme, the gate ensures that the model remains focused on relevant information.
Multi-Channel Interaction
KEHNN processes the input text through three parallel channels to capture different levels of abstraction:
- Channel 1 (Word-level): Directly matches raw word embeddings to capture literal overlaps.
- Channel 2 (Local structure): Uses a Bidirectional GRU (BiGRU) to capture local syntax and sequential dependencies within the raw text.
- Channel 3 (Global context): Employs a second BiGRU to process the knowledge-enhanced word representations, capturing high-level semantic themes.
These three interaction matrices are stacked like RGB channels in an image. A 2D Convolutional Neural Network (CNN) then extracts compositional features from this "semantic image," which are finally processed by a Multi-Layer Perceptron (MLP) to produce a final matching score.
Experimental Evaluation
The model was tested on two distinct tasks:
- Answer Selection: Using the SemEval 2015 Task 3 dataset (Qatar Living Forum), where question categories served as prior knowledge.
- Response Selection: Using the Ubuntu Dialogue Corpus. Since this dataset lacks explicit categories, the authors used a Twitter LDA model to automatically generate topic vectors as prior knowledge.
Results and Discussion
KEHNN demonstrated superior performance across both tasks. On the SemEval QA task, it achieved an accuracy of 74.8%, surpassing both feature-engineered systems (JAIST at 72.5%) and strong neural baselines like MV-LSTM (73.5%).
In the more complex Ubuntu Dialogue task, KEHNN showed significant gains in retrieval metrics. As shown in the table below, it outperformed all baseline models across various recall metrics.
A key finding was the model's robustness to text length. In the QA dataset, for pairs exceeding 60 words, KEHNN maintained an accuracy of 76.5%, while the MV-LSTM baseline's performance dropped to 74.6%. This confirms that the knowledge gate effectively mitigates the noise typically found in longer passages.
Conclusion
The Knowledge Enhanced Hybrid Neural Network (KEHNN) provides a robust framework for text matching by integrating external context with local textual features. By treating matching as a multi-channel vision-like task, the model successfully bridges semantic gaps that stymie traditional architectures. Future work may explore end-to-end methods for knowledge extraction to further reduce reliance on pre-trained topic models and improve performance in low-resource settings.
Summary updated