Construction method for open set domain adaptive Alzheimer's disease diagnosis model

Feature extraction and unknown categories are solved by adopting voxel 3D CNN, vMF distributed hyperspherical autoencoder, cross-domain alignment and separation module, weighted adversarial domain adaptation, and multi-scale dual attention aggregation module in Alzheimer's disease diagnosis The identified problems achieve a more stable and efficient diagnostic model.

CN119028595APending Publication Date: 2024-11-26CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410941337.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art is difficult to accurately locate the disease-related areas in the diagnosis of Alzheimer's disease. Feature extraction is limited to a single scale, generalized characteristics cannot be fully learned, and the performance is unstable when facing unknown categories, making it difficult to adapt to complex high-dimensionality. Data and diversified data distribution.

Method used

Using voxel-based 3D CNN feature extraction module, combining the hyperspherical variational autoencoder with vMF distribution and improved Triplet Loss, a cross-domain alignment and separation module is built, and a multi-scale and dual-scale are integrated through the adversarial domain adaptation module of the weighting mechanism. Attention aggregation module, using Weibull distribution to calculate instance-level weights, balance the effects of known and unknown class samples.

Benefits of technology

Achieve more stable and robust feature extraction and classification, which can accurately identify known class samples and detect unknown class samples, improve the generalization ability of the model and adaptability to complex data, and reduce the risk of overfitting and negative migration. Influence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028595A_ABST
    Figure CN119028595A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method for an open set domain adaptive Alzheimer's disease diagnosis model. In order to overcome the limitation of single-scale feature extraction, a multi-scale and double-attention integration module is added on the basis of a feature extraction network, and features of different scales and under two attention mechanisms are spliced to form a comprehensive feature representation, so that a voxel-based 3D feature extraction and fusion module is formed. According to the method, the MRI data can be effectively processed and analyzed, nuisance and important features in the MRI data can be captured, the MRI data can be effectively processed and analyzed, in order to improve the characterization capacity of potential features, a variational auto-encoder based on hyperspherical distribution is integrated, the encoder maps input data to a hyperspherical space, that is, potential variables are restrained on a unit spherical surface, and the potential variables are restrained on the unit spherical surface. Distance measurement and geometric properties in the hyperspherical space are different from those in the Euclidean space, so that the model is more robust when facing noise and data disturbance, and the risk of overfitting is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of diagnostic models, and in particular to a method for building an open domain adaptive Alzheimer's disease diagnostic model. Background Art

[0002] Unlike traditional natural image data, which are all in two-dimensional format, MRI data for Alzheimer's disease is three-dimensional data based on the NIfTI format. This data contains complex anatomical structures and pathological information, and there are disease-sensitive areas (i.e., hippocampus, ventricles, and cerebral cortex). When 3D CNN is simply used as a feature extraction network, it is difficult to accurately locate areas that are highly related to the disease, which poses a great challenge to the subsequent learning of high-level abstract features. In addition, through the simple superposition of 3D convolutional layers, the extracted features are limited to a single scale, and it is generally difficult to fully learn generalizable features and explain the intrinsic nature of Alzheimer's disease.

[0003] In the field of medical imaging, different imaging devices will inevitably lead to distribution changes between the training phase and the test phase, which will lead to an extreme decline in model performance. In addition, due to the complexity and diversity of neurological disease types, the training data in the source domain usually only contains a limited number of disease categories, while the target domain data in reality may contain many unknown disease categories that are not in the source domain. Then new unknown cases may be encountered during testing, which may lead to false positives and negative transfer problems in the computer-aided diagnosis process.

[0004] Variational autoencoder VAE embeds high-dimensional features into Euclidean space. Usually, the regularization effect of Gaussian distribution in Euclidean space is not very good. Gaussian distribution tends to become very scattered in high-dimensional space, which will lead to a decrease in the effectiveness of the distribution. Therefore, it may be challenging to capture the nonlinear structure of data in this potential Euclidean space.

[0005] It is very important to select appropriate boundary value parameters for the loss function based on metric learning, and its effect is highly dependent on the selection of samples. It is often necessary to manually adjust the boundary value parameters, and different data sets may require different values, which increases the difficulty of model tuning. Inappropriate parameters may cause the model to be unable to effectively distinguish between positive and negative samples, affecting the final feature learning effect.

[0006] Traditional adversarial methods in open domain adaptive networks may lead to uneven distribution of resources when processing known categories and unknown categories. They generally focus on the classification and protection of known categories, while ignoring the identification and response to unknown categories. This may cause the model to be unstable or have degraded performance when facing unknown categories, thereby affecting the efficiency and accuracy of the model in the open domain.

[0007] In the weighting mechanism, the calculation methods of assigning weights are different. In traditional open set domain adaptation, weights are generally obtained through the min-max normalization method or the similarity strategy. However, these methods cannot better fit the complex high-dimensional data in actual situations and adapt to more diverse data distributions during the domain adaptation process.

[0008] Therefore, a new solution to the above problems needs to be proposed. Summary of the invention

[0009] The purpose of the present invention is to provide a method for building an open domain adaptive Alzheimer's disease diagnostic model to solve the technical problems raised in the background technology.

[0010] To achieve the above object, the present invention provides the following technical solution: a method for building an open domain adaptive Alzheimer's disease diagnosis model, comprising at least the following steps:

[0011] S1: Build a voxel-based feature extraction and fusion module. In order to ensure that the sMRI data space is not destroyed during feature extraction, 3D CNN is used as a feature extraction module to effectively extract high-dimensional features.

[0012] S2: Build a hyper-Spherical Variational AutoEncoder (S-VAE) based on vMF (von MisesFisher) distribution. The hyper-Spherical Variational AutoEncoder based on vMF distribution can better handle the characteristics of high-dimensional data and provide a more stable and effective representation, because the vMF distribution converts the latent space from the traditional Euclidean space to the hyper-spherical space, and the regularization effect in the hyper-spherical latent space is usually better than the Gaussian distribution regularization effect in the Euclidean space.

