A method for constructing a reversible and self-explanatory semantic segmentation network based on a lightweight white-box Transformer

By constructing a reversible self-interpretable semantic segmentation network of lightweight white box Transformer, the EWTBlock module is designed using feature compression and sparse theory, combined with the Euler discretization method, the black box characteristics and high computing complexity of the deep learning model are solved, and efficient interpretable semantic segmentation on resource-constrained devices is achieved.

CN120451563BActive Publication Date: 2025-09-02DALIAN UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510935229.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-02
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

Existing deep learning models have problems with black box characteristics and high computing complexity, which are difficult to operate efficiently on resource-constrained edge devices and lack interpretability, resulting in limited application in practical scenarios where security-sensitive or task-complexity is required.

Method used

A reversible self-interpretable semantic segmentation network of lightweight white box Transformer is designed, and the EWTBlock module is constructed through feature compression and sparse theory. Combined with the Euler discretization method, the reversibility and interpretability of the model are realized, and the EWTBlock module and the EWTBlock-1 module are used as encoders and decoders for feature reconstruction.

Benefits of technology

It significantly reduces the number of model parameters and computational complexity, while improving the reliability and interpretability of the model, ensuring the transparent and logical consistency of the feature learning process, and is suitable for efficient semantic segmentation of resource-constrained devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451563B_ABST
    Figure CN120451563B_ABST
Patent Text Reader

Abstract

A method for constructing a reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer belongs to the field of artificial intelligence technology. First, a core objective function is derived using the theory of feature compression and sparsification. Secondly, the core objective function is inferred to obtain a forward lightweight white-box Transformer module, which includes a white-box attention structure and a sparse optimization process. Thirdly, the ordinary differential equation of the core objective function is solved using the Euler discretization method to obtain a reverse lightweight white-box Transformer module. Finally, the EWTBlock module and EWTBlock with the same dimension and number are used. ‑1 The modules serve as the encoder and decoder of a reversible, self-interpretable semantic segmentation network based on a lightweight white-box Transformer, outputting the semantic segmentation of the target. This invention addresses the problems of traditional network structures and modules lacking interpretability, as well as the large number of Transformer parameters and computational complexity, enabling globally interpretable modeling and lightweight network design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology and relates to a method for constructing a reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer. Background Art

[0002] In recent years, deep learning technology has achieved breakthroughs in fields such as computer vision and natural language processing. However, its purely data-driven, end-to-end learning model and high model complexity have gradually revealed two bottlenecks: first, the black-box nature of traditional deep learning models leads to doubts about the reliability of their decisions; second, the contradiction between the exponential growth of model size and the demand for computing resources has become increasingly prominent.

[0003] To overcome the above problems, interpretable learning and model lightweighting have gradually become hot topics in model improvement research. In terms of model interpretability research, self-interpretable network modeling aims to embed interpretable modules when building models, or use regularization technology to optimize the network in the direction of interpretability. However, current self-interpretable networks, such as the Chinese invention patent "Water Level Flow Relationship Support Influence Separation Method Based on Deep Learning Interpretability" (Chinese invention patent CN120011765A), the explanation dimensions generated by their networks are still limited to local feature subspaces or isolated network layers, making it difficult to build a complete semantic explanation chain, resulting in unreliable results. At the same time, in terms of model lightweighting, although the current mainstream model lightweighting technology (Chinese invention patent CN112819043A) can deeply compress the model, it is usually accompanied by a significant performance degradation, making it difficult to use in task scenarios that require a lower fault tolerance rate.

[0004] Therefore, designing lightweight and interpretable network modules and structures has become a key challenge in the current deployment of deep learning models. On the one hand, models need to run efficiently on resource-constrained edge devices, which requires low computational complexity and storage overhead. On the other hand, as deep models are widely used in security-sensitive or complex real-world scenarios, their interpretability and decision transparency are becoming increasingly important. Only by effectively reducing the number of model parameters while ensuring model reliability and inference speed can deep learning technology be truly applied in real-world scenarios. Summary of the Invention

