Discrete Sequence Recall

This sample is a simplified version of Derek D. Monner's Distracted Sequence Recall task, which involves 6 symbols, each represented locally in an input layer of 6 neurons:

  • Targets:   - must be recognized and remembered by the network.
  • Distractors:   - never need to be remembered.
  • Prompts:   - direct the network to give an answer.

A single trial consists of the presentation of a temporal sequence of 10 input symbols. The first 8 consist of 2 randomly chosen target symbols and 6 randomly chosen distractor symbols, all in random order; the remaining two symbols are the two prompts, which direct the network to produce the first and second target in the sequence, in order, regardless of when they occurred. A sample sequence would look like this:

  • Sequence:         

Note that the targets may appear at any point in the sequence, so the network cannot rely on their temporal position; rather, the network must recognize the symbols as targets and preferentially save them, along with temporal order information, in order to produce the correct output sequence.

The network is trained to produce no output ( ) for all symbols except for the prompts, and for each prompt symbol the network must produce the output symbol which corresponds to the appropriate target from the sequence. For the sequence shown above, the prompts should output  , respectively.

The network doesn't have any prior knowledge of which are the target, distractor or prompt symbols, nor what is the length of the sequence, it has to learn all this information during its training process.

In this sample a Long Short Term Memory network (6 input neurons, 7 memory blocks, and 2 output neurons) will be trained to complete the Distracted Sequence Recall task with a success rate of at least 95%.

var LSTM = new Architect.LSTM(6,7,2);
LSTM.trainer.DSR({		
    targets: [2,4],		
    distractors: [3,5],		
    prompts: [0,1],	
    length: 10	
});

Training Network… Sequence:  

input:     output:   


Iterations: {{results.iterations}} - Success Rate: {{(results.success * 100).toFixed(2)}}% - Time: {{results.time}} ms