Anomaly detection method, system and medium based on spiking neural network

By employing self-organizing learning and risk gating mechanisms based on spiking neural networks, this approach addresses the issues of high energy consumption and poor recognition capabilities in existing anomaly detection schemes on edge devices. It achieves low-energy, high-sensitivity anomaly detection, making it suitable for industrial faults and new network attack scenarios.

CN123181891APending Publication Date: 2026-11-27TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610889697.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing anomaly detection solutions are energy-intensive when processing time-series data, difficult to deploy on edge devices, and have poor ability to identify scarce and unpredictable anomaly samples, thus failing to meet industrial response requirements.

Method used

An anomaly detection method based on spiking neural networks is adopted. The model is trained through image preprocessing and frequency coding operations. The self-organizing learning and risk gating mechanism of spiking neural networks are used to update synaptic weights and simulate the microcircuits of the cerebellar cortex for anomaly identification.

Benefits of technology

It achieves low-energy anomaly detection, improves sensitivity and agility to time-series data, and can identify unseen anomaly types to meet industrial response requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181891A_ABST
    Figure CN123181891A_ABST
Patent Text Reader

Abstract

The application provides an anomaly detection method and system based on a spiking neural network and a medium. The anomaly detection method based on the spiking neural network comprises: performing image preprocessing and frequency encoding on picture samples of a target scene to obtain training sample data; training a spiking neural network model using the training sample data to obtain a trained anomaly detection model; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples; performing frequency encoding on a to-be-tested image of the target scene to obtain to-be-tested image data; inputting the to-be-tested image data into the anomaly detection model to obtain a spiking response result; and determining an anomaly detection result of the to-be-tested image data according to the spiking response result and adaptive control operation based on a risk gating mechanism. The method can improve the sensitivity of anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and brain-like computing technology, and in particular to an anomaly detection method, system and medium based on spiking neural networks. Background Technology

[0002] Currently, most mainstream anomaly detection solutions employ deep learning models, such as autoencoders or convolutional neural networks. These solutions learn the distribution characteristics of normal samples and determine whether anomalies exist by comparing the reconstruction error between the input data and the model's reconstructed data, or by using preset thresholds. In terms of computational logic, these models are typically based on continuous numerical weight matrix operations, primarily relying on high-performance GPUs and other computing resources for large-scale parallel floating-point multiplication and addition operations.

[0003] However, existing technical solutions face severe challenges in practical applications. First, traditional second-generation artificial neural networks involve high-intensity multiply-accumulate operations when processing time-series data, resulting in extremely high hardware power consumption. This makes it difficult to deploy models on edge devices and IoT sensors with limited power supply or computing resources for real-time monitoring. Second, existing static neural networks often ignore the dynamic characteristics of signals on the time axis, failing to effectively capture complex spatiotemporal correlation information. Even with recurrent neural networks or long short-term memory networks attempting to process time-series data, their complex gating mechanisms and recursive structures often lead to high inference latency, making it difficult to meet millisecond-level industrial response requirements. Furthermore, existing methods are highly dependent on high-quality labeled data. In real-world scenarios such as industrial fault detection and novel network attacks, anomalous samples are typically extremely scarce and unpredictable, resulting in poor generalization ability of learning models based on supervised learning or strong reconstruction, making it difficult to identify unseen anomaly types.

[0004] To address the aforementioned bottlenecks, developing a detection architecture capable of identifying minute environmental anomalies from complex background noise with extremely low energy consumption is of practical significance and has promising application prospects. Summary of the Invention

[0005] This application provides an anomaly detection method, system, and medium based on a spiking neural network, aiming to solve the problem of poor sensitivity in existing anomaly detection processes and improve the sensitivity of anomaly detection.

[0006] In a first aspect, embodiments of this application provide an anomaly detection method based on a spiking neural network, the method comprising: Image preprocessing and frequency encoding operations are performed on image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information; The training sample data is used to train the spiking neural network model to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after the frequency encoding operation and output the pulse firing activity; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The frequency encoding operation is performed on the image to be tested of the target scene to obtain the image data to be tested; The image data to be tested is input into the anomaly detection model to obtain the impulse response result; Based on the impulse response result and the adaptive control operation based on the risk gating mechanism, the anomaly detection result of the image data to be tested is determined; the anomaly detection result characterizes whether the image data to be tested is an abnormal image; the adaptive control operation includes online adaptive operation and recovery control operation.

[0007] In one possible implementation, the image preprocessing and frequency encoding operations performed on the image samples of the target scene to obtain training sample data include: Image samples of the target scene are selected from the original dataset, and a category filtering operation is performed using the index information to obtain a normal sample dataset; The normal original images of the normal sample dataset are linearly scaled to adjust the numerical range to a preset numerical range, thereby obtaining compressed image numerical information; the preset numerical range is a range that adapts to the frequency input range of the spiking neural network. Based on the image compression numerical information, frequency numerical information is obtained; the frequency numerical information is used as the instantaneous transmission frequency of the pulse neural network model.

[0008] In one possible implementation, the spiking neural network model is a cerebellar model architecture containing a feedforward inhibition (FFI) loop; the spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer; the Poisson input layer is used to transmit the received signal to the GC layer; the GC layer is used to extract sample features and provide an excitation signal to the PC layer; the BC layer is used to receive the signal input from the GC layer and send an inhibition signal to the PC layer; the PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

[0009] In one possible implementation, the GC layer and the BC layer employ a leakage integral firing (LIF) model; the PC layer employs an AdEx model; the excitation signal is an excitatory conductance; the inhibition signal is an inhibitory conductance; when the input data of the spiking neural network model is of the normal category, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input category of the spiking neural network model is abnormal, the excitatory conductance is suppressed by the subsequently arriving inhibitory conductance signal, and the PC layer exhibits a silent state; the path from the GC layer to the PC layer is a long-term enhancement (LTP) model based on the pulse timing-dependent plasticity (STDP) rule; the path from the BC layer to the PC layer employs a dynamic synapse with short-term inhibition (STD) characteristics.

[0010] In one possible implementation, the spiking neural network model updates the synaptic weights through self-organizing learning from normal samples via the following process: The pulse sequence of the normal sample is input into the spiking neural network model, and the pulse sequence of the normal sample is encoded in high dimension sparsely through the GC layer; wherein, the basic GC neuron subgroup in the neurons of the GC layer that matches the feature space of the current normal sample is activated to perform orthogonal pattern separation of different normal samples in the GC layer. The activated subpopulation of basic GC neurons triggers two parallel signal paths, and the time difference between the physical transmission of the two parallel signal paths forms the learning window of the PC layer. Within the learning window, the excitability weights from the GC layer to the PC layer are adjusted according to the impulse causality time sequence using the STDP rule.

