A-C. Example responses from 3 dlPFC neurons to sensory input (‘Up’ or ‘Down’) in trials where match strategy was rewarded (match block, left panels), or non-match strategy was rewarded (non-match block, middle panels), and the trial averaged responses over the first 3 blocks of the experiment (right panels). D. The same panels for one MD neuron showing responses selective to match context. E. Quantification of the coding properties using regression to decode task-relevant variables from population activity of either dlPFC or MD. Context could be decoded from either dlPFC or MD (left), but cue was only decodable from dlPFC activity and not MD (right). F. We tested the modulation of MD activity by rule or by cues by taking the correlation between trial-averaged MD activity and a vector representing either the cues (1 for up trials and -1 for down) or rule (1 for match rule or -1 for non-match). To demonstrate the effect of the dynamic Hebbian eligibility trace we tested MD modulation as we varied the eligibility trace time constant (tau). Lower (higher) tau values biased MD to encode sensory cues (rule). G. Comparing mean (± STD) of ratio correct responses for MD intact and MD lesioned models from 20 random instantiations of the models. Experiment had blocks alternating between 90% and 10% match trials as other association levels showed similar patterns. H. Same as in G, but showing the effects of lesioning MD after training with MD intact for a few blocks (lesion marked with red arrow). Statistical testing with t-test over performance means in each block for 20 random runs.