Venue: NAACL 2019

# Unsupervised Recurrent Neural Network Grammars

 Yoon Kim\({}^{\dagger}\) Alexander M. Rush\({}^{\dagger}\) Lei Yu\({}^{\diamond}\)

Adhiguna Kuncoro\({}^{\ddagger,\diamond}\) Chris Dyer\({}^{\diamond}\) Gabor Melis\({}^{\diamond}\)

\({}^{\dagger}\)Harvard University \(~{}^{\ddagger}\)University of Oxford \(~{}^{\diamond}\)DeepMind

{yoonkim,srush}@seas.harvard.edu

{leiyu,akuncoro,cdyer,melsigl}@google.com

###### Abstract

Recurrent neural network grammars (RNNG) are generative models of language which jointly model syntax and surface structure by incrementally generating a syntax tree and sentence in a top-down, left-to-right order. Supervised RNNGs achieve strong language modeling and parsing performance, but require an annotated corpus of parse trees. In this work, we experiment with unsupervised learning of RNNGs. Since directly marginalizing over the space of latent trees is intractable, we instead apply amortized variational inference. To maximize the evidence lower bound, we develop an inference network parameterized as a neural CRF constituency parser. On language modeling, unsupervised RNNGs perform as well their supervised counterparts on benchmarks in English and Chinese. On constituency grammar induction, they are competitive with recent neural language models that induce tree structures from words through attention mechanisms.

