12.6.1 Processes for Sequences of Events

As discussed in section 11.3 Representing Sequences of Events, environments can be constructed that specify sequences of events. Certain algorithms can learn temporal contingencies between events, so it is important to be able to present the events in the proper sequence. There are two specialized types of schedule processes that handle the presentation of sequences of events to the network, the SequenceEpoch, and the SequenceProcess.

The SequenceEpoch is a version of the epoch process (see section 12.4.3 Iterating over Trials: EpochProcess) which, instead of iterating over individual events, iterates over groups of events. Thus, this process uses the GroupCount() and GetGroup() functions on the environment instead of the event-wise ones (see section 11.1 Environments). Each group of events represents a collection of events that form a sequence. The sequence epoch adds a cur_event_gp field, which contains a pointer to the current event group that is being processed.

The order field on the sequence version of the epoch process now refers to the order of presentation of the groups (sequences) of events, and not the order of individual events within the sequences. Also, the SMALL_BATCH mode of wt_update in the sequence epoch means that the weights are updated after every sequence, not after every batch_n events.

The SequenceProcess is typically created as a child of the SequenceEpoch, and it is the one that iterates over the particular events within a given group or sequence. It obtains the current group of events from its parent sequence epoch process, and iterates over them. It can control the order of presentation of events within the sequence, and has options for initializing the activation state of the network at the start of the sequence:

Counter tick
Each presentation of an event within a sequence is called a "tick", and this member counts the number of ticks that have gone by. The max for this counter is automatically set to be the number of events in the current sequence.
Event* cur_event
This is a pointer to the current event being processed.
Event_MGroup* cur_event_gp
This is a pointer to the current event group (sequence) being processed. It is obtained from the parent SequenceEpoch.
Order order
This determines the order of presentation of the events within a sequence. While sequences are usually presented in SEQUENTIAL order, it is conceivable that one might want PERMUTED or RANDOM orders as well, which are available (these work just like the equivalent in the epoch process, see section 12.4.3 Iterating over Trials: EpochProcess).
StateInit sequence_init
This determines if and how the activation state of the network is initialized at the start of the sequence. DO_NOTHING means that no initialization is done, INIT_STATE means that the InitState function is called, and MODIFY_STATE means that the ModifyState function is called, which allows for algorithm-specific ways of changing state between sequences (e.g. decaying the activations).