[0013] Mapping these high-dimensional features into a hyperspherical latent space avoids the numerical instability of traditional Gaussian distribution in high-dimensional space; in addition, this can better capture the nonlinear structure of the data, thereby generating a more structured latent feature representation; this approach not only helps capture the intrinsic geometric structure of the data, but also improves the consistency of representations between different domains, thereby achieving domain invariance;

[0014] S3: Building a cross-domain alignment and separation module based on improved Triplet Loss, wherein the cross-domain alignment and separation module based on improved Triplet Loss includes an alignment stage and a separation stage;

[0015] S4: Building an adversarial domain adaptation module based on a weighted mechanism. The adversarial domain adaptation module based on a weighted mechanism uses a weighted idea to assign different weights to each sample to adaptively adjust the adversarial training process.

[0016] S5: Through the integration of the above modules, a more stable and robust model is built, which can effectively identify known class samples and accurately detect unknown class samples. The loss function of the final network model is as follows:

[0017]

[0018] in is the cross entropy classification loss of the source domain, is the KL divergence loss of the hypersphere VAE, and They are respectively expressed as the alignment loss of known class feature representation and the separation loss of unknown class feature representation, To weight the adversarial loss, α, β, and γ are used as hyperparameters to balance the three losses.

[0019] Furthermore, the S1 at least comprises the following steps:

[0020] Since the size of the sMRI data after preprocessing is 150×180×150, in order to ensure a smaller output feature map of 1×2×1, a 10-layer 3D CNN was designed as the backbone network, in which the kernel size of the first nine convolution layers (Conv1-Conv9) was set to 3×3×3;

[0021] By processing the input sMRI data layer by layer through the convolutional layer, high-level abstract features can be gradually learned from low-level features;

[0022] The kernel size of the last convolution layer (Conv10) is set to 2×2×2 to further reduce the number of model parameters and computation before the linear layer.

[0023] In addition, a maximum pooling operation is performed after every two layers of convolution. The purpose is to reduce the spatial dimension of the feature map and obtain a wider receptive field information through downsampling, while removing redundant information and retaining key features.

[0024] In order to locate the disease-sensitive areas more accurately, a dual attention module, namely the Global Attention Mechanism (GAM), is inserted after Conv4, Conv6, and Conv8 in the backbone network. It uses channel attention and spatial attention to retain channel and spatial information to enhance the importance of cross-dimensional interactions.

[0025] Based on the above approach, a multi-scale and dual attention aggregation (MDAA) module is designed to solve the problem that feature information of a single scale cannot fully represent the diversity and complexity of the data.

[0026] Furthermore, the design of a multi-scale and dual attention aggregation module includes at least the following steps: first, using GAM to process the output features of Conv4, Conv6 and Conv8 respectively, and then fusing the processed Conv4 and Conv6 output features with the output features of Conv10. This design also helps to maintain the diversity and hierarchy of information in the network structure, ensuring that deep features can independently play their advantages, and providing a richer foundation for the final feature extraction and fusion;

[0027] By integrating information at different scales and using GAM to assign greater weights to regions with higher disease relevance, the model is more likely to learn generalizable features and pay more attention to and examine these regions, so that it will not be overly dependent on information at a specific scale, and further reflects the importance of different regions to the recognition results. This enables the model to use sufficient and diverse information to explain the intrinsic nature of Alzheimer's disease.

[0028] Furthermore, when building a hyperspherical variational autoencoder based on vMF distribution, in order to obtain the potential feature representation of the source domain and the target domain, the Encoder in S-VAE is used to output the average direction parameter μ and the concentration parameter κ. By analyzing these spherical potential representations, the potential learning bias can be explained.

[0029] The use of the Encoder in the S-VAE to output the average direction parameter μ and the concentration parameter κ at least includes the following steps:

[0030] First, the features obtained by the voxel-based 3D feature extraction and fusion module are used as new inputs, and mapped to an output with 256 neurons through a fully connected layer (FC1). Then, the ReLU function is used for activation to obtain x. x passes through a fully connected layer with 128 neurons (FC2) and L2 normalization to obtain μ. At the same time, x passes through a fully connected layer with 1 neuron (FC3) and the Softplus activation function to obtain κ. One is added to the Softplus to prevent the distribution from being too flat, thereby avoiding the distribution collapse caused by too small κ.

[0031] The process can be briefly described as:

[0032] μ(x)=L2(FC 128 (RuLU(FC 256 (x))))

[0033] κ(x)=Softplus(FC1(RuLU(FC 256 (x))))+1

[0034] Among them, FC n It is a fully connected layer consisting of n neurons. L2 means normalization on the last dimension. In addition, Softplus = log(1+e x ), which is used to smooth the growth of values, thereby avoiding numerical instability and ensuring that the output is positive;

[0035] For further optimization, a new feature representation z is sampled in the vMF distribution using the reparameterization technique in the spherical coordinate system. The posterior distribution of z is parameterized by μ and κ, i.e., q(z|x)=q(z|μ(x),κ(x)).

[0036] The re-parameterization technique can effectively solve the problem of non-differentiability that may be caused by directly sampling parameters. The key lies in introducing a parameterization method based on Householder transformation, which eliminates the rotational symmetry of the posterior and maps a vector to a new space to form a new vector. This allows differentiable sampling operations on the hypersphere and retains gradient information, making the model training process more stable and efficient.

[0037] In S-VAE, only the Encoder structure is retained. The latent variable representation learned by the Encoder can provide the potential structural information of the data. By training S-VAE with only the Encoder, we can focus more on optimizing the encoding process and obtain an effective data encoding method to improve the representation ability of latent variables, thereby improving the performance of the model. This is extremely important for constraining feature representation in subsequent cross-domain alignment and separation modules.

