Skip to main content
QUICK REVIEW

[Paper Review] Neural Machine Translation for Query Construction and Composition

Tommaso Soru, Edgard Marx|arXiv (Cornell University)|Jun 27, 2018
Natural Language Processing TechniquesComputer Science19 references18 citations
TL;DR

This paper proposes a neural machine translation approach for semantic parsing in knowledge base question answering, using a sequence-to-sequence model to map natural language questions to SPARQL queries via template-based, weakly-supervised training. The method achieves 99.29% BLEU score and 94.82% accuracy on a DBpedia movie subset using optimized SPARQL encoding and entity-aware curriculum learning.

ABSTRACT

Research on question answering with knowledge base has recently seen an increasing use of deep architectures. In this extended abstract, we study the application of the neural machine translation paradigm for question parsing. We employ a sequence-to-sequence model to learn graph patterns in the SPARQL graph query language and their compositions. Instead of inducing the programs through question-answer pairs, we expect a semi-supervised approach, where alignments between questions and queries are built through templates. We argue that the coverage of language utterances can be expanded using late notable works in natural language generation.

Motivation & Objective

  • Address the challenge of mapping natural language questions to executable SPARQL queries in knowledge base question answering.
  • Reduce reliance on expensive question-answer pair supervision by using template-aligned question-query pairs instead.
  • Improve generalization and coverage of language utterances through weakly-supervised expansion using natural language generation techniques.
  • Mitigate errors from entity name ambiguity and out-of-vocabulary words via entity frequency regularization and direct entity labeling in training.
  • Evaluate the effectiveness of different SPARQL sequence encodings and training configurations on a DBpedia-based dataset.

Proposed method

  • Employ a sequence-to-sequence model based on bidirectional LSTMs to map natural language questions to SPARQL query sequences.
  • Use a Neural Sparql Machine architecture with three modules: generator (creates training data from templates), learner (sequence-to-sequence translation), and interpreter (reconstructs final query using rule-based heuristics).
  • Generate training data via question-query templates with placeholders (e.g., "where is $<$A$>$ located in?" ), replacing entities with variables.
  • Optimize SPARQL encoding by merging tokens and shortening sequences to improve model performance and convergence speed.
  • Apply curriculum learning to gradually introduce complex graph patterns and SPARQL operator compositions.
  • Incorporate external knowledge via pre-trained word embeddings and joint knowledge graph embeddings to handle vocabulary mismatch and entity disambiguation.

Experimental results

Research questions

  • RQ1Can a neural machine translation framework effectively learn to map natural language questions to SPARQL queries without full supervision?
  • RQ2How does the choice of SPARQL sequence encoding affect the performance of sequence-to-sequence models in semantic parsing?
  • RQ3To what extent can template-based, weakly-supervised training improve coverage and generalization of language utterances in KBQA?
  • RQ4How do entity-level regularization and direct entity labeling influence model convergence and accuracy?
  • RQ5Can the model generalize to complex queries involving multiple placeholders and nested SPARQL constructs?

Key findings

  • The most effective SPARQL encoding (v4) achieved 99.29% BLEU score and 93.69% accuracy, outperforming earlier versions by significant margins.
  • Adding direct entity translations to the training set improved convergence speed and model stability, as shown in training curves over 20,000 epochs.
  • Shortening SPARQL sequences through token merging led to a 1.5% increase in BLEU score and faster convergence, highlighting the importance of sequence representation.
  • The v3 and v4 encodings achieved 99.28% and 99.29% BLEU scores, respectively, indicating near-optimal performance on the movie subset of DBpedia.
  • The model demonstrated robustness to out-of-vocabulary words and entity name collisions when using entity frequency regularization and label-based supervision.
  • The method outperformed baseline approaches by leveraging weak supervision via templates, avoiding the need for costly question-answer pair annotations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.