[0011] In one possible implementation, inputting the image data to be tested into the anomaly detection model to obtain the impulse response result includes: If the image data to be tested is an abnormal signal that is different from the feature space of the normal sample, then the GC layer activates the test GC neuron subpopulation based on the orthogonal pattern separation mechanism; the test GC neuron subpopulation does not overlap with the basic neuron subpopulation. The BC layer generates a test suppression signal, which suppresses the test excitation signal of the PC layer corresponding to the image data to be tested, so that the PC layer exhibits a silent state because it does not generate action potentials. If the output of the PC layer corresponding to the image data under test is detected to be in the silent state, then the impulse response result of the image data under test is an abnormal image; the abnormal image indicates that the input image does not belong to the type that the anomaly detection model has been trained on.

[0012] In one possible implementation, determining the anomaly detection result of the image data to be tested based on the impulse response result and the adaptive control operation based on the risk gating mechanism includes: Monitor the impulse response results to determine the anomaly detection results of the image data under test; Based on the anomaly detection results over a preset time period and the adaptive control operation based on the risk gating mechanism, the anomaly detection model is subjected to online adaptive operation and recovery control operation.

[0013] In one possible implementation, the online adaptive and recovery control operations performed on the anomaly detection model based on the anomaly detection results for a preset duration and the adaptive control operation based on a risk gating mechanism include: If the abnormal signal is continuously input for more than the preset duration based on the abnormal detection result, the BC layer performs a recovery control operation; the recovery control operation includes, based on short-term suppression of STD effect, enabling the PC layer to resume sporadic pulse delivery; If the PC layer resumes sporadic pulse delivery, an online adaptation operation is performed; the online adaptation operation includes the following process: Obtain the external supervision signal of the image data to be tested; Based on the external monitoring signals, a security review of the recovery process is conducted to obtain the review results. If the review result information is low risk, then new training sample data for normal samples is constructed based on the image data to be tested; The anomaly detection model is then adaptively learned based on the newly added training sample data to update the anomaly detection model.

[0014] The anomaly detection method based on a spiking neural network provided in this application can obtain training sample data by performing image preprocessing and frequency encoding operations on image samples of a target scene. The training sample data includes normal sample image data results with frequency numerical information. Using the training sample data, a spiking neural network model is trained to obtain a trained anomaly detection model. The spiking neural network model is used to acquire the image data results after the frequency encoding operation and output pulse firing activity. The anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The frequency encoding operation is performed on the target scene image to be tested to obtain the image to be tested. The data is input into the anomaly detection model to obtain the impulse response result. Based on the impulse response result and the adaptive control operation based on the risk gating mechanism, the anomaly detection result of the image data to be tested is determined. The anomaly detection result characterizes whether the image data to be tested is an anomalous image. The adaptive control operation includes online adaptive operation and recovery control operation, thereby realizing the anomaly identification by converting static features into continuous electrical conduction and using a spiking neural network model with a nonlinear weight plasticity mechanism to simulate the microcircuit of the cerebellar cortex, thereby achieving encoding and detection of anomalous inputs, generating higher sensitivity to anomalous factors and subtle changes in time-series inputs, and improving the sensitivity of anomaly detection.

[0015] Secondly, embodiments of this application provide an anomaly detection system based on a spiking neural network, comprising: The training sample construction module is used to perform image preprocessing and frequency encoding operations on image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information; The detection model training module is used to train the spiking neural network model using the training sample data to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after the frequency encoding operation and output the pulse firing activity; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The detection data preparation module is used to perform the frequency encoding operation on the image to be tested of the target scene to obtain the image data to be tested; The response result generation module is used to input the image data to be tested into the anomaly detection model to obtain the impulse response result; The identification and performance control module is used to determine the anomaly detection result of the image data under test based on the impulse response result and the adaptive control operation based on the risk gating mechanism; the anomaly detection result characterizes whether the image data under test is an abnormal image; the adaptive control operation includes online adaptation operation and recovery control operation.

[0016] In one possible implementation, the training sample construction module is specifically used for: Image samples of the target scene are selected from the original dataset, and a category filtering operation is performed using the index information to obtain a normal sample dataset; The normal original images of the normal sample dataset are linearly scaled to adjust the numerical range to a preset numerical range, thereby obtaining compressed image numerical information; the preset numerical range is a range that adapts to the frequency input range of the spiking neural network. Based on the image compression numerical information, frequency numerical information is obtained; the frequency numerical information is used as the instantaneous transmission frequency of the pulse neural network model.

[0017] In one possible implementation, the spiking neural network model is a cerebellar model architecture containing a feedforward inhibition (FFI) loop; the spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer; the Poisson input layer is used to transmit the received signal to the GC layer; the GC layer is used to extract sample features and provide an excitation signal to the PC layer; the BC layer is used to receive the signal input from the GC layer and send an inhibition signal to the PC layer; the PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

[0018] In one possible implementation, the GC layer and the BC layer employ a leakage integral firing (LIF) model; the PC layer employs an AdEx model; the excitation signal is an excitatory conductance; the inhibition signal is an inhibitory conductance; when the input data of the spiking neural network model is of the normal category, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input category of the spiking neural network model is abnormal, the excitatory conductance is suppressed by the subsequently arriving inhibitory conductance signal, and the PC layer exhibits a silent state; the path from the GC layer to the PC layer is a long-term enhancement (LTP) model based on the pulse timing-dependent plasticity (STDP) rule; the path from the BC layer to the PC layer employs a dynamic synapse with short-term inhibition (STD) characteristics.

[0019] In one possible implementation, the anomaly detection system based on a spiking neural network further includes a synaptic weight update module; the synaptic weight update module is used by the spiking neural network model to update the synaptic weights through self-organizing learning of normal samples via the following process: The pulse sequence of the normal sample is input into the spiking neural network model, and the pulse sequence of the normal sample is encoded in high dimension sparsely through the GC layer; wherein, the basic GC neuron subgroup in the neurons of the GC layer that matches the feature space of the current normal sample is activated to perform orthogonal pattern separation of different normal samples in the GC layer. The activated subpopulation of basic GC neurons triggers two parallel signal paths, and the time difference between the physical transmission of the two parallel signal paths forms the learning window of the PC layer. Within the learning window, the excitability weights from the GC layer to the PC layer are adjusted according to the impulse causality time sequence using the STDP rule.

[0020] In one possible implementation, the response result generation module is specifically used for: If the image data to be tested is an abnormal signal that is different from the feature space of the normal sample, then the GC layer activates the test GC neuron subpopulation based on the orthogonal pattern separation mechanism; the test GC neuron subpopulation does not overlap with the basic neuron subpopulation. The BC layer generates a test suppression signal, which suppresses the test excitation signal of the PC layer corresponding to the image data to be tested, so that the PC layer exhibits a silent state because it does not generate action potentials. If the output of the PC layer corresponding to the image data under test is detected to be in the silent state, then the impulse response result of the image data under test is an abnormal image; the abnormal image indicates that the input image does not belong to the type that the anomaly detection model has been trained on.

