HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

Bilateral Multi-Perspective Matching for Natural Language Sentences

Zhiguo Wang; Wael Hamza; Radu Florian

Bilateral Multi-Perspective Matching for Natural Language Sentences

Abstract

Natural language sentence matching is a fundamental technology for a variety of tasks. Previous approaches either match sentences from a single direction or only apply single granular (word-by-word or sentence-by-sentence) matching. In this work, we propose a bilateral multi-perspective matching (BiMPM) model under the "matching-aggregation" framework. Given two sentences $P$ and $Q$, our model first encodes them with a BiLSTM encoder. Next, we match the two encoded sentences in two directions $P \rightarrow Q$ and $P \leftarrow Q$. In each matching direction, each time step of one sentence is matched against all time-steps of the other sentence from multiple perspectives. Then, another BiLSTM layer is utilized to aggregate the matching results into a fix-length matching vector. Finally, based on the matching vector, the decision is made through a fully connected layer. We evaluate our model on three tasks: paraphrase identification, natural language inference and answer sentence selection. Experimental results on standard benchmark datasets show that our model achieves the state-of-the-art performance on all tasks.

Code Repositories

Benchmarks

BenchmarkMethodologyMetrics
natural-language-inference-on-snliBiMPM
% Test Accuracy: 87.5
% Train Accuracy: 90.9
Parameters: 1.6m
natural-language-inference-on-snliBiMPM Ensemble
% Test Accuracy: 88.8
% Train Accuracy: 93.2
Parameters: 6.4m
paraphrase-identification-on-quora-questionBiMPM
Accuracy: 88.17

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp