Brain-inspired cross-domain small sample learning hyperspectral image classification method and system
By employing a brain-inspired cross-domain few-shot learning method, combined with spiking neural networks and lightweight feature extraction, the problems of limited labeled samples and inter-domain distribution differences in cross-domain hyperspectral image classification are solved, achieving efficient and robust classification on resource-constrained platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU UNIVERSITY
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for cross-domain hyperspectral image classification suffer from problems such as extremely limited labeled samples, significant differences in distribution between domains, and insufficient model generalization ability. In particular, they are difficult to deploy on resource-constrained remote sensing platforms, and existing methods rely heavily on artificial neural networks, resulting in high computational complexity and sensitivity to noise.
We employ a brain-inspired cross-domain few-shot learning method, which improves discrimination and generalization capabilities under cross-domain few-shot conditions by introducing event-driven sparse representation and a lightweight spiking-convolutional hybrid feature extraction network from a spiking neural network, combined with a brain-inspired imitation-focusing optimization strategy.
It improves the discrimination and generalization capabilities under cross-domain small sample conditions with extremely low computational complexity, enhances noise robustness, achieves lightweight deployment, and significantly improves the performance of cross-domain small sample hyperspectral image classification.
Smart Images

Figure CN122115937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to image processing technology, specifically to a brain-inspired cross-domain few-shot learning hyperspectral image classification method and system. Background Technology
[0002] Hyperspectral imaging has significant applications in ecological monitoring, precision agriculture, and emergency response, capable of simultaneously capturing detailed spatial structure and high-dimensional spectral information, providing a unique advantage for precise identification of ground features. However, the acquisition and annotation of hyperspectral data are extremely costly, often resulting in very few labeled samples in real-world scenarios. Furthermore, different imaging devices, observation conditions, and scene environments lead to significant cross-domain distribution differences, causing a substantial performance degradation of traditional supervised learning methods in cross-scene applications. Therefore, how to fully utilize source domain knowledge under limited sample conditions while ensuring the model's generalization ability in the target domain remains a core challenge in cross-domain hyperspectral image classification.
[0003] In recent years, few-shot learning has demonstrated excellent cross-task transferability in image classification, providing an important approach to addressing the scarcity of hyperspectral data annotations by learning transferable metric spaces or learning strategies from limited samples. In existing work, metric learning-based few-shot methods are widely used for cross-domain hyperspectral classification due to their simple structure and ease of cross-class generalization; some studies combine deep convolutional networks, attention mechanisms, and graph structure modeling to enhance the representation of spatial-spectral relationships between cross-domain samples. However, most of these methods are built on the framework of artificial neural networks (ANNs), whose internal representations rely on fitting statistical patterns within the domain. When faced with spectral drift caused by different sensors or scenes, the feature space is prone to distortion. Furthermore, artificial neural networks are primarily computationally intensive with continuous values, resulting in high energy consumption and sensitivity to noise, making deployment on resource-constrained remote sensing platforms difficult. These shortcomings are particularly pronounced under cross-domain few-shot conditions, making it difficult for the model to learn stable and robust discriminative features in the target domain.
[0004] In contrast, spiking neural networks (SNNs), as brain-like computational models, naturally possess advantages in terms of noise interference, energy efficiency, and cross-distribution representation stability due to their discrete impulse event-driven, sparse temporal response, and representation mode that more closely resembles biological neural mechanisms. Some studies have attempted to apply spiking neural networks to single-domain hyperspectral classification and achieved good results, demonstrating that impulse dynamics can effectively model the local structure of hyperspectral data. However, existing work mainly focuses on single-domain scenarios and lacks systematic design for cross-domain hyperspectral classification with few samples. When directly applying single-domain spiking networks to cross-domain tasks, the impulse response is prone to overfitting the source domain pattern due to the failure to consider the significant differences in spectral statistical properties between the source and target domains, resulting in insufficient cross-domain generalization ability. At the same time, the sparse representation of impulse features and the dense features of convolutional networks have inherent expression differences, which often lead to feature space misalignment when the two are directly fused, affecting model performance.
[0005] Existing methods mostly rely on artificial neural networks, whose feature representation often depends heavily on the statistical structure within the domain. This makes them prone to performance degradation when moving across domains. In addition, the continuous value calculation method makes them sensitive to noise and computationally complex, which is not conducive to deployment on resource-constrained remote sensing equipment. Summary of the Invention
[0006] To address the problems of extremely limited labeled samples, significant differences in inter-domain distribution, and insufficient generalization ability of existing cross-domain hyperspectral images, this invention proposes a brain-inspired cross-domain few-sample learning hyperspectral image classification method (BI-FSL) and system. By introducing a brain-inspired learning mechanism and using event-driven sparse representation of spiking neural networks and more biologically interpretable feature modeling, the method improves the discrimination and generalization ability under cross-domain few-sample conditions with extremely low model computational complexity.
[0007] On one hand, embodiments of the present invention provide a brain-inspired cross-domain few-shot learning hyperspectral image classification method, comprising the following steps:
[0008] S1. Construct a spectrum-space-time gated pulse coding module to perform multi-path attention modeling on the original hyperspectral pixel blocks and encode pulse coding sequences with biological brain-like rationality.
[0009] S2. Construct a lightweight pulse-convolution hybrid feature extraction network, deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel; the pulse coding sequence and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are jointly input into the hybrid feature extraction network, and the joint spatial spectral feature vector is output.
[0010] S3. Introduce a brain-inspired imitation-focused optimization strategy to train the hybrid feature extraction network. First, use the cross-paradigm feature alignment mechanism based on center kernel alignment to realize the imitation learning of convolutional feature structure by pulse features. Then, through hard-bearing sample comparison optimization, emphasize the inter-class differences under cross-domain conditions, so that the hybrid feature extraction network can focus on learning clear inter-class boundaries under very few sample supervision.
[0011] S4. Jointly train the gated pulse coding module, the hybrid feature extraction network, and the image classifier. Set the overall objective function as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. Update the parameters of the gated pulse coding module, the hybrid feature extraction network, and the image classifier end-to-end until they converge simultaneously on the query sets of the source and target domains.
[0012] S5. Input the hyperspectral pixel block to be tested into the gated pulse coding module to obtain the pulse coding sequence. After the joint spatial spectral feature vector is extracted by the hybrid feature extraction network, it is input into the image classifier and cross-domain small sample classification is completed by the nearest class prototype metric.
[0013] Preferably, the gated pulse coding module in step S1 includes a pulsed two-dimensional convolutional block, a temporal attention module, a spectral-spatial attention module, and a LIF neuron;
[0014] The input hyperspectral pixel block is processed by pulsed 2D convolutional blocks for initial feature extraction to obtain initial spectral-spatial-temporal feature data as initial input data. ,in For time step, The spectral dimension of the data, and It refers to the spatial dimension of the data;
[0015] The temporal attention module is used to mine the correlation of the initial input data across time steps. First, it aggregates the initial input data through three-dimensional adaptive average pooling and max pooling, respectively. All spatial and channel information is used to obtain global statistics in two time dimensions. Then, a shared set of time weight generators is used to perform nonlinear modeling on the global statistics in both time dimensions, mapping the time dependency structure between dimensionality reduction and dimensionality increase. Finally, the nonlinear modeling responses of the average pooling path and the max pooling path are added together, fusing different types of statistical information to obtain time attention weights. ;
[0016] The spectral-spatial attention module is used to capture the joint correlation between spectral and spatial dimensions, including height-channel attention branches, channel-width attention branches, and height-width attention branches; for the initial input data Perform a time-dimension flattening operation to eliminate the time dimension and obtain the input data. The height-channel attention weights are obtained through height-channel attention branches, channel-width attention branches, and height-width attention branches, respectively. Channel-width attention weight value and height-width attention weight values The attention weights of the three branches are averaged and then fused together and reintroduced into the time dimension to obtain the spectral-spatial attention weights. ;
[0017] LIF neurons respond to initial input data Processing is performed to obtain a pulse sequence. ;
[0018] Based on temporal attention weights, spectral-spatial attention weights, and pulse sequences Gated pulse coding is performed to obtain a pulse code sequence with biological rationality.
[0019] Preferably, in step S2, the pulse convolution branch undertakes dynamic sparse temporal modeling under the spiking neural network paradigm, and the one-dimensional spectral convolution branch undertakes the fine-grained spectral structure extraction task under the convolutional neural network paradigm.
[0020] The pulsed convolution branch includes a residual chain consisting of 3D pulsed convolution blocks, LIF neurons, and 3D pulsed pooling layers. It extracts time-sensitive and robust SNN paradigm features through multi-layer pulsed convolution blocks, LIF neurons, and pulsed pooling structures, and outputs sparse spiking neural network features that preserve temporal dynamics. The one-dimensional spectral convolution branch obtains the dominant spectral tensor through tensor decomposition, and then captures the relationship between local and long-range spectra across bands through multi-level residual structures, resulting in stable and discriminative ANN paradigm features, and outputting dense artificial neural network features.
[0021] The features of sparse spiking neural networks and dense artificial neural networks are fused after dimensional alignment to form a joint spatial spectral feature vector containing sparse dynamic patterns and statistical structures.
[0022] Further, in step S2, the pulse convolution branch includes a mapping layer and a core feature extraction part; the pulse coded sequence enters the mapping layer of the pulse convolution branch for channel dimensionality reduction, and after extracting local spatial-temporal features and aggregating local spatiotemporal structure information in the core feature extraction part, the average temporal pulse feature after averaging in the time dimension is output. ;
[0023] The one-dimensional spectral convolution branch includes a mapping layer and a feature extraction part. After the one-dimensional spectral tensor is normalized to the input scale by entering the mapping layer, the feature extraction part first captures and multiplies the short-range correlations between local spectral bands, and then learns the long-range dependencies across bands to capture higher-order spectral structures and extract spectral features. ;
[0024] spectral features With average time-series pulse characteristics Integration, forming cross-paradigm enhancement features As a joint spatial spectral eigenvector.
[0025] Preferably, the training process in step S3 includes:
[0026] Firstly, at the sample level, by using feature imitation based on centered kernel alignment, the sparse spiking neural network features are driven to imitate the geometric structure of dense artificial neural network features, so that the expression structure of SNN paradigm features and ANN paradigm features maintains high consistency in shared semantics, thus alleviating the feature shift caused by the different encoding mechanisms of the two paradigms.
[0027] Furthermore, based on the prototype comparison optimization mechanism of difficult negative samples, a heavy weighted comparison loss of difficult negative samples is constructed at the prototype level. This emphasizes the differences between different types of prototypes, amplifies the interval between different types of prototypes in the metric space, and allows the model to form clear inter-class decision boundaries even with very few labels.
[0028] Furthermore, in step S3, the three types of sample support sets, query sets, and target domains are concatenated in a fixed order on the sample dimension to maintain an arrangement consistent with the domain discriminator. The overall few-shot learning strategy includes two stages: the first stage is few-shot learning for the source domain, and the second stage is few-shot learning for the target domain's few-shot dataset.
[0029] Two learnable projectors are used to map the two output features of the pulse convolution branch and the one-dimensional spectral convolution branch to the same low-dimensional subspace, respectively, to obtain two projection matrices.
[0030] A Gram matrix is constructed using a linear kernel function, and then centered to obtain a centered Gram matrix. Using the Hilbert-Schmidt independence criterion, the dependence of the output feature distributions of the pulse convolution branch and the one-dimensional spectral convolution branch is obtained through the inner product of the two centered Gram matrices.
[0031] Constructing normalized center kernel alignment coefficients As a basis for imitation loss; by minimizing the center kernel alignment coefficient The hybrid feature extraction network model is forced to adjust the parameters of the pulse convolution branch and the one-dimensional convolution branch in order to achieve mimicry.
[0032] On the other hand, embodiments of the present invention also provide a brain-inspired cross-domain few-shot learning hyperspectral image classification system, implemented based on the above-mentioned hyperspectral image classification method, wherein the hyperspectral image classification system includes the following modules:
[0033] The spectral-space-time gated pulse coding module performs multi-path attention modeling on the original hyperspectral pixel blocks and encodes pulse coding sequences with biological brain-like plausibility.
[0034] A lightweight pulse-convolution hybrid feature extraction network is constructed by deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel. The pulse coding sequence and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are jointly input into the hybrid feature extraction network, and the output is a joint spatial-spectral feature vector.
[0035] The hybrid feature extraction network training module introduces a brain-inspired imitation-focus optimization strategy to train the hybrid feature extraction network. First, it uses a cross-paradigm feature alignment mechanism based on center kernel alignment to realize the imitation learning of convolutional feature structure by pulse features. Then, it emphasizes the inter-class differences under cross-domain conditions through hard-bearing sample contrast optimization, so that the hybrid feature extraction network can focus on learning clear inter-class boundaries under very few sample supervision.
[0036] The joint training module is used to jointly train the gated pulse coding module, the hybrid feature extraction network, and the image classifier. The overall objective function is set as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. The parameters of the gated pulse coding module, the hybrid feature extraction network, and the image classifier are updated end-to-end until they converge simultaneously on the query sets of the source and target domains.
[0037] The classification module inputs the hyperspectral pixel block to be tested into the gated pulse coding module to obtain the pulse coding sequence. After the joint spatial-spectral feature vector is extracted by the hybrid feature extraction network, it is input into the image classifier, and cross-domain small sample classification is completed by the nearest class prototype metric.
[0038] In summary, this invention proposes a brain-inspired method and system for cross-domain, small-sample hyperspectral image classification, starting from the key mechanisms of brain-like computing. This invention reconstructs the input representation through a spectral-space-time gating coding mechanism, enabling hyperspectral pixels to obtain more biologically interpretable feature representations of hyperspectral data before entering the spiking network. Simultaneously, a lightweight spiking-convolutional hybrid feature extraction structure is introduced, fully combining the sparse temporal dynamics of spiking neural networks (SNNs) with the convolutional local statistical capabilities of artificial neural networks (ANNs), enhancing the model's ability to represent cross-domain spectral shifts and intra-class differences. Furthermore, a "mimicry-focusing" optimization strategy is proposed, based on sample-level feature alignment and prototype comparative learning of hard-to-bear samples, enabling the model to establish clear inter-class boundaries and achieve stable cross-domain transfer performance even with very few samples.
[0039] Compared with the prior art, the technical effects achieved by the present invention include:
[0040] 1. Existing artificial neural networks struggle to simultaneously achieve cross-domain generalization ability, energy efficiency, and biological interpretability. This invention, however, leverages brain-inspired pulse coding, hybrid paradigm feature modeling, and a "mimic-focus" learning mechanism to effectively compensate for the shortcomings of traditional methods in cross-domain small-sample hyperspectral classification, providing a new technical path for low-sample learning and lightweight deployment in complex remote sensing scenarios.
[0041] 2. This invention adopts a brain-inspired imitation-focused optimization strategy, which significantly enhances feature alignment and prototype separability in cross-domain small sample scenarios. It realizes the first systematic application of spiking neural networks in cross-domain small sample hyperspectral classification, and has stronger noise robustness and lower computational consumption.
[0042] 3. The spectral-space-time gating code proposed in this invention can effectively improve the discriminativeness and cross-domain consistency of pulse representation; it adopts a lightweight pulse-convolution hybrid structure, which combines stable spectral-space modeling capability with event-driven advantages. Attached Figure Description
[0043] Figure 1 This is a flowchart of a brain-inspired method for cross-domain small-sample hyperspectral image classification in an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the framework of the gated pulse coding module and the hybrid feature extraction network constructed in this embodiment of the invention;
[0045] Figure 3 This is a schematic diagram of the framework of the gated pulse coding module in an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the lightweight pulse-convolution hybrid feature extraction network in an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the feature dimension correlation matrix between SNN paradigm features and ANN paradigm features;
[0048] Figure 6 This is a schematic diagram of the sample-level similarity matrix between SNN paradigm features and ANN paradigm features;
[0049] Figure 7 This is a schematic diagram of the brain-inspired "imitation-focusing" optimization strategy in an embodiment of the present invention. Detailed Implementation
[0050] This invention addresses the challenge of fine-grained classification of hyperspectral images under conditions of cross-scene and minimal sample size, proposing a brain-inspired cross-domain few-sample learning framework. This framework centers on event-driven sparse coding within a spiking neural network. A "spectral-space-time" gated pulse coding module transforms hyperspectral pixel blocks into sparse pulse sequences with bio-inspired attention selectivity. A lightweight pulse-convolution hybrid network then simultaneously extracts continuous statistical complementary features between the sparse pulses and traditional convolutions. Finally, a "mimicry-focusing" optimization strategy aligns the discrete pulses with the traditional convolution feature manifold at the sample level and strengthens the hard-to-bearing sample boundary at the prototype level, achieving low-cost, highly stable transfer of knowledge from the source domain to the target domain. The entire system comprises fewer than two million floating-point operations and approximately 170,000 parameters, achieving state-of-the-art accuracy on three public datasets, significantly reducing the computational and energy burden on spaceborne / airborne platforms.
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Example
[0053] This embodiment proposes a brain-inspired cross-domain few-shot learning hyperspectral image classification method. Through brain-like pulse coding, pulse-convolution hybrid feature extraction, and a mimicry-focused optimization strategy, it achieves efficient, robust, and lightweight recognition of hyperspectral data in cross-domain scenarios. The overall process includes four main stages: pulse coding, dual-path feature extraction, feature fusion, and cross-domain optimization. (See [link to relevant documentation]). Figure 1 , Figure 2 Specifically, it includes the following steps:
[0054] S1. Construct a spectral-space-time gated pulse coding module (SSTGSE) to perform multi-path attention modeling on the original hyperspectral pixel blocks and encode pulse coding sequences with biological brain-like rationale.
[0055] Because existing spiking neural networks treat all input information equally, they struggle to distinguish between background noise and key features, and premature binarization results in the significant loss of rich, fine-grained spectral-spatial information in hyperspectral data. To overcome these shortcomings and endow spiking neural networks with more biologically interpretable feature extraction capabilities, this step designs a spectral-space-time gated pulse coding (SSTGSE) module, taking into account the characteristics of hyperspectral pixel blocks that simultaneously possess high-dimensional spectral structure and local spatial correlation.
[0056] The SSTGSE module expands the original hyperspectral pixel block into T parts along the time dimension, and then sequentially passes it through joint gating of temporal attention and spectral-spatial attention to generate a floating-point pulse-coded sequence with biologically inspired attention selectivity, that is, to generate a floating-point pulse-coded sequence with biological interpretability.
[0057] See Figure 3 The SSTGSE module does not simply generate binary sequences. Architecturally, it includes a pulsed two-dimensional convolutional block, a temporal attention (TA) module, and a spectral-spatial attention (SSA) module. Through a multi-path gating mechanism, it simulates the brain's attention allocation and can dynamically suppress redundant temporal steps and spatial regions (outputting 0), while performing different degrees of floating-point weighted enhancement on highly saliency regions.
[0058] The SSTGSE module first performs initial feature extraction on the input hyperspectral pixel block using a simple pulsed 2D convolutional block, obtaining initial spectral-spatial-temporal feature data, defined as... , and used as initial input data, where For the time step, the original data is copied. This is obtained by mimicking the time step. The number of channels represents the spectral dimension of the data. and It refers to the spatial dimension of the data.
[0059] The goal of the Temporal Attention (TA) module is to uncover the correlations of the initial input data across time steps. The TA module first aggregates the initial input data using three-dimensional adaptive average pooling and max pooling, respectively. All spatial and channel information is used to obtain global statistics in two time dimensions, as shown in the following expressions:
[0060] ;
[0061] in, .
[0062] Subsequently, the temporal attention module uses a shared set of temporal weight generators to nonlinearly model the global statistics of the two time dimensions mentioned above. It consists of two pointwise convolutions used to map the temporal dependency structure between dimensionality reduction and dimensionality increase, i.e.:
[0063] ;
[0064] in, , It is the ReLU activation function. and This corresponds to the pointwise convolution operation.
[0065] Finally, the temporal attention module fuses different types of statistical information to obtain the final temporal attention weights by adding the nonlinear modeled responses of the average pooling path and the max pooling path, i.e.:
[0066] ;
[0067] This temporal attention weight can adaptively emphasize important time segments and provide a dynamic modulation basis for subsequent spectral-space-temporal joint attention.
[0068] For the spectral-spatial attention (SSA) module, its core objective is to capture the joint correlation between the spectral and spatial dimensions. Specifically, the SSA module includes three parallel branches: a height-channel attention branch, a channel-width attention branch, and a height-width attention branch, which respectively focus on the height-channel (…) ), Channel-Width ( ) and height-width ( The features are weighted from three complementary perspectives. The initial spectral-spatial-temporal feature data remains the same as before, but with a slight difference: a temporal dimension flattening operation is added. This simply merges the temporal dimension with the batch dimension, temporarily eliminating the temporal dimension. Thus, the initial spectral-spatial-temporal feature data becomes the input data. Next, on the height-channel attention branch, the input data... along Axis rotation, that is, rotating the input data Rearranged as follows:
[0069] ;
[0070] Then, the Channel Aggregator (CA) module performs global aggregation along the channel dimension. The Channel Aggregator calculates the maximum and mean values for each position of the input features and concatenates them along the channel dimension. The specific expression is as follows:
[0071] ;
[0072] in, For input data For each spatial location, calculate the maximum and average channel values. It should be noted that the channel direction axis is not an absolute C-axis; for example, for the height-channel attention branch, "C" in the above channel aggregator expression corresponds to "W". In other words:
[0073] ;
[0074] in, This represents a 2D standard convolutional kernel with a kernel size of 3×3. Indicates the batch normalization layer. This represents the sigmoid activation function. .
[0075] Immediately afterwards, and Element-wise multiplication, then using the rotation function Rearrange the results of the multiplication, i.e.:
[0076] ;
[0077] rearranged This represents the final height-channel attention weight value.
[0078] Similarly, the same method is applied to the channel-width attention branch and the height-width attention branch to obtain the corresponding channel-width attention weight values. and height-width attention weight values Finally, the attention weights of the three branches are averaged and merged, that is:
[0079] ;
[0080] Furthermore, the merged weight output is re-added to the time dimension using the Python built-in function `reshape` according to the original index. , which is the spectral-spatial attention weight of the final output.
[0081] The SSTGSE module constructed in this step also includes LIF neurons for processing the initial spectral-spatial-temporal feature data. Processing is performed to obtain a pulse sequence. After the operations of the Temporal Attention (TA) module and the Spectral-Spatial Attention (SSA) module described above, the temporal attention weights are obtained. And spectral-spatial attention weights The SSTGSE module finally calculates the attention weights based on temporal attention weights, spectral-spatial attention weights, and the pulse sequence. Gated pulse encoding is performed, that is:
[0082] ;
[0083] in, This represents the sigmoid activation function. This represents element-wise multiplication at corresponding positions, ultimately yielding a biologically plausible pulse-coded sequence. In this embodiment, the pulse-coded sequence The value can be 0, or a floating-point number between 0 and 1. 0 indicates no attention to the corresponding region, while a larger floating-point number (non-zero) indicates a higher level of attention to the corresponding region, thus effectively mimicking the brain's attentional allocation characteristics. Experiments have shown that the SSTGSE module makes a significant contribution to downstream cross-domain classification tasks.
[0084] Compared with the traditional direct encoding method, the encoding process in this step can adaptively suppress redundant regions before pulse generation, enhance significant spectral-spatial-temporal information, retain fine-grained spectral-spatial-temporal information, and suppress redundant features, making the input data more suitable for subsequent pulse convolution modeling, and providing low-noise, sparse and cross-domain consistent input representation for subsequent spiking neural networks.
[0085] Spiking neural networks use pulse signals as information carriers, highly mimicking the transmission mechanism and dynamic processes of neurons, and integrating time-encoded information through synaptic dynamics. Among numerous neuron models, the Leaky Integrate and Fire Neuron Model (LIF) is the most widely used, possessing both high biosimulation and low computational cost. This model accumulates membrane potential driven by the input pulse sequence over time, triggering pulse firing when it exceeds a threshold potential. This mechanism typically consists of three stages: membrane potential charging, pulse firing, and reset. The mathematical description of the LIF neuron is as follows:
[0086] ;
[0087] ;
[0088] ;
[0089] in It is the input for the current time step t. This represents the membrane potential of the neuron before it fires a pulse at time step t. This represents the membrane potential of the neuron after it fires a pulse at time step t. The membrane potential time constant, and These are the neuron reset potential threshold and the impulse firing threshold, respectively. It is the Heaviside step function, which determines when Greater than At this time, a pulse is emitted. It equals 1, otherwise it is 0.
[0090] S2. Construct a lightweight pulse-convolution hybrid feature extraction network (LSCFEN), deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel. The pulse coding sequence generated in step S1 and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are input into the lightweight pulse-convolution hybrid feature extraction network to output a joint spatial spectral feature vector.
[0091] The pulse convolution branch and the one-dimensional spectral convolution branch are responsible for dynamic sparse temporal modeling under the spiking neural network paradigm and fine-grained spectral structure extraction under the convolutional neural network paradigm, respectively. The pulse convolution branch consists of a residual chain composed of 3D pulse convolution blocks, LIF neurons, and 3D pulse pooling layers. It extracts temporally sensitive and robust SNN paradigm features through multi-layer pulse convolution blocks, LIF neurons, and pulse pooling structures, ultimately outputting sparse spiking neural network features that preserve temporal dynamics (referred to as sparse SNN features). The one-dimensional spectral convolution branch obtains the dominant spectral tensor through tensor decomposition, and then captures the relationship between local and long-range spectra across bands through multi-level residual structures, obtaining stable and discriminative ANN paradigm features, ultimately outputting dense artificial neural network features (referred to as dense ANN features). These two types of features, sparse SNN features and dense ANN features, are fused after dimensional alignment to form a joint spatial spectral feature vector containing sparse dynamic patterns and statistical structures. The joint spatial spectral feature vector combines noise resistance, low energy consumption, and strong discriminative power, and can be used for subsequent cross-domain metric space construction.
[0092] In short, the lightweight pulse-convolution hybrid feature extraction network combines the pulse convolution branch with the one-dimensional spectral convolution (1D-CNN) branch, making full use of the local statistical modeling capability of one-dimensional spectral convolution and the sparse dynamic response of the spiking neural network to achieve robust joint feature representation across domains.
[0093] See Figure 4 Spectral-space-time encoded data from the SSTGSE module, i.e., pulse-coded sequences. As input features to the pulsed convolution module, they first enter the mapping layer (i.e., the mapping block) of the pulsed convolution branch for channel dimensionality reduction. Before feature extraction, the mapping layer unifies the input channel dimensions of the source and target domains to 100. Then, the core feature extraction part of the pulsed convolution branch is entered. This core feature extraction part comprises two residual blocks. The first residual block is connected to the second residual block through a pulsed 3D average pooling layer. Each residual block further includes three pulsed convolution blocks and one LIF neuron. Each pulsed convolution block further includes a 3×3×3 3D pulsed convolution kernel, a 3D pulsed batch normalization layer, and one LIF neuron. All pulsed convolution, pulsed pooling, and pulsed batch normalization operations mentioned in this embodiment are specifically designed for pulsed data with a time-step dimension to maintain event-driven characteristics while also considering spatiotemporal structure modeling capabilities. The pulsed convolution blocks can extract local spatial-temporal features while maintaining pulse sparsity. Residual blocks are connected via cross-layer short-circuit connections to effectively alleviate the gradient vanishing and feature degradation problems in deep training, enabling the network to maintain stable expressive power while expanding its depth. Each residual block is followed by a 3D pulsed average pooling layer (i.e., a pulsed 3D average pooling layer) to further aggregate local spatiotemporal structural information. Finally, the pulsed convolution branch outputs two SNN paradigm features, respectively. and ,in Indicates time step Temporal pulse features with a feature dimension of 160, and Then through the It is obtained by averaging over the time dimension, that is:
[0094] ;
[0095] in This represents the average temporal impulse feature, which is used to fuse with CNN paradigm features to generate cross-paradigm enhanced features.
[0096] The input to the one-dimensional spectral convolution branch is a one-dimensional spectral tensor. Before entering the mapping layer and feature extraction module, the three-dimensional hyperspectral pixel block needs to be decomposed into a tensor to obtain a one-dimensional spectral tensor more suitable for one-dimensional convolution modeling. Its core objective is to extract the dominant spectral structure of hyperspectral pixels in a more compact way, providing high-quality low-dimensional input for subsequent fine-grained modeling. After obtaining the one-dimensional spectral tensor, the data first enters the mapping layer (i.e., the mapping block), which consists of a one-dimensional convolutional kernel and a one-dimensional batch normalization layer, to normalize the input scale and stabilize the training process. Subsequently, the one-dimensional spectral tensor processed by the mapping layer enters the feature extraction part of the one-dimensional spectral convolution branch, which includes two small residual blocks and one large residual block. The first small residual block consists of two one-dimensional convolutional layers, each containing a 1×3 convolutional kernel, a one-dimensional batch normalization layer, and a ReLU activation function. The function of the first residual block is to capture the short-range correlation between local spectral bands, while ensuring smooth gradient propagation and improving deep representation capabilities through residual connections. The second small residual block consists of one-dimensional average pooling, several linear layers, and ReLU and Sigmoid activation functions. This residual block employs a multiplication-fusion strategy instead of simple addition, which facilitates channel-level adaptive recalibration, enhancing the dominant spectral feature response while suppressing interference information. The large residual block further integrates spectral features from different levels. Its main function is to learn long-range dependencies across bands, thereby completing the high-order spectral structures that the small residual block struggles to capture, enabling the overall network to possess multi-scale spectral understanding capabilities. Finally, the extracted spectral features are mapped to 160 dimensions through the final linear layer, resulting in... ,Right now Unifying the features to 160 dimensions is to align them with the average temporal pulse features output by the pulse convolution branch. Perform average fusion to form cross-paradigm enhanced features , to be used as the joint spatial spectral feature vector, and its fusion method is as follows:
[0097] ;
[0098] By averaging and fusing features from two paradigms, cross-paradigm enhancement features are achieved. It possesses noise resistance, cross-domain robustness, and fine-grained spectral modeling capabilities, enabling lightweight, stable joint feature learning with cross-domain generalization capabilities.
[0099] S3. Introducing a brain-inspired Imitation-Focused Optimization (BIFO) strategy to train the pulse-convolution hybrid feature extraction network. First, a cross-paradigm feature alignment mechanism based on center kernel alignment (CKA) is used to achieve the imitation learning of the convolution feature structure by pulse features. Then, the inter-class differences under cross-domain conditions are emphasized through hard negative sample contrast optimization, so that the model (i.e., the pulse-convolution hybrid feature extraction network) can focus on learning clear inter-class boundaries under very few sample supervision.
[0100] In this embodiment, after obtaining the cross-paradigm feature representation, this step further proposes a brain-inspired imitation-focused optimization strategy to enhance feature consistency and inter-class separability under cross-domain conditions.
[0101] This step first uses kernel alignment (CKA)-based feature mimicry at the sample level to drive sparse SNN features to mimic the geometric structure of dense ANN features. This ensures that the SNN and ANN paradigm features maintain high consistency in their shared semantics, mitigating feature shifts caused by different encoding mechanisms. Then, based on a prototype contrast optimization mechanism for hard negative samples, a reweighted contrast loss for hard negative samples is constructed at the prototype level. This emphasizes the differences between different class prototypes, amplifies the intervals between different class prototypes in the metric space, and allows the model to form clear inter-class decision boundaries even with minimal annotations. This enables the fused features to form clear and stable inter-class boundaries even with small sample conditions, thereby improving the overall network's cross-domain generalization ability.
[0102] like Figure 2 As shown, the support set and query set of the source domain are processed through different paths to obtain SNN paradigm features, ANN paradigm features, and fused feature representations, respectively. , and These represent the SNN paradigm features, ANN paradigm features, and fusion features, respectively, formed by concatenating the support set and query set of the source domain. , and These represent the SNN paradigm features, ANN paradigm features, and fusion features, respectively, formed by concatenating the support set and query set of the target domain. The same process is shared across the target domain to achieve cross-domain few-shot classification tasks. Each module in this embodiment revolves around impulse representation, cross-paradigm complementary modeling, and brain-inspired optimization mechanisms, significantly improving cross-domain recognition performance while maintaining a lightweight model.
[0103] Although the aforementioned LSCFEN can simultaneously capture sparse pulse patterns and detailed spectral structures, the SNN paradigm and the ANN paradigm inherently rely on different encoding mechanisms. The sparsity of features in the SNN paradigm and the density of features in the ANN paradigm naturally result in a misalignment in representing the manifold, such as... Figure 5Therefore, direct fusion not only fails to fully leverage their complementary advantages but may also amplify their geometric differences, weakening their cross-domain representation capabilities. However, from the perspective of sample-level semantic consistency, they actually still express the same underlying concept, as evidenced by sample similarity heatmaps (such as...). Figure 6 This is confirmed in [the previous sentence], therefore, this embodiment requires additional structural constraints to fully utilize this characteristic. Furthermore, under conditions of scarce samples, the category prototype is prone to problems such as blurred boundaries and insufficient discriminative power, making it difficult for the model to reliably generalize in domain-shifted scenarios.
[0104] Therefore, this embodiment proposes a brain-inspired "imitation-focused" optimization strategy (BIFO), such as... Figure 7 As shown in the figure. This strategy draws on the cognitive principle of "first imitating key patterns and then focusing on differential cues" in biological learning. By designing feature alignment and discrimination reinforcement mechanisms, the model can achieve significant benefits in both cross-paradigm fusion and prototype differentiation.
[0105] In a training batch, three classes of samples—support sets (i.e., prototypes), query sets, and target domains—are concatenated in a fixed order along the sample dimension to maintain an arrangement consistent with the domain discriminator. The overall few-shot learning strategy comprises two stages: the first stage is few-shot learning for the source domain, and the second stage is few-shot learning for the target domain's few-shot dataset. The first stage involves concatenating the support set, query set, and target domain; the second stage involves concatenating the support set, query set, and source domain. Taking the first stage as an example, let the total features extracted by the SNN path (i.e., the spiking convolution branch) be:
[0106] ;
[0107] in, This indicates the total number of samples after concatenation (i.e., the total number of samples in the support set, query set, and target domain), and 160 indicates that the feature dimension is 160. These represent the prototype features from the source domain, the query set features from the source domain, and the features from the target domain, respectively. Similarly, the concatenated features of the ANN path (i.e., the one-dimensional spectral convolution branch) are:
[0108] ;
[0109] The splicing order here needs to be consistent with other modules such as domain discrimination to ensure semantic alignment in subsequent calculations.
[0110] To reduce noise and make center kernel alignment (CKA) computation more stable in low-dimensional space, two learnable projection heads are first used to map the output features of the SNN and CNN to the same low-dimensional subspace. Let the projection mapping be:
[0111] ;
[0112] ;
[0113] in, , These represent the projection heads of SNN and ANN, respectively; The dimension after projection is taken as [value] in this embodiment. The two matrices after projection , Used for subsequent center kernel alignment (CKA) calculations.
[0114] Next, to capture the structure of relationships between samples, a linear kernel function is used to construct the Gram matrix. For any feature flow... Its Gram matrix Defined as:
[0115] ;
[0116] in, Encoded the first The sample and the first The similarity between samples. To eliminate the interference of feature means on correlation analysis, the Gram matrix needs to be centered. Let For a centered matrix, where It is the identity matrix. It is a column vector of all 1s, and the centered Gram matrix. The calculation is as follows:
[0117] ;
[0118] Building upon this, this embodiment utilizes the Hilbert-Schmidt Independence Criterion (HSIC) to quantify the dependency between the two feature distributions. The HSIC value can be obtained through the inner product of two centered Gram matrices, i.e. To obtain a scale-invariant similarity measure, this embodiment constructs a normalized center kernel alignment CKA coefficient. As a basis for imitation loss:
[0119] ;
[0120] By minimizing The hybrid feature extraction network model is forced to adjust the parameters of the pulse convolution branch and the one-dimensional convolution branch to achieve mimicry, that is, to let the SNN paradigm features learn the useful geometric structure of the ANN paradigm features on fine-grained spectral information, while retaining their advantages of sparsity and robustness.
[0121] To implement the focusing strategy in BIFO, this embodiment introduces strong negative sample contrastive learning at the prototype level to sharpen the discrimination boundary of class prototypes. Let the prototype feature matrix formed by the fusion of the two paradigms be... .in, This represents the number of class prototypes in the current batch, with 160 being the prototype dimension. For simplicity, the two prototype representations input to the contrastive loss are denoted as... , in practice .
[0122] First, process each vector row by row. Normalization:
[0123] ;
[0124] And construct a similarity matrix (unnormalized exponential form):
[0125] );
[0126] in The temperature parameter controls the sharpness of the similarity distribution. To eliminate the influence of itself as a negative sample, a negative sample mask matrix is defined. :
[0127] ;
[0128] This mask is used to... Identify the true negative sample similarity terms. For each anchor point... The positive sample similarity (in the implementation, it is the exponential similarity with the corresponding positive sample pair) is defined as:
[0129] ;
[0130] For handling negative samples, BIFO employs a strategy of reweighting difficult negative samples, which means making the hybrid feature extraction network model more focused on continuously reducing the distance between samples that are very similar to positive samples but are actually of different prototype categories. First, let... Calculate the number of negative samples for each anchor point and then compute the masked negative sample matrix:
[0131] ;
[0132] The similarity of these negative samples is first power-weighted, and the weight vector is defined as follows:
[0133] ;
[0134] in The negative sample reweighting coefficient allows negative samples with higher similarity to the anchor point to receive greater weight. This forces the model to spend more effort optimizing these difficult-to-distinguish boundaries. Based on this weight, negative samples are reweighted ( Summing these values yields the reweighted negative sample scores:
[0135] ;
[0136] The aim is to give higher relative weights to the hard-to-bear samples while preserving the overall negative sample energy.
[0137] Subsequently, a positive sample weighting coefficient was introduced. This is used to balance the positive and negative terms, and then a normalized negative term is constructed:
[0138] ;
[0139] In this embodiment, The purpose is to control the contribution of positive samples while using the energy of negative samples after reweighting as a normalization term to avoid the influence of negative samples being weakened by simple summation, so as to ensure numerical stability.
[0140] The loss for each prototype is ultimately defined as:
[0141] ;
[0142] And the in-batch mean was used as the overall loss:
[0143] ;
[0144] Combining the two parts, the complete optimization objective function of BIFO can be written as a weighted sum of the two losses:
[0145] ;
[0146] in and These are hyperparameters used to balance the two objectives of imitation and focus during training. The objective function is minimized. At the same time, it promotes the convergence of the two paradigm features in terms of semantic geometry and sharpens the decision boundary at the prototype level, thereby improving the generalization performance under conditions of few samples and domain offset.
[0147] S4. Jointly train the spectrum-space-time gated pulse coding module, the pulse-convolution hybrid feature extraction network, and the image classifier. Set the overall objective function as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. Update the parameters of the pulse coding module, the hybrid feature extraction network, and the image classifier end-to-end until they converge simultaneously on the query sets of the source and target domains.
[0148] The image classifier is set after the hybrid feature extraction network and uses the K-Nearest Neighbor (KNN) classification algorithm. The joint spatial spectral feature vector extracted by the hybrid feature extraction network is input into the image classifier, which then classifies the hyperspectral image.
[0149] S5. In the inference stage, the weights and parameters after training are fixed, and the hyperspectral pixel block to be tested is input into the spectrum-space-time gated pulse coding module to obtain the pulse coding sequence. After the pulse-convolution hybrid feature extraction network extracts the joint space-spectrum feature vector, it is input into the image classifier. Cross-domain small sample classification is completed by the nearest class prototype metric, realizing low power consumption and high robustness real-time prediction.
[0150] It should be noted that the hyperspectral image classification method in this embodiment does not need to be executed in the order of steps S1-S5. Steps S1-S5 are only used to divide the implementation process of this embodiment for the convenience of description, and are not intended to limit the order of execution of the relevant steps.
[0151] Based on the same inventive concept, this embodiment also provides a brain-inspired cross-domain few-shot learning hyperspectral image classification system, implemented using the aforementioned hyperspectral image classification method; the hyperspectral image classification system of this embodiment includes the following modules:
[0152] The spectral-space-time gated pulse coding module performs multi-path attention modeling on the original hyperspectral pixel blocks and encodes pulse coding sequences with biological brain-like plausibility.
[0153] A lightweight pulse-convolution hybrid feature extraction network is constructed by deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel. The pulse coding sequence and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are jointly input into the hybrid feature extraction network, and the output is a joint spatial-spectral feature vector.
[0154] The hybrid feature extraction network training module introduces a brain-inspired imitation-focus optimization strategy to train the hybrid feature extraction network. First, it uses a cross-paradigm feature alignment mechanism based on center kernel alignment to realize the imitation learning of convolutional feature structure by pulse features. Then, it emphasizes the inter-class differences under cross-domain conditions through hard-bearing sample contrast optimization, so that the hybrid feature extraction network can focus on learning clear inter-class boundaries under very few sample supervision.
[0155] The joint training module is used to jointly train the gated pulse coding module, the hybrid feature extraction network, and the image classifier. The overall objective function is set as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. The parameters of the gated pulse coding module, the hybrid feature extraction network, and the image classifier are updated end-to-end until they converge simultaneously on the query sets of the source and target domains.
[0156] The classification module inputs the hyperspectral pixel block to be tested into the gated pulse coding module to obtain the pulse coding sequence. After the joint spatial-spectral feature vector is extracted by the hybrid feature extraction network, it is input into the image classifier, and cross-domain small sample classification is completed by the nearest class prototype metric.
[0157] Each of the above modules can be implemented using the aforementioned steps S1-S5, and the detailed implementation process will not be elaborated here.
[0158] The computational complexity of the method of this invention is analyzed. Specifically, the number of floating-point operations (FLOPs), number of parameters, and overall accuracy (OA, %) of this invention are compared with those of four other popular few-shot learning methods (TEFSL, Gia-CFSL, CMFSL, and MRLF). Detailed statistical results are shown in Table 1.
[0159] Table 1. Comparative analysis of the method of this invention with other few-shot learning methods
[0160]
[0161] Taking the Indian Pine (IP) dataset as an example, Table 1 shows that the BI-FSL framework proposed in this invention exhibits a significant lightweight advantage. BI-FSL has only 1.99 M FLOPs and 171.572 K parameters. In contrast, all compared methods, including CMFSL (27.13 M) with the lowest FLOPs and Gia-CFSL (205.392 K) with the lowest number of parameters, have significantly higher complexity than BI-FSL. Despite its extremely low computational cost, BI-FSL still achieves the highest overall accuracy (71.92%), outperforming all compared algorithms. This comparison result shows that BI-FSL does not sacrifice classification accuracy while significantly compressing the model size. The same conclusion can be observed on the University of Houston (HT) and Wuhan Honghu (HH) datasets: the BI-FSL framework consistently maintains the lowest levels in FLOPs, parameters, and running time, and has the best classification performance (OA). In summary, the BI-FSL framework proposed in this invention achieves an efficient balance between computational cost and classification performance, and is particularly suitable for edge remote sensing application platforms that have high accuracy requirements but are limited by computing resources.
[0162] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. It should be noted that any changes, modifications, substitutions, combinations, or simplifications made by those skilled in the art without departing from the spirit and principle of the present invention should be considered equivalent substitutions and are included within the protection scope of the present invention.
Claims
1. A brain-inspired cross-domain few-shot learning hyperspectral image classification method, characterized in that, Includes the following steps: S1. Construct a spectrum-space-time gated pulse coding module to perform multi-path attention modeling on the original hyperspectral pixel blocks and encode pulse coding sequences with biological brain-like rationality. S2. Construct a lightweight pulse-convolution hybrid feature extraction network, deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel; the pulse coding sequence and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are jointly input into the hybrid feature extraction network, and the joint spatial spectral feature vector is output. S3. Introduce a brain-inspired imitation-focused optimization strategy to train the hybrid feature extraction network. First, use the cross-paradigm feature alignment mechanism based on center kernel alignment to realize the imitation learning of convolutional feature structure by pulse features. Then, through hard-bearing sample comparison optimization, emphasize the inter-class differences under cross-domain conditions, so that the hybrid feature extraction network can focus on learning clear inter-class boundaries under very few sample supervision. S4. Jointly train the gated pulse coding module, the hybrid feature extraction network, and the image classifier. Set the overall objective function as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. Update the parameters of the gated pulse coding module, the hybrid feature extraction network, and the image classifier end-to-end until they converge simultaneously on the query sets of the source and target domains. S5. Input the hyperspectral pixel block to be tested into the gated pulse coding module to obtain the pulse coding sequence. After the joint spatial spectral feature vector is extracted by the hybrid feature extraction network, it is input into the image classifier and cross-domain small sample classification is completed by the nearest class prototype metric.
2. The hyperspectral image classification method according to claim 1, characterized in that, The gated pulse coding module in step S1 includes a pulsed two-dimensional convolutional block, a temporal attention module, a spectral-spatial attention module, and LIF neurons; The input hyperspectral pixel block is processed by pulsed 2D convolutional blocks for initial feature extraction to obtain initial spectral-spatial-temporal feature data as initial input data. ,in For time step, The spectral dimension of the data, and It refers to the spatial dimension of the data; The temporal attention module is used to mine the correlation of the initial input data across time steps. First, it aggregates the initial input data through three-dimensional adaptive average pooling and max pooling, respectively. All spatial and channel information is used to obtain global statistics in two time dimensions. Then, a shared set of time weight generators is used to perform nonlinear modeling on the global statistics in both time dimensions, mapping the time dependency structure between dimensionality reduction and dimensionality increase. Finally, the nonlinear modeling responses of the average pooling path and the max pooling path are added together, fusing different types of statistical information to obtain time attention weights. ; The spectral-spatial attention module is used to capture the joint correlation between spectral and spatial dimensions, including height-channel attention branches, channel-width attention branches, and height-width attention branches; For initial input data Perform a time-dimension flattening operation to eliminate the time dimension and obtain the input data. The height-channel attention weights are obtained through height-channel attention branches, channel-width attention branches, and height-width attention branches, respectively. Channel-width attention weight value and height-width attention weight values The attention weights of the three branches are averaged and then fused together, and then added back into the time dimension to obtain the spectral-spatial attention weights. ; LIF neurons respond to initial input data Processing is performed to obtain a pulse sequence. ; Based on temporal attention weights, spectral-spatial attention weights, and pulse sequences Gated pulse coding is performed to obtain a pulse code sequence with biological rationality.
3. The hyperspectral image classification method according to claim 2, characterized in that, The gating pulse is encoded as follows: ; in, This represents the sigmoid activation function. This indicates element-wise multiplication at corresponding positions. It is a pulse-coded sequence with biological rationality.
4. The hyperspectral image classification method according to claim 2, characterized in that, The value of the pulse code sequence is 0, or a floating-point number between 0 and 1; where 0 indicates that the corresponding region is not of any interest, and the larger the floating-point number of the non-zero region, the higher the degree of interest in the corresponding region.
5. The hyperspectral image classification method according to claim 1, characterized in that, In step S2, the pulse convolution branch undertakes dynamic sparse temporal modeling under the spiking neural network paradigm, and the one-dimensional spectral convolution branch undertakes fine-grained spectral structure extraction under the convolutional neural network paradigm. The pulsed convolution branch includes a residual chain consisting of 3D pulsed convolution blocks, LIF neurons, and 3D pulsed pooling layers. It extracts time-sensitive and robust SNN paradigm features through multi-layer pulsed convolution blocks, LIF neurons, and pulsed pooling structures, and outputs sparse spiking neural network features that preserve temporal dynamics. One-dimensional spectral convolution branch obtains the dominant spectral tensor through tensor decomposition, and then captures the relationship between the local spectrum and the long-range spectrum across the band through a multi-level residual structure, resulting in stable and discriminative ANN paradigm features, and outputting dense artificial neural network features. The features of sparse spiking neural networks and dense artificial neural networks are fused after dimensional alignment to form a joint spatial spectral feature vector containing sparse dynamic patterns and statistical structures.
6. The hyperspectral image classification method according to claim 5, characterized in that, In step S2, the pulse convolution branch includes a mapping layer and a core feature extraction part. The pulse-coded sequence enters the mapping layer of the pulse convolution branch for channel dimensionality reduction. After extracting local spatial-temporal features and aggregating local spatiotemporal structure information in the core feature extraction part, the average temporal pulse feature after averaging in the time dimension is output. ; The one-dimensional spectral convolution branch includes a mapping layer and a feature extraction part. After the one-dimensional spectral tensor is normalized to the input scale by entering the mapping layer, the feature extraction part first captures and multiplies the short-range correlations between local spectral bands, and then learns the long-range dependencies across bands to capture higher-order spectral structures and extract spectral features. ; spectral features With average time-series pulse characteristics Integration, forming cross-paradigm enhancement features As a joint spatial spectral eigenvector.
7. The hyperspectral image classification method according to claim 5, characterized in that, The training process in step S3 includes: Firstly, at the sample level, by using feature imitation based on centered kernel alignment, the sparse spiking neural network features are driven to imitate the geometric structure of dense artificial neural network features, so that the expression structure of SNN paradigm features and ANN paradigm features maintains high consistency in shared semantics, thus alleviating the feature shift caused by the different encoding mechanisms of the two paradigms. Furthermore, based on the prototype comparison optimization mechanism of difficult negative samples, a heavy weighted comparison loss of difficult negative samples is constructed at the prototype level. This emphasizes the differences between different types of prototypes, amplifies the interval between different types of prototypes in the metric space, and allows the model to form clear inter-class decision boundaries even with very few labels.
8. The hyperspectral image classification method according to claim 7, characterized in that, Step S3 involves concatenating the three types of sample support sets, query sets, and target domains in a fixed order on the sample dimension to maintain an arrangement consistent with the domain discriminator. The overall few-shot learning strategy consists of two stages: the first stage is few-shot learning for the source domain, and the second stage is few-shot learning for the target domain's few-shot dataset. Two learnable projection heads are used to map the two output features of the pulse convolution branch and the one-dimensional spectral convolution branch to the same low-dimensional subspace, respectively, to obtain two projection matrices. A Gram matrix is constructed using a linear kernel function, and then centered to obtain a centered Gram matrix. Using the Hilbert-Schmidt independence criterion, the dependence of the output feature distributions of the pulse convolution branch and the one-dimensional spectral convolution branch is obtained through the inner product of the two centered Gram matrices. Construct normalized center kernel alignment coefficients As a basis for imitation loss; by minimizing the center kernel alignment coefficient The hybrid feature extraction network model is forced to adjust the parameters of the pulse convolution branch and the one-dimensional convolution branch in order to achieve mimicry.
9. The hyperspectral image classification method according to claim 7, characterized in that, In step S3, strong negative sample contrast learning is introduced at the prototype level to sharpen the discrimination boundary of the prototype class; the processing of negative samples adopts the strategy of hard negative sample reweighting, so that the model of the hybrid feature extraction network is more focused on continuously widening the distance between samples that are similar to positive samples but belong to different prototype categories.
10. A brain-inspired cross-domain few-shot learning hyperspectral image classification system, implemented based on the hyperspectral image classification method according to any one of claims 1-9, characterized in that, Includes the following modules: The spectral-space-time gated pulse coding module performs multi-path attention modeling on the original hyperspectral pixel blocks and encodes pulse coding sequences with biological brain-like plausibility. A lightweight pulse-convolution hybrid feature extraction network is constructed by deploying pulse convolution branches and one-dimensional spectral convolution branches in parallel. The pulse coding sequence and the one-dimensional spectral tensor obtained by tensor decomposition of the original hyperspectral block are jointly input into the hybrid feature extraction network, and the output is a joint spatial-spectral feature vector. The hybrid feature extraction network training module introduces a brain-inspired imitation-focus optimization strategy to train the hybrid feature extraction network. First, it uses a cross-paradigm feature alignment mechanism based on center kernel alignment to realize the imitation learning of convolutional feature structure by pulse features. Then, it emphasizes the inter-class differences under cross-domain conditions through hard-bearing sample contrast optimization, so that the hybrid feature extraction network can focus on learning clear inter-class boundaries under very few sample supervision. The joint training module is used to jointly train the gated pulse coding module, the hybrid feature extraction network, and the image classifier. The overall objective function is set as a weighted sum of the pulse-convolution feature imitation loss, the prototype focusing contrast loss, and the image classifier classification loss. The parameters of the gated pulse coding module, the hybrid feature extraction network, and the image classifier are updated end-to-end until they converge simultaneously on the query sets of the source and target domains. The classification module inputs the hyperspectral pixel block to be tested into the gated pulse coding module to obtain the pulse coding sequence. After the joint spatial-spectral feature vector is extracted by the hybrid feature extraction network, it is input into the image classifier, and cross-domain small sample classification is completed by the nearest class prototype metric.