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

HAL
open science

# Matching Patterns of Temporal Neural Activity Using the Victor-Purpura Distance in Real-Time

Alberto Ayala, Angel Lareo, Pablo Varona, Francisco B. Rodriguez

► To cite this version:

Alberto Ayala, Angel Lareo, Pablo Varona, Francisco B. Rodriguez. Matching Patterns of Temporal Neural Activity Using the Victor-Purpura Distance in Real-Time. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.541-553, 10.1007/978-3-031-34107-6_43. hal-05498079

HAL Id: hal-05498079

https://inria.hal.science/hal-05498079v1

Submitted on 6 Feb 2026

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_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Matching Patterns of Temporal Neural Activity Using the Victor-Purpura Distance in Real-Time

Alberto Ayala✉, Angel Lareo☐, Pablo Varona☐, and Francisco B. Rodriguez☐

Grupo de Neurocomputación Biológica, Departamento de Ingeniería Informática, Escuela Politécnica Superior, Universidad Autónoma de Madrid, Madrid, Spain alberto.ayala@estudiante.uam.es, {pablo.varona,f.rodriguez}@uam.es

**Abstract.** Many neural systems encode information by generating specific sequences of action potentials forming temporal activity patterns (codes). These systems emit functionally equivalent activity patterns with a certain variability in their temporal structure. In this work, we have implemented in real-time a closed-loop stimulation protocol for the study of temporal coding in neural systems. The stimulation was triggered by matching a target code and a code obtained from the system's activity using the Victor-Purpura distance. This protocol has been developed for the Real-Time eXperiment Interface tool. Latencies during closed-loop experiments were within strict real-time temporal constraints, thus validating the use of the protocol to study information processing in activity-dependent stimulation experiments. In addition, its functionality has been validated through a proof of concept in which we have conditioned the activity of the Hindmarsh-Rose neural model to evoke a different dynamic activity state. With this protocol, equivalence between different matching patterns can be inferred when closed-loop stimulation driven by them leads to equivalent responses. Results show that the dynamic state evoked by closed-loop stimulation is difficult to generate under open-loop stimulation (i.e, without precise activity-dependent stimulation of the system).

**Keywords:** Closed-loop stimulation · temporal coding · clustering · pattern matching · Hindmarsh-Rose neural model · temporal patterns of neural activity (codes)

## 1 Introduction

How neural systems use action potentials (or spikes) to process and transfer information is one of the main questions in neuroscience. There are several coding schemes that attempt to understand how neural systems process information. Temporal coding, the scheme this work is focused in, asserts that the precise time in the generation of spikes or inter-spike times contains relevant information in the coding process of neural systems [12].

© IFIP International Federation for Information Processing 2023

Published by Springer Nature Switzerland AG 2023

I. Maglogiannis et al. (Eds.): AIAI 2023, IFIP AICT 676, pp. 541–553, 2023.

https://doi.org/10.1007/978-3-031-34107-6_43
In neural systems, sensory-motor feedback loops are widespread. In this regard, closed-loop experimental designs are particularly suitable for studying temporal coding information processing [5]. In addition, these systems generate specific time sequences of spikes directly related with a particular function, i.e., they produce functionally equivalent neural patterns. These sequences are generated with a certain variability in their temporal structure, that is, inter-spike intervals can vary up to a certain level and still preserve its functional meaning [4,11]. This paper presents a closed-loop stimulation protocol that enables the study of temporal coding in neuronal systems considering the variability with which they encode information. It detects a possible state of the dynamical system (given by a determinate neural code), and stimulates it, allowing to analyze whether the system responses are similar, i.e. it is able to establish whether the detected neural codes are likely equivalent due to the similar responses of the dynamical system. The implemented protocol is based on the Temporal Code-Driven Stimulation (TCDS) algorithm, which acquires a neural signal, binarizes it, and stimulates the system when a specific neural code is detected [2,9,10]. To consider the intrinsic variability of information coding in neural systems a flexible code detection metric, based on the Victor-Purpura distance [16] has been implemented in real-time to expand and complement the functionality of the TCDS protocol. Neural systems usually produce spikes within or below the millisecond scale and the precise time at which they are stimulated can vary their dynamic state. Therefore, closed-loop tasks must be performed within the required precision constraints. To comply with these temporal constraints the protocol was implemented using the Real-Time eXperiment Interface (RTXI) framework [13], a software application specifically designed for real-time software development in biology and neuroscience research. The protocol performance has been analyzed by measuring latencies in real-time closed-loop experiments. Latency results in Sect. 3.1 show that this protocol complies with the strict temporal constraints for the study of temporal coding in neural systems.

