# What kind of neural network can be trained to recognise patterns?

Is there a type of neural network that can be fed patterns to train itself on to complete new patterns that it has not seen before?

What I'm trying to do is train a neural network to transform an image into another image. The image may be slightly different each time (denoted with different lines in the shapes) but a human would get the idea of how the new images should look. I'd like to make a network that can learn how to learn what comes next and then predict the rest of the sequence from the first part of a new sequence.

Taking the picture below as an example. The neural network would be fed the patterns in grey and learn how to predict the next ones in the sequence. Then the user would put the blue shapes into the network and hope to get the green ones out.

Is there a neural network that could perform this type of function of completing a pattern based on only a small number of examples to start the pattern based on the other patterns it has seen?

EDIT: Corrected image and added more context

• If the sequence of symbols or geometrical objects really has a pattern (e.g. after circles we always have squares, or something like that), then the neural network may be able to capture it, but if the sequence of objects is random, how can you predict anything without an error less than 50%? Do you know if the sequence really has patterns that can be recognized?
– nbro
Jul 25, 2020 at 13:51
• Moreover, neural networks typically require a lot of data to learn well, although there are already some approaches that attempt to overcome this issue. Have a look at terms like "one-shot learning", "few-shot learning" or "zero-shot learning".
– nbro
Jul 25, 2020 at 13:53
• Thanks for your response. The shape would always be similar (if there is a round shape there will always be a rectangular shape). I've updated the image as I realised I hadn't drawn it completely correctly. Jul 25, 2020 at 15:50
• What I'm trying to do is train a neural network to transform an image to another image. The image may be slightly different each time (denoted with different lines in the shapes) but a human would get the idea of how the new images should look. I'd like to make a network that can learn how to learn what comes next and then predict the rest of the sequence from the first part of a new sequence. Jul 25, 2020 at 16:13