
where \(V\)  is \(d \times m\)  output matrix. Despite its success in natural language processing, this architecture, as well as its variants, are unable to recognize complex CFLs. If we were to, however, equip the network with an external memory, then it would be theoretically possible to generally recognize a CFL [1]}, [2]}, [3]}. Hence, we augment the RNN with a stack, which serves as an external persistent memory structure which has only its topmost element readily accessible to the RNN controller. In this case, such an RNN has basic three operations:
1) PUSH: adds elements, 2) POP: removes elements, and 3) NO-OP (NoOP): does nothing.
We want the stack to carry information to the hidden layer of an RNN (acting as the controller). While the original StackRNN does this according to the following equation (biases omitted for clarity):
\(\mathbf {z}_t = f_1(U \mathbf {x}_t + R\mathbf {z}_{t-1})\) 
