Graph-level unsupervised domain adaptation method and system for verifying pseudo labels based on neighborhood evidence
Patent Information
- Application Number
- CN202611294040.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-10-23
AI Technical Summary
[0009]本发明目的是为了解决无源部署条件下增强图的标签保持性不足、目标域伪标签在域偏移下不可靠以及错误监督被自训练放大的问题,本发明提供了一种基于邻域证据验证伪标签的图级无源域适应方法及系统
[0042]本发明方法先保证输入质量(增强图语义不失真),再验证监督信号质量(伪标签可靠与否),最后控制训练过程质量(梯度更新不被噪声带偏),依次设置质量控制,形成从数据到训练的全链路质量控制。
Smart Images

Figure CN122964593A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of artificial intelligence, graph machine learning, and passive domain adaptation. Background Technology
[0002] Domain adaptation aims to address the performance degradation problem when the distribution of training data differs from the distribution of actual deployment data. Conventional unsupervised domain adaptation accesses both labeled source domain samples and unlabeled target domain samples during the training phase, improving target domain performance through distribution alignment or joint training. Source-Free Domain Adaptation (SFDA), however, addresses more stringent deployment conditions: after model delivery, source domain samples cannot be retained or transmitted due to privacy, intellectual property, storage, or compliance requirements; therefore, the adaptation phase can only use the published source model and unlabeled target data. J. Liang et al., in "Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation" (ICML 2020, pp. 6028-6039), proposed freezing the source classifier and adjusting the source hypothesis transfer method for the target feature extractor, providing a fundamental paradigm for SFDA.
[0003] Graph-level source-domain adaptation uses the complete graph as the prediction target. In tasks such as molecular attribute prediction and compound bioactivity prediction, the source domain can correspond to one experimental determination, molecular skeleton, or molecular size distribution, while the target domain corresponds to another distribution that has shifted. During adaptation, typically only a pre-trained source graph classifier and an unlabeled target graph are available; the source graph and its labels are not yet available. Unlike continuous perturbations in images, transformations of nodes, edges, or local fragments in a graph are discrete; even small and formally effective structural changes can alter graph-level semantics.
[0004] Existing graph-level passive domain adaptation schemes mainly fall into two categories: selection and alignment, and reconstruction and consistency. J. Luo et al., in "Rank and Align: Towards Effective Source-Free Graph Domain Adaptation" (IJCAI 2024, pp. 4706-4714), selected the target graph and extracted domain-invariant subgraphs by ranking the graphs according to inter-graph relationships. J. Luo et al., in "GALA: Graph Diffusion-Based Alignment with Jigsaw for Source-Free Domain Adaptation" (IEEE TPAMI, 2024, Vol. 46, No. 12, pp. 9038-9051), constructed the adaptation signal through diffusion reconstruction and graph splicing consistency. These methods can utilize the target graph structure, but they still have the following problems.
[0005] First, existing methods typically design graph selection, reconstruction, consistency, or pseudo-labeling to refine the target separately, lacking a unified modeling framework that simultaneously describes "how the target-side augmentation data is selected" and "how the target model responds to the selected augmentation data".
[0006] Second, the formal effectiveness of graph enhancement is not equivalent to label preservation. In molecular graphs, two molecules may have high fingerprint similarity, but their active labels may be opposite, i.e., local structure-label discontinuity occurs. The paper's experiments observed highly similar graph pairs with Tanimoto similarities of 0.948 and 0.935 but opposite labels in OGBG-MolBACE, and highly similar flipped label graph pairs were also statistically analyzed in all five datasets analyzed. Therefore, directly assigning pseudo-labels to structurally similar enhanced graphs may introduce conflicting supervisory signals.
[0007] Third, the pseudo-labels generated by the source model under the target domain distribution shift lack calibration. If high-confidence source predictions are used directly for self-training, or if the predictions are propagated to the augmentation map through consistency constraints, erroneous pseudo-labels will be repeatedly reinforced, forming confirmation bias. Relying solely on structural similarity (fingerprint similarity) or solely on feature distance cannot simultaneously guarantee that the candidate map satisfies domain validity, structural relevance to the original image, and proximity in the representation space.
[0008] The above problems stem from two related defects: First, the augmented map formed after target map augmentation is assumed to be a label-preserving sample by default, lacking modeling as evidence to be verified, and the insufficient label preservation is prone to introducing erroneous supervision signals; Second, pseudo-label verification is independent of the augmentation selection process, without neighborhood support, and the pseudo-labels in the target domain are unreliable under domain shift; Furthermore, the superposition of the two defects amplifies the erroneous supervision during self-training, ultimately leading to low target domain classification accuracy and unstable adaptation effect. These problems urgently need to be solved. Summary of the Invention
[0009] The purpose of this invention is to address the problems of insufficient label retention in augmented graphs under passive deployment conditions, unreliable pseudo-labels in the target domain under domain offset, and amplification of erroneous supervision by self-training. This invention provides a graph-level passive domain adaptation method and system based on neighborhood evidence to verify pseudo-labels.
[0010] A graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels, which includes:
[0011] S1. Obtain the source predictor that has been trained on the labeled source domain and the unlabeled dataset of the target domain. Initialize the parameters of the target encoder and target prediction head in the target predictor to the parameters of the source encoder and source prediction head in the trained source predictor, and freeze the target prediction head parameters. At the same time, initialize the cumulative evidence set to an empty set.
[0012] S2. Randomly select a batch of original target images from the unlabeled dataset of the target domain to generate a candidate set for graph augmentation. Perform validity checks on the candidate augmentation images in the candidate set and select valid candidate augmentation images. Based on the molecular fingerprint similarity and feature distance between each original target image and its corresponding valid candidate augmentation images, filter the valid candidate augmentation images to obtain the joint neighborhood set corresponding to the original target image. Both the original target image and the valid candidate augmentation images are molecular structure images.
[0013] S3. Use the current target predictor to generate initial pseudo-labels and confidence scores for each original target map;
[0014] The current target predictor is used to perform binary classification prediction on each effective candidate augmentation map in each joint neighborhood set, and the predicted class and its confidence score are output. Based on the predicted class and confidence score of each effective candidate augmentation map in each joint neighborhood set, the neighborhood support degree of the same class and opposite class to which the corresponding initial pseudo label belongs is determined.
[0015] S4. Verify the initial pseudo-labels: Compare the neighborhood support levels of the same and opposite categories corresponding to each initial pseudo-label. When the same category support level meets the confirmation condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is retained, and the confidence level of the initial pseudo-label is corrected to the same category support level. The initial pseudo-label is then used as the verified label. When the opposite category support level meets the correction condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is corrected to the opposite category, and the confidence level of the initial pseudo-label is corrected to the opposite category support level. When the relationship between the neighborhood support levels of the same and opposite categories meets the rejection condition, it indicates that the original target map corresponding to the initial pseudo-label has failed the verification, and the original target map is rejected.
[0016] S5. Cumulative evidence set update: The original target maps that have passed verification, along with their corresponding verified labels and confidence scores, are used as basic training samples. The candidate augmentation maps in each joint neighborhood set that are consistent with their corresponding verified labels, along with their predicted categories and confidence scores, are used as augmentation training samples and then added to the cumulative evidence set.
[0017] S6. Parameter Update: Calculate the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set, and use it to update the target encoder parameters in the current target predictor while keeping the target prediction head parameters frozen.
[0018] S7. Repeat steps S2 to S6 for the preset number of rounds to obtain the adapted target predictor.
[0019] Preferably, in step S2, the method for performing validity checks on the candidate augmentation graphs in the candidate set and selecting valid candidate augmentation graphs is as follows: the validity of each candidate augmentation graph is determined by performing a graph structure legality check on each candidate augmentation graph using a binary validity indicator function.
[0020] The binary validity indicator function is 1 when it indicates that the candidate augmentation graph is valid, and 0 when it indicates that the candidate augmentation graph is invalid.
[0021] Preferably, in step S2, the method for filtering the effective candidate enhancement graphs to obtain the joint neighborhood set corresponding to the original target graph is as follows:
[0022] All valid candidate augmented images corresponding to each original target image are subjected to double screening, and only valid candidate augmented images that simultaneously meet the following conditions are retained: molecular fingerprint similarity is not lower than the molecular fingerprint similarity threshold and feature distance does not exceed the feature distance threshold. The valid candidate augmented images retained after double screening are used to form the joint neighborhood set corresponding to the original target image.
[0023] Preferably, in step S3, the method for generating initial pseudo-labels and confidence scores for each original target map using the current target predictor is as follows:
[0024] The current target predictor is used to perform binary classification prediction on each original target image, outputting the predicted category and its confidence level, and the output predicted category is used as the initial pseudo label.
[0025] Preferably, in step S3, based on the predicted category and confidence level corresponding to each effective candidate augmentation map in each joint neighborhood set, the neighborhood support level of the initial pseudo-label belonging to the same category and opposite category is determined as follows:
[0026] The neighborhood support level of the same category as the initial pseudo-label is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, which is the same category as the initial pseudo-label.
[0027] The neighborhood support level of the opposite category to which the initial pseudo-label belongs is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, that are in the same category as the initial pseudo-label.
[0028] Preferably, in step S4,
[0029] The confirmation condition is: among all the predicted categories corresponding to the effective candidate augmentation maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the category to which the initial pseudo-label belongs is greater than the proportion of the category to which the initial pseudo-label belongs.
[0030] The correction condition is: among all the predicted categories corresponding to the effective candidate augmented maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is greater than the proportion of the opposite category to which the initial pseudo-label belongs.
[0031] The rejection condition is: among all the predicted categories of all valid candidate augmented maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is equal to the proportion of the opposite category to which the initial pseudo-label belongs.
[0032] Preferably, in step S2, the graph enhancement of the original target graph is achieved by using fragment replacement or fragment growth operations that are compatible with the local chemical context.
[0033] Preferably, in step S6, the method for calculating the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set is as follows:
[0034] The updated cumulative evidence set is used to train the current target predictor in one round.
[0035] After training, the loss generated by each training sample is weighted by confidence score to obtain the confidence-weighted total binary classification loss for this round of training; where,
[0036] The molecular structure diagrams in each training sample are used as input data for the model, and the predicted category or the validated label corresponding to the training sample is used as the ground truth.
[0037] Preferably, the first Confidence-weighted binary classification total loss during round training The expression is:
[0038] ;
[0039] in, For the first The total weights of the training rounds, , For the first The updated set of evidence corresponding to each round of training. For the first The confidence level of each training sample. The loss function is for graph-level binary classification. For target predictor pair The predicted category is output during category prediction. For the first Molecular structure diagrams of the training samples, For the first The validated label or predicted category of each training sample. It is an integer.
[0040] A graph-level passive domain adaptation system based on neighborhood evidence verification of pseudo-labels includes a storage device, a processor, and a computer program stored in the storage device and executable on the processor. The processor executes the computer program to implement the graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels as described above.
[0041] The beneficial effects of this invention are:
[0042] The method of this invention first ensures the quality of the input (enhancing the semantics of the graph without distortion), then verifies the quality of the supervision signal (whether the pseudo-label is reliable), and finally controls the quality of the training process (ensuring that gradient updates are not biased by noise). By setting quality controls in sequence, a full-link quality control from data to training is formed.
[0043] This invention first performs triple screening on candidate augmented images based on validity, molecular fingerprint similarity, and feature distance to ensure semantic consistency between the augmented image and the original target image. Then, it verifies the initial pseudo-labels through neighborhood voting and performs retention, correction, or rejection based on the voting results. Finally, only samples that pass the verification are allowed to enter the cumulative evidence set, the confidence-weighted binary classification total loss is calculated, the target encoder parameters are updated, and the target prediction head parameters are kept frozen at all times. This systematically solves the problems of insufficient label retention in augmented images, unreliable pseudo-labels under domain offset, and the amplification of erroneous supervision by self-training.
[0044] This invention transforms augmentation maps from "directly supervised samples" into "evidence to be verified." By jointly gating effectiveness, structural similarity, and feature proximity, it reduces the risk of invalid augmentation, excessive structural changes, and candidates with similar structures but deviating representations entering the training process. It also provides a clear control path for the label flipping problem caused by local structure-label discontinuity.
[0045] This invention performs confirmation, correction, or rejection based on the degree of class support of the predicted class of the effective candidate augmentation graph in the joint neighborhood set for the initial pseudo-label. No supervision is generated when evidence is insufficient; however, when strong contradictory evidence is formed in the neighborhood, the initial pseudo-label can be corrected, thereby mitigating the confirmation bias caused by the continuous reinforcement of erroneous pseudo-labels under domain shifts during self-training.
[0046] This invention is applicable to passive domain adaptation scenarios in the fields of molecular property prediction and drug discovery. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the overall framework of the graph-level passive domain adaptation method for verifying pseudo-labels based on neighborhood evidence, as proposed in this invention.
[0048] Figure 2 This is a schematic diagram for obtaining the joint neighborhood set;
[0049] Figure 3 This is a schematic diagram illustrating the principle of verifying the initial pseudo-label;
[0050] Figure 4 To perform a binary classification task on the OGBG-MolHIV data subset using the target predictor and source predictor obtained by this method, the ROC curves of the relative ability to distinguish between the two classes are obtained.
[0051] Figure 5 To perform a binary classification task on the data subset OGBG-MoIBACE using the target predictor and source predictor obtained by this method, the ROC curves of the relative ability to distinguish between the two classes are obtained.
[0052] Figure 6To perform a binary classification task on the data subset OGBG-MolBBBP using the target predictor and source predictor obtained by this method, the ROC curve of the relative ability to distinguish between the two classes is obtained.
[0053] Figure 7 To use the target predictor and source predictor obtained by this method to perform a binary classification task on the data subset DrugOOD CoreEC50 Assay, the ROC curve of the relative ability to distinguish between the two classes is obtained.
[0054] Figure 8 To perform a binary classification task on the data subset DrugOOD CoreEC50 Size using the target predictor and source predictor obtained by this method, the ROC curves of the relative ability to distinguish between the two classes are obtained.
[0055] Figure 9 To use the target predictor and source predictor obtained by this method to perform a binary classification task on the data subset DrugOOD RefinedEC50 Assay, the ROC curve of the relative ability to distinguish between the two classes is obtained.
[0056] Figure 10 To perform a binary classification task on the data subset DrugOOD RefinedEC50 Size using the target predictor and source predictor obtained by this method, the ROC curve of the relative ability to distinguish between the two classes is obtained.
[0057] Figure 11 To perform a binary classification task on the data subset DrugOOD RefinedKI Assay using the target predictor and source predictor obtained by this method, the ROC curves of the relative ability to distinguish between the two classes are obtained.
[0058] Figure 12 To demonstrate the relative ability of the target predictor and source predictor obtained by this method to perform a binary classification task on the data subset DrugOOD RefinedKI Size, the ROC curves of the two classes are obtained. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0061] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0062] Specific Implementation Method 1: Combination Figure 1 This embodiment describes a graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels. The method includes:
[0063] S1. Obtain the source predictor that has been trained on the labeled source domain and the unlabeled dataset of the target domain. Initialize the parameters of the target encoder and target prediction head in the target predictor to the parameters of the source encoder and source prediction head in the trained source predictor, and freeze the target prediction head parameters. At the same time, initialize the cumulative evidence set to an empty set.
[0064] S2, see also Figure 2 A batch of original target graphs are randomly selected from the unlabeled dataset of the target domain to generate a candidate set for graph augmentation. The validity of the candidate augmentation graphs in the candidate set is checked, and the valid candidate augmentation graphs are selected.
[0065] Based on the molecular fingerprint similarity and feature distance between each original target image and its corresponding effective candidate enhancement images, the effective candidate enhancement images are screened to obtain the joint neighborhood set corresponding to the original target image.
[0066] Both the original target image and the effective candidate enhancement image are molecular structure diagrams;
[0067] S3. Use the current target predictor to generate initial pseudo-labels and confidence scores for each original target map;
[0068] The current target predictor is used to perform binary classification prediction on each effective candidate augmentation map in each joint neighborhood set, and the predicted class and its confidence score are output. Based on the predicted class and confidence score of each effective candidate augmentation map in each joint neighborhood set, the neighborhood support degree of the same class and opposite class to which the corresponding initial pseudo label belongs is determined.
[0069] S4, see also Figure 3 Verify the initial pseudo-labels: compare the degree of neighborhood support with the corresponding class and opposite class of each initial pseudo-label.
[0070] When the support level of the same category meets the confirmation condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is retained, and the confidence level of the initial pseudo-label is corrected to the support level of the same category. The initial pseudo-label is then used as the verified label.
[0071] When the degree of support for the opposite category meets the correction condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is corrected to the opposite category, and the confidence of the initial pseudo-label is corrected to the degree of support for the opposite category.
[0072] When the relationship between the neighborhood support levels of similar and anti-classes satisfies the rejection condition, it indicates that the original target map corresponding to the initial pseudo-label has failed the validation and is rejected.
[0073] S5. Cumulative evidence set update: The original target maps that have passed verification, along with their corresponding verified labels and confidence scores, are used as basic training samples. The candidate augmentation maps in each joint neighborhood set that are consistent with their corresponding verified labels, along with their predicted categories and confidence scores, are used as augmentation training samples and then added to the cumulative evidence set.
[0074] S6. Parameter Update: Calculate the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set, and use it to update the target encoder parameters in the current target predictor while keeping the target prediction head parameters frozen.
[0075] S7. Repeat steps S2 to S6 for the preset number of rounds to obtain the adapted target predictor.
[0076] This invention enables graph-level passive domain adaptation in molecular structure diagram scenarios. It constructs a joint neighborhood set using graph enhancement and utilizes neighborhood evidence to verify, confirm, correct, or reject initial pseudo-labels generated for the target domain. The target encoder is updated iteratively using a confidence-weighted loss based on the accumulated evidence set, while maintaining frozen target prediction head parameters. Multiple iterations yield a target predictor adapted to the target domain. This addresses the problems of unlabeled target domains, high pseudo-label noise (insufficient retention), unreliable labels, and the amplification of erroneous supervision through self-training in passive domain adaptation scenarios, thereby improving the performance of molecular structure diagrams. Figure 2 Generalization and prediction accuracy of the target domain model for classification tasks.
[0077] This invention can reduce the confirmation bias of erroneous pseudo-labels. Specifically, by constructing a joint neighborhood set, the candidate enhancement map is first screened by validity, molecular fingerprint similarity and feature distance. Then, neighborhood evidence is used to confirm, correct or reject the source pseudo-labels, which effectively avoids the erroneous pseudo-labels generated by the source model under the target domain shift being repeatedly reinforced by self-training.
[0078] This invention can improve the stability and reliability of adaptation by including only the verified original and augmented graphs in the evidence set for model updates. When the evidence is insufficient, supervision is refused, thus avoiding unreliable augmented samples from contaminating the training process.
[0079] This invention employs a progressively adaptive approach with alternating optimization in two layers. It utilizes the alternating execution of outer-layer evidence construction and inner-layer model updates to improve the quality of evidence with each round of model updates and enhance the model's adaptability with the accumulation of evidence, thereby achieving a stable improvement in the performance of the target domain.
[0080] Furthermore, in step S2, the effectiveness check of the candidate augmentation graphs in the candidate set and the selection of effective candidate augmentation graphs are implemented as follows:
[0081] The validity of each candidate augmentation graph is determined by checking the graph structure legality of each candidate augmentation graph using a binary validity indicator function.
[0082] The binary validity indicator function is 1 when it indicates that the candidate augmentation graph is valid, and 0 when it indicates that the candidate augmentation graph is invalid.
[0083] In this preferred approach, a binary validity indicator function is used to check the graph structure legality of each candidate enhancement graph. Invalid molecular graphs are eliminated before entering the subsequent double screening, reducing downstream computational overhead and preventing invalid structures from entering the joint neighborhood set and cumulative evidence set, thus ensuring the chemical validity of the training samples.
[0084] Furthermore, in step S2, the effective candidate augmentation graphs are filtered to obtain the joint neighborhood set corresponding to the original target graph. This is achieved as follows:
[0085] All valid candidate augmented images corresponding to each original target image are subjected to double screening, and only valid candidate augmented images that simultaneously meet the following conditions are retained: molecular fingerprint similarity is not lower than the molecular fingerprint similarity threshold and feature distance does not exceed the feature distance threshold. The valid candidate augmented images retained after double screening are used to form the joint neighborhood set corresponding to the original target image.
[0086] In this preferred approach, a dual screening rule is imposed on the joint neighborhood set, simultaneously constraining two indicators: molecular fingerprint similarity and feature distance. Neighborhood samples are constrained from both the molecular chemical level (molecular fingerprint) and the model feature representation level, selecting enhanced graphs with similar chemical structures and close feature spaces to construct the neighborhood set; samples with excessively large deviations in chemical semantics or features are excluded, ensuring that neighborhood evidence has reference value and improving the reliability of pseudo-label verification results.
[0087] Furthermore, in step S3, the method for generating initial pseudo-labels and confidence scores for each original target map using the current target predictor is as follows:
[0088] The current target predictor is used to perform binary classification prediction on each original target image, outputting the predicted category and its confidence level, and the output predicted category is used as the initial pseudo label.
[0089] In this preferred embodiment, the initial pseudo-label and confidence level generation methods are limited, and the target predictor is directly used to predict the original target. Figure 2 The classification prediction results serve as initial pseudo-labels. This method generates initial pseudo-labels for target domain samples simply and efficiently, providing a benchmark for subsequent neighborhood evidence verification and adapting to the constraints of passive scenarios without real labels.
[0090] Furthermore, in step S3, based on the predicted category and confidence level corresponding to each valid candidate augmentation map in each joint neighborhood set, the neighborhood support level of the initial pseudo-label belonging to the same category and the opposite category is determined as follows:
[0091] The neighborhood support level of the same category as the initial pseudo-label is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, which is the same category as the initial pseudo-label.
[0092] The neighborhood support level of the opposite category to which the initial pseudo-label belongs is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, that are in the same category as the initial pseudo-label.
[0093] In this preferred embodiment, the neighborhood support level is quantified by the predicted class distribution (proportion of same class and opposite class) of all valid candidate augmentation maps in the joint neighborhood set. This makes the verification conclusion based on the consensus of the neighborhood group rather than the prediction of a single augmentation map, avoiding misjudgment due to the prediction noise of individual candidate augmentation maps and improving the statistical reliability of pseudo-label verification.
[0094] Furthermore, in step S4,
[0095] The confirmation condition is: among all the predicted categories corresponding to the effective candidate augmentation maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the category to which the initial pseudo-label belongs is greater than the proportion of the category to which the initial pseudo-label belongs.
[0096] The correction condition is: among all the predicted categories corresponding to the effective candidate augmented maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is greater than the proportion of the opposite category to which the initial pseudo-label belongs.
[0097] The rejection condition is: among all the predicted categories of all valid candidate augmented maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is equal to the proportion of the opposite category to which the initial pseudo-label belongs.
[0098] In this preferred approach, the confirmation condition (the proportion of the same category is greater than the proportion of the opposite category) is: retain the initial pseudo-labels so that the model can maintain the original discrimination direction with the support of reliable neighborhood consensus;
[0099] Correction condition (the proportion of the opposite category is greater than the proportion of the same category): Flip the initial pseudo-label so that the erroneous pseudo-label can be actively corrected under the drive of strong evidence in the neighborhood;
[0100] Rejection condition (equal proportion of both classes): Refuse to provide supervision for the original target map, avoiding the introduction of noise when evidence is ambiguous. The clear division of the three output states enables the adaptation process to effectively utilize reliable samples while proactively correcting errors and discarding unreliable samples.
[0101] Furthermore, in step S2, the graph enhancement of the original target graph is achieved by employing fragment replacement or fragment growth operations compatible with the local chemical context. This ensures the chemical rationality of the generated molecular structure, avoids the generation of meaningless or impossible molecular configurations, and makes the enhancement process conform to the specific chemical constraints of the molecular graph domain.
[0102] Furthermore, in step S6, the method for calculating the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set is as follows:
[0103] The updated cumulative evidence set is used to train the current target predictor in one round.
[0104] After training, the loss generated by each training sample is weighted by confidence score to obtain the confidence-weighted total binary classification loss for this round of training; where,
[0105] The molecular structure diagrams in each training sample are used as input data for the model, and the predicted category or the validated label corresponding to the training sample is used as the ground truth.
[0106] In this preferred approach, after the cumulative evidence set is updated, a loss weighting is applied using the confidence level of each training sample as the weight, and a training round is performed. Training samples with high confidence levels contribute more to the gradient update direction, while the contributions of training samples with low confidence levels are suppressed. This ensures that model updates are dominated by reliable evidence, and the impact of low-quality or uncertain supervision signals on the target encoder parameters is effectively reduced. The process of training the current target predictor with all training samples in the updated cumulative evidence set constitutes one round of training, where the process of training the target predictor with each training sample constitutes one training session.
[0107] Furthermore, the first Confidence-weighted binary classification total loss during round training The expression is:
[0108] ;
[0109] in, For the first The total weights of the training rounds, , For the first The updated set of evidence corresponding to each round of training. For the first The confidence level of each training sample. The loss function is for graph-level binary classification. For target predictor pair The predicted category is output during category prediction. For the first Molecular structure diagrams of the training samples, For the first The validated label or predicted category of each training sample. It is an integer.
[0110] This preferred embodiment provides a specific mathematical expression for the confidence-weighted binary classification total loss. It formalizes the confidence-weighted loss logic, provides a calculation paradigm that can be directly implemented through programming, and clarifies the total loss, sample confidence level, and... Figure 2 The mathematical relationship between classification loss, input graph, and labels provides a mathematical basis for the implementation of the algorithm.
[0111] Specific Implementation Method Two: The graph-level passive domain adaptation system based on neighborhood evidence verification of pseudo-labels described in this implementation method includes a storage device, a processor, and a computer program stored in the storage device and executable on the processor. The processor executes the computer program to implement the graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels as described in Specific Implementation Method One.
[0112] Principle Analysis:
[0113] This invention treats target-side enhancement selection as an outer-layer variable and the target encoder as an inner-layer variable. Combining the accumulated evidence set, the confidence-weighted binary classification total loss is used as the optimization objective for the inner-layer response. Since the target label is unobservable during the passive adaptation phase, and the joint neighborhood set belongs to a discrete combination space, this invention uses observable graph validity, structural relevance, representational spatial proximity, and neighborhood consistency to approximate the outer-layer enhancement selection objective, and then uses alternating updates to approximate the inner-layer response. This invention clearly defines the impact of evidence construction on the target predictor update, and the reverse effect of the updated target predictor on the next round of evidence verification.
[0114] Verification experiment:
[0115] The following experiments verify whether the proposed method can distinguish the relative abilities of two categories under conditions of molecular backbone shift, experimentally determined shift, and graph-scale shift. The experiments focus on a passive domain adaptation scenario for a graph-level binary classification task. The source predictor is pre-trained using labeled source domain graph data before deployment. During the target domain adaptation phase, the ground truth labels of both the source and target domain training samples are inaccessible. The ground truth labels of the target domain are only used for offline evaluation after adaptation and do not participate in the target domain training process.
[0116] 1. Data and Model Preparation
[0117] DrugOOD LBAP and OGB were selected as the evaluation datasets.
[0118] The DrugOOD evaluation dataset uses measurement conditions, skeleton, and graph size to define three types of offsets between the source and target domains.
[0119] In the evaluation dataset OGB, the molecular task uses a skeleton to define the offset type between the source and target domains.
[0120] The source predictor is first trained on the labeled source domain. After deployment to the target domain, only the source predictor, consisting of the encoder and prediction head, is retained. The unlabeled training dataset for the target domain consists of the unlabeled original target domain molecular graph. The true labels of the target domain data samples are only used for offline evaluation after adaptation training and are not visible during training.
[0121] The target encoder parameters are initialized to the source encoder parameters, and the target prediction head parameters are initialized to the source prediction head parameters and kept fixed after initialization. The maximum number of adaptation rounds T is set to 12; the cumulative evidence set is initialized to an empty set.
[0122] Performance was measured using the ROC metric; a higher ROC value indicates a stronger ability of the model (i.e., the predictor) to distinguish between the two classes in a binary classification task. For graph prediction tasks, the ROC metric is less sensitive to class imbalance in the dataset than accuracy, making it more suitable for performance evaluation in this experiment.
[0123] 2. Molecular candidate generation
[0124] For each selected original target molecular map in the unlabeled dataset of the target domain, candidate molecules are generated using the local fragment mutation and growth operations provided by the CReM (Chemically Reasonable Mutations) computational framework. Local fragments are replaced or expanded under conditions compatible with the surrounding chemical environment. Subsequently, the generated molecules are normalized, deduplicated, and their validity is checked. Candidates that cannot form valid molecular maps are eliminated, resulting in a valid candidate set, which is composed of the valid candidate maps.
[0125] 3. Joint structure-feature screening
[0126] For each molecular graph in the valid candidate set, its structural similarity to the original target molecular graph is calculated, and it is determined whether it reaches the molecular fingerprint similarity threshold. At the same time, the feature distance between it and the original target molecular graph is calculated, and it is determined whether it does not exceed the feature distance threshold. Only candidates that pass the validity, fingerprint similarity, and feature distance checks simultaneously form the joint neighborhood set corresponding to the original target molecular graph.
[0127] In this process, fingerprint similarity is used to exclude transformations unrelated to the original target molecular map, while feature distance is used to further identify candidates with similar fingerprints but divergent representations. Both are used in combination, and neither criterion is considered sufficient proof of label preservation. Threshold sensitivity results show that a feature distance threshold that is too small will exclude potentially useful neighbors, while a threshold that is too large will accept candidates with weak feature support. Therefore, in application, the balance between coverage and confidence can be controlled by setting predetermined hyperparameters outside the validation set, and the target's true label is not read during the adaptation phase.
[0128] 4. Neighborhood prediction and pseudo-label verification
[0129] The source predictor first outputs a predicted probability distribution for the original target map, and obtains source pseudo-labels with a threshold of 0.5. In the k-th round, the current target predictor is used to perform pseudo-label verification based on neighborhood evidence for each candidate in the joint neighborhood of the original target map, and the support levels of category 0 and category 1 are aggregated respectively as supporting evidence.
[0130] When similar supporting evidence forms consistent evidence, the original pseudo-label is retained;
[0131] When the opposite category receives sufficiently strong and confident supporting evidence, the verified label is changed to the opposite category;
[0132] When the opposing supporting evidence is insufficient to complete the correction on its own, check whether the supporting evidence comes from multiple structurally different candidates to prevent false majoritys caused by duplicate or near-duplicate structures.
[0133] Skip the original plot if both types of evidence are insufficient. This step allows the target augmentation to test the source hypothesis, rather than mechanically replicating the source hypothesis across all augmented plots.
[0134] 5. Update the cumulative evidence set
[0135] If the verification result is not empty, the original target map, the verified label, and the corresponding category supporting evidence are combined to form the original map evidence record. Then, the joint neighborhood of the original target map is traversed, and only candidate augmented maps whose candidate predicted labels are consistent with the verified pseudo-labels of the original target map are included in the evidence set; the remaining candidates are not included in the evidence set.
[0136] After processing all the original graphs in this round, duplicate records pointing to the same graph are deduplicated, and conflicting records are resolved to update the evidence set for this round. Subsequently, the current model (the current target predictor) will enter the next round of training, allowing the evidence set to evolve with the model in each round.
[0137] 6. Target encoder parameters
[0138] After updating the evidence set in each round, a graph-level binary classification loss is calculated based on each evidence record in the evidence set, and weighted according to its confidence weight. The model parameters are updated by gradient calculation, and the source prediction head remains frozen throughout the target domain training process.
[0139] 7. Implementation Results: Using the source predictor without target domain adaptation (Source-only model) and the target predictor formed after updating the target encoder using the method of this invention (JoSFDA model), the predicted probability distributions are output for the same target test task. The true positive rate and false positive rate are calculated by changing the classification threshold, and ROC curves are plotted.
[0140] Figures 4 to 12 The ROC performance curves of the two models on each data subset are obtained by simultaneously testing the target task on nine data subsets using the method of this invention, using the Source-only model and the JoSFDA model obtained by this invention.
[0141] Figures 4 to 12 The dataset consists of nine subsets, which are derived from three subsets of the OGB ensemble evaluation dataset (OGBG-MolHIV, OGBG-MoIBACE, OGBG-MolBBBP) and six subsets of the OGB evaluation dataset (DrugOODCore EC50 Assay, DrugOOD Core EC50 Size, DrugOOD Refined EC50 Assay, DrugOODRefined EC50 Size, DrugOOD Refined KI Assay, and DrugOOD Refined KI Size).
[0142] Figures 4 to 12In the graph, the horizontal axis represents the false positive rate (FPR), and the vertical axis represents the true positive rate (TPR). The smaller the FPR, the better the false positive control. The gray dashed line represents the random classification reference line when TPR=FPR, with an ROC of 0.5. Falling near the gray dashed line indicates that the model has almost no ability to distinguish between the two classes; being located to the upper left of the gray dashed line indicates that it is better than random classification; the closer to the gray dashed line, the better the ability to distinguish between the two classes while maintaining a low false positive rate.
[0143] from Figures 4 to 12 The results show that the ROC curve (orange solid line) obtained by the method of this invention using the JoSFDA model (target predictor) is generally closer to the upper left than the ROC curve (gray solid line) obtained by the source-only model (source predictor). This result indicates that the method of this invention, through structure-feature joint neighborhood screening, pseudo-label verification, and confidence-weighted evidence-driven target encoder update, can improve the ability to distinguish two categories in the target domain under conditions of molecular backbone shift, experimental measurement shift, and graph scale shift.
[0144] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels, characterized in that, The method includes: S1. Obtain the source predictor that has been trained on the labeled source domain and the unlabeled dataset of the target domain. Initialize the parameters of the target encoder and target prediction head in the target predictor to the parameters of the source encoder and source prediction head in the trained source predictor, and freeze the target prediction head parameters. At the same time, initialize the cumulative evidence set to an empty set. S2. Randomly select a batch of original target images from the unlabeled dataset of the target domain to generate a candidate set for graph augmentation. Perform validity checks on the candidate augmentation images in the candidate set and select valid candidate augmentation images. Based on the molecular fingerprint similarity and feature distance between each original target image and its corresponding valid candidate augmentation images, filter the valid candidate augmentation images to obtain the joint neighborhood set corresponding to the original target image. Both the original target image and the valid candidate augmentation images are molecular structure images. S3. Use the current target predictor to generate initial pseudo-labels and confidence scores for each original target map; The current target predictor is used to perform binary classification prediction on each effective candidate augmentation map in each joint neighborhood set, and the predicted class and its confidence score are output. Based on the predicted class and confidence score of each effective candidate augmentation map in each joint neighborhood set, the neighborhood support degree of the same class and opposite class to which the corresponding initial pseudo label belongs is determined. S4. Verify the initial pseudo-labels: Compare the neighborhood support levels of the same and opposite categories corresponding to each initial pseudo-label. When the same category support level meets the confirmation condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is retained, and the confidence level of the initial pseudo-label is corrected to the same category support level. The initial pseudo-label is then used as the verified label. When the opposite category support level meets the correction condition, it indicates that the original target map corresponding to the initial pseudo-label has passed the verification. At this time, the initial pseudo-label is corrected to the opposite category, and the confidence level of the initial pseudo-label is corrected to the opposite category support level. When the relationship between the neighborhood support levels of the same and opposite categories meets the rejection condition, it indicates that the original target map corresponding to the initial pseudo-label has failed the verification, and the original target map is rejected. S5. Cumulative evidence set update: The original target maps that have passed verification, along with their corresponding verified labels and confidence scores, are used as basic training samples. The candidate augmentation maps in each joint neighborhood set that are consistent with their corresponding verified labels, along with their predicted categories and confidence scores, are used as augmentation training samples and then added to the cumulative evidence set. S6. Parameter Update: Calculate the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set, and use it to update the target encoder parameters in the current target predictor while keeping the target prediction head parameters frozen. S7. Repeat steps S2 to S6 for the preset number of rounds to obtain the adapted target predictor.
2. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S2, the validity check of the candidate augmentation graphs in the candidate set is performed to select valid candidate augmentation graphs. The implementation method is as follows: the validity of the candidate augmentation graphs is determined by checking the graph structure legality of each candidate augmentation graph through a binary validity indicator function. The binary validity indicator function is 1 when it indicates that the candidate augmentation graph is valid, and 0 when it indicates that the candidate augmentation graph is invalid.
3. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S2, the effective candidate augmentation graphs are filtered to obtain the joint neighborhood set corresponding to the original target graph. The implementation method is as follows: All valid candidate augmented images corresponding to each original target image are subjected to double screening, and only valid candidate augmented images that simultaneously meet the following conditions are retained: molecular fingerprint similarity is not lower than the molecular fingerprint similarity threshold and feature distance does not exceed the feature distance threshold. The valid candidate augmented images retained after double screening are used to form the joint neighborhood set corresponding to the original target image.
4. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S3, the method for generating initial pseudo-labels and confidence scores for each original target map using the current target predictor is as follows: The current target predictor is used to perform binary classification prediction on each original target image, outputting the predicted category and its confidence level, and the output predicted category is used as the initial pseudo label.
5. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S3, based on the predicted category and confidence level corresponding to each effective candidate augmentation map in each joint neighborhood set, the neighborhood support level of the initial pseudo-label belonging to the same category and the opposite category is determined as follows: The neighborhood support level of the same category as the initial pseudo-label is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, which is the same category as the initial pseudo-label. The neighborhood support level of the opposite category to which the initial pseudo-label belongs is: the proportion of the predicted categories of all valid candidate augmentation maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, that are in the same category as the initial pseudo-label.
6. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S4, The confirmation condition is: among all the predicted categories corresponding to the effective candidate augmentation maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the category to which the initial pseudo-label belongs is greater than the proportion of the category to which the initial pseudo-label belongs. The correction condition is: among all the predicted categories corresponding to the effective candidate augmentation maps in the joint neighborhood set of the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is greater than the proportion of the opposite category to which the initial pseudo-label belongs. The rejection condition is: among all the predicted categories of all valid candidate augmented maps in the joint neighborhood set corresponding to the original target map to which the current initial pseudo-label belongs, the proportion of the opposite category to which the initial pseudo-label belongs is equal to the proportion of the opposite category to which the initial pseudo-label belongs.
7. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S2, the graph enhancement of the original target graph is achieved by using fragment replacement or fragment growth operations that are compatible with the local chemical context.
8. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 1, characterized in that, In step S6, the method for calculating the confidence-weighted binary classification total loss of the current target predictor based on the updated cumulative evidence set is as follows: The updated cumulative evidence set is used to train the current target predictor in one round. After training, the loss generated by each training sample is weighted by confidence score to obtain the confidence-weighted total binary classification loss for this round of training; where, The molecular structure diagrams in each training sample are used as input data for the model, and the predicted category or the validated label corresponding to the training sample is used as the ground truth.
9. The graph-level passive domain adaptation method based on neighborhood evidence verification of pseudo-labels according to claim 8, characterized in that, No. Confidence-weighted binary classification total loss during round training The expression is: ; in, For the first The total weights of the training rounds, , For the first The updated set of evidence corresponding to each round of training. For the first The confidence level of each training sample. The loss function is for graph-level binary classification. For target predictor pair The predicted category is output during category prediction. For the first Molecular structure diagrams of the training samples, For the first The validated label or predicted category of each training sample. It is an integer.
10. A graph-level passive domain adaptation system for verifying pseudo-labels based on neighborhood evidence, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that, The processor executes a computer program to implement the graph-level passive domain adaptation method for verifying pseudo-labels based on neighborhood evidence as described in any one of claims 1 to 9.