[0038] S-VAE is trained by minimizing the KL divergence so that the distribution of the source domain and the target domain in the latent space is as close as possible. The KL divergence loss of S-VAE is:

[0039]

[0040] Among them, D KL is the Kullback-Leibler divergence, which is used to measure the difference between the posterior distribution of the source domain and the posterior distribution of the target domain.

[0041] Furthermore, the alignment stage in S3 includes a first step and a second step, wherein the first step is to implement intra-domain alignment in the source domain, and the second step is to perform cross-domain alignment in the source domain and the target domain.

[0042] Furthermore, in the first step, ClusteredTriplet Loss, an improved version of Triplet Loss, is used to achieve clustering and alignment in the source domain. In this way, the loss function not only considers the traditional triplet loss, but also makes the intra-class distribution in the source domain more compact and the inter-class distribution more dispersed through the constraints of intra-class and inter-class distances, further improving the performance of the model in distinguishing samples of different categories;

[0043] Given an anchor feature representation A positive feature representation and a negative feature representation Clustered Triplet Loss is used as the alignment loss function in the source domain as follows:

[0044]

[0045] in[*] + =max(0,*); and is a source positive pair, i.e., label and are the same; and is a source negative pair, i.e., label and are different; d(·,·) is an inverse cosine function used to calculate the angular distance between feature representations on the hypersphere; m is the minimum angular boundary value between positive and negative feature representations; express The same category set S i Each feature in represents express Different categories of sets D j Each feature in represents; d inter () represents the average angular distance between the feature representation and each feature representation of the same category; d inter () represents the average angular distance between the feature representation and its feature representations of different categories; λ and η are the balance parameters for adjusting the angular distance within and between classes.

[0046] Furthermore, the second step at least includes the following steps:

[0047] First, determine the centroid of the known class feature representation in the source domain, which is the cluster center;

[0048] Then reduce the angular distance d of the Cross-domain Alignment and Separation Module a,p, to achieve feature alignment between samples and centroids;

[0049] At the same time, increase the angular distance d of the Cross-domain Alignment and Separation Module a,n , to achieve horizontal separability between samples of known classes;

[0050] An Adaptive Triplet Loss based on soft boundary value is proposed to constrain the distance from the sample to the centroid. The soft boundary value of each training is continuously adjusted through an adaptive update strategy to make the loss function smoother during the optimization process, thereby better guiding the model to learn features.

[0051] This soft boundary value-based Adaptive Triplet Loss is used as the alignment loss function between the samples in the target domain and the centroids in the source domain.

[0052]

[0053]

[0054] where n t is the number of known class samples in the target domain, and Respectively represent the centroids of the kth and jth categories of patients in the source domain, Indicates the angular distance d a,p , Then the angular distance d a,n . m soft is a soft boundary value, and each training will adaptively update m soft ;

[0055] Therefore, the objective function for aligning the feature representations of the source domain and the target domain on the hypersphere is expressed as:

[0056]

[0057] In addition, considering that unknown class samples in the target domain will cause negative migration to the overall domain adaptation, in the separation stage, it is necessary to force the feature representation of unknown class samples to be far away from the centroid representation of all known classes, that is, to increase the unknown sample angular distance d of the Cross-domain Alignment and Separation Module. unk ;

[0058] Margin-based loss is used to determine the decision boundary between the model for known classes and unknown classes, so as to better distinguish them;

[0059] Guided by Margin-based loss, the model will more carefully distinguish samples of unknown classes from samples of known classes, thereby improving the accuracy and reliability of unknown class separation;

[0060] Use Margin-based loss as separation loss The definition is as follows:

[0061]

[0062] in is the number of target unknown samples, is the number of centroids in the source domain, is the i-th target unknown sample.

[0063] Furthermore, a weighting idea in S4 is an instance-level weight calculation method based on Weibull distribution;

[0064] The instance-level weight calculation method based on Weibull distribution creates a Weibull distribution object by fitting the probability distribution of the sample using the cumulative distribution function of the Weibull model and adjusting the parameter value, and then combines it with the entropy value of the target sample to obtain a redefined weight w, so as to further promote positive migration between known class samples and alleviate the negative migration effect of unknown class samples in the process of feature alignment and domain adaptation;

[0065] The cumulative distribution function of the Weibul distribution is Where a and b are the scale and shape parameters of the Weibull model, which control the scale and determine the shape of the distribution respectively;

[0066] Weibull distribution has greater flexibility and adaptability due to its parameterized characteristics, and can better fit various complex data and adapt to diverse data distributions;

[0067] By defining the instance-level weight w based on the Weibull distribution j ∈[0,1], the calculation method is as follows:

[0068]

[0069] In the above formula: a and b are hyperparameters, H(p) represents the entropy of the target sample, N is the number of known categories, G f G is a voxel-based 3D feature extraction and fusion module. E is a hypersphere VAE, p j,c is the classifier G CAfter the output of σ=Softmax(), it is specifically expressed as the probability distribution {p1,p2,…,p N+1};

[0070] w j represents the weight of the jth target sample. The above formula shows that the weight of the unknown class sample is greater than that of the known class sample, and the contribution of the unknown class target sample in the training process is very small, so 1-w is used. j to reweight the loss of the domain discriminator so that the weights assigned to samples of known classes are larger than the similarity weights assigned to samples of unknown classes;

[0071] By reducing the impact of unknown class samples on domain discriminator training and highlighting the role of known class samples, the aim is to balance the impact of known class and unknown class samples on domain discriminators to achieve domain alignment in shared domains.

[0072] In adversarial learning, weights are added to the target samples to further minimize the domain distribution difference. Therefore, the objective of weighted adversarial learning is defined as:

[0073]

[0074] in is the domain discrimination loss calculated using binary cross entropy loss, D s and D t Represents the sample sets of the source domain and the target domain respectively, and the domain discriminator G D The output of sigmoid(G f (x i )),d i and d j They represent the domain label of the i-th sample in the source domain and the domain label of the j-th sample in the target domain, respectively, and are used to determine whether the sample belongs to the source domain or the target domain. That is, if d = 0, x i ~D s Otherwise x i ~D t .

