Machine Learning, Recurrent Neural Network, Multidimensional Rnn, Multidimensional Lstm.
Multidimensional Recurrent Neural Network can be used here. If you google “Multidimensional Recurrent Neural Network”, the first entry would be this paper by Alex Graves, et al. However I want to point out that almost exact same idea is long proposed back in 2003 in the context of protein contact