A cross-branch knowledge distillation method based on shallow feature guidance
Patent Information
- Application Number
- CN202610786420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]但上述方案主要依赖深层语义特征进行分支间知识传递,由于不同分支在联合训练过程中存在特征表达差异,深层特征在训练过程中容易出现响应偏移,进而影响教师信号的一致性,现有部分特征蒸馏方法虽然引入了中间层特征对齐机制,但相关方案大多面向固定教师与学生结构,对于在线多分支场景下的跨分支结构约束考虑较少,多分支协同训练过程中的知识传递稳定性仍有提升空间
本发明通过建立跨分支结构关联关系,并利用结构响应连续性对动态教师模型中的语义传播过程进行协同控制,使动态教师在多学生分支共同参与训练的过程中形成连续演化的语义更新机制,相较于现有技术中各学生分支独立接收教师监督或依赖固定蒸馏路径的方式,本发明能够在结构响应持续变化的训练过程中维持不同学生分支之间的结构语义对应关系,避免局部异常语义在跨轮次训练中的持续扩散,使动态教师的语义演化过程更加符合实际结构变化规律;同时,本发明通过结构响应区域与深层语义区域之间的空间映射关系,对动态教师中的语义更新范围进行限定,使语义传播过程能够围绕具有结构连续性的关联区域逐步展开,在复杂结构区域分布不均、局部响应变化频繁或者不同学生分支学习节奏存在差异的工程训练场景下,本方案能够减少无关区域语义扰动对蒸馏过程的影响,使不同学生分支在连续训练过程中保持较稳定的语义传递方向,避免传统动态蒸馏过程中容易出现的教师语义震荡以及跨分支语义偏移累积问题。
Smart Images