+
Footnote †: Work done while the first author was an intern at DeepMind. Code available at [https://github.com/havardnlp/urnng](https://github.com/havardnlp/urnng)

## 1 Introduction

Recurrent neural network grammars (RNNGs) Dyer et al. (2016) model sentences by first generating a nested, hierarchical syntactic structure which is used to construct a context representation to be conditioned upon for upcoming words. Supervised RNNGs have been shown to outperform standard sequential language models, achieve excellent results on parsing Dyer et al. (2016); Koncordo et al. (2017), better encode syntactic properties of language Koncordo et al. (2018), and correlate with electrophysiological responses in the human brain Hale et al. (2018). However, these all require annotated syntactic trees for training. In this work, we explore unsupervised learning of recurrent neural network grammars for language modeling and grammar induction.

The standard setup for unsupervised structure learning is to define a generative model \(p_{\theta}(\mathbf{x},\mathbf{z})\) over observed data \(\mathbf{x}\) (e.g. sentence) and unobserved structure \(\mathbf{z}\) (e.g. parse tree, part-of-speech sequence), and maximize the log marginal likelihood \(\log p_{\theta}(\mathbf{x})=\log\sum_{\mathbf{z}}p_{\theta}(\mathbf{x},\mathbf{ z})\). Successful approaches to unsupervised parsing have made strong conditional independence assumptions (e.g. context-freeness) and employed auxiliary objectives Klein and Manning (2002) or priors Johnson et al. (2007). These strategies imbue the learning process with inductive biases that guide the model to discover meaningful structures while allowing tractable algorithms for marginalization; however, they come at the expense of language modeling performance, particularly compared to sequential neural models that make no independence assumptions.

Like RNN language models, RNNGs make no independence assumptions. Instead they encode structural bias through operations that compose linguistic constituents. The lack of independence assumptions contributes to the strong language modeling performance of RNNGs, but make unsupervised learning challenging. First, marginalization is intractable. Second, the biases imposed by the RNNG are relatively weak compared to those imposed by models like PCFGs. There is little pressure for non-trivial tree structure to emerge during unsupervised RNNG (URNNG) learning.

In this work, we explore a technique for handling intractable marginalization while also injecting inductive bias. Specifically we employ amortized variational inference Kingma and Welling (2014); Rezende et al. (2014); Mnih and Gregor (2014) with a _structured_ inference network. Variational inference lets us tractably optimize a lower bound on the log marginal likelihood, while employing a structured inference network encourages non-trivial structure. In particular, a con

ditional random field (CRF) constituency parser Finkel et al. (2008); Durrett and Klein (2015), which makes significant independence assumptions, acts as a guide on the generative model to learn meaningful trees through regularizing the posterior Ganchev et al. (2010).

We experiment with URNNGs on English and Chinese and observe that they perform well as language models compared to their supervised counterparts and standard neural LMs. In terms of grammar induction, they are competitive with recently-proposed neural architectures that discover tree-like structures through gated attention Shen et al. (2018). Our results, along with other recent work on joint language modeling/structure learning with deep networks Shen et al. (2018, 2019); Wiseman et al. (2018); Kawakami et al. (2018), suggest that it is possible learn generative models of language that model the underlying data well (i.e. assign high likelihood to held-out data) and at the same time induce meaningful linguistic structure.

## 2 Unsupervised Recurrent Neural Network Grammars

We use \({\bf x}=[x_{1},\ldots,x_{T}]\) to denote a sentence of length \(T\), and \({\bf z}\in\mathcal{Z}_{T}\) to denote an unlabeled binary parse tree over a sequence of length \(T\), represented as a a binary vector of length \(2T-1\). Here 0 and 1 correspond to shift and reduce actions, explained below.1 Figure 1 presents an overview of our approach.

Footnote 1: The cardinality of \(\mathcal{Z}_{T}\subset\{0,1\}^{2T-1}\) is given by the \((T-1)\)-th Catalan number, \(|\mathcal{Z}_{T}|=\frac{1}{2T(T-2)!}\).

### Generative Model

An RNNG defines a joint probability distribution \(p_{\theta}({\bf x},{\bf z})\) over sentences \({\bf x}\) and parse trees \({\bf z}\). We consider a simplified version of the original RNNG Dyer et al. (2016) by ignoring constituent labels and only considering binary trees. The RNNG utilizes an RNN to parameterize a stack data structure Dyer et al. (2015) of partially-completed constituents to incrementally build the parse tree while generating terminals. Using the current stack representation, the model samples an action (shift or reduce): shift generates a terminal symbol, i.e. word, and shifts it onto the stack,2reduce pops the last two elements off the stack, composes them, and shifts the composed representation onto the stack.

Footnote 2: A better name for shift would be generate (as in Dyer et al. (2016)), but we use shift to emphasize similarity with the shift-reduce parsing.

Formally, let \(S=[(\mathbf{0},\mathbf{0})]\) be the initial stack. Each item of the stack will be a pair, where the first element is the hidden state of the stack LSTM, and the second element is an input vector, described below. We use \(\mathrm{top}(S)\) to refer to the top pair in the stack. The \(\mathrm{push}\) and \(\mathrm{pop}\) operations are defined imperatively in the usual way. At each time step, the next action \(z_{t}\) (shift or reduce) is sampled from a Bernoulli distribution parameterized in terms of the current stack representation. Letting \((\mathbf{h}_{\text{prev}},\mathbf{g}_{\text{prev}})=\mathrm{top}(S)\), we have

\[z_{t}\sim\mathrm{Bernoulli}(p_{t}),~{}~{}~{}~{}p_{t}=\sigma(\mathbf{w}^{ \top}\mathbf{h}_{\text{prev}}+b).\]

Subsequent generation depend on \(z_{t}\):

* If \(z_{t}=0\) (shift), the model first generates a terminal symbol via sampling from a categorical distribution whose parameters come from an affine transformation and a softmax, \[x\sim\mathrm{softmax}(\mathbf{W}\mathbf{h}_{\text{prev}}+\mathbf{b}).\] Then the generated terminal is shifted onto the stack using a stack LSTM, \[\mathbf{h}_{\text{next}}=\mathrm{LSTM}(\mathbf{e}_{x},\mathbf{ h}_{\text{prev}}),\] \[\mathrm{push}(S,(\mathbf{h}_{\text{next}},\mathbf{e}_{x})),\] where \(\mathbf{e}_{x}\) is the word embedding for \(x\).

Figure 1: Overview of our approach. The inference network \(q_{\phi}({\bf z}\given{\bf x})\) (left) is a CRF parser which produces a distribution over binary trees (shown in dotted box). \(\mathbf{B}_{ij}\) are random variables for existence of a constituent spanning \(i\)-th and \(j\)-th words, whose potentials are the output from a bidirectional LSTM (the global factor ensures that the distribution is only over valid binary trees). The generative model \(p_{\theta}({\bf x},{\bf z})\) (right) is an RNNG which consists of a stack LSTM (from which actions/words are predicted) and a tree LSTM (to obtain constituent representations upon reduce). Training involves sampling a binary tree from \(q_{\phi}({\bf z}\given{\bf x})\), converting it to a sequence of shift/reduce actions, and optimizing the log joint likelihood \(\log p_{\theta}({\bf x},{\bf z})\).

 

* If (reduce), we pop the last two elements off the stack, \[({\bf h}_{r},{\bf g}_{r})=\operatorname{pop}(S),\quad({\bf h}_{l},{\bf g}_{l})= \operatorname{pop}(S),\] and obtain a new representation that combines the left/right constituent representations using a tree LSTM Tai et al. (2015); Zhu et al. (2015), \[{\bf g}_{\text{new}}=\mathrm{TreeLSTM}({\bf g}_{l},{\bf g}_{r}).\] Note that we use \({\bf g}_{l}\) and \({\bf g}_{r}\) to obtain the new representation instead of \({\bf h}_{l}\) and \({\bf h}_{r}\).3 We then update the stack using \({\bf g}_{\text{new}}\), \[({\bf h}_{\text{prev}},{\bf g}_{\text{prev}})=\operatorname{ top}(S),\] \[{\bf h}_{\text{new}}=\mathrm{LSTM}({\bf g}_{\text{new}},{\bf h}_ {\text{prev}}),\] \[\operatorname{push}(S,({\bf h}_{\text{new}},{\bf g}_{\text{new} })).\]

Footnote 3: The update equations for the tree LSTM (and the stack LSTM) also involve _cell_ states in addition to the hidden states. To reduce notational clutter we do not explicitly show the cell states and instead subsume them into \({\bf g}\). If one (or both) of the inputs to the tree LSTM is a word embedding, the associated cell state is taken to be zero. See Tai et al. (2015) for the exact parameterization.

The generation process continues until an end-of-sentence symbol is generated. The parameters \(\theta\) of the generative model are \({\bf w},b,{\bf W},{\bf b}\), and the parameters of the stack/tree LSTMs. For a sentence \({\bf x}=[x_{1},\ldots,x_{T}]\) of length \(T\), the binary parse tree is given by the binary vector \({\bf z}=[z_{1},\ldots,z_{2T-1}]\).4 The joint log likelihood decomposes as a sum of terminal/action log likelihoods, Footnote 4: As it stands, the support of \({\bf z}\) is \(\left\{0,1\right\}^{2T-1}\), all binary vectors of length \(2T-1\). To restrict our distribution to \(\mathcal{Z}_{T}\) (binary vectors which describe valid trees), we constrain \(z_{t}\) to be valid at each time step, which amounts to deterministically choosing \(z_{t}=0\) (shift) if there are fewer than two elements (not counting the initial zero tuple) on the stack. \[\log p_{\theta}({\bf x},{\bf z})=\underbrace{\sum_{t=1}^{T}\log p_{\theta}({ \bf x}\,|\,{\bf x}_{<t},{\bf z}_{<n(t)})}_{\log p_{\theta}({\bf x}\,|\,{\bf z} )}\] \[+\underbrace{\sum_{j=1}^{2T-1}\log p_{\theta}(z_{j}\,|\,{\bf x}_{< m(j)},{\bf z}_{<j})}_{\log p_{\theta}({\bf z}\,|\,{\bf x}_{<{\bf z}})},\] (1) where \({\bf z}_{<n(t)}\) refers to all actions before generating the \(t\)-th word, and similarly \({\bf x}_{<m(j)}\) refers to all words generated before taking the \(j\)-th action. For brevity, from here on we will use \(\log p_{\theta}({\bf x}\,|\,{\bf z})\) to refer to the first term (terminal log likelihood) and \(\log p_{\theta}({\bf z}\,|\,{\bf x}_{<{\bf z}})\) to refer to the second term (action log likelihood) in the above decomposition.5

Footnote 5: The action log likelihood is the sum of log _conditional_ priors, which is obviously different from the unconditional log prior \(\log p_{\theta}({\bf z})=\log\sum_{\bf x}p_{\theta}({\bf x},{\bf z})\).

In the supervised case where ground-truth \({\bf z}\) is available, we can straightforwardly perform gradient-based optimization to maximize the joint log likelihood \(\log p_{\theta}({\bf x},{\bf z})\). In the unsupervised case, the standard approach is to maximize the log marginal likelihood,

\[\log p_{\theta}({\bf x})=\log\sum_{{\bf z}^{\prime}\in\mathcal{Z}_{T}}p_{ \theta}({\bf x},{\bf z}^{\prime}).\]

However this summation is intractable because \(z_{t}\) fully depends on all previous actions \([z_{1},\ldots,z_{t-1}]\). Even if this summation were tractable, it is not clear that meaningful latent structures would emerge given the lack of explicit independence assumptions in the RNNG (e.g. it is clearly not context-free). We handle these issues with amortized variational inference.

### Amortized Variational Inference

Amortized variational inference Kingma and Welling (2014) defines a trainable inference network \(\phi\) that parameterizes \(q_{\phi}({\bf z}\,|\,{\bf x})\), a variational posterior distribution, in this case over parse trees \({\bf z}\) given the sentence \({\bf x}\). This distribution is used to form an evidence lower bound (ELBO) on the log marginal likelihood,

We maximize the ELBO with respect to both model parameters \(\theta\) and inference network parameters \(\phi\). The ELBO is still intractable to calculate exactly, but this formulation will allow us to obtain unbiased gradient estimators based on Monte Carlo sampling.

Observe that rearranging the ELBO gives the following optimization problem,

Thus, \(\phi\) is trained to match the variational posterior \(q_{\phi}({\bf z}\,|\,{\bf x})\) to the true posterior \(p_{\theta}({\bf z}\,|\,{\bf x})\), but \(\theta\) is _also_ trained to match the true posterior to the variational posterior. Indeed, there is some evidence to suggest that generative models trained with amortized variational inference (i.e. variational autoencoders) learn posterior distributions that are close to the variational family Cremer et al. (2018).

We can use this to our advantage with an inference network that injects inductive bias. We propose to do this by using a context-free model for the inference network, in particular, a neural CRF parser Durrett and Klein (2015). This choice 

can seen as a form of posterior regularization that limits posterior flexibility of the overly powerful RNNG generative model.6,7

Footnote 6: While it has a similar goal, this formulation differs the from posterior regularization as formulated by Ganchev et al. (2010), which constrains the distributional family via linear constraints on posterior expectations. In our case, the conditional independence assumptions in the CRF lead to a _curved_ exponential family where the vector of natural parameters has fewer dimensions than the vector of sufficient statistics of the full exponential family. This curved exponential family is a subset of the marginal polytope of the full exponential family, but it is an intersection of both linear and nonlinear manifolds, and therefore cannot be characterized through linear constraints over posterior expectations.

The parameterization of span scores is similar to recent works Wang and Chang (2016); Stern et al. (2017); Kitaev and Klein (2018): we add position embeddings to word embeddings and run a bidirectional LSTM over the input representations to obtain the forward \([\overrightarrow{\mathbf{h}}_{1},\ldots,\overrightarrow{\mathbf{h}}_{T}]\) and backward \([\overleftarrow{\mathbf{h}}_{1},\ldots,\overleftarrow{\mathbf{h}}_{T}]\) hidden states. The score \(s_{ij}\in\mathbb{R}\) for a constituent spanning \(x_{i}\) to \(x_{j}\) is given by,

\[s_{ij}=\operatorname{MLP}([\overrightarrow{\mathbf{h}}_{j+1}-\overrightarrow {\mathbf{h}}_{i};\overleftarrow{\mathbf{h}}_{i-1}-\overleftarrow{\mathbf{ h}}_{j}]).\]

Letting \(\mathbf{B}\) be the binary matrix representation of a tree (\(\mathbf{B}_{ij}=1\) means there is a constituent spanning \(x_{i}\) and \(x_{j}\)), the CRF parser defines a distribution over binary trees via the Gibbs distribution,

where \(Z_{T}(\mathbf{x})\) is the partition function,

and \(\phi\) denotes the parameters of the inference network (i.e. the bidirectional LSTM and the MLP). Calculating \(Z_{T}(\mathbf{x})\) requires a summation over an exponentially-sized set \(\mathcal{B}_{T}\subset\{0,1\}^{T\times T}\), the set of all binary trees over a length \(T\) sequence. However we can perform the summation in \(O(T^{3})\) using the inside algorithm Baker (1979), shown in Algorithm 1. This computation is itself differentiable and amenable to gradient-based optimization. Finally, letting \(f:\mathcal{B}_{T}\rightarrow\mathcal{Z}_{T}\) be the bijection between the binary tree matrix representation and a sequence of shift/reduce actions, the inference network defines a distribution over \(\mathcal{Z}_{T}\) via \(q_{\phi}(\mathbf{z}\given\mathbf{x})\triangleq q_{\phi}(f^{-1}(\mathbf{z})\given \mathbf{x})\).

```
1:procedureInside(\(s\))\(\triangleright\) scores \(s_{ij}\) for \(i\leq j\)
2:for\(i:=1\)to\(T\)do\(\triangleright\) length-l spans
3:\(\beta[i,i]=s_{ii}\)
4:for\(\ell:=1\)to\(T-1\)do\(\triangleright\) span length
5:for\(i:=1\)to\(T-\ell\)do\(\triangleright\) span start
6:\(j=i+\ell\)\(\triangleright\) span end
7:\(\beta[i,j]=\sum_{k=i}^{j-1}s_{ij}\cdot\beta[i,k]\cdot\beta[k+1,j]\)
8:return\(\beta[1,T]\)\(\triangleright\) return partition function \(Z_{T}(\mathbf{x})\)
```

**Algorithm 1** Inside algorithm for calculating \(Z_{T}(\mathbf{x})\)

### Optimization

For optimization, we use the following variant of the ELBO,

\[\mathbb{E}_{q_{\phi}(\mathbf{z}\given\mathbf{x})}[\log p_{\theta}(\mathbf{x}, \mathbf{z})]+\mathbb{H}[q_{\phi}(\mathbf{z}\given\mathbf{x})],\]

where \(\mathbb{H}[q_{\phi}(\mathbf{z}\given\mathbf{x})]=\mathbb{E}_{q_{\phi}(\mathbf{ z}\given\mathbf{x})}[-\log q_{\phi}(\mathbf{z}\given\mathbf{x})]\) is the entropy of the variational posterior. A Monte Carlo estimate for the gradient with respect to \(\theta\) is

\[\nabla_{\theta}\operatorname{ELBO}(\theta,\phi;\mathbf{x})\approx\frac{1}{K} \sum_{k=1}^{K}\nabla_{\theta}\log p_{\theta}(\mathbf{x},\mathbf{z}^{(k)}),\]

with samples \(\mathbf{z}^{(1)},\dots,\mathbf{z}^{(K)}\) from \(q_{\phi}(\mathbf{z}\given\mathbf{x})\). Sampling uses the intermediate values calculated during the inside algorithm to sample split points recursively Goodman (1998); Finkel et al. (2006), as shown in Algorithm 2. The gradient with respect to \(\phi\) involves two parts. The entropy term \(\mathbb{H}[q_{\phi}(\mathbf{z}\given\mathbf{x})]\) can be calculated exactly in \(O(T^{3})\), again using the intermediate values from the inside algorithm (see Algorithm 3).8 Since each step of this dynamic program is differentiable, we can obtain the gradient \(\nabla_{\phi}\mathbb{H}[q_{\phi}(\mathbf{z}\given\mathbf{x})]\) using automatic differentiation.9 An estimator for the gradient with respect to \(\mathbb{E}_{q_{\phi}(\mathbf{z}\given\mathbf{x})}[\log p_{\theta}(\mathbf{x}, \mathbf{z})]\) is obtained via the score function gradient estimator Glynn (1987); Williams (1992),

Footnote 8: We adapt the algorithm for calculating tree entropy in PCFGs from Hwa (2000) to the CRF case.

\[\nabla_{\phi}\mathbb{E}_{q_{\phi}(\mathbf{z}\given\mathbf{x})}[\log p _{\theta}(\mathbf{x},\mathbf{z})]\] \[\quad=\mathbb{E}_{q_{\phi}(\mathbf{z}\given\mathbf{x})}[\log p_{ \theta}(\mathbf{x},\mathbf{z})\nabla_{\phi}\log q_{\phi}(\mathbf{z}\given\mathbf{ x})]\] \[\qquad\approx\frac{1}{K}\sum_{k=1}^{K}\log p_{\theta}(\mathbf{x}, \mathbf{z}^{(k)})\nabla_{\phi}\log q_{\phi}(\mathbf{z}^{(k)}\given\mathbf{x}).\] 

The above estimator is unbiased but typically suffers from high variance. To reduce variance, we use a control variate derived from an average of the other samples' joint likelihoods (Mnih and Rezende, 2016), yielding the following estimator,

\[\frac{1}{K}\sum_{k=1}^{K}(\log p_{\theta}(\mathbf{x},\mathbf{z}^{(k)})-r^{(k)}) \nabla_{\phi}\log q_{\phi}(\mathbf{z}^{(k)}\left|\:\mathbf{x}\right.),\]

where \(r^{(k)}=\frac{1}{K-1}\sum_{j\neq k}\log p_{\theta}(\mathbf{x},\mathbf{z}^{(j)})\). This control variate worked better than alternatives such as estimates of baselines from an auxiliary network (Mnih and Gregor, 2014; Deng et al., 2018) or a language model (Yin et al., 2018).

```
1:procedureSample(\(\beta\))\(\triangleright\)\(\beta\) from running Inside(s)
2:\(\mathbf{B}=\mathbf{0}\)\(\triangleright\)binary matrix representation of tree
3:\(Q=[(1,T)]\)\(\triangleright\)queue of constituents
4:while\(\mathbf{d}\) is not empty do
5:\((i,j)=\operatorname*{pop}(Q)\)
6:\(\tau=\sum_{i=1}^{J-1}\beta[i,k]\cdot\beta[k+1,j]\)
7:for\(k:=i\text{ to }j-1\textbf{ d}\vartriangle\) get distribution over splits
8:\(w_{k}=(\beta[i,k]\cdot\beta[k+1,j])/\tau\)
9:\(k\sim\mathrm{Cat}([w_{i},\ldots,w_{j-1}])\)\(\triangleright\)sample a split point
10:\(\mathbf{B}_{k}=1\), \(\mathbf{B}_{k+1,j}=1\)\(\triangleright\)update \(\mathbf{B}\)
11:if\(k>\textbf{then}\)\(\triangleright\) if left child has width \(>1\)
12:\(\mathrm{push}(Q,(i,k))\)\(\triangleright\)add to queue
13:if\(k+1<j\)then\(\triangleright\)if right child has width \(>1\)
14:\(\mathrm{push}(Q,(k+1,j))\)\(\triangleright\)add to queue
15:\(\mathbf{z}=f(\mathbf{B})\)\(\triangleright\)\(f:\mathcal{B}_{T}\to\mathcal{Z}_{T}\)maps matrix representation of tree to sequence of actions. return z
```

**Algorithm 2** Top-down sampling at tree from \(q_{\phi}(\mathbf{z}\mid\mathbf{x})\)

## 3 Experimental Setup

### Data

For English we use the Penn Treebank Marcus et al. (1993), PTB with splits and preprocessing from Dyer et al. (2016) which retains punctuation and replaces singleton words with Berkeley parser's mapping rules, resulting in a vocabulary of 23,815 word types.10 Notably this is much larger than the standard PTB LM setup from Mikolov et al. (2010) which uses 10K types.11 Also different from the LM setup, we model each sentence separately instead of carrying information across sentence boundaries, as the RNNG is a generative model of sentences. Hence our perplexity numbers are not comparable to the PTB LM results (Melis et al., 2018; Merity et al., 2018; Yang et al., 2018).

Footnote 10: [https://github.com/clab/rmg](https://github.com/clab/rmg)

Since the PTB is rather small, and since the URNNG does not require annotation, we also test our approach on a subset of the one billion word corpus Chelba et al. (2013). We randomly sample 1M sentences for training and 2K sentences for validation/test, and limit the vocabulary to 30K word types. While still a subset of the full corpus (which has 30M sentences), this dataset is two orders of magnitude larger than PTB. Experiments on Chinese utilize version 5.1 of the Chinese Penn Treebank (CTB) Xue et al. (2005), with the same splits as in Chen and Manning (2014). Singleton words are replaced with a single (unk) token, resulting in a vocabulary of 17,489 word types.

### Training and Hyperparameters

The stack LSTM has two layers with input/hidden size equal to 650 and dropout of 0.5. The tree LSTM also has 650 units. The inference network uses a one-layer bidirectional LSTM with 256 hidden units, and the MLP (to produce span scores \(s_{ij}\) for \(i\leq j\)) has a single hidden layer with a \(\mathrm{ReLU}\) nonlinearity followed by layer normalization Ba et al. (2016) and dropout of 0.5. We share word embeddings between the generative model and the inference network, and also tie weights between the input/output word embeddings Press and Wolf (2016).

Optimization of the model itself required standard techniques for avoiding posterior collapse in VAEs.12 We warm-up the ELBO objective by linearly annealing (per batch) the weight on the conditional prior \(\log p_{\theta}(\mathbf{z}\mid\mathbf{x}_{<\mathbf{z}})\) and the entropy \(\mathbb{H}[q_{\phi}(\mathbf{z}\mid\mathbf{x})]\) from 0 to 1 over the first two epochs (see equation (1) for definition of \(\log p_{\theta}(\mathbf{z}\mid\mathbf{x}_{<\mathbf{z}})\)). This is analogous to KL-annealing in VAEs with continuous latent variables Bowman et al. (2016); Sonderby et al. (2016). We train for 18 epochs (enough for convergence for all models) with a batch size of 16 and \(K=8\) samples for the Monte Carlo gradient estimators. The generative model is optimized with SGD with learning rate equal to 1, 

except for the affine layer that produces a distribution over the actions, which has learning rate 0.1. Gradients of the generative model are clipped at 5. The inference network is optimized with Adam Kingma and Ba (2015) with learning rate 0.0001, \(\beta_{1}=0.9,\beta_{2}=0.999\), and gradient clipping at 1. As Adam converges significantly faster than SGD (even with a much lower learning rate), we stop training the inference network after the first two epochs. Initial model parameters are sampled from \(\mathcal{U}[-0.1,0.1]\). The learning rate starts decaying by a factor of 2 each epoch after the first epoch at which validation performance does not improve, but this learning rate decay is not triggered for the first eight epochs to ensure adequate training. We use the same hyperparameters/training setup for both PTB and CTB. For experiments on (the subset of) the one billion word corpus, we use a smaller dropout rate of 0.1. The baseline RNNLM also uses the smaller dropout rate.

All models are trained with an end-of-sentence token, but for perplexity calculation these tokens are not counted to be comparable to prior work Dyer et al. (2016); Kuncoro et al. (2017); Buys and Blunsom (2018). To be more precise, the inference network does not make use of the end-of-sentence token to produce parse trees, but the generative model is trained to generate the end-of-sentence token after the final reduce operation.

### Baselines

We compare the unsupervised RNNG (URNNG) against several baselines: (1) RNNLM, a standard RNN language model whose size is the same as URNNG's stack LSTM; (2) Parsing Reading Predict Network (PRPN) Shen et al. (2018), a neural language model that uses gated attention layers to embed soft tree-like structures into a neural network (and among the current state-of-the-art in grammar induction from words on the full corpus); (3) RNNG with trivial trees (left branching, right branching, random); (4) supervised RNNG trained on unlabeled, binarized gold trees.13 Note that the supervised RNNNG also trains a discriminative parser \(q_{\phi}(\mathbf{z}\mid\mathbf{x})\) (alongside the generative model \(p_{\theta}(\mathbf{x},\mathbf{z})\)) in order to sample parse forests for perplexity evaluation (i.e. importance sampling). This discriminative parser has the same architecture as URNNG's inference network. For all models, we perform early stopping based on validation perplexity.

Footnote 13: We use right branching binarization—Matsuzaki et al. (2005) find that differences between various binarization schemes have marginal impact. Our supervised RNNG therefore differs the original RNNG, which trains on non-binarized trees and does not ignore constituent labels.

## 4 Results and Discussion

### Language Modeling

Table 1 shows perplexity for the different models on PTB/CTB. As a language model URNNG outperforms an RNNLM and is competitive with the supervised RNNG.14 The left branching baseline performs poorly, implying that the strong performance of URNNG/RNNG is not simply due to the additional depth afforded by the tree LSTM composition function (a left branching tree, which always performs reduce when possible, is the "deepest" model). The right branching baseline is essentially equivalent to an RNNLM and hence performs similarly. We found PRPN with default hyperparameters (which obtains a perplexity of 62.0 in the PTB setup from Mikolov et al. (2010)) to not perform well, but tuning hyperparameters improves performance.15 The supervised RNNG performs well as a language model, despite being trained on the joint (rather than marginal) likelihood objective.16 This indicates that explicit

\begin{table}
\begin{tabular}{l r r r r} \hline \hline  & \multicolumn{2}{c}{PTB} & \multicolumn{2}{c}{CTB} \\ Model & PPL & \(F_{1}\) & PPL & \(F_{1}\) \\ \hline RNNLM & 93.2 & – & 201.3 & – \\ PRPN (default) & 126.2 & 32.9 & 290.9 & 32.9 \\ PPRN (tuned) & 96.7 & 41.2 & 216.0 & 36.1 \\ Left Branching Trees & 100.9 & 10.3 & 223.6 & 12.4 \\ Right Branching Trees & 93.3 & 34.8 & 203.5 & 20.6 \\ Random Trees & 113.2 & 17.0 & 209.1 & 17.4 \\ URNNG & 90.6 & 40.7 & 195.7 & 29.1 \\ \hline RNNG & 88.7 & 68.1 & 193.1 & 52.3 \\ RNNG \(\rightarrow\) URNNG & 85.9 & 67.7 & 181.1 & 51.9 \\ \hline Oracle Binary Trees & – & 82.5 & – & 88.6 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Language modeling perplexity (PPL) and grammar induction \(F_{1}\) scores on English (PTB) and Chinese (CTB) for the different models. Note that our PTB setup from Dyer et al. (2016) differs considerably from the usual language modeling setup Mikolov et al. (2010) since we model each sentence independently and use a much larger vocabulary (see §3.1).

 

modeling of syntax helps generalization even with richly-parameterized neural models. Encouraged by these observations, we also experiment with a hybrid approach where we train a supervised RNNG first and continue fine-tuning the model (including the inference network) on the URNNNG objective (RNNG \(\rightarrow\) URNNG in Table 1).17 This approach results in nontrivial perplexity improvements, and suggests that it is potentially possible to improve language models with supervision on parsed data. In Figure 2 we show perplexity by sentence length. We find that a standard language model (RNNLM) is better at modeling short sentences, but underperforms models that explicitly take into account structure (RNNG/URNNG) when the sentence length is greater than 10. Table 2 (top) compares our results against prior work on this version of the PTB, and Table 2 (bottom) shows the results on a 1M sentence subset of the one billion word corpus, which is two orders of magnitude larger than PTB. On this larger dataset URNNNG still improves upon the RNNLM. We also trained an RNNG (and RNNG \(\rightarrow\) URNNG) on this dataset by parsing the training set with the self-attentive parser from Kitaev and Klein (2018).18 These models improve upon the RNNLM but not the URNNNG, potentially highlighting the limitations of using predicted trees for supervising RNNGs.

Footnote 17: We fine-tune for 10 epochs and use a smaller learning rate of 0.1 for the generative model.

Footnote 18: To parse the training set we use the benepar_en2 model from [https://github.com/nikitakti/self-attentive-parser](https://github.com/nikitakti/self-attentive-parser), which obtains an \(F_{1}\) score of 95.17 on the PTB test set.

### Grammar Induction

Table 1 also shows the \(F_{1}\) scores for grammar induction. Note that we induce latent trees directly from words on the full dataset.19 For RNNG/URNNG we obtain the highest scoring

Figure 2: Perplexity of the different models grouped by sentence length on PTB.

 

other trees (left), and the recall of URNNG/PRPN trees against ground truth constituents (right). We find that trees induced by URNNG and PRPN are quite different; URNNG is more sensitive to SBAR and VP, while PRPN is better at identifying NP. While left as future work, this naturally suggests a hybrid approach wherein the intersection of constituents from URNNG and PRPN is used to create a corpus of partially annotated trees, which can be used to guide another model, e.g. via posterior regularization Ganchev et al. (2010) or semi-supervision Hwa (1999). Finally, Table 4 compares our results using the same evaluation setup as in Drozdov et al. (2019), which differs considerably from our setup.

### Distributional Metrics

Table 5 shows some standard metrics related to the learned generative model/inference network. The "reconstruction" perplexity based on \(\mathbb{E}_{q_{\phi}(\mathbf{z}\,|\,\mathbf{x})}[\log p_{\theta}(\mathbf{x}\,| \,\mathbf{z})]\) is much lower than regular perplexity, and further, the Kullback-Leibler divergence between the conditional prior and the variational posterior, given by

\[\mathbb{E}_{q_{\phi}(\mathbf{z}\,|\,\mathbf{x})}\left[\log\frac{q_{\phi}( \mathbf{z}\,|\,\mathbf{x})}{p_{\theta}(\mathbf{z}\,|\,\mathbf{x}_{<\mathbf{ z}})}\right],\]

is highly nonzero. (See equation (1) for definitions of \(\log p_{\theta}(\mathbf{x}\,|\,\mathbf{z})\) and \(\log p_{\theta}(\mathbf{z}\,|\,\mathbf{x}_{<\mathbf{z}})\)). This indicates that the latent space is being used in a meaningful way and that there is no posterior collapse Bowman et al. (2016). As expected, the entropy of the variational posterior is much lower than the entropy of the conditional prior, but there is still some uncertainty in the posterior.

### Syntactic Evaluation

We perform a syntactic evaluation of the different models based on the setup from Marvin and Linzen (2018): the model is given two minimally different sentences, one grammatical and one ungrammatical, and must identify the grammatical sentence by assigning it higher probability.21 Table 6 shows the accuracy results. Overall the supervised RNNG significantly outperforms the other models, indicating opportunities for further work in unsupervised modeling. While the URNNG does slightly outperform an RNNLM, the distribution of errors made from both models are similar, and thus it is not clear whether the outperformance is simply due to better perplexity or learning different structural biases.

Footnote 21: We modify the publicly available dataset from [https://github.com/BeckyMarvin/LM_syneval](https://github.com/BeckyMarvin/LM_syneval) to only keep sentence pairs that did not have any unknown words with respect to our vocabulary, resulting in 80K sentence pairs for evaluation.

### Limitations

There are several limitations to our approach. For one, the URNNNG takes considerably more time/memory to train than a standard language model due to the \(O(T^{3})\) dynamic program in the inference network, multiple samples to obtain low-variance gradient estimators, and dynamic computation graphs that make efficient batching

\begin{table}
\begin{tabular}{l r c} \hline  & \(F_{1}\) & +PP \\ \hline PRPN-UP\({}^{\ddagger}\) & 39.8 & 45.4 \\ PRPN-LM\({}^{\ddagger}\) & 42.8 & 42.4 \\ ON-LSTM\({}^{\ddagger}\)Shen et al. (2019) & 49.4 & – \\ DIORA\({}^{\ddagger}\)Drozdov et al. (2019) & 49.6 & 56.2 \\ PRPN (tuned) & 49.0 & 49.9 \\ URNNG & 52.4 & 52.4 \\ \hline \end{tabular}
\end{table}
Table 4: PTB \(F_{1}\) scores using the same evaluation setup as Drozdov et al. (2019), which evaluates against binarized trees, counts punctuation and trivial spans, and uses sentence-level \(F_{1}\). +PP indicates a postprocessing heuristic which directly attaches trailing punctuation to the root. This does not change URNNG results since it learns to do so anyway. Results with \({}^{\ddagger}\) are copied from Table 1 of Drozdov et al. (2019).

\begin{table}
\begin{tabular}{c c c c c} \hline Tree & PTB & CTB & Label & URNNG & PRPN \\ \hline Gold & 40.7 & 29.1 & SBAR & 74.8\% & 28.9\% \\ Left & 9.2 & 8.4 & NP & 39.5\% & 63.9\% \\ Right & 68.3 & 51.2 & VP & 76.6\% & 27.3\% \\ Self & 92.3 & 87.3 & PP & 55.8\% & 55.1\% \\ RNING & 55.4 & 47.1 & ADJP & 33.9\% & 42.5\% \\ PRPN & 41.0 & 47.2 & ADVP & 50.4\% & 45.1\% \\ \hline \end{tabular}
\end{table}
Table 3: (Left) \(F_{1}\) scores of URNNG against other trees. “Self” refers to another URNNG trained with a different random seed. (Right) Recall of constituents by label for URNNG and PRPN. Recall for a particular label is the fraction of ground truth constituents of that label that were identified by the model.

 

nontrivial. The model is sensitive to hyperparameters and required various optimization strategies (e.g. separate optimizers for the inference network and the generative model) to avoid posterior collapse. Finally, the URNNG also seemed to rely heavily on punctuation to identify constituents and we were unable to improve upon a right-branching baseline when training the URNNNG on a version of PTB where punctuation is removed.23

Footnote 23: Many prior works that induce trees directly from words often employ additional heuristics based on punctuation [16, 40, 58, 7], as punctuation (e.g. comma) is usually a reliable signal for start/end of constituent spans. The URNNG still has to _learn_ to rely on punctuation, similar to recent works such as depth-bounded PCFGs [9] and DIORA [10]. In contrast, PRPN [16] and Ordered Neurons [16] induce trees by directly training on corpus without punctuation. We also reiterate that punctuation is used during training but ignored during evaluation (except in Table 4).

## 5 Related Work

There has been much work on incorporating tree structures into deep models for syntax-aware language modeling, both for unconditional [13, 14, 15] and conditional [16, 17, 1, 18, 19] cases. These approaches generally rely on annotated parse trees during training and maximizes the joint likelihood of sentence-tree pairs. Prior work on combining language modeling and unsupervised tree learning typically embed soft, tree-like structures as hidden layers of a deep network [12, 19, 16]. In contrast, Buys and Blunsom [16] make Markov assumptions and perform exact marginalization over latent dependency trees. Our work is also related to the recent line of work on learning latent trees as part of a deep model through supervision on other tasks, typically via differentiable structured hidden layers [16, 17, 18, 19, 18, 19, 20], policy gradient-based approaches [16, 17, 18, 19], or differentiable relaxations [12, 19].

The variational approximation uses amortized inference [16, 19, 17], in which an inference network is used to obtain the variational posterior for each observed \({\bf x}\). Since our inference network is structured (i.e., a CRF), it is also related to CRF autoencoders [15] and structured VAEs [16, 17], which have been used previously for unsupervised [16, 17, 18] and semi-supervised [16, 19] parsing.

## 6 Conclusion

It is an open question as to whether explicit modeling of syntax significantly helps neural models. Strubell et al. schrubell2018deep find that supervising intermediate attention layers with syntactic heads improves semantic role labeling, while Shi et al. shai2018learning observe that for text classification, syntactic trees only have marginal impact. Our work suggests that at least for language modeling, incorporating syntax either via explicit supervision or as latent variables does provide useful inductive biases and improves performance.

Finally, in modeling child language acquisition, the complex interaction of the parser and the grammatical knowledge being acquired is the object of much investigation [14]; our work shows that apparently grammatical constraints can emerge from the interaction of a constrained parser and a more general grammar learner, which is an intriguing but underexplored hypothesis for explaining human linguistic biases.

## Acknowledgments

We thank the members of the DeepMind language team for helpful feedback. YK is supported by a Google Fellowship. AR is supported by NSF Career 1845664.

\begin{table}
\begin{tabular}{c r r r r} \hline \hline  & RNNLM & PRPN & RNNG & WRNNG \\ \hline PPL & 93.2 & 96.7 & 88.7 & 90.6 \\ \hline Overall & \(62.5\%\) & \(61.9\%\) & \(69.3\%\) & \(64.6\%\) \\ Subj. & \(63.5\%\) & \(63.7\%\) & \(89.4\%\) & \(67.2\%\) \\ Obj. Rel. & \(62.6\%\) & \(61.0\%\) & \(67.6\%\) & \(65.7\%\) \\ Refl. & \(60.7\%\) & \(68.8\%\) & \(57.3\%\) & \(60.5\%\) \\ NPI & \(58.7\%\) & \(39.5\%\) & \(46.8\%\) & \(55.0\%\) \\ \hline \hline \end{tabular}
\end{table}
Table 6: Syntactic evaluation based on the setup from marvin2018multicolumn{1}{l}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 6: Syntactic evaluation based on the setup from marvin2018multicolumn{1}{l}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 5: Syntax evaluation based on the setup from marvin2018multicolumn1{l}{}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 4: Syntax evaluation based on the setup from marvin2018multicolumn1{l}{}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 5: Syntax evaluation based on the setup from marvin2018multicolumn1{l}{}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 5: Syntax evaluation based on the setup from marvin2018multicolumn1{l}{}{} \\ \multirow{2}{*}{Subj. Rel.} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} & \multirow{2}{*}{\(60.7\%\)} \\  & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 6: Syntactic evaluation based on the setup from marvin2018multicolumn1{l}{}{} \\ \multirow{2}{*}{Our work using different methods for parsing and parsing.

 



## References

* Aharoni and Goldberg (2017) Roee Aharoni and Yoav Goldberg. 2017. Towards String-to-Tree Neural Machine Translation. In _Proceedings of ACL_. Alvarez-Melis and Jaakkola (2017) David Alvarez-Melis and Tommi S. Jaakkola. 2017. Tree-structured Decoding with Doubly-Recurrent Neural Networks. In _Proceedings of ICLR_. Ammar et al. (2014) Waleed Ammar, Chris Dyer, and Noah A. Smith. 2014. Conditional Random Field Autoencoders for Unsupervised Structured Prediction. In _Proceedings of NIPS_. Ba et al. (2016) Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. 2016. Layer Normalization. In _Proceedings of NIPS_. Baker (1979) James K. Baker. 1979. Trainable Grammars for Speech Recognition. In _Proceedings of the Spring Conference of the Acoustical Society of America_. Bod (2006) Rens Bod. 2006. An All-Subtrees Approach to Unsupervised Parsing. In _Proceedings of ACL_. Bowman et al. (2016) Samuel R. Bowman, Luke Vilnis, Oriol Vinyal, Andrew M. Dai, Rafal Jozefowicz, and Samy Bengio. 2016. Generating Sentences from a Continuous Space. In _Proceedings of CoNLL_. Bradbury and Socher (2017) James Bradbury and Richard Socher. 2017. Towards Neural Machine Translation with Latent Tree Attention. In _Proceedings of the 2nd Workshop on Structured Prediction for Natural Language Processing_. Buys and Blunsom (2015) Jan Buys and Phil Blunsom. 2015. Generative Incremental Dependency Parsing with Neural Networks. In _Proceedings of ACL_. Buys and Blunsom (2018) Jan Buys and Phil Blunsom. 2018. Neural Syntactic Generative Models with Exact Marginalization. In _Proceedings of NAACL_. Cai et al. (2017) Jingo Cai, Yong Jiang, and Kewei Tu. 2017. CRF Autoencoder for Unsupervised Dependency Parsing. In _Proceedings of EMNLP_. Chelba et al. (2013) Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. 2013. One Billion Word Benchmark for Measuring Progress in Statistical Language Modeling. _arXiv:1312.3005_. Chen and Manning (2014) Danqi Chen and Christopher D. Manning. 2014. A Fast and Accurate Dependency Parser using Neural Networks. In _Proceedings of EMNLP_. Cho et al. (2014) Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. 2014. On the Properties of Neural Machine Translation: Encoder-Decoder Approaches. In _Proceedings of Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation_. Choi et al. (2018) Jihun Choi, Kang Min Yoo, and Sang goo Lee. 2018. Learning to Compose Task-Specific Tree Structures. In _Proceedings of AAAI_. Chung et al. (2017) Junyoung Chung, Sungjin Ahn, and Yoshua Bengio. 2017. Hierarchical Multiscale Recurrent Neural Networks. In _Proceedings of ICLR_. Corro and Titov (2019) Caio Corro and Ivan Titov. 2019. Differentiable Perturb-and-Parse: Semi-Supervised Parsing with a Structured Variational Autoencoder. In _Proceedings of ICLR_. Cremer et al. (2018) Chris Cremer, Xuechen Li, and David Duvenaud. 2018. Inference Suboptimality in Variational Autoencoders. In _Proceedings of ICML_. Deng et al. (2018) Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo, and Alexander M. Rush. 2018. Latent Alignment and Variational Attention. In _Proceedings of NIPS_. Drozdov et al. (2019) Andrew Drozdov, Patrick Vega, Mohit Yadev, Mohit Iyyer, and Andrew McCallum. 2019. Unsupervised Latent Tree Induction with Deep Inside-Outside Recursive Auto-Encoders. In _Proceedings of NAACL_. Durrett and Klein (2015) Greg Durrett and Dan Klein. 2015. Neural CRF Parsing. In _Proceedings of ACL_. Dyer et al. (2015) Chris Dyer, Miguel Ballesteros, Wang Ling, Austin Matthews, and Noah A. Smith. 2015. Transition-Based Dependency Parsing with Stack Long Short-Term Memory. In _Proceedings of ACL_. Dyer et al. (2016) Chris Dyer, Adhiguna Koncoro, Miguel Ballesteros, and Noah A. Smith. 2016. Recurrent Neural Network Grammars. In _Proceedings of NAACL_. Emami and Jelinek (2005) Ahmad Emami and Frederick Jelinek. 2005. A Neural Syntactic Language Model. _Machine Learning_, 60:195-227. Eriguchi et al. (2017) Akiko Eriguchi, Yoshimasa Tsuruoka, and Kyunghyun Cho. 2017. Learning to Parse and Translate Improves Neural Machine Translation. In _Proceedings of ACL_. Finkel et al. (2008) Jenny Rose Finkel, Alex Kleeman, and Christopher D. Manning. 2008. Efficient, Feature-based, Conditional Random Field Parsing. In _Proceedings of ACL_. Finkel et al. (2006) Jenny Rose Finkel, Christopher D. Manning, and Andrew Y. Ng. 2006. Solving the Problem of Cascading Errors: Approximate Bayesian Inference for Linguistic Annotation Pipelines. In _Proceedings of EMNLP_. Ganchev et al. (2010) Kuzman Ganchev, Joao Graca, Jennifer Gillenwater, and Ben Taskar. 2010. Posterior Regularization for Structured Latent Variable Models. _Journal of Machine Learning Research_, 11:2001-2049. Glynn (1987) Peter Glynn. 1987. Likelihood Ratio Gradient Estimation: An Overview. In _Proceedings of Winter Simulation Conference_. Goodman (1998) Joshua Goodman. 1998. Parsing Inside-Out. _PhD thesis, Harvard University_

Jetic Gu, Hassan S. Shavarani, and Anoop Sarkar. 2018. Top-down Tree Structured Decoding with Syntactic Connections for Neural Machine Translation and Parsing. In _Proceedings of EMNLP_.
* Hale et al. (2018) John Hale, Chris Dyer, Adhiguna Kuncoro, and Jonathan R. Brennan. 2018. Finding Syntax in Human Encephalography with Beam Search. In _Proceedings of ACL_.
* Havrylov et al. (2019) Serhii Havrylov, German Kruszewski, and Armand Joulin. 2019. Cooperative Learning of Disjoint Syntax and Semantics. In _Proceedings of NAACL_.
* Hutt et al. (2018) Phu Mon Hutt, Kyunghyun Cho, and Samuel R. Bowman. 2018. Grammar Induction with Neural Language Models: An Unusual Replication. In _Proceedings of EMNLP_.
* Hwa (1999) Rebecca Hwa. 1999. Supervised Grammar Induction Using Training Data with Limited Constituent Information. In _Proceedings of ACL_.
* Hwa (2000) Rebecca Hwa. 2000. Sample Selection for Statistical Grammar Induction. In _Proceedings of EMNLP_.
* Jin et al. (2018) Lifeng Jin, Finale Doshi-Velez, Timothy Miller, William Schuler, and Lane Schwartz. 2018. Unsupervised Grammar Induction with Depth-bounded PCFG. In _Proceedings of TACL_.
* Johnson et al. (2007) Mark Johnson, Thomas L. Griffiths, and Sharon Goldwater. 2007. Bayesian Inference for PCFGs via Markov chain Monte Carlo. In _Proceedings of NAACL_.
* Johnson et al. (2016) Matthew Johnson, David K. Duvenaud, Alex Wiltschko, Ryan P. Adams, and Sandeep R. Datta. 2016. Composing Graphical Models with Neural Networks for Structured Representations and Fast Inference. In _Proceedings of NIPS_.
* Kawakami et al. (2018) Kazuya Kawakami, Chris Dyer, and Phil Blunsom. 2018. Unsupervised Word Discovery with Segmental Neural Language Models. _arXiv:1811.09353_.
* Kim et al. (2017) Yoon Kim, Carl Denton, Luong Hoang, and Alexander M. Rush. 2017. Structured Attention Networks. In _Proceedings of ICLR_.
* Kingma and Ba (2015) Diederik P. Kingma and Jimmy Ba. 2015. Adam: A Method for Stochastic Optimization. In _Proceedings of ICLR_.
* Kingma and Welling (2014) Diederik P. Kingma and Max Welling. 2014. Autoencoding Variational Bayes. In _Proceedings of ICLR_.
* Kitaev and Klein (2018) Nikita Kitaev and Dan Klein. 2018. Constituency Parsing with a Self-Attentive Encoder. In _Proceedings of ACL_.
* Klein and Manning (2002) Dan Klein and Christopher Manning. 2002. A Generative Constituent-Context Model for Improved Grammar Induction. In _Proceedings of ACL_.
* Krishnan et al. (2017) Rahul G. Krishnan, Uri Shalit, and David Sontag. 2017. Structured Inference Networks for Nonlinear State Space Models. In _Proceedings of AAAI_.
* Kuncoro et al. (2017) Adhiguna Kuncoro, Miguel Ballesteros, Lingpeng Kong, Chris Dyer, Graham Neubig, and Noah A. Smith. 2017. What Do Recurrent Neural Network Grammars Learn About Syntax? In _Proceedings of EACL_.
* Koncoro et al. (2018) Adhiguna Kuncoro, Chris Dyer, John Hale, Dani Yogatama, Stephen Clark, and Phil Blunsom. 2018. LSTMs Can Learn Syntax-Sensitive Dependencies Well, But Modeling Structure Makes Them Better. In _Proceedings of ACL_.
* Li et al. (2019) Bowen Li, Jianpeng Cheng, Yang Liu, and Frank Keller. 2019. Dependency Grammar Induction with a Neural Variational Transition-based Parser. In _Proceedings of AAAI_.
* Li and Eisner (2009) Zhifei Li and Jason Eisner. 2009. First- and Second-Order Expectation Semirings with Applications to Minimum-Risk Training on Translation Forests. In _Proceedings of EMNLP_.
* Liu et al. (2018) Yang Liu, Matt Gardner, and Mirella Lapata. 2018. Structured Alignment Networks for Matching Sentences. In _Proceedings of EMNLP_.
* Liu and Lapata (2018) Yang Liu and Mirella Lapata. 2018. Learning Structured Text Representations. In _Proceedings of TACL_.
* Maillard and Clark (2018) Jean Maillard and Stephen Clark. 2018. Latent Tree Learning with Differentiable Parsers: Shift-Reduce Parsing and Chart Parsing. In _Proceedings of the Workshop on the Relevance of Linguistic Structure in Neural Architectures for NLP_.
* Marcus et al. (1993) Mitchell P. Marcus, Mary Ann Marcinkiewicz, and Beatricte Santorini. 1993. Building a Large Annotated Corpus of English: The Penn Treebank. _Computational Linguistics_, 19:313-330.
* Marvin and Linzen (2018) Rebecca Marvin and Tal Linzen. 2018. Targeted Syntactic Evaluation of Language Models. In _Proceedings of EMNLP_.
* Matsuzaki et al. (2005) Takuya Matsuzaki, Yusuke Miyao, and Junichi Tsujii. 2005. Probabilistic CFG with Latent Annotations. In _Proceedings of ACL_.
* Melis et al. (2018) Gabor Melis, Chris Dyer, and Phil Blunsom. 2018. On the State of the Art of Evaluation in Neural Language Models. In _Proceedings of ICLR_.
* Merity et al. (2018) Stephen Merity, Nitish Shirish Keskar, and Richard Socher. 2018. Regularizing and Optimizing LSTM Language Models. In _Proceedings of ICLR_.
* Mikolov et al. (2010) Tomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernocky, and Sanjeev Khudanpur. 2010. Recurrent Neural Network Based Language Model. In _Proceedings of INTERSPEECH_.

 

Andriy Mnih and Karol Gregor. 2014. Neural variational inference and learning in belief networks. In _Proceedings of ICML_.
* Mnih and Rezende (2016) Andriy Mnih and Danilo J. Rezende. 2016. Variational Inference for Monte Carlo Objectives. In _Proceedings of ICML_.
* Naseem et al. (2010) Tahira Naseem, Harr Chen, Regina Barzilay, and Mark Johnson. 2010. Using Universal Linguistic Knowledge to Guide Grammar Induction. In _Proceedings of EMNLP_.
* Niculae et al. (2018) Vlad Niculae, Andre F. T. Martins, and Claire Cardie. 2018. Towards Dynamic Computation Graphs via Sparse Latent Structure. In _Proceedings of EMNLP_.
* Parikh et al. (2014) Ankur P. Parikh, Shay B. Cohen, and Eric P. Xing. 2014. Spectral Unsupervised Parsing with Additive Tree Metrics. In _Proceedings of ACL_.
* Peng et al. (2018) Hao Peng, Sam Thomson, and Noah A. Smith. 2018. Backpropagating through Structured Argmax using a SPIGOT. In _Proceedings of ACL_.
* Ponvert et al. (2011) Elis Ponvert, Jason Baldridge, and Katrin Erk. 2011. Simpled Unsupervised Grammar Induction from Raw Text with Cascaded Finite State Methods. In _Proceedings of ACL_.
* Press and Wolf (2016) Ofir Press and Lior Wolf. 2016. Using the Output Embedding to Improve Language Models. In _Proceedings of EACL_.
* Rabinovich et al. (2017) Maxim Rabinovich, Mitchell Stern, and Dan Klein. 2017. Abstract Syntax Networks for Code Generation and Semantic Parsing. In _Proceedings of ACL_.
* Rezende et al. (2014) Danilo J. Rezende, Shakir Mohamed, and Daan Wierstra. 2014. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. In _Proceedings of ICML_.
* Seginer (2007) Yoav Seginer. 2007. Fast Unsupervised Incremental Parsing. In _Proceedings of ACL_.
* Shen et al. (2018) Yikang Shen, Zhouhan Lin, Chin-Wei Huang, and Aaron Courville. 2018. Neural Language Modeling by Jointly Learning Syntax and Lexicon. In _Proceedings of ICLR_.
* Shen et al. (2019) Yikang Shen, Shawn Tan, Alessandro Sordoni, and Aaron Courville. 2019. Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks. In _Proceedings of ICLR_.
* Shi et al. (2018) Haoyue Shi, Hao Zhou, Jiaze Chen, and Lei Li. 2018. On Tree-based Neural Sentence Modeling. In _Proceedings of EMNLP_.
* Smith and Esner (2004) Noah A. Smith and Jason Eisner. 2004. Annealing Techniques for Unsupervised Statistical Language Learning. In _Proceedings of ACL_.
* Sonderby et al. (2016) Casper Kaea Sonderby, Tapani Raiko, Lars Maaloe, Soren Kaae Sonderby, and Ole Winther. 2016. Ladder Variational Autoencoders. In _Proceedings of NIPS_.
* Spitkovsky et al. (2013) Valentin I. Spitkovsky, Hiyan Alshawi, and Daniel Jurafsky. 2013. Breaking Out of Local Optima with Count Transforms and Model Recombination: A Study in Grammar Induction. In _Proceedings of EMNLP_.
* Stern et al. (2017) Mitchell Stern, Jacob Andreas, and Dan Klein. 2017. A Minimal Span-Based Neural Constituency Parser. In _Proceedings of ACL_.
* Strubell et al. (2018) Emma Strubell, Patrick Verga, Daniel Andor, David Weiss, and Andrew McCallum. 2018. Linguistically-Informed Self-Attention for Semantic Role Labeling. In _Proceedings of EMNLP_.
* Tai et al. (2015) Kai Sheng Tai, Richard Socher, and Christopher D. Manning. 2015. Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks. In _Proceedings of ACL_.
* Tran and Bisk (2018) Ke Tran and Yonatan Bisk. 2018. Inducing Grammars with and for Neural Machine Translation. In _Proceedings of the 2nd Workshop on Neural Machine Translation and Generation_.
* Trueswell and Gleitzman (2007) John C. Trueswell and Lila R. Gleitzman. 2007. Learning to Parse and its Implications for Language Acquisition. _The Oxford Handbook of Psycholinguistics_.
* Wang and Chang (2016) Wenhui Wang and Baobao Chang. 2016. Graph-based Dependency Parsing with Bidirectional LSTM. In _Proceedings of ACL_.
* Wang et al. (2018) Xinyi Wang, Hieu Pham, Pengcheng Yin, and Graham Neubig. 2018. A Tree-based Decoder for Neural Machine Translation. In _Proceedings of EMNLP_.
* Williams et al. (2018) Adina Williams, Andrew Drozdov, and Samuel R. Bowman. 2018. Do Latent Tree Learning Models Identify Meaningful Structure in Sentences? In _Proceedings of TACL_.
* Williams (1992) Ronald J. Williams. 1992. Simple Statistical Gradient-following Algorithms for Connectionist Reinforcement Learning. _Machine Learning_, 8.
* Wiseman et al. (2018) Sam Wiseman, Stuart M. Shieber, and Alexander M. Rush. 2018. Learning Neural Templates for Text Generation. In _Proceedings of EMNLP_.
* Xue et al. (2005) Naiwen Xue, Fei Xia, Fu dong Chiou, and Marta Palmer. 2005. The Penn Chinese Treebank: Phrase Structure Annotation of a Large Corpus. _Natural Language Engineering_, 11:207-238.
* Yang et al. (2018) Zhilin Yang, Zihang Dai, Ruslan Salakhutdinov, and William W. Cohen. 2018. Breaking the Softmax Bottleneck: A High-Rank RNN Language Model. In _Proceedings of ICLR_.
* Yin and Neubig (2017) Pengcheng Yin and Graham Neubig. 2017. A Syntactic Neural Model for General-Purpose Code Generation. In _Proceedings of ACL_.

 

Pengcheng Yin, Chunting Zhou, Junxian He, and Graham Neubig. 2018. StructVAE: Tree-structured Latent Variable Models for Semi-supervised Semantic Parsing. In _Proceedings of ACL_.
* Yogatama et al. (2017) Dani Yogatama, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Wang Ling. 2017. Learning to Compose Words into Sentences with Reinforcement Learning. In _Proceedings of ICLR_.
* Zhu et al. (2015) Xiaodan Zhu, Parinaz Sobhani, and Hongyu Guo. 2015. Long Short-Term Memory Over Tree Structures. In _Proceedings of ICML_.