[0005] In response to the problems existing in the existing technology, the present invention proposes a method for constructing a reversible and self-explanatory semantic segmentation network based on a lightweight white-box Transformer, which can solve the problems of the lack of interpretability of traditional network structures and modules, the large number of Transformer parameters, and the complex calculation.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for constructing a reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer, the construction method mainly includes two modules, namely a forward lightweight white-box Transformer module and an inverse lightweight white-box Transformer module. First, a core objective function is derived using feature compression and sparsification theory. Secondly, the core objective function is reasoned to obtain a forward lightweight white-box Transformer module, and the forward lightweight white-box Transformer module is defined as an EWTBlock module. The EWTBlock module includes two parts: a white-box attention structure and a sparse optimization process. Thirdly, since the EWTBlock module is reversible, the Euler discretization method is used to solve the ordinary differential equation of the core objective function to obtain an inverse lightweight white-box Transformer module, which is defined as EWTBlock -1 Finally, using EWTBlock modules and EWTBlock with multiple dimensions and corresponding numbers (the dimensions and numbers are the same) -1 Modules, respectively, as the encoder and decoder of the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer, and the last layer of the decoder EWTBlock -1 The output of the module is input into the multi-layer perceptron (MLP) layer and the MLP segmentation head, which then outputs the semantic segmentation result. This completes the construction of a reversible and self-explanatory semantic segmentation network based on the lightweight white-box Transformer. The specific construction process includes the following steps:

[0008] The first step is to obtain a core objective function based on the theory of feature compression and sparsification, specifically:

[0009] Step 1.1: Network information propagation is essentially a nonlinear transformation process of data distribution, which gradually transforms high-dimensional abstract feature representation into a more compact and compressed low-dimensional feature map. This concise compressed feature representation should meet the requirements of low dimensionality, piecewise continuity, sparsity, and reversibility. Therefore, in the neural network, a more compressed and concise feature representation is obtained by maximizing the information gain of the output features. The input image I is cropped into a feature set using a block cropping strategy. , and the feature set The coding rate implied in is estimated At the same time, the feature set Perform conditional constraint grouping and estimate the feature set after division Coding rate . Feature Set Medium coding rate And the feature set after partitioning Coding rate The difference between the two, as a specific manifestation of information gain in the neural network, is shown in formulas (1), (2), and (3):

[0010] (1);

[0011] (2);

[0012] (3);

[0013] in: is a feature set Estimation of the coding rate; It is a grouping of feature sets under conditional constraints. Estimation of the coding rate; It is a conditional constraint grouping; and is a constant; Represents the feature set Grouping in conditional constraints The number of different subsets obtained after for The constants contained therein satisfy ; is the logarithm of the matrix determinant; Represents the identity matrix.

[0014] Step 1.2: In order to achieve a more compact and concise feature representation, the feature set Random decomposition into labeled features , each marker feature Contains feature sets Rich local semantic information. Using subspace Marking features Perform nonlinear transformation to obtain each marker feature The subspace projection of is shown in formula (4):

[0015] (4);

[0016] in: Represents a marker feature In the subspace Projection features in ; Representation feature set Randomly decomposed into marker features The number and location information of Representation subspace The transpose of . The coding rate estimation is as shown in formula (5):

[0017] (5);

[0018] in: represents a constant; express An estimate of the coding rate.

[0019] Step 1.3, mark the features In the subspace Projection features in Aggregate and accumulate the coding rates to estimate the entire feature set Coding rate , as shown in formula (6):

[0020] (6);

[0021] in: Representation subspace The total number of; q represents the subspace Number and location information, ; Represents a marker feature.

[0022] because In the feature set Subspace of Therefore, the feature set The coding rate difference objective function It is expressed as shown in formula (7):

[0023] (7);

[0024] in: Representation feature set The coding rate difference objective function.

[0025] According to formula (7), by maximizing the feature set The coding rate difference objective function , to obtain a more compressed and simplified feature representation.

[0026] Step 1.4, maximize the feature set The coding rate difference objective function In the process, the feature set The sparsity of remains unchanged. Therefore, the feature set will be maximized The coding rate difference objective function Combined with the sparsity F1 norm into a core objective function , as shown in formula (8):

[0027] (8);