[0075] Compared with the prior art, the present invention has the following beneficial effects:

[0076] 1. In order to overcome the limitations of single-scale feature extraction, the present invention adds a multi-scale and dual-attention integration module on the basis of the feature extraction network, splices the features under different scales and two attention mechanisms to form a comprehensive feature representation, thereby forming a voxel-based 3D feature extraction and fusion module, which can capture the subtle differences and important features in MRI data, so that MRI data can be effectively processed and analyzed.

[0077] 2. In order to improve the representation ability of latent features, the present invention integrates a variational autoencoder based on hypersphere distribution. The encoder maps the input data to the hypersphere space, that is, the latent variables are constrained on a unit sphere. The distance measurement and geometric properties in the hypersphere space are different from those in the Euclidean space, which can make the model more robust in the face of noise and data disturbances and reduce the risk of overfitting.

[0078] 3. In order to improve the discrimination of latent feature representation, the present invention designs a cross-domain alignment and separation module, and then uses Cluster Triplet Loss to ensure that the intra-class distance is as small as possible and the inter-class distance is as large as possible, so that after domain adaptation, the horizontal separability between known samples is enhanced and the decision boundary between known and unknown categories is determined, thereby better realizing the alignment of known class features and the separation of unknown class features on the hypersphere.

[0079] 4. In order to solve the problem that the loss function based on hard boundary values ​​in metric learning is highly dependent on the selection of boundary values ​​during training, the fixed boundary values ​​lack flexibility and cannot be dynamically adjusted according to the distribution of data. An Adaptive Triplet Loss based on soft boundary values ​​is introduced. Compared with the fixed hard boundary values, the soft boundary values ​​can be dynamically adjusted through an adaptive update strategy. The adaptive soft boundary can dynamically adjust the boundary values ​​according to the characteristics of the sample pairs, so that the model has better adaptability and flexibility on different data sets.

[0080] 5. In order to better fit complex and high-dimensional MRI data and adapt to diverse data distributions, the present invention designs an instance-level weight calculation method based on the Weibull model to construct a new weighted adversarial domain adaptation module, which can further promote the positive transfer in the feature alignment process of known class samples and reduce the negative impact of unknown class samples in the domain adaptation process through the idea of ​​weighting. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0082] Figure 1 It is the overall system framework diagram of the present invention as a whole. DETAILED DESCRIPTION

[0083] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0084] See also Figure 1 A method for building an open domain adaptive Alzheimer's disease diagnosis model includes at least the following steps:

[0085] S1: Building voxel-based feature extraction and fusion modules;

[0086] In order to ensure that the sMRI data space is not destroyed during feature extraction, 3D CNN is used as a feature extraction module to effectively extract high-dimensional features. Since the size of the sMRI data after preprocessing is 150×180×150, in order to ensure that a smaller output feature map of 1×2×1 is obtained, this embodiment designs a 10-layer 3D CNN as the backbone network, in which the kernel size of the first nine layers of convolution (Conv1-Conv9) is set to 3×3×3. The input sMRI data is processed layer by layer through the convolution layer, and high-level abstract features can be gradually learned from low-level features. The kernel size of the last layer of convolution (Conv10) is set to 2×2×2, the purpose is to further reduce the number of parameters and calculations of the model before the linear layer. In addition, a maximum pooling operation is performed every two layers of convolution, the purpose of which is to reduce the spatial dimension of the feature map and obtain a wider range of receptive field information through downsampling, while removing redundant information and retaining key features.

[0087] In order to locate the disease-sensitive area more accurately, this embodiment inserts a dual attention module, namely the Global Attention Mechanism (GAM), after Conv4, Conv6, and Conv8 in the backbone network, and uses channel attention and spatial attention to retain channel and spatial information to enhance the importance of cross-dimensional interaction. Based on the above method, a multi-scale and dual attention aggregation (MDAA) module is designed to solve the problem that the feature information of a single scale cannot fully represent the diversity and complexity of the data. Specifically, this embodiment first uses GAM to process the output features of Conv4, Conv6, and Conv8 respectively, and then performs feature fusion on the processed Conv4 and Conv6 output features together with the output features of Conv10. Such a design also helps to maintain the diversity and hierarchy of information in the network structure, ensuring that deep features can independently play their advantages and provide a richer foundation for the final feature extraction and fusion. By integrating information at different scales and using GAM to assign greater weights to regions with higher disease relevance, the model can more easily learn generalizable features and pay more attention to and examine these regions, so that it will not be overly dependent on information at a specific scale, and further reflects the importance of different regions to the recognition results. This enables the model to use sufficient and diverse information to explain the intrinsic nature of Alzheimer's disease.

[0088] S2: Build hyper-Spherical Variational AutoEncoders (S-VAE) based on vMF (von MisesFisher) distribution;

[0089] The characteristics of high-dimensional data make it challenging to process traditional Gaussian distribution, because Gaussian distribution tends to become very scattered in high-dimensional space, resulting in a decrease in the effectiveness of the distribution. Hyper-Spherical Variational AutoEncoders (S-VAE) based on von MisesFisher (vMF) distribution can better handle the characteristics of these high-dimensional data and provide more stable and effective representations, because vMF distribution converts the latent space from traditional Euclidean space to hyperspherical space, and the regularization effect in the hyperspherical latent space is usually better than the regularization effect of Gaussian distribution in Euclidean space. Mapping these high-dimensional features into the hyperspherical latent space avoids the numerical instability of traditional Gaussian distribution in high-dimensional space. In addition, this can better capture the nonlinear structure of the data, thereby generating a more structured latent feature representation. This method not only helps to capture the intrinsic geometric structure of the data, but also improves the consistency of representations between different domains, thereby achieving domain invariance.

