Oscillatory phase coding (OPC) is widely observed in neural systems and has been implicated in cognitive functions such as memory and sequence processing. However, its computational role and neural substrates remain largely unclear. Here, we studied OPC by training recurrent neural networks (RNNs) with adaptation to perform sequence working memory tasks with variable delays. After training, we found that OPC emerges in the RNN spontaneously: the memorized items recur at distinct phases of a shared rhythm, with oscillation amplitude encoding item identity and phase encoding serial order. Ablation studies identified three key elements required for OPC: adaptation in neural dynamics, variable delay in memory retention, and flexibility in reading out information. Neuron-type analysis revealed the emergence of content and time cells in the trained RNN, and they process item identity and sequence order separately. Recurrent connectivity analysis revealed phase-organized connections among time cells and structured connections within digit-selective content-cell groups. Inspired by these findings, we proposed a neural circuit model which reproduces OPC through interactions between content units and an adaptive time ring. Together, this study reveals how OPC arises from network structures and task demands, offers insights into the implementation and computational mechanisms of OPC in biological systems, and inspires us to develop computational models for human-like cognitive functions.
Figures & tables
Figure 1: Task and model of sequence working memory. (a) Illustration of OPC, where memory items recur at distinct phases across successive oscillation cycles. (b) Memory items (digits) are loaded in sequence, maintained across a variable delay, and retrieved by an ordinal cue. Three items are illustrated. (c) An adaptive RNN receives image and cue inputs. The content head outputs digit scores pt , while the temporal gate αt controls the information readout. (d) Illustration of spike-frequency adaptation, by which neuronal activity declines in response to a sustained input.
Figure 2: Oscillation phase coding emerges in the trained A-RNN. (a) Rhythmic oscillations for present items (digits) exhibiting distinct phases (colored). No oscillation for absent items (gray). Shading indicates the task stages. (b) Oscillation-amplitude distributions for present and absent items. (c,d) Phase distributions over trials are separated by serial orders (c) but overlapped by item identities (d). (e) Changing the ordinal cue shifts the temporal gate toward the target item’s phase while preserving the content encoding. (f) Temporal gate and target item phase align with each other across correctly retrieved trials. The inset shows circular timing differences. Analysis details appear in Appendix B .
Figure 3: Adaptation, temporal gating, and delay variability shape phase coding. (a) Activities of content readout neurons from a non-adaptive RNN (i), an A-RNN with a fixed temporal gate (ii), and an A-RNN trained with a fixed delay but tested with a longer delay (iii). Dashed lines in (iii) mark the trained retrieval interval (steps 180–240); the test cue arrives at step 300. The training-delay reference is shown in Figure 8 . (b) Validation loss and accuracy during training. (c) Output-logit spectra (top) and robust phase consistency Rϕ (bottom). (d) Overlapped phase distributions for serial positions in the fixed-delay network. Settings and analyses appear in Appendix D .
Figure 4: Time and content cells in the trained A-RNN. (a) Example neural activity traces (left) and the estimated oscillation periods (right); the dashed line marks T3 . (b,c) Absolute (b) and content-relative (c) phase concentration across trials. Colored bars mark neurons meeting the classification criteria; the inset in (b) shows the preferred phases of time-cell candidates. (d) Time-cell activity averaged across trials and z-scored within each neuron. Rows are ordered by preferred phase, revealing a traveling wave across cue onset at time zero. (e) Recurrent connectivity kernel of time cells on the phase ring, showing an approximately cosine shape. (f) Leading-mode fraction within and across digit-selective content-cell groups, normalized by the mean shuffled fraction. The fraction is the proportion of squared, centered weights captured by the dominant singular mode. Phase references, classification criteria, and connectivity analyses are given in Appendix C .
Figure 5: A hand-designed neural circuit model of OPC. (a) Circuit model coupling content units to an adaptive time ring through activity-dependent coupling gates and feedback. (b) Content-unit activity for present (top) and absent (bottom) items. (c) Mean time-ring activity across sequences, with units ordered by phase. Model dynamics and analysis details appear in Appendix F .
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Quantity
Default or typical range
Hidden size H ; cue embedding dimension
100–500; 16
Update rates αh ; αθ
0.1 ; 0.01
Initial adaptation gain m ; feedback gain γ
[0.9,1.1] ; 1.0
Encoding T1
10 steps per digit, 2 rounds ( T1=20N )
Inter-item blank interval
0 steps
Delay T2 ; retrieval T3
Integer uniform [50,150] ; 55–65 steps
Appendix
Table 1: Representative defaults and typical ranges for training the recurrent models. Experiment-specific network sizes, task timings, and training budgets are given in the corresponding appendix sections.
Figure 6: Retrieval errors accompany weaker present-digit and stronger absent-digit oscillations. Per-trial mean peak FFT magnitudes over T2+T3 for present (left) and absent (right) digits, split into correct (green; n=7,834 ) and incorrect (red; n=166 ) trials. Vertical scales differ between panels. Gray points show sampled trials, diamonds mark full-group means, and boxes show medians and interquartile ranges; whiskers reach the most extreme values within 1.5 interquartile ranges.
Figure 7: Time- and content-cell populations remain identifiable across classification thresholds. (a) Cell fractions as the concentration threshold R varies, with neuron mean-fit qualification fixed at R2≥0.8 . (b) Cell fractions as the mean-fit threshold varies, with concentration thresholds fixed at R≥0.7 . Dashed lines mark the current settings. (c) Time-cell recurrent kernels for concentration thresholds 0.6, 0.7, and 0.8, with phase-shuffled means and pointwise 5th–95th percentile bands. (d) Within-digit and across-digit content-cell connectivity structure at the same thresholds; points represent directed connection blocks and the dashed line is the shuffled baseline.
Condition
N
H
T1
T3train
Training delay
Non-adaptive RNN
4
502
80
60
Uniform 50–150
A-RNN, variable delay
4
500
80
55
Uniform 50–150
A-RNN, fixed delay
4
500
80
60
Fixed 100
A-RNN, fixed gate
4
500
80
60
Uniform 50–150
Appendix
Table 2: Conditions underlying Figure 3 . Each row denotes one trained checkpoint. T3train is its training retrieval length, and Q=T1+T2 is the evaluation cue onset.
Figure 8: Content readouts at the fixed training delay. The fixed-delay network is evaluated at its trained delay, T2=100 steps, providing the reference for Figure 3 a(iii). Colored traces represent presented digits and gray traces absent digits; shading marks encoding, delay, and retrieval.
Figure 9: Fixed temporal gate used in the readout ablation. The Gaussian gate peaks at the final retrieval step. Its width is learned during training, and every trial uses the same gate regardless of the input digits or cue.
Seed
N/H/T3
P
Rϕ
Sfree
Cfree (%)
Acc. (%)
Main A-RNN reference
main
4/500/55
50.0
0.967
0.755
99.41
97.81
Fixed delay
21001
3/450/65
57.1
0.395
0.618
49.76
98.57
21002
3/500/65
50.0
0.358
0.284
18.50
98.39
21003
4/550/65
61.5
0.882
0.542
60.03
98.06
Appendix
Table 3: Phase structure at the shared in-distribution delay T2=100 . Each model has a period P selected on independent calibration trials, without using T3 or phase separation. Sfree and fit coverage Cfree use held-out delay activity; Rϕ retains the main-text definition. Accuracy uses native retrieval. Mean ± sample SD summarizes runs, with one conditional separation median per run. A star marks the upper search boundary: the period remains unresolved. Periods are in simulation steps. NA denotes no qualifying trials.
Seed
P220
Call (%)
Smin
CΔ
A2/A1
Main A-RNN reference
main
51.8
99.60
0.763
0.994
1.38
Fixed delay
21001
58.7
46.69
0.565
0.906
1.56
21002
58.7
7.06
0.407
0.911
1.65
21003
60.7
55.91
0.516
0.972
2.10
Appendix
Table 4: Persistence at the extended delay of Fig. 3 a(iii), T2=220 . The period P220 is selected on independent calibration trials at this delay. A star marks the upper search boundary, not a resolved oscillation period. Both adjacent 110-step pre-cue windows use this frequency. Call is the percentage of trials passing every present-item fit in both windows. Conditional on this criterion, Smin is median minimum separation across windows, CΔ is median relative-phase consistency, and A2/A1 is median amplitude retention. Parentheses count runs with defined conditional metrics. Periods are in simulation steps. This is a separate delay-generalization test.
Figure 10: Reciprocal coupling sustains content and time-ring activity. (a) Oscillation-amplitude distributions for present and absent content units. (b,c) Phases separate by serial position (b) but overlap by item identity (c). (d) Time-ring activity with intact (top) or removed (bottom) content-to-time feedback under strong divisive normalization, shown on a common color scale. (e) Activity of the presented content units in Figure 5 b with intact (top) or removed (bottom) time-to-content input, shown on a common activity scale. Connections are removed at maintenance onset. (f) Peak ring activity with intact or removed content-to-time feedback under strong and weak normalization. Lines and shading show means and SDs across three simulation runs.
Figure 11: Phase coding occupies a connected parameter region around the reference couplings. Within-trial phase separation (a,c) and present–absent amplitude contrast (b,d) over the reciprocal coupling gains, under strong (a,b) or weak (c,d) normalization. Black contours delimit the operational OPC region; dashed orange contours mark localized ring activity. Stars mark the reference coupling pair in each slice. Gray phase-map cells have less than 80% complete-phase fit coverage. Area percentages refer to the scanned logarithmic coordinates.
Figure 12: Adaptation affects learning and delay generalization across network sizes. Adaptive networks with H hidden neurons are compared with non-adaptive networks with H+5 neurons, using six runs per setting. (a,b) Validation accuracy and loss for H=300/305 . (c) Accuracy at epoch 60 across network sizes. (d) Epochs to reach 80% accuracy; horizontal marks show medians and open triangles indicate runs that never reach the threshold. (e) Accuracy across test delays for H=300/305 ; shading marks the training range. (f) Mean accuracy at delays of 200, 250, and 300 steps (top), and its decrease relative to T2=130 (bottom). Thin lines and points represent individual runs. Thick lines and bands in (a,b,e), and error bars in (c,f), show means and SDs across runs.
Figure 13: Adaptation strengths and oscillation properties of hidden neurons. Distributions of learned adaptation strength (a), oscillation amplitude (b), and period (c) across all 500 hidden neurons. The dashed line marks the retrieval duration, T3=55 steps.
Figure 14: Phase coding and population organization across independently trained networks. (a) Within-trial phase separation and task performance. (b) Retrieval depends on gate alignment. (c) Output-neuron and hidden-neuron periods across models. (d) Cross-trial phase consistency and slot decoding. (e,f) Time/content classifications and their stability across trial halves.
Figure 15: Learned adaptation gains track the rhythmic timescale across networks. Each point is one of the twelve networks in Figure 14 c, relating its median adaptation gain to its median output-neuron (a) or hidden-neuron (b) period. Colors denote training T3 . The dashed curve is the intrinsic-period prediction in Eq. ( 39 ), with no fitted coefficients.
Run
N
T3
H
Best epoch
Val. acc.
Analysis status
a01
4
65
550
53
0.9802
Included
a02
4
60
550
54
0.9712
Included
a03
5
65
500
253
0.9618
Retrained + continued
a04
3
70
500
55
0.9827
Included
a05
4
60
500
55
0.9799
Included
a06
4
60
500
55
0.9803
Included
Appendix
Table 5: Training outcomes and the current analysis cohort. The a03 and a07 checkpoints follow retraining and continuation; a10 follows continuation of its original run. The remaining rows use original best checkpoints.
Figure 16: Time- and content-cell connectivity patterns recur across independently trained networks. (a) Time-cell connection kernels share the phase-ring organization seen in the main model. (b) Content-cell connectivity shows consistent within-digit organization across the same nine networks. Colors identify models in both panels.
Mainstream sequence-processing AI is temporally reactive: each update is driven by input and learned state transitions, rather than by an independently evolving internal temporal reference. Biological brains, by contrast, continuously generate rhythmic activity that structures perception, memory, and cognition, and this rhythmicity reaches all the way to behavior. We ask whether this difference is merely implementational or genuinely computational. Four lines of evidence suggest that endogenous temporal structure supports putative functions that input-driven architectures may not readily replicate: 1) phase-dependent routing of information, 2) delay-structured combinatorial representation, 3) cross-frequency multiplexing of items, and 4) oscillation-gated offline consolidation. A proof-of-concept delay-ablation test dissociates representational capacity from memory retrieval. In recurrent and spatial spiking networks with fixed synaptic weights and connectivity, shuffling delays preserves part of the capacity but substantially impairs the sequence retrieval. The relative contrast is more pronounced for spatial networks and longer propagations. Instantaneous transmission collapses capacity itself. We then outline a cross-frequency multiplexing scheme that combines item identity and serial order with alternative mechanisms for selective memory retrieval. Finally, we state one falsifiable hypothesis, conditions for matched-resource tests, and three research directions: the components already exist; the disciplined comparison does not.
Meysam Hashemi, Alireza Valizadeh, Viktor Jirsa
Institut de Neurosciences des Systèmes, Aix Marseille Université, INSERM, Marseille, 13005, France. · Zapata Briceño Institute for Human Intelligence Research, Madrid, Spain.
Hippocampal neurons exhibit precise phase locking to network oscillations, but the computational principle governing this temporal precision is still unclear. Neural information is conveyed jointly by firing rates and spike timing, but existing models treat these dimensions separately, limiting mechanistic interpretation of spike-field coupling and its reported association with spectral features such as the aperiodic slope. Here we show that hippocampal phase locking emerges from a fundamental dynamical mechanism referred to as forced phase integration that separates neural information into orthogonal magnitude (what) and phase (when) coordinates. To formalize this principle, the unified complex-valued neuron (UCN) has been developed, a biologically grounded generative framework in which spike timing arises from phase accumulation while spike magnitude encodes instantaneous signal strength. This framework reproduces biological spike-theta synchronization and enables mechanistic re-evaluation of slope-locking associations, demonstrating that previously reported effects arise from oscillatory contamination rather than causal modulation. These findings establish a unified phase-native principle of neural timing and coding.
Reza Ahmadvand, Sara Safura Sharif, Yaser Mike Banad
School of Electrical and Computer Engineering, University of Oklahoma, Oklahoma, United States.
We introduce PDNA (Pulse-Driven Neural Architecture), a method for augmenting continuous-time recurrent networks with learnable oscillatory dynamics that maintain internal state evolution independently of external input. Built on Closed-form Continuous-time (CfC) networks, PDNA adds two components: (1) a pulse module that generates structured oscillations A⋅sin(ωt+φ(h)) with learnable frequencies and state-dependent phase, and (2) a self-attend module that applies recurrent self-attention to the hidden state. Through a controlled ablation study on sequential MNIST (sMNIST) with five random seeds, we evaluate gap robustness -- the ability to maintain performance when portions of the input sequence are removed at test time. Our key finding is that structured oscillatory dynamics significantly improve robustness to input interruptions: the self-attend variant achieves a statistically significant 2.78 percentage point multi-gap advantage over baseline (p=0.041), while the pulse variant shows a 4.62 pp advantage with large effect size (Cohen's d=0.87). A noise control (random perturbation of equal magnitude) provides no benefit, confirming that the advantage is structural rather than merely dynamic. These results provide evidence that continuous-time models can benefit from biologically-inspired internal oscillatory mechanisms for temporal robustness.