[0028] in: is a constant; Representation feature set In the core objective function Optimization expectations; It's F Norm, used to constrain the feature set The sparsity of .

[0029] For the optimization of the core objective function in formula (8), the local increment method and alternating optimization strategy are used to reduce the overall computational complexity of the core objective function. Specifically, the feature set is maximized first. The coding rate difference objective function , then use F Norm pair feature set Perform sparsification, optimize the core objective function in stages, compress and sparse the feature set .

[0030] The second step is to reason about the core objective function and design the EWTBlock module based on the reasoning process. The EWTBlock module mainly consists of two parts: the white-box attention structure and the sparse optimization process. Specifically:

[0031] Step 2.1, build the white-box attention structure.

[0032] First, the proximal gradient descent method is used to update the first term in the core objective function in formula (8): .calculate About Feature Sets The partial derivative of is shown in formula (9):

[0033] (9);

[0034] in: is the sign of the partial derivative; represents a constant; Indicates marking characteristics; Representation subspace The total number of; q represents the subspace Number and location information, ; Representation subspace The transpose of Represents the logarithm of the matrix determinant.

[0035] However, directly computing multiple subspaces The inverse matrix of is difficult and it is difficult to process large-scale data quickly. Therefore, the first-order Neumann series is used To approximate the inverse matrix term in formula (9), as shown in formula (10):

[0036] (10);

[0037] In order to better quantify each subspace Contribution to the final result, using the softmax function to calculate the label feature In its corresponding subspace The probability distribution of the projection feature in the approximate formula (10) At the same time, using the learning rate The gradient step updates the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer, as shown in formula (11):

[0038] (11);

[0039] Among them: sm is the softmax function; is the learning rate; is the sign of the partial derivative; represents a constant; A linear operator representing the first attention head in the white-box attention structure, with a total of q attention heads.

[0040] The white-box attention structure designed by formula (11) has strong interpretability while having fewer parameters and model computational complexity. In addition, this structure can effectively promote the full integration of semantic information, thereby forming a tighter semantic cluster structure and significantly improving the compactness of feature representation and intra-class aggregation capabilities.

[0041] Step 2.2, build the sparse optimization process.

[0042] Since the second term of the core objective function of formula (8) is a sparse optimization function It also involves calculating the inverse matrix. Therefore, an approximate method is still used to balance the relationship between sparsity and target diversity. Assuming a sparse subspace Is a marker feature Completely uncorrelated subspaces and sparse subspaces satisfy Therefore, the feature set Projection to sparse subspace In the example above, a sparser representation is achieved without changing the feature set. The inherent information of Approximate relations, sparse optimization functions Medium feature set Coding rate estimation The derivative of Item is minimized Approximate substitution, as shown in formula (12):

[0043] (12);

[0044] in: Indicates that the constraint Minimize operation under represents the F norm; is a sparse subspace; is a constant; Representation feature set In the core objective function Optimization expectations; Represented as a feature set Estimation of the coding rate; It's F norm.

[0045] Continue to use the learning rate The gradient steps are used to optimize Formula (12) to update the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer, as shown in Formula (13):

[0046] (13);

[0047] in: is a constant; is the activation function; is the sign of the partial derivative; is the learning rate; Represents a sparse subspace The transpose of . By deriving the above formulas (12)-(13), the sparse optimization process in the EWTBlock module is designed.

[0048] In step 2.3, in order to enhance the representation learning ability and convergence speed of the EWTBlock module when processing complex data, a multi-layer perceptron layer and residual connection are introduced after the sparse optimization process. The overall structure of the EWTBlock module is shown in formula (14):

[0049] (14);

[0050] in: It is the white box attention structure in the EWTBlock module; For the sparse optimization process in the EWTBlock module; is a sparse subspace; It is a multi-layer perceptron layer.

[0051] In summary, the EWTBlock module is characterized by high interpretability and low parameter count. Its derivation and construction process follows a traceable hierarchical logical chain, ensuring that the feature learning process of the reversible and self-interpretable semantic segmentation network of the lightweight white-box Transformer has complete transparent interpretability and logical consistency.