[0090] In order to obtain the potential feature representation of the source domain and the target domain, this embodiment uses the Encoder in S-VAE to output the average direction parameter μ and the concentration parameter κ. By analyzing these spherical potential representations, the potential learning bias can be explained. Specifically, the features obtained by the voxel-based 3D feature extraction and fusion module are first used as new inputs, and an output with 256 neurons is mapped through a fully connected layer (FC1). Then, the ReLU function is used for activation to obtain x, and x passes through a fully connected layer (FC2) with 128 neurons and L2 normalization to obtain μ. At the same time, x passes through a fully connected layer (FC3) with 1 neuron and the Softplus activation function to obtain κ, and one is added to the Softplus to prevent the distribution from being too flat, thereby avoiding the distribution collapse caused by too small κ. The process can be briefly described as:

[0091] μ(x)=L2(FC 128 (RuLU(FC 256 (x))))

[0092] κ(x)=Softplus(FC1(RuLU(FC 256 (x))))+1

[0093] Among them, FC n It is a fully connected layer consisting of n neurons. L2 means normalization on the last dimension. In addition, Softplus = log(1+e x ), which is used to smooth the growth of values, thereby avoiding numerical instability and ensuring that the output is positive.

[0094] For further optimization, the reparameterization technique in the spherical coordinate system is used to sample a new feature representation z in the vMF distribution. The posterior distribution of z is parameterized by μ and κ, that is, q(z|x)=q(z|μ(x),κ(x)). The reparameterization technique can effectively solve the problem of non-differentiability that may be caused when directly sampling parameters. Its key lies in introducing a parameterization method based on Householder transformation, eliminating the rotational symmetry of the posterior, and mapping a vector to a new space to form a new vector, so that differentiable sampling operations can be performed on the hypersphere and gradient information can be retained, making the model training process more stable and efficient. Unlike S-VAE in other works, this embodiment only retains the Encoder structure in S-VAE. The latent variable representation learned by the Encoder can provide the potential structural information of the data. By training the S-VAE with only the Encoder, more attention can be paid to optimizing the encoding process and obtaining an effective data encoding method to improve the representation ability of the latent variables, thereby improving the performance of the model, which is extremely important for the constraints on feature representation in the subsequent cross-domain alignment and separation modules. This example trains S-VAE by minimizing the KL divergence so that the distribution of the source domain and the target domain in the latent space is as close as possible. The KL divergence loss of S-VAE is:

[0095]

[0096] Among them, D KL is the Kullback-Leibler divergence, which is used to measure the difference between the source domain posterior distribution and the target domain posterior distribution. Specifically, it quantifies the relative entropy from the vMF distribution of the source domain potential representation to the vMF distribution of the target domain potential representation.

[0097] S3: Build a cross-domain alignment and separation module based on improved Triplet Loss;

[0098] This module is mainly divided into an alignment stage and a separation stage. The alignment stage is divided into two steps: the first step is to achieve intra-domain alignment in the source domain. The second step is to perform cross-domain alignment in the source domain and the target domain. The traditional Triplet Loss only considers the distance between a single triplet (anchor point, positive sample, negative sample), while the Clustered Triplet Loss introduces constraints on intra-class and inter-class distances, which can improve the generalization and discrimination capabilities of the model. Based on this analysis, in the first step of the alignment stage, this embodiment uses an improved version of Triplet Loss, Clustered Triplet Loss, to achieve clustering and alignment in the source domain. In this way, the loss function not only considers the traditional triplet loss, but also through the constraints of intra-class and inter-class distances, the intra-class distribution in the source domain is more compact and the inter-class distribution is more dispersed, further improving the performance of the model in distinguishing samples of different categories.

[0099] Given an anchor feature representation A positive feature representation and a negative feature representation Clustered Triplet Loss is used as the alignment loss function in the source domain as follows:

[0100]

[0101] in[*] + =max(0,*), and is a source positive pair (i.e. label and are the same), and and is a source negative pair (i.e. label and are different), d(·,·) is an inverse cosine function used to calculate the angular distance between feature representations on the hypersphere, and m is the minimum angular boundary value between positive and negative feature representations. express The same category set S i Each feature in represents express Different categories of sets D j Each feature in represents. intra () represents the average angular distance between the feature representation and each feature representation of the same category, d inter () represents the average angular distance between the feature representation and its different category feature representations. λ and η are the balance parameters for adjusting the intra-class and inter-class angular distances.

[0102] The second step of the alignment phase of this embodiment is to first determine the centroid (cluster center) of the known class feature representation in the source domain, and then reduce Figure 1 The angular distance d of the Cross-domain Alignment and Separation Module a,p , to achieve feature alignment between samples and centroids. At the same time, increase Figure 1 The angular distance d of the Cross-domain Alignment and Separation Module a,n , to achieve horizontal separability between samples of known classes. The traditional boundary value is manually set in advance and is fixed during the training process. This value is often called a hard boundary value. Therefore, this embodiment proposes an Adaptive Triplet Loss based on a soft boundary value to constrain the distance from the sample to the centroid. The soft boundary value of each training is continuously adjusted through an adaptive update strategy to make the loss function smoother during the optimization process, thereby better guiding the model to learn features. This embodiment uses this Adaptive Triplet Loss based on a soft boundary value as the alignment loss function for samples in the target domain and the centroids in the source domain.

[0103]

[0104]

[0105] where n t is the number of known class samples in the target domain, and Respectively represent the centroids of the kth and jth categories of patients in the source domain, Indicates the angular distance d a,p , Then the angular distance d a,n . m soft is a soft boundary value, and each training will adaptively update m soft .

[0106] Therefore, the objective function for aligning the feature representations of the source domain and the target domain on the hypersphere is expressed as:

[0107]