In addition, a proof of concept has been designed. The implemented protocol is used to condition the activity of the Hindmarsh-Rose (HR) neuronal model [7], which is frequently used in theoretical neuroscience as well as in the implementation between hybrid circuits of living and model neurons [1, 14, 15]. When the protocol detects a certain dynamic state in the HR activity, it stimulates the system to generate a specific response (as described in Sect. 2.4). This proof of concept revealed that it is only possible to robustly condition the activity of the model using closed-loop stimulation. This is due to the fact that the protocol considers the variability of the temporal structure of equivalent patterns, and accurately stimulates the system producing responses with equivalent temporal characteristics and variability (as characterized by the Victor-Purpura distance) to identify them.
<figure><img src="image_4.png" /><figcaption>**Fig. 1.** Flowchart representing the real-time tasks of the implemented protocol. The protocol acquires the signal emitted by the neural system and digitizes it in binary manner forming neural codes. For each detected code, it calculates the Victor-Purpura distance to the target code. If the distance value is below a threshold the protocol matches the pattern and stimulates the system. All these tasks are executed each nominal period established by the real-time system.</figcaption></figure>

# 2 Methods

## 2.1 Temporal Code-Driven Stimulation Protocol

As mentioned in the Introduction (Sect. 1) Temporal Code-Driven Stimulation (TCDS) is the base of the new implemented protocol [2, 9, 10]. In TCDS the neural signal is acquired in real-time and is divided into time windows whose value depends on whether or not an action potential above a certain threshold is detected, the value of the window is 1 if a spike is detected, otherwise 0. The time duration of these windows is called bin time and the values attributed to these time windows are called bits. As we mentioned above, a specific temporal sequence of these binary events is what we call code. When a code identical to the target code is identified, stimulation is delivered to the system. Bin time selection in the original work defining TCDS is guided by a maximum entropy criterion [9]. However, the bin time selected by this criterion may be excessively large, resulting in a possible loss of information (for example two spikes that occur in the same time window). As discussed in [8], to deal with this problem it is possible to decrease the bin time and increase the code size. However, a new problem arises: as the number of bits increases, the probability of exactly finding the target code decreases exponentially. To overcome this problem, we present a solution based on spike train distance metrics. More precisely,
the Victor-Purpura distance, which is implemented in real-time by means of the Real-Time eXperiment Interface tool (RTXI<fnref n="1" />).

## 2.2 Closed-Loop Stimulation Using Victor-Purpura Distance

As mentioned above, the implemented protocol uses the Victor-Purpura distance to detect neural codes whose temporal structure is similar to the target code and to stimulate with controlled precision the dynamic system in real-time [3]. This protocol considers the intrinsic variability in the temporal structure of sequential activity patterns. It does not depend on the bin time that maximizes the entropy like TCDS does, and effectively matches larger sequences of neural activity that can be functionally equivalent. In addition, as mentioned in the introduction, this protocol is implemented in real-time in order to comply with the temporal constraints of information processing in neural systems. The functionality can be seen in the flowchart of Fig. 1. It acquires in real-time the signal emitted by the analyzed system, binarizes it and calculates the Victor-Purpura distance between the detected codes and the target code. The Victor-Purpura distance [16] compares the temporal synchronization between trains of action potentials. Thus, it is useful to compare the similarity between the temporal structure of neural codes. As a definition, the Victor-Purpura distance is the minimum cost of transforming one train of action potentials into another (see Eq. 1) by the following elementary steps: i) adding a single spike (cost 1), ii) deleting a single spike (cost 1), and iii) shift a single spike in the time of occurrence (cost $q * |\Delta t|$ where $q$ is the relative sensitivity of the metric to precise timing of spikes):