[0052] The third step is to use the Euler discretization method to solve the core objective function. Ordinary differential equation, get EWTBlock -1 Module. EWTBlock -1 The module significantly improves segmentation accuracy and reliability by reconstructing deeply compressed feature details, as follows:

[0053] Step 3.1, in order to derive the reverse structure of the EWTBlock module to obtain EWTBlock -1 Module, for the core objective function in formula (8) The expression uses a short time interval We can reason about the ordinary differential equation on , as shown in formula (15):

[0054] (15);

[0055] in: represents the time variable; and Represents time variables The lower and upper bounds of ; represents the decoder input feature set; represents a subspace; represents the integration operation; represents the core objective function.

[0056] Step 3.2, the continuous time evolution process in formula (15) is transformed into a discrete time update iterative form with a step size of (0, 1 / 2, 1). The Euler equation is discretized and approximated as , the gradient term Discretized Instead. At the same time, The learning factor whose terms are discretized Instead, we get the approximate iterative function, as shown in formula (16):

[0057] (16);

[0058] in: is the inverse process subspace, For EWTBlock -1 White-box attention structure in the module; It is a multi-layer perception machine layer; is the learning rate; The step size after the discrete time is Decoder input feature set The representation of The decoder input feature set with a step size of 1 after discrete time Representation of .

[0059] The fourth step is to use EWTBlock modules with the same dimensions and quantity, EWTBlock -1 The modules serve as the encoder and decoder of the reversible and self-interpretable semantic segmentation network of the lightweight white-box Transformer, outputting the semantic segmentation of the target. The specific construction process includes the following steps:

[0060] Step 4.1: Use the multi-dimensional and multi-layer EWTBlock module to build the encoder of the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer, with the input as the feature set T and the output as the decoder input feature set .

[0061] Step 4.2, use EWTBlock with the same dimensions and number of layers as the EWTBlock module -1 Module, builds a decoder for the reversible self-explanatory semantic segmentation network of the lightweight white-box Transformer. The input is the decoder input feature set .

[0062] Step 4.3, EWTBlock -1 The decoder output of the reversible self-explanatory semantic segmentation network of the lightweight white-box Transformer built by the module is input into the multi-layer perceptron MLP layer and MLP segmentation head to obtain the final semantic segmentation result.

[0063] In summary, in the encoder, the EWTBlock module mines multi-scale, highly compressed sparse feature representations. In the decoder, the EWTBlock -1 The module performs inverse calculations and feature reconstruction to accurately restore the original feature details, forming a global approximate inverse mapping relationship, ensuring the logical transparency of the entire feature transfer process.

[0064] The beneficial effects of the present invention are:

[0065] (1) The core objective function designed by the present invention is based on the theoretical ideas of feature compression and sparsification. The core objective function is established by changing the coding rate of the feature set T and sparsifying the feature set T. The core objective function is combined with the local incremental method and the alternating optimization strategy to reduce the overall computational complexity of the core objective function, laying the foundation for the subsequent construction of lightweight and interpretable forward lightweight white-box Transformer modules and reverse lightweight white-box Transformer modules.

[0066] (2) The present invention uses the EWTBlock module to perform deep compression and sparseness on the feature set T, and then uses the EWTBlock -1 The module reconstructs deeply compressed detail information, which can significantly reduce the number of parameters and computational complexity of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer while enhancing its reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 This is a flowchart of the reversible and self-explanatory semantic segmentation network structure of a lightweight white-box Transformer.

[0068] Figure 2 Schematic diagram of the white-box self-attention structure.

[0069] Figure 3 Schematic diagram of the sparse optimization process structure.

[0070] Figure 4 It is a forward lightweight white-box Transformer module;

[0071] Figure 5 It is a reverse lightweight white-box Transformer module.

[0072] Figure 6 The evolution process of the SAR oil spill image of sample 1 to the ground truth label and then to the reversible self-interpretable semantic segmentation network prediction result of the lightweight white box Transformer;

[0073] Figure 7 The evolution of the SAR oil spill image of sample 2 to the ground truth label and then to the reversible self-interpretable semantic segmentation network prediction result of the lightweight white-box Transformer;

