An image classification method based on adaptive control state space model
The image classification method (ViC) based on the adaptive control state space model utilizes image segmentation and adaptive control mechanisms to solve the problems of long sequence dependencies and difficulty in capturing complex visual patterns in existing image classification methods on large-scale data sets, and achieves more efficient and generalized image classification.
Patent Information
- Application Number
- CN202411710062.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing image classification methods have difficulty in effectively capturing long sequence dependencies and complex visual patterns when processing large-scale image datasets, have high computational complexity, and lack generalization capabilities.
An image classification method based on adaptive control state space model (ViC) is adopted. Through image segmentation, selective bidirectional state model, dynamic state scaling, bidirectional convolution and adaptive control mechanism, a ViC encoder is designed to achieve bidirectional processing and adaptive adjustment of image blocks.
It improves the accuracy, efficiency and generalization ability of image classification, can better capture long sequence dependencies and complex visual patterns, reduces computational complexity, and improves the adaptability and performance of the model.
Smart Images

Figure CN119625407B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of pattern recognition, machine learning, artificial intelligence, and image processing, and in particular to an image classification method based on an adaptive control state space model. Background Art
[0002] Image classification, a core task in computer vision, has become increasingly important with technological advancements. This task involves automatically classifying image data into different categories based on its visual content and is widely used in fields such as security monitoring, medical diagnosis, autonomous driving, and content recommendation. However, traditional image classification methods rely on manual feature extraction, such as edges, corners, and textures. These feature extraction methods are not only complex but also inefficient when processing large-scale image datasets, making them difficult to adapt to the high real-time and accuracy requirements of modern applications.
[0003] With the rise of deep learning technology, data-driven feature learning has gradually become mainstream. Deep learning models, particularly convolutional neural networks (CNNs), have achieved revolutionary progress in image classification tasks through their powerful feature extraction capabilities. CNNs can effectively capture local image features and construct increasingly complex and abstract feature representations layer by layer, achieving unprecedented results in large-scale image recognition competitions such as ImageNet.
[0004] However, despite their tremendous success in image classification, CNNs still have limitations when dealing with long-range dependencies and complex visual patterns. For example, CNNs typically use a local receptive field for feature extraction, which limits their ability to capture long-range dependencies. Furthermore, CNN models have a large number of parameters and high computational complexity when processing high-dimensional data, which to some extent restricts their application on resource-constrained devices.
[0005] To address these issues, researchers have begun exploring more advanced model structures. The Visual Transformer (ViT), an emerging model, demonstrates the ability to handle long sequential dependencies by segmenting images into small blocks (i.e., tokens) and processing these tokens using a self-attention mechanism. The ViT model has demonstrated comparable or even superior performance to CNNs in multiple visual tasks, but its computational complexity and ability to handle large datasets still require optimization.
[0006] Furthermore, existing image classification methods face challenges in generalization. Maintaining high classification accuracy when faced with new, unseen data is a key research topic. To improve the generalization capabilities of models, researchers have explored various approaches, including data augmentation, regularization techniques, and meta-learning. However, these methods still have limitations in practical applications. When processing large-scale image datasets, they struggle to effectively capture long-sequence dependencies and complex visual patterns, making it difficult to improve performance in image classification tasks. Summary of the Invention
[0007] The present invention provides an image classification method based on an adaptive control state space model, called VisionConba (ViC, Visual Mamba), which can effectively process image data and improve the accuracy and efficiency of image classification.
[0008] This paper proposes an image classification method (Vision Conba (ViC) model). The ViC model constructed in this paper includes an image segmentation module and an innovative ViC encoder. The ViC encoder includes a Selective Bidirectional State Model (SBSM), Dynamic State Scaling (DSS), Bidirectional Convolution (Bi-Conv), and an Adaptive Control Mechanism (ACM), which can improve the accuracy, efficiency, and generalization of image classification. The ViC model method provided by this invention can better capture long sequence dependencies and complex visual patterns when processing large-scale image datasets, thereby achieving superior performance in image classification tasks.
[0009] For convenience, the present invention defines the following terms:
[0010] Image Segmentation: Split the input image into small patches and convert these patches into patch tokens.
[0011] ViC Encoder: The ViC encoder is used to process the block label sequence bidirectionally to capture the long-range dependencies in the block label sequence.
[0012] Selective Bidirectional State Model (SBSM): Determine the information related to the current input through a selective state network, and pass or forget information as needed.
[0013] Dynamic State Scaling (DSS) network model: adjusts the impact of the image state dimension (one-dimensional dimension) on the output through the dynamic state scaling vector.
[0014] Bidirectional Convolution (Bi-Conv) network model: uses separable one-dimensional (1D) convolution kernels to capture local patterns in the sequence.
[0015] Adaptive State Space Network Model (A-SSM): learns the state transition matrix and input mapping matrix to adaptively update the previous and next states.
[0016] Adaptive Control Mechanism (ACM) network model: Dynamically adjusts the internal parameters of the model through a closed-loop feedback mechanism and adaptive control law.
[0017] The present invention adopts the following technical solutions:
[0018] An image classification method based on an adaptive control state space model comprises the following steps:
[0019] 1) Split the input image into small blocks and convert these blocks into block labels;
[0020] 2) Perform a linear projection on each block label to expand its dimension;
[0021] 3) Combine the block tags after dimension expansion with position embedding (position encoding) to form the initial tag sequence;
[0022] 4) Design a ViC encoder; input the initial tag sequence into the ViC encoder for processing, and output a final tag sequence; the processing in the ViC encoder includes steps 5) to 9):
[0023] 5) Determine information related to the initial token sequence of the current input through the Selective Bidirectional State Model (SBSM) of the ViC encoder, and pass or forget information as needed;
[0024] 6) For the tag sequence output in step 5), dynamic state scaling (DSS) is used to adjust the influence of different state dimensions on the output tag sequence;
[0025] 7) Use bidirectional convolution (Bi-Conv) to capture local patterns in the tag sequence output in step 6);
[0026] 8) Design an adaptive state space model (A-SSM) to learn the state transition matrix and input mapping matrix to adaptively update the previous and next states;
[0027] 9) Using the adaptive control mechanism (ACM) to dynamically adjust the internal parameters of the ACM model to obtain the final label sequence output;
[0028] 10) The final output token sequence from step 9) is fed into a multi-layer perceptron (MLP) head to obtain the final classification prediction.
[0029] In specific implementation, the present invention realizes an image classification system based on an adaptive control state space model, including: an image segmentation module and a ViC encoder; the ViC encoder includes a selective bidirectional state model module, a dynamic state scaling module, a bidirectional convolution module, an adaptive control state space model, and an adaptive control mechanism module.
[0030] Furthermore, the working process of the ViC encoder designed by the present invention includes: forward propagating the input label sequence, passing it through the various network layers of the selective bidirectional state model module, the dynamic state scaling module, the bidirectional convolution module, the adaptive control state space model, and the adaptive control mechanism module in sequence to generate a forward coding sequence; backward propagating the forward coding sequence, passing it through the various network layers of the selective bidirectional state model module, the dynamic state scaling module, the bidirectional convolution module, the adaptive control state space model, and the adaptive control mechanism module in reverse to generate a backward coding sequence; fusing the forward coding sequence and the backward coding sequence to generate an output sequence of the current network layer.
[0031] Furthermore, the selective bidirectional state model (SBSM) includes a forward selective state network and a backward selective state network, which are:
[0032] The forward selective state network is used to combine the forward state of the image of the current layer with the backward output of the previous layer to generate a vector containing relevant information, namely the selective state vector;
[0033] The backward selective state network is used to combine the backward state of the current layer with the forward output of the next layer to generate a selective state vector containing relevant information.
[0034] Furthermore, a dynamic state scaling (DSS) network model is designed, including:
[0035] The Swish function in the literature (Ramachandran, P., Zoph, B., & Le, Q.V. (2017). Searching for activation functions. arXiv preprint arXiv:1710.05941) is used to perform element-wise scaling on the selective state vector output by the selective bidirectional state model to generate a dynamic state scaling vector. The dynamic state scaling vector is element-wise multiplied by the selective state vector to generate an adjusted image state vector.
[0036] Furthermore, the bidirectional convolutional (Bi-Conv) network model includes:
[0037] The adjusted state vector is forward convolved with a separable 1D convolution kernel to generate a forward convolution output tag sequence; the adjusted state vector is backward convolved with a separable 1D convolution kernel to generate a backward convolution output tag sequence.
[0038] Furthermore, the adaptive control state space model (A-SSM) includes:
[0039] Learn the state transition matrix and input mapping matrix to adaptively update the forward and backward states;
[0040] Calculate dynamic adjustment terms to adaptively adjust the state transition matrix.
[0041] Furthermore, the adaptive control mechanism (ACM) includes:
[0042] Calculate the deviation between the current layer output and the expected output;
[0043] Update the control gain matrix according to the deviation;
[0044] Calculate control inputs to adjust the model outputs to move them closer to the desired targets.
[0045] Compared with the existing technology, the image classification method of the present invention has the following technical advantages:
[0046] This invention provides an image classification technology based on an adaptive control state space model. Through bidirectional processing, an adaptive control mechanism, a selective state model, and dynamic state scaling, it better captures long sequence dependencies and complex visual patterns when processing large-scale image datasets, thereby achieving superior performance in image classification tasks and improving the accuracy, efficiency, and generalization of image classification. The technical advantages of this invention include the following aspects:
[0047] Efficient long-range dependency capture: Through bidirectional processing, long-range dependencies in images can be effectively captured.
[0048] Strong adaptability: Through the adaptive control mechanism, the model can dynamically adjust its internal parameters according to the output error, improving the adaptability and generalization ability of the model.
[0049] High computational efficiency: Through selective state models and dynamic state scaling, unnecessary calculations are reduced and the computational efficiency of the model is improved.
[0050] Good generalization ability: It performs well in various image classification tasks and has good generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flowchart of the method provided by the present invention. DETAILED DESCRIPTION
[0052] The present invention will be further described below by way of examples in conjunction with the accompanying drawings, but the scope of the present invention is not limited in any way.
[0053] like Figure 1 As shown in the figure, the method of the present invention can improve the accuracy, efficiency and generalization ability of image classification through the innovative ViC encoder, as well as selective bidirectional state model (SBSM), dynamic state scaling (DSS), bidirectional convolution (Bi-Conv) and adaptive control mechanism (ACM).
[0054] The specific embodiments of the present invention are described in detail below:
[0055] 1. Obtain a block label sequence of the image through image segmentation;
[0056] The input image is first split into small blocks, each of size P × P. These blocks are converted into block labels and linearly projected to expand their dimensions to obtain a sequence of block labels.
[0057] 2. Process the image block through the ViC encoder to obtain the image block coding sequence;
[0058] The block marker sequence is input to the ViC encoder. The ViC encoder processes it through the following steps:
[0059] Forward propagation: Calculate the forward encoding sequence
[0060] Backward propagation: Calculate the backward encoding sequence
[0061] State fusion: The forward and backward outputs are fused through the SwiGLU gating function to generate the output encoding sequence T of the current layer l The SwiGLU gating function can be found in the literature (Shazeer, N. (2020). Glu variants improve transformer. arXiv preprint arXiv:2002.05202).
[0062] In the Vision Conba image classification model constructed by the present invention, the input image is first segmented into a series of image patches. Where J represents the number of image patches. In order to better utilize the information of these patches, we use linear projection technology to map each image patch into a high-dimensional space to obtain a patch embedding sequence
[0063]
[0064] Among them, W proj is a learnable projection matrix that projects the original image patches onto R D space, so that the model can better capture the correlation between patches. is a position embedding sequence that adds position information to each patch, enabling the model to distinguish patches at different positions and thus better handle the spatial structure of the image. Inspired by ViT and BERT, we also use class tokens to represent the entire image patch sequence, denoted as t cls .
[0065] After obtaining the patch embedding sequence, we input it into the lth layer of the Vic encoder to obtain the output T l The Vic encoder is a bidirectional sequence modeling module that can effectively capture long-range dependencies in the sequence by performing bidirectional propagation on the input sequence. Specifically, the lth layer of the Vic encoder is defined as follows:
[0066] T l =Vic(T l-1 )+T l-1
[0067] Among them, Vic represents the Vic encoder, Vic(T l-1 ) represents the forward propagation sequence result of the lth layer, T l-1 Represents the output of the l-1 layer. In this way, the Vic encoder can encode the input sequence layer by layer to obtain a higher-level feature representation. Finally, we output the sequence (category token) T of the Vic encoder. l Normalization is performed and input into the Multilayer Perceptron (MLP) head to obtain the final prediction p. The normalization layer uses the RMS Norm normalization technique, which effectively improves the stability and generalization ability of the model by taking the square root of each eigenvalue. Specifically, the mathematical formula of RMS Norm is as follows:
[0068]
[0069] Where L is the number of network layers, T L Represents the final output category token, and N represents the number of tokens. Through RMS Norm normalization, we can make the model more stable, thereby improving the performance and generalization ability of the model.
[0070] 3. Selective Bidirectional State Network Model (SBSM)
[0071] Through a selective bidirectional state network model, it determines the information relevant to the current input and passes or forgets the information as needed.
[0072] The specific formula is as follows:
[0073]
[0074] Selective bidirectional state update is a key mechanism that enables and To determine which state information is relevant to the current input and which is redundant. This mechanism enables the model to adaptively pass on or forget information based on the current data, thereby reducing computational complexity and improving efficiency. Specifically, the forward selective state network Responsible for the forward state of the current layer With the reverse output from the previous layer Combined to generate a vector containing relevant information Similarly, the reverse selective state network Responsible for the reverse state of the current layer and the forward output from the next layer Combined together to generate another vector containing relevant information Selective State Networks and Using SwiGLU as the activation function, we can learn to transform the current state and with the output from the adjacent layer and Combined, selectively retains information relevant to the current input.
[0075] By applying SwiGLU to the current state and the adjacent layer output, and It can learn which information is relevant to the current input and selectively update the state information. This mechanism enables the Vic block to flexibly adapt to different input sequences and improves the performance of the model when processing long sequence tasks. and We can consider them as two fully connected neural networks, each of which contains multiple hidden layers. In each hidden layer, we use SwiGLU as the activation function and take the current state and the adjacent layer output as input. For example, for Its forward state and the reverse output of the previous layer It can be expressed as:
[0076]
[0077] The network is represented as:
[0078]
[0079] in, It is a neural network composed of multiple fully connected layers, each layer uses SwiGLU as the activation function. For each hidden layer, its input is the current state and the output of the adjacent layer, and its output is the activation value of the layer. Specifically, assuming Contains L hidden layers, then the mathematical formula of each hidden layer can be expressed as:
[0080]
[0081] in, and is the fully connected weight matrix of this layer, and is the bias vector of this layer.
[0082] For reverse selective state networks Its mathematical formula can be expressed as:
[0083]
[0084] in, It is also a neural network composed of multiple fully connected layers, each layer uses SwiGLU as the activation function. For each hidden layer, its input is the current state and the output of the adjacent layer, and its output is the activation value of the layer. Specifically, Contains L hidden layers, then the mathematical formula of each hidden layer can be expressed as:
[0085]
[0086] in, and is the fully connected weight matrix of this layer, and is the bias vector of the layer. In this way, and It can learn which information is relevant to the current input and selectively update the state information. This mechanism enables the Vic block to flexibly adapt to different input sequences, improving the performance of the model when processing long sequence tasks.
[0087] 4. Dynamic State Scaling (DSS) module
[0088] The dynamic state scaling vector is used to adjust the impact of different state dimensions on the output. The specific formula is as follows:
[0089]
[0090] Dynamic state scaling by dynamic state scaling vector and Selective state vector and
[0091] Element-by-element scaling is performed to adjust the impact of different state dimensions on the output. This mechanism enables the model to better adapt to different input distributions and dynamically changing visual sequences. Specifically, dynamic state scaling is performed to adjust the impact of different state dimensions on the output.
[0092]
[0093] Where ⊙ represents the element-wise product. Dynamic state scaling vector The mathematical formula of the Swish function is as follows:
[0094]
[0095] Smooth and unbounded, it can better capture important features in the input signal and adaptively scale the signal through the parameter β. By combining the selective state network and dynamic state scaling, we can dynamically adjust the information transmission pathway, further enhancing the model's adaptability to complex inputs.
[0096] 5. Bidirectional Convolution (Bi-Conv) Module
[0097] Use separable 1D convolution kernel to capture local patterns in the sequence. The specific formula is as follows:
[0098]
[0099] Bidirectional convolution updates capture local patterns in sequences by using separable 1D convolution kernels. This mechanism enables the model to effectively learn the spatiotemporal dependencies of sequence data, thereby improving the performance of the model in processing visual tasks. Specifically, the bidirectional convolution update calculates the forward convolution output separately. and the deconvolution output
[0100]
[0101] in, and is a separable 1D convolution kernel, and Is the dynamically scaled state vector. Separable 1D convolution kernel and The definitions are as follows:
[0102]
[0103] in, Represents the combined operation of depthwise convolution and spatial convolution. Specifically, and is a depthwise convolution kernel that convolves the input along the channel dimension; and and is the spatial convolution kernel that convolves the input along the sequence dimension, where K is the convolution kernel size. By using separable convolution, we can significantly reduce the number of parameters and computational complexity while still effectively capturing local patterns. Convolution output and The fusion of local visual features at different scales provides rich context for the next step of adaptive state space updates. In practical applications, parameters such as the convolution kernel size, number of channels, and stride can be adjusted experimentally to achieve optimal model performance. In this way, the model can effectively handle the spatiotemporal dependencies in visual tasks, thereby improving model performance and generalization.
[0104] 6. Adaptive Control State Space Model (A-SSM)
[0105] Learn the state transition matrix and input mapping matrix to adaptively update the previous and next states. The specific steps are as follows:
[0106] 1) Obtain the state transfer matrix and input mapping matrix through learning:
[0107]
[0108] Among them, A and B are parameter matrices of the state space; A is the learning state transfer matrix, and B is the input mapping matrix; and Is a learnable function used to convert the convolution output and Mapped to the corresponding state transition matrix and input mapping matrix. These learnable functions are usually composed of multi-layer neural networks and learned through model training.
[0109] 2) Dynamic adjustment items are obtained through MLP calculation:
[0110]
[0111] Among them, MLP stands for multi-layer perceptron;
[0112] The calculation of dynamic adjustment terms is further expressed as:
[0113]
[0114] in, and It is a dynamic adjustment item that adaptively adjusts the state transfer matrix according to the current input, giving the model greater adaptability. and is through another learnable network (MLP), according to and Calculated.
[0115] 3) Update the state before and after:
[0116]
[0117] is the state transfer matrix of the current layer, is the input mapping matrix of the current layer, is the dynamic adjustment item of the current layer, u l is the control input of the current layer.
[0118] in, It is the previous state, It is the post-state.
[0119] Updating the forward state and reverse state is further expressed as:
[0120]
[0121] in, and The forward and reverse states of the previous moment are obtained by updating the state transfer matrix and input mapping matrix to obtain the new forward and reverse states. and where u l Represents the control input of the current layer. This control input is based on the output T of the current layer. l and the expected output d l The deviation between l The purpose of the calculation is to guide the model output to approach the desired target (i.e. e l minimum).
[0122] Adaptive state space updating adaptively updates the forward and reverse states by learning the state transition matrix and the input mapping matrix. This mechanism enables the model to adaptively adjust the state transition strategy based on the dynamic changes in the input data, thereby improving the model's performance when processing complex visual sequences.
[0123] Through this adaptive state-space update mechanism, the model can learn the optimal state transition pattern and effectively capture the inherent dynamics of the input sequence. Furthermore, the dynamic adjustment term allows the model to flexibly adjust the state transition strategy to adapt to different inputs, thereby improving the model's robustness and generalization capabilities.
[0124] 7. Adaptive Control Mechanism (ACM)
[0125] The internal parameters of the model are dynamically adjusted through the closed-loop feedback mechanism and adaptive control law. The specific steps are as follows:
[0126] 1) Calculation deviation:
[0127] e l =d l T l
[0128] 2) Update the control gain matrix:
[0129]
[0130] 3) Calculate control input:
[0131] u l =-K l e l +u d 、
[0132] Feedback and adaptive control further enhances model performance and enables adaptive adjustment by introducing a closed-loop feedback mechanism and adaptive control law. This mechanism enables the model to dynamically adjust internal parameters based on output errors, improving adaptability and enabling conscious output optimization, enabling active learning. Specifically, the steps for feedback and adaptive control are as follows:
[0133] Calculate the deviation e between the current layer output and the expected output l :
[0134] e l =d l -T l
[0135] Among them, d l is the expected output, T l is the output of the current layer. Deviation e l Reflects the difference between the actual output and the expected output.
[0136] Update the control gain matrix K according to the deviation l :
[0137]
[0138] Where α is the learning rate, is the error e l About the control gain matrix K l Through this gradient information, the model can learn how to adjust the control gain matrix to reduce the output error.
[0139] Calculate the control input u l , expressed as:
[0140] u l =-K l e l +u d
[0141] Among them, u d is the desired input. Control input u l is the updated control gain matrix K l and deviation e l Calculated, it reflects how the model should adjust the output to approach the desired target.
[0142] Control input u l Feedback into formula (22) and formula (23) to achieve closed-loop control: By controlling the input u l Feedback is fed back to the model, and the model can dynamically adjust internal parameters according to the output error to improve adaptability. At the same time, the expected input u d It also provides target information for the model, allowing it to consciously optimize output and achieve active learning.
[0143] Through this feedback and adaptive control mechanism, the model can dynamically adjust internal parameters based on output errors, improving its adaptability and consciously optimizing output, achieving active learning.
[0144] 8. State Fusion and Output Prediction
[0145] State fusion and output prediction are achieved by fusing forward states and reverse state To generate the output T of the current layer l This step not only fuses the information in two directions, but also dynamically controls the forward and reverse information through the SwiGLU gating function to balance the contextual information in two directions. Specifically, the steps of state fusion and output prediction are as follows: Calculate the forward output and reverse output
[0146]
[0147] in, and is the output mapping matrix, and is the bias vector. These matrices and vectors are learned through model training.
[0148] Use the SwiGLU gating function to fuse the forward and reverse outputs to generate the output T of the current layer l :
[0149]
[0150] in, and are the forward and reverse inputs of the current layer, and is the gating parameter for forward propagation, and is the gating parameter for backpropagation. In this way, the SwiGLU gating function can adaptively control the contribution of forward and backward information in the output, thereby balancing the contextual information in both directions.
[0151] Through this state fusion and output prediction mechanism, the Vision Conba model can effectively capture the temporal dependencies in forward and backward propagation, and dynamically adjust the contribution of information in both directions to generate more accurate and comprehensive outputs.
[0152] It should be noted that the purpose of disclosing the embodiments is to facilitate a further understanding of the present invention. However, those skilled in the art will appreciate that various substitutions and modifications are possible without departing from the scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the contents disclosed in the embodiments, and the scope of protection claimed by the present invention shall be subject to the scope defined in the claims.
Claims
1. An image classification method based on an adaptive control state space model, characterized in that: The steps include: S1) dividing the input image into image patches, converting the image patches into block labels, and processing them to form an initial label sequence; S2) designing a ViC encoder; using the ViC encoder to perform bidirectional processing on the initial block label sequence to capture long-range dependencies in the initial block label sequence, thereby obtaining an image block encoding sequence; The ViC encoder includes a selective bidirectional state model module, a dynamic state scaling module, a bidirectional convolution module, an adaptive control state space model, and an adaptive control mechanism module; The selective bidirectional state model in the ViC encoder includes: a forward selective state network and a backward selective state network; the forward selective state network is used to combine the forward state of the current network layer with the backward output of the previous network layer to generate a selective state vector containing relevant information; the backward selective state network is used to combine the backward state of the current network layer with the forward output of the next network layer to generate a selective state vector containing relevant information; through the selective bidirectional state model, the input tag sequence is first forward propagated to generate a forward coding sequence; then the forward coding sequence is backward propagated to generate a backward coding sequence; the forward coding sequence and the backward coding sequence are fused to generate the output of the current network layer, that is, the image block coding sequence of the current network layer; Adjusting the impact of different state dimensions on the output through a dynamic state scaling method, including: performing element-wise scaling on the selective state vector to generate a dynamic state scaling vector; and then performing element-wise multiplication of the dynamic state scaling vector with the selective state vector to generate an adjusted state vector; The bidirectional convolution method is used to capture local patterns in the encoding sequence; it includes: performing forward convolution on the adjusted state vector using a separable 1D convolution kernel to generate a forward convolution output; performing backward convolution on the adjusted state vector using a separable 1D convolution kernel to generate a backward convolution output; The state transition matrix and input mapping matrix are learned through the adaptive control state space model in the ViC encoder to adaptively update the previous state and the next state; Dynamically adjust the model's internal parameters through an adaptive control mechanism module; the adaptive control mechanism includes: calculating the deviation between the current layer output label sequence and the desired output label sequence; updating the control gain matrix based on the deviation; and calculating the control input to adjust the model output to minimize the deviation, thereby obtaining the final output label sequence; S3) The final output tag sequence is input into the head of the multi-layer perceptron for prediction to obtain the final image classification.
2. The image classification method based on the adaptive control state space model according to claim 1, characterized in that: Specifically, linear projection technology is used to map each image block to a high-dimensional space to obtain an image block embedding sequence.
3. The image classification method based on the adaptive control state space model according to claim 1, characterized in that: In step S2), the Vic encoder is a bidirectional sequence modeling module for bidirectionally propagating the input sequence; the definition of the first layer of the Vic encoder is expressed as: T l =Vic(T l-1 )+T l-1 Wherein, Vic represents the Vic encoder; Vic(T l-1 ) represents the forward propagation output result sequence of the lth layer, T l-1 Represents the result sequence of the 1-1 layer output.
4. The image classification method based on the adaptive control state space model according to claim 3, characterized in that: Specifically, the RMSNorm normalization technology is used to normalize the image sequence output by the Vic encoder and input it into the head of the multi-layer perceptron to obtain the final image prediction category result.
5. The image classification method based on the adaptive control state space model according to claim 3, characterized in that: In step S2), the selective state vector is specifically scaled element-wise using the Swish function to generate a dynamic state scaling vector.
6. The image classification method based on the adaptive control state space model according to claim 3, characterized in that: The selective bidirectional state network model is expressed as: Among them, the forward selective state network Responsible for the forward state of the current layer With the reverse output from the previous layer Combined to generate a vector containing relevant information Inverse Selective State Network Responsible for the reverse state of the current layer and the forward output from the next layer Combined to generate another vector containing relevant information 7. The image classification method based on the adaptive control state space model according to claim 6, characterized in that: Specifically, the dynamic state scaling vector is used to adjust the impact of different state dimensions on the output, which is expressed as: Dynamic state scaling by dynamic state scaling vector and Selective state vector and Perform element-wise scaling.
8. The image classification method based on the adaptive control state space model according to claim 7, characterized in that: The local patterns in the sequence are captured using a separable 1D convolution kernel, expressed as: Bidirectional convolution updates capture local patterns in sequences by using separable 1D convolution kernels; Bidirectional convolution updates calculate the forward convolution output separately and the deconvolution output Expressed as: in, and is a separable 1D convolution kernel, and is the dynamically scaled state vector.
9. The image classification method based on the adaptive control state space model according to claim 8, characterized in that: The adaptive control state space model includes: 1) Learn the state transition matrix and input mapping matrix, expressed as: in, and Is a learnable function used to convert the convolution output and Mapped to the corresponding state transition matrix and input mapping matrix; these learnable functions are composed of multi-layer neural networks and are learned through model training; 2) The dynamic adjustment term is obtained through MLP calculation and is expressed as: Among them, MLP stands for multi-layer perceptron; and It is a dynamic adjustment item, which is achieved through the learnable network MLP. and Calculated; 3) Update the state before and after, expressed as: Further expressed as: in, It is the previous state, It is the post-state; and is the forward and reverse state of the previous moment, and the new forward and reverse states are obtained through the updated state transfer matrix and input mapping matrix and u l Represents the control input of the current layer, which is based on the output T of the current layer l and the expected output d l The deviation between l Calculated.
10. The image classification method based on the adaptive control state space model according to claim 8, characterized in that: Specifically, the forward and backward information are dynamically controlled to balance the contextual information in both directions. State fusion and output prediction include the following steps: Calculate the forward output separately and reverse output Expressed as: in, and is the output mapping matrix, and is the bias vector; Use the SwiGLU gating function to fuse the forward and reverse outputs to generate the output T of the current layer l , expressed as: in, and are the forward and reverse inputs of the current layer, and is the gating parameter for forward propagation, and is the gating parameter for back propagation.
Citation Information
Patent Citations
Dual-mode image collaborative semantic segmentation method based on neural network architecture search
CN116563528A
Unsupervised interpretation method based on adaptive semantic features
CN118194961A