[0021] In one possible implementation, the identification and performance regulation module is specifically used for: Monitor the impulse response results to determine the anomaly detection results of the image data under test; Based on the anomaly detection results over a preset time period and the adaptive control operation based on the risk gating mechanism, the anomaly detection model is subjected to online adaptive operation and recovery control operation.

[0022] In one possible implementation, the identification and performance regulation module is specifically used for: If the abnormal signal is continuously input for more than the preset duration based on the abnormal detection result, the BC layer performs a recovery control operation; the recovery control operation includes, based on short-term suppression of STD effect, enabling the PC layer to resume sporadic pulse delivery; If the PC layer resumes sporadic pulse delivery, an online adaptation operation is performed; the online adaptation operation includes the following process: Obtain the external supervision signal of the image data to be tested; Based on the external monitoring signals, a security review of the recovery process is conducted to obtain the review results. If the review result information is low risk, then new training sample data for normal samples is constructed based on the image data to be tested; The anomaly detection model is then adaptively learned based on the newly added training sample data to update the anomaly detection model.

[0023] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the first aspects.

[0024] Fourthly, embodiments of this application provide a computer program product including computer instructions stored in a computer-readable storage medium; when a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, causing the computer device to perform the steps of the method described in any of the first aspects.

[0025] The technical effects of any of the implementation methods in the second to fourth aspects can be found in the technical effects of the implementation method in the first aspect, and will not be repeated here. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating an anomaly detection method based on a spiking neural network, provided in an embodiment of this application; Figure 2 A structural block diagram of an anomaly detection system based on a spiking neural network provided in an embodiment of this application; Figure 3 This is a block diagram of another anomaly detection system based on a spiking neural network provided in an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] Currently, most mainstream anomaly detection solutions employ deep learning models, such as autoencoders or convolutional neural networks. These solutions learn the distribution characteristics of normal samples and determine whether anomalies exist by comparing the reconstruction error between the input data and the model's reconstructed data, or by using preset thresholds. In terms of computational logic, these models are typically based on continuous numerical weight matrix operations, primarily relying on high-performance GPUs and other computing resources for large-scale parallel floating-point multiplication and addition operations.

[0030] However, existing technical solutions face severe challenges in practical applications. First, traditional second-generation artificial neural networks involve high-intensity multiply-accumulate operations when processing time-series data, resulting in extremely high hardware power consumption. This makes it difficult to deploy models on edge devices and IoT sensors with limited power supply or computing resources for real-time monitoring. Second, existing static neural networks often ignore the dynamic characteristics of signals on the time axis, failing to effectively capture complex spatiotemporal correlation information. Even with recurrent neural networks or long short-term memory networks attempting to process time-series data, their complex gating mechanisms and recursive structures often lead to high inference latency, making it difficult to meet millisecond-level industrial response requirements. Furthermore, existing methods are highly dependent on high-quality labeled data. In real-world scenarios such as industrial fault detection and novel network attacks, anomalous samples are typically extremely scarce and unpredictable, resulting in poor generalization ability of learning models based on supervised learning or strong reconstruction, making it difficult to identify unseen anomaly types.

[0031] To address the aforementioned bottlenecks, developing a detection architecture capable of identifying minute environmental anomalies from complex background noise with extremely low energy consumption is of practical significance and has promising application prospects.

[0032] Based on this, embodiments of this application provide an anomaly detection method, system, and medium based on a spiking neural network. The anomaly detection method based on a spiking neural network includes: performing image preprocessing and frequency encoding operations on image samples of a target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency numerical information; training a spiking neural network model using the training sample data to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after frequency encoding operations and output pulse emission activities; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples; performing frequency encoding operations on the target scene's image to be tested to obtain image data to be tested; inputting the image data to be tested into the anomaly detection model to obtain pulse response results; determining the anomaly detection result of the image data to be tested based on the pulse response results and adaptive control operations based on a risk gating mechanism; the anomaly detection result characterizes whether the image data to be tested is an anomalous image; the adaptive control operations include online adaptation operations and recovery control operations. This anomaly detection method based on spiking neural networks (SNNs) obtains training sample data by performing image preprocessing and frequency encoding operations on image samples of a target scene. The training sample data includes normal sample image data results with frequency numerical information. Using the training sample data, a spiking neural network model is trained to obtain a trained anomaly detection model. The spiking neural network model is used to acquire the image data results after frequency encoding and output pulse firing activity. The anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The method involves performing frequency encoding operations on the target scene's image to obtain the image data to be tested. The image data to be tested is input into the anomaly detection model to obtain the impulse response result. Based on the impulse response result and the adaptive control operation based on the risk gating mechanism, the anomaly detection result of the image data to be tested is determined. The anomaly detection result characterizes whether the image data to be tested is an anomalous image. The adaptive control operation includes online adaptive operation and recovery control operation, thereby realizing the anomaly identification by converting static features into continuous electrical conduction and using a spiking neural network model with a nonlinear weight plasticity mechanism to simulate the microcircuit of the cerebellar cortex, thereby achieving the encoding and detection of anomalous inputs, generating higher sensitivity to anomalous factors and subtle changes in time-series inputs, and improving the sensitivity of anomaly detection.

[0033] To make the inventive objectives, technical solutions, and advantages of the embodiments of this application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] The anomaly detection method based on spiking neural networks provided in the embodiments of this application will be further explained below. The anomaly detection method based on spiking neural networks provided in this application, such as... Figure 1 As shown, the method includes the following steps: Step S101: Perform image preprocessing and frequency encoding operations on the image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information.

[0035] In one optional embodiment, image preprocessing and frequency encoding operations are performed on image samples of the target scene to obtain training sample data, including: Image samples of the target scene are selected from the original dataset, and a category filtering operation is performed using the index information to obtain a normal sample dataset; Linear scaling is performed on the original normal images of the normal sample dataset to adjust the numerical range to a preset range, thus obtaining compressed image numerical information; the preset numerical range is a range that matches the frequency input range of the spiking neural network. Frequency numerical information is obtained by compressing numerical information from the image; the frequency numerical information is used as the instantaneous transmission frequency of the spiking neural network model.

[0036] In some embodiments of this application, the target scenario is a real-time monitoring scenario that processes time-series data.

[0037] In some embodiments of this application, the target scenario is a detection scenario for processing time-series data with millisecond-level industrial response requirements.

[0038] In some embodiments of this application, the target scenario is an industrial fault detection scenario.

[0039] In some embodiments of this application, the target scenario is a novel network attack detection scenario.