[0074] Figure 8 The evolution of the SAR oil spill image of sample 3 to the ground truth label and then to the reversible self-interpretable semantic segmentation network prediction result of the lightweight white-box Transformer;

[0075] Figure 9The evolution process of the SAR oil spill image of sample 4 to the true value label and then to the reversible self-interpretable semantic segmentation network prediction result of the lightweight white-box Transformer. DETAILED DESCRIPTION

[0076] To make the problems solved by the present invention, the method solutions adopted, and the effects achieved by the methods more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all of the present invention.

[0077] like Figure 1 As shown, the example of the present invention provides a lightweight white box Transformer reversible self-explanatory semantic segmentation network including:

[0078] The first step is to build a compilation environment of python 3.8, pytorch 1.11.1 and cuda 12.1 under Windows 11 system and run it using NVIDIA-GeForce-RTX-3070 GPU. The input is 4193 The training set consists of 3354 images and the test set consists of 839 images.

[0079] Use block cropping strategy to crop the input image I into the feature set , and the feature set The coding rate implied in is estimated At the same time, the feature set Perform conditional constraint grouping and estimate the feature set after division Coding rate . Feature Set Medium coding rate And the feature set after partitioning Coding rate The difference between the two, as a specific manifestation of information gain in the neural network, is shown in formulas (1), (2), and (3):

[0080] (1);

[0081] (2);

[0082] (3);

[0083] in: is a feature set Estimation of the coding rate; It is a grouping of feature sets under conditional constraints. Estimation of the coding rate; It is a conditional constraint grouping; ; Represents the feature set Grouping in conditional constraints The number of different subsets obtained after ; for The constants contained therein satisfy ; is the logarithm of the matrix determinant; Represents the identity matrix.

[0084] The feature set Random decomposition into labeled features , using subspace Marking features Perform nonlinear transformation to obtain each marker feature Subspace projection of , as shown in formula (4):

[0085] (4);

[0086] in: Represents a marker feature In the subspace Projection features in ; Representation feature set Randomly decomposed into marker features The number and location information of Representation subspace The transpose of . The coding rate estimation is as shown in formula (5):

[0087] (5);

[0088] in: ; express An estimate of the coding rate.

[0089] Mark features In the subspace Projection features in Aggregate and accumulate the coding rates to estimate the entire feature set Coding rate , as shown in formula (6):

[0090] (6);

[0091] in: ; Representation subspace The total number of ; q represents the subspace Number and location information, ; Indicates a marking feature. In the feature set Subspace of Therefore, the feature set The coding rate difference objective function It is expressed as shown in formula (7):

[0092] (7);

[0093] in: Representation feature set The coding rate difference objective function is obtained by maximizing the feature set The coding rate difference objective function , to obtain a more compressed and simplified feature representation. And use the F1 norm to sparse the compressed feature set T, which will maximize the feature set The coding rate difference objective function Combined with the sparsity F1 norm into a core objective function , as shown in formula (8):

[0094] (8);

[0095] in: ; Representation feature set In the core objective function Optimization expectations; It's F Norm, used to constrain the feature set The sparsity of .

[0096] For the optimization of the core objective function in formula (8), the local increment method and alternating optimization strategy are used to reduce the overall computational complexity of the core objective function. Specifically, the feature set is maximized first. The coding rate difference objective function , then use F Norm pair feature set The sparsification process consists of two steps: optimizing the core objective function in stages and compressing and sparsening the feature set. .

[0097] The second step is to reason about the core objective function and design the EWTBlock module based on the reasoning process. The EWTBlock module mainly consists of two parts: the white box attention structure and the sparse optimization process. The proximal gradient descent method is used to update the first term in the core objective function in formula (8) .calculate About Feature Sets The partial derivative of is shown in formula (9):

[0098] (9);

[0099] in: is the sign of the partial derivative; ; Indicates marking characteristics; Representation subspace The total number of ; q represents the subspace Number and location information, ; Representation subspace The transpose of Represents the logarithm of the matrix determinant. Using the first-order Neumann series To approximate the inverse matrix term in formula (9), as shown in formula (10):

[0100] (10);