$$D(C_a, C_b) = \min [K(C_a, C_1) + K(C_1, C_2) \dots + K(C_{n-1}, C_b)]. \quad (1)$$

$D(C_a, C_b)$ is the Victor-Purpura distance between two neural codes, $C_a$ is a detected code, $C_b$ is the target code, and $C_i$ are the intermediate codes generated by the elementary steps to turn $C_a$ into $C_b$ whose cost is $K(C_{i-1}, C_i)$. If the Victor-Purpura distance calculated by the implemented protocol is below the limit, it stimulates the system, closing the loop.

An example of use of the implemented protocol is shown in Fig. 2. First, the values of the parameters were selected offline: the bin time is set as the maximum value for which there is no missing information (it is not possible that two spikes occur in the same time window). Also, the metric parameters ($q$ and limit) are selected based on the flexibility with which equivalent patterns are matched: the stricter the metric the more similar the temporal structure of the patterns (target code versus found code). The “Online” box shows the execution of real-time tasks that are performed in real-time. The example shows the calculation of the Victor-Purpura distance between a detected code (‘11101010001’) and the searched one (‘11010100001’), the minimum cost of transforming the detected one into the target code consists of performing two bit shifts in time and removing a spike from the train, if the value of the distance is below the limit then the protocol will stimulate the system.

