# Cognitive and plastic recurrent neural network clock model for the judgment of time and its variations

Quentin Hallez, Martial Mermillod, Sylvie Droit-Volet

► To cite this version:

Quentin Hallez, Martial Mermillod, Sylvie Droit-Volet. Cognitive and plastic recurrent neural network clock model for the judgment of time and its variations. Scientific Reports, 2023, 13 (1), pp.3852. 10.1038/s41598-023-30894-4. hal-04083764

HAL Id: hal-04083764

https://hal.science/hal-04083764v1

Submitted on 19 Nov 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

Check for updates

OPEN

# Cognitive and plastic recurrent neural network clock model for the judgment of time and its variations

Quentin Hallez<fnref n="1" />,², Martial Mermillod² & Sylvie Droit-Volet³

The aim of this study in the field of computational neurosciences was to simulate and predict inter-individual variability in time judgements with different neuropsychological properties. We propose and test a Simple Recurrent Neural Network-based clock model that is able to account for inter-individual variability in time judgment by adding four new components into the clock system: the first relates to the plasticity of the neural system, the second to the attention allocated to time, the third to the memory of duration, and the fourth to the learning of duration by iteration. A simulation with this model explored its fit with participants' time estimates in a temporal reproduction task undertaken by both children and adults, whose varied cognitive abilities were assessed with neuropsychological tests. The simulation successfully predicted 90% of temporal errors. Our Cognitive and Plastic RNN-Clock model (CP-RNN-Clock), that takes into account the interference arising from a clock system grounded in cognition, was thus validated.

For decades there has been a consensus that humans are equipped with an internal clock system for accurate time measurement<fnref n="1" />,². However, despite having this internal clock system, evidence has accumulated that humans vary in their estimation of time and are prone to the under- and over-estimation of time. These misjudgments of time have been found in particular among individuals with limited cognitive abilities, such as young children³,⁴. Numerous neuropsychological studies which have assessed the cognitive abilities of children of different ages have shown that misjudgments of time increase in line with a decrease in children's abilities, mainly in terms of working memory and attention⁵⁻⁸. In accordance with internal clock models<fnref n="1" />,⁹,¹⁰, researchers have attributed these misjudgments of time to cognitive modules added to the clock module as part of a wider temporal information processing. For example, time distortions have been explained by the time units emitted by the clock not being entered into a person's memory due to a lack of attention allocated to time¹¹ (i.e., the attention hypothesis). They have also been explained by the loss of units in memory when the retention interval increases¹²,¹³ (i.e., the memory hypothesis), and by a noisy representation of the standard duration in reference memory due to a less efficient learning process¹⁴,¹⁵ (i.e., the learning by iteration hypothesis). The reliability of the internal clock system itself has not, therefore, been called into question.

The idea behind the internal clock models is that, for the measurement of time, the brain would be able to automatically extract the temporal properties of neurons that generate oscillatory activity fluctuating from negative to positive states, linked to their action potential. It was initially suggested that the internal clock could operate with a single oscillator, in the pacemaker models⁹,¹⁰,¹⁶. Nonetheless, these models also include a counting system (accumulator) because the neuron would make several revolutions during the duration to be estimated. The so-called pacemaker-accumulator models have been extremely influential in the psychological timing literature². However, they seem difficult to apply from a neurobiological point of view. Inspired by Miall's work¹⁷, Matell and Meck with their Striatal Beat Frequency Model¹⁸ (SBF) then came up with the idea that, if the brain is based on various neurons that oscillate at different frequencies, then it would take many revolutions for the neurons to return to common states, thus making is possible to process both short and long durations, without any counting system. At the beginning of a duration to be estimated, the brain would base its judgment on neurons which have just discharged, and would retain the "signature" specific to the duration by recording

<footnote n="1">¹Université Lumière Lyon 2, Laboratoire Développement, Individu, Processus, Handicap, Éducation (DIPHE), 5 Avenue Pierre Mendès France, 69500 Bron, France. ²Univ. Grenoble Alpes, Univ. Savoie Mont Blanc, CNRS, LPNC, 38000 Grenoble, France. ³Université Clermont Auvergne, CNRS, LAPSCO, Clermont-Ferrand, France. ⁴email: quentin.hallez@gmail.com</footnote>
the state of oscillation of the neurons. Timing could be carried by linear decoders trained to recognize states of a neural network¹⁹.

Recently, Recurrent Neural Networks (RNN) models have successfully simulated the processing of time through neural oscillatory functioning²⁰⁻²⁴. In the current study context of computational neurosciences, we therefore employed a RNN model based on a bank of neurons (see Chapter 2 Model 1, RNN). We did so for three reasons. First, the RNN model is easier to understand with regard to the basic biological properties of the top-down synaptic connectivity of humans²⁵. In top-down processing, perceptions are strongly influenced by cognitive skills that differ between individuals, e.g., prior knowledge²⁶. For example, neurons in the motor cortex increase their synchrony when animals are trained to expect a go'signal²⁷. Second, time perception has been shown to involve top-down processes²⁸, being also influenced by expectations and prior knowledge²⁹,³⁰. Third, the recurrent networks have already proved efficient for a wide range of dynamical phenomena such as facial recognition³¹ and serial recall³². The aim of our study was thus to use the RNN and modify its functioning to simulate the time processing of individuals (i.e., children as well as adults) with various cognitive capacities.

In our study, we therefore tested a RNN model to replicate the oscillatory brain activity involved in time processing with top-down connection for anticipation and prediction processes. However, our originality was to add four new parameters to this model, to allow us to account for inter-individual differences in time judgment (see Chapter 3). In this new model, we added a first parameter enabling consideration of the possibility of a “fallible” clock system. The “fallible” physiological aspect of the clock system can be conceived in terms of neural plasticity. The brain system remains plastic throughout life to allow individuals to learn³³. Young children learn quickly, often even faster than adults, which suggests that their clock system would be highly plastic. However, although greater plasticity promotes learning, it also increases the probability of making critical mistakes due to forgetfulness³⁴. As is explained in more detail below, the clock plasticity is considered in the RNN model by modulating the “Fahlman offset”³⁵. The Fahlman offset, which involves adding a small constant number to the derivative of the sigmoid function so that it does not go to zero for any output value, has proven to be a simple and efficient way to simulate plasticity loss³⁴. For example, adding a constant of 0.1 to the sigmoid function before using it to scale the error prevents neuron values from approaching 0 or 1, and avoids the flat spots in the sigmoid function where the synaptic weights can become entrenched.

In our plastic and cognitive version of the RNN-Clock model, we also added three cognitive parameters based on the results of prior developmental studies which have shown that attention, working memory, and learning for temporal reference memory explain a large proportion of inter-individual differences in temporal judgments³,⁴. As we discuss later, attention was considered in our model by changing the amount of information that could be selected (more or fewer values in the database), varying iterative learning by modulating the number of epochs³⁶, and varying memory by modulating the number of formal neurons embedded in the hidden layer³⁷.

In summary, in our computational modeling approach, we created three versions of the same model allowing us to simulate participants' data in a reproduction task. First, we tested a Simple Recurrent Neural Network (RNN) in order to replicate the Recurrent Neural Network model used in the judgment¹⁸,²⁰. Second, we launched this model multiple times by varying each of the four parameters described above: (1) clock plasticity; (2) attention; (3) temporal learning by iteration; and (4) memory, one by one, in turn. For each simulation we calculated the temporal dispersion coefficient, which was the slope calculated using a linear regression associated with the cumulated Euclidean distance of the error generated by each of the models. Third, we gathered all these temporal dispersion coefficients into a second model, which was a MLP (Multilayer Perceptron) that could hold all the errors of the RNN associated with the different modulations of the four parameters. Fourth, we created a third and final version of our model in order to compare the outputs of that final model with the data collected from 308 human participants in a temporal reproduction task (both children and adults), whose individual cognitive capacities were assessed using neuropsychological tests. The final model used real individual neuropsychological test scores and age (inputs) to compute the state of each of the four parameters of our clock system, in order to predict individual errors in the temporal estimation for a temporal reproduction task (outputs).

## Model 1: recurrent neural network model

