a, To quantify effective recurrence R in a network, we first apply latent factor analysis to identify activity that is putatively driven by shared external input. We then subtract out this ‘shared’ activity and focus on the remaining ‘non-shared’ activity. b, Variance explained by each of the first five latent factors (miss: red, hit: green). c, The variance explained by the first factor (also called ‘across-neuron population-wise correlation’35; Supplementary Methods) is not significantly different between hit and miss trials (two-sided Wilcoxon signed-rank test, P = 0.168). d, For 6.5 s of non-shared pre-trial activity, the cross-neuron correlation matrix is calculated (orange and red stars show the process for a pair of example neurons; gray box highlights that of a single pair; yellow triangle marks the off-diagonal entries that are analyzed further). e, The mean off-diagonal cross-correlation is not significantly different before hit or miss trials (P = 0.37, two-sided Wilcoxon signed-rank test). f, Cross-covariance matrix of the non-shared activity (yellow triangle marks the off-diagonal entries used to compute recurrence). g, Histogram of the cross-covariance matrix; gray arrows indicate the variance of the distribution σCC. h, The relationship between σCC and the effective recurrence R of the local network is known from theoretical derivations (Methods; plotted in black for a network of 50,000 neurons). Data for individual sessions are shown as gold and silver circles (S1 and S2, respectively); straight lines show the average across sessions; and dotted lines show the spread (mean ± s.d.). i, The effective recurrence R before stimulation is significantly different on hit and miss trials, suggesting that lower recurrence facilitates stimulus detection (P = 0.002, two-sided Wilcoxon signed-rank test). j, The average photostimulation response of the targeted cells on either hit or miss trials (excluding trials where 150 targets were stimulated, averaged across sessions in bold and averaged per session in shade). k, The ‘network response timescale’ τpost was determined by fitting an exponential decay function per session. l, The inferred τpost values (yellow circles) were better explained by the linear network theory (gray line, r2 = 0.44) than a simple linear regression (not shown, r2 = 0.38). m, The inferred network response timescale τpost is significantly different on hit and miss trials (P = 0.023, two-sided Wilcoxon signed-rank test). expl., explained.