A. We identified model dlPFC cells that were cue-responsive in one of the two behavioral contexts selectively and cells that were cue-responsive in both contexts non-selectively, using logistic regression. We found the most significant difference between the MD intact and MD lesioned models was an increase in non-selective cells with MD lesioning (Mann-Whitney U test, two-tailed, both contexts p-value 0.003, match-selective p = 0.210, non-match selective p = 0.449). Bars represent means ±SEM B. Schematic shows cartoon of cells that were cue-responsive only in one of the behavioral contexts, and the connections to the appropriate output cell (left). These cells had their weights to the appropriate output neuron increase coherently in the corresponding behavioral context and remain dormant out of context (right). C. In comparison, cells that responded to the same cue in either context showed impaired learning with forgetting of previous learning after each experimental block, as rewarded behavioral responses reversed. We show weight averages from the population of dlPFC cells encoding on of the input cues, as identified by logistic regression, to the appropriate output neuron, with shaded areas representing ±SD.