[0101] Then use the softmax function to calculate the label features In its corresponding subspace The probability distribution of the projection feature in the approximate formula (10) Item, at the same time, using the learning rate The gradient step updates the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer, as shown in formula (11):

[0102] (11);

[0103] Among them: sm is the softmax function; ; is the sign of the partial derivative; ; represents the linear operator of the first attention head in the white-box attention structure, with a total of q attention heads. According to formula (11), we get Figure 2 The white-box attention structure in the EWTBlock module shown.

[0104] The second sparse optimization function of the core objective function of formula (8) This also involves calculating the inverse matrix. Therefore, the feature set Projection to sparse subspace To achieve a more sparse representation, use Approximate relations, sparse optimization functions Medium feature set Coding rate estimation The derivative of Item is minimized Approximate substitution, as shown in formula (12):

[0105] (12);

[0106] in: Indicates that the constraint Minimize operation under represents the F norm; is a sparse subspace; ; Representation feature set In the core objective function Optimization expectations; Represented as a feature set Estimation of the coding rate; It's F Norm. And the learning rate is The gradient steps are used to optimize Formula (12) to update the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer, as shown in Formula (13):

[0107] (13);

[0108] in: ; is the activation function; is the sign of the partial derivative; is the learning rate; Represents a sparse subspace The transpose of . By deducing from the above formulas (12)-(13), we can get Figure 3 The sparse optimization process in the EWTBlock module is shown.

[0109] Combine Figure 2 White-box attention structure and Figure 3 After the sparse optimization process, a multi-layer perceptron layer and residual connection are introduced. Figure 4 The overall structure of the EWTBlock module is shown in formula (14):

[0110] (14);

[0111] in: It is the white box attention structure in the EWTBlock module; For the sparse optimization process in the EWTBlock module; is a sparse subspace; It is a multi-layer perceptron layer.

[0112] Step 3: Derivation of EWTBlock -1 Modular structure. Using short time intervals The core objective function of formula (8) We can reason about the ordinary differential equation on , as shown in formula (15):

[0113] (15);

[0114] in: represents the time variable; and Represents time variables The lower and upper bounds of ; represents the decoder input feature set; represents a subspace; represents the integration operation; represents the core objective function.

[0115] The continuous time evolution process in formula (15) can be transformed into a discrete time update iterative form with a step size of (0, 1 / 2, 1). The Euler equation is discretized and approximated as , the gradient term Discretized Instead. At the same time, The learning factor whose terms are discretized Instead, we get the approximate iterative function, as shown in formula (16):

[0116] (16);

[0117] in: is the inverse process subspace, For EWTBlock -1 White-box attention structure in the module; It is a multi-layer perception machine layer; ; The step size after the discrete time is Decoder input feature set The representation of The decoder input feature set with a step size of 1 after discrete time Representation of EWTBlock. -1 Modules such as Figure 5 shown.

[0118] The fourth step is to use the EWTBlock module with a dimension of 4 and a number of 6 in each dimension to build the encoder of the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer, with the input as the feature set T and the output as the decoder input feature set . And use EWTBlock with dimension 4 and number of each dimension is 6 -1 Module, builds a decoder for the reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer, and the input is the decoder input feature set . The last layer EWTBlock of the last dimension of the decoder of the reversible self-interpretable semantic segmentation network of the lightweight white box Transformer -1 The module output result is input into the multi-layer perceptron layer and the MLP segmentation head to obtain the semantic segmentation result of the SAR oil spill image.

[0119] from Figure 6 It can be seen from the figure that the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer has fewer missed detections when facing small oil spill areas. Figure 7 It can be seen from the figure that the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer has a relatively complete segmentation result when facing a long strip of oil spill area. Figure 8 It can be seen from the figure that the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer has fewer misjudgments in the segmentation results when facing large oil spill areas. Figure 9 It can be seen from the figure that the reversible self-explanatory semantic segmentation network of the lightweight white-box Transformer has clearer boundaries when facing fragmented oil spill areas, and can also effectively identify oil spill areas with poor imaging conditions.

[0120] The above-described embodiments merely express the implementation methods of the present invention, but should not be understood as limiting the scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, which all fall within the scope of protection of the present invention.

