1 Introduction

From insects to mammals, early olfactory pathways exhibited very similar dynamic behaviors in response to odors, frequently involving transitions between quiescence, collective network oscillations, and asynchronous firing [1]. Theoretical research on olfactory neural networks for odor pattern recognition was primarily divided into two directions: (1) artificial intelligence-based electronic olfaction technology; (2) olfactory computational models based on biological neural systems. In the realm of artificial intelligence-based electronic olfaction technology, research concentrated on the comprehensive utilization of machine learning, deep learning algorithms employed in olfactory neural networks, and sensor technologies coupled with them for odor pattern recognition in the environment. Gardner introduced the fundamental properties and standards of an electronic nose (i.e., a selective electrochemical sensor array) [2], which differed from the sensitive and precise characteristics of gas chromatography–mass spectrometry (GC–MS) [3]. The electronic nose proved more adept at characterizing human olfactory perception of odors. This was due to the treatment of odor stimulus information received by the electronic nose as a multiple-input multiple-output (MIMO) problem, analyzed and recognized using computer algorithms [4]. This research direction found widespread application in practical production and life. However, it failed to unveil the biological mechanisms and features of the olfactory system from a biological perspective. In the field of olfactory cognitive computational research, the emphasis lay in establishing biological neural network models of the olfactory neural system. Early research primarily employed nonlinear dynamical system methods, with Freeman’s K-series model standing out as the most representative work based on olfactory physiological experiments. This model offered a detailed description of various neuronal groups in the olfactory neural pathway, and during simulation and calculation, chaotic attractor phenomena in the olfactory neural network emerged [5,6,7]. Some studies compared the computational results of the model with biological rhythm phenomena to uncover occurrences such as gamma oscillations and mechanisms in the olfactory system [8]. However, although these research findings could uncover some new dynamic and physiological phenomena in the olfactory system, they merely mechanistic descriptions of certain olfactory neural network oscillation phenomena. Chaotic attractors and gamma oscillations could manifest in various network systems with different functions and lacked uniqueness, thus bearing only theoretical significance.

In fact, the olfactory neural system demonstrates universality in odor pattern recognition accuracy across different species [1], and the emotional information of each individual can be modulated by environmental odor stimulation [9]. Our research indicates that studying emotional information encoding using energy offers more advantages compared to studying emotional information encoding using membrane potential [10,11,12].

Throughout the history of neuroscience, the Hodgkin–Huxley (H–H) model has been widely utilized to construct various sensory networks and extensively employed in exploring olfactory mechanisms [13,14,15]. However, the H–H model constitutes a high-dimensional complex nonlinear coupled equation, which generally presents computational challenges for large-scale neural networks comprised of a significant number of neurons. Moreover, simplified neuron models derived from the H–H model possess limitations such as limited expressive power and difficulty in generalizing computational results [9, 16]. Particularly, simulation results of different models at the same level often conflict with each other, resulting in a lack of mutual influence and promotion of research outcomes [17]. The objective of theoretical neuroscience is to formulate theories and methods for odor pattern recognition in the olfactory system in a biological sense, thereby furnishing a reliable theoretical foundation for comparison with experimental data.

In summary, whether commencing from constructing the biological network of the olfactory system using the K-series model [17] or simulating various olfactory encodings based on the H–H model, there exist various challenging issues that are arduous to surmount. Furthermore, even if a certain type of neural system model holds some theoretical academic value, it may necessitate excessive computational time and high computational costs, which are impractical in terms of computational environment and hardware development.

To address these issues, we have innovatively proposed a theory and method for new neural information processing: the neural energy theory and neural energy coding. The characteristics of this neural energy theory are as follows: (1) It is not only applicable to the calculation of inter-communication between brain regions but also to the computation at various levels of the brain and their integration [18, 19]; (2) At the micro, meso, and macro cognitive behavior levels, the neural energy theory can filter out secondary information without losing the primary information [18, 20]; (3) The computational methods are simple and dependable [20, 21]. The neural energy model is universal: (1) It has been demonstrated that the W–Z neuron model based on neural energy is equivalent to the H–H model [22,23,24]; (2) The neural energy coding method can transform various complex, coupled, highly nonlinear membrane potential firing patterns into energy firing patterns for analysis, significantly simplifying computational costs; (3) It can be employed to study and predict new unknown neural phenomena [25].

Building upon the novel neural energy theory and neural energy coding method mentioned above, we have achieved a series of groundbreaking research results. The essence of this new theory and method of neural information processing lies in the symmetry relationship we have uncovered between neuronal membrane potential and neuronal energy [21]. Leveraging this core concept, Wang introduced a method for analyzing synchronized oscillations of neuronal groups using neural energy coding [23] and elucidated the mechanism of place field formation in hippocampal place cells based on energy coding principles [26]. The W–Z model was utilized to elucidate the neural mechanism behind the formation of hemodynamic phenomena in the visual neural system [27].

This approach unveiled the mechanisms of interaction between the default mode network (DMN) and working memory network (WMN), as well as the connections in different brain regions during the encoding, maintenance and retrieval phases of working memory, replicating the dynamic mechanisms of the coupling between WMN and DMN [28]. In the realm of intellectual exploration research, the intellectual exploration model constructed based on the W–Z neuronal energy coding theory proves to be more efficient in exploration than neural network models constructed using the H–H neuron [29]. In summary, the W–Z neuron model stands as a computationally simple, reliable, and effective neural energy model.