**Internal clock basis.** We created a Simple Recurrent Neural Network (RNN) as the basis of our internal clock model. An RNN is an artificial neural network composed of four layers: an input layer ($x_t$), a hidden layer ($h_t$), a context layer ($h_{t-1}$), and an output layer ($y_t$) (see Fig. 1). The input layer ($x_t$) works as a buffer, as the signal is not being transformed. The signal is transformed at the level of the hidden layer ($h_t$) as units interact with each of the neurons of the prior structure by means of a non-linear sigmoid transfer function.

For each time $t$, the activity of the hidden layer ($h_t$) was recorded in the context layer ($h_{t-1}$). The context layer then re-injected the recorded signal in the next iteration $t+1$.

The hidden layer $h_t$ was thus updated for each time $t$ following Eq. (1):

$$h_t = \sigma (Ax_t + R h_{t-1}) \quad (1)$$

where $\sigma$ is the sigmoid activation function applied coordinate wise, while A and R refer to the weight between each of the units. Finally, the output layer ($y_t$) sums the signals fed to it according to Eq. (2):

$$y_t = f(Uh_t) \quad (2)$$

$U$ is the weight assigned by the program for each of the units constituting the hidden layer, and $f$ the soft-max function which converts a vector of real numbers into a probability distribution of possible outcomes. Nevertheless, the system does not find the weight of each of the neurons at one time. Calculation results from so-called gradient retro-propagation, which consists of updating the weight of each neuron from the last layer to the first³⁸. It is therefore necessary to fix the number of allowed epochs. An epoch describes the number of times
<figure><img src="image_3.png" /><figcaption>**Figure 1.** Representation of the Simple Recurrent Neural Network model, with $x_t$ input vector of the 12 oscillators at $t0$, $ht$, hidden layer vector at time $t$; $x_{t+1}$ output vector; A, R, U parameters paired with each layer. The Figure was designed by the present authors.</figcaption></figure>

the algorithm sees the entire dataset. So, each time the algorithm has seen all samples in the dataset, an epoch is completed. Once the retro-propagation of the gradient is complete based on the number of epochs, we can then calculate the error between the output given by the network and the predicted vector of the output.

Within our RNN, a total of 12 formal oscillatory neurons were inserted as input neurons, each one corresponding to a neuron fluctuating from negative to positive states every $t_{\text{millisecond}}$. The respective values of the oscillators (see Fig. 2) were (Hz): $F_{01}=32.9$, $F_{02}=33.2$, $F_{03}=33.6$, $F_{04}=34$, $F_{05}=34.3$, $F_{06}=34.7$, $F_{07}=35.1$, $F_{08}=35.5$, $F_{09}=35.9$, $F_{010}=36.3$, $F_{011}=36.8$, $F_{012}=37.2$. These Hertz values were selected for their similarity to the pattern of neural gamma oscillations observed in humans³⁹, which have been detected in the process of awakening⁴⁰. In addition, in our model, such as in the SBF model, the selected neurons for the measurement of time were

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Representation of oscillation value for each oscillator.</figcaption></figure>
synchronized at the beginning of a stimulus to be timed. The 12 oscillators started at 0.5 for $t_0$. Therefore, values lower and higher than 0.5 suggest a negative and a positive state, respectively. The model also creates an output of the recurrence, but its use is inherent to the model and its output value is not used later. The output of the model is therefore the prediction of the state of each of the 12 oscillators.

In other words, the inputs of the first model correspond to the oscillations holding a certain value which differs at each millisecond depending on their rates. Then, the model learns by backpropagation to find $t+1$ based on $t$ for each millisecond duration. Finally, the model tries to estimate a duration from the initial oscillation's state by adding $t+1$ (e.g., +1 ms) until reaching the duration it must estimate. Predictions of oscillators' states were thus made for every $t_{\text{millisecond}}$. That being so, if a participant has to estimate exactly two seconds, then we are interested in the predictions based on the prediction of the oscillator's state at $t_{2000}$. This operating logic creates an error for every millisecond (Fig. 3A) accumulated (Fig. 3B), which is the cumulative average of the Euclidean distance averages of the objective—subjective differences. This also allows the model to reproduce the scalar properties of timing (e.g., an increase in error over time) characteristic of timing in human².

In our model, the synaptic weights were adjusted by means of stochastic back-propagation. The momentum was fixed to 0.9 and the learning rate to 0.1. This learning rate parameter was chosen because it produces the fastest convergence⁴¹ and corresponds to the standard value of the learning rate generally used. In addition, in our simulation we fixed the standard back-propagation (number of epochs) to 500, the training to a maximum of 4096 ms, the Fahlman offset to 0.1, and the number of formal neurons in the hidden layer to 16, although we modulated the modalities of these variables later. Figure 3 shows the $t$ values estimated from the model from 0 to 4096 ms for normal Euclidean distance (Fig. 3A) and cumulative Euclidean distance (Fig. 3B) for these specific parameters.

**Plastic-clock and cognitive components in the RNN clock model.** The aim of our model was to grasp the greater time distortion and the greater temporal variability in participants with lower cognitive capacities (including children of different ages and adults). We therefore modulated a total of four components: plasticity, temporal learning by iteration, memory, and attention.

With regard to attention, when participants have difficulty paying attention to time, their time estimates are noisier⁶,⁷,⁴². In our model, the *attention* parameter was located in the input layer, $X_t$, and attention deficit results in a decrease in the amount of information presented in the database relating to the evolution of oscillators' states according to the progress of $t$ (as is illustrated in Fig. 4 by black squares). The system can therefore trace the evolution of oscillations up to 1024, 1792, 2560, 3328 or 4096 ms.

The *memory* parameter was located in the hidden layers, $H_t$. We acted on the memory system by increasing or decreasing the retention capacity via changing the number of formal neurons within the hidden layers. Indeed, increasing the number of neurons increases the model's capacity to remember what has previously been presented in the database³⁷. We thus chose a varied number of neurons, i.e., 8, 16, 32, 64, and 128, in the hidden layer in order to model this variable. Furthermore, as was explained above, a plastic system leads to faster learning but also to further forgetting, thus corresponding to the loss by the subject of the state of oscillations. As plasticity is associated with forgetting, it occurs during the computation as illustrated in Fig. 4 via the grey squares on $Y_t$. During the computing—that is, during the temporal processing—the subject may indeed lose track of the accumulated units if the plasticity is too high.

For the *clock plasticity*, as reported above, we acted on this *parameter* by changing the Fahlman offset³². The Fahlman offset index = 0.01, 0.015, 0.03, 0.06, 0.125, 0.25 and 0.5. In our neural networks model, the timer of the clock-like system is thus associated with a memory system, as has already been suggested by other authors¹,¹². Finally, the predictions join the *iterative learning* structure (see Fig. 4). It is at this level that the subject makes his/her judgment. Nevertheless, in the case of iterative temporal learning, the whole operation will restart, thus gradually increasing the proportion of noise in the temporal reference memory. This learning-by-iteration

<figure><img src="image_5.png" /><figcaption>**Figure 3.** Illustration of (A) Euclidean distance and (B) cumulative Euclidean distance for each millisecond.</figcaption></figure>
<figure><img src="image_6.png" /><figcaption>**Figure 4.** Simplified illustration of Cognitive and Plastic RNN clock model (CPC model). The first table shows the oscillation over time (from 0 to 1) of 12 neuronal oscillators. The oscillation information is more or less integrated according to subjects' attentional capacities. An attention deficit generates a lack of information for a given time and a given oscillator (represented in the graph by black squares). The information held with respect to these oscillators is then combined into a memory system so it can generalise the anchored information. The information that springs out of this structure corresponds to the temporal estimation of the subject, to which gray squares have been added, corresponding to forgetfulness. The proportion of forgetfulness corresponds to plasticity (Fahlman offset), since a more plastic system learns faster but also forgets more easily. Finally, the subject can give an estimate which corresponds to the cumulative average of the Euclidean distance averages of the objective—subjective differences. Nevertheless, in the case of iterative temporal learning, the whole operation will be restarted. Further, predictions will increasingly suffer from the weight of the prior estimation, which will scramble the initial standard duration, thus increasing the proportion of noise in the reference memory.</figcaption></figure>
parameter involved in temporal reference was modulated by modifying the number of epochs³⁶. As previously stated, an epoch corresponds to the number of times the algorithm sees the complete dataset. This factor has been linked with iterative learning, as less learning solicits less feedback and thereby fewer epochs. The selected epochs were 100, 200, 300, 400, 500.