[0108] In addition, considering that unknown class samples in the target domain will cause negative migration to the overall domain adaptation, in the separation stage, it is necessary to force the feature representation of unknown class samples to be far away from the centroid representation of all known classes, that is, to increase Figure 1The unknown sample angular distance d of the Cross-domain Alignment and Separation Module unk This embodiment intends to use the Margin-based loss to determine the decision boundary between the model for known classes and unknown classes, so as to better distinguish them. Guided by the Margin-based loss, the model will more carefully distinguish samples of unknown classes from samples of known classes, thereby improving the accuracy and reliability of unknown class separation. Using Margin-based loss as separation loss The definition is as follows:

[0109]

[0110] in is the number of target unknown samples, is the number of centroids in the source domain, is the i-th target unknown sample.

[0111] S4: Building an adversarial domain adaptation module based on a weighted mechanism. The adversarial domain adaptation module based on a weighted mechanism uses a weighted idea to assign different weights to each sample to adaptively adjust the adversarial training process.

[0112] Since "unknown" target samples lack common features with "known" source categories, "unknown" target samples often have higher source classifier output entropy than "known" target samples. In this regard, this embodiment assumes that if a sample belongs to a known category, the entropy value predicted by the classifier will be very low, and if a sample belongs to an unknown category, the entropy value predicted by the classifier will be very high, and the entropy value can be used to detect and distinguish unknown samples in the target domain.

[0113] In an open set domain adaptation network, traditional adversarial learning may lead to uneven distribution of resources when processing known categories and unknown categories. Since the entropy value of unknown class samples is high, the amount of information contained is also large, and the uncertainty is higher, the model will focus on the unknown class, which may cause the model to be unstable or degraded when facing known categories. Therefore, this embodiment hopes to increase the role of known samples and reduce the role of unknown samples by reducing the weight of unknown target samples and increasing the weight of known class samples in the open set domain adaptation process.

[0114] This embodiment intends to give each sample a different weight through a weighted idea to adaptively adjust the adversarial training process. Specifically, this embodiment designs an instance-level weight calculation method based on Weibull distribution. It creates a Weibull distribution object by fitting the probability distribution of the sample using the cumulative distribution function of the Weibull model and adjusting the parameter value, and then combines it with the entropy value of the target sample to obtain a redefined weight w, so as to further promote positive migration between known class samples and alleviate the negative migration effect of unknown class samples in the feature alignment and domain adaptation process. The cumulative distribution function of Weibull distribution is Where a and b are the scale and shape parameters of the Weibull model, which control the scale and determine the shape of the distribution respectively. The Weibull distribution has greater flexibility and adaptability due to its parameterized characteristics, and can better fit various complex data and adapt to diverse data distributions. In the work of this embodiment, this embodiment defines an instance-level weight w based on the Weibull distribution j ∈[0,1], the calculation method is as follows:

[0115]

[0116]

[0117]

[0118] Where a and b are hyperparameters, H(p) represents the entropy of the target sample, N is the number of known categories, and G f is a voxel-based 3D feature extraction and fusion module, G E is a hypersphere VAE, p j,c is the classifier G C After the output of σ=Softmax(), it is specifically expressed as the probability distribution {p1,p2,…,p N+1}.

[0119] w j represents the weight of the jth target sample. The above formula shows that the weight of the unknown class sample is greater than that of the known class sample, and the contribution of the unknown class target sample in the training process is very small, so this embodiment uses 1-w jTo reweight the loss of the domain discriminator, the weight assigned to the target sample of the known class is greater than the similarity weight assigned to the target sample of the unknown class. By reducing the influence of the unknown class samples on the training of the domain discriminator and highlighting the role of the known class samples, the purpose is to balance the influence of the known class and unknown class samples on the domain discriminator to achieve domain alignment in the shared domain. In adversarial learning, weights are added to the target samples to further minimize the domain distribution difference. Therefore, the objective function of weighted adversarial learning is defined as:

[0120]

[0121] in is the domain discrimination loss calculated using binary cross entropy loss, D s and D t Represents the sample sets of the source domain and the target domain respectively, and the domain discriminator G D The output of sigmoid(G f (x i )),d i and d j They represent the domain label of the i-th sample in the source domain and the domain label of the j-th sample in the target domain, respectively, and are used to determine whether the sample belongs to the source domain or the target domain. That is, if d = 0, x i ~D s Otherwise x i ~D t .

[0122] S5: Through the integration of the above modules, a more stable and robust model is built, which can effectively identify known class samples and accurately detect unknown class samples. The loss function of the final network model is as follows:

[0123]

[0124] in is the cross entropy classification loss of the source domain, is the KL divergence loss of the hypersphere VAE, and They are respectively expressed as the alignment loss of known class feature representation and the separation loss of unknown class feature representation, To weight the adversarial loss, α, β, and γ are used as hyperparameters to balance the three losses.

[0125] Through the above-mentioned embodiments, it can be known that:

[0126] 1. The representation ability of latent features is improved by integrating the Hyperspherical Variational Autoencoder (S-VAE), and only the Encoder structure is retained, with the goal of learning the latent feature representation of the sample and focusing only on the optimization process of encoding. S-VAE uses the vMF distribution as the prior and posterior distribution, transforming the latent space into a hypersphere, which can more effectively capture the nonlinear structure of the data, thereby enhancing the modeling ability of the latent feature representation.

[0127] 2. In order to better fit complex high-dimensional data and adapt to more diverse data distributions, an instance-level weight calculation method based on Weibull distribution is proposed to construct a new weighted adversarial domain adaptation module to promote positive transfer between known class samples in the feature alignment process and alleviate the negative impact of unknown class samples in the domain adaptation process.

[0128] 3. Taking advantage of the global attention mechanism and multi-scale feature fusion, a multi-scale and dual-attention aggregation module is designed on the backbone network of the voxel-based 3D feature extraction and fusion module, which can not only effectively extract the global spatiotemporal features of MRI, but also improve the recognition ability of complex structural data and enhance the model's perception of information at different scales, thereby further realizing the accurate positioning of disease-sensitive areas.