Figure CN122596178A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning model training technology, and more specifically to a cross-branch knowledge distillation method based on shallow feature guidance. Background Technology
[0002] Knowledge distillation technology can reduce model complexity while maintaining model accuracy, and has been widely used in lightweight model training for visual tasks such as image classification and object detection. Compared with traditional offline distillation methods that rely on pre-trained teacher models, online knowledge distillation dynamically generates teacher signals through multi-branch joint training, without the need to train independent teacher models. Therefore, it has received much attention in the field of model compression. Existing online knowledge distillation methods usually adopt a multi-branch network structure and use the deep features or output results of each branch to construct an ensemble teacher. For example, ONE (On-the-fly NativeEnsemble) and other schemes achieve online distillation by fusing the outputs of multiple branches, which improves model performance to a certain extent.
[0003] However, the above schemes mainly rely on deep semantic features for knowledge transfer between branches. Since different branches have different feature representations during joint training, deep features are prone to response shifts during training, which in turn affects the consistency of teacher signals. Although some existing feature distillation methods have introduced intermediate layer feature alignment mechanisms, most of the relevant schemes are geared towards fixed teacher and student structures and do not consider cross-branch structural constraints in online multi-branch scenarios. There is still room for improvement in the stability of knowledge transfer during multi-branch collaborative training. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention discloses a cross-branch knowledge distillation method based on shallow feature guidance, which aims to enable the dynamic teacher model to form a continuous semantic evolution relationship during multi-student branch collaborative training, and maintain the consistency of structural response among different student branches.
[0005] To achieve the above-mentioned technical effects, the present invention adopts the following technical solution: A cross-branch knowledge distillation method based on shallow feature guidance includes the following steps: S1. Construct a joint training network that includes a shared feature extraction layer and multiple parallel student branches, extract features from the input samples, and obtain the shallow structural response information and deep semantic response information corresponding to each student branch. S2. Based on the shallow structural response information of each student branch, establish cross-branch structural association to obtain association constraint information that characterizes the structural consistency between different student branches. The association constraint information is used to reflect the degree of consistency of each student branch in local spatial structural response. Specifically, perform spatial position alignment processing on the shallow structural response information output by each student branch to obtain the corresponding structural response distribution map. Based on the response distribution relationship at different spatial locations in the response distribution diagrams of each structure, establish the spatial structural correspondence between each student branch; Based on the spatial structure correspondence, a cross-branch structural correlation matrix is generated to characterize the degree of consistency of the local structure of different student branches; where the first... The student branch and the first Location correlation coefficient between student branches Represented as: in, Indicates the first The student branch in Local structural response vectors corresponding to each spatial location; Indicates the first The student branch in Local structural response vectors corresponding to each spatial location; This indicates the number of spatial locations in the structural response distribution diagram; S3. Adjust the contribution of the deep semantic response information corresponding to each student branch according to the association constraint information, control the semantic response intensity of each student branch participating in the construction of the dynamic teacher, and generate a dynamic teacher model based on the adjusted deep semantic response information; specifically, determine the associated semantic region in the deep semantic response information corresponding to each student branch according to the structural correspondence between each spatial structural region. The associated semantic regions corresponding to each student branch are sequentially updated according to the continuity of the structural correspondence between the associated semantic regions; After completing the semantic update of the associated semantic region corresponding to the current student branch, the updated deep semantic response information is written into the dynamic teacher model, and the associated semantic region corresponding to the next student branch is semantically updated based on the updated dynamic teacher model. For deep semantic response regions where no structural correspondence has been established, their original semantic response state is maintained and they do not participate in the dynamic teacher model update process; The sequential semantic update is performed in ascending order of the change in the position of the structural response center corresponding to each associated semantic region. S4. The dynamic teacher model is used to perform collaborative knowledge distillation training on each student branch, and the training process of each student branch is jointly constrained based on the cross-branch structural association, so that each student branch can complete deep semantic knowledge transfer while maintaining structural response consistency. S5. After training is complete, retain any student branch as the target inference model for deployment.
[0006] Furthermore, the collaborative semantic update control of the deep semantic response information corresponding to each student branch based on structural response continuity includes: After each student branch completes the semantic distillation update for the current training round, the regional semantic offset of the corresponding associated semantic region for each student branch is calculated; where, the first... Region semantic offset corresponding to each student branch Represented as: in, This indicates the number of associated semantic regions corresponding to the current student branch; Indicates the first The student branch in the current training round The semantic center vector of each associated semantic region; Indicates the first The student branch in the previous training round The semantic center vector of each associated semantic region; In the current training round, the cross-round semantic offset state quantities corresponding to each student branch are arranged in ascending order, and the dynamic teacher model update of the corresponding student branch is executed in the order of arrangement. When the cross-round semantic offset state quantity corresponding to the target student branch is greater than the average cross-round semantic offset state quantity corresponding to the other student branches, the semantic center vector of the region corresponding to the target student branch in the previous training round is kept to participate in the collaborative semantic update control of the current training round. After the other student branches complete the dynamic teacher model update for the current training round, the semantic center vector of the current training round region corresponding to the target student branch is written into the dynamic teacher model.
[0007] Based on the above technical solution, the positive and beneficial effects of the present invention are as follows: This invention establishes cross-branch structural relationships and utilizes structural response continuity to collaboratively control the semantic propagation process in a dynamic teacher model. This enables the dynamic teacher to form a continuously evolving semantic update mechanism during training involving multiple student branches. Compared to existing technologies where each student branch independently receives teacher supervision or relies on a fixed distillation path, this invention maintains the structural semantic correspondence between different student branches during training with continuously changing structural responses. This avoids the continuous spread of local anomalous semantics across training rounds, making the semantic evolution process of the dynamic teacher more consistent with actual structural change patterns. Simultaneously, this invention limits the semantic update range in the dynamic teacher through the spatial mapping relationship between the structural response region and the deep semantic region. This allows the semantic propagation process to unfold gradually around structurally continuous associated regions. In engineering training scenarios with uneven distribution of complex structural regions, frequent changes in local responses, or differences in the learning pace of different student branches, this solution reduces the impact of semantic disturbances in irrelevant regions on the distillation process. This ensures that different student branches maintain a relatively stable semantic transmission direction during continuous training, avoiding teacher semantic oscillations and the accumulation of cross-branch semantic offsets that are prone to occur in traditional dynamic distillation processes.
[0008] Furthermore, this invention introduces cross-round semantic states to participate in collaborative semantic update control during the continuous evolution of the dynamic teacher, and coordinates the dynamic teacher update order by combining the semantic offset state quantities corresponding to different student branches, so that a collaborative distillation relationship with stage consistency is formed among multiple student branches. This method can achieve continuous semantic collaborative update among multiple student branches without relying on additional independent teacher network training, so that the entire knowledge distillation process can still maintain relatively stable structural response consistency and deep semantic transfer continuity in complex training scenarios, and is more suitable for the engineering deployment and continuous training scenarios of multi-branch neural networks. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a schematic diagram of the control principle of the present invention; Figure 2 This is a block diagram of the control structure of the present invention; Figure 3 This is a schematic diagram illustrating the structural response generation and cross-branch spatial structure association of the present invention; Figure 4 This is a schematic diagram of the associated semantic region mapping process of the present invention; Figure 5 This is a schematic diagram illustrating the sequential update of the dynamic teacher model of the present invention; Figure 6 This is a schematic diagram of the staged distillation process of the present invention; Figure 7 This is a schematic diagram illustrating the semantic distribution evolution of the dynamic teacher model of the present invention in consecutive training rounds; Figure 8 This is a graph showing the change in classification accuracy during the training process of this invention. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0011] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0012] This invention relates to a specific application environment architecture or hardware architecture that supports a cross-branch knowledge distillation method guided by shallow features. First, the specific application environment architecture or hardware architecture of this invention is described. In specific implementation, the cross-branch online knowledge distillation process of this invention can run on a deep learning training platform with heterogeneous parallel training capabilities. The training platform includes a model training server, parameter synchronization nodes, a video memory cache unit, and a multi-GPU training cluster. Each GPU training node deploys a corresponding student branch network, and a dynamic teacher model is deployed on the parameter synchronization node to receive the structural response information and deep semantic response information output by each student branch in the current training round, and to perform cross-round dynamic semantic updates. In some more specific scenarios, each student branch can adopt neural network models with different network depths, different feature extraction scales, or different structural configurations to form diverse semantic learning paths. Correspondingly, the dynamic teacher model is not a fixed parameter model, but is continuously updated based on the continuous state of the structural responses of multiple student branches during training. The relevant neural network training principles, parameter backpropagation mechanisms, and gradient update methods have been detailed in existing technologies and will not be repeated here.
[0013] It should be noted that while existing online knowledge distillation schemes can dynamically supervise student networks using teacher models during training, most schemes still rely on global feature synchronization or fixed distillation paths as the main constraints. This assumes that different student branches have a consistent semantic evolution trend in the same training phase. However, in multi-branch parallel training, the response positions, response intensities, and deep semantic aggregation directions of different student branches to local structural regions are usually inconsistent. Especially in training scenarios where complex structural regions are constantly changing or local features are frequently perturbed, the dynamic teacher model is easily influenced by local abnormal responses, causing some offset semantics to continue to propagate across training rounds. This leads to problems such as unstable teacher semantic evolution paths, unbalanced training rhythms among multiple student branches, and accumulated semantic response drift in local structural regions. Existing technologies usually alleviate these problems by enhancing global feature consistency or increasing distillation supervision intensity, but these methods do not truly establish a continuous correlation between the structural response change process and the semantic propagation process, making it difficult to stably control the semantic propagation path in the dynamic teacher model.
[0014] Based on this, the present invention establishes a correspondence between structural response regions among student branches and coordinates the deep semantic update process in the dynamic teacher model based on the continuity of structural response. That is, during the continuous participation of the dynamic teacher model in multi-branch training, not all semantic response information participates in teacher updates synchronously. Instead, based on the continuous change state of the structural response region in the cross-round training process, the semantic propagation order, semantic participation range, and dynamic teacher update rhythm of the regions corresponding to different student branches are coordinated, so that the semantic evolution process in the dynamic teacher model is consistent with the structural response change process. Furthermore, the present invention restricts the semantic propagation path in the dynamic teacher model by using cross-round semantic states and cross-branch semantic offset state quantities, making it difficult for abnormal semantic changes generated in local structural regions to spread continuously in subsequent training processes, thereby forming a continuous structural semantic evolution relationship in the multi-student branch collaborative training process.
[0015] Compared to existing online knowledge distillation methods that rely on global feature synchronization, this invention places greater emphasis on controlling the semantic propagation order during structural response changes, enabling the dynamic teacher model to maintain a semantic update trend corresponding to the continuous state of the structural response during its continuous evolution. Accordingly, multiple student branches no longer learn independently solely through a unified distillation objective, but instead form cross-branch collaborative semantic feedback relationships with the participation of the dynamic teacher model. Through this approach, even in situations where complex structural regions are unevenly distributed, local responses are continuously changing, or training rhythms differ among student branches, the consistency of structural responses among different student branches can still be maintained. Furthermore, the risk of cumulative propagation of local anomalous semantics across training rounds can be reduced, thereby improving training stability and continuous semantic transfer capabilities in the multi-branch online knowledge distillation process.
[0016] It should be noted that the structural response information in this invention is not only used to describe the local activation results of the neural network in the current training round, but also to characterize the response evolution state of different student branches to the target structural region during continuous training. In specific implementation, after the input sample is extracted by deep features, each student branch will form a structural response region with spatial distribution relationship in the corresponding feature layer. Correspondingly, the deep semantic response information characterizes the semantic aggregation state of the structural response region in the high-dimensional feature space. Since the deep semantic response usually depends on the continuous activation process of the local structural region, when the structural response region undergoes spatial migration, response diffusion, or region contraction during continuous training, its corresponding semantic aggregation center will also change. Based on this, this invention uses the structural response change process as the basis for semantic propagation constraints in the dynamic teacher model, so that the semantic update path in the dynamic teacher maintains a corresponding relationship with the structural response change trend.
[0017] Furthermore, in the parallel training process of multiple student branches, the response rhythm of different student branches to the same target structure is usually not consistent. Due to differences in network depth, feature scale, or parameter update status, some student branches may first form high-intensity semantic aggregation in local regions, while the corresponding regions of other student branches are still in a low-response state. In the existing technology, dynamic teacher models usually directly aggregate the feature information of each student branch in the current round to perform unified supervision. Although this method can enhance the overall distillation intensity, it is easy to cause local abnormal responses to form continuous semantic amplification in the teacher model, and further affect other student branches in subsequent training rounds. Especially in scenarios where the boundary of the structural region continues to change, the local texture response fluctuates frequently, or there is occlusion interference in the target region, the above-mentioned semantic amplification phenomenon is more likely to cause the semantic evolution direction in the dynamic teacher model to shift.
[0018] To address the aforementioned issues, this invention introduces a structural response continuity constraint mechanism during the collaborative training of multiple student branches using a dynamic teacher model. This mechanism coordinates the semantic propagation process of regions corresponding to different student branches in stages. Specifically, when the dynamic teacher model performs semantic updates, not all regions corresponding to student branches participate in the teacher update synchronously. Instead, the semantic participation order of different student branches and the rhythm of the dynamic teacher update are controlled based on the continuous changes in the structural response regions across training rounds. This ensures that regions with continuous structural responses participate in the semantic propagation process first. Correspondingly, when some student branches exhibit excessively rapid local semantic shifts or abnormal regional semantic changes, their corresponding regional semantic participation in the dynamic teacher update is temporarily suspended to prevent the continuous diffusion of abnormal local semantics among multiple student branches.
[0019] In another optional implementation, the regional semantic center in the dynamic teacher model can be cached in the semantic state cache unit corresponding to the parameter synchronization node. After completing the current training round, each student branch only updates the regional semantic state corresponding to the region that is continuous with the current structural response. For regional semantic information that does not meet the structural continuity condition, the regional semantic state corresponding to the previous training round is maintained and continues to participate in the subsequent collaborative distillation process. In this way, the semantic evolution process in the dynamic teacher model can form a continuous correspondence with the structural response change process, so that the dynamic teacher can maintain a relatively stable semantic propagation direction during the continuous training of multiple student branches, thereby reducing the risk of cross-round semantic drift caused by local abnormal responses.
[0020] For details, please see Figure 1 As shown, the input data is fed into multiple student branch networks. Each student branch first generates a corresponding structural response distribution based on the intermediate layer features. Subsequently, cross-branch spatial structural relationships are established based on the structural response distributions of each student branch, and corresponding associated semantic regions are generated. On this basis, the present invention constructs a dynamic teacher model and establishes regional semantic storage units corresponding to each associated semantic region within the dynamic teacher model. The deep semantic response information corresponding to each student branch is written into the dynamic teacher model in a predetermined update order to form a continuously updated teacher semantic state. The dynamic teacher model further performs staged distillation supervision on each student branch to achieve continuous semantic distillation between different student branches. At the same time, the update rhythm of each student branch is synchronously controlled during the training process to avoid abnormal perturbations to the dynamic teacher model caused by semantic changes of local student branches.
[0021] Having understood the overall system architecture described above, the following section will combine... Figure 2 The invention will be further described in detail below with specific implementation details. First, see the following: Figure 2 As shown, a cross-branch knowledge distillation method based on shallow feature guidance includes: S1. Construct a joint training network that includes a shared feature extraction layer and multiple parallel student branches, extract features from the input samples, and obtain the shallow structural response information and deep semantic response information corresponding to each student branch. S2. Based on the shallow structural response information of each student branch, establish cross-branch structural association to obtain association constraint information used to characterize the structural consistency between different student branches. The association constraint information is used to reflect the degree of consistency of each student branch in local spatial structural response. S3. Adjust the contribution of the deep semantic response information corresponding to each student branch according to the association constraint information, control the semantic response intensity of each student branch participating in the construction of the dynamic teacher, and generate a dynamic teacher model based on the adjusted deep semantic response information. S4. The dynamic teacher model is used to perform collaborative knowledge distillation training on each student branch, and the training process of each student branch is jointly constrained based on the cross-branch structural association, so that each student branch can complete deep semantic knowledge transfer while maintaining structural response consistency. S5. After training is complete, retain any student branch as the target inference model for deployment.
[0022] Specifically, when implementing S1, a jointly trained network is constructed, comprising a shared feature extraction layer and multiple student branches. Input samples are first fed into the shared feature extraction layer to obtain a shared feature tensor. ,in, Indicates the input sample. This represents the forward mapping process corresponding to the shared feature extraction layer. The shared feature extraction layer is used to complete the basic feature encoding of the input sample. In one implementation, the shared feature extraction layer is implemented using a convolutional backbone network. The input sample is processed through multiple convolutional units and downsampling units to output a shared feature tensor. In another implementation, a visual encoding network containing a window attention structure can also be used to implement shared feature extraction. The basic feature encoding process is prior art and will not be described in detail here.
[0023] Subsequently, the shared feature tensor is input into multiple student branches, and the joint training network is assumed to contain... The first student branch, then the second... The feature extraction process corresponding to each student branch is represented as follows: ,in, Indicates the first Regarding the feature mapping process for each student branch, it should be noted that the network structure of each student branch can be the same or different. In one implementation, each student branch adopts the same backbone structure, only the initialization parameters are different; in another implementation, each student branch adopts different convolution depths, different channel sizes or different attention module configurations to form differentiated feature responses.
[0024] Furthermore, shallow structure response information is output from the front-end network layer of each student branch. The shallow structure response information corresponding to each student branch is represented as follows: ,in, , These represent the spatial dimensions of the shallow feature map, The channel dimension is represented. In the specific implementation, the shallow structure response information is taken from the convolutional block, residual unit or high-resolution feature layer output of the student branch. Since the feature map downsampling rate is low at this stage, the corresponding feature response still maintains the spatial distribution. The shallow structure response information is used for subsequent cross-branch structure association construction.
[0025] Meanwhile, each student branch continues to execute the subsequent semantic encoding process and outputs the corresponding deep semantic response information. The deep semantic response information corresponding to each student branch is represented as follows: ,in, , These represent the spatial dimensions of the deep feature map, This represents the number of deep feature channels. The deep semantic response information is taken from the output of the network layer after the student branch. In one implementation, the deep semantic response information is taken from the feature layer before the final classification layer; in another implementation, it can also be taken from the semantic feature layer corresponding to the input of the detection head or the segmentation decoding layer.
[0026] Because different student branches have different parameter spaces and feature response paths, the deep semantic response information output by each student branch has different distributions. To avoid training instability caused by directly establishing teacher relationships based on deep semantic responses during subsequent distillation, this implementation also retains the shallow structural response information corresponding to each student branch for subsequent establishment of cross-branch structural associations. In some implementation scenarios, a feature mapping layer can be added between the shallow structural response information and the deep semantic response information to complete channel alignment or dimensionality transformation. The feature mapping layer can be implemented using a 1×1 convolutional layer, a linear mapping layer, or a channel compression module. The corresponding mapping process is represented as follows: in, and The shallow feature mapping function and the deep feature mapping function are respectively represented. It should be understood that the settings for the number of student branches, the depth of the shared feature layer, the shallow feature extraction position, and the channel size can be adjusted according to the specific visual task and do not constitute a limitation on the technical solution of this invention.
[0027] Furthermore, a cross-branch structure association is established based on the shallow structure response information. In the implementation of S2 of this invention, the shallow structure response information is taken from the output of the feature layer of each student branch. As one implementation method, the shallow structure response information is taken from the output of the convolution stage with a downsampling ratio of no more than 8 times, so as to preserve the spatial position correspondence of the input image. The student branch structure and shallow feature extraction process have been explained above and will not be repeated here.
[0028] Specifically, let the first The shallow structure response information corresponding to each student branch is: Since the convolution stride or channel configuration may differ for different student branches, the spatial dimensions of the response information of each shallow structure vary. Therefore, before establishing cross-branch structural associations, spatial alignment processing is first performed on the response information of each shallow structure. Specifically, this is done using a preset spatial scale. As a unified output size, resampling processing is performed on the response information of each shallow structure layer to obtain a spatially aligned structural response distribution map. ,in, This indicates the aligned channel dimension.
[0029] In implementation, spatial alignment is achieved using bilinear interpolation. Alternatively, average pooling or convolutional mapping can be used to unify spatial scale. It's important to note that the purpose of spatial alignment here is to ensure that different student branches can establish structural correspondences at the same spatial index position, rather than performing semantic feature fusion. Furthermore, the spatially aligned structural response distribution map is expanded according to spatial dimensions. Let the number of expanded spatial locations be... Then the first The student branch in The local structural response vector corresponding to each spatial location is represented as follows: ,in, .
[0030] In this implementation, cross-branch structural associations are established between the same spatial locations, rather than performing cross-region matching between different spatial indices. This is because shallow feature layers still retain the local spatial response relationships of the input image, and response regions corresponding to the same spatial location have consistent receptive field mapping ranges. If associations are directly established between deep semantic features, erroneous semantic reinforcement can easily occur during distillation because different student branches have not yet formed stable semantic distributions in the early stages of training. Based on the spatial location correspondence, the consistency of local structural responses of different student branches at the same spatial location is calculated separately. The student branch and the first The positional correlation coefficient between student branches is expressed as follows: in, This represents the result of the dot product between the corresponding local structural response vectors. and These represent the corresponding vector magnitudes. In the above calculation process, the cosine similarity between the local structural response vectors is calculated for each spatial location, and then the response results of all spatial locations are averaged to generate the structural association results between the corresponding student branches.
[0031] It should be noted that the cosine similarity is used to calculate the positional correlation coefficient in this embodiment. This is mainly used to eliminate the influence of differences in channel response amplitude between different student branches, so that the structural correlation results reflect the consistency of local response directions more. In some training scenarios with large-scale normalization fluctuations or inconsistent channel scales, this method can reduce the correlation offset caused by response amplitude oscillations in the deep distillation stage.
[0032] Furthermore, a cross-branch structural association matrix is generated based on the positional association coefficients between each student branch. , where matrix elements Indicates the first The student branch and the first The degree of structural correlation between student branches.
[0033] When the local response directions of the two student branches at their corresponding spatial locations are consistent Increase; when the response distribution in the corresponding spatial region shifts. The resulting cross-branch structural correlation matrix is used to adjust the contribution of subsequent deep semantic responses.
[0034] In another implementation, the positional correlation coefficient can also be calculated using normalized cross-correlation, Euclidean distance mapping, or attention response similarity. It should be understood that the adjustment of the form of structural correlation measurement does not affect the core technical idea of this invention to establish cross-branch correlation constraints based on shallow structural consistency.
[0035] Furthermore, based on the shallow structural response distribution map and cross-branch position correlation coefficients obtained for each student branch, regional-level modeling of spatial structural correspondence is performed to replace the high noise and instability caused by pixel-by-pixel position-level matching.
[0036] Specifically, the structural response distribution map corresponding to each student branch is first spatially partitioned to align the feature maps. Based on this, it is divided into M non-overlapping spatial structure regions, each region covering a fixed-scale continuous set of spatial locations. The region division can be achieved using a uniform grid or a sliding window-based method; for the... A spatial structural region, whose regional response center is defined as... ,in, The geometric center coordinates of all spatial locations within the region are represented. In one implementation, the region response center can be obtained directly by taking the arithmetic mean of the spatial coordinates within the region. This process is used to stabilize the region-level alignment reference.
[0037] Based on this, for each spatial structural region, the direction of local structural response change at each spatial location within that region is extracted, and let the first... The offset of each spatial location relative to the center of the region response is ,in: No. The student branch in The direction of response change within a spatial structural region is defined as: in, Indicates the first The number of spatial locations within a spatial structure region Indicates the first The student branch in The structural response value at a spatial location is essentially defined as a first-order spatial weighted statistical analysis of the structural response within a local region. The calculation result reflects the overall offset trend of the structural response in the horizontal and vertical directions within the region. This offset trend can be understood as the "dominant change direction" of the shallow structural response within the local receptive field, and is used to replace the single-point similarity judgment that is susceptible to noise in point-by-point matching.
[0038] Furthermore, for the response change directions of different student branches within the same spatial structure region, the included angle relationship is calculated: when When it exceeds the preset threshold, it is considered that the first... The student branch and the first The student branch in If a spatial structural region exhibits a consistent trend of structural change, it can be determined that there is a structural correspondence between the regions.
[0039] It should be noted that this consistency determination is not based on the intensity of a single point response, but rather on the statistical results of the direction of the structural response within a region. Therefore, it can, to some extent, suppress mismatch problems caused by local anomalous activation or edge noise, thereby improving cross-branch structural association from point-level consistency to region-level consistency. Based on the established spatial structural correspondence, the coordinates of the regional response center are recorded for each spatial structural region with a corresponding relationship. This coordinate is used for cross-round structural stability constraints during subsequent training.
[0040] During the training iteration, after the parameters of each student branch are updated, the corresponding structural response distribution map will change, so it is necessary to recalculate the coordinates of the region response center. in, This indicates the training iteration round. Then, the coordinates of the region response center in the current round are matched with the corresponding coordinates from the previous round, and their Euclidean distance is calculated. When the distance is less than the scale threshold of the corresponding spatial structure region (e.g., a set ratio of the region's side length or diagonal length), the region is considered to maintain spatial stability during training iterations, and its cross-branch structural correspondence remains unchanged. Conversely, when the region's response center shifts significantly beyond the region's scale range, the region's structural representation is considered to have drifted, and the corresponding structural association is re-evaluated in the next iteration. Through this mechanism, the cross-branch structural correspondence not only depends on the results of a single round of static feature calculation but also introduces spatial stability constraints across training rounds, avoiding the problem of frequent reconstruction of structural associations caused by rapid feature changes in the early stages of training.
[0041] After completing the construction of cross-branch structural association information, the structural constraints are directly applied to the deep semantic response information of each student branch, thereby driving the construction process of the dynamic teacher model, which corresponds to the implementation of S3 of this invention. Specifically, the first... The deep semantic response information corresponding to each student branch is denoted as This feature originates from the semantic extraction layer output of the student branch.
[0042] Please see Figure 3The diagram illustrates the generation of structural responses and their association with cross-branch spatial structures. Different student branches output corresponding spatial feature maps. Due to differences in network structure and training state among different student branches, the response regions in different feature maps are usually not entirely consistent. Therefore, this invention first generates corresponding structural response regions based on the spatial response distribution in the feature maps. The shaded areas in the diagram represent spatial regions formed by continuous changes in structural responses, with different regions reflecting the response of the current student branch to different target structures.
[0043] After obtaining the structural regions, this invention further determines the "response center" corresponding to each structural region. The circular markers in the figure indicate the location of the response center of the corresponding structural region. Subsequently, this invention establishes a "cross-branch structural association path" based on the spatial positional relationship of the response centers between different student branches. The arrows in the figure indicate the structural correspondence between different student branches.
[0044] Unlike traditional methods that directly align features, this invention does not directly constrain the overall features of different student branches. Instead, it first establishes spatial correspondences between structural regions and then performs subsequent semantic distillation based on the structural correspondence results, thereby reducing the semantic shift problem caused by structural differences between different student branches.
[0045] In actual training, the deep semantic features of different student branches often converge at different states in the early stages of training. Direct global fusion can easily introduce semantic conflicts. Therefore, this implementation does not uniformly process the global features, but only performs semantic participation control within the spatial structural regions where structural correspondences have been established. Specifically, based on the mapping relationship between shallow structural regions and deep feature space, the set of associated semantic regions corresponding to each student branch is first determined. This mapping maintains spatial index consistency, meaning that the same structural region corresponds to the same spatial location index range in different branches, ensuring the alignment basis for subsequent semantic updates. Based on this, a scheduling order based on structural stability is introduced for all semantic regions with structural correspondences. This order does not depend on semantic category information but is determined according to the spatial offset of the region center in consecutive training rounds. Let the th... The center offset of each region is: Then according to Regions are sorted from smallest to largest, prioritizing those with more stable spatial structures for participation in the dynamic teacher construction process. The dynamic teacher model exists in a cached form, denoted as... Its initial state is either empty or initialized from the first stable region. During the construction process, for the first sorted region, only the semantic response of the corresponding student branch is directly written to the teacher cache. This step does not introduce fusion operations. Its purpose is to establish the initial structural anchor point of the teacher semantics. In the subsequent region writing process, instead of simple replacement, a contribution control coefficient determined by cross-branch structural association information is introduced. This coefficient comes from the normalization result of the region corresponding to the structural association matrix in S2 and is used to represent the credibility of the semantic region under cross-branch structural consistency.
[0046] Therefore, for the first The writing process for each region is represented as follows: in, This indicates the structural consistency contribution weight of the region. This mechanism ensures that regions with higher structural consistency account for a larger proportion of teacher semantics, while regions with lower structural consistency retain more of the existing teacher state, thus preventing unstable semantics from directly dominating teacher distribution. For semantic regions that have not established structural correspondence, they remain in their original state throughout the entire dynamic teacher construction process and do not participate in any update operations, thus preventing structurally inconsistent regions from interfering with teacher semantics.
[0047] Please see Figure 4 As shown, the structural regions in the structural response features are further mapped to the deep semantic feature space. Due to the spatial scale difference between the shallow structural response and the deep semantic features, this invention generates a mapping region based on the corresponding spatial position relationship. The "mapping region" in the figure represents the corresponding range of the structural region in the deep semantic features. Subsequently, this invention generates the corresponding "associated semantic region" based on the mapping result. Different associated semantic regions correspond to the semantic response results of different structural regions in the deep semantic space. After obtaining the associated semantic regions, the deep semantic response information corresponding to each student branch is further sent to the dynamic teacher model for semantic update. The "semantic update" in the figure represents the process of the current student branch updating the semantic state of the corresponding region in the dynamic teacher model.
[0048] In this process, the dynamic teacher model does not generate fixed teacher features all at once, but continuously updates the corresponding semantic state as different student branches are trained. It is continuously updated in the form of "accumulated writing to each region" to form a continuously changing teacher semantic representation. That is, after each structurally stable region is written, the current teacher state becomes the base state for subsequent region writing and continues to participate in the update process, so that the teacher semantic distribution gradually expands from the stable structural region to the global space.
[0049] In this way, the construction of the dynamic teacher model does not rely on one-time feature fusion, but is controlled by the consistency constraint of shallow structure across branches. Under the guidance of regional structural stability ranking, semantic aggregation is gradually completed, thereby suppressing the accumulation of semantic conflicts and improving the structural consistency of teacher semantic distribution during parallel training of multiple student branches.
[0050] Furthermore, after completing the construction of the cross-branch structural correspondence, a region-triggered write and update path is formed on the semantic cache tensor of the dynamic teacher model at the granularity of the associated semantic regions. This allows cross-branch knowledge transfer to unfold gradually in a "region consistency-driven" manner. Specifically, for the current student branch at the [missing information], [missing information]... Deep semantic response within each associated semantic region First, after completing the regular forward semantic update in the region, the semantic responses of all spatial locations within the region are statistically aggregated and compressed into a region semantic center vector: This process is essentially a mean reduction of the spatial dimension, which maps the local two-dimensional semantic distribution into a single vector representation for subsequent cross-branch direction consistency judgment. The mechanism of this space-to-vector conversion has been explained in the previous text and will not be repeated here.
[0051] Based on this, before the next student branch enters the same associated semantic region for updating, the semantic center vector of the region corresponding to the current student branch and the semantic center vector of the region corresponding to the next student branch are subjected to directional consistency calculation, which is expressed in the form of normalized inner product: When the cosine value corresponding to the included angle is less than the set angle range threshold (i.e., the consistency constraint is satisfied), it is considered that the region has a stable directional alignment relationship in the cross-branch semantic space. At this time, the deep semantic response updated by the current student branch is triggered to write to the dynamic teacher model.
[0052] This write is not a global parameter update, but rather an update to the teacher's semantic memory tensor. Corresponding spatial index region The internal partial fusion update is performed in the following form: That This is used to control the contribution strength of the current student branch in the teacher's memory. Its value is determined by the cross-branch structural association strength, so that the influence of different regions in the teacher's state presents a non-uniform distribution characteristic. After the writing is completed, the teacher model is immediately used as the conditional input for the semantic update of the next student branch, so that the feature update of the next branch in the same structural region is constrained by the written semantic state, forming a cross-branch sequential propagation path.
[0053] Please see Figure 5The dynamic teacher model contains multiple semantic storage units, each corresponding to a different associated semantic region. During training, different student branches participate in the dynamic teacher update in a predetermined order. The "update order" in the diagram represents the sequence in which different student branches participate in the dynamic teacher update. After the current student branch completes its semantic update, its corresponding deep semantic response information is written into the corresponding semantic storage unit. When subsequent student branches perform semantic distillation, they further call upon the historical semantic states in the dynamic teacher model to participate in distillation supervision. The "historical semantic states" in the diagram represent the regional semantic information retained by the dynamic teacher model during previous training.
[0054] Furthermore, within the dynamic teacher model, a dual-temporal semantic cache structure is maintained for each associated semantic region, storing the semantic response information of the region corresponding to the current training round and the previous training round, respectively. This enables the teacher state to have the ability to revert in the time dimension. When performing semantic updates in the next student branch, the spatial position is first weighted and statistically analyzed based on the semantic response intensity within the region to obtain the coordinates of the region center. The change in the structural response center is calculated by the Euclidean distance between consecutive training rounds. When the change is less than the corresponding region scale, it indicates that the structural region remains stable during training. In this case, the semantic response information corresponding to the current training round is called to participate in the teacher's update path. When the change is greater than or equal to the region scale, it is considered that the region has undergone spatial drift. In this case, the semantic response information of the previous training round is called to participate in the update, so as to avoid the unstable structure causing cumulative disturbance to the teacher's semantic memory.
[0055] In the process of generating associated semantic regions, firstly, a cross-layer spatial mapping relationship is established based on the region boundary positions in the shallow structural response feature map, and then the first layer is... Each structural region is mapped from the shallow spatial region to the deep semantic feature space, and its boundary coordinates satisfy the scaling transformation relationship: in These represent the spatial scale transformation coefficients in the horizontal and vertical directions, respectively. Subsequently, semantic responses falling within this boundary range in the deep semantic feature map are truncated to generate corresponding associated semantic regions. This serves as the unified scope for subsequent semantic center calculations and teacher-written data.
[0056] Furthermore, when implementing S4 of the present invention, please refer to... Figure 6As shown, this invention first divides different semantic regions into "stable semantic regions" and "variable semantic regions" based on the structural changes corresponding to different associated semantic regions. The "stable semantic regions" correspond to regions with small structural changes, while the "variable semantic regions" correspond to regions with significant structural changes. In the distillation process, this invention first performs a first-stage distillation. The "first-stage distillation" in the figure indicates that the dynamic teacher model prioritizes distillation supervision of student branches based on the teacher semantic state corresponding to the stable semantic regions.
[0057] After distillation is completed in the stable semantic region, a second stage of distillation is performed based on the teacher's semantic state corresponding to the changed semantic region. The arrows in the diagram indicate the execution order between different distillation stages. During the process, the collaborative knowledge distillation training process is constrained by the semantic stability of the region and jointly controls the source of teacher supervision and the order of student branch updates through cross-round structural response changes, thereby forming a phased distillation path constrained by structural continuity at the computational graph level. Specifically, for the first... The student branch, its first The structural response centers of the associated semantic regions in consecutive training rounds are respectively The structural response center is obtained by weighting the semantic response intensity within the region to the spatial coordinates. The calculation process is as follows: in Indicates the semantic response intensity of spatial location. This represents the corresponding spatial coordinates. This definition ensures that the structural response center can be directly obtained from standard tensor operations in practice. Furthermore, it is achieved by calculating the Euclidean distance between adjacent training rounds. and the corresponding regional scale threshold The comparison is used to determine the stability of the region. It should be noted that the threshold is obtained by mapping the spatial geometric size of the corresponding region in the shallow structure response feature map. This is used to ensure the consistency of cross-layer region division and avoid introducing additional free alignment errors between feature maps of different resolutions.
[0058] Based on this, it will satisfy The region is defined as a stable semantic region, and the remaining regions are defined as variable semantic regions. From an implementation perspective, this division is equivalent to generating two complementary binary mask tensors, which are then applied to the teacher supervision path selection respectively.
[0059] When performing distillation calculations, it should be noted that the dynamic teacher model is not two independent networks, but exists in the form of a semantic cache tensor with a time index. The "semantic center vector of the current training round" corresponds to the cached state after the latest teacher write, and the "semantic center vector of the previous training round" corresponds to the historical state saved in the previous time step. This dual-state structure is implemented through explicit time step variables, rather than through additional model copying.
[0060] Based on the aforementioned dual-state caching, the current teacher state is used for supervision of stable semantic regions, while the previous teacher state is used for supervision of changing semantic regions. The implementation is as follows: It should be noted that this operation is essentially a selective routing of the teacher's semantic tensor in the time dimension, rather than a switching of model parameters, and therefore does not introduce additional inference overhead or structural changes.
[0061] After completing the above regional-level distillation, calculate the cross-round semantic offset state for each student branch: This quantity is used to characterize the degree of overall structural drift and is used to sort all student branches within the same training round. It should be noted that this sorting operation only applies to the write execution order of the dynamic teacher model, does not change the forward propagation parallel structure of the student branch, and does not affect the definition of the loss function. Its role is to control the temporal order of teacher state updates, thereby avoiding the accumulation of disturbances to the teacher semantic cache caused by high drift branches in unstable conditions.
[0062] During the teacher model update process, student branches are processed sequentially according to the sorting sequence. Only stable semantic regions are allowed to participate in the teacher semantic cache writing, and the update form is as follows: in The structural association weight controls the proportion of the current branch's contribution to the teacher's state. This parameter can be calculated from the cross-branch structural similarity, thus avoiding conflicting and overlapping effects of updates from different branches on the teacher's state. For conditions satisfying... Regarding the student branch, it should be noted that this branch will not immediately participate in the teacher's writing in the current training round. Its corresponding semantic information will be cached in the next training round before being updated. This mechanism is implemented through a time step queue or a state buffer, thereby avoiding the impact of high-drift samples on the teacher's semantic stability in the current round.
[0063] In another alternative implementation, the aforementioned stability partitioning, teacher dual-state routing, and branch sorting control can all be implemented through tensor mask operations, index selection operations, and stop-gradient mechanisms in the standard deep learning framework, without the need to introduce additional network structures or external scheduling modules. This method can be directly embedded into the conventional training computation graph for execution.
[0064] It should be noted that the aforementioned dynamic teacher model exists only during the training phase as an intermediate state mechanism for cross-branch semantic alignment and distillation constraints. It does not participate in the execution of the computation graph during the inference phase. Therefore, the final deployed model originates from only one student branch.
[0065] In practice, under the condition that the training convergence criterion meets the preset iteration rounds or the validation set loss no longer decreases significantly, any student branch is directly selected from multiple parallel student branches as the target inference model for fixed deployment. This selection process does not rely on an additional structure evaluation network, but can be determined based on the overall loss convergence degree of each student branch at the end of training or a preset branch numbering strategy. Each branch has already completed parameter alignment during the training phase through shared feature extraction layers and cross-branch structural constraints, so any branch maintains a consistent feature representation capability in structure.
[0066] It should be noted that the “any student branch” is not a random and unconstrained selection. At the implementation level, each student branch shares the same shallow feature extraction layer parameters and maintains the consistency of local spatial response through cross-branch structural association constraints during training. Therefore, each branch has converged to a consistent distribution in the shallow structural representation space, with only slight differences in the deep semantic mapping path. This difference has been constrained and converged during the dynamic teacher distillation process, thus ensuring that any branch can be used as an equivalent reasoning carrier.
[0067] Furthermore, in another optional implementation, the parameters of each student branch can be validated for consistency before deployment. For example, the difference between the output feature distance or logits distribution of each branch on the validation set can be calculated. When the difference is less than a preset threshold, any branch can be directly used as the final deployment model. When there is a slight difference, the branch with the smallest convergence error can be selected as the target model for solidification. In implementation, the retained student branch contains a complete feature extraction path and classification / regression head structure. Its inference calculation process is consistent with the single-branch forward propagation in the training phase. Only the dynamic teacher model and cross-branch collaborative update module are removed, thereby avoiding the introduction of additional inference overhead. It should be noted that this removal process only involves the pruning of tensor paths related to other branches and teacher caches in the computation graph, and does not affect the internal parameter structure of the target branch.
[0068] To verify the effectiveness of the cross-branch knowledge distillation method based on shallow features in this invention, comparative experiments were conducted using conventional public datasets and standard training configurations. It should be noted that the following experimental results are only used to characterize the relative performance differences under different structural designs. The experimental environment and parameters all adopt the configuration of a general deep learning training framework, and no special hardware optimization or targeted computing power acceleration strategies are introduced.
[0069] In the specific implementation, a dataset with typical structural recognition task characteristics was selected as the test object, and the conventional single-teacher single-student distillation method, the traditional multi-branch independent training method, and the multi-student branch method without introducing cross-branch structural constraints were used as the comparison baseline. The method of this invention was trained under the same training rounds, the same data augmentation strategy, and the same optimizer configuration. The recognition accuracy of each method on the test set was statistically analyzed, and the comparison results are shown in the table below: The experimental results show that, compared with the multi-branch independent training method without introducing cross-branch structure constraints, the present invention exhibits higher recognition accuracy while maintaining the same model size. At the same time, it shows a certain degree of decrease in the number of convergence rounds, indicating that the cross-branch structure association mechanism improves the convergence efficiency in the training process to a certain extent.
[0070] It should be noted that in traditional multi-branch distillation methods, due to the lack of explicit structural constraints between student branches, their shallow feature responses are prone to local inconsistencies during training, leading to noise accumulation in the teacher model during semantic aggregation. This invention, however, introduces cross-branch association constraints based on shallow structural responses and combines them with a dynamic teacher-level regional semantic writing mechanism, ensuring consistency in the local spatial structure of different student branches, thereby reducing offset errors during semantic transfer.
[0071] Furthermore, repeated experiments showed that the performance fluctuations of the method of this invention were relatively small under different initialization conditions, indicating that it has a certain improvement effect on training stability. However, it should be noted that this stability improvement mainly comes from the combined effect of structural constraints and semantic update order control mechanisms, and does not depend on additional model scaling or complex hardware conditions.
[0072] In some implementations, to further verify the semantic stability and model convergence performance of the structure response-guided cross-branch online knowledge distillation method proposed in this invention during continuous training, a multi-branch online distillation experiment was constructed based on the CIFAR-100 dataset. In this embodiment, ResNet-32 was selected. As the basic network structure, two identical student branches are constructed, sharing the input training samples and outputting corresponding intermediate layer spatial feature maps and deep semantic features respectively. During training, the intermediate layer spatial feature maps corresponding to each student branch are first obtained, and a structural response distribution is generated based on the feature response values corresponding to each spatial position in the spatial feature maps. Subsequently, the corresponding spatial structural regions are divided according to the continuous changes in the structural response, and cross-branch spatial structural associations are established between different student branches. After establishing the spatial structural associations, corresponding associated semantic regions are generated based on the spatial mapping relationship between the structural response regions and the deep semantic feature maps. A region semantic storage unit corresponding to each associated semantic region is established within the dynamic teacher model. Each student branch participates in the dynamic teacher model update sequentially according to a predetermined update order. After the deep semantic response information of the current student branch's corresponding associated semantic region is written into the corresponding region semantic storage unit, the updated dynamic teacher model is further used as the teacher semantic reference when the next student branch performs distillation supervision. In some implementations, the distillation loss is calculated in the following way: in, Indicates the number of associated semantic regions; This represents the deep semantic response feature of the student branch corresponding to the iiith associated semantic region; This represents the semantic features of the teacher in the corresponding associated semantic region of the dynamic teacher model.
[0073] Please see Figure 8 The diagram shows the semantic distribution changes of the dynamic teacher model and each student branch across different training rounds. In the initial training phase, the semantic response distributions of different student branches exhibit significant shifts. As the dynamic teacher model continuously updates the region semantics, the semantic response regions corresponding to each student branch gradually converge towards the teacher's semantic state corresponding to the dynamic teacher model. (For further details, please refer to...) Figure 7 The diagram shows the changes in classification accuracy of different student branches during the training process. As the number of training rounds increases, the classification accuracy of each student branch gradually increases and tends to stabilize; at the same time, the difference in accuracy between different student branches gradually decreases.
[0074] Combination Figure 7 and Figure 8As can be seen, this invention establishes a more stable semantic transfer relationship in the cross-branch online knowledge distillation process through a structure response-guided dynamic teacher continuous evolution mechanism, thereby improving the semantic consistency and final convergence effect during model training.
[0075] The foregoing has provided a detailed description of a cross-branch knowledge distillation method based on shallow feature guidance provided in this application. Those skilled in the art will recognize that the algorithmic steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. The above description of the embodiments is merely for the purpose of helping to understand the method and its core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A cross-branch knowledge distillation method based on shallow feature guidance; characterized in that, Includes the following steps: S1. Construct a joint training network that includes a shared feature extraction layer and multiple parallel student branches, extract features from the input samples, and obtain the shallow structural response information and deep semantic response information corresponding to each student branch. S2. Based on the shallow structural response information of each student branch, establish cross-branch structural association to obtain association constraint information used to characterize the structural consistency between different student branches. The association constraint information is used to reflect the degree of consistency of each student branch in local spatial structural response. S3. Adjust the contribution of the deep semantic response information corresponding to each student branch according to the association constraint information, control the semantic response intensity of each student branch participating in the construction of the dynamic teacher, and generate a dynamic teacher model based on the adjusted deep semantic response information. S4. The dynamic teacher model is used to perform collaborative knowledge distillation training on each student branch, and the training process of each student branch is jointly constrained based on the cross-branch structural association, so that each student branch can complete deep semantic knowledge transfer while maintaining structural response consistency. S5. After training is complete, retain any student branch as the target inference model for deployment.
2. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 1, characterized in that: The establishment of cross-branch structural relationships based on the shallow structural response information of each student branch includes: Spatial alignment processing is performed on the shallow structural response information output by each student branch to obtain the corresponding structural response distribution map; Based on the response distribution relationship at different spatial locations in the response distribution diagrams of each structure, establish the spatial structural correspondence between each student branch; Based on the spatial structure correspondence, a cross-branch structural correlation matrix is generated to characterize the degree of consistency of the local structure of different student branches; where the first... The student branch and the first Location correlation coefficient between student branches Represented as: in, Indicates the first The student branch in Local structural response vectors corresponding to each spatial location; Indicates the first The student branch in Local structural response vectors corresponding to each spatial location; This indicates the number of spatial locations in the structural response distribution map.
3. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 2, characterized in that: The establishment of spatial structural correspondences between student branches based on the response distribution relationships at different spatial locations in each structural response distribution map includes: The structural response distribution map corresponding to each student branch is divided into multiple spatial structural regions, and the regional response center corresponding to each spatial structural region is determined. Based on the response centers of each region, the distribution range and direction of response change of different student branches in the corresponding spatial structure regions are obtained respectively; When the response change direction of different student branches within the corresponding spatial structure region meets the preset consistency condition, it is determined that there is a structural correspondence between the corresponding spatial structure regions; where the first The student branch in Response change direction within each spatial structural region Represented as: in, Indicates the first The number of response locations within each spatial structure region; Indicates the first The horizontal position offset of each response location relative to the center of the response area; Indicates the first The vertical position offset of each response location relative to the center of the response area; Indicates the first The student branch in Structural response values at each response location; Based on the angular relationship between the response change directions corresponding to different student branches, the structural correspondence between corresponding spatial structural regions is determined.
4. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 3, characterized in that: The establishment of spatial structural correspondences between student branches also includes: For spatial structural regions with structural correspondences, record the coordinates of the corresponding regional response center. In subsequent training, the coordinates of the regional response center of the corresponding spatial structure region are recalculated, and the updated regional response center coordinates are matched with the regional response center coordinates corresponding to the previous training. When the Euclidean distance between the updated region response center coordinates and the region response center coordinates corresponding to the previous training is less than the region scale of the corresponding spatial structure region, the structural correspondence between the corresponding spatial structure regions is maintained.
5. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 1, characterized in that: The contribution adjustment of the deep semantic response information corresponding to each student branch includes: Based on the structural correspondence between each spatial structural region, the associated semantic regions in the deep semantic response information corresponding to each student branch are determined; The associated semantic regions corresponding to each student branch are sequentially updated according to the continuity of the structural correspondence between the associated semantic regions; After completing the semantic update of the associated semantic region corresponding to the current student branch, the updated deep semantic response information is written into the dynamic teacher model, and the associated semantic region corresponding to the next student branch is semantically updated based on the updated dynamic teacher model. For deep semantic response regions where no structural correspondence has been established, their original semantic response state is maintained and they do not participate in the dynamic teacher model update process; The sequential semantic update is performed in ascending order of the change in the position of the structural response center corresponding to each associated semantic region.
6. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 5, characterized in that: The sequential semantic update of the associated semantic regions corresponding to each student branch includes: After the semantic update is completed in the associated semantic region corresponding to the current student branch, the deep semantic response values of each spatial location in the associated semantic region are averaged according to the spatial location to obtain the region semantic center vector corresponding to the associated semantic region. Before performing semantic update on the next student branch, calculate the vector angle between the region semantic center vector corresponding to the current student branch and the region semantic center vector of the associated semantic region corresponding to the next student branch; When the angle between the vectors is less than the set angle range, the deep semantic response information of the current student branch after the update is written into the dynamic teacher model, and the semantics of the next student branch is updated based on the written dynamic teacher model.
7. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 6, characterized in that: The semantic update of the next student branch based on the written dynamic teacher model includes: In the dynamic teacher model, the semantic response information of the region corresponding to the current training round and the semantic response information of the region corresponding to the previous training round are stored for each associated semantic region. When performing semantic updates on the next student branch, obtain the change in the structural response center coordinates of the corresponding associated semantic region in two consecutive training sessions. When the change in the coordinates of the structural response center is less than the regional scale of the corresponding associated semantic region, the regional semantic response information corresponding to the current training round is invoked to participate in the dynamic teacher model update. When the change in the coordinates of the structural response center is greater than or equal to the regional scale of the corresponding associated semantic region, the regional semantic response information corresponding to the previous training round is invoked to participate in the dynamic teacher model update; the change in the coordinates of the structural response center is calculated by the Euclidean distance between the coordinates of the regional response centers of the corresponding associated semantic regions in two consecutive training processes.
8. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 5, characterized in that: The generation of the associated semantic region includes: Based on the location of the spatial structural regions at their regional boundaries in the structural response feature map, a spatial mapping relationship is established between the corresponding spatial structural regions and the deep semantic response feature map; whereby the first... The region boundary coordinates corresponding to each spatial structural region are represented as follows: The region boundary coordinates of the corresponding associated semantic regions in the deep semantic response feature map are represented as follows: The coordinates of the corresponding region boundary satisfy the following: in, The spatial scale transformation coefficients between the structural response feature map and the deep semantic response feature map in the horizontal direction are represented. The spatial scale transformation coefficients between the structural response feature map and the deep semantic response feature map in the vertical direction are represented. After obtaining the region boundary coordinates of the corresponding associated semantic region, the deep semantic response data located within the region boundary coordinate range in the deep semantic response feature map is truncated to generate the corresponding associated semantic region.
9. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 1, characterized in that: The method of using a dynamic teacher model to perform collaborative knowledge distillation training on each student branch includes: Based on the change in the position of the structural response center corresponding to each associated semantic region, the associated semantic regions whose change in the position of the structural response center is less than the corresponding region scale are determined as stable semantic regions, and the associated semantic regions whose change in the position of the structural response center is greater than or equal to the corresponding region scale are determined as variable semantic regions. During the student branch training process, the dynamic teacher model is first used to perform semantic distillation update on the stable semantic region. After the semantic distillation update of the stable semantic region is completed, the dynamic teacher model is then used to perform semantic distillation update on the changing semantic region. When performing semantic distillation update on the stable semantic region, the region semantic center vector corresponding to the current training round of the dynamic teacher model is used as the supervision semantic. When performing semantic distillation updates on the changing semantic regions, the semantic center vector of the region corresponding to the previous training round of the dynamic teacher model is used as the supervision semantic.
10. The cross-branch knowledge distillation method based on shallow feature guidance according to claim 1, characterized in that: The method of collaborative semantic update control of the deep semantic response information corresponding to each student branch based on structural response continuity includes: After each student branch completes the semantic distillation update for the current training round, the regional semantic offset of the corresponding associated semantic region for each student branch is calculated; where, the first... Region semantic offset corresponding to each student branch Represented as: in, This indicates the number of associated semantic regions corresponding to the current student branch; Indicates the first The student branch in the current training round The semantic center vector of each associated semantic region; Indicates the first The student branch in the previous training round The semantic center vector of each associated semantic region; In the current training round, the cross-round semantic offset state quantities corresponding to each student branch are arranged in ascending order, and the dynamic teacher model update of the corresponding student branch is executed in the order of arrangement. When the cross-round semantic offset state quantity corresponding to the target student branch is greater than the average cross-round semantic offset state quantity corresponding to the other student branches, the semantic center vector of the region corresponding to the target student branch in the previous training round is kept to participate in the collaborative semantic update control of the current training round. After the other student branches complete the dynamic teacher model update for the current training round, the semantic center vector of the current training round region corresponding to the target student branch is written into the dynamic teacher model.