<footnote n="1">¹ Real-Time eXperiment Interface tool, RTXI, (http://rtxi.org/).</footnote>
<figure><img src="image_5.png" /><figcaption>**Fig. 2.** Schematic of the implemented protocol. Starting from below, the parameters are selected offline. The “Online” box at the center shows the execution sequence of each real-time task. Finally, the top side of the figure shows an example of Victor-Purpura distance calculation. To calculate the distance between the detected code ($C_a$) ‘11101010001’ and the target code ($C_b$) ‘11010100001’ the protocol transform one into the other by two 1 bit shifts ($K(C_a, C_1)$ and $K(C_1, C_2)$) and removing 1 bit from the detected code ($K(C_2, C_b)$), as the shifts are of one bin time size (10 ms) the distance between the codes is 3 (with $q = 100$), if this value is below the *limit* stimulation is delivered in real-time.</figcaption></figure>

## 2.3 Hardware-Software Architecture

**Hardware Architecture.** This section describes the hardware architecture of the implemented protocol that is involved in the acquisition and transmission of data in real-time. For this reason, it has been tested that, in conjunction with the software architecture, it complies with the temporal constraints explained in the Introduction (Sect. 1) through the measurement of latencies in closed-loop stimulation experiments (Sect. 2.4 and Sect. 3.1). The neural system signal is acquired in real-time through a data acquisition card (DAQ), which digitizes the signal and sends it to the software architecture using an input channel. The signal is processed and when the protocol decides, it sends a stimulus to the neural system through an output channel of the DAQ, establishing a bidirectional communication with the system (see the flowchart in Fig. 2).

In the real-time performance analysis the activity of an electronic neuron was processed. This hardware device is an electronic neuron that implements the Hindmarsh-Rose neural model [2,3,7] which is capable of reproducing the
behavior of some neural systems in a realistic manner, such as bursting and
spiking activity. Finally, the computer used in the closed-loop experiments has
an Intel Core i7-6700 processor with 4 cores and a frequency of 3.46 GHz.

**Software Architecture.** The software development of the protocol<fnref n="2" /> has been carried out in the Real-Time eXperiment Interface (RTXI) tool [13] (developed in the RTOS Xenomai<fnref n="3" />), an open-source hard real-time data acquisition and control framework specifically designed for biological and neuroscience research widely used by many laboratories.

**2.4 Experimental Design**

Two different closed-loop experiments were carried out in this project. On the one hand, the performance of the implemented protocol (hardware-software architecture) was analyzed by means of closed-loop experiments in real-time to verify whether it complied with the temporal constraints for studying temporal coding in neural systems. On the other hand, a proof of concept was designed in which the protocol was used to condition the activity of a neuronal model to evoke a different behaviour under closed-loop stimulation. The aim of this proof is to validate its use to study equivalence of variable patterns of temporal activity.

**Real-Time Performance Analysis.** As mentioned, neural systems encode information on the millisecond time scale, in addition the timing of stimulation must be precise. To verify that the hardware-software architecture complies with these temporal constraints several closed-loop experiments have been performed in which the latency values of the real-time tasks have been measured.

Latency is the difference between the time when a real-time task should start and the time when the real-time task actually starts. The left side of Fig. 3 shows an example of the latency calculation performed in this experiment. The instantaneous latency ($L_{ins}$) is calculated as the absolute value of the subtraction between the time at which the current task starts ($t_i$), the time at which the previous task started ($t_{i-1}$) and the nominal period of the system ($T_{nom}$). In this figure the red arrows indicate an example of the actual time of execution of two successive real-time tasks while the black arrows represent the ideal time at which they should have started. The latency values were calculated as the absolute value of the subtraction because real-time tasks can run before a nominal period after the start of the previous task execution (configured by Xenomai to reduce latency jitter), resulting in negative instantaneous latencies. An example of a negative instantaneous latency is shown on the left side of Fig. 3.

<footnote n="2">² The implementation is available in the following repository https://github.com/AlbertoAyalaV/Temporal-Code-Driven-Stimulation-and-Vcitor-Purpura-distance-protocol.</footnote>

<footnote n="3">³ Real-Time Development Software Framework Xenomai (www.xenomai.org).</footnote>
In this closed-loop experiment the activity of the Hindmarsh-Rose [2,7] electronic neuron was processed in real-time. When the implemented protocol detects a burst activity it stimulates the neuron with a sine signal. The detected code was ‘00111101’, the bin time was 10 ms, the Victor-Pupura parameters were establish to robustly detect the bursting activity (limit = 1, q = 50), the sine signal was 120 ms with 2 V of amplitude and the duration of closed-loop experiments were 120 s. For this configuration, two closed-loop experiments were carried for nominal frequencies (rate of real-time task executions per second) of 10 kHz and 20 kHz that are enough to precisely detect the events in which the information is encoded in neural systems (spikes are generated below milliseconds). Finally, the electronic neuron was configured to produce a regular bursting activity, that is, the distribution of inter-spike intervals (ISIs) and inter-burst intervals (IBIs) was regular.

<figure><img src="image_6.png" /><figcaption>**Fig. 3.** Results obtained in the performance analysis. Left side shows a scheme of the instantaneous latency calculation. Right side shows the distribution of latency values obtained for a nominal frequency of 10 kHz and 20 kHz. In both cases, the average latency is under the millisecond scale, and no undesired latencies are obtained.</figcaption></figure>

**Conditioning Hindmarsh-Rose Neural Model Activity to Evoke Brief Bursts of Spikes.** In closed-loop experiments the Hindmarsh-Rose neural model was stimulated by the implemented protocol to generate a new dynamic state in its activity. The aim of these experiments was to test the implemented protocol to detect likely functional equivalent patterns in the activity of a neural system, obtain information about the system's internal state, and evoke a different kind of behavior (a short burst of spikes) not originally showed. The parameters of the model were establish to produce a regular bursting state ($r = 0.0021, a = 1, b = 3, c = 1, d = 5, s = 4, x_1 = -8/5$, as in [7] and external
Intensity = 1.9) as well as in the real-time performance analysis (regular distribu-
tion of ISIs and IBIs). To simulate the intrinsic variability of temporal activity in
neural systems information processing (as mentioned in Sect. 1), Gaussian noise
was provided to the model input to reproduce this behaviour. In this way the
system generates equivalent neural codes (bursting state) with different temporal
structures (variability in the structure of ISIs). Closed-loop stimulation was trig-
gered by robustly detecting the bursting activity of the HR model (considering
its variability, as is shown in Fig. 4) and conditioning its activity to a brief bursts
of spikes between bursting states. The selected stimulus was a ramp signal. A
previous analysis to select the optimal stimulus parameters was performed, that
is, those parameters for which the stimulus can produce brief bursts of spikes
without synchronizing the activity of the neuronal model.