Claims

1. A method for constructing a reversible self-explanatory semantic segmentation network based on a lightweight white-box Transformer, characterized by: The construction method is specifically as follows: The first step is to derive a core objective function using feature compression and sparsification theory; In the second step, the core objective function is inferred to obtain a forward lightweight white-box Transformer module, which is defined as an EWTBlock module. The EWTBlock module consists of two parts: a white-box attention structure and a sparse optimization process. The third step is that the EWTBlock module is reversible and the ordinary differential equation of the core objective function is solved by using the Euler discretization method to obtain the inverse lightweight white box Transformer module, which is defined as EWTBlock -1 Module, EWTBlock -1 The module reconstructs the feature details of the deep compression; The fourth step is to use EWTBlock modules with the same dimensions and quantity, EWTBlock -1 The modules serve as the encoder and decoder of the reversible and self-interpretable semantic segmentation network of the lightweight white-box Transformer, outputting the semantic segmentation of the target and completing the construction of the reversible and self-interpretable semantic segmentation network of the lightweight white-box Transformer; The first step is specifically: Step 1.1: Use block cropping strategy to crop the input image I into feature set , and the feature set The coding rate implied in is estimated ; At the same time, the feature set Perform conditional constraint grouping and estimate the feature set after division Coding rate ; Feature set Medium coding rate And the feature set after partitioning Coding rate The difference between the two, as a specific manifestation of information gain in the neural network, is shown in formulas (1), (2), and (3): (1); (2); (3); in: is a feature set Estimation of the coding rate; It is a grouping of feature sets under conditional constraints. Estimation of the coding rate; It is a conditional constraint grouping; and is a constant; Represents the feature set Grouping in conditional constraints The number of different subsets obtained after for The constants contained therein satisfy ; is the logarithm of the matrix determinant; represents the identity matrix; Step 1.2, Feature Set Random decomposition into labeled features , each marker feature Contains feature sets Rich local semantic information; using subspace Marking features Perform nonlinear transformation to obtain each marker feature The subspace projection of is shown in formula (4): (4); in: Represents a marker feature In the subspace Projection features in ; Representation feature set Randomly decomposed into marker features The number and location information of Representation subspace The transpose of The coding rate estimation is as shown in formula (5): (5); in: represents a constant; express Estimation of the coding rate; Step 1.3, mark the features In the subspace Projection features in Aggregate and accumulate the coding rates to estimate the entire feature set Coding rate , as shown in formula (6): (6); in: Representation subspace The total number of; q represents the subspace Number and location information, ; Indicates marking characteristics; because In the feature set Subspace of Therefore, the feature set The coding rate difference objective function It is expressed as shown in formula (7): (7); in: Representation feature set The coding rate difference objective function; According to formula (7), by maximizing the feature set The coding rate difference objective function , to obtain a more compressed and simplified feature representation; Step 1.4, maximize the feature set The coding rate difference objective function In the process, the feature set The sparsity of remains unchanged; the feature set will be maximized The coding rate difference objective function Combined with the sparsity F1 norm into a core objective function , as shown in formula (8): (8); in: is a constant; Representation feature set In the core objective function Optimization expectations; It's F Norm, used to constrain the feature set The sparsity of .

2. The method for constructing a reversible self-explanatory semantic segmentation network based on a lightweight white-box Transformer according to claim 1 is characterized in that: The local incremental method and alternating optimization strategy are used to optimize the core objective function in formula (8); specifically, the feature set is first maximized. The coding rate difference objective function , then use F Norm pair feature set Perform sparsification, optimize the core objective function in stages, compress and sparse the feature set .

