Independence and coherence in temporal sequence computation across the fronto-parietal network Authors: Hiroto Imamura, Fumiya Imamura, Reiko Hira, Yoshikazu Isomura, Riichiro Hira Published: 2026 ABSTRACT AbstractTime processing requires distributed and coordinated cortical dynamics, yet how multiple brain areas flexibly switch between coherent and independent temporal representations remains unclear. Using mesoscale two-photon calcium imaging, we simultaneously recorded neuronal populations in the secondary motor cortex and posterior parietal cortex of mice performing a novel alternating-interval timing task. Both areas encoded elapsed time through similar high-dimensional sequential activity, and decoding analyses revealed both coherent temporal errors shared across areas and independent errors confined to one area. Communication-subspace analysis showed that temporal information was distributed across multiple low-variance shared dimensions, whereas the dominant shared dimension preferentially encoded behaviour. A twin recurrent neural network model with sparse inter-network coupling and shared high-variance noise reproduced these experimental findings. Perturbation and local Lyapunov exponent analyses further showed that different shared subspaces selectively promote coherent or independent modes. These results reveal how sparse coupling and shared global fluctuations enable robust yet flexible fronto-parietal temporal computation.Subject terms: Cognitive neuroscience, Computational neuroscience, Neural circuits Introduction Temporal information processing underlies a wide spectrum of cognitive functions1–3. Neural representations of time have been widely observed in higher-order cortical areas and subcortical structures such as the basal ganglia and cerebellum4–22. Elapsed time has traditionally been observed as ramp-up or ramp-down patterns of neural activity, while sequential activity, where neurons that peak at intermediate times fire in succession, is also widespread17,21,23. In non-human primates, both ramping activity and sequential firing patterns have been reported in frontal and parietal cortices during interval timing tasks, suggesting that these coding motifs are conserved across species17,24–26. For time processing on the scale of seconds, which is critical for working memory and action planning and preparation, higher-order cortical areas, including the prefrontal cortex, secondary motor cortex (M2), and posterior parietal cortex (PPC), play particularly important roles. Because time-representing areas are thought to be linked functionally, their temporal representations might be globally synchronized1,5,27. Conversely, when each area must track the elapsed time from different events, their activity could become asynchronous. When multiple brain areas share temporal information, it is thought that they must flexibly switch between a coherence mode, in which all regions operate on a shared clock, and an independence mode, in which each region maintains its own local clock. In considering such inter-areal coordination, the communication subspace hypothesis28–30, in which inter-areal interactions are mediated by selective, low-dimensional population activity patterns, provides a compelling framework. For temporal representations, understanding how switching between these two modes is implemented will thus require analyzing how communication subspaces differ across modes. In light of these general considerations, the M2–PPC circuit provides a particularly tractable system. M2 and PPC are reciprocally connected and are known to support various cognitive functions, including working memory and sensory prediction31–36. In working-memory tasks, recurrent cortico-cortical connections between M2 and PPC are essential for maintaining the memory trace31. Interestingly, the dominant component of neural activity shared by M2 and PPC was unrelated to working memory31. The principal dynamics shared by a pair of cortical areas may also be shared across many regions and have been suggested to relate to motor information21,37,38. Anatomically, M2 and PPC exhibit a distinctive organization characterized by sparse long-range excitatory projections and shared inputs from widespread sources33,34,39–41, features that are theoretically well suited for modulating the switch between independence and coherence. Moreover, the two areas are on the dorsal cortical surface of the mouse brain, making them ideally positioned for simultaneous large-field two-photon imaging and direct comparison between experimental data and computational models. Modelling studies using recurrent neural networks (RNNs) have substantially advanced our understanding of how second-scale temporal processing can be implemented by recurrent neural circuits42–47. However, most existing models focus on a single functional circuit and omit key biological constraints, such as shared low-frequency noise and sparse long-range excitation, thereby limiting their correspondence with experimental observations. A biologically grounded multi-RNN framework that incorporates communication subspaces is therefore required to bridge the gap between experimental findings on cortico-cortical communication and theoretical models. Here we combine behaviour, mesoscale imaging, and modelling to uncover how the M2–PPC network balances coherent and independent temporal coding. We therefore hypothesized that this balance arises from the interplay between sparse inter-areal excitation and shared low-frequency global fluctuations. Specifically, we (1) developed a novel alternating-interval task in which 6-s and 12-s intervals appear alternately, (2) simultaneously recorded thousands of neurons in M2 and PPC using a large field-of-view two-photon microscope21,48, and (3) constructed and analysed a twin RNN model using the acquired data to test this hypothesis under controlled circuit constraints. Our results support this two-factor mechanism, showing that sparse inter-areal excitation promotes coherence, whereas shared 1/f-type global fluctuations favour independence. More broadly, these findings suggest that distributed temporal coding across multiple brain areas reflects a trade-off between robustness and flexibility, enabling stable computation while supporting diverse behavioural demands. Results Development of an alternating-interval task M2 and PPC dynamically maintain a representation of continuous time and update their internal states in response to external inputs (Fig. 1a). This capability persists even when successive trials are separated by a long inter-trial interval49. To probe M2 and PPC effectively, we need a temporally continuous task with no distinction between individual trials, such that the animal must continuously generate internal states based on the current state and external input. We designed an alternating-interval task (AI task, Fig. 1b). In this paradigm, a cue and reward are delivered at fixed intervals that alternate between 6-s and 12-s. Consequently, when a cue appears, the animal must maintain its internal state depending on the duration of the preceding wait in order to predict the next interval. For clarity, we define the 6-s interval and the 12-s interval within a continuous 18-s epoch: the 6-s interval starts at trial time 0 s, the 12-s interval begins at 6 s, and the epoch ends at 18 s. Alternating-Interval (AI) task for investigation of fronto-parietal network function. a Hypothetical computational roles of M2 and PPC explored in this study. b Schematic of the alternating-interval task (AI task). c Behavioural changes in a representative mouse (mouse #2) during the AI task. In session 1, even during the 12-s trials the lick rate rose until 6 s and then plateaued. In session 13, during the 12-s trials the lick rate decreased after 6 s before increasing again. By session 54, the lick rate in 12-s trials increased continuously. d Changes in lick rates 5 s (Y, black) and 11 s (X, blue) into 12-s trials from the start of the AI task training (n = 5 mice). e Differences in lick rates the X and Y between early sessions (1–10) and late sessions (20–80). Violin plots show the distribution of lick rates across mice/sessions, with horizontal bars indicating the median and the 25th and 75th percentiles. Lick rates differed significantly between early and late sessions for both X and Y conditions (X: p = 6.8 × 10−4; Y: p = 5.6 × 10−4; two-sided Wilcoxon rank-sum test; n = 5 mice). *p < 0.05, **p < 0.01. Mice learn the AI task Can head-fixed mice learn the AI task? We trained water-restricted mice with head-fixed conditions. During pre-training, the reward interval was fixed at 6 s. Subsequently, the reward intervals were alternated between 6 and 12 s to encourage the mice to predict the upcoming interval from the history of previous intervals. As training progressed in the pre-training (fixed-interval) task, the mice showed predictive licking peaking at 6 s after each reward. Once this anticipatory licking emerged, the task was switched to the AI task. Early in AI task training, the mice still showed anticipatory licking that peaked at 6 s even during 12-s intervals (Fig. 1c; session 3). As training progressed, they began to display anticipatory licking that peaked at 12 s during 12-s intervals (Fig. 1c; sessions 13 and 54). At the same time, during the 6-s intervals they continued to lick predictively with a peak at 6 s. The lick rate at 5 s into the 12-s interval quickly declined and reached a plateau after five sessions, whereas the lick rate at 11 s gradually increased as training advanced (Fig. 1d, e; n = 5 mice). Thus, in the AI task, the mice learned that 6-s and 12-s intervals alternate. Single-neuron activity was similar in M2 and PPC We examined population activity in M2 and PPC using two-photon calcium imaging with a Diesel2p mesoscope after the mice mastered the task (Fig. 2a, b; n = 5 mice). Both M2 and PPC can be captured simultaneously within the FOV of the Diesel2p. We broadly expressed GCaMP in layer 2/3 of M2 and PPC either by local AAV injections (n = 3 mice, Supplementary Fig. 1) or by neonatal intracerebral injections performed on postnatal day 1 (n = 2 mice, Supplementary Fig. 1a, b). We functionally identified sensory areas using one-photon calcium imaging and defined M2 and PPC accordingly (Supplementary Fig. 1f, h). We obtained 1,463 ± 418 neurons in M2 and 815 ± 590 neurons in PPC across six sessions. Two sessions were imaged from the left and right hemispheres of a single mouse (five mice in total). Large field-of-view two-photon calcium imaging during the AI task. a Imaging field capturing M2 and PPC simultaneously. b Eight representative neuronal traces alongside licking behaviour and reward timing. c Trial-averaged activity of simultaneously recorded M2 and PPC neurons; neurons are sorted by peak time in the 6-s interval (upper) and the 12-s interval (lower). d Three representative single-neuron activity patterns. Heatmaps show trial-by-trial activity, and line plots show the mean activity across trials. Shaded areas indicate SEM. e Proportions of neurons whose peak activity reflected absolute time (left) versus relative time (right). Circles indicate mean and bars indicate SEM. Statistical significance was assessed across sessions using a two-sided permutation test with 100,000 random permutations (*p < 0.05; n = 6 sessions; M2: p = 0.03, PPC: p = 0.06). f Diagram of the encoding model (ridge regression). g Proportion of neurons whose activity was significantly explained by the lick-rate or time-window predictors. Data are shown as mean ± SEM. There was no significant difference between M2 and PPC for the lick-rate predictors (p = 0.84, two-sided Wilcoxon rank-sum test, n = 6 sessions) or time-window predictors (p = 0.90, ANOVA, n = 6 sessions, 216 total observations). For each neuron in M2 and PPC, we visualized the mean activity during the 6-s and 12-s intervals sorted by peak time (Fig. 2c). In both intervals, the peak distribution covered the entire duration, exhibiting sequential activity. Among them were neurons active immediately after reward (Fig. 2d, top), neurons whose activity scaled between the 6-s and 12-s intervals (Fig. 2d, middle; temporal-scaling neurons), and neurons that peaked several seconds after reward (Fig. 2d, bottom). Neurons encoding absolute time accounted for 8.03 % in M2 and 8.11 % in PPC, whereas temporal-scaling neurons encoded relative time at 4.83 % in M2 and 5.48 % in PPC. There was no significant difference between M2 and PPC (Absolute time: p = 0.91, Relative time: p = 0.47, permutation test). However, neurons that encoded absolute time were more prevalent in M2, and showed a similar trend in PPC, although this did not reach statistical significance (M2: p = 0.03, PPC: p = 0.06, permutation test; Fig. 2e). To account for the diverse neuronal activities, we constructed an encoding model using a linear model with L2 norm regularization (Ridge regression, Fig. 2f). The explanatory variables were lick rate and elapsed time within each trial. A systematic analysis revealed comparable proportions of neurons related to lick rate and elapsed time in M2 and PPC (Fig. 2g). These results indicate that individual neurons in M2 and PPC exhibit similar task relevance and possess comparable timing representations. Similar sequential dynamics exhibited by population activity in M2 and PPC Next, we investigated temporal representation at the population level. First, to determine how the populations in M2 and PPC displayed sequential dynamics, we compared peak entropy, temporal sparsity, and the sequentiality index between them (Methods, Supplementary Fig. 2a). No significant differences were found between M2 and PPC for any of these metrics. These results suggest that the dynamics in both areas are equally sequential. In populations with sequential dynamics, neurons that share similar temporal preferences may receive common inputs, increasing noise correlations. In M2, we found that neuron pairs whose peaks were close during the 6-s interval had stronger correlations of trial-to-trial fluctuations during the 12-s interval (Supplementary Fig. 2b). Likewise, pairs with nearby peaks during the 12-s interval showed larger correlations of fluctuations during the 6-s interval. The same relationships were observed in PPC (Supplementary Fig. 2c). Moreover, they were also significant for pairs containing one M2 neuron and one PPC neuron (Supplementary Fig. 2d). These findings indicate that neurons with similar temporal preferences in M2 and PPC interact, either synaptically or via common inputs. Both M2 and PPC exhibit high-dimensional representations of time To investigate how neuronal populations in M2 and PPC maintain temporal information, we first visualized their activity with UMAP (Fig. 3a). In both areas, the trajectories formed an 18-s circular loop. We then compared these temporal representations by decoding elapsed time. Because the number of recorded neurons was large, we first restricted the analysis to subspaces rich in temporal information using contrastive principal component analysis (cPCA, see Supplementary Note; Fig. 3b; Supplementary Fig. 3). In cPCA, we prioritized dimensions with high within-trial variance corresponding to the 18-s trial activity, and low between-trial variance reflecting consistency across trials. The trade-off between these variances was governed by the parameter w, which we chose to maximize average decoding accuracy across animals (w=0.60 for M2 and 0.50 for PPC; Supplementary Fig. 3a, b). We decoded time with a random forest classifier. Both regions achieved moderate accuracy (Fig. 3c) without a significant difference between them (Fig. 3d). Decoding accuracy depended on the degree of dimensionality reduction (Fig. 3e), yet the dimensionality yielding peak performance was similar in the two regions (~15–50; Fig. 3f). These results show that M2 and PPC encode time in comparably high-dimensional subspaces, relying on broadly distributed neuronal activity with little difference in representational format. Decoding analysis on the neural data. a Example neural manifold analysis. Population activity of a single session was visualized with cPCA (w = 0.6), followed by 3D projection using UMAP. b Schematic of time decoding analysis. The dimension of the population activity was reduced with cPCA, then the elapsed time within an 18-s segment was decoded. The width of the classification time bin was 1 s. c. Examples of the confusion matrices of M2 and PPC. d Comparison of decoding accuracy between M2 and PPC. Rectangles indicate the mean, and vertical lines indicate SEM. No significant difference was observed between M2 and PPC (p = 0.84, two-sided Wilcoxon signed-rank test, n = 6 sessions). e The decoding accuracies of M2 population, PPC populations, and a mixed population of M2 and PPC were plotted against the dimension of the cPCA. Regardless of the dimensions, the decoding accuracies were similar. f Comparison of the dimensions with the highest decoding accuracy between M2 and PPC (two-sided Wilcoxon signed-rank test, p = 0.25, n = 6 sessions). Rectangles indicate the mean, and vertical lines indicate SEM. g Examples of the decoding results from M2 and PPC population. Black shading indicates the decoded time in both M2 and PPC was correct. Yellow and green bars indicate independent and coherent error, respectively. h Joint distribution of decoding errors relative to actual time in M2 and PPC. The right panel shows the category of errors. i The rate of difference in decoded time when decoded results of both M2 and PPC showed error was plotted. Lines and shaded areas indicate mean +/- SEM. The rate had a significant peak when the offset was 0 (p < 0.001, two-sided bootstrap test with Bonferroni correction, 50,000 bootstrap iterations; N = 192,240 trial-time observations). No bootstrap sample exceeded the observed statistic; therefore, the empirical p value is reported at the finite resolution of the bootstrap procedure. j Comparison of the coherent and independent error rates in each mouse (Wilcoxon signed rank test, p = 0.03, n = 6 sessions). Rectangles indicate the mean, and vertical lines indicate SEM. k Coherent and independent error ratios compared with shuffled controls for each session. Blue circles indicate the observed error ratio for each session. Boxplots show the bootstrap distribution obtained from shuffled data. In each boxplot, the central line indicates the median, the box edges indicate the 25th and 75th percentiles, and whiskers extend to the most extreme values within 1.5 times the interquartile range. Black crosses indicate bootstrap samples outside the whisker range. Both coherent and independent error ratios were significantly greater than shuffled controls in each session (p < 0.001 for all sessions, two-sided bootstrap test with Bonferroni correction, 50,000 bootstrap iterations; observations per session: 34,560, 28,080, 31,140, 48,240, 29,160, and 21,060). No bootstrap sample exceeded the observed statistic for all sessions; therefore, the empirical p-values are reported at the finite resolution of the bootstrap procedure. If M2 and PPC encoded time independently, mixing neurons from the two regions should improve decoding performance50. We therefore sampled equal numbers of neurons from M2 and PPC, applied dimensionality reduction, and decoded time. Mixing neurons did not surpass the performance of M2 or PPC alone (Fig. 3e, black line), suggesting that the temporal representations in the two areas are not independent but mutually related. Two types of errors in the temporal representations of M2 and PPC To assess cooperative computation across the fronto-parietal network, we next asked whether decoding errors arose independently or in a coordinated manner. Example trials are shown in Fig. 3g: in some cases, one area decoded correctly while the other erred (yellow), whereas in other cases, both areas mis-decoded by the same amount (green). We refer to these as independent and coherent errors, respectively. The joint distribution of decoding errors displayed a cross and a diagonal band (Fig. 3h): the cross reflecting independent errors in which either M2 or PPC preserved the correct elapsed time, and the diagonal indicating coherent errors in which both areas deviated by the same interval. Quantifying trials in which both areas erred revealed a significant over-representation of cases where their timing errors differed by less than 1 s (Fig. 3i). Across sessions, independent errors were consistently more frequent than coherent errors (Fig. 3j; Wilcoxon signed-rank test, p = 0.03). Remarkably, the incidence of each error type varied little across animals (independent errors, 0.38 ± 0.013; coherent errors, 0.17 ± 0.010), yielding a ratio of 2.2 ± 0.14. In every animal, both error types occurred at rates significantly higher than those in shuffled data (Fig. 3k). These findings indicate that while M2 and PPC generally maintain coherent temporal coding, they can also operate independently, and the balance between coherence and independence is tightly conserved across animals. CARP revealed the information carried by the shared subspaces The coexistence of coherent and independent decoding errors suggests that M2 and PPC are neither perfectly synchronized nor fully autonomous, raising the question of which shared population dynamics support coordination of time across areas. Building on the communication-subspace hypothesis, we predicted that temporal coordination is mediated by distributed, low-variance shared components. To test this, we applied canonical-correlation analysis (CCA) to the simultaneously recorded population activities. CCA linearly transforms each population into an N-dimensional time series so that corresponding dimensions are maximally correlated (Supplementary Fig. 4). To determine what information each shared dynamic encodes, we developed Canonical-component Ablation–based Representation Probing (CARP; Fig. 4a). CARP first establishes a baseline by applying CCA and decoding either elapsed time or lick rate from the full canonical components. Then, the N-th component is removed before decoding, and the new decoding accuracy is subtracted from the baseline; this difference quantifies the contribution of that component. Applying CARP to time decoding and lick-rate decoding revealed a striking dissociation. Time information did not depend most on the first (maximally shared) component but peaked at the fifth, whereas lick rate was encoded predominantly in the first (Fig. 4b, c). Moreover, temporal information was supported by nearly equal contributions from components up to about the sixth component, indicating a broadly distributed, high-dimensional code. By contrast, lick rate relied mainly on the first two components, implying a low-dimensional representation. Thus, the primary information that M2 and PPC share is dominated by behavioural signals, while temporal information is embedded more diffusely. We conclude that coordination of temporal representations across the fronto-parietal network is constrained by shared behavioural signals and is achieved through correspondences among high-dimensional, distributed population codes. To confirm that these results do not depend on the specific choice of dimensionality reduction method, we verified that qualitatively similar results were obtained using PLS (Partial Least Squares) in place of CCA (PARP, PLS-component ablation-based representational probing; Fig. 4d, e; Supplementary Fig. 4d–g). In addition, we confirmed that the CARP results for time were not driven by neural activity related to lick rate by performing CARP on residual activity after regressing out lick rate (Fig. 4f). Shared M2–PPC dynamics encode time and behaviour. a Schematic of CARP (Canonical-component Ablation–based Representation Probing). Common dynamics between M2 and PPC were extracted with CCA (red). The contribution of each component was assessed by deleting it from the full M2 activity and quantifying the resulting reduction in decoding accuracy. CARP results for decoding elapsed time (b) and lick rate (c). Bars denote components whose contribution was significantly larger than data obtained with random vectors (two-sided Wilcoxon rank-sum test, p < 0.05, n = 12 session–region pairs, no correction for multiple comparisons). “Random vector” indicates the synthetic data obtained with random vectors. d, e The same analyses as in (b, c) were performed, replacing CCA with canonical PLS (Partial Least Squares regression), referred to as PARP (PLS-component Ablation-based Representation Probing). The statistical procedures were identical to those used in (b), c, f The analysis in (b) was repeated using residual neural activity obtained after linear regression with lick rate. The statistical procedures were identical to those used in (b). g For each CCA component (1-9), the absolute difference between M2 and PPC scores was plotted against the absolute difference in the times decoded from the two areas. Vertical bars indicate SEM, and solid lines indicate the best-fit lines. Two-sided Spearman’s rank correlation test (n = 192,240 points) was performed for each component. Exact p-values for components 1–9 were: 9.23 × 10⁻⁴, 4.82 × 10⁻², 4.38 × 10⁻³, 7.39 × 10⁻⁴, 2.93 × 10⁻⁹, 9.22 × 10⁻⁴, 9.85 × 10⁻³, 4.31 × 10⁻⁸, and 7.98 × 10⁻³, respectively. *p < 0.05, **p < 0.01. Relationship between temporal coherence and corticocortical communication To examine how corticocortical communication of each CCA component relates to the coherence of temporal representations, we compared the difference between canonical scores of M2 and PPC with the difference between their decoded times. Time bins in which the temporal estimates were more similar showed correspondingly smaller differences in canonical scores, and this relationship persisted up to the 9th component (Fig. 4g). These results qualitatively mirror the findings with CARP and strongly support the view that coherence of temporal coding across M2 and PPC is sustained by distributed, multidimensional shared dynamics between the two areas. Twin-RNN model emulating the dynamics of M2 and PPC Analysis of the experimental data revealed two distinctive features of the fronto-parietal system. First, the two circuits maintain an intermediate balance between coherence and independence in their temporal codes: they neither move in perfect synchrony nor function as fully autonomous timers. Because the task demands no specific neural activity or overt behaviour, this emergent balance is likely an intrinsic property of the cortex. Second, M2 and PPC share behavioural information primarily along high-variance population dimensions, whereas shared temporal information is dispersed across many lower-variance dimensions. Together, these observations raise a central mechanistic question: how can a single circuit architecture simultaneously support a stable balance between coherence and independence while segregating behavioural and temporal information across distinct population subspaces? The circuit mechanisms that support these dual properties and their mutual relationship remain unclear. To address this issue, we constructed a computational model in which each area is represented by an RNN (Fig. 5a), a framework well-suited for probing continuous-time neural dynamics. The twin-RNN model comprises two networks, RNN-A and RNN-B, each containing 80 % excitatory and 20 % inhibitory units. The two networks are sparsely interconnected, with each synapse present at probability p = 0.001 (see Methods). Twin-RNN model recapitulates key fronto-parietal dynamics. a Schematic of the twin-RNN architecture. Each network (RNN-A, RNN-B) comprises 80% excitatory and 20% inhibitory units. Inter RNN projections are excitatory only. b Power-spectral analysis of the first canonical component of the experimental data (left) and lick rate (right). The prominent 1/f component motivated the injection of shared 1/f noise into the model. Lick rate showed a similar power-law statistics. # and † denotes peak at 6 s and18 s, respectively. c Trial-averaged activity of the trained twin-RNN units, sorted by peak time across the 18-s interval. d Representative task-related unit responses that emerged after training. Heatmaps show trial-by-trial activity, and line plots show the mean activity across trials. Shaded areas indicate SEM. Learned synaptic weights plotted against the temporal offset between the peak firing time (firing fields) of pre- and postsynaptic units, shown separately for excitatory (e) and inhibitory (f) presynaptic neurons. Black horizontal bars indicate temporal-offset ranges in which connection weights differed significantly from the shuffled distribution (**p < 0.01, two-sided permutation test with 1000 random permutations of connection weights). g Inter-RNN connection weights plotted against the temporal offset between the firing fields of pre- and postsynaptic units. The line plot indicates the mean, and shaded areas indicate SEM. Black horizontal bars indicate temporal-offset ranges in which connection weights differed significantly from the shuffled distribution (**p < 0.01, two-sided permutation test with 1000 random permutations of connection weights). h LLE along the input-vector direction over the course of learning. The line plot indicates the mean, and shaded areas indicate SEM across n = 20 RNNs from 10 independently trained twin-RNN models. (r = 0.49, ***p = 1.7 × 10⁻7, two-sided Pearson’s correlation test). i. LLE along the two 1/f-noise vectors over the course of learning. The line plots indicate the mean, and shaded areas indicate SEM across n = 20 RNNs from 10 independently trained twin-RNN models. (1/f noise 1: r = −0.59, ***p = 2.6 × 10⁻4, 1/f noise 2: r = −0.22, *p = 0.026, two-sided Pearson’s correlation test). j Absolute value of cosine similarity between the two 1/f-noise vectors and the readout vector over the course of learning. Line plot indicates the mean, and shaded areas indicate SEM across n = 20 RNNs from 10 independently trained twin-RNN models. (r = −0.11, p = 1.5 × 10⁻9, two-sided Pearson’s correlation test). k Two examples of unit responses (bottom) and corresponding decoder outputs (top) following a transient perturbation to the RNNs. RNN units were sorted by the peak timing of trial-averaged activity. l Joint distribution of decoded-time offsets produced by RNN-A and RNN-B. m The rate of difference in decoded time when both RNN-A and RNN-B showed error was plotted. The line plot indicates the mean, and shaded areas indicate SEM. The distribution showed a significant peak at an offset of 0 (Bonferroni-corrected p = 3.6 × 10⁻⁴, bootstrap test with 50,000 random iterations; N = 283,769 observations). ** p < 0.001. n Using the default connection probability of pc = 10−3 as the baseline, we plotted the relative decoded time differences of RNN-A and RNN-B as a function of pc. Dots indicate the mean, and vertical lines indicate SEM across 10 independently trained models per connection probability. o CARP analysis on temporal information up to 20 canonical components. The line plot indicates the mean, and shaded areas indicate SEM. Horizontal bars denote components with a significant contribution to decoding accuracy, assessed by a one-sided Wilcoxon signed-rank test against zero without multiple-comparison correction (n = 20 RNN-region pairs). Significant components were component 3 (p = 3.90 × 10⁻⁴), component 6 (p = 4.17 × 10⁻⁴), component 7 (p = 0.0114), component 8 (p = 0.0430), component 10 (p = 4.19 × 10⁻⁴), component 15 (p = 0.0310), and component 16 (p = 0.0337). p CARP analysis on the shared noise of up to 20 CCA components. The first two components showed significant positive contributions, assessed using a one-sided Wilcoxon signed-rank test against zero without multiple-comparison correction across n = 20 RNNs from 10 independently trained twin-RNN models (component 1: p = 4.04 × 10⁻⁵; component 2: p = 4.00 × 10⁻⁵). To capture the shared, behaviour-linked fluctuations in M2 and PPC, we focused on the statistical properties of spontaneous mouse movements and neural activity. It has been shown that behaviours, including licking, and neural activity follow scale-free statistics. Consistent with this, a spectral analysis of both lick rate and the first canonical score of neural activity displayed a power-law profile (Fig.5b). In particular, because the latter exhibited a power spectrum that decayed proportionally to the inverse of frequency (1/f), we injected rank-2 1/f noise (pink noise) into both RNNs through random weight matrices. Although this noise is low-dimensional, it has large variance, and because identical noise components are linearly transformed and delivered to both networks, it results in a strong shared noise component between them. Thus, the behaviour-related shared fluctuations observed in the experimental data were successfully incorporated into the model. To reproduce in the twin-RNN model the behavioural capabilities observed in vivo, we trained the network to report both absolute and relative elapsed time in an alternating-interval (AI) task. After learning, RNN-A and RNN-B performed the task with high accuracy, confirming that the imposed synaptic architecture can support precise temporal computations. Inspection of single-unit activity revealed a rich repertoire of temporal response patterns. Alongside neurons whose profiles closely resembled the neurons identified experimentally, many additional motifs emerged (Fig. 5c, d; Supplementary Fig. 5a). At the population level we quantified sequential organization using the sequentiality index and found that the model driven by the shared 1/f noise reproduced experimental values more faithfully than an otherwise identical model lacking this noise source (Supplementary Fig. 2a). In addition, we investigated which properties of the noise input to the RNN model influence learning performance (Supplementary Fig. 5b). White noise and Brownian noise (1/f² noise) resulted in learning performance comparable to that obtained with 1/f noise. In contrast, when 1/f noise was provided independently to the two RNNs, learning efficiency was markedly reduced. Learning efficiency decreased as the amplitude of the 1/f noise increased and as its rank increased. The values we selected as default parameters led to slightly lower learning efficiency than conditions with smaller noise amplitude and lower rank, but the effect was modest. Taken together, these results demonstrate that the twin-RNN receiving common 1/f fluctuations can not only master the AI task but also recapitulate the key dynamical signatures of M2 and PPC. Synaptic organization of learned twin-RNN To understand what properties of the network made it possible to reproduce the dynamics, we first analysed the synaptic matrix after training. Among excitatory neurons, connection strength increased monotonically as the temporal distance between the pre- and postsynaptic firing fields decreased (Fig. 5e). In contrast, inhibitory connections became less negative when firing fields were nearby, indicating weaker inhibition between neurons that are active at similar times (Fig. 5f). These patterns imply that the slow population drift underlying the temporal code is generated by local excitation among neurons with similar firing times and by inhibition that preferentially suppresses units with dissimilar firing fields. Importantly, the same relationship held for the sparse inter-areal projections: the closer the firing fields of two neurons, the stronger their cross-area excitatory weight (Fig. 5g). This organization mirrors the structure inferred from the experimental data (Supplementary Fig. 2b–d). Next, we investigated how learning reshaped the network’s responses to its inputs and to the shared 1/f noise. We quantified these changes by measuring how quickly the network returned to its attractor after being perturbed in specific directions, using the local Lyapunov exponent (LLE) (see Supplementary note). The LLE evaluates the exponent λ that governs whether an error introduced along a given direction grows or shrinks exponentially: λ > 0 denotes exponential divergence, whereas λ < 0 denotes exponential decay. Thus, λ provides a direct measure of expansion or convergence speed. In practice, λ was estimated by applying a small, direction-specific perturbation to the network state and fitting the initial log-linear change in perturbation magnitude over time. During training, the LLE along the input vector increased toward zero (Fig. 5h), while the LLE along the noise vector decreased (Fig. 5i). These trends show that the network learned to preserve the influence of inputs yet rapidly dampen the influence of noise. Consistently, the absolute value cosine similarity between the readout vector and the common 1/f-noise vector declined over training (Fig. 5j), showing that the network’s output became progressively orthogonal to the noise dimension and therefore more noise-resistant. Thus, training the twin-RNN induced at least four coordinated changes: synaptic weights organized neurons into temporally ordered firing sequences, the network learns to retain input information, noise was actively cancelled, and the readouts became orthogonal to the noise. Sparse inter-RNN connections and common 1/f noise reproduce experimental data Next, we asked whether the twin-RNN reproduces the balance of independent and coherent errors observed in M2 and PPC. To test this, we injected brief perturbations to induce decoding errors (Fig. 5k). The model generated both independent and coherent errors: the joint distribution of decoded-time offsets from RNN-A and RNN-B contained a prominent cross (independent errors) and a diagonal ridge (coherent errors), exactly as in vivo (Fig. 5l, m). Thus, with a connection probability of p = 0.001, the twin-RNN retains, like the biological circuit, a simultaneous capacity for independence and consistency. We also confirmed that the decoding consistency increased with connection probability (Fig. 5n). Next, we examined the shared network dynamics using CARP. Time decoding depended little on the first two canonical components and was instead supported broadly across higher components, confirming a high-dimensional, distributed code (Fig. 5o). By contrast, CARP with 1/f noise revealed that the common noise input was almost entirely included in the first and second components (Fig. 5p). Thus, the twin-RNN model faithfully captured the characteristic shared dynamics between M2 and PPC (Fig. 4b, c). These results show that even when the largest shared dimensions are dominated by common noise input that is irrelevant to the task, the two sparsely connected networks can align their high-dimensional temporal codes through the structured corticocortical synapses. Connection probability and perturbation direction determine inter-RNN coherence To dissect how coherent and independent errors arise, we examined two factors: the inter-areal connection probability (pc) and the direction of external perturbations applied to the twin-RNN. We first analysed two extreme cases. When inter-areal coupling was absent (pc = 0), perturbations produced almost exclusively independent errors; conversely, with all possible cross-area synapses present (pc = 1), coherent errors predominated (Fig. 6a), indicating that cross-area excitation promotes coordination. Varying pc over 10⁻⁵–10⁻¹ showed that the rates of both error types decreased monotonically as coupling strengthened (Fig. 6b), yet their ratio (independent / coherent) declined steadily. Thus, inter-RNN coupling contributes chiefly by suppressing independent errors, thereby biasing the network toward coherent errors. These results imply that the consistency between M2 and PPC can be preserved by sparse corticocortical connections. At the same time, those connections stabilize the system as a whole and lower the overall error rate by making the temporal representation more robust. Coupling strength and perturbation axis jointly shape error independence and coherence in twin RNN. a Joint distribution of instantaneous scalar errors in RNN-A and RNN-B when the inter-network connection probability is 0 (left) and 1 (right). b Fraction of independent errors (left), coherent errors (middle), and ratio of independent to coherent errors (right) as a function of the inter-network connection probability, p. Line plot indicates the mean, and shaded areas indicate SEM across n = 10 independently trained twin-RNN models. c Joint error distributions when a brief perturbation is applied to the 2nd canonical component (left) or the 10th component (right) of the shared state space. d. Fraction of independent errors (left), coherent errors (middle), and ratio of independent to coherent errors (right) as a function of the perturbed canonical component index. The line plot indicates the mean, and the shaded areas indicate SEM across n = 10 independently trained twin-RNN models. e. Heatmap of the ratio in three variables in b and d plotted over the two-dimensional parameter space defined by connection probability (p, y-axis) and proportion of the first and second canonical component (x-axis) within the perturbation noise. f Schematic of the DLIC analysis. The independent LLE λindep quantifies the speed at which each RNN returns to its own attractor after a perturbation, whereas the coherent LLE λcoh measures the speed at which the two networks converge toward the corresponding states. g Time course of the canonical score difference between RNN-A and RNN-B after a displacement along each canonical component. Each line represents the result of perturbation along a specific canonical component. Displacements are normalized to be 1 at time 0. h. λindep (left), λcoh (middle) and their difference Δλ=λcoh−λindep¯ (right) plotted as functions of the perturbed canonical component. Line plots indicate the mean, and shaded areas indicate SEM across n = 10 independently trained twin-RNN models. i Training-induced changes in the local Lyapunov exponent (LLE) measured along the top 10 canonical components. j Difference between approximate Δλ, −viTSaui+uiTSbvi at epoch 1 and epoch 8000, shown for canonical components n = 1–40. Line plot indicates the mean, and shaded areas indicate SEM. Negative values denote a decrease over training, positive values an increase through training. Components1 and 2 exhibited significantly larger increments than the remaining components (p = 4.9 × 10−3, two-sided Wilcoxon rank-sum test). Next, to investigate the effect of the direction of external perturbations applied to the twin-RNN, we delivered brief perturbations aligned with individual canonical components of the shared state space, with pc reset to the default 0.001 (Fig. 6c, d). Perturbation along the first two canonical components, dominated by common 1/f noise, favoured independent errors. In contrast, perturbations along canonical components 3–10, which carry the distributed temporal code, mainly induced coherent errors. These results show that error generation is strongly structured by perturbation direction: displacements along the shared temporal manifold yield coordinated shifts in both RNNs, whereas displacements along noise-dominated axes decouple their states. In the experimental data, the ratio of independent to coherent errors was remarkably stable across animals (~2). To identify the conditions that meet these experimental results, we mapped the error-type ratio across the two-variable space defined by pc (10⁻5–10⁻²) and the proportion of the first 2 canonical components within perturbation noise (Fig. 6e). The target ratio of 2 emerged over a limited parameter space (dashed line in Fig. 6eright), demonstrating that the experimentally observed balance can be achieved by jointly tuning fronto-parietal connectivity and the directionality of perturbations rather than by connectivity alone. Together, these findings suggest that cortical circuits tune corticocortical projection patterns and the directions of externally driven perturbations to maintain the flexibility to switch the computational modes. DLIC reveals how perturbations along the common-noise axes preferentially induce independent errors To understand why perturbation along the highly shared-noise subspace gives rise to independent, rather than coherent, timing errors, we quantified two variables: stability of the attractor of each RNN, and speed of re-synchronization of RNNs. First, for each network, we computed the LLE along each canonical component (λindep, Fig. 6f, g). −λindep quantifies how rapidly each RNN returns to (or leaves from) its attractor along a specific canonical component. The faster each network individually returns to its own attractor, the more likely it is to remain in the independent mode. All components exhibited negative λindep values (Fig. 6h), confirming that the system is ultimately stable in every direction. Notably, the first two CCA dimensions, dominated by the common 1/f noise, showed the most negative λindep values, indicating the fastest local convergence, whereas the time-coding dimensions converged more slowly. During the learning process, λindep decreased selectively in the first two components (Fig. 6i). These findings are consistent with the idea that the network during training learned to compensate for the activity changes along the noisy dimension while it learned to maintain the temporal information. We next measured the LLE of the difference between their CCA projections (λcoh, Fig. 6f). −λcoh quantifies how rapidly the twin-RNN re-synchronizes (or de-synchronizes) after perturbation. The faster the re-synchronization, the more likely the system is to enter the coherent mode. Again, all components exhibited negative λcoh values, confirming that the two RNNs ultimately converge (Fig. 6h). The noise-dominated dimensions, the first two CCA dimensions, displayed the fastest re-synchronization, whereas the time-related dimensions were slower. The large negative values of λcoh observed in the first two canonical components could arise either because two systems truly converge towards each other or simply because both collapse rapidly along the canonical components, thereby making their difference collapse quickly. To properly evaluate the synchrony between the systems, we calculated a Dual LLE-based Independence vs Coherence (DLIC) index, defined asΔλ=λcoh−λindep¯, where the upper bar denotes mean of RNN A and B. This index quantifies the convergence rate between the two systems relative to their individual convergence rates. By subtracting the mean self-convergence rate, the DLIC controls for trivial collapse shared by both networks and isolates the additional convergence specifically attributable to inter-system synchrony. A large DLIC favours independence, whereas a small value favours coherence. The DLIC indices of the first and second components were larger than those of time-coding dimensions (Fig. 6h). These results indicate that perturbations along the time-related axes quickly restore coherence between the two networks, whereas perturbations along the common-noise axes often let each RNN stabilize in its own attractor before re-synchronizing. DLIC is governed by sparse corticocortical connectivity and perturbation direction We analytically solved DLIC (see Supplementary Note) and found that the index is determined by the alignment between inter-network connections and the perturbation directions applied to the two regions: strong alignment reduces the DLIC value, whereas weak or opposite (anti-parallel) alignment increases it. During training, the twin RNN gradually adjusted its inter-network weights such that their alignment with the first or second canonical component, the common-noise axes, declined progressively compared to other components (Fig. 6j). This suggests that the two RNNs learned to mutually suppress the influence of time-independent common noise. By contrast, for the time-coding dimensions (components 3 to 10), alignment changed little during training, which resulted in small DLIC values. These results replicated numerical observations. Thus, cortical computational modes are shaped by the consistency between perturbation directions and cortico-cortical connectivity, and the network learns to organize this consistency so that specific perturbations reliably induce specific computational modes. Discussion In this study, we developed a novel alternating-interval (AI) task that prompts the agent to update its internal state continuously while responding to external cues, and applied it to both behaving mice and RNNs. Using a Diesel2p mesoscope, we simultaneously imaged thousands of neurons in M2 and PPC at single-neuron resolution. The experiments revealed two key features. First, temporal codes in M2 and PPC can flexibly shift between coherent and independent modes. Second, their shared population dynamics are stratified: time information occupies a low-variance, high-dimensional subspace, whereas behavioural signals reside in a high-variance, low-dimensional subspace. To test whether these properties arise from minimal circuit ingredients, we built a twin-RNN model containing only sparse inter-network excitatory coupling (p = 10⁻³) and a common 1/f noise input. The model reproduced the experimental ratio of independent-to-coherent errors (2: 1) and mirrored the same separation between temporal and behavioural subspaces. Further analysis showed how the network switches between computational modes. Taken together, our results suggest that sparse long-range connectivity, combined with large-scale shared noise, jointly governs the balance between independence and coherence in the fronto-parietal system. To quantify the dynamics underlying different modes, we introduced a DLIC index, Δλ, by comparing (i) −λindep, the speed with which each area relaxes to its own attractor, and (ii) −λcoh, the speed with which the two networks return to the same states. Along the first two canonical components dominated by shared 1/ f noise, Δλ (λcoh − λindep) was close to zero. As a result, a perturbation allows each network to settle into its own attractor before the pair re‑synchronizes. In contrast, along the time-coding axes (component 3–10) DLIC was negative, meaning the networks first realign their phases and only then stabilize, leading primarily to coherent errors. Thus, the global-noise axes act as “a source of independence,” whereas the sparse long-range excitatory projections serve as “sources of synchrony.” The experimental data suggest that these two influences are delicately balanced. Analysis based on the DLIC therefore, offers a unified explanation of how local stability and corticocortical synchronization jointly generate both coordinated and autonomous temporal representations. Furthermore, our analytic solution of the DLIC revealed that Δλ mirrors the degree of alignment between inter-network connections and the perturbation directions, and that changes in these connections during learning shape the structure of Δλ. This framework is consistent with theoretical proposals that leverage controlled chaos to reconcile stability with diversity in temporal patterns2,51, and it underscores the importance of multi-scale dynamical stability in achieving the coexistence of robustness and flexibility in biological time perception. This study uncovered a functional role for the broadly shared, area-nonspecific cortical dynamics that have been observed across the neocortex recently21,38,52. Because such non-selective, behaviour-related activity may originate in the thalamus53, the largest shared component we detected is likely driven not by cortico-cortical projections but by a common thalamic input. The thalamus, in turn, receives modulatory signals from the basal ganglia, cerebellum, and superior colliculus as well as sensory afferents54,55, allowing subcortical circuits to dynamically adjust thalamic drive and thereby switch global cortical operating modes. In particular, matrix-type thalamic neurons with diffuse cortical projections may preferentially contribute to the area-nonspecific shared component. In parallel, corticocortical functional connectivity can be dynamically modified by neuromodulators56. Neuromodulators acting on specific cortical layers or interneuron classes could bias the network toward either coherent or autonomous regimes. Thus, by modulating the weight of common thalamic inputs or altering neuromodulator levels, the brain could accelerate area-specific processing or promote robust, coherent processing across areas. Notably, amplifying shared noise is predicted to strengthen cortico-cortical correlations while paradoxically making information processing within each cortical area more autonomous. This leads to a testable hypothesis: boosting non-specific input or appropriately altering neuromodulators should increase inter-areal correlations, while simultaneously enhancing local computational independence. These predictions could be directly tested by selectively manipulating higher-order thalamic nuclei or neuromodulatory systems while measuring inter-areal correlations. The temporal coding mechanism uncovered here offers an instructive contrast to the continuous attractors that support spatial representations around the hippocampus. In the MEC, multiple grid modules normally maintain a coherent place code, though they can transiently decouple when the animal first encounters a novel environment57,58. Because a spatial map must remain anchored to an absolute reference frame unless the surroundings change abruptly, coherence is favoured and strong inter-module coupling restricts the system’s degrees of freedom. Time, by contrast, lacks a natural zero point; ecologically, the brain must flexibly track the elapsed intervals from many different events. Consistent with this need for autonomy, independent errors were common in our experiments, and our modelling suggests that such independence is promoted by sparse long-range connections together with large shared noise. Nevertheless, spatial and temporal systems can be unified within a single scheme that comprises three elements: redundant copies of a continuous attractor, adjustable coupling among the copies, and substantial shared noise—any of which can lock or unlock relationships across brain areas. The analysis methods, CARP and DLIC, therefore provide a general dynamical lens that spans both spatial and temporal coding. Comparing space and time within this framework, particularly by leveraging more naturalistic paradigms such as virtual reality environments, should advance a system-level understanding of brain-wide computation. Although M2 and PPC showed highly similar temporal coding metrics and comparable nonlinear decoding performance, the present analysis does not determine whether elapsed time is represented in exactly the same population format in the two areas. Future work that directly compares the geometry of temporal population codes across areas will be necessary to clarify how M2 and PPC interact to coordinate shared and independent temporal estimates. Finally, our modeling and analysis establish a minimal and general framework for understanding how cooperation and independence can coexist in distributed neural systems. Building on the DLIC framework discussed in detail above, we provide a principled dynamical account of how local stability and inter-network synchronization are balanced within coupled recurrent circuits, and show that sparse long-range interactions together with broadly shared fluctuations are sufficient to reproduce the experimentally observed structure of temporal errors and population subspaces. Importantly, this framework does not rely on task-specific inputs or finely tuned connectivity, but instead captures a generic mechanism by which recurrent networks can autonomously generate rich temporal dynamics while remaining flexibly coupled. More broadly, the combination of CARP and DLIC offers a scalable analytical lens for dissecting multi-area population dynamics, providing a foundation for future analyses of large-scale neural recordings across distributed cortical systems. Methods Animal All experiments were approved by the Animal Research Ethics Committee of the Institutional Animal Care and Use Committee of the Institute of Science, Tokyo (A2024-060C2) and were carried out in accordance with the Fundamental Guidelines for Proper Conduct of Animal Experiment and Related Activities in Academic Research Institutions (Ministry of Education, Culture, Sports, Science and Technology of Japan). A female C57BL/6Jcl mouse and two female and two male Ai162 (TIT2L-GC6s-ICL-tTA2)59 mice were used. Including the Ai162 mice, all animals were used for imaging experiments after AAV-mediated expression of GCaMP8s, and GCaMP6s was not expressed in any of the mice. These mice were kept under an inverted light schedule (lights off at 12 AM; lights on at 12 PM) in their home cages to adapt to experimental surroundings. The names and sexes of the mice used for two-photon imaging are as follows: mouse #1: GC008, female; mouse #2: WT161, female; mouse #3: GCPI012, male; mouse #4: GCPI010, female; and mouse #5: GCPI009, male. Neonatal AAV injection The injection pipette was fabricated from 10-mm-long borosilicate glass capillaries (outer diameter = 1.00 mm, inner diameter = 0.75 mm; no filament, B100-75-10, Sutter Instrument). Capillaries were pulled on a micropipette puller (P-97, Sutter Instrument) to yield tips with an outer diameter of ~50 µm and an inner diameter of ~30 µm. The pulled pipette was connected to silicone tubing, which in turn was attached to a 10-µl microliter syringe (801 RN, Hamilton Company). Viral injections were carried out on postnatal day 1 in three pups. Each pup was anaesthetized by hypothermia on an ice bed and secured in a custom neonatal head holder designed by Mr. Ooishi (Narishige). The holder’s arms were set at a 20° incline, gently grasped the neck 7–9 mm apart, and rotated the head ~40° from the midline to improve access to the injection site. A pulled glass micropipette was advanced perpendicularly through the skull and then lowered 250–300 µm. A total of 4 µl of AAV-DJ-syn-jGCaMP8s (1.16 × 1013 GC/ml) was delivered at 4 µl/min with a syringe pump (Legato 100; KD Scientific). Both hemispheres were injected in two mice, and only the right hemisphere in one mouse. Pups were placed in a heated recovery chamber and returned to the dam once normal activity resumed. The entire procedure required <10 min per pup. Local injection of AAV For two mice, 0.2 µl of AAV9-syn-jGCaMP8s-WPRE (1.25 × 1013 GC/ml) was pressure-injected into bilateral M2 and PPC at a depth of 500 µm from the pia, using a syringe pump (Legato 100; KD Scientific) set to 0.02 µl/min. Injections were delivered through borosilicate glass capillaries without filament (B100-75-10; Sutter Instrument), identical to those used for the neonatal AAV injections. Capillaries were pulled on a micropipette puller (P-97; Sutter Instrument) and the tips were bevelled to 45° with a Narishige grinder, yielding a tip outer diameter of ~40 µm and inner diameter of ~30 µm. At an early stage of this study, we attempted to use double-transgenic mice generated by crossing Ai162 and Vglut1-Cre lines. However, we later found that the double-transgenic mice showed poor task performance and therefore discontinued their use. We therefore expressed GCaMP8s by AAV injection in Ai162 mice, without activating the Ai162 transgene-encoded GCaMP6s. This design allowed us to use the same calcium indicator, GCaMP8s, across animals and avoided a direct comparison between Ai162 mice expressing transgene-derived GCaMP6s and wild-type mice expressing virally delivered GCaMP8s. We note, however, that AAV-mediated expression can itself introduce variability in expression level and spatial distribution. In contrast, mice in which GCaMP8s was introduced into Ai162 mice either by P1 injection or by local injection in adulthood exhibited task performance comparable to that of adult wild-type mice with local injections. Accordingly, data from these animals were pooled for analysis. Behaviour training A custom training system was used to train head-fixed mice. The head-plate fixture and mouse body holder were designed with CAD and fabricated with a 3D printer. The lick detection device60 and the water delivery pump were controlled by a single custom-written script (LabVIEW 2019, National Instruments). Throughout training, a continuous 8-kHz pure tone was played to mimic the acoustic noise of the resonant scanner used during two-photon imaging. Following recovery from head-plate implantation and large cranial-window surgery, mice were water-restricted to 1 ml/day until their body mass reached 80–90 % of the pre-restriction weight. Head-fixed mice were then given 2 μl of water rewards at a 6-s fixed time interval. Each session typically lasted for 200 to 300 trials. We observed licking just before reward delivery 3-6 days after the initiation of training. For each session, the average lick rate at 0.2 s before the reward and the minimum of the average lick rate between 1.5 and 4s after the reward were monitored. When there were at least two sessions where the difference between the former and the latter exceeded 3 Hz, the mouse was considered to have mastered the 6 s fixed interval task. The mouse then advanced to the alternating interval task, where it was given water rewards at 6-s and 12-s periods alternately. The mouse was considered to have mastered the task when the difference between the average lick rate at 11.8 s and 6-s in the 12-s period exceeded 1 Hz for more than five sessions. After the animal had completed at least one training session under the two-photon microscope, imaging sessions were initiated. Head-plate surgery Mice were anesthetized with isoflurane (1-1.5%) and body temperature was monitored with a rectal thermometer (RET-3 Rectal Probe for Mice; Physitemp Instruments). Eye ointment (Tarivid ophthalmic ointment 0.3%; Santen Pharmaceutical) was applied to keep them moist. Head-plate surgery was conducted on mice over 8 weeks of age61. The scalp overlaying the dorsal cortex was removed before detachment of the periosteum and cranial muscles from the skull. A custom head-fixing imaging chamber was mounted on the skull with a self-cure dental adhesive resin cement (Super bond, L-Type Radiopaque; Sun Medical) and luting cement (FUJI LUTE BC; GC Dental). The width of the head-plate allowed the implantation of a 7 mm × 7 mm glass plug and subsequent two-photon imaging. The surface of the intact skull was then coated with clear acrylic dental resin (Super bond, Polymer clear; Sun Medical) and dental silicone (Dent Silicone-V Regular type; Shofu) to prevent drying. The mouse was administered 0.38 μl / body weight (g) of meloxicam subcutaneously to reduce inflammation and pain. The mouse was then returned to the cage to recover for at least three days. Cranial window implant Three days after head-plate surgery, we performed an ultra-large cranial window implant. The glass plug used to cover the dorsal cortex was composed of a 6 mm × 6 mm #3 cover glass and a 7 mm × 7 mm #0 cover glass, both custom-manufactured by Matsunami Glass Ind. The front two corners of each cover glass were diagonally cut, resulting in a hexagonal shape. Two coverslips were glued together using optical adhesive (Norland Optical Adhesive 63; Norland Products). After anaesthesia, 5 μl / g body weight of 20% mannitol solution was administered via intraperitoneal injection to reduce intracranial pressure, and 0.216 μg / g body weight of atropine sulphate was administered intraperitoneally62 to reduce saliva and mucus secretion. The mouse head plate was fixed after anaesthesia. Clear acrylic dental resin was removed using a dental drill, followed by marking of the bregma and stereotaxic coordinates. The skull along the outline of the cranial window as well as coronal and sagittal sutures, was thinned with the drill. The frontal and parietal bones were removed in four separate pieces. The glass plug was then placed on the exposed cortex, enabling optical access to the entire dorsal cortex. The glass plug was attached to the bone with cyanoacrylate glue and secured using dental resin cement. Finally, the mouse was administered 10 μl / g body weight of mannitol intraperitoneally and 0.38 μl / g body weight of meloxicam subcutaneously before returning to the cage to recover for five days. One-photon calcium imaging and sensory stimulation Imaging was conducted in a dark environment with the mouse head fixed to restrict movement. Blue LED light (470 nm; light source: M470F4, Thorlabs; excitation filter: FF01-469/35-25, Semrock) was delivered to the cortical surface from the upper right side of the brain at a 45° angle. Violet LED light (405 nm; light source: M405FP1, Thorlabs; excitation filter: FBH405-10, Thorlabs) was delivered from the upper rear right side (−45° azimuth, 45° elevation). The two excitation lights were alternately applied to the cortical surface at a frequency of 20 Hz (24 ms per illumination). The LED driver (LEDD1B, Thorlabs) was controlled using a microcontroller (Teensy 4.0, PJRC) with custom code written in Arduino IDE 2.2.1 (Arduino). The intensity of the excitation light was optimized for each animal and session. Fluorescence signals from the brain were collected through an objective lens (NIKKOR 85 mm F2, Nikon), an imaging lens (NIKKOR 50 mm F1.4, Nikon), and an emission filter (FF01-525/39-25, Semrock), and recorded using a CMOS camera (Alvium USB 3.1, Allied Vision). Image acquisition was controlled with custom software written in LabVIEW 2020 (National Instruments). Imaging was performed at 504 × 504 pixels (with a pixel size of 14.1 μm × 14.1 μm), with 3 × 3 binning, an exposure time of 24 ms, and a frame rate of 40 Hz (20 Hz × 2), such that signals under blue and violet excitation were captured alternately, frame by frame. The focal plane was manually adjusted to the dorsal surface of the cortex. In somatosensory stimulation experiments, awake head-fixed mice received vibratory stimuli to the trunk, tail, or left/right whiskers. These vibratory stimuli were designed to evoke both cutaneous and proprioceptive somatosensory responses. The 50 Hz stimuli were delivered by attaching a lightweight sterile plastic pipette (EOG sterilized poly dropper, 2 ml, Asone) to the vibrating element of a speaker (MM-SPL2NU3, Sanwa Supply) and placing it in contact with the mouse body. Stimulation was controlled by custom LabVIEW 2020 software (National Instruments). Each stimulus lasted 750 ms, with an interstimulus interval of 7500 ms. In each session, approximately 220 stimuli were presented for ~30 minutes. For data analysis, signals were averaged across all trials and represented as mean brightness values. For three mice, the location of peak response to each stimulation was mapped and aligned with the mouse brain atlas. For two mice, the dorsal cortex and the brain atlas (Allen Mouse Brain CCF) were aligned using stereotaxic coordinates identified during cranial window implant surgery. The anterior, anteromedial, and rostrolateral visual areas were defined as PPC21. Two-photon calcium imaging Two-photon imaging was performed with a custom-built mesoscope (Diesel2p48). Excitation was provided by a fixed-wavelength femtosecond fibre laser (ALCOR 920-2, 2 W, 80 MHz, Spark Lasers, France). Group-delay dispersion (~60,000 fs²) was pre-compensated inside the laser head by maximizing sample fluorescence. Laser power was regulated with a half-wave plate followed by a polarizing beam-splitter cube. The beam was then expanded two- or three-fold (×2 or ×3 beam expander, Thorlabs) to fill the objective’s back aperture. Beam steering employed a resonant scanner (CRS 8 kHz, Cambridge Technology) in series with two galvanometric mirrors (R6210H, Cambridge Technology), all driven by an analogue output board (PCI-6722, National Instruments). Custom scan and tube lenses, a primary dichroic mirror, the objective, and the collection optics completed the optical path. The sample power was usually 80-100 mW and never exceeded 130 mW in any experiment. The imaging depth was at layer 2/3 (100–150 μm from pia). Fluorescence was routed through the dichroic mirror and a 700 nm short-pass emission filter (FESH0700, Thorlabs) and detected by a GaAsP photomultiplier tube (H10770PA-40, Hamamatsu). The signal was amplified (#59-179, Edmund Optics) and digitized at 12 bit, 10 MS/s (ATS-460, AlazarTech). A line-sync signal from the resonant scanner provided the master clock for all devices. Custom LabVIEW software (LabVIEW 2019, National Instruments) controlled acquisition. For mice expressing GCaMP broadly across the dorsal cortex, two adjacent tiles (4.25 × 1.5 mm each) were collected and stitched to yield a 4.25 × 3 mm field of view (FOV) at 1500 × 1168 pixels and 4.79 fps. Image processing Image preprocessing was performed using ImageJ (National Institutes of Health) and MATLAB (MathWorks, Natick, MA, USA) software. The bidirectional phase offset of the image was calculated, and sinusoidal distortions caused by the resonant scanner were corrected. The TurboReg plugin63 on ImageJ was used for image registration. Using ImageJ macros, the images were divided into smaller blocks of 150×150 pixels, and registration based on translation was performed for each block. Subsequently, MATLAB was used to combine the drift-corrected images from each block. The xy offset of each block was linearly interpolated across all of the pixels to ensure consistency of the shift. The registered images were then analysed using Suite2p64 to determine the location of the regions of interest (ROIs). In addition to the automatically detected ROIs, we visually inspected the images and manually added any morphologically recognizable neurons. Conversely, any ROI whose mean fluorescence intensity was lower than the background was excluded from further analysis. The intensity of each ROI was calculated by subtracting the mean values of pixels within 120 μm of the ROI, excluding other ROIs from the mean value of the ROI. For each ROI, the 8th percentile pixel values within a 15-s time window were obtained, which were then smoothed using a Gaussian filter with a standard deviation of 30 s. This was considered the baseline of neural activity, and was subtracted from the original data to set the baseline to 061. A Wiener filter with a temporal length of 1.5 s was applied to reduce noise. Non-negative deconvolution with a time constant of 0.87 s (fast-oopsi65;) was performed. Finally, a Gaussian filter with a standard deviation of 0.2 s was applied for all analyses, except for the decoding analysis, where a standard deviation of 0.5 s was used. For analysis, the neural data were interpolated to have a 10 Hz signal rate. Single-neuron analysis ROIs whose distribution of the activity had skewness over 0.3 were defined as “reconstructed neurons”, which were included in the analysis61. Reconstructed neurons were classified as “absolute timing neurons” or “relative timing neurons” if the time ratio of the time of the maximum activity during 12-s and 6-s was between 0.9 and 1.1, or 1.9 and 2.1, respectively. Task-related neurons whose activity peaked within 2 s after reward were defined as reward-related neurons. Population activity characterization To quantify the sequential firing activity of neurons, peak entropy, temporal sparsity, and the sequentiality index44 were calculated. One hundred neurons were selected randomly from M2 and PPC, and the data were averaged over trials. The indices were calculated as follows, where M is the number of bins used to estimate the distribution of peak times (60 for the 6-s period and 120 for the 12-s period). pj is calculated as the proportion of units whose peak activity falls into time bin j, relative to the total number of units. rit indicates the activity of unit i at time bin t, normalized by the total activity across all units at that time. The notation 〈〉t represents averaging over time, and N denotes the total number of units. PE (peak entropy) quantifies how spread out the peak times are across all neurons in the population, whereas TS measures how peaked or uneven the normalized activity is at each time point. The SqI (sequentiality index) approaches 1 when neurons have peak times that are evenly distributed across the whole time period, such that at every moment, exactly one neuron is active, and their temporal activity windows do not overlap. The indices were calculated for 6-s period and 12-s period each, and the average of 100 iterations was analysed. When calculating the sequentiality index of the RNN result, the data were averaged per 10 samples to match the sampling rate of neural data (10 Hz). Noise correlation analysis For each neuron pair, Pearson’s correlation coefficient between trial-to-trial fluctuations, defined as deviation from the mean activity, was calculated separately during the 6 s and 12 s intervals. The correlation was plotted against the absolute difference in peak firing times, where peak times were taken from the mean activity in the alternate interval. Analyses were performed on three groups of pairs: within M2, within PPC, and cross-area (M2–PPC). To avoid edge-of-trial artifacts, any neuron whose firing peak occurred within 1 s before or after the reward delivery was excluded. Encoding model The encoding analysis was performed using ridge regression. The activity of each reconstructed neuron was fitted using the lick rate and elapsed time within the trial. Elapsed time was composed of 18 Gaussian kernels, where the ith kernel had a peak at the ith second in the trial. The standard deviation was 0.9 s. The data were intervals of 18 s each, consisting of a 6-s interval and a 12-s interval of the behaviour task. These segments were then divided into 4 groups based on the modulo 4 of their segment order numbers. One group was used for testing, while the remaining groups were used to fit regression models. The ridge parameter was set to 10−4 for all neurons. R-squared was used to evaluate the model’s fit with the neural data. To evaluate the contribution of each predictive variable, a permutation test was performed. Each variable was randomly shuffled in the time axis, and the regression was repeated 100 times. If the R² of the full model exceeded the 95th percentile of that variable’s shuffled R² distribution, the neuron was considered to be significantly associated with that predictor. Dimensionality reduction The dimensionality of the neural data was reduced using a slightly modified version of contrastive principal component analysis (cPCA)66 and canonical correlation analysis (CCA). For mathematical details, see Supplementary note. In brief, in our analysis, cPCA finds axis v that maximizes the intra-trial variance while simultaneously minimizing the inter-trial variance. The parameter w determines the balance between the two. We changed the parameter w to find the optimal balance of within-trial variance and across-trial variance by comparing the decoding performance (Supplementary Fig. 3a, b). The decoding performance based on the cPCA was also compared with other dimensionality reduction methods, such as PCA, demixed PCA67, or Task-related component analysis (TRCA)68 (Supplementary Fig. 3c). dPCA was done by dividing each trial into 1-second bins (18 pseudo-conditions) and, for each bin, computing its mean deviation from the overall trial average. Using this condition-dependent signal, condition-dependent encoding axes and their projection were calculated. TRCA seeks to find the axes that minimize average covariance within every single trial while maximizing the covariance of the trial-averaged responses. Neural manifold analysis After dimensionality reduction with cPCA, the data were visualized using the UMAP implementation in MATLAB. In Fig. 3a, neural data were transformed with cPCA (w = 0.6), and the top 30 dimensions were used to visualize activity using UMAP (n_neighbors = 15, min_dist = 0.3). Comparison of the neural manifold across a range of cPCA variable w was done using neural data averaged per 5 trials (Supplementary Fig. 3a). The first 10 dimensions of the transformed data were subsequently transformed by UMAP (n_neighbors = 20, min_dist = 0.01) for visualization. Note that UMAP was not used in any decoding analyses. Decoding Decoding of temporal information from a population activity was done with a bagged decision tree algorithm (MATLAB function, treebagger). The number of trees, a hyperparameter of TreeBagger, was fixed at 100. We confirmed that qualitatively similar conclusions were obtained when using an SVM. The neural data were segmented into intervals of 18 s each, consisting of 6-s intervals and 12-s intervals of the behaviour task. The classifier predicted the within-trial time in integer values ranging from 1 to 18, i.e., 18 classes of each 1 s time window. To avoid the classifier from naively predicting based on temporally close training intervals, the trial segments were divided into 8 groups based on the modulo 8 of their segment order numbers. When decoding data at group i (ranging from 1 to 8), all data except for group i-1, i, and i + 1 were used to train the classifier. The training data’s dimension was reduced using cPCA, PCA, dPCA, or TRCA, and the same coefficient was used to transform the testing data. The decoding analysis was done using dimensionality ranging from 2 to 300, and the optimum number of dimensions was identified for each mouse. Decoding accuracy was defined as a proportion of predictions that fell within 1 s of the real time. The cPCA parameter, w, was set to 0.6 for M2 and 0.5 for PPC, as these values yielded the highest average decoding accuracy. Calculation of coherent and independent errors The difference between the decoder-predicted time and the actual time was computed separately for M2 and PPC, denoted as M2offset and PPCoffset, respectively. Offsets ranged from −8 s to +9 s. Coherent error was defined by times in which both areas exhibited similar errors: Independent error was defined as cases in which only one region exhibited a large offset: The rates of these errors were calculated by dividing the number of error occurrences by the total number of time bins. CARP (Canonical-component Ablation based Representation Probing) analysis Neural data from each area was reduced to 100 dimensions using PCA to prevent overfitting by CCA. Then the time series was transformed by the M2–PPC CCA projection. Elapsed time and lick rate were decoded, and the resulting accuracy was taken as the maximal decoding performance. Next, we removed the N-th CCA dimension (N = 1, 2,…, 100), repeated the decoding, and recorded the new accuracy; the reduction relative to the maximal decoding performance was interpreted as the contribution of that component. For elapsed time decoding, the data’s dimensionality was reduced using cPCA (w = 0.6) and the dimension with the highest decoding accuracy was selected. For lick rate decoding, lick rate was obtained by counting licks in 0.4-s bins and was decoded with linear ridge regression. To prevent overfitting, an eight-fold cross-validation was used and performance was quantified by the coefficient of determination, r². The ridge regularization parameter was swept from 10⁻¹⁰ to 10¹⁰, and the value yielding the highest r² was adopted for all subsequent analyses. For every session, two independent, non-overlapping random samples of 100 neurons were selected from either M2 or PPC, and the entire analysis was repeated. To perform statistical testing for CARP, we carried out the same decoding analysis using random vectors in place of each CCA vector and quantified the resulting decrease in decoding performance. This procedure was repeated 240 times to obtain a distribution of contributions from random vectors. We then compared this distribution with the data from each CCA axis using a Wilcoxon rank-sum test, yielding statistical test results for each CCA axis. As an alternative to CCA, we performed the same analysis using canonical PLS (Partial Least Squares)69, referred to as PARP (PLS-component Ablation based Representation Probing). Canonical PLS and CCA are similar methods, but they differ in that CCA maximizes the correlation between linear transformations of activity in the two areas, whereas canonical PLS maximizes their covariance. In canonical PLS, components are likewise ranked according to the magnitude of covariance between the linear transformations of neural activity in each area, providing a natural ordering of components comparable to that in CCA. In contrast, directional PLS (as opposed to canonical PLS) defines a directional transformation. Specifically, in M2 → PPC PLS, components are sequentially selected to maximize the covariance such that linear transformations of M2 neural activity best explain PPC population activity. Conversely, in PPC → M2 PLS, components are selected to maximize covariance in the opposite direction. In M2 → PPC PLS, the vectors defining the linear transformation of M2 data are identified, and ablation of these vectors was used to quantify the resulting decrease in decoding performance; the reverse procedure was applied for PPC → M2 PLS. Thus, PLS based analysis naturally captures asymmetries between M2 and PPC when such asymmetries are present. Statistical testing for each analysis was performed in the same manner as in CARP, using random vectors. These relationships can be summarized more compactly in a unified mathematical formulation as follows. Given zero-mean data matrices X∈RT×NX and Y∈RT×NY, CCA seeks projection vectors a and b that maximize aTXTYb under variance-normalizing constraints aTXTXa=1 and bTYTYb=1, yielding pairs of canonical variables whose within-dataset projections are mutually uncorrelated. Canonical PLS relaxes the variance normalization and instead maximizes shared covariance aTXTYb subject to ||a||=∣∣b∣∣=1, with solutions obtained from the singular value decomposition XTY=UΣVT, where orthogonality is imposed directly on the projection vectors ai and bi. Directional PLS introduces asymmetry by identifying projection vectors v that maximize ∣∣YTXv∣∣2, equivalently obtained from the singular value decomposition YTX=UΣVT. These formulations differ systematically in their treatment of variance normalization, covariance structure, and directionality, enabling complementary probing of shared and directional population representations. Noise analysis The neural data from M2 and PPC were first transformed by CCA. For each canonical component in M2 and PPC, the Power Spectral Density (PSD) was calculated using the pwelch function in MATLAB. PSD was plotted against period (s) in the log-log axis. PSD of period greater than 1.5 s was linearly fitted. The coefficient of the slope of the first canonical component was close to 1. This indicates that the slow baseline fluctuation was the 1/f (pink) noise. Lick rate was analysed in the same way, and the PSD from 0.8 s to 10 s period was linearly fitted. Unusual input timing experiment The RandomForestClassifier function from scikit-learn was used to classify activities of the RNN to either the 6-s or the 12-s period. The activities were dimensionally reduced to 100 dimensions using cPCA (w = 0.6). The number of estimators was set to 100. For the 6-s period, we randomly applied input at unusual timing to the network. The activity of one second after the unusual input was decoded, and the number of times the decoder predicted the 12-s period was counted to calculate the probability of transitioning from 6-s to 12-s period. For each unusual input timing, the experiment was repeated 16 times, and the probability of transition was averaged. The probability was calculated similarly for the 12-s period. For the elapsed time task, inter-trial intervals were removed from the training datasets, and the same analysis as the AI task was conducted using two different cues. Twin RNN models The dynamics of the two RNNs, A and B, were described by the differential equations below. where xa and xb represented the membrane potential and ra and rb represented the firing rate of units in RNN A and B, respectively. Both membrane potential and firing rate were expressed as N by 1 vector, where N was the number of units set to 512. The firing rate was given by applying the ReLU function on the membrane potential. The function, g, represents leaky ReLU with alpha = 0.2. m is the scalar input, and φ is a Gaussian noise vector (N×1) with 0 mean and 0.08 variance. The hyperbolic tangent function was used for the activation function of the output z. The time constant τ was set to 100 ms, and the discretization time step was 10 ms. Following Dale’s law, 80% of the units were excitatory, and 20% were inhibitory. The output connection weights from excitatory units were nonnegative, whereas those of the inhibitory units were nonpositive. Connections between RNNs were constrained to be nonnegative, as is the case with cortico-cortical neurons. The connection strength between 2 RNNs was varied by setting the connection probability (0 to 1) of the connection matrix Sa and Sb. In the default conditioning, the probability was set to 10−3 based on an anatomical study70, a modelling study71, and a theoretical study72. The maximum value of the synaptic weight was set to 2. Two RNNs received a single cue corresponding to a reward or two different cues for 30 ms, three time-steps. The input weights underwent plasticity during training, as did the other synaptic weights. The input cue was given at 6-s and 12-s intervals alternately, analogous to the behaviour task. The output weight of each RNN for absolute and relative times was also plastic during training. Two outputs of each RNN were trained to fit one, of which was a linear signal reflecting absolute time, and the other was a ramp-up signal in the form of a quartic function, which was proportional to the interval reflecting relative time from the input. The maximum value of the input and output weights was set to 2. To model common noise, we added two independent pink-noise processes whose power spectral densities scaled as 1f for frequencies up to 1 Hz. Each pink-noise signal was generated by first sampling white noise in the time domain, transforming it into the frequency domain, and scaling its Fourier amplitudes by 1/f0.5 for frequencies f≤1Hz (resulting in a PSD proportional to 1/f). Frequency components above 1 Hz were set to zero to mimic a steep decline in PSD above f≥1Hz in the experimental data (Fig. 5b). The modified spectrum was then transformed back into the time domain using an inverse Fourier transform to obtain the pink-noise process. Each pink noise trace was rescaled so that its maximum and minimum values were +0.5 and –0.5, respectively. The noise was then added to the membrane potential as follows: Where Pi∈R2×1 is the value of two pink noise processes at time i, K∈RN×2 is a fixed noise matrix, and σ is a gain factor. The noise matrix K was initialized using pink-noise processes and remained constant throughout all simulations. RNN training The training of RNNs without shared noise input was done with a batch size of 8, and each batch consisted of 12 trials for twin RNN models. The loss was calculated by taking the squared error of all 4 outputs with respect to 4 target outputs, consisting of relative time and absolute time from two RNNs, and taking the entire mean. The model was trained by back propagation through time (BPTT) with the Adam optimizer (learning rate = 5 × 10⁻⁵, clip value = 5 × 10⁻⁵). L2 regularization (coefficient = 0.1) was applied to the unit activities during training. To reduce memory load during BPTT training, the time sequences were split into 12 segments using a stateful RNN in tensorflow, with parameters updated after processing each segment. Note that synaptic plasticity was applied to all synapses, including within RNN synapses and inter-RNN synapses, regardless of the inhibitory and excitatory ones. The sign of the synaptic weight was 0 or positive for the excitatory synapses and 0 or negative for the inhibitory synapses. The output errors during the first trial were not included for calculating the loss since the model has no telling what interval comes first. Training of the RNNs that received shared noise input was conducted with a batch size of 64, each batch containing 12 trials. A network previously trained without common noise served as the initial state. During the first 8000 epochs, the noise scaling factor σ was linearly ramped from 0 to 3; training then continued for another 2000 epochs with σ fixed at 3. For analysis, we selected, from this final interval, the model exhibiting the lowest loss. Optimization used the Adam algorithm (learning rate = 2.5 × 10⁻⁵, clip value = 2.5 × 10⁻⁵). For each connection probability, the twin-RNNs were trained 10 times using different random seeds. Unless otherwise noted, all analyses were performed across the 10 models, and the results were averaged. Alternative modeling approaches include spiking neural network (SNN) models, reservoir computing frameworks such as echo state networks (ESNs)73 and liquid state machines (LSMs)74, and Transformer-based architectures. In practice, SNNs are known to pose substantial challenges for training with gradient-based methods, and reproducing or stabilizing long temporal sequences remains difficult in most implementations75. Reservoir computing approaches can capture temporal structure when appropriate sequential dynamics spontaneously emerge in the reservoir; however, such dynamics are not guaranteed to arise robustly and are highly sensitive to hyperparameter choices and input statistics. Transformer-based models are, in principle, capable of generating and modeling long-range sequential dependencies76. Nevertheless, their architectural properties make them less suitable for the present study, which focuses on examining the functional implications of a twin recurrent architecture with sparse inter-network coupling and on interpreting the causal effects of structured perturbations. In contrast, recurrent neural networks provide a more direct and interpretable framework for isolating dynamical interactions and perturbation responses in coupled systems. Weighted perturbations along CCA components We split the CCA space into its first two components and the remaining 98 components and defined a perturbation vector w such that the ratio of the summed squared weights satisfies with wk representing the k-th element of w and ∣∣w∣∣=1 Here d∈[0, 1] specifies the relative weight assigned to the top two CCA components. The unit vector w was then multiplied by a random scalar μ drawn from a normal distribution N(0,182) before being projected to the CCA space and added to the RNN input: Where Ma∈RN×100 and Mb∈RN×100 are projection matrices that map the activity of RNN A and RNN B into the canonical space. For each combination of d and the inter-areal connection probability p, we quantified the frequencies of independent and coherent errors, as well as their ratio (Fig. 6g). DLIC (dual local Lyapunov exponent-based Independence vs Coherence) analysis For detailed mathematical formalization, see the Supplementary Note. To assess the stability of the RNN, we used the concept of the local Lyapunov exponent77. Instantaneous stability of RNN A along the ith canonical direction, ui (normalized), is Similarly, for RNN B and its corresponding ith canonical direction vi, the LLE is Here, the RNN update Eqs. (6), (7) were discretized with a time step of Δt=10 ms using the Euler method, and the activity of RNN A and B at time t are denoted by xat and xbt, respectively. The parameters λind,a,it and λind,b,it represent the exponential rate of convergence or divergence along the attractor of each RNN at time t. Negative values indicate convergence (stability), and positive values indicate divergence (instability) of the trajectory projected to the chosen axis. The implementation for calculating the local Lyapunov exponent was done on TensorFlow. Using Eq. (16), local Lyapunov exponents along isolated canonical components at time t were calculated via TensorFlow’s automatic differentiation. Isolated canonical components were obtained by projecting each canonical component onto the null space of the other components to eliminate cross-component effects. The exponents were averaged over time to give estimates of the stability of the system along each component. We also assessed the synchronicity of the two systems. Difference along the ith canonical components between two systems at time t, denoted by eti, is expressed as where ui and vi is canonical components of xa and xb respectively. The local Lyapunov exponent of eidifft was estimated by perturbation experiments (described in “Directional perturbation experiment”). eidifft was recorded for 1 sec after the perturbation and was averaged over at least 100 iterations. The mean data over time was fitted with exponential model y=a*exp(λt)+c, with parameters a, c, and λ. c was introduced to allow for small baseline offset. The fitted coefficient λcoh,i was used as an estimate of the local Lyapunov exponent of the ei. We thus obtain the DLIC index, Transient perturbation experiment A transient perturbation experiment was done by applying random transient noise. The noise vector (512 dimensions) was sampled from the Gaussian distribution of mean 0 and standard deviation of 0.8. The noise vector was added to either RNN-A or -B randomly with a probability of 0.005 per 10 ms. Directional perturbation experiment Given a directional input v, it was normalized, then multiplied by a random scalar chosen from a Gaussian distribution of mean 0 and standard deviation 18. The standard deviation of 18 was chosen to match the expected norm of the noise vector used in the transient perturbation experiment. The noise vector was added to either RNN-A or -B randomly with a probability of 0.005 per 10 ms. Computational resources RNN training was executed on the TSUBAME 4.0 supercomputer (AMD EPYC 965 CPUs; NVIDIA H100 SXM5 94-GB GPUs). We ran the jobs on 72 “GPU-1” nodes in parallel, each node providing one H100 GPU and eight CPU cores; 72 GPUs and 512 CPU cores in total. Statistics Data were expressed as means ± standard error of the mean (SEM) unless otherwise noted. For pairwise comparisons between independent groups, the Wilcoxon rank-sum test was used. For paired comparisons across sessions, animals, or matched model populations, the Wilcoxon signed-rank test was used. ANOVA was used for multiple-group comparisons where indicated. Spearman’s rank correlation test was used for non-parametric correlation analyses, and Pearson’s correlation test was used for linear correlation analyses in the RNN learning analyses. Permutation tests were used to assess significance against shuffled distributions; the number of permutations is reported for each analysis. The statistical significance of independent and coherent errors was assessed with a bootstrap procedure. First, for each trial, we defined the offset as the difference between the decoded time and the true time. Offsets ≤ 1 s were considered correct; all others were labelled errors. An independent error occurred when one area (M2 or PPC) was correct, and the other was erroneous. A coherent error was counted when both areas were erroneous, but their offsets differed by ≤ 1 s. Let P be the empirical probability that both areas were correct in a given session; then the total error probability is 1−P, corresponding to (1−P)×N error points in a data set of N trials. The joint offset distribution was binned into an 18 × 18 grid; the three-by-three central region contained the correct trials, leaving 18 × 18−3 × 3 bins for errors. For each session, we constructed a null distribution by randomly allocating the (1−P)×N error points among those error bins with equal probability, recomputing the rates of independent and coherent errors. This shuffling was repeated 50,000 times to generate the session-specific bootstrap distribution. Bootstrap tests were Bonferroni-corrected where indicated. When no bootstrap sample exceeded the observed statistic, empirical p-values were reported at the finite resolution of the bootstrap procedure. For the population decoding analysis, the significance of the peak at zero decoded-time difference between M2 and PPC errors was assessed with a two-sided bootstrap test with Bonferroni correction. For each bootstrap iteration, the temporal correspondence between M2 and PPC decoded-error sequences was disrupted by randomly permuting the data along the time axis, and the peak rate at zero decoded-time difference was recomputed. This procedure was repeated 50,000 times to generate the null distribution. The total number of trial-time observations was N = 192,240. Session-wise coherent and independent error ratios were compared with shuffled controls using the same bootstrap framework; the numbers of observations per session were 34,560, 28,080, 31,140, 48,240, 29,160, and 21,060. For peak-time classification analyses, statistical significance was assessed across sessions using a two-sided permutation test with 100,000 random permutations. For encoding-model analyses, differences between M2 and PPC were assessed using a two-sided Wilcoxon rank-sum test for lick-rate predictors and ANOVA for time-window predictors. For decoding accuracy and optimal dimensionality comparisons between M2 and PPC, two-sided Wilcoxon signed-rank tests were used. For CARP and PARP analyses in the experimental data, the contribution of each component was compared with the corresponding random-vector control using a two-sided Wilcoxon rank-sum test. These tests were performed across n = 12 session–region pairs, and no correction for multiple comparisons was applied. For the relationship between CCA component-score differences and decoded-time differences, two-sided Spearman’s rank correlation tests were performed for each component using N = 192,240 trial-time observations. For twin-RNN analyses, connection weights were compared with shuffled distributions using two-sided permutation tests with 1,000 random permutations of connection weights. Correlations between learning-related quantities and training epoch were assessed using two-sided Pearson’s correlation tests. For RNN decoding-error analyses, the significance of the peak at zero decoded-time difference between RNN-A and RNN-B errors was assessed using a bootstrap test with 50,000 random iterations and Bonferroni correction. The total number of observations was N = 283,769. For RNN CARP analyses, temporal-information contributions were tested using a one-sided Wilcoxon signed-rank test against zero across n = 20 RNN-region pairs from 10 independently trained twin-RNN models, without correction for multiple comparisons. Shared-noise contributions were tested using the same one-sided Wilcoxon signed-rank procedure across n = 20 RNNs from 10 independently trained twin-RNN models. For analyses comparing changes across canonical components, two-sided Wilcoxon rank-sum tests were used where indicated. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary Information Reporting Summary Transparent Peer Review file Acknowledgements We thank S. Kato and K. Kobayashi for AAV production, O. Ooishi for producing the head-fixation apparatus, H. Kasai, K. Sakamoto, S.L. Smith, Y. Yu, T. Wakisaka for comments, and all members in the Isomura lab for supporting this work. This work utilized the TSUBAME4.0 supercomputer at the Institute of Science, Tokyo for RNN training and analysis. We used ChatGPT-5 (OpenAI) for English and Japanese translation during manuscript preparation. Author contributions H.I. Riichiro H. conceived the project. H.I. and F.I. conducted experiments and data analysis. H.I. designed and analysed the RNN model. Reiko H. conducted pilot experiments. Y.I. supervised the project. Riichiro H. and H.I. wrote the paper with the comments of all authors. Peer review Peer review information Nature Communications thanks Conrado Bosman, Umberto Olcese, and the other anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available. Funding This work was supported by JP22wm0525007 (RH), JP25wm0625405 (RH) from AMED, JP26H01161(RH), JP24H02156 (RH), JP22H02731 (RH), JP20K22678 (RH), JP21B304 (RH), JP21H05134 (RH), JP21H05135 (RH), JP21H0524 2(YI), and JP23H02589 (YI) from MEXT/JSPS, JPMJFR231X (RH), JPMJCR1751 (YI) from JST, Nakatani Foundation (RH), Shimadzu Foundation (RH), Takeda Science Foundation (RH), The Precise Measurement Technology Promotion Foundation (RH), Tateishi Science and Technology Foundation (RH), and Research Foundation for OptoScience and Technology (RH). Data availability Source data are provided with this paper on Figshare. 10.6084/m9.figshare.30188239. Code availability The Python code associated with this study is available on GitHub at https://github.com/hiroto726/TwinRNN. The repository provides demonstration code for loading the pretrained sparsely coupled dual RNN (TwinRNN) model, running the model, and generating representative visualizations of model activities. The version of the code associated with this manuscript has been archived on Zenodo with the DOI 10.5281/zenodo.1990743678. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Yoshikazu Isomura, Email: isomura.phy2@tmd.ac.jp. Riichiro Hira, Email: rhira.phy2@tmd.ac.jp. Supplementary information The online version contains supplementary material available at 10.1038/s41467-026-73999-w. References Associated Data Supplementary Materials Supplementary Information Reporting Summary Transparent Peer Review file Data Availability Statement Source data are provided with this paper on Figshare. 10.6084/m9.figshare.30188239. The Python code associated with this study is available on GitHub at https://github.com/hiroto726/TwinRNN. The repository provides demonstration code for loading the pretrained sparsely coupled dual RNN (TwinRNN) model, running the model, and generating representative visualizations of model activities. The version of the code associated with this manuscript has been archived on Zenodo with the DOI 10.5281/zenodo.1990743678.