a Schematics of a context-selective inhibition mechanism when representations can be approximated by linear subspaces. The total stimulus space consists of unrestrained activities along the two subspaces (blue and green, left). In order to map the total stimulus space to the abstract decision space (orange, right) in a contextually correct way with fixed weights, the activity in the irrelevant subspace has to be inhibited (pink, middle). b Schematics of cross inhibition and selective amplification as a map from the context subspace (gray circles) into the total stimulus subspace (black circles): two input neurons innervate two neuron populations that represent activity in the two stimulus subspaces. c Schematics of the network that performs sequential processing for context-gated suppression. Context is represented together with the stimulus modalities in distinct subspaces (black circles) and mutual feedback controls the two subspaces. d Recurrent weight matrix of RNN models; neurons ordered by their modality index defined as input weight difference between visual and auditory stimuli. Colormap rescaled by the largest of absolute minimum or maximum (AU). Neurons ordered separately for “go” and “no go” signals, then averaged, mean of n = 88 models. e Assessment of sequential processing of information in the RNN through iterating the connection matrix. The 2nd to 6th power of the recurrent weight matrix on d is shown, approximating its effect from stimulus onset until decision. Colormap rescaled, units as in (d). f Context sensitivity of neurons against their sensitivity to stimulus modalities in the RNN. Context index is defined as the difference of neural activity between the visual and auditory context; neurons ordered by the modality index, for RNN models, using input weight modality index as in (d, e), mean and s.e.m. over models, n = 88 that have performance >0.9 fraction-correct; Pearson-correlation (r different from 0, two-sided t test P values). Values calculated and neurons ordered separately for “go” and “no go” signals, then averaged. g, h Context sensitivity of neurons against their sensitivity to stimulus modalities in recordings from V1 (n = 8 animals) and ACC (n = 4 animals) of mice, respectively. Recordings in different mice featured different numbers of neurons, with the neuron index set at the midpoint of the number of neurons for display purposes, skipping 6 start and end neuron order positions on each side. Context index was established based on the whole trial. Individual animals (gray), mean over mice (turquoise), linear fit to mean over mice (red). i Correlation between modality rank and context index, at three time intervals (colors, timing shown on top): before stimulus start (“pre”, from −1.00 s to −0.25 s), after stimulus start (“start”, from 0.0 s to 0.75 s) and at the required decision time (“dec”, from 1.75 s to 2.50 s) in ACC.