[0040] Step S102: The spiking neural network model is trained using training sample data to obtain a trained anomaly detection model. The spiking neural network model is used to acquire the image data results after frequency encoding and output the pulse emission activity. The anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples.

[0041] In practice, the anomaly detection model is obtained by updating the synaptic weights of the spiking neural network model through self-organization learning of normal samples.

[0042] In some embodiments, the spiking neural network model is a cerebellar model architecture that includes a feedforward inhibition (FFI) loop; the spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer; the Poisson input layer is used to transmit the received signal to the GC layer; the GC layer is used to extract sample features and provide an excitation signal to the PC layer; the BC layer is used to receive the signal input from the GC layer and send an inhibition signal to the PC layer; the PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

[0043] In one optional embodiment, the GC layer and BC layer employ a leakage integral firing (LIF) model; the PC layer employs an AdEx model; the excitation signal is excitatory conductance; the inhibition signal is inhibitory conductance; when the input data category of the spiking neural network model is normal, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input category of the spiking neural network model is abnormal, the excitatory conductance is suppressed by the subsequently arriving inhibitory conductance signal, and the PC layer exhibits a silent state; the path from the GC layer to the PC layer is a long-term enhancement (LTP) model based on the pulse temporal dependent plasticity (STDP) rule; the path from the BC layer to the PC layer employs a dynamic synapse with short-term inhibition (STD) characteristics.

[0044] In one alternative embodiment, the spiking neural network model updates synaptic weights through self-organizing learning of normal samples to obtain an anomaly detection model via the following process: The pulse sequence of normal samples is input into the spiking neural network model, and the pulse sequence of normal samples is encoded in high dimension sparsely through the GC layer. Among them, the basic GC neuron subpopulation that matches the feature space of the current normal sample is activated in the GC layer to perform orthogonal pattern separation of different normal samples in the GC layer. The activated subpopulation of basic GC neurons triggers two parallel signal paths, and the time difference in the physical transmission of the two parallel signal paths forms the learning window of the PC layer. Within the learning window, the STDP rule is used to adjust the excitability weights from the GC layer to the PC layer based on the impulse causal timing.

[0045] Step S103: Perform frequency encoding on the image to be tested of the target scene to obtain the image data to be tested.

[0046] Step S104: Input the image data to be tested into the anomaly detection model to obtain the impulse response results.

[0047] In one optional embodiment, the image data to be tested is input into an anomaly detection model to obtain impulse response results, including: If the image data to be tested is an abnormal signal that is different from the feature space of normal samples, the GC layer activates the test GC neuron subpopulation based on the orthogonal pattern separation mechanism; the test GC neuron subpopulation does not overlap with the basic neuron subpopulation. The BC layer generates a test suppression signal, which suppresses the test excitation signal of the PC layer corresponding to the image data to be tested, so that the PC layer exhibits a quiescent state because it does not generate action potentials. If the output of the PC layer corresponding to the image data under test is found to be in a silent state, then the impulse response result of the image data under test is an abnormal image; an abnormal image indicates that the input image does not belong to the type that the anomaly detection model has been trained on.

[0048] Step S105: Determine the anomaly detection result of the image data to be tested based on the impulse response result and the adaptive control operation based on the risk gating mechanism; the anomaly detection result characterizes whether the image data to be tested is an abnormal image; the adaptive control operation includes online adaptive operation and recovery control operation.

[0049] In one optional embodiment, the anomaly detection result of the image data to be tested is determined based on the impulse response result and the adaptive control operation based on the risk gating mechanism, including: Monitor the impulse response results to determine the anomaly detection results of the image data under test; Based on the anomaly detection results over a preset time period and the adaptive control operation based on the risk gating mechanism, the anomaly detection model is subjected to online adaptive and recovery control operations.

[0050] In one optional embodiment, based on the anomaly detection results over a preset duration and adaptive control operations based on a risk gating mechanism, the anomaly detection model undergoes online adaptive and recovery control operations, including: If the abnormal signal is continuously input for more than the preset duration based on the abnormality detection result, the BC layer will perform a recovery control operation; the recovery control operation includes suppressing the STD effect based on short time duration to enable the PC layer to resume sporadic pulse delivery; If sporadic pulse delivery resumes at the PC layer, an online adaptation operation is performed; the online adaptation operation includes the following process: Acquire external supervision signals for the image data under test; Based on external monitoring signals, conduct a security review of the recovery process and obtain the review results. If the review result indicates low risk, then new training sample data for normal samples will be constructed based on the image data to be tested. This allows the anomaly detection model to adaptively learn based on newly added training sample data in order to update the anomaly detection model.

[0051] The anomaly detection method based on a spiking neural network provided in this embodiment includes: performing image preprocessing and frequency encoding operations on image samples of a target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency numerical information; using the training sample data to train a spiking neural network model to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after frequency encoding operations and output pulse firing activities; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples; performing frequency encoding operations on the image to be tested in the target scene to obtain image data to be tested; inputting the image data to be tested into the anomaly detection model to obtain pulse response results; determining the anomaly detection result of the image data to be tested based on the pulse response results and adaptive control operations based on a risk gating mechanism; the anomaly detection result characterizes whether the image data to be tested is an anomalous image; the adaptive control operations include online adaptation operations and recovery control operations. This method transforms static features into continuous electrical conduction and uses a spiking neural network model with a nonlinear weight plasticity mechanism for anomaly identification. It simulates the microcircuits of the cerebellar cortex to encode and detect abnormal inputs, thereby increasing the sensitivity to abnormal factors and subtle changes in time-series inputs, improving the sensitivity of anomaly detection, and enhancing the detection performance of anomaly detection.

[0052] This application also provides an anomaly detection method based on a spiking neural network, which includes: Step S1: Preprocess and frequency-encode the image samples.

[0053] Step S2: Construct a cerebellar feedforward inhibition SNN model, using a Poisson-coded sequence of image pixel pulses as input and the pulse firing activity of Purkinje cells (PCs) as output.

[0054] Step S3: Update synaptic weights through self-organization learning of normal samples.

[0055] Step S4: Use the trained network to process the test samples, and determine whether the input is an abnormal sample by monitoring the output response of the PC.

[0056] Step S5: Online adaptation and recovery control based on risk gating mechanism.

[0057] Further, the steps in step S1 include: S1.1: Extract training samples from the original MNIST dataset and perform category filtering using Boolean indexes to establish a normal sample training set.

[0058] In some embodiments of this application, the training set removes all abnormal samples with a label of 0, and retains only the numbers 1 to 9 as the normal distribution benchmark.

[0059] S1.2: Perform linear scaling on the original image to compress the numerical range to between 0 and 63.75, in order to adapt to the frequency input range of subsequent spiking neurons.