In addition, the stimulus signal of the closed-loop experiments was recorded,
and open-loop experiments were performed by stimulating with the same signal,
that is, the system was stimulated without considering the previous activity
to the stimulus. The neural activity response between both methodologies was
compared. It was hypothesized that it was only possible to generate brief bursts
of spikes consistently in closed-loop experiments.

The state of neural activity of the dynamic system during stimulation process
was characterized by means of recurrence plots [6] in closed-loop and open-loop
methodologies. 18 features<fnref n="4" />, like recurrence rate, laminarity, determinism, etc.,
were extracted from the activity recurrences. With these features we can auto-
matically evaluate the differences between the original state and the conditioned
state, without visualizing the HR activities generated in both dynamic states
(as can be seen in Fig. 5). Please note that this quantification of recurrence
plots is appropriate for future analysis with biological signals when the dynamic
equations of the system are not available. Following, the Principal Component
Analysis (PCA) methodology was applied to these features. The 3 principal com-
ponents with the highest eigenvalue were selected and the data obtained from the
closed-loop and open-loop experiments were represented in a 3D chart forming
two clusters. The selected principal components maximize the explained variance
of the original data (Fig. 6). Lastly, the silhouette coefficient was calculated to
represent the distance between these clusters.

Finally, the hardware-software architecture was implemented in a non-real-
time software system to facilitate the automation of these experiments. This
implementation was used for the results in Sect. 3.2.

3 Results

## 3.1 Real-Time Performance Analysis

The results of the performance analysis of the implemented protocol shows that
the average latency for both nominal frequencies was below milliseconds, which is
necessary to accurately detect the occurrence of spikes in neural systems activity.

<footnote n="4">⁴ Recurrence plot at a glance: http://www.recurrence-plot.tk/rqa.php.</footnote>
<figure><img src="image_7.png" /><figcaption>**Fig. 4.** Patterns matched as temporally equivalent by the protocol previous to the system stimulation in the closed-loop experiment of the proof of concept. The dashed lines show the time occurrence of the spikes in the target code. As in neural systems, there is variability in the temporal structure of the neural codes that represent the bursting state in the activity of the Hindmarsh-Rose model.</figcaption></figure>

Figure 3 shows the instantaneous latency value distribution for nominal frequencies of 10 kHz and 20 kHz.

In order to establish the nominal frequency above which the use of the protocol was not feasible the term undesired latency was defined. An undesired latency is an instantaneous latency value that exceeds the nominal period of the system. When an undesired latency is obtained it is considered a critical system failure and the implemented protocol would not comply with the temporal constraints. No undesired latencies have been obtained for the two nominal frequencies, that is the protocol can be used in closed-loop studies with a nominal frequency up to 20 kHz which is enough to enable the study of information processing in neural systems. Based on the latency results, we conclude that the real-time closed-loop stimulation protocol complies with the strict temporal constraints. However, an analysis of latencies as a function of the neural code size is needed to study in more detail the performance of it in real-time closed-loop stimulation.

## 3.2 Analyzing Brief Bursts of Spikes Evoked by the Close-Loop Stimulation Protocol