Based on the aforementioned research findings, this article introduces an innovative olfactory neural network model based on the principle of energy coding. The specific steps are outlined as follows: firstly, a structural model derived from the olfactory neural network is established according to the biological anatomical olfactory pathway. Subsequently, the odor stimulus signals received by the olfactory sensory neurons (OSNs) (referred to as the input space) for a single odor are abstractly represented as an odor feature. This abstraction enables so that the utilization of the energy coding characteristics of the W–Z model to input the odor into the olfactory neural network. The total energy change over time in the pyramidal cell group (Pyr) (referred to as the output space) in the piriform cortex (PC) under the odor stimulus (termed as total energy spike sequence) is then calculated. In instances where the OSNs are stimulated by a mixed odor, the similarity between the mixed odor and the single odor is determined based on the total energy spike sequence of the mixed odor in the Pyr utilizing a kernel function method. Subsequently, the category of the mixed odor is classified based on this similarity. Throughout the classification process, it is observed that the representation of odor in the Pyr exhibits nonlinear characteristics. To address this characteristic, the mechanism of the nonlinear encoding of odor stimuli in the PC is explored by fully leveraging the principle of energy coding.

2 Model and method

2.1 Topological structure of the olfactory neural network

The core components of the olfactory neural network consist of olfactory sensory neurons (OSNs),the olfactory bulb (OB), and the piriform cortex (PC). Odor stimuli originate from OSNs and travel to the OB, where the information undergoes initial processing before being transmitted to the PC. Within the PC, further processing of the odor information occurs, facilitating the learning of odor characteristics. Various types of connections exist within both the OB and PC, as well as between OSNs, OB, and PC. These connections include excitatory and inhibitory connections [30], as illustrated in Fig. 1.

Fig. 1
figure 1

The topological structure of the olfactory neural network. Exhibitory synaptic connections are denoted in red, while inhibitory synaptic connections are represented in blue. OSNs correspond to olfactory sensory neurons, OB to olfactory bulb, Glo to olfactory glomeruli, PC to piriform cortex, PG to periglomerular cells, MC to mitral cells, GC to granule cells, Pyr to pyramidal cells, FF to feedforward cells, and FB to feedback cells

Inside the OB, subdivisions known as olfactory glomeruli (Glo) and granule cells (MC) interconnect different Glo. Glo consist of mitral cells (MC) and periglomerular cells (PG). Distinct OSNs exhibit varying sensitivities to the same odor, and MC and PG within the same Glo receive excitatory stimuli from the same type of OSN [31, 32]. PG within the same Glo exert neural inhibitory effects on MC, establishing a feedback inhibition loop [33]. Granule cells (GC) outside the Glo integrate excitatory stimuli from different Glo and inhibit some MC within specific Glo, creating lateral inhibition [34]. MC within the Glo generate direct excitatory stimuli to pyramidal cells (Pyr) in the PC and exert inhibitory effects on Pyr through feedforward cells (FF). Pyr within the PC are interconnected excitatorily, and feedback cells (FB) impose inhibitory effects on certain Pyr [35].

Table 1 Number of neurons in the olfactory neural network
Table 2 Connection probabilities between and within groups of neurons in the olfactory neural network

In this study, the number of neurons in the olfactory neural network is determined by proportionally scaling the neuroanatomical structure of the biological olfactory pathway, as presented in Table 1 [30, 36]. Furthermore, the connections between neurons in the olfactory neural network are probabilistic, indicating that presynaptic neurons are randomly linked to postsynaptic neurons with a certain probability [37], as detailed in Table 2 [38, 39].

2.2 W–Z neuron energy model

To calculate the energy consumption of the neural network, Wang–Zhang proposed a novel biophysical model for neuron, as illustrated in Fig. 2.

Fig. 2
figure 2

W–Z neuron energy model. This is a schematic diagram of the total effect of stimulation from other neurons on the m-th neuron. \(C_m\) represents the membrane capacitance, \(I_m\) represents the total current input from external neurons, and \(U_m\) represents the voltage source. \(r_m\) represents the internal resistance of the current source \(I_m\), and \(r_{0m}\) represents the internal resistance of the voltage source \(U_m\). The current source and voltage source divide the membrane resistance into three parts: \(r_{1m}\), \(r_{2m}\), and \(r_{3m}\). In addition, various charged ions such as sodium ions, potassium ions, and calcium ions flow in and out of ion channels, forming a loop current that causes self-induction, which is equivalent to an inductance \(L_m\)

By Kirchhoff’s law, it is not difficult to derive:

$$\begin{aligned}{} & {} {\left\{ \begin{array}{ll} U_m-I_mr_m+(I_{1m}+C_m\dot{U}_{0m}-I_{0m})r_m\\ -(I_{0m}-I_{1m})r_{2m}-I_{0m}r_{0m}=0 \\ -U_{0m}-I_{2m}r_{3m}-(I_{1m}\\ +C_m\dot{U}_{0m}-I_{0m})r_m+I_mr_m=0 \\ -\dot{I}_{1m}L_m-I_{1m}r_{1m}-I_{0m}r_{0m}+U_m=0 \end{array}\right. }\nonumber \\{} & {} {(m=1,\ldots ,N, \text {the same below})} \end{aligned}$$
(1)

To simplify the form, suppose:

$$\begin{aligned} 1+\frac{r_{2 m}}{r_{m}}-\frac{r_{1 m}}{L_{m}} C_{m}\left( r_{2 m}+r_{3 m}+\frac{r_{2 m} r_{3 m}}{r_{m}}\right) =0 \end{aligned}$$
(2)

And without loss of generality, suppose that the inputs \(I_m\) from other neurons to the m-th neuron have the form:

$$\begin{aligned} I_m= & {} i_{1m}+\sum _{j=1}^n i_{0m}(j-1) \sin \omega _m(j-1)(t_j-t_{j-1})\nonumber \\{} & {} \quad +i_{0m}(n) \sin \omega _m(n)(t-t_n) \end{aligned}$$
(3)

Since power represents energy per unit time, the following expressions will use power to represent energy. The energy of the m-th neuron can be represented as:

$$\begin{aligned} P_{m}=U_{m}I_{0m}+(C_{m}r_{3m}\dot{U}_{0m}+U_{0m})I_{m} \end{aligned}$$
(4)

Substituting Eqs. 1, 2, and 3 into Eq. 4, we obtain the

$$\begin{aligned} P_{m}=P_{m}(t,U_{0m},\dot{U}_{0m}) \end{aligned}$$
(5)

To obtain the total energy of a neuron group consisting of N neurons, sum up N \(P_m\) terms to get:

$$\begin{aligned} P=\sum _{m=1}^{N}P_{m}=P(t,U_{0m},\dot{U}_{0m}) \end{aligned}$$
(6)

In the provided neuron model, the assumption of constant potential energy implies that power represents average energy. This suggests that the power consumed in this biophysical model can be conceptualized as the energy function of a dynamical system, thus prompting the introduction of the Lagrangian function. Serving as a constraint for this electrical model, the Lagrangian function plays a pivotal role in fully elucidating the biophysical model.

$$\begin{aligned} \frac{d}{d t}\left( \frac{\partial P}{\partial \dot{U}_{0m}}\right) -\frac{\partial P}{\partial U_{0m}}=0 \end{aligned}$$
(7)

Therefore, by using the Lagrange equation as a constraint, we can solve for:

$$\begin{aligned} P=P(t),\quad U_{0m}=U_{0m}(t) \end{aligned}$$
(8)

The expressions for energy and membrane potential derived in Eq. 8 can both portray the computational outcomes of the W–Z model, and they exhibit a dual nature. Since energy is a scalar quantity, it can be superimposed, enabling the summation of the energy of each neuron to represent the total energy of the neuron group. To investigate the computational outcomes of neuron energy from a systemic standpoint, energy is thus regarded as the computational result of the W–Z model in subsequent analyses.

2.3 Model of the olfactory neural network

2.3.1 Odor stimulus input

Linda’s research has demonstrated that various individual odors can trigger distinct combinations of olfactory receptors, and the utilization of different combinations of olfactory receptors can delineate the characteristics of odors [40]. Hence, it becomes feasible to represent different types of odors using a vector, as illustrated in Eq. 9, termed as an odor vector.

$$\begin{aligned}{} & {} s=(s_{glo_1},\ldots ,s_{glo_n})^{T} \nonumber \\{} & {} s_{glo_i}=\text {abs}(X_i),\quad X_i\sim N(0,100) \quad {(i=1,\ldots ,n)}\nonumber \\ \end{aligned}$$
(9)

Here, \(s_{glo_1},\ldots ,s_{glo_n}\) represent the n components of odor s, while n is equal to the number of OSN in this model. The method for generating the odor in this study involves taking the absolute value of the random variable \(X_i\) as the value of \(s_{glo_i}\), where \(X_i\) follows a normal distribution with a mean of 0 and a variance of 100.

The Euclidean distance between odor vectors is defined as the distance on the odor stimulus signal received by olfactory receptors (i.e., input space), as depicted in the following equation:

$$\begin{aligned} D_{i j}=\left\| s_{i}-s_{j}\right\| \end{aligned}$$
(10)

Here, \(s_i\) and \(s_j\) denote two distinct odors, and \(D_{ij}\) represents the Euclidean distance between the two odor vectors.

Based on Table 1, it is established that the OSNs consist of 10 types, with one representative for each type. In the discussion of the topology of the olfactory neural network, it becomes apparent that the same OB receives stimuli from the same type of OSNs. Consequently, there are a total of 10 OBs in the model. This suggests that the odor vector in Eq. 9 is a 10-dimensional vector.

Polese’s research suggests that the intensity of odor stimulus increases linearly with the concentration of the odor [41]. Meanwhile, Xu’s study accounts for the saturation effect of the stimulus by introducing a concentration saturation term and incorporates the respiratory cycle into the odor stimulus [30]. Considering these discussions, the expression for odor stimulus input is provided as shown in Eq. 11.

$$\begin{aligned} S_{odor}=\left( {\frac{1}{1+e^{-c}}}-{\frac{1}{2}}\right) \cdot s\cdot \text {abs}\left( \sin \left( {\frac{\pi }{T}}t\right) \right) \end{aligned}$$
(11)

T represents the respiratory cycle of odor stimulus input, which is set to 0.2. c represents the concentration of the odor. Given that an increase in concentration is analogous to a proportional increase in the variable s in Eq. 9 and has an insignificant impact on the final result, we assume c to be a constant value of 0.5. This assumption simplifies the model. Since s is a 10-dimensional vector, \(S_{odor}\) is also a 10-dimensional vector at any time, as shown in Figs. 3 and 4.

For mixed odors (represented by the odor vector \(s_\alpha \)), a convex combination of two odors (represented by the odor vectors \(s_{odor_1}\) and \(s_{odor_2}\)) is used to represent them [41], as shown in Eq. 12.

$$\begin{aligned} s_{\alpha }={\alpha }s_{odor_1}+(1-{\alpha })s_{odor_2},\quad {\alpha }\in [0,1] \end{aligned}$$
(12)

For the sake of convenience in calculation, let \(\alpha \) uniformly take values in the range [0, 1] to discretize \(\alpha \), as shown in Eq. 13.

$$\begin{aligned}{} & {} s_{i}=s_{odor_{1}}+\left( s_{odor_{2}}-s_{odor_{1}}\right) \nonumber \\{} & {} \quad \cdot \frac{i}{n_{odor}}\quad (i=0,1,2\ldots n_{odor}) \end{aligned}$$
(13)

Using Eq. 13, we can obtain \(s_0\),\(s_1\),...,\(s_{n_{odor}}\) for a total of \(n_{odor}+1\) mixed odors.

2.3.2 Network connections

At time t, the m-th neuron receives the total effect of stimuli from N other neurons

$$\begin{aligned} S_{m}(t)= & {} \sum _{j=1}^{N}\omega _{m j}Q(t-\tau ,j) \nonumber \\{} & {} \quad {(m=1,\ldots ,N,\text {the same below})} \end{aligned}$$
(14)

Here, \(\omega _{mj}\) represents the connection weight from the j-th neuron to the m-th neuron, \(\tau \) represents the time delay. In this study, we assume that the firing of neurons depends solely on the previous moment, hence the time constant \(\tau \) is set to 1. Q(tm) represents the firing status of the m-th neuron at time t. If the total effect of stimulation received by the m-th neuron from N other neurons at time t exceeds the threshold of the m-th neuron (which is represented as \(th_m\) in Eq. 15), then the m-th neuron fires and is denoted as 1; otherwise, it is denoted as 0. This can be expressed by the following equation:

$$\begin{aligned} Q(t,m)=\textrm{sgn}(S_m(t)-th_m) \end{aligned}$$
(15)

Assuming that \(I_m(t)\) in Eq. 8 has the following expression [27]:

$$\begin{aligned} I_m(t)= {\left\{ \begin{array}{ll} \begin{aligned} &{} i_{m1}+\sum _{j=1}^{n}\big (i_{0m}(j-1)\\ &{}\quad \sin \left( \omega _{m}(j-1)(t_{j}-t_{j-1})\right) \big )\\ &{}\quad +i_{0m}(n)\sin (\omega _{m}(n)(t-t_{n})),&{}S_{m}(t)\ge th_m\\ &{}i_{m1}, &{}S_{m}(t)<th_m \end{aligned} \end{array}\right. } \end{aligned}$$
(16)

where \(i_{m1}\) represents the current component necessary to maintain the resting membrane potential of the mth neuron. The term \(i_{0m}\) signifies the current stimulation received by the mth neuron from the input of the surrounding N neurons, which contributes to the sub-threshold current level. Furthermore, \(\omega _m\) is used to denote the frequency of action potentials [21].

Substituting this expression into the energy expression of the W–Z model (i.e., Eq. 8) yields the total energy of the neuronal group.

The synaptic connections between neurons are determined by the Hebbian rule [27]:

$$\begin{aligned}{} & {} \omega _{mj}(t+1)=\omega _{mj}(t)\cdot (1+L\cdot Q(t,m)\cdot Q(t-\tau ,j))\nonumber \\{} & {} \quad {(m,j=1,\ldots ,N)} \end{aligned}$$
(17)

In which, L is set to 0.02, \(\omega _{mj}(0)\) is set to 0.06, and \(max(\omega _{mj})\) is set to 1.5.

2.3.3 Clustering methods for odor pattern recognition

Through the calculation of the olfactory neural network, the total energy of the Pyr group in the PC can be obtained after learning from odor stimulation. Existing studies have indicated that the membrane potential spike sequences of the olfactory neural network under olfactory stimulation are crucial for odor coding [42, 43]. From the perspective of energy coding, the spike sequences of total energy are also important for odor coding and can serve as an important method for studying the overall activity of the PC under odor stimulation. Therefore, the core issue in odor pattern recognition is to adopt an appropriate measure of the distance between different total energy spike sequences of Pyr in the PC under different odor stimulations.

Due to the fact that under different odor stimulations, the length of the total energy spike sequences of the Pyr group in the PC and the corresponding spike moments are not exactly the same, the chosen distance measurement approach here needs to adapt to this property of the spike sequences and should provide better discrimination for different odors. Therefore, an appropriate kernel method is selected here to measure the distance of odor in the PC through sequence distance under the kernel function [30].

$$\begin{aligned} \begin{aligned} d_{ij}^{2}&=\left\| \phi (X_{i})-\phi (X_{j})\right\| ^{2}\\&= \langle \phi (X_{i})-\phi (X_{j}),\phi (X_{i})-\phi (X_{j}) \rangle \\&=K(X_{i},X_{i})+K(X_{j},X_{j})-2K(X_{i},X_{j}) \end{aligned} \end{aligned}$$
(18)
Fig. 3
figure 3

The odor vectors and odor stimulus inputs for the two single odors are as follows: \(s_{odor_1} = (16.2, 202.1, 19.4, 39.7, 78.0, 62.5, 37.5, 25.2, 57.0, 67.9)\), \(s_{odor_2} = (14.7, 99.1, 46.6, 91.8, 9.9, 67.0, 214.5, 54.3, 6.6, 19.9)\). a The blue bars represent the values of each component of the odor vector \(s_{odor_1}\) for the first odor, while the red bars represent the values of each component of the odor vector \(s_{odor_2}\) for the second odor. The values labeled above the bars indicate the values of the components of the odor vectors. b The graph shows the variation of each component of the odor stimulus input for the first odor, \(S_{odor_1}\), over one respiratory cycle (0.2 s) with time. c The graph shows the variation of each component of the odor stimulus input for the second odor, \(S_{odor_2}\), over one respiratory cycle (0.2 s) with time

Where \(\phi (X_i)\) represents the total energy spike sequence corresponding to the i-th neural group \(X_i\), and K is the kernel function defined as follows:

$$\begin{aligned} K(X_{i},X_{j})=\langle \phi (X_{i}),\phi (X_{j})\rangle =\sum _{m=1}^{N_{i}}\sum _{n=1}^{N_{j}}e^{-|t_{m}-t_{n}|} \nonumber \\ \end{aligned}$$
(19)

In this expression, \(N_i\) represents the total energy spike count (sequence length) of the i-th neural group \(X_i\), and \(t_m\) represents the timing of the m-th total energy spike of the i-th neural group \(X_i\).

For mixed odors, the distance between the mixed odor and single odors (i.e., the distance between the total energy spike sequences of the Pyr group in the PC) can be calculated. This allows the adoption of a nearest-neighbor method for odor pattern recognition, where if the distance between the mixed odor and a specific single odor is the smallest, the mixed odor is recognized as that single odor. This method is natural because similar odors will generate similar responses in the PC [44].

To more intuitively represent the similarity between odors, the term “similarity” will be used instead of “distance” to denote the final calculation result. Assuming that a set of distances is computed in subsequent calculations:

$$\begin{aligned} d=(d_1,d_2,...,d_n)^{T} \end{aligned}$$
(20)

Normalize and scale D (where high similarity and large distance are considered “positive”) using the following equation:

$$\begin{aligned} r_{i}=1-\frac{d_{i}-\min d}{\max d-\min d} \quad {(i=1,\ldots ,n)} \end{aligned}$$
(21)

3 Results

3.1 Pattern recognition of mixed odors by the Pyr group of the PC

Through Eq. 9, the odor vectors \(s_{odor_1}\) and \(s_{odor_2}\) for two odors, \(odor_1\) and \(odor_2\), are generated, as shown in Fig. 3a. Using Eq. 11, the odor stimulus inputs for the two odors, \(S_{odor_1}\) and \(S_{odor_2}\), within one respiratory cycle (0.2 s) can be obtained. In the discussion of the olfactory neural network model, it is specifically mentioned that \(S_{odor}\) is a 10-dimensional vector at any time, thus requiring representation with 10 curves, as shown in Fig. 3b, c.

First, the network is given odor stimuli to learn about these two odors. The odors are presented in the order of \(odor_1\) and \(odor_2\), with each odor presented three times alternatingly. Each odor lasts for one respiratory cycle (0.2 s), and the learning process lasts for a total of 1.2 s, as shown in Fig. 4. The total energy of each neural group in the network during the learning process (1.2 s) is calculated, as shown in Fig. 5. From Fig. 5, it can be observed that the total energy of each neural group in the olfactory network undergoes dynamic changes during the learning process of the odor stimuli, while the total energy of the Pyr group (as shown in Fig. 5d) reaches a relatively stable state by the end of the learning process.

Fig. 4
figure 4

Odor stimuli input during the odor learning process. During the odor learning process, the two types of odors are alternately presented as stimuli. Each stimulus lasts for 0.2 s, which is equivalent to one respiratory cycle. Specifically, the following time intervals correspond to the input of the first odor, \(odor_1\): 0–0.2 s, 0.4–0.6 s, 0.8–1 s. And the following time intervals correspond to the input of the second odor, \(odor_2\): 0.2–0.4 s, 0.6–0.8 s, 1–1.2 s

Fig. 5
figure 5

Total energy of various neural groups during the learning process: a Total energy of the PG group. b Total energy of the MC group. c Total energy of the GC group. d Total energy of the Pyr group. e Total energy of the FF group. f Total energy of the FB group

Fig. 6
figure 6

Odor stimuli input during the odor pattern recognition process. Here, \(s_{12}\) = (15.3, 140.3, 35.7, 70.9, 37.2, 65.2, 143.7, 42.7, 26.8, 39.1). a The blue bars represent the values of each component of the odor vector \(s_{odor_1}\) for the first odor, while the yellow bars represent the values of each component of the odor vector \(s_{odor_2}\) for the second odor. The yellow bars represent the values of each component of the odor vector \(s_{12}\) for the mixed odor stimulus \(S_{12}\). The values labeled above the bars indicate the values of the components of the odor vectors. \(s_{12}\) is the mixed odor obtained by combining 60% of \(odor_2\) and 40% of \(odor_1\). b The input of the mixed odor. During the odor pattern recognition process, the duration of the mixed odor stimulus input is 0.4 s (two respiratory cycles)

Through learning, the network weights of the olfactory neural network can be determined. By setting \(n_{odor}\) to 20 in Eq. 13, a total of 21 mixed odor vectors, \(s_0,s_1,...,s_{20}\), can be obtained by convexly combining the odor vectors of single odors, \(s_{odor_1}\) and \(s_{odor_2}\). Each mixed odor vector is then used as odor stimuli input to the network for 0.4 s (two respiratory cycles), resulting in the calculation of the total energy of each neural group. Taking the example of odor vector \(s_{12}\), As Eq. 13, \(s_{12}\) is calculated by the expression: \(s_{12}=\frac{8}{20}s_{odor_1}+\frac{12}{20}s_{odor_2}\), odor stimuli \(S_{12}\) can be calculated by the Eq. 11 The odor vector and odor stimuli input are illustrated in Fig. 6, while the total energy of each neural group is shown in Fig. 7.

Fig. 7
figure 7

Total energy of various neural groups during the odor pattern recognition process. a Total energy of the PG group. b Total energy of the MC group. c Total energy of the GC group. d Total energy of the Pyr group. e Total energy of the FF group. f Total energy of the FB group

In the clustering method of odor pattern recognition, it has been discussed that the spike sequence of total energy can represent the encoding of olfactory stimuli in the PC. By calculating the distance of odors in the output space through kernel functions, the similarity of odors in the output space can be obtained. Therefore, by substituting the total energy spike sequence of the Pyr group under each mixed odor stimulus into Eq. 18, and then normalizing and scaling it through Eq. 21, a curve showing the variation of the similarity between the mixed odor and \(odor_1\) (in the output space) as a function of the proportion of \(odor_1\) in the mixed odor can be obtained, as shown in Fig. 8.

Fig. 8
figure 8

Relationship between the similarity of mixed odors in the output space to \(odor_1\) and the proportion of \(odor_1\) in the mixed odor. The solid red curve represents the variation of the similarity between the mixed odor and \(odor_1\) in the output space with respect to the proportion of \(odor_1\) in the mixed odor. The red dashed curve represents the variation of the similarity between the mixed odor and \(odor_1\) in the input space with respect to the proportion of \(odor_1\) in the mixed odor. The black dashed line represents the mixed odor with a similarity of 0.5 to \(odor_1\). The blue circle represents the proportion of \(odor_1\) in the mixed odor where the similarity to \(odor_1\) is 0.5. At this point, the proportion of \(odor_1\) in the mixed odor is 42.6% in the output space and 50% in the input space

The results indicate that, firstly, as the proportion of a single odor component in the mixed odor in the input space approaches 100%, the similarity between the mixed odor and that single odor in the output space also approaches 1. This indicates a stronger tendency to recognize the mixed odor as that single odor, reflecting a higher olfactory recognition ability. As shown in Fig. 8, when the proportion of \(odor_1\) in the mixed odor is higher, the similarity between the mixed odor and \(odor_1\) in the output space increases. Conversely, when the proportion of \(odor_1\) is smaller, or in other words, when the proportion of \(odor_2\) is higher, the similarity between the mixed odor and \(odor_1\) in the output space decreases, indicating a higher similarity to \(odor_2\) in the output space.Secondly, when two single odors, \(odor_1\) and \(odor_2\), are almost evenly mixed, i.e., when \(odor_1\) comprises close to 50% of the mixed odor, the similarity between the mixed odor and \(odor_1\) in the output space is around 0.5. This aligns with our cognitive understanding that when two odors are nearly evenly mixed, the mixed odor cannot be completely attributed to either single odor. Lastly, it is worth noting that although overall, the similarity between the mixed odor and \(odor_1\) in the output space increases with an increase in the proportion of \(odor_1\) (solid red curve in Fig. 8), this trend differs from the input space (dashed red curve in Fig. 8). While in the input space, the similarity between the mixed odor and \(odor_1\) linearly increases with the proportion of \(odor_1\), in the output space, this change is nonlinear. When the similarity between the mixed odor and \(odor_1\) is 0.5 in the input space, the proportion of \(odor_1\) is 50%, it is termed as the boundary point in the input space. However, in the output space, when the similarity is 0.5, the proportion of \(odor_1\) is 42.6%, which is labeled as the boundary point of odor in the output space. This slight decrease compared to the input space is termed as the displacement phenomenon of odor boundaries. This displacement may lead to a tendency to recognize the mixed odor as one of the single odors when two odors are evenly mixed. This tendency towards recognizing a specific single odor may be a coding characteristic of the PC, which will be further analyzed and discussed below.

3.2 Encoding of odors in the Pyr group of the PC

In order to investigate the nonlinear increase in similarity between mixed odors and single odors with an increasing proportion of the single odor in the output space (as shown in Fig. 8), we first studied the encoding characteristics of single odors and odors similar to the single odor (in the input space) in the PC. Using Eq. 9, we first presented a single odor (\(s_{glo_1},...,s_{glo_{10}}\)) as shown in Fig. 9a. For convenience and to facilitate intuitive presentation of the results, \(s_{glo_3},...,s_{glo_{10}}\) were fixed, only \(s_{glo_1}\) and \(s_{glo_2}\) were changed, and \(s_0\) = (\(s_{glo_1},s_{glo_2}\)) was defined as this single odor. Thus, to study the distance between \(s_0\) and similar odors, 25 similar odors (including \(s_0\)) were uniformly selected in the rectangular neighborhood of \(s_0\) as shown in Fig. 9b. The similarity between the 25 similar odors and \(s_0\) in the input space was calculated, as shown in Fig. 9c. It can be seen that there is a linear relationship between the similarity between \(s_0\) and similar odors.

Fig. 9
figure 9

Odor vectors of single and similar odors and their similarity in the input space. Here, \(s = (80.7,23.8,74.8,120.8,51.6,45.9,71.5,50.0,60.1,4.4)\). a The bar chart shows the values of each component of the odor vector of the single odor, and the values above the bar chart are the component values of the odor vector. b The single odor \(s_0\) = (80.7, 23.8) and the similar odors in the rectangular neighborhood; the similar odors are selected with a step size of 5 in the directions of \(s_{glo_1}\) and \(s_{glo_2}\) with \(s_0\) as the center, totaling 25 similar odors (including \(s_0\)). c, d The single odor \(s_0\) = (80.7, 23.8), and the similarity between the similar odors and the single odor in the input space is measured using the Euclidean distance

The stimuli of the aforementioned 25 similar odors were input into the olfactory neural network, and a total energy spike sequence was obtained in the PC. By calculating the kernel distance between the sequences, the similarity between \(s_0\) and the similar odors in the output space was obtained, as shown in Fig. 10. It can be observed that the similarity between similar odors and \(s_0\) changed after being processed by the olfactory neural network. Specifically, the similarity between similar odors in the input space is linearly related to the distance between them, while the similarity between similar odors in the output space is nonlinearly related to the distance between them in the input space. It can be seen that the sensitivity of odor vectors in the directions of \(s_{glo_1}\) and \(s_{glo_2}\) around \(s_0\) is different. More specifically, changes in the direction of \(s_{glo_1}\) have a relatively smaller impact on the similarity between odor vectors in the output space, while changes in the direction of \(s_{glo_2}\) have a relatively larger impact. This suggests that the nonlinear representation of odors in the output space can be used to calculate the boundaries for odor discrimination and to analyze and explain the phenomenon of displacement of the boundary in mixed odor pattern recognition.

Fig. 10
figure 10

Similarity between single odor and similar odor in output space. The single odor is \(s_0\) = (80.7, 23.8), and the similarity between the similar odor and the single odor in the output space is measured using kernel distance

Two similar odors, \(s_{odor_1}\) = (70.7, 13.8) and \(s_{odor_2}\) = (90.7, 33.8), were selected from the 25 similar odors in the neighborhood of \(s_0\). Firstly, similarly, \(s_{odor_1}\) was input as a single odor, and the similarity between the similar odors (25 above-mentioned) and \(s_{odor_1}\) in both the input and output spaces were calculated, as shown in Fig. 11a, b. For \(s_{odor_2}\), it was also input as a single odor, and the similarity between the similar odors and \(s_{odor_2}\) in both the input and output spaces were calculated, as shown in Fig. 11c, d.

Then, the 25 odors were used as the mixed odors of \(s_{odor_1}\) and \(s_{odor_2}\). To facilitate the analysis of the results, the distance between the mixed odor and \(s_{odor_1}\) was taken as a positive value, the distance between the mixed odor and \(s_{odor_2}\) was taken as a negative value, and the sum of the two was normalized and scaled to obtain the similarity between the mixed odor and single odor. This is because when the mixed odor is more similar to \(s_{odor_1}\), the distance between the mixed odor and \(s_{odor_1}\) is smaller than the distance between the mixed odor and \(s_{odor_2}\), so the difference between the distances is negative. After scaling and normalizing, it is closer to 1; conversely, it is closer to 0. This also indicates that when the normalized and scaled result is 0.5, the similarity between the mixed odor and the two odors is the same (distances are equal). The results are shown in Fig. 11e, f.

Fig. 11
figure 11

The similarity between two single odors and similar odors in the input–output space, as well as the similarity between mixed odors and the two single odors in the input–output space. The two single odors are \(s_{odor_1}\) = (70.7, 13.8) and \(s_{odor_2}\) = (90.7, 33.8). a Similarity between \(s_{odor_1}\) and similar odors in the input space; b Similarity between \(s_{odor_1}\) and similar odors in the output space; c Similarity between \(s_{odor_2}\) and similar odors in the input space; d Similarity between \(s_{odor_2}\) and similar odors in the output space; e Similarity between mixed odors and the two single odors in the input space; f Similarity between mixed odors and the two single odors in the output space. e, f The closer the similarity value is to 1, the more similar the mixed odor is to \(s_{odor_1}\); conversely, the closer the value is to 0, the more similar the mixed odor is to \(s_{odor_2}\)

From the above analysis, it can be understood that the contour line formed by the similarity of 0.5 between mixed odors and two single odors is the boundary curve dividing the mixed odor into \(s_{odor_1}\) and \(s_{odor_2}\), as shown in Fig. 12. It was observed that the boundary curves for mixed odors in the input space and output space were different, which was termed as the phenomenon of odor boundary curve displacement. When mixed odors were constrained to convex combinations of two single odors, the intersection of the line connecting the two single odors with the boundary curve of the mixed odor was the mixed odor boundary point discussed earlier, as shown in Fig. 8. This indicated that when mixed odors were limited to convex combinations of two single odors, the odor boundary curves degenerated into odor boundary points. Through the phenomenon of odor boundary curve displacement, a more intuitive and profound understanding of the displacement in odor boundary points could be achieved, reflecting the nonlinear characteristics in the encoding of odors by the PC more profoundly.

Fig. 12
figure 12

The boundary curvess in the input–output space for mixed odors and the two single odors. The black dashed curve represents the boundary curve for mixed odors in the input space, while the red dashed curve represents the boundary curve for mixed odors in the output space. When a mixed odor is located to the left of the odor boundary curve, it is classified as \(s_{odor_1}\); otherwise, it is classified as \(s_{odor_2}\)

4 Discussion

Based on the anatomical structure of the olfactory neural system, this article constructed an olfactory neural system network based on the W–Z neural energy model. The complex behavioral characteristics of the network model under various odor input conditions were studied, and pattern recognition of the total energy of neuron groups in response to external odor inputs was conducted, resulting in effective and reliable results. Additionally, a detailed study of the behavioral characteristics of the Pyr group in the PC during odor pattern recognition and encoding processes led to the following three important conclusions:

4.1 Dynamic behavior in the olfactory neural network

During the process of learning and recognizing odors, the total energy of various neuron groups in the olfactory neural network underwent dynamic changes, which were observable in Figs. 5 and 7. When OSNs in the olfactory neural network received odor stimuli and engaged in the process of learning and recognition, including the Pyr group in the PC, the total energy of various neuron groups exhibited oscillations with different waveforms and amplitudes over time. This reflected the energy representation during the process of stimulation, learning, and recognition in olfactory cognition. Only when olfactory cognition was formed did the energy oscillation pattern tend to stabilize. On one hand, this demonstrated the dynamic behavior of the olfactory neural network based on energy coding induced by odor stimuli; on the other hand, this dynamic behavior was closely related to odor pattern recognition and encoding. Generally, after action potentials were generated in the form of electrical energy, a portion of the energy was metabolized in various forms of heat energy, while another portion of the energy might be generated in the form of cognition. Therefore, olfactory cognition was a form of information energy, and the sum of these two energy components followed the principle of energy conservation with the energy of action potentials.

4.2 Nonlinear features in odor pattern recognition and encoding

In the process of odor pattern recognition in the olfactory neural network, there existed a nonlinear relationship between the similarity of various odors in the output space and the proportion of odor components. When odors and similar odors exhibited a linear relationship in the input space (Euclidean distance), as shown in Figs. 9 and 11; after information processing by the olfactory neural network, on the output space of the Pyr group in the PC, odors and similar odors exhibited a nonlinear relationship (kernel distance), as shown in Figs. 10 and 11. This transition from linearity to nonlinearity reflected the nonlinear characteristics of odor processing in the olfactory neural network, and this nonlinear characteristic represented a high-level representation of odors encoded in the PC after odor information underwent a series of processing in the olfactory neural system and was projected to the PC. This high-level representation was calculated based on the kernel distance of the total energy of the Pyr group in the PC. This provided a new perspective for understanding the complexity of odor recognition based on the principle of energy coding in the future.

4.3 Boundary displacement phenomenon in mixed odor pattern recognition

In the computational results of the olfactory neural network for the recognition of mixed odors, a displacement of the odor boundary point was observed, as shown in Fig. 8. This phenomenon could be more generally summarized as the displacement of the odor boundary curve, as shown in Fig. 12. The cause of this odor boundary displacement could be attributed to the physical nonlinear characteristics of odor processing and encoding in the olfactory neural network. This could lead to a greater tendency to identify mixed odors as single odors in the output space, namely the PC, reflecting the differences in olfactory recognition thresholds (i.e., sensitivity to different components) of mixed odors within the olfactory system [45]. This phenomenon, as part of the odor encoding characteristics of the PC, provided important insights into the mechanisms of odor pattern recognition.

Understanding how to properly construct models of the olfactory neural system and employ suitable methods to study the encoding of the olfactory neural system was crucial not only for accurately identifying and evaluating olfactory cognition and olfactory cognitive impairments using quantitative approaches but also for assessing medical treatments related to olfactory amygdala in Parkinson’s disease (PD) patients [46, 47].

These research findings once again demonstrated that the H–H model was suitable for modeling, analyzing, and computing neural networks with a small number of simple and local neurons, while the W–Z model was suitable for modeling, analyzing, and computing complex networks with a large number of neurons. Particularly, due to the symmetric relationship between neural information and neural energy, as well as the advantages of simplicity in computation and the preservation of key information, the neural energy theory and the W–Z neuron model held great potential as research methods for constructing large-scale neuroscience models.