[0060] In practice, the original image pixel intensity I (ranging from 0 to 255) is linearly scaled. Some embodiments of this application use the mapping formula f = I / 4 to compress the original image pixel intensity to the range of 0-63.75 to adapt to the frequency input range of subsequent spiking neurons.

[0061] S1.3: Define the value obtained from S1.2 as Hertz (Hz), as the instantaneous firing frequency of the Poisson neuron group.

[0062] The discharge rate of the input layer is dynamically updated during the training loop, thereby completing the conversion from static amplitude to time-domain pulse frequency.

[0063] In practice, Poisson neurons are used to define the scaled values ​​as the instantaneous emission frequency f, and a pulse frequency stream with 784 input channels is generated through a 28×28 spatial flattening mapping.

[0064] The steps in step S2 include: S2.1: Construct a cerebellar model architecture that includes a feedforward inhibition (FFI) circuit, comprising a Poisson input layer, a granule cell layer (GC layer), a basket cell layer (BC layer), and a Purkinje cell layer (PC layer).

[0065] The input layer represents moss fibers and transmits signals to the GC layer; the GC layer acts as the input receiving layer, extracts sample features, and directly excites the PC layer; the BC layer acts as an inhibitory intermediate layer, with parameters set to have a fast membrane potential response speed, and sends an inhibitory signal to the PC layer; the PC layer acts as the output decision layer, receiving dual signals from the GC layer and the BC layer.

[0066] In some embodiments of this application, a structure comprising 784 input neurons is constructed to simulate moss fibers; 1000 GC neurons are configured and sparsely and randomly connected to the input layer to achieve high-dimensional projection of features; a certain number of BC neurons are configured to receive excitatory input from the GC neurons and send inhibitory signals to the PC layer, and the BC neurons are configured to have a small time constant to ensure a fast response. The PC layer serves as the output layer, receiving excitatory conductance (from GC neurons) and inhibitory conductance (from BC neurons).

[0067] S2.2: The GC and BC layers employ the LIF (Leaky Integrate-and-Fire) model to achieve rapid extraction and forwarding of input features; the PC layer uses the AdEx model, receiving excitatory conductance from the GC layer and inhibitory conductance from the BC layer. When the input is a normal signal, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input is an abnormal signal, the weak excitatory drive is suppressed by the subsequent strong feedforward inhibition signal, and the PC layer exhibits a silent state.

[0068] In practice, the GC layer and BC layer adopt a leakage current integration and release model. Their membrane potential V(t) kinetic equation is:

[0069] in, The membrane time constant is This is the resting potential. When V > Vth, a pulse is applied and the voltage is reset.

[0070] For the PC layer, some embodiments of this application employ a multi-channel conductivity-based adaptive exponential integration release (AdEx) model. Compared to the traditional LIF model, the AdEx model introduces an exponential nonlinear term to simulate the rapid generation process of action potentials and introduces an adaptive current variable to simulate the complex peak frequency adaptation characteristics of Purkinje cells. The coupling dynamic equation between the membrane potential V(t) of the PC layer and the adaptive variable w(t) is defined as follows: , , in: For film capacitors, For leakage conductance, This is the resting potential. Slope factor This is the threshold potential. The exponential term allows the membrane potential to simulate the rapid depolarization of biological neurons when it approaches the threshold. `w` is an adaptive current variable used to simulate subthreshold oscillations and frequency adaptation. is the adaptive time constant, and a is the subthreshold adaptive coupling parameter. The total received synaptic current is driven by excitatory and inhibitory conductances: , in, The excitatory conductance originating from the GC; This represents the inhibitory conductance from BC.

[0071] S2.3: Constructing a multi-kinetic synaptic model. The path from the GC layer to the PC layer is constructed using a long-term potentiation (LTP) model based on the pulse temporal dependent plasticity (STDP) rule. This model automatically enhances excitatory weights through causal pulse temporal potentiation to store normal sample features. The path from the BC layer to the PC layer employs a kinetic synapse with short-term inhibition (STD) characteristics. It utilizes the dynamic decay of the neurotransmitter consumption variable x under continuous abnormal input to achieve adaptive self-healing of the system. A heterosynaptic modulation model simulating climbing fibers (CF) is established as a "learning switch." This model uses external risk monitoring signals to adjust the STDP gain in real time, ensuring the learning process is safely blocked when a threat is perceived.

[0072] In practice, three different dynamic models were constructed for the regulation mechanisms from the GC layer to the PC layer, from the BC layer to the PC layer, and from the CF layer.

[0073] The synaptic connection between the GC layer and the PC layer is configured as an excitatory plasticity synapse. In this embodiment, the pulse timing-dependent plasticity (STDP) rule is used to dynamically adjust the synaptic weights to achieve memorization of normal sample features. The connection between the BC layer and the PC layer is configured as an inhibitory dynamic synapse. In this embodiment, a neurotransmitter resource variable x(t) is introduced to simulate the short-term inhibition (STD) effect, which is used to achieve adaptive self-healing of the system under continuous abnormal input. To ensure the safety of the system and avoid mislearning dangerous abnormal patterns as normal patterns, this embodiment constructs a heterosynaptic modulation model that simulates climbing fibers.

[0074] The steps in step S3 include: S3.1: Input the pulse sequence of normal samples into the network, and use the large-scale neurons of the GC layer to perform high-dimensional sparse encoding on the input information. Only a specific subpopulation of GC neurons that matches the feature space of the current sample is activated, realizing the orthogonal pattern separation of different normal samples in the GC layer, and providing a feature basis that does not interfere with each other for subsequent weight updates.

[0075] This step achieves sparse coding and orthogonalization. When a pulse stream of the digit "1" is input, the GC layer, due to its high-dimensional sparse connections, activates only a specific set of neurons. Due to the characteristics of the high-dimensional space, the subpopulations of neurons activated in the GC layer for samples with different features have low overlap, thus achieving orthogonalization.

[0076] S3.2: The activated GC neuron subset simultaneously triggers two parallel signal pathways, utilizing the time difference in physical transmission to construct an effective learning window at the PC layer. The GC layer transmits excitatory conductance to the PC layer through a direct pathway, driving rapid depolarization of the PC layer membrane potential. Simultaneously, the GC layer activates the BC layer, which, after synaptic delay, releases a strong inhibitory conductance to the PC layer, forcibly repolarizing the PC layer membrane potential. This mechanism forms an extremely short effective integration time window at the PC layer. Within this window, if the synaptic weights from the GC layer to the PC layer are strong enough or the input is dense enough, the PC layer will exceed the threshold and fire a pulse; otherwise, the PC layer will be truncated by the subsequent inhibitory signal and remain silent.