The model was launched 875 times, modulating each parameter one by one (5 attention modalities × 5 memory modalities × 5 learning iteration × 7 plasticity = 875). Based on each of these computations the program predicted, with more or less error (e.g., Euclidean distance), the states of each of the 12 oscillators from 1 to 4095 ms. Based on the cumulated Euclidean distance of this error through time, we launched a linear regression in order to generate an error slope that we called a temporal dispersion coefficient, associated with each of the computations (all ps < 0.001; R² ≥ 0.98). The link to OSF (section linear estimations) shows the matched dispersion coefficient with the different values of each parameter, i.e., for different numbers of neurons (memory parameter), different plasticity values (Fahlman offset), different epochs (learning parameter) and different amounts of information presented in the input database (attention parameter). In order to statistically analyse this influence, we calculated the mean error when we varied the values of a parameter, independently of other parameters. A first ANOVA was launched on the memory parameter, that is, the five neuron conditions (8, 16, 32, 64 and 128 neurons) inserted within the hidden layer. The ANOVA showed a significant main effect of this variable, F(4, 696) = 325.99, p < 0.001, η²ₚ = 0.65. As shown Table 1, additional paired t-test revealed that all the conditions differed from each other (Bonferroni, ps < 0.001), generating decreased errors as the number of neurons implemented in the hidden layer increased (M₈neurons = 0.275; M₁₆neurons = 0.221; M₃₂neurons = 0.192; M₆₄neurons = 0.164; M₁₂₈neurons = 0.143). Significant main effect also occurred in the ANOVA for the attention parameter, F(4, 696) = 15.66, p < 0.001, η²ₚ = 0.10. Additional paired t-tests showed that conditions differed significantly from each other depending on the input data (the implemented database contained the values of the 12 oscillators up to 1024; 1792, 2560, 3328 or 4096 ms). As can be seen in Table 2, errors seem to decrease as the database was provided. Yet, after a threshold of 2560 was reached, it appears that further implemented data does not help the system to work better (M₁₀₂₃ = 0.196; M₁₇₉₂ = 0.191; M₂₅₆₀ = 0.201; M₃₃₄ = 0.203; M₄₀₉₆ = 0.203). This suggests a threshold effect of attention beyond which more attention does not have much influence. The ANOVA on learning-by-iteration parameter (Number of Epochs) also showed a main effect, F(4, 696) = 14.18, p < 0.001, η²ₚ = 0.07, and the last ANOVA also found a significant effect for the plasticity parameter (Fahlman offset), F(6, 744) = 597.78, p < 0.001, η²ₚ = 0.83. Contrasts are exposed Tables 3 and 4 for learning-by-iteration and plasticity parameters, respectively. From a general point of view, it can be said that the errors increased with an increase in the learning by iteration values (M₉₄ₐ₀₀ = 0.194; M₉₄ₐ₀₀ = 0.198; M₉₄ₐ₀₃ = 0.199; M₉₄ₐ₀₄ = 0.201;

<table><caption>**Table 1.** Within-subjects effects of the memory parameter (neurons implementation).</caption><thead><tr><th>Neurons implementation</th><th>Neurons implementation</th><th>Δ Mean (SE)</th><th>95% CI</th><th>t value</th><th>p<sub>bonf</sub></th></tr></thead><tbody><tr><td rowspan="4">8</td><td>16</td><td>0.054 (0.004)</td><td>[0.04; 0.07]</td><td>13.405</td><td>&lt; 0.001</td></tr><tr><td>32</td><td>0.083 (0.004)</td><td>[0.07; 0.09]</td><td>20.429</td><td>&lt; 0.001</td></tr><tr><td>64</td><td>0.111 (0.004)</td><td>[0.10; 0.12]</td><td>27.465</td><td>&lt; 0.001</td></tr><tr><td>128</td><td>0.132 (0.004)</td><td>[0.12; 0.14]</td><td>32.646</td><td>&lt; 0.001</td></tr><tr><td rowspan="3">16</td><td>32</td><td>0.028 (0.004)</td><td>[0.02; 0.04]</td><td>7.024</td><td>&lt; 0.001</td></tr><tr><td>64</td><td>0.057 (0.004)</td><td>[0.05; 0.07]</td><td>14.060</td><td>&lt; 0.001</td></tr><tr><td>128</td><td>0.078 (0.004)</td><td>[0.07; 0.09]</td><td>19.241</td><td>&lt; 0.001</td></tr><tr><td rowspan="2">32</td><td>64</td><td>0.028 (0.004)</td><td>[0.02; 0.04]</td><td>7.036</td><td>&lt; 0.001</td></tr><tr><td>128</td><td>0.049 (0.004)</td><td>[0.04; 0.06]</td><td>12.217</td><td>&lt; 0.001</td></tr><tr><td>64</td><td>128</td><td>0.021 (0.004)</td><td>[0.01; 0.03]</td><td>5.181</td><td>&lt; 0.001</td></tr></tbody></table>

<table><caption>**Table 2.** Within-subjects effects of the attention parameter (database implementation).</caption><thead><tr><th>Database implementation</th><th>Database implementation</th><th>Δ Mean (SE)</th><th>95% CI</th><th>t value</th><th>p<sub>bonf</sub></th></tr></thead><tbody><tr><td rowspan="4">1024</td><td>1792</td><td>0.005 (0.002)</td><td>[0.00; 0.01]</td><td>0.010</td><td>0.043</td></tr><tr><td>2560</td><td>-0.004 (0.002)</td><td>[-0.01; 0.000]</td><td>6.757e-4</td><td>0.151</td></tr><tr><td>3328</td><td>-0.007 (0.002)</td><td>[-0.01; -0.002]</td><td>-0.002</td><td>0.002</td></tr><tr><td>4096</td><td>-0.006 (0.002)</td><td>[-0.01; -0.001]</td><td>-0.001</td><td>0.003</td></tr><tr><td rowspan="3">1792</td><td>2560</td><td>-0.009 (0.002)</td><td>[-0.01; -0.004]</td><td>-0.004</td><td>&lt; 0.001</td></tr><tr><td>3328</td><td>-0.012 (0.002)</td><td>[-0.02; -0.007]</td><td>-0.007</td><td>&lt; 0.001</td></tr><tr><td>4096</td><td>-0.012 (0.002)</td><td>[-0.02; -0.007]</td><td>-0.007</td><td>&lt; 0.001</td></tr><tr><td rowspan="2">2560</td><td>3328</td><td>-0.002 (0.002)</td><td>[-0.07; 0.003]</td><td>0.003</td><td>1.000</td></tr><tr><td>4096</td><td>-0.002 (0.002)</td><td>[-0.07; 0.003]</td><td>0.003</td><td>1.000</td></tr><tr><td>3328</td><td>4096</td><td>0.000 (0.002)</td><td>[-0.05; 0.005]</td><td>0.005</td><td>1.000</td></tr></tbody></table>
<table><caption>**Table 3.** Within-subjects effects of the learning iteration parameter (epoch modulation).</caption><thead><tr><th>Epoch implementation</th><th>Epoch implementation</th><th>Δ Mean (SE)</th><th>95% CI</th><th>t value</th><th>P<sub>bonf</sub></th></tr></thead><tbody><tr><td rowspan="4">100</td><td>200</td><td>-0.004 (0.001)</td><td>[-0.01; -0.001]</td><td>-3.091</td><td>0.021</td></tr><tr><td>300</td><td>-0.005 (0.001)</td><td>[-0.01; -0.002]</td><td>-4.203</td><td>&lt;0.001</td></tr><tr><td>400</td><td>-0.007 (0.001)</td><td>[-0.01; -0.004]</td><td>-5.708</td><td>&lt;0.001</td></tr><tr><td>500</td><td>-0.009 (0.001)</td><td>[-0.012; -0.005]</td><td>-6.930</td><td>&lt;0.001</td></tr><tr><td rowspan="3">200</td><td>300</td><td>-0.001 (0.001)</td><td>[-0.005; 0.002]</td><td>-1.112</td><td>1.000</td></tr><tr><td>400</td><td>-0.003 (0.001)</td><td>[-0.01; -0.001]</td><td>-2.616</td><td>0.091</td></tr><tr><td>500</td><td>-0.005 (0.001)</td><td>[-0.01; -0.001]</td><td>-3.839</td><td>0.001</td></tr><tr><td rowspan="2">300</td><td>400</td><td>-0.002 (0.001)</td><td>[-0.005; 0.002]</td><td>-1.504</td><td>1.000</td></tr><tr><td>500</td><td>-0.003 (0.001)</td><td>[-0.01; -0.001]</td><td>-2.726</td><td>0.066</td></tr><tr><td>400</td><td>500</td><td>-0.002 (0.001)</td><td>[-0.005; 0.002]</td><td>-1.222</td><td>1.000</td></tr></tbody></table>

<table><caption>**Table 4.** Within-subjects effects of the clock plasticity parameter (Fahlman offset modulation).</caption><thead><tr><th>Fahlman offset</th><th>Fahlman offset</th><th>Δ Mean (SE)</th><th>95% CI</th><th>t value</th><th>P<sub>bonf</sub></th></tr></thead><tbody><tr><td rowspan="6">0.01</td><td>0.015</td><td>-0.005 (0.005)</td><td>[-0.02; 0.01]</td><td>-1.162</td><td>1.000</td></tr><tr><td>0.03</td><td>-0.027 (0.005)</td><td>[-0.04; -0.01]</td><td>-5.708</td><td>&lt;0.001</td></tr><tr><td>0.06</td><td>-0.079 (0.005)</td><td>[-0.09; -0.06]</td><td>-17.007</td><td>&lt;0.001</td></tr><tr><td>0.125</td><td>-0.151 (0.005)</td><td>[-0.16; -0.14]</td><td>-32.375</td><td>&lt;0.001</td></tr><tr><td>0.25</td><td>-0.173 (0.005)</td><td>[-0.19; -0.16]</td><td>-37.073</td><td>&lt;0.001</td></tr><tr><td>0.5</td><td>-0.185 (0.005)</td><td>[-0.20; -0.17]</td><td>-39.688</td><td>&lt;0.001</td></tr><tr><td rowspan="6">0.015</td><td>0.03</td><td>-0.021 (0.005)</td><td>[-0.03; -0.01]</td><td>-4.547</td><td>&lt;0.001</td></tr><tr><td>0.06</td><td>-0.074 (0.005)</td><td>[-0.09; -0.06]</td><td>-15.845</td><td>&lt;0.001</td></tr><tr><td>0.125</td><td>-0.145 (0.005)</td><td>[-0.16; -0.13]</td><td>-31.213</td><td>&lt;0.001</td></tr><tr><td>0.25</td><td>-0.167 (0.005)</td><td>[-0.18; -0.15]</td><td>-35.912</td><td>&lt;0.001</td></tr><tr><td>0.5</td><td>-0.179 (0.005)</td><td>[-0.19; -0.16]</td><td>-38.526</td><td>&lt;0.001</td></tr><tr><td>0.06</td><td>-0.053 (0.005)</td><td>[-0.07; -0.04]</td><td>-11.298</td><td>&lt;0.001</td></tr><tr><td rowspan="4">0.03</td><td>0.125</td><td>-0.124 (0.005)</td><td>[-0.14; -0.11]</td><td>-26.666</td><td>&lt;0.001</td></tr><tr><td>0.25</td><td>-0.146 (0.005)</td><td>[-0.16; -0.13]</td><td>-31.365</td><td>&lt;0.001</td></tr><tr><td>0.5</td><td>-0.158 (0.005)</td><td>[-0.17; -0.14]</td><td>-33.979</td><td>&lt;0.001</td></tr><tr><td>0.125</td><td>-0.072 (0.005)</td><td>[-0.09; -0.06]</td><td>-15.368</td><td>&lt;0.001</td></tr><tr><td rowspan="2">0.06</td><td>0.25</td><td>-0.093 (0.005)</td><td>[-0.11; -0.08]</td><td>-20.067</td><td>&lt;0.001</td></tr><tr><td>0.5</td><td>-0.106 (0.005)</td><td>[-0.12; -0.09]</td><td>-22.681</td><td>&lt;0.001</td></tr><tr><td rowspan="2">0.125</td><td>0.25</td><td>-0.022 (0.005)</td><td>[-0.04; -0.01]</td><td>-4.699</td><td>&lt;0.001</td></tr><tr><td>0.5</td><td>-0.034 (0.005)</td><td>[-0.05; -0.02]</td><td>-7.313</td><td>&lt;0.001</td></tr><tr><td>0.25</td><td>0.5</td><td>-0.012 (0.005)</td><td>[-0.03; 0.002]</td><td>-2.614</td><td>0.192</td></tr></tbody></table>

$M_{epoch00} = 0.202$), as well with an increase in the plasticity values ($M_{offset,01} = 0.110$; $M_{offset,01.5} = 0.116$; $M_{offset,0.3} = 0.137$; $M_{offset,0.6} = 0.189$; $M_{offset,0.125} = 0.261$; $M_{offset,0.25} = 0.283$; $M_{offset,0.5} = 0.295$). It is important to recall that the low p-values mentioned above are usual for neural network simulations because the variability around the means is very low.

