Temporal pattern determines direction of plasticity as shown by weight-change-triggered-average. (A) For each synapse on each trial, we computed the instantaneous firing rate of its pre-synaptic input activity and grouped synapse-trials into bins based on the size of the synaptic weight change that occurred following a single trial. Then, we averaged across the instantaneous firing rate of each bin. Late and high peak firing rates lead to LTP, while earlier peak firing rate or moderate firing rate leads to LTD. (B) For each synapse on each trial, we computed the calcium concentration for each synapse-trial and averaged across the calcium concentration for each weight change bin. Calcium concentration is higher during the second part of the trial, both for potentiating and depressing synapses.