[0077] In practice, by establishing a time integration window, the input signal reaches the PC layer via two paths. The GC layer transmits excitatory conductance to the PC layer through a direct pathway, driving the PC layer membrane potential to depolarize rapidly. Simultaneously, the GC layer activates the BC layer, which, after synaptic delay, releases a strong inhibitory conductance to the PC layer, forcibly repolarizing the PC layer membrane potential. This mechanism creates an extremely short effective integration time window in the PC layer. Within this window, if the synaptic weights from the GC layer to the PC layer are strong enough or the input is dense enough, the PC layer will exceed the threshold and fire a pulse; otherwise, the PC layer will be truncated by the subsequent inhibitory signal and remain silent.

[0078] S3.3: Within the aforementioned time window, the excitability weights from the GC layer to the PC layer are automatically adjusted based on the causal timing of the pulses using the pulse timing dependence plasticity STDP rule. When the pulse arrival time of the GC layer is earlier than the pulse firing time of the PC layer, and both fall within the aforementioned time window, the system determines that the characteristics of the GC layer effectively contribute to the firing of the PC layer, increasing the synaptic weight of this path; simultaneously, non-causal timing is suppressed to filter out background noise.

[0079] In one embodiment, the STDP-based dynamic weight enhancement automatically adjusts the excitability weights from the GC layer to the PC layer within the aforementioned time window, based on the pulse causal timing using STDP rules. In the early stages of training, the PC layer fires occasionally, driven by the initial weights. If a GC layer pulse arrives before the PC layer's firing, the weights are enhanced. As training progresses, the excitability input to the GC layer increases, enabling the PC layer to stably fire high-frequency pulses.

[0080] The above process provides a multi-scale synaptic plasticity regulation mechanism, which effectively improves the sensitivity of anomaly detection.

[0081] The steps in step S4 include: S4.1: Input the pulse sequence of untrained abnormal samples into the network. The GC layer activates a new subpopulation of GC neurons that does not overlap with normal samples based on the orthogonal pattern separation mechanism.

[0082] In practice, when an abnormal sample (such as the number "0") is input, a new set of GC neurons is activated due to the pattern separation function of the GC layer.

[0083] S4.2: Since this GC neuron subset did not participate in the STDP training in S3, the synaptic connection weights between it and the PC layer remain at an initial low level. Despite the input being a new sample, the BC layer can still generate a standard strong inhibitory signal, and the membrane potential of the PC layer is suppressed, preventing the generation of action potentials.

[0084] In practice, the connection weights between a new set of GC neurons and the PC layer are initially low, unable to provide sufficient excitatory drive ge. Meanwhile, the BC layer, acting as a global feedforward inhibitor, still receives input and sends a strong inhibitory conductance gi to the PC layer. Since the inhibitory conductance is greater than the excitatory conductance, the PC layer membrane potential cannot reach the threshold, resulting in quiescence.

[0085] S4.3: The system performs statistical judgment on the output of the PC layer. Compared with the high frequency of the PC layer when normal sample input is present, the PC layer is silent or has significant low-frequency background noise when abnormal sample input is present. A threshold for the emission rate is set. If the output frequency of the PC layer is detected to be lower than the threshold, the system determines that the current input does not belong to any known memory category, that is, it outputs the abnormal detection result.

[0086] In practice, the system performs statistical judgment on the output of the PC layer and sets a release rate threshold. If the output frequency of the PC is detected to be lower than the threshold, the system determines that the current input does not belong to any known memory category, and outputs an anomaly detection result.

[0087] The steps in step S5 include: S5.1: When an abnormal signal is continuously input for more than a preset duration, the BC layer depletes presynaptic neurotransmitter resources due to continuous high-frequency firing, resulting in a short-term inhibition (STD) effect. As the inhibitory conductance of the BC layer on the PC layer gradually decays, the PC layer membrane potential breaks free from the inhibitory state and resumes sporadic pulse firing under weak excitation drive.

[0088] In practical implementation, a dynamic synaptic transmission model (a simplified form of the Tsodyks-Markram model) is introduced into the inhibitory synaptic connections from the BC layer to the PC layer. This model includes a dynamically changing variable R(t), representing the proportion of presynaptic neurotransmitter resources available. Its resource consumption and recovery dynamics equation is as follows: , in: For resource recovery time constant, a larger This means that the system needs a relatively long period of silence to recover resources, thus exhibiting an integral memory effect for long-term anomalies; U is the synaptic utilization rate, representing the proportion of resources consumed by each pulse release; This indicates the moment when the BC neuron fires a pulse.

[0089] When an abnormal signal is continuously input, the BC layer maintains high-frequency firing. Continuous pulses cause R(t) to decay exponentially. Therefore, although the BC layer continues to fire pulses, the effective suppression conductance transmitted to the PC layer gradually approaches zero. At this point, the PC layer membrane potential is no longer suppressed by hyperpolarization. Driven by the weak excitability of the GC layer, the PC layer membrane potential begins to depolarize and breaks through the threshold, resuming low-frequency pulse firing.

[0090] S5.2: While the PC layer resumes pulse delivery, the system introduces an external monitoring signal simulating the lower olive pit climbing fiber (CF) to perform a security review of the current recovery process. If determined to be high-risk, the CF channel is activated; if determined to be low-risk, the CF channel remains silent.

[0091] In practice, while the PC layer resumes distribution, the system triggers an external monitoring module, which simulates the climbing of fibers by the olive pit to conduct a security review of the current recovery process. If it is determined to be high-risk, the CF channel is activated; if it is determined to be low-risk, the CF channel remains silent.

[0092] S5.3: If the CF channel remains silent, the system allows the network to perform adaptive learning and transform the abnormal signal into a normal signal; if the CF channel is activated, the system forcibly blocks the adaptive learning process and cannot transform the abnormal signal into a normal signal.

[0093] In practice, if the CF channel remains silent, the system allows the network to perform adaptive learning and transform the signal into a normal signal; if the CF channel is activated, the system forcibly blocks the adaptation process and cannot transform the abnormal signal into a normal signal.

[0094] Compared with the prior art, the beneficial effects of the above embodiments are as follows: First, significantly enhanced numerical stability and robustness.

[0095] Existing biomimetic nonlinear evolution algorithms, when processing high-frequency pulse streams or long-term data, are prone to exponential divergence (i.e., numerical explosion) in synaptic weights and conductance values ​​due to the lack of effective feedback gain control. This application employs sublinear scaling of the weight evolution increment, combined with a numerical rounding operator, to ensure the system remains within the convergence region throughout the nonlinear iteration process. Experiments demonstrate that this improvement ensures continuous operation of the anomaly detection process under long-term, large-scale neuron simulations, significantly enhancing the algorithm's engineering reliability.

[0096] Second, higher feature capture sensitivity.

[0097] Compared to traditional detection methods based on pulse counting or frequency coding, this application can transform discrete pulses into continuously varying E / I conductance curves, for example, by using a double exponential decay kernel function. This modeling approach fully preserves the time integral characteristics of biological neurons, enabling it to keenly capture minute transient fluctuations and phase shifts in pulse temporal patterns, thus giving the system stronger discriminative power and sensitivity to abnormal signals such as "0" patterns.

