Answers.Body: <p>The idea is simple, but it requires some time to develop.</p>
  <p>Assumption: I am assuming in your problem the final model will have seen all possible shapes.</p>
  <p>What your algorithm needs is a convolutional NN to understand each shape by extracting features, but you just need to be very careful with pooling.</p>
  <p>Then what you need is a recurrent NN. In the example you showed (the image of shapes) we have bigrams (sequence of 2) which means we have the first shape as an input and the second shape is a target. In this case normal RNN should work.</p>
  <p>But if you have sequence of many shapes, for example 10 shapes and let's say the final shape, 10th, is the target; And also if the sequence is in the way that 10th shape could be more depend on initial shapes (e.g. 1st or 2nd shape) then what you also need to consider beside RNN is long-short-term-memory (LSTM).</p>
  <p>I cannot think of a simpler solution than this.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-27T03:20:10.950Z
Answers.LastActivityDate: 2020-07-27T03:20:10.950Z
Answers.UserDisplayName: pedrum
Body: <p>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?</p>
  <p>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.</p>
  <p>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.</p>
  <p>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?</p>
  <p><a href="https://i.sstatic.net/hrKO3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hrKO3.png" alt="enter image description here" /></a></p>
  <p><strong>EDIT:</strong> Corrected image and added more context</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-25T13:51:00.397Z
Comments.Text: 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?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-25T13:53:28.037Z
Comments.Text: 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".
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-25T15:50:50.460Z
Comments.Text: 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.
Comments.UserDisplayName: Eind997
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-25T16:13:38.777Z
Comments.Text: 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.
Comments.UserDisplayName: Eind997
Tags: <neural-networks><pattern-recognition>
Title: What kind of neural network can be trained to recognise patterns?
UserDisplayName: Eind997
ThreadText: # What kind of neural network can be trained to recognise patterns?
  
  (Asked by: username_0 on 2020-07-25)
  
  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?
  
  [![enter image description here](https://i.sstatic.net/hrKO3.png)](https://i.sstatic.net/hrKO3.png)
  
  **EDIT:** Corrected image and added more context
  
  **Tags:** neural-networks, pattern-recognition
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_1**: 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".  
  > **username_0**: 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.  
  > **username_0**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-07-27. Score: 1
  
  The idea is simple, but it requires some time to develop.
  
  Assumption: I am assuming in your problem the final model will have seen all possible shapes.
  
  What your algorithm needs is a convolutional NN to understand each shape by extracting features, but you just need to be very careful with pooling.
  
  Then what you need is a recurrent NN. In the example you showed (the image of shapes) we have bigrams (sequence of 2) which means we have the first shape as an input and the second shape is a target. In this case normal RNN should work.
  
  But if you have sequence of many shapes, for example 10 shapes and let's say the final shape, 10th, is the target; And also if the sequence is in the way that 10th shape could be more depend on initial shapes (e.g. 1st or 2nd shape) then what you also need to consider beside RNN is long-short-term-memory (LSTM).
  
  I cannot think of a simpler solution than this.
  
  
  ---
  
  