Note that the reduce-X action pops top two items in the stack that correspond to the two hidden states of h By pushing a newly created tree with the constituent X, its corresponding hidden state h 0 j+1 is pushed to the stack with each remaining hidden state The hidden state of the top stack item h 0 j is a representation of the right antecedent of a newly created binary tree with h 0 j+1 as a root, while the hidden state of the next top stack item h 1 j corresponds to the left antecedent of the binary tree.
the two hidden states capture the recursive neural network-like structure (Costa et al., 2003), while h 2 j = h 1 j+1 represents the RNN-like linear history in the stack.