In conclusion, as these four parameters related to cognitive and plasticity factors significantly affected the proportion of error in time judgment, we retained the relevant parameters for the elaboration of our Plastic and Cognitive RNN-clock model (CP-RNN-Clock).

## Model 2: the plastic and cognitive RNN inserted within an MLP

**Multilayer perceptron integrating the RNN data.** So far, we have modulated four parameters in the RNN to be able to test and model the effect they generated. These variables had an effect on the temporal dispersion coefficient. The objective was then to gather these four variables within the same neural system to test if they matched up with real data. In order to do so, we gathered the results of the launched computation in a Multi-Layer Perceptron (MLP). It would not have been sufficient to use the RNN a second time, because this would have inserted bias a second time via the previous estimate (t-1). The MLP is an artificial neural network similar to that of the RNN, the difference being that recurrent top-down connections are extracted from the model. The architecture thus enables a feedforward mode of operation (as the context layer is no longer present).
**Model construction and stimuli.** The totality of the temporal dispersion coefficients paired with each parameters were normalised on a [0; +1] scale, with the minimum and maximum values being equal to 0 and 1, respectively and inserted as an input layer of a Multi-Layer Perceptron (MLP). Thereby, there were four input variables, namely the number of epochs (*iterative learning parameter*), the amount of information added to the database (*attention parameter*), the plasticity (*plasticity parameter*), and the number of neurons constituting the hidden layer (*h*₁ (*memory parameter*). There was also a fifth input variable, corresponding to bias. The bias is an additional parameter in Neural Networks which is used to adjust the output along with the weighted sum of the inputs to the neuron. We used the “Regressor” of the python’s neural network toolbox named the “scikit-neural network” to represent this bias. This tool connects the neural network to the given continuous data, treating them as a non-linear regression model. The output of the model was the same output as the initial RNN model (e.g., temporal dispersion coefficient), in order to verify whether or not the new MLP model directly integrating our variables could predict the RNN model.

To sum up, the inputs were the temporal dispersion coefficients paired with the 4 parameters (so 4 inputs; *iterative learning*, *attention*, *memory*, *plasticity*) normalized on a [0; +1] scale. From all of these initial values, the program had to find a way to re-find each of the dispersion coefficient calculated by the RNN. The output was the dispersion coefficients found based on the modulation of the 4 parameters. The advantage of this process is that it allows the influence of a parameter and its interactions to be treated along a continuous dimension and thus to generalize from the simulated elements. For example, the program can pick a parameter value that lies in the middle of the interval modalities tested by the RNN.

**Computer simulation.** In order to find the best hidden architecture, we ran the model with a range from 8 to 28 neurons constituting the hidden layer. In addition, we tested different combinations with the possibility of multiple hidden layers. Combinations were systematically tested in a linear order, with the constraint for the additional hidden layer of being inferior to the previous one, and being composed of a minimum of three neurons. This specific procedure was chosen in order to use a modeling aspect of the neural network and not a deep-learning one. Our simulations generated a model with 28 neurons made of three hidden layers (4 – [15 – 10 – 3] – 1). This simulation was preserved because it best minimised the mean square error compared to the other architectures tested. Figure 5 shows the differences in predictions made by our previous RNN model and the new MLP model directly integrating the four parameters. This specific multi-layer perceptron model is able to determine almost all the temporal dispersions of the RNN model (R² = 0.99; LSD = 0.00009; EM = 0.007; EQR = 0.004; EAR = 0.04). We can therefore conclude that our new MLP model, integrating our developmental parameters, is very satisfying, and that it reproduces the properties of the RNN.

## Model 3: fitting the MLP model to participants’ time estimates

**Model construction and real data.** Until this point, we had worked on a coefficient of temporal dispersion calculated from the difference between the prediction of the state of the oscillators and their actual state. Our next goal was to compare the results of our MLP model which integrated all the RNN simulations with real

<figure><img src="image_7.png" /><figcaption>**Figure 5.** Illustration of data fit with the top panel showing the Euclidean distance values (i.e. the average error produced by the network) observed from the RNN model in blue and estimated by the MLP model in orange with time *t*. The second panel shows the paired square errors.</figcaption></figure>
data, to verify its ability to predict real participants' time estimates according to their inter-individual differences in terms of age and cognitive abilities. The participants' data were drawn from two different experiments⁷,⁴² in which they had to reproduce the duration of a light blue square lasting for 3, 6, 9, or 12 s. In total, the data (time estimates) consisted of 2055 temporal reproductions, of which 1358 were made by 192 children aged from 5 to 8 years old (M = 6.62 years, SD = 1.02 years, [5.0; 8.0 years]), and the remaining 697 were made by 116 adults (M = 21.00, SD = 4.17, [17.9; 41.8]). For each temporal reproduction, we calculated the absolute time error made by the participants ((Temporal Reproduction – Temporal Target) / Temporal Target)² to avoid negative and positive values. From these data, 163 productions were rejected (7.93% of the total sample), including 113 children' productions (8.32% of the child sample) and 50 adults' productions (7.17% of the adult sample), because they were less than or superior to the 1.5 interquartile range. This made a total of 1892 reliable productions. Figure 6 shows the real temporal coefficient distortion paired with subjects classified by age in months.

For each participant, we also had access to different neuropsychological scores assessing their capacities of attention, short-term memory, working memory, and processing speed. These individual scores were obtained respectively in the “Sky Search” test of the scale of Everyday Attention for Children⁴³, the forward and backward scores of the corsi-block tapping test⁴⁴, and the IVT scores measured from the Code A and the Symbol A tests of the Wechsler Intelligent Scale for Children⁴⁵. The choice of these tests was based on the fact that they show heterogeneity in scores among participants, even among adults (see Table 5).

So far, with the MLP integrating the RNN data (4 – 15 – 10 – 3 – 1), we have worked on simulated effects to modulate the four parameters. As a reminder, this MLP started with the 4 parameters as input to predict a temporal dispersion (coefficient of dispersion) as output. To analyze the relevance of the model, it is necessary to be able to adapt the four components according to the participants' neuropsychological scores. This is why a second MLP, which precedes the MLP integrating RNN data, was used to bridge the gap between the individual neuropsychological scores and the 4 components. The idea is to have a sequential processing with a prior MLP, which is the only structure to be dynamic, which precedes the MLP integrating the RNN data, which is fixed and cannot be modulated. To summarize, this final model started with neuropsychological test scores (short-term memory, working memory and processing speed scores) as well as participants' ages in months as input, to compute the state of the 4 parameters which itself finds the related dispersion coefficient. The learning base was the absolute time error made by participants.

**The results of the fitting.** To find the best hidden architecture of the prior MLP, which precedes the MLP integrating RNN data, we applied the same procedure as earlier, computing different architecture from 5 to 12 neurons and combining the number of hidden layers. Let's remind that only the prior MLP was dynamic and

<figure><img src="image_8.png" /><figcaption>**Figure 6.** Box-and-whisker of the temporal estimation bias in children and adults with outsider productions represented by circles.</figcaption></figure>

<table><caption>**Table 5.** Mean, Standard Deviation, minimum and maximum of raw scores of different neuropsychological tests.</caption><thead><tr><th rowspan="2"></th><th colspan="3">Children</th><th colspan="3">Adults</th></tr><tr><th>Mean</th><th>SD</th><th>[Min, Max]</th><th>Mean</th><th>SD</th><th>[Min, Max]</th></tr></thead><tbody><tr><td>Short-term memory</td><td>5.55</td><td>1.91</td><td>[2; 12]</td><td>8.91</td><td>1.83</td><td>[5; 13]</td></tr><tr><td>Working memory</td><td>4.43</td><td>2.18</td><td>[0; 9]</td><td>8.61</td><td>1.73</td><td>[4; 12]</td></tr><tr><td>Attention</td><td>19.23</td><td>16.94</td><td>[4; 87]</td><td>3.81</td><td>1.49</td><td>[2; 8]</td></tr><tr><td>Processing speed</td><td>44.28</td><td>26.28</td><td>[4; 51]</td><td>59.2</td><td>8.87</td><td>[27; 87]</td></tr></tbody></table>
could be modulated by the computations, as MLP integrating RNN data was fixed. A model emerged from the computed cases. Figure 7 shows the predictions made by the serial MLPs [5 – 10 – 4 – 15 – 10 – 3 – 1] (The elements in bold constituting the structure of the MLP integrating RNN data). This model is presented here because it obtained the highest level of coefficient of determination when compared with real data (R² = 0.90, LSD = 0.009, EM = 0.06, EQR = 1.50, EAR = 0.44).

Through a comparison of means, these final outputs were compared with those of the actual temporal dispersion generated by the participants. Figure 7 shows the one-to-one comparisons between the model's predictions and actual participant estimates. The results confirmed that the model can predict the state of individuals' internal clock parameters based on their cognitive abilities and age. From these computed parameters, the internal clock predicted 90% of the variance of the estimation biases of a sample of real subjects comprising both children and adults.

Discussion

The aim of this study was to propose a new model of internal clock grounded in cognition that we called the Cognitive and Plastic RNN-Clock model (CP-RNN-Clock model). Recently, RNN models have been successfully used to simulate temporal estimates in humans¹⁶,¹⁷. Therefore, we initially tested a Simple RNN clock model, holding the value of each of the oscillations over time (input), to make a judgment on the state of these same oscillators after a certain time (output). The input information was then transformed via a hidden layer, which constantly biases the prediction since it systematically takes into account the combination corresponding to the previous time. Therefore, the prediction of the duration lays on the prediction error (i.e., the cumulative Euclidean distance) between the real state of the oscillators and the prediction for this *t* time. Thereby, the model presents an increase in errors with the passage of time. Our model thus allows the reproduction of the scalar properties of time perception. Indeed, this cumulative Euclidean distance showed that the errors gradually increased over time, therefore testifying to the gradual variance in the model, resulting in further under- or overestimation with the passage of time. Importantly, the increase over time of the errors results from the mechanism of the neural system which we accumulated and does not result from an additional input within the model, as has been done in other models⁴⁶.

The interest of our model is that it is neurobiologically plausible. Indeed, it is based on the rhythmic activity of a bank of oscillators (a set of neurons) that changes state frequently, as proposed in recent neuroscience models on time perception¹⁸,²³,⁴⁷⁻⁴⁹. In addition, the neural frequencies used in our model (32.9–37.2 Hz) are similar to the pattern of neural gamma oscillations observed in humans in the waking state³⁹,⁴⁰. Furthermore, the Simple RNN used in our study includes a loop that is consistent with the cortico-striato-thalamo-cortical loop described in prior imagery studies on timing⁵⁰,⁵² and in the Striatal Beat Frequency model (SBF) proposed by

<figure><img src="image_9.png" /><figcaption>**Figure 7.** Fitting data with the top panel showing the Euclidean distance values observed from the participants' productions in blue and estimated by our clock model in orange with time *t*. The second panel shows the paired square errors.</figcaption></figure>
Mattel and Meck¹⁸. Consistently with the SBF, our model assumes that cortical oscillators have to be phase-reset, such that they always start from the same fixed state. This is in line with findings showing that phase resetting of ongoing theta oscillations in the medial frontal cortex results in better timing accuracy⁵³. Our model also suggests that, once synchronous, the neurons of the cortex begin their rhythmic activity. According to the SBF model, the neurons of the striatum would then play the role of coincidence detector between the state of the various oscillators, since this one receives the entirety of the nervous influx generated simultaneously by the cortex and the thalamus. In other words, the duration would be perceived by neural integration mechanism when the striatal spiny neuron detects the synchronicity of a cortical projection, emerging at the end of the temporal interval. However, for the striatal neuron to retain the pattern of oscillations, it must first have received a sudden dopamine influx. It is this transfer of dopamine that would allow it to go from a Long Term Depression (LTD) where the neuron is inactive, to Long Term Potentiation (LTP) where it can enter into action potential. When a neuron in the striatum recognizes the oscillatory signature associated with the duration of a particular event, the dopamine discharge takes place at the beginning and no longer at the end of the evoked potential. This therefore allows the neuron to enter into an LTP phase, indicating the striatal neuron to start analyzing the oscillatory patterns which reach them until it recognizes the combination (i.e., signature) that corresponds to the end of the duration of the event. Subsequently, information from the striatal spiny neuron is integrated by the basal ganglia and then transferred to the thalamus to generate behavioral expression.

However, unlike the SBF model, in our model, the selected oscillators would never return to a common state during time estimation. Conversely, they would present a progressive desynchronization. This would induce an increase in the error, i.e., the source of the scalar property of time. The strength of our model is therefore that it includes in its functioning the scalar properties of time. Changes in tonic dopamine levels in the brain induced by drugs⁵⁴,⁵⁵, or high arousal emotion⁵⁶,⁵⁷ have been shown to accelerate oscillatory activity, thereby producing effects of lengthening time estimates. Theoretically, our model could be able to simulate this other neural phenomenon by generating a faster desynchronization over time. Our model is also neurologically viable because it is based on the use of a RNN to simulate the top-down processing²⁵. This is an important feature of the model since the explicit judgment of time is precisely based on top-down processing²⁸. Finally, as recent studies demonstrate, the backpropagation exhibited in the model could be a good candidate for neurobiological processes since similar but local training algorithms like equilibrium propagation or energy-based models could actually be very similar to brain-inspired learning rules⁵⁸⁻⁶⁰.

Our model was restarted a number of times by changing four parameters of whom 3 were related to cognitive capacities (attention, memory, temporal iterative learning), the fourth being the plasticity of the clock system. We have demonstrated that each of these four parameters had a direct effect on the temporal prediction. Attention was considered in our model via the amount of information held by the model in input. Indeed, lower attention generates a decrease in the relevant information that can be collected in the environment since the information cannot pass the conscious threshold. Meanwhile, increased attention resulted in a decrease in errors. Indeed, our model showed that a higher attention parameter value results in lower errors. Retention capacity in memory was integrated in our model by changing the number of hidden layer neurons. As we have demonstrated, an increase in neurons in the hidden layer leads to a decrease in errors. By changing the Fahlman offset index, we also decreased the temporal dispersion, thereby demonstrating that there could be plasticity effects in the internal clock system. Indeed, as we have explained, a high plasticity setting (characteristic of young children⁶¹) allows the model to learn faster but can also more frequently give rise to forgetfulness related to a lack of stability, thus resulting in critical prediction errors. Finally, the learning iteration was considered by changing the number of epochs. Increasing the number of epochs increases the number of feedbacks between objective and subjective duration, consequently increasing temporal distortion, and thus having the effect of gradually increasing the time estimation error. We then launched a linear regression on the cumulative Euclidean distance of each of the models launched in order to gain a temporal dispersion coefficient associated with each of the parameter modulations.

The temporal distortion coefficients were then inserted as inputs into a MLP model, that was shown to predict more than 99% of the RNN system estimates. Finally, we compared the results generated by this model with real estimates made by a sample of 192 children aged from 5 to 8 as well as 116 adults. We therefore had to bridge the gap between individual cognitive capacities and the MLP integrating RNN data. To do so, we built a prior MLP, which estimates the 4 parameters based on individual cognitive capacities (short-term memory, working memory and processing speed scores), as well as their ages in months. Let's remind that only the prior MLP was dynamic, while MLP integrating RNN data was fixed. Mathematical models based on the Scalar Timing Theory¹,⁶² have already been developed in order to find the values of tested parameters corresponding to time estimates of each participant⁶³⁻⁶⁵. However, these models and our neural network model differ both in their purpose and their elaboration. In particular, the estimations of parameters of our model directly resulted from the participants' individual neuropsychological attention, short-term memory, working memory and processing speed scores, as well as their ages in months. Thus, our model demonstrates how a clock system including cognitive mechanisms, that can be deficient, produces time distortions. Further, our model accounts for more than 90% of the output variance.

The inclusion of these different cognitive variables in our neurological model is important. Indeed, attention has been clearly shown to modulate of neuron synchrony, such as in the somatosensory⁶⁶ or visual cortice⁶⁷. Consequently, any variation in the amount of attention devoted to time would alter the normal oscillation of neurons, thus producing higher distortion over time which is in line with previous studies on time perception. It was also shown that entrained interval can modulate the neural activity peak at the end of the memorized duration⁶⁸. How cognitive activity affects neurological processes is still a mystery. One could nevertheless suggest that most of these variables (plasticity, memory and learning by iteration) acts at this level of neural activity peak, in particular when the striatal neuron receives the cortical projections. These factors could for example
contribute to reduce the dopaminergic discharge and noisy the moment when the striatal neuron receives the
signature that corresponds to the duration to be estimated.

The originality of our clock model lies mainly in the fact that it is grounded in cognition. As explained above, it is based on the import of clock plasticity and cognitive parameters directly into the operations of the RNN clock model. Including these parameters allowed us to simulate the bias in time estimates and thus to identify the sources of variances due to cognitive and clock-related factors. Consistently with prior studies on time judgments in children with limited cognitive capacities, our model uses neural network mechanisms to explain how decreased attention and memory capacities generate increased temporal errors³⁻⁸. It also explains how the plasticity of a system and learning iteration increases errors in the temporal memory reference²⁹,³⁰. Therefore, our model produced data consistent with developmental studies showing that children can process time at an early age, and that age-related differences in time judgments are mainly due to the development of cognitive capacities³,⁴.

Furthermore, the state of the internal clock's four parameters were computed based on individual variables (attention, age in months, speed index treatment, short-term memory, and working-memory), suggesting that the weights of interference generated by our plastic and cognitive parameters did not vary by age per se, but maintained the same weight through age, at least from the age of 5 onwards. Indeed, if the variables did not had the same weight in the explanation of the temporal estimation biases in children and adults, it would not have been possible to explain the biases in a common way. Therefore, our model accounts for inter-individual differences in judgment errors. Finally, the model respects the parameter of ordinality, as it knows that $t_0$ is greater than $t_1$. Indeed, the advantage of an RNN is to intrinsically contain this ordinality given that the snowball effect between the hidden layer and the input layer makes it possible to predict $t_{1+}$ on the basis of t, itself predicted by $t_{-1}$, predicted by $t_{-2}$...

To the best of our knowledge, this is the first functional clock model based on RNN which is able to explain the inter-individual differences in time judgments related to limited cognitive capacities. However, our Plastic and Cognitive RNN-clock model has some limitations. First, it allows appreciation of the importance of temporal bias, but not its direction (i.e., towards a temporal under- or overestimation). Second, the output variables used in our model were based on a single temporal task, i.e., a temporal reproduction task, and a single sensory modality, i.e., visual stimuli. It is possible that the weight of cognitive capacities would change in the context of other temporal tasks which are more or less cognitively demanding, such as a dual-task paradigm. With other tasks, it could also be necessary to add a decisional rule. In bisection tasks, it has, for example, been shown that the degree of confidence in temporal knowledge can affect the final temporal judgment⁶⁹,⁷⁰. Similarly, results based on another sensory modality (auditory) could also affect the weights associated to each of the four components tested in our study. It has been shown that temporal judgment of auditory stimuli are less demanding in attention and/or working memory than that of visual stimuli⁷¹⁻⁷³. To sum up, it would be beneficial to test our model with various temporal tasks and modalities.

In conclusion, our Cognitive and Plastic RNN-Clock model, grounded in cognition, has succeeded in explaining a significant amount of variances (up to 90%) when its results are compared with 1892 temporal reproduction data collected from children (aged from 5 to 8) and adults (aged from 18 to 42 years). It therefore demonstrates that a lack of cognitive capacities directly interferes in the operation of the clock system which fails, or at least is less able, to predict the state of the oscillators. The originality of our model is that it succeeds in unifying the neurological clock models¹⁷,¹⁸,⁴⁹ and the models of temporal information processing¹, based on the scalar expectancy theory¹⁰,⁷⁴. Therefore, it considers time judgments by the brain equipped with oscillators and their variations due to the system plasticity and the cognitive capacities that are known to differ between individuals.

**Ethical statements.** The data allowing the establishment of the final model are based on protocols which were approved by the research ethical committee IRB-UCA as well as by the ethical standards of the French national research committee (academy) of the French National Education Ministry. This experiment was conducted in accordance with the 1964 Helsinki declaration. The children's parents and the adults signed a written informed consent to participate in this study.

**Data availability**

The data that support the findings of this study are openly available at: https://osf.io/jyadw/?view_only=bdf4d
ea174394c2cbca3feaa8326fca9.

Received: 19 May 2022; Accepted: 2 March 2023

Published online: 08 March 2023

**References**

1. Gibbon, J., Church, R. M. & Meck, W. H. Scalar timing in memory. *Ann. N. Y. Acad. Sci.* **423**(1), 52–77 (1984).

2. Wearden, J. *The Psychology of Time Perception* (Springer, 2016).

3. Droit-Volet, S. Time perception in children: A neurodevelopmental approach. *Neuropsychologia* **51**(2), 220–234 (2013).

4. Droit-Volet, S. Development of time. *Curr. Opin. Behav. Sci.* **8**, 102–109 (2016).

5. Droit-Volet, S. & Zélanti, P. Development of time sensitivity: Duration ratios in time bisection. *Quart. J. Exp. Psychol.* **66**(4), 671–686 (2013).

6. Hallez, Q. & Droit-Volet, S. High levels of time contraction in young children in dual tasks are related to their limited attention capacities. *J. Exp. Child Psychol.* **161**, 148–160 (2017).

7. Hallez, Q. & Droit-Volet, S. Timing in a dual-task in children and adults: When the interference effect is higher with concurrent non-temporal than temporal information. *J. Cogn. Psychol.* **31**(1), 34–48 (2019).
8. Zélanti, P. S. & Droit-Volet, S. Cognitive abilities explaining age-related changes in time perception of short and long durations. *J. Exp. Child Psychol.* **109**(2), 143–157 (2011).

9. Treisman, M. Temporal discrimination and the indifference interval: Implications for a model of the" internal clock". *Psychol. Monogr. Gen. Appl.* **77**(13), 1–31 (1963).

10. Gibbon, J. Scalar expectancy theory and Weber's law in animal timing. *Psychol. Rev.* **84**(3), 279–325 (1977).

11. Zakay, D., & Block, R. A. The role of attention in time estimation processes. In *Advances in Psychology* vol. 115, 143–164 (North-Holland 1996).

12. Droit-Volet, S., Wearden, J. & Delgado-Yonger, M. Short-term memory for time in children and adults: A behavioral study and a model. *J. Exp. Child Psychol.* **97**(4), 246–264 (2007).

13. Rattat, A. C. & Droit-Volet, S. The effects of interference and retention delay on temporal generalization performance. *Atten. Percept. Psychophys.* **72**(7), 1903–1912 (2010).

14. Droit-Volet, S. & Wearden, J. H. Temporal bisection in children. *J. Exp. Child Psychol.* **80**(2), 142–159 (2001).

15. Droit-Volet, S., Clément, A. & Wearden, J. Temporal generalization in 3-to 8-year-old children. *J. Exp. Child Psychol.* **80**(3), 271–288 (2001).

16. Treisman, M., Faulkner, A., Naish, P. L. & Brogan, D. The internal clock: Evidence for a temporal oscillator underlying time perception with some estimates of its characteristic frequency. *Perception* **19**(6), 705–742 (1990).

17. Miall, C. The storage of time intervals using oscillating neurons. *Neural Comput.* **1**(3), 359–371 (1989).

18. Matell, M. S. & Meck, W. H. Cortico-striatal circuits and interval timing: coincidence detection of oscillatory processes. *Cogn. Brain Res.* **21**(2), 139–170 (2004).

19. Merchant, H., & Lafuente, V. D. Introduction to the neurobiology of interval timing. *Neurobiology of interval timing*, 1–13 (2014).

20. Hardy, N. F. & Buonomano, D. V. Encoding time in feedforward trajectories of a recurrent neural network model. *Neural Comput.* **30**(2), 378–396 (2018).

21. Karmarkar, U. R. & Buonomano, D. V. Timing in the absence of clocks: encoding time in neural network states. *Neuron* **53**(3), 427–438 (2007).

22. Reutimann, J., Yakovlev, V., Fusi, S. & Senn, W. Climbing neuronal activity as an event-based cortical representation of time. *J. Neurosci.* **24**(13), 3295–3303 (2004).

23. Thuruthel, T. G., Shih, B., Laschi, C. & Tolley, M. T. Soft robot perception using embedded soft sensors and recurrent neural networks. *Sci. Robot.* **4**(26), eaav1488 (2019).

24. Basgol, H., Ayhan, I., & Ugur, E. Time perception: A review on psychological, computational and robotic models. *IEEE Transactions on Cognitive and Developmental Systems* (2021).

25. Mermillod, M. et al. The importance of recurrent top-down synaptic connections for the anticipation of dynamic emotions. *Neural Netw.* **109**, 19–30 (2019).

26. Puce, A., Allison, T. & McCarthy, G. Electrophysiological studies of human face perception. III: Effects of top-down processing on face-specific potentials. *Cereb. Cortex* **9**(5), 445–458 (1999).

27. Riehle, A., Grun, S., Diesmann, M. & Aertsen, A. Spike synchronization and rate modulation differentially involved in motor cortical function. *Science* **278**(5345), 1950–1953 (1997).

28. Frith, C. & Dolan, R. J. Brain mechanisms associated with top-down processes in perception. *Philos. Trans. R. Soc. Lond. Ser. B Biol. Sci.* **352**(1358), 1221–1230 (1997).

29. Hallez, Q., Damsma, A., Rhodes, D., Van Rijn, H. & Droit-Volet, S. The dynamic effect of context on interval timing in children and adults. *Acta Physiol. (Oxf)* **192**, 87–93 (2019).

30. Jazayeri, M. & Shadlen, M. N. Temporal context calibrates interval timing. *Nat. Neurosci.* **13**(8), 1020–1026 (2010).

31. Kasar, M. M., Bhattacharyya, D. & Kim, T. H. Face recognition using neural network: A review. *Int. J. Secur. Appl.* **10**(3), 81–100 (2016).

32. Page, M. P. A. & Norris, D. A model linking immediate serial recall, the Hebb repetition effect and the learning of phonological word forms. *Philos. Trans. R. Soc. B Biol. Sci.* **364**(1536), 3737–3753 (2009).

33. Bavelier, D., Green, C. S., Pouget, A. & Schrater, P. Brain plasticity through the life span: Learning to learn and action video games. *Annu. Rev. Neurosci.* **35**, 391–416 (2012).

34. Mermillod, M., Bugaiska, A. & Bonin, P. The stability-plasticity dilemma: Investigating the continuum from catastrophic forgetting to age-limited learning effects. *Front. Psychol.* **4**, 504 (2013).

35. Fahlman, S. E. *An Empirical Study of Learning Speed in Back-Propagation Networks* 35–36 (Carnegie Mellon University, Computer Science Department, Pittsburgh, PA, USA, 1988).

36. Sormunen, T., Lämsä, A., & Lopez, M. B. Iterative Learning for Instance Segmentation. arXiv preprint arXiv:2202.09110 (2022).

37. Sastry, P. S., Santharam, G. & Unnikrishnan, K. P. Memory neuron networks for identification and control of dynamical systems. *IEEE Trans. Neural Netw.* **5**(2), 306–319 (1994).

38. Rumelhart, D. E., Hinton, G. E. & Williams, R. J. Learning representations by back-propagating errors. *Nature* **323**(6088), 533–536 (1986).

39. Hughes, J. R. Gamma, fast, and ultrafast waves of the brain: Their relationships with epilepsy and behavior. *Epilepsy Behav.* **13**(1), 25–31 (2008).

40. Cheng, R. K., Williams, C. L. & Meck, W. H. Oscillatory bands, neuronal synchrony and hippocampal function: Implications of the effects of prenatal choline supplementation for sleep-dependent memory consolidation. *Brain Res.* **1237**, 176–194 (2008).

41. Wilson, D. R., & Martinez, T. R. The need for small learning rates on large problems. In *IJCNN'01. International Joint Conference on Neural Networks. Proceedings* (Cat. No. 01CH37222) vol. 1, 115–119 (IEEE, 2001).

42. Hallez, Q., Monier, F. & Droit-Volet, S. Simultaneous time processing in children and adults: When attention predicts temporal interference effects. *J. Exp. Child Psychol.* **210**(1), 105209 (2021).

43. Manly, T., Robertson, I., Anderson, V. & Nimmo-Smith, I. *TEA-Ch. The Test of Everyday Attention for Children* (R. Horn & RS Jaeger, 2006).

44. Corsi, P. M. *Human Memory and the Medial Temporal Region of the Brain*. Unpublished doctoral dissertation, McGill University, Montreal (1972)

45. Wechsler, D. *Wechsler Individual Achievement Test-Second Edition (WIAT II)* (Psychological Corporation, 2005).

46. Oprisan, S. A. & Buhusi, C. V. How noise contributes to time-scale invariance of interval timing. *Phys. Rev. E* **87**(5), 052717 (2013).

47. Pradhan, R. K. & Tripathy, A. Neural recruitment in subjective time perception in a non-local model and the psychological nature of attention. *NeuroQuantology* **17**(6), 58–64 (2019).

48. Toso, A., Fassihi, A., Paz, L., Pulecchi, F. & Diamond, M. E. A sensory integration account for time perception. *PLoS Comput. Biol.* **17**(1), e1008668 (2021).

49. Zhou, S., Masmanidis, S. C. & Buonomano, D. V. Neural sequences as an optimal dynamical regime for the readout of time. *Neuron* **108**(4), 651–658 (2020).

50. Jantzen, K. J., Steinberg, F. L. & Kelso, J. A. S. Functional MRI reveals the existence of modality and coordination-dependent timing networks. *Neuroimage* **25**(4), 1031–1042 (2005).

51. Petter, E. A., Lusk, N. A., Hesslow, G. & Meck, W. H. Interactive roles of the cerebellum and striatum in sub-second and supra-second timing: Support for an initiation, continuation, adjustment, and termination (ICAT) model of temporal processing. *Neurosci. Biobehav. Rev.* **71**, 739–755 (2016).
52. Kotz, S. A., Brown, R. M. & Schwartze, M. Cortico-striatal circuits and the timing of action and perception. *Curr. Opin. Behav. Sci.* **8**, 42–45 (2016).

53. Kononowicz, T. W. Dopamine-dependent oscillations in frontal cortex index “start-gun” signal in interval timing. *Front. Hum. Neurosci.* **9**, 331 (2015).

54. Meck, W. H. Neuropharmacology of timing and time perception. *Cogn. Brain Res.* **3**(3–4), 227–242 (1996).

55. Oprisan, S. & Buhusi, C. V. Modeling pharmacological clock and memory patterns of interval timing in a striatal beat-frequency model with realistic noisy neurons. *Front. Integr. Neurosci.* **5**, 52 (2011).

56. Droit-Volet, S., Fayolle, S., Lamotte, M. & Gil, S. Time, emotion and the embodiment of timing. *Timing Time Percept.* **1**(1), 99–126 (2013).

57. Fayolle, S., Gil, S. & Droit-Volet, S. Fear and time: Fear speeds up the internal clock. *Behav. Proc.* **120**, 135–140 (2015).

58. Scellier, B. & Bengio, Y. Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. *Front. Comput. Neurosci.* **11**, 24 (2017).

59. Laborieux, A. et al. Scaling equilibrium propagation to deep convnets by drastically reducing its gradient estimator bias. *Front. Neurosci.* **15**, 12 (2021).

60. O'Reilly, R. C. Biologically plausible error-driven learning using local activation differences: The generalized recirculation algorithm. *Neural Comput.* **8**(5), 895–938 (1996).

61. Fandakova, Y. & Hartley, C. A. Mechanisms of learning and plasticity in childhood and adolescence. *Dev. Cogn. Neurosci.* **42**, 100764 (2020).

62. Gibbon, J. Origins of scalar timing. *Learning and Motivation* (1991).

63. McCormack, T., Brown, G. D., Maylor, E. A., Darby, R. J. & Green, D. Developmental changes in time estimation: comparing childhood and old age. *Dev. Psychol.* **35**(4), 1143 (1999).

64. Droit-Volet, S., Meck, W. H. & Penney, T. B. Sensory modality and time perception in children and adults. *Behav. Proc.* **74**(2), 244–250 (2007).

65. Droit-Volet, S., Tourret, S. & Wearden, J. Perception of the duration of auditory and visual stimuli in children and adults. *Quart. J. Exp. Psychol. Sect. A* **57**(5), 797–818 (2004).

66. Steinmetz, P. N. et al. Attention modulates synchronized neuronal firing in primate somatosensory cortex. *Nature* **404**(6774), 187–190 (2000).

67. Fries, P., Reynolds, J. H., Rorie, A. E. & Desimone, R. Modulation of oscillatory neuronal synchronization by selective visual attention. *Science* **291**(5508), 1560–1563 (2001).

68. Pfeuty, M., Ragot, R. & Pouthas, V. Relationship between CNV and timing of an upcoming event. *Neurosci. Lett.* **382**(1–2), 106–111 (2005).

69. Droit-Volet, S. & Izaute, M. Improving time discrimination in children and adults in a temporal bisection task: The effects of feedback and no forced choice on decision and memory processes. *Quart. J. Exp. Psychol.* **62**(6), 1173–1188 (2009).

70. Lamotte, M., Izaute, M. & Droit-Volet, S. Awareness of time distortions and its relation with time judgment: A metacognitive approach. *Conscious. Cogn.* **21**(2), 835–842 (2012).

71. Penney, T. B. Modality differences in interval timing: Attention, clock speed, and memory. In *Functional and Neural Mechanisms of Interval Timing* (ed. Meck, W. H.) 209–234 (CRC Press, 2003).

72. Penney, T. B., Gibbon, J. & Meck, W. H. Differential effects of auditory and visual signals on clock speed and temporal memory. *J. Exp. Psychol. Hum. Percept. Perform.* **26**, 1770–1787 (2000).

73. Droit-Volet, S. & Hallez, Q. Differences in modal distortion in time perception due to working memory capacity: A response with a developmental study in children and adults. *Psychol. Res.* **83**(7), 1496–1505 (2019).

74. Church, R. M. & Gibbon, J. Temporal generalization. *J. Exp. Psychol. Anim. Behav. Process.* **8**(2), 165–186 (1982).

## Acknowledgements

This work has been partially supported by MIAI @ Grenoble Alpes, (ANR-19-P3IA-0003) as well as the LAPSCO (Laboratoire de Psychologie Sociale et Cognitive), UCA, CNRS, UMR 6024.

## Author contributions

Q.H., M.N., and S.D.V. discussed the model with these different components and conceived the present article.

## Competing interest

The authors declare no competing interests.

## Additional information

Correspondence and requests for materials should be addressed to Q.H.

Reprints and permissions information is available at www.nature.com/reprints.

Publisher's note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_10.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2023