The model begins to select the subject entity and update the memory states if the subject entity will change.
the model first calculates the probability of selecting an entity: where E t−1 is the set of entities that have already been referred to by time step t, and s is defined as s = max{s : s ≤ t − 1, e = e s }, which indicates the time step when this entity was last mentioned.