[0129] 4. Based on the improvement and optimization based on triplet loss and boundary loss, two alignment losses and one separation loss are proposed to build a cross-domain alignment and separation module. The known class features of the source domain and the target domain are aligned on the hypersphere through the alignment loss to achieve intra-class compactness and inter-class sparsity, thereby enhancing the horizontal separability between known samples. In addition, the separation loss is used to constrain the centroid distance between unknown samples and known samples in the target domain to determine the decision boundary between known classes and unknown classes, thereby improving the accuracy and reliability of separating unknown classes.

[0130] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A method for building an open domain adaptive Alzheimer's disease diagnostic model, characterized by: At least the following steps are included: S1: Build a voxel-based feature extraction and fusion module. In order to ensure that the sMRI data space is not destroyed during feature extraction, 3D CNN is used as a feature extraction module to effectively extract high-dimensional features. S2: Build a hypersphere variational autoencoder based on vMF distribution. The hypersphere variational autoencoder based on vMF distribution can better handle the characteristics of high-dimensional data and provide a more stable and effective representation. S3: Building a cross-domain alignment and separation module based on improved Triplet Loss, wherein the cross-domain alignment and separation module based on improved Triplet Loss includes an alignment stage and a separation stage; S4: Building an adversarial domain adaptation module based on a weighted mechanism. The adversarial domain adaptation module based on a weighted mechanism uses a weighted idea to assign different weights to each sample to adaptively adjust the adversarial training process. S5: Through the integration of the above modules, a more stable and robust model is built, which can effectively identify known class samples and accurately detect unknown class samples. The loss function of the final network model is as follows: in is the cross entropy classification loss of the source domain, is the KL divergence loss of the hypersphere VAE, and They are respectively expressed as the alignment loss of known class feature representation and the separation loss of unknown class feature representation, To weight the adversarial loss, α, β, and γ are used as hyperparameters to balance the three losses.

2. A method for building an open domain adaptive Alzheimer's disease diagnostic model according to claim 1, characterized in that: The S1 at least comprises the following steps: Since the size of the sMRI data after preprocessing is 150×180×150, in order to ensure a smaller output feature map of 1×2×1, a 10-layer 3D CNN was designed as the backbone network, in which the kernel size of the first nine convolution layers was set to 3×3×3; By processing the input sMRI data layer by layer through the convolutional layer, high-level abstract features can be gradually learned from low-level features; The kernel size of the last convolution layer is set to 2×2×2, in order to further reduce the number of model parameters and computation before the linear layer. In addition, a maximum pooling operation is performed after every two layers of convolution. The purpose is to reduce the spatial dimension of the feature map and obtain a wider receptive field information through downsampling, while removing redundant information and retaining key features. In order to locate the disease-sensitive areas more accurately, a dual attention module, namely the global attention mechanism, is inserted after Conv4, Conv6, and Conv8 in the backbone network. It uses channel attention and spatial attention to retain channel and spatial information to enhance the importance of cross-dimensional interactions. A multi-scale and dual-attention aggregation module is designed to solve the problem that feature information of a single scale cannot fully represent the diversity and complexity of data.

3. A method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 2, characterized in that: The design of a multi-scale and dual attention aggregation module includes at least the following steps: first, using GAM to process the output features of Conv4, Conv6 and Conv8 respectively, and then fusing the processed Conv4 and Conv6 output features with the output features of Conv10. This design also helps to maintain the diversity and hierarchy of information in the network structure, ensuring that deep features can independently play their advantages, and providing a richer foundation for the final feature extraction and fusion.

4. The method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 1, characterized in that: When building a hyperspherical variational autoencoder based on vMF distribution, in order to obtain the potential feature representation of the source domain and the target domain, the Encoder in S-VAE is used to output the average direction parameter μ and the concentration parameter κ. By analyzing these spherical potential representations, the potential learning bias can be explained. The use of the Encoder in the S-VAE to output the average direction parameter μ and the concentration parameter κ at least includes the following steps: First, the features obtained by the voxel-based 3D feature extraction and fusion module are used as new inputs, and mapped to an output with 256 neurons through a fully connected layer (FC1). Then, the ReLU function is used for activation to obtain x. x passes through a fully connected layer with 128 neurons (FC2) and L2 normalization to obtain μ. At the same time, x passes through a fully connected layer with 1 neuron (FC3) and the Softplus activation function to obtain κ. One is added to the Softplus to prevent the distribution from being too flat, thereby avoiding the distribution collapse caused by too small κ. The process can be briefly described as: μ(x)=L2(FC 128 (RuLU(FC 256 (x)))) K(x)=Softplus(FC1(RuLU(FC 256 (x))))+1 Among them, FC n It is a fully connected layer consisting of n neurons. L2 means normalization on the last dimension. In addition, Softplus = log(1+e x ), which is used to smooth the growth of values, thereby avoiding numerical instability and ensuring that the output is positive; For further optimization, a new feature representation z is sampled from the vMF distribution using the reparameterization technique in the spherical coordinate system. The posterior distribution of z is parameterized by μ and k, i.e., q(z|x)=q(z|μ(x), k(x)). The re-parameterization technique can effectively solve the problem of non-differentiability that may be caused by directly sampling parameters. The key lies in introducing a parameterization method based on Householder transformation, which eliminates the rotational symmetry of the posterior and maps a vector to a new space to form a new vector. This allows differentiable sampling operations on the hypersphere and retains gradient information, making the model training process more stable and efficient. In S-VAE, only the Encoder structure is retained. The latent variable representation learned by the Encoder can provide the potential structural information of the data. By training S-VAE with only the Encoder, we can focus more on optimizing the encoding process and obtain an effective data encoding method to improve the representation ability of latent variables, thereby improving the performance of the model. This is extremely important for constraining feature representation in subsequent cross-domain alignment and separation modules. S-VAE is trained by minimizing the KL divergence so that the distribution of the source domain and the target domain in the latent space is as close as possible. The KL divergence loss of S-VAE is: Among them, D KL is the Kullback-Leibler divergence, which is used to measure the difference between the posterior distribution of the source domain and the posterior distribution of the target domain.