[0098] Third, semi-supervised detection capability with low sample dependence.

[0099] This embodiment utilizes the STDP rule for self-organized feature extraction, eliminating the need for supervised training with large-scale labeled anomaly datasets. The system only needs to establish a baseline E / I balance envelope using normal samples to determine anomalies by monitoring the deviation of real-time conductance trajectories. This mechanism significantly reduces data annotation costs and enhances the system's ability to generalize detection of unknown types of anomaly signals.

[0100] Based on the same inventive concept, this application also provides an anomaly detection system based on a spiking neural network. Since this system corresponds to the anomaly detection method based on a spiking neural network in this application, and the principle by which this system solves the problem is similar to that of the method, the implementation of this system can refer to the implementation of the above method, and repeated details will not be elaborated further.

[0101] Figure 2 The diagram shows a structural schematic of an anomaly detection system based on a spiking neural network according to an embodiment of this application. This anomaly detection system based on a spiking neural network, such as... Figure 2 As shown, it includes: a training sample construction module 201, a detection model training module 202, a detection data preparation module 203, a response result generation module 204, and a recognition and performance control module 205.

[0102] The training sample construction module 201 is used to perform image preprocessing and frequency encoding operations on the image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information. The detection model training module 202 is used to train the spiking neural network model using training sample data to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after frequency encoding operation and output the pulse firing activity; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The detection data preparation module 203 is used to perform frequency encoding on the target scene image to obtain the image data to be tested; The response result generation module 204 is used to input the image data to be tested into the anomaly detection model to obtain the impulse response result; The identification and performance regulation module 205 is used to determine the anomaly detection result of the image data under test based on the impulse response result and the adaptive control operation based on the risk gating mechanism; the anomaly detection result characterizes whether the image data under test is an abnormal image; the adaptive control operation includes online adaptive operation and recovery control operation.

[0103] In one possible implementation, the training sample construction module 201 is specifically used for: Image samples of the target scene are selected from the original dataset, and a category filtering operation is performed using the index information to obtain a normal sample dataset; Linear scaling is performed on the original normal images of the normal sample dataset to adjust the numerical range to a preset range, thus obtaining compressed image numerical information; the preset numerical range is a range that matches the frequency input range of the spiking neural network. Frequency numerical information is obtained by compressing numerical information from the image; the frequency numerical information is used as the instantaneous transmission frequency of the spiking neural network model.

[0104] In one possible implementation, the spiking neural network model is a cerebellar model architecture containing a feedforward inhibition (FFI) loop. The spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer. The Poisson input layer is used to transmit the received signal to the GC layer. The GC layer is used to extract sample features and provide excitation signals to the PC layer. The BC layer is used to receive the signal input from the GC layer and send inhibition signals to the PC layer. The PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

[0105] In one possible implementation, the GC and BC layers employ a leakage integral firing (LIF) model; the PC layer employs an AdEx model; the excitation signal is excitatory conductance; the inhibition signal is inhibitory conductance; when the input data category of the spiking neural network model is normal, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input category of the spiking neural network model is abnormal, the excitatory conductance is suppressed by the subsequently arriving inhibitory conductance signal, and the PC layer exhibits a silent state; the path from the GC layer to the PC layer is a long-term enhancement (LTP) model based on the pulse temporal dependent plasticity (STDP) rule; the path from the BC layer to the PC layer employs a dynamic synapse with short-term inhibition (STD) characteristics.

[0106] In one possible implementation, this anomaly detection system based on a spiking neural network, such as Figure 3 As shown, it also includes a synaptic weight update module 301; the synaptic weight update module 301 is used in the spiking neural network model to update synaptic weights through self-organizing learning of normal samples via the following process: The pulse sequence of normal samples is input into the spiking neural network model, and the pulse sequence of normal samples is encoded in high dimension sparsely through the GC layer. Among them, the basic GC neuron subpopulation that matches the feature space of the current normal sample is activated in the GC layer to perform orthogonal pattern separation of different normal samples in the GC layer. The activated subpopulation of basic GC neurons triggers two parallel signal paths, and the time difference in the physical transmission of the two parallel signal paths forms the learning window of the PC layer. Within the learning window, the STDP rule is used to adjust the excitability weights from the GC layer to the PC layer based on the impulse causal timing.

[0107] In specific implementation, the synaptic weight update module 301 can be a sub-module of the detection model training module 202.

[0108] In one possible implementation, the response generation module 204 is specifically used for: If the image data to be tested is an abnormal signal that is different from the feature space of normal samples, the GC layer activates the test GC neuron subpopulation based on the orthogonal pattern separation mechanism; the test GC neuron subpopulation does not overlap with the basic neuron subpopulation. The BC layer generates a test suppression signal, which suppresses the test excitation signal of the PC layer corresponding to the image data to be tested, so that the PC layer exhibits a quiescent state because it does not generate action potentials. If the output of the PC layer corresponding to the image data under test is found to be in a silent state, then the impulse response result of the image data under test is an abnormal image; an abnormal image indicates that the input image does not belong to the type that the anomaly detection model has been trained on.

[0109] In one possible implementation, the identification and performance tuning module 205 is specifically used for: Monitor the impulse response results to determine the anomaly detection results of the image data under test; Based on the anomaly detection results over a preset time period and the adaptive control operation based on the risk gating mechanism, the anomaly detection model is subjected to online adaptive and recovery control operations.

[0110] In one possible implementation, the identification and performance tuning module 205 is specifically used for: If the abnormal signal is continuously input for more than the preset duration based on the abnormality detection result, the BC layer will perform a recovery control operation; the recovery control operation includes suppressing the STD effect based on short time duration to enable the PC layer to resume sporadic pulse delivery; If sporadic pulse delivery resumes at the PC layer, an online adaptation operation is performed; the online adaptation operation includes the following process: Acquire external supervision signals for the image data under test; Based on external monitoring signals, conduct a security review of the recovery process and obtain the review results. If the review result indicates low risk, then new training sample data for normal samples will be constructed based on the image data to be tested. This allows the anomaly detection model to adaptively learn based on newly added training sample data in order to update the anomaly detection model.

[0111] This application also provides a computer-readable storage medium storing computer-executable instructions for implementing the anomaly detection method based on a spiking neural network according to any embodiment of this application.

