Skip to main content
QUICK REVIEW

[Paper Review] Learning to Compose Words into Sentences with Reinforcement Learning

Dani Yogatama, Phil Blunsom|arXiv (Cornell University)|Nov 28, 2016
Topic ModelingComputer Science20 references44 citations
TL;DR

This paper proposes a reinforcement learning approach to learn task-specific, latent tree-structured compositions for sentence representations, using a Tree LSTM with a policy network to optimize parsing actions. The method outperforms both left-to-right RNNs and syntax-supervised tree-structured models across sentiment analysis, natural language inference, semantic relatedness, and sentence generation, discovering linguistically intuitive but non-standard syntactic structures.

ABSTRACT

We use reinforcement learning to learn tree-structured neural networks for computing representations of natural language sentences. In contrast with prior work on tree-structured models in which the trees are either provided as input or predicted using supervision from explicit treebank annotations, the tree structures in this work are optimized to improve performance on a downstream task. Experiments demonstrate the benefit of learning task-specific composition orders, outperforming both sequential encoders and recursive encoders based on treebank annotations. We analyze the induced trees and show that while they discover some linguistically intuitive structures (e.g., noun phrases, simple verb phrases), they are different than conventional English syntactic structures.

Motivation & Objective

  • To improve sentence representation learning by discovering task-specific composition orders instead of relying on fixed or linguistically annotated structures.
  • To investigate whether reinforcement learning can induce hierarchical sentence structures that generalize better than conventional sequential or syntactic models.
  • To analyze the linguistic plausibility and performance of self-discovered tree structures in downstream NLP tasks.
  • To evaluate whether semantic feedback during training leads to more effective compositional architectures than unsupervised grammar induction.

Proposed method

  • The model uses a Tree LSTM with a shift-reduce parser architecture, where composition operations (shift, reduce) are controlled by a policy network trained via reinforcement learning.
  • The policy network selects actions (shift or reduce) to build a latent parse tree for each sentence, with the final sentence representation derived from the root of the induced tree.
  • Reinforcement learning optimizes the policy using the reward signal from downstream task performance, such as accuracy in classification or perplexity in generation.
  • The model is trained end-to-end using policy gradient methods, with the computation graph reconstructed per example due to variable tree structures.
  • Tree structures are inferred without supervision, allowing the model to deviate from standard English syntax and discover alternative composition orders.
  • The approach is evaluated on four tasks: sentiment analysis, semantic relatedness, natural language inference, and sentence generation, comparing against RNNs, fixed-order models, and syntax-supervised models.

Experimental results

Research questions

  • RQ1Can reinforcement learning discover composition orders that improve performance on downstream NLP tasks compared to fixed left-to-right or syntax-annotated tree structures?
  • RQ2What kind of syntactic structures does the model learn, and how do they compare to human-annotated syntactic trees in terms of linguistic intuition and structural similarity?
  • RQ3Does learning composition order through task-specific rewards lead to better generalization than unsupervised grammar induction or fixed architectures?
  • RQ4How does the performance of the latent syntax model compare to models with predefined composition orders across diverse NLP tasks?

Key findings

  • The latent syntax model outperformed both left-to-right RNNs and syntax-supervised tree-structured models on all four downstream tasks, including sentiment analysis, semantic relatedness, natural language inference, and sentence generation.
  • On the SNLI and Stanford Sentiment Treebank datasets, the induced trees achieved unlabeled bracketing F1 scores of 41.73 and 40.51, respectively, closer to left-branching structures than to standard syntactic trees.
  • The model discovered linguistically intuitive structures such as noun phrases (e.g., 'a boy', 'his sleds') and simple verb phrases (e.g., 'wearing sunglasses', 'is frowning'), though some compositions were non-intuitive.
  • The model achieved a word perplexity of 99.0 on the sentence generation task, outperforming the supervised syntax model (100.8) and the semi-supervised syntax model (98.4), indicating better generation quality.
  • Training was significantly slower—taking 3–4 days for convergence on large datasets like SNLI or IMDB—due to per-example graph reconstruction and policy gradient sampling.
  • Despite the lack of explicit syntactic supervision, the induced trees exhibited overall left-branching tendencies, which may explain their strong performance on tasks favoring left-to-right processing.

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.