  We show that an optimal finite element mesh refinement algorithm for a
prototypical elliptic PDE can be learned by a recurrent neural network with a
fixed number of trainable parameters independent of the desired accuracy and
the input size, i.e., number of elements of the mesh. Moreover, for a general
class of PDEs with solutions which are well-approximated by deep neural
networks, we show that an optimal mesh refinement strategy can be learned by
recurrent neural networks. This includes problems for which no optimal adaptive
strategy is known yet.