Figure 5 shows an example of the performed closed-loop and open-loop experiments. Under closed-loop stimulation, the brief bursts of spikes are consistently generated in the Hindmarsh-Rose model activity. However, in open-loop this rarely happens. As shown in Fig. 5, in open-loop there is no control of the previous activity to the stimulation (the stimulation timing is not precise resulting in extending the bursting state in most of the stimulations). This result shows
that it is essential to control the previous activity to the stimulation process as well as to consider the temporal variability of the bursting state in the neu- ronal model activity. This is shown in Fig. 4 where the patterns matched as functionally equivalent by the implemented protocol in closed-loop experiments have been plotted. These patterns represent the bursting state of the HR neural model activity, and it can be observed that the temporal structure of ISIs varies.

<figure><img src="image_8.png" /><figcaption>**Fig. 5.** Example of the Hindmarsh-Rose model activity in the performed proof of concept. The top side shows its activity in the closed-loop experiments and the stimulus signal sent to the model. The bottom side shows its activity in the open-loop experiments and the stimulus signal delivered. It is possible to consistently generate brief bursts of spikes only in the closed-loop experiment.</figcaption></figure>

Finally, Fig. 6 shows the selected principal components of the open-loop and closed-loop experiments. These components represent the original data with an explained variance of 93%. Data from closed-loop experiments (blue dots in Fig. 6) are clustered in the chart while data from open-loop experiments (yellow dots in Fig. 6) are scattered. This indicates that in closed-loop sessions the brief bursts of spikes are consistently evoked in the neural model activity while in open-loop it rarely occurs. This figure shows in a global manner the results represented in the Fig. 5. In addition, the value of the silhouette coefficient is 0.31 which indicates that the two methodologies generate different neural activities under stimulation.
<figure><img src="image_9.png" /><figcaption>**Fig. 6.** Plot of the first 3 components after PCA application to the extracted features of the Hindmarsh-Rose model signal when it is stimulated in closed-loop and open-loop experiments. Figure shows that the closed-loop data are clustered while the open-loop data are spread out. Closed-loop conditions the activity of the model by consistently generating the brief bursts of spikes, however, this kind of activity is rarely generated in open-loop.</figcaption></figure>

# 4 Conclusions

The real-time performance analysis showed that the average of latency values did not exceed milliseconds and no undesired latencies were obtained. Thus, the use of the implemented protocol is viable for frequencies up to 20kHz in closed-loop experiments. Therefore, it complies with the strict temporal constraints to study temporal coding in neural systems. In addition, we consider that it is also needed to analyze the real-time performance of the protocol as a function of the code size. As the neural patterns size increase (the number of spikes contained in each pattern could increase), the computational complexity of Victor-Purpura calculation increases, so the protocol carries out more comparisons, thus affecting to the real-time performance. The clustering analysis of the Hindmarsh-Rose model activity comparing results under open-loop and closed-loop stimulation showed that it was only possible to robustly evoke brief bursts of spikes between standard bursting states in closed-loop experiments compared to open-loop. This result showed that the dynamic activity state conditioned by closed-loop stimulation was difficult to generate if the protocol did not consider to apply pattern matching and precise stimulation to the dynamic system. Based on overall results we conclude that the implemented protocol is able to study temporal coding in neural systems by means of likely functionally equivalent pattern matching and closed-loop stimulation. The protocol enables the detection of possible dynamic states of neural systems whether closed-loop stimulation leads its activity to similar responses.
**Acknowledgements.** This work was funded by PID2020-114867RB-I00, PID2021-122347NB-I00 (MCIN/AEI and ERDF- "A way of making Europe").

References

1. Amaducci, R., Reyes-Sanchez, M., Elices, I., Rodriguez, F.B., Varona, P.: Rthybrid: a standardized and open-source real-time software model library for experimental neuroscience. Front. Neuroinform. **13**, 11 (2019)