[0112] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the anomaly detection method based on a spiking neural network as described in the above embodiments. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0113] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An anomaly detection method based on a spiking neural network, characterized in that, The method includes: Image preprocessing and frequency encoding operations are performed on image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information; The training sample data is used to train the spiking neural network model to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after the frequency encoding operation and output the pulse firing activity; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The frequency encoding operation is performed on the image to be tested of the target scene to obtain the image data to be tested; The image data to be tested is input into the anomaly detection model to obtain the impulse response result; Based on the impulse response result and the adaptive control operation based on the risk gating mechanism, the anomaly detection result of the image data to be tested is determined; the anomaly detection result characterizes whether the image data to be tested is an abnormal image; the adaptive control operation includes online adaptive operation and recovery control operation.

2. The method according to claim 1, characterized in that, The image preprocessing and frequency encoding operations performed on the image samples of the target scene to obtain training sample data include: Image samples of the target scene are selected from the original dataset, and a category filtering operation is performed using the index information to obtain a normal sample dataset; The normal original images of the normal sample dataset are linearly scaled to adjust the numerical range to a preset numerical range, thereby obtaining compressed image numerical information; the preset numerical range is a range that adapts to the frequency input range of the spiking neural network. Based on the image compression numerical information, frequency numerical information is obtained; the frequency numerical information is used as the instantaneous transmission frequency of the pulse neural network model.

3. The method according to claim 1, characterized in that, The spiking neural network model is a cerebellar model architecture that includes a feedforward inhibition (FFI) circuit; the spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer; the Poisson input layer is used to transmit the received signal to the GC layer; The GC layer is used to extract sample features and provide excitation signals to the PC layer; The BC layer is used to receive the signal input from the GC layer and send a suppression signal to the PC layer; the PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

4. The method according to claim 3, characterized in that, The GC layer and the BC layer employ a leakage integral firing (LIF) model; the PC layer employs an AdEx model; the excitation signal is excitatory conductance; the inhibition signal is inhibitory conductance; when the input data category of the spiking neural network model is normal, the excitatory conductance rapidly exceeds the threshold before the inhibitory conductance arrives, and the PC layer exhibits a high-frequency pulse firing state; when the input category of the spiking neural network model is abnormal, the excitatory conductance is suppressed by the subsequently arriving inhibitory conductance signal, and the PC layer exhibits a silent state; the path from the GC layer to the PC layer is a long-term enhancement (LTP) model based on the pulse timing-dependent plasticity (STDP) rule; the path from the BC layer to the PC layer employs a dynamic synapse with short-term inhibition (STD) characteristics.

5. The method according to claim 3, characterized in that, The spiking neural network model updates the synaptic weights through self-organizing learning from normal samples via the following process: The pulse sequence of the normal sample is input into the spiking neural network model, and the pulse sequence of the normal sample is encoded in high dimension sparsely through the GC layer; wherein, the basic GC neuron subgroup in the neurons of the GC layer that matches the feature space of the current normal sample is activated to perform orthogonal pattern separation of different normal samples in the GC layer. The activated subpopulation of basic GC neurons triggers two parallel signal paths, and the time difference between the physical transmission of the two parallel signal paths forms the learning window of the PC layer. Within the learning window, the excitability weights from the GC layer to the PC layer are adjusted according to the impulse causality time sequence using the STDP rule.

6. The method according to claim 5, characterized in that, The step of inputting the image data to be tested into the anomaly detection model to obtain the impulse response result includes: If the image data to be tested is an abnormal signal that is different from the feature space of the normal sample, then the GC layer activates the test GC neuron subpopulation based on the orthogonal pattern separation mechanism; the test GC neuron subpopulation does not overlap with the basic neuron subpopulation. The BC layer generates a test suppression signal, which suppresses the test excitation signal of the PC layer corresponding to the image data to be tested, so that the PC layer exhibits a silent state because it does not generate action potentials. If the output of the PC layer corresponding to the image data under test is detected to be in the silent state, then the impulse response result of the image data under test is an abnormal image; the abnormal image indicates that the input image does not belong to the type that the anomaly detection model has been trained on.

7. The method according to claim 1, characterized in that, The step of determining the anomaly detection result of the image data to be tested based on the impulse response result and the adaptive control operation based on the risk gating mechanism includes: Monitor the impulse response results to determine the anomaly detection results of the image data under test; Based on the anomaly detection results over a preset time period and the adaptive control operation based on the risk gating mechanism, the anomaly detection model is subjected to online adaptive operation and recovery control operation.

8. The method according to claim 7, characterized in that, The step of performing online adaptive and recovery control operations on the anomaly detection model based on the anomaly detection results for a preset duration and the adaptive control operation based on a risk gating mechanism includes: If the abnormal signal is continuously input for more than the preset duration based on the abnormal detection result, the BC layer performs a recovery control operation; the recovery control operation includes, based on short-term suppression of STD effect, enabling the PC layer to resume sporadic pulse delivery; If the PC layer resumes sporadic pulse delivery, an online adaptation operation is performed; the online adaptation operation includes the following process: Obtain the external supervision signal of the image data to be tested; Based on the external monitoring signals, a security review of the recovery process is conducted to obtain the review results. If the review result information is low risk, then new training sample data for normal samples is constructed based on the image data to be tested; The anomaly detection model is then adaptively learned based on the newly added training sample data to update the anomaly detection model.

9. An anomaly detection system based on a spiking neural network, characterized in that, The system includes: The training sample construction module is used to perform image preprocessing and frequency encoding operations on image samples of the target scene to obtain training sample data; the training sample data includes normal sample image data results with frequency value information; The detection model training module is used to train the spiking neural network model using the training sample data to obtain a trained anomaly detection model; the spiking neural network model is used to acquire the image data results after the frequency encoding operation and output the pulse firing activity; the anomaly detection model is obtained by updating synaptic weights through self-organizing learning of normal samples. The detection data preparation module is used to perform the frequency encoding operation on the image to be tested of the target scene to obtain the image data to be tested; The response result generation module is used to input the image data to be tested into the anomaly detection model to obtain the impulse response result; The identification and performance control module is used to determine the anomaly detection result of the image data under test based on the impulse response result and the adaptive control operation based on the risk gating mechanism; the anomaly detection result characterizes whether the image data under test is an abnormal image; the adaptive control operation includes online adaptation operation and recovery control operation.

10. The system according to claim 9, characterized in that, The spiking neural network model is a cerebellar model architecture that includes a feedforward inhibition (FFI) circuit; the spiking neural network model includes a Poisson input layer, a granule cell (GC) layer, a basket cell (BC) layer, and a Purkinje cell (PC) layer; the Poisson input layer is used to transmit the received signal to the GC layer; The GC layer is used to extract sample features and provide excitation signals to the PC layer; The BC layer is used to receive the signal input from the GC layer and send a suppression signal to the PC layer; the PC layer is used to receive dual signals from the GC layer and the BC layer to output a decision.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.

12. A computer program product, characterized in that, It includes computer instructions stored in a computer-readable storage medium; when a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, causing the computer device to perform the steps of the method according to any one of claims 1 to 8.