3. The method for constructing a reversible self-explanatory semantic segmentation network based on a lightweight white-box Transformer according to claim 1 is characterized in that: The second step is specifically as follows: Step 2.1, build the white box attention structure; First, the proximal gradient descent method is used to update the first term in the core objective function in formula (8) ;calculate About Feature Sets The partial derivative of is shown in formula (9): (9); in: is the sign of the partial derivative; represents a constant; Indicates marking characteristics; Representation subspace The total number of; q represents the subspace Number and location information, ; Representation subspace The transpose of represents the logarithm of the matrix determinant; Then, using the first-order Neumann series To approximate the inverse matrix term in formula (9), as shown in formula (10): (10); Calculate the label features using the softmax function In its corresponding subspace The probability distribution of the projection feature in the approximate formula (10) Item, at the same time, using the learning rate The gradient step updates the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white-box Transformer, as shown in formula (11): (11); Among them: sm is the softmax function; is the learning rate; is the sign of the partial derivative; represents a constant; A linear operator representing the first attention head in the white-box attention structure, with a total of q attention heads; Step 2.2, build the sparse optimization process; Assume a sparse subspace Is a marker feature Completely uncorrelated subspaces and sparse subspaces satisfy The condition of Projection to sparse subspace In the example above, a sparser representation is achieved without changing the feature set. The inherent information of Approximate relations, sparse optimization functions Medium feature set Coding rate estimation The derivative of Item is minimized Approximate substitution, as shown in formula (12): (12); in: Indicates that the constraint Minimize operation under represents the F norm; is a sparse subspace; is a constant; Representation feature set In the core objective function Optimization expectations; Represented as a feature set Estimation of the coding rate; It's F norm; Continue to use the learning rate The gradient steps are used to optimize formula (12) and update the overall parameters of the reversible self-interpretable semantic segmentation network of the lightweight white box Transformer, as shown in formula (13): (13); in: is a constant; is the activation function; is the sign of the partial derivative; is the learning rate; Represents a sparse subspace The transpose of ; Through the derivation of the above formulas (12)-(13), the sparse optimization process in the EWTBlock module is designed; In step 2.3, after the sparse optimization process, a multi-layer perceptron layer and residual connections are introduced; the overall structure of the EWTBlock module is shown in formula (14): (14); in: It is the white box attention structure in the EWTBlock module; For the sparse optimization process in the EWTBlock module; is a sparse subspace; It is a multi-layer perceptron layer.

4. The method for constructing a reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer according to claim 3 is characterized in that: The third step is specifically as follows: Step 3.1, in order to derive the reverse structure of the EWTBlock module to obtain EWTBlock -1 Module, for the core objective function in formula (8) The expression uses a short time interval We can reason about the ordinary differential equation on , as shown in formula (15): (15); in: represents the time variable; and Represents time variables The lower and upper bounds of ; represents the decoder input feature set; represents a subspace; represents the integration operation; represents the core objective function; Step 3.2, the continuous time evolution process in formula (15) is transformed into discrete time update iterative form; the continuous derivative The Euler equation is discretized and approximated as , the gradient term Discretized Instead; at the same time, The learning factor whose terms are discretized Instead, we get the approximate iterative function, as shown in formula (16): (16); in: is the inverse process subspace, For EWTBlock -1 White-box attention structure in the module; It is a multi-layer perception machine layer; is the learning rate; The step size after the discrete time is Decoder input feature set The representation of The decoder input feature set with a step size of 1 after discrete time Representation of .

5. The method for constructing a reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer according to claim 4 is characterized in that: The fourth step is specifically as follows: Step 4.1: Use the multi-dimensional and multi-layer EWTBlock module to build the encoder of the reversible self-explanatory semantic segmentation network of the lightweight white box Transformer, with the input as the feature set T and the output as the decoder input feature set ; Step 4.2, use EWTBlock with the same dimensions and number of layers as the EWTBlock module -1 Module, builds a decoder for the reversible self-explanatory semantic segmentation network of a lightweight white-box Transformer; the input is the decoder input feature set ; Step 4.3, EWTBlock -1 The decoder output of the reversible self-explanatory semantic segmentation network of the lightweight white-box Transformer built by the module is input into the multi-layer perceptron MLP layer and MLP segmentation head to obtain the final semantic segmentation result.

Citation Information

Patent Citations

  • Deep learning lightweight pulmonary nodule classification method based on ARM

    CN112819043A

  • Deep learning interpretability-based water level flow relation jacking influence separation method

    CN120011765A

  • Training method and device of translation model, text processing method and device and storage medium

    CN110598224A

  • Small target detection method based on smooth interactive compression network

    CN116721314A