5. The method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 1, characterized in that: The alignment stage in S3 includes a first step and a second step, wherein the first step is to implement intra-domain alignment in the source domain, and the second step is to perform cross-domain alignment in the source domain and the target domain.

6. A method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 5, characterized in that: In the first step, Clustered TripletLoss, an improved version of Triplet Loss, is used to achieve clustering and alignment in the source domain. In this way, the loss function not only considers the traditional triplet loss, but also makes the intra-class distribution in the source domain more compact and the inter-class distribution more dispersed through the constraints of intra-class and inter-class distances, further improving the performance of the model in distinguishing samples of different categories; Given an anchor feature representation A positive feature representation and a negative feature representation Clustered Triplet Loss is used as the alignment loss function in the source domain as follows: in[*] + =max(0,*); and is a source positive pair, i.e., label and are the same; and is a source negative pair, i.e., label and are different; d(·,·) is an inverse cosine function used to calculate the angular distance between feature representations on the hypersphere; m is the minimum angular boundary value between positive and negative feature representations; express The same category set S i Each feature in represents express Different categories of sets D j Each feature in represents; d intra () represents the average angular distance between the feature representation and each feature representation of the same category; d inter () represents the average angular distance between the feature representation and its feature representations of different categories; λ and η are the balance parameters for adjusting the angular distance within and between classes.

7. A method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 6, characterized in that: The second step at least includes the following steps: First, determine the centroid of the known class feature representation in the source domain, which is the cluster center; Then reduce the angular distance d of the Cross-domain Alignment and Separation Module a,p , to achieve feature alignment between samples and centroids; At the same time, increase the angular distance d of the Cross-domain Alignment and Separation Module a,n , to achieve horizontal separability between samples of known classes; An Adaptive Triplet Loss based on soft boundary value is proposed to constrain the distance from the sample to the centroid. The soft boundary value of each training is continuously adjusted through an adaptive update strategy to make the loss function smoother during the optimization process, thereby better guiding the model to learn features. This soft boundary value-based Adaptive Triplet Loss is used as the alignment loss function between the samples in the target domain and the centroids in the source domain. where n t is the number of known class samples in the target domain, and Respectively represent the centroids of the kth and jth categories of patients in the source domain, Indicates the angular distance d a,p , Then the angular distance d a,n , m soft is a soft boundary value, and each training will adaptively update m soft ; Therefore, the objective function for aligning the feature representations of the source domain and the target domain on the hypersphere is expressed as: In addition, considering that unknown class samples in the target domain will cause negative migration to the overall domain adaptation, in the separation stage, it is necessary to force the feature representation of unknown class samples to be far away from the centroid representation of all known classes, that is, to increase the unknown sample angular distance d of the Cross-domain Alignment and Separation Module. unk ; Margin-based loss is used to determine the decision boundary between the model for known classes and unknown classes, so as to better distinguish them; Guided by Margin-basedloss, the model will more carefully distinguish samples of unknown classes from samples of known classes, thereby improving the accuracy and reliability of unknown class separation; Use Margin-basedloss as separation loss The definition is as follows: in is the number of target unknown samples, is the number of centroids in the source domain, is the i-th target unknown sample.

8. The method for building an open domain adaptive Alzheimer's disease diagnosis model according to claim 1, characterized in that: One weighting idea in S4 is an instance-level weight calculation method based on Weibull distribution; The instance-level weight calculation method based on Weibull distribution creates a Weibull distribution object by fitting the probability distribution of the sample using the cumulative distribution function of the Weibull model and adjusting the parameter value, and then combines it with the entropy value of the target sample to obtain a redefined weight w, so as to further promote positive migration between known class samples and alleviate the negative migration effect of unknown class samples in the process of feature alignment and domain adaptation; The cumulative distribution function of the Weibul distribution is Where a and b are the scale and shape parameters of the Weibull model, which control the scale and determine the shape of the distribution respectively; Weibull distribution has greater flexibility and adaptability due to its parameterized characteristics, and can better fit various complex data and adapt to diverse data distributions; By defining the instance-level weight w based on the Weibull distribution j ∈[0,1], the calculation method is as follows: In the above formula: a and b are hyperparameters, slice (p) represents the entropy of the target sample, N is the number of known categories, G f is a voxel-based 3D feature extraction and fusion module, G E is a hypersphere VAE, p j,c is the classifier G C The output of σ = Softmax() is specifically expressed as the probability distribution {p1, p2, ..., pN+1} of the jth sample in the target domain being predicted as the cth category; w j represents the weight of the jth target sample. The above formula shows that the weight of the unknown class sample is greater than that of the known class sample, and the contribution of the unknown class target sample in the training process is very small, so 1-w is used. j to reweight the loss of the domain discriminator so that the weights assigned to samples of known classes are larger than the similarity weights assigned to samples of unknown classes; By reducing the impact of unknown class samples on domain discriminator training and highlighting the role of known class samples, the aim is to balance the impact of known class and unknown class samples on the domain discriminator to achieve domain alignment in the shared domain; In adversarial learning, weights are added to the target samples to further minimize the domain distribution difference. Therefore, the objective of weighted adversarial learning is defined as: in is the domain discrimination loss calculated using binary cross entropy loss, D s and D t Represents the sample sets of the source domain and the target domain respectively, and the domain discriminator G D The output of sigmoid(G f (x i )),d i and d j They represent the domain label of the i-th sample in the source domain and the domain label of the j-th sample in the target domain, respectively, and are used to determine whether the sample belongs to the source domain or the target domain. That is, if d = 0, x i ~D s Otherwise x i ~D t .