2. Ayala, A., Lareo, A., Varona, P., Rodriguez, F.B.: Closed-loop temporal code-driven stimulation implemented and tested using real-time experimental interface (RTXI). In: 30th Annual Computational Neuroscience Meeting: CNS*2021- Meeting Abstracts. P153. J. Comput. Neurosci. **49**, 3–208 (2021). https://doi.org/10.1007/s10827-021-00801-9

3. Ayala, A., Lareo, A., Varona, P., Rodriguez, F.B.: Closed-loop stimulation protocol driven by flexible neural codes based on victor-purpura distance. In: 31st Annual Computational Neuroscience Meeting: CNS*2022-Meeting Abstracts. (P92). J. Comput. Neurosci. **51**, 3–101 (2022). https://doi.org/10.1007/s10827-022-00841-9

4. Carlson, B.A., Hopkins, C.D.: Stereotyped temporal patterns in electrical communication. Animal Behav. **68** (2004). https://doi.org/10.1016/j.anbehav.2003.10.031

5. Chamorro, P., Muñiz, C., Levi, R., Arroyo, D., Rodríguez, F.B., Varona, P.: Generalization of the dynamic clamp concept in neurophysiology and behavior. PLoS ONE **7** (2012). https://doi.org/10.1371/journal.pone.0040887

6. Eckmann, J.P., Kamphorst, O.O., Ruelle, D.: Recurrence plots of dynamical systems. Europhys. Lett. **4** (1987). https://doi.org/10.1209/0295-5075/4/9/004

7. Hindmarsh, J.L., Rose, R.M.: A model of neuronal bursting using three coupled first order differential equations. In: Proceedings of the Royal Society of London. Series B, Containing papers of a Biological character. Royal Society (Great Britain) , vol. 221 (1984). https://doi.org/10.1098/rspb.1984.0024

8. Lareo, A.: Study of sequential information processing in electroreception through modelling and closed-loop stimulation techniques. Ph.D. thesis, Universidad Autónoma de Madrid (2023)

9. Lareo, A., Forlim, C.G., Pinto, R.D., Varona, P., Rodriguez, F.B.: Temporal code-driven stimulation: definition and application to electric fish signaling. Front. Neuroinform. **10** (2016). https://doi.org/10.3389/fninf.2016.00041

10. Lareo, Á., Forlim, C.G., Pinto, R.D., Varona, P., Rodríguez, F.B.: Analysis of electroreception with temporal code-driven stimulation. In: Rojas, I., Joya, G., Catala, A. (eds.) IWANN 2017. LNCS, vol. 10305, pp. 101–111. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59153-7_9

11. Lareo, A., Varona, P., Rodriguez, F.B.: Modeling the sequential pattern variability of the electromotor command system of pulse electric fish. Front. Neuroinform. **16**, 64 (2022)

12. Nádasdy, Z.: Spike sequences and their consequences. J. Physiol. Paris **94** (2000). https://doi.org/10.1016/S0928-4257(00)01103-7

13. Patel, Y.A., George, A., Dorval, A.D., White, J.A., Christini, D.J., Butera, R.J.: Hard real-time closed-loop electrophysiology with the real-time experiment interface (rtxi). PLoS Comput. Biol. **13** (2017). https://doi.org/10.1371/journal.pcbi.1005430

14. Reyes-Sanchez, M., Amaducci, R., Elices, I., Rodriguez, F.B., Varona, P.: Automatic adaptation of model neurons and connections to build hybrid circuits with living networks. Neuroinformatics **18**(3), 377–393 (2020)
15. Szücs, A., Varona, P., Volkovskii, A.R., Abarbanel, H.D., Rabinovich, M.I., Selverston, A.I.: Interacting biological and electronic neurons generate realistic oscillatory rhythms. NeuroReport **11**(3), 563–569 (2000)

16. Victor, J.D., Purpura, K.P.: Nature and precision of temporal coding in visual cortex: A metric- space analysis. J. Neurophysiol. **76** (1996). https://doi.org/10.1152/jn.1996.76.2.1310