Cervical OCT image intelligent diagnosis method and system based on federal learning

By introducing spatial and frequency domain co-modeling and adaptive dynamic weight aggregation in cervical OCT image classification, the problems of insufficient feature extraction and model bias in existing methods are solved, achieving high-precision cervical lesion diagnosis and robustness to cross-center data.

CN120997528APending Publication Date: 2025-11-21HUAZHONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511090957.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing cervical OCT image classification methods rely on single spatial domain feature extraction, and the models are not sensitive enough to the microscopic texture of cervical lesions. Traditional federated learning frameworks suffer from model bias in scenarios with data heterogeneity and class imbalance, making it difficult to meet the dual clinical requirements for diagnostic accuracy and interpretability.

Method used

A spatial and frequency domain collaborative modeling mechanism is adopted. Spatial structure features are extracted through the ConvNeXt-Tiny network and frequency domain features are decomposed by fast Fourier transform. The SCMA channel attention mechanism is introduced to enhance the frequency domain features. In addition, a multi-head attention mechanism is used for cross-domain interaction. Combined with an adaptive dynamic weight aggregation strategy, the model update is optimized on the server side.

Benefits of technology

It significantly improves the diagnostic accuracy of cervical OCT images, enhances the model's ability to express the features of cervical lesions, improves the generalization performance of cross-center data, solves the problems of incomplete feature representation and weak cross-domain generalization, and provides a feasible solution for intelligent diagnosis of multi-center medical images under privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997528A_ABST
    Figure CN120997528A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent diagnosis method and system for a cervical OCT image based on federal learning. The method comprises the following steps: 1) constructing a double-branch network architecture at a client, wherein a ConvNeXt-Tiny model is adopted by a spatial domain branch to extract structural texture features of the cervical OCT image; the frequency domain branch decomposes image low-frequency background and high-frequency focus details through fast Fourier transform (FFT), key frequency component expression is enhanced in combination with an SCMA channel attention mechanism, and space-frequency domain multi-modal feature complementation is achieved; 2) introducing a multi-head attention fusion module: performing cross-domain interaction modeling on 256-dimensional feature vectors of spatial domain and frequency domain branches, and 3) designing an adaptive dynamic weight aggregation strategy: dynamically adjusting aggregation weight by a server side according to a client data scale and local training loss, and constructing a federated learning privacy protection framework: the client side only uploads model parameter update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image analysis and artificial intelligence technology, and in particular to an intelligent diagnostic method for cervical optical coherence tomography (OCT) images based on federated learning, which is suitable for multi-center medical institutions to achieve collaborative screening and classification of cervical lesions while protecting patient privacy. Background Technology

[0002] Cervical cancer is a highly prevalent malignant tumor among women, and early screening and accurate diagnosis are crucial for reducing mortality. Traditional screening methods, such as HPV testing, thin-layer liquid-based cytology (TCT), and colposcopy, all have limitations, including invasive procedures, reliance on human experience for diagnosis, and high false-positive rates. In recent years, optical coherence tomography (OCT) has demonstrated significant advantages in imaging the microstructure of cervical tissue due to its micrometer-level resolution and non-invasive nature. However, its clinical application is still limited by physicians' insufficient understanding of OCT image features and the low efficiency of manual image interpretation.

[0003] Currently, deep learning-based medical image classification technology has made breakthrough progress in image diagnosis in ophthalmology, pulmonary diseases, and other fields. However, intelligent analysis of cervical OCT images still faces a dual challenge: on the one hand, the limited data volume and high annotation costs of single-center medical institutions easily lead to model overfitting; on the other hand, medical data privacy regulations (such as GDPR) strictly restrict cross-institutional data sharing, hindering the application of traditional centralized training paradigms. Federated Learning (FL) provides a new approach to these problems through distributed collaborative modeling. Its core mechanism of achieving multi-center joint training without sharing original data shows application potential in the medical field.

[0004] Existing federated learning research has achieved initial results in medical image analysis. FedAvg, proposed by McMahan et al., serves as a foundational framework for federated learning. FedSemi, developed by Li et al., explores the application of semi-supervised learning in federated scenarios. FedHealt, proposed by Chen et al., improves model performance through knowledge distillation. FedIIC, designed by Zhang et al., employs contrastive learning to optimize feature representation. While these studies have advanced the development of federated learning in medical images, issues remain, such as simplistic feature modeling and rigid aggregation strategies, requiring further optimization to meet the specific needs of the medical field. However, existing technologies still have the following drawbacks: 1) Limited feature modeling: Most methods focus on spatial domain feature extraction, neglecting the frequency domain texture information (such as low-frequency background and high-frequency lesion details) contained in OCT images, making it difficult to fully capture the scattering characteristics and subtle lesion differences of cervical tissue; 2) Rigid aggregation strategies: Traditional algorithms such as FedAvg use a static weight averaging mechanism, which is prone to global model bias when facing non-independent identically distributed (Non-IID) scenarios common in medical data due to differences in client data scale and class imbalance (such as the scarcity of rare lesion samples); 3) Imbalance between privacy and performance: While ensuring data privacy, existing methods often sacrifice the model's personalization capabilities, making it difficult to meet the needs of primary healthcare institutions for the effective use of small sample data.

[0005] Furthermore, existing federated learning frameworks are mostly general designs and have not yet been specifically optimized for the modal characteristics of OCT images (such as tissue opacity and differences in imaging contrast). For example, ViT-FL, researched by Liu et al., attempts to integrate a visual Transformer into a federated learning framework, but faces challenges in computational efficiency. Therefore, there is an urgent need for a federated learning framework that balances data privacy protection, heterogeneity adaptability, and feature representation capabilities to promote the clinical application of intelligent diagnostic technology for cervical OCT. Summary of the Invention

[0006] Through extensive research and practice, the inventors of this application have discovered that existing cervical OCT image classification methods mainly rely on single spatial domain feature extraction. Due to the excessively large receptive field of deep features in convolutional neural networks (CNNs), the model is not sensitive enough to the microscopic texture of cervical lesions (such as epithelial atypia and the boundaries of small lesions). Furthermore, traditional federated learning frameworks suffer from model bias in scenarios with data heterogeneity and class imbalance, making it difficult to meet the dual clinical requirements for diagnostic accuracy and interpretability.

[0007] Therefore, to address the above problems, this invention proposes a cervical OCT-assisted diagnostic method based on federated learning, which effectively protects data privacy while significantly improving the model's diagnostic accuracy on cervical OCT images, providing a feasible path for the construction of an intelligent screening system for cervical lesions.

[0008] The overall inventive concept of this invention is as follows: 1) On the client side, a spatial and frequency domain collaborative modeling mechanism is designed. The spatial domain branch uses a ConvNeXt-Tiny network to extract 256-dimensional structural features, while the frequency domain branch decomposes the input image into low-frequency (smooth background) and high-frequency (edge ​​details) components through Fast Fourier Transform (FFT). An SCMA channel attention mechanism is introduced to weight and enhance the frequency domain features. 2) By using four parallel attention heads to model the cross-domain interaction between the spatial domain query and the frequency domain key / value, the dual-branch features are dynamically fused to generate a discriminative feature representation with global perception capabilities. 3) On the server side, a nonlinear aggregation function that integrates data volume weights and loss weights is designed. In the early stages of training, the parameter updates are dominated by the sample proportion (to alleviate the problem of large sample structure dominance). In the later stages, a Sigmoid decay function is introduced to control the growth of loss weights and suppress the impact of poor updates on the global model. 4) Based on a federated learning framework, data does not leave the domain and only the model gradient updates are shared.

[0009] To address the aforementioned technical problems, this invention provides, in one aspect, an intelligent diagnostic method for cervical OCT images based on federated learning, comprising: S1: Using cervical OCT image data from multiple medical institutions as the client, cervical tissue OCT images collected from multiple medical centers are grouped according to their source and divided into training set, validation set and test set.

[0010] S2: Construct a dual-branch feature modeling network on the client side, including a spatial domain branch and a frequency domain branch, to extract spatial structural features and frequency texture features of cervical OCT images respectively. Through a multi-head attention fusion module, cross-domain interactive modeling is performed on the feature vectors of the spatial domain and frequency domain branches to generate a global feature representation. The fused features are passed through a fully connected classification layer and finally through a Softmax activation function. S3: Design an adaptive dynamic weight aggregation strategy on the server side to dynamically adjust the aggregation weights of model parameters based on the client's data scale and local training loss, and build a privacy protection framework so that the client only uploads model parameter updates. S4: Distributed training is implemented using the Flower framework. In each round of communication, the server distributes the global model to the client. After the client completes local training, it uploads the parameters, and the server aggregates and updates the global model according to the dynamic weights.

[0011] S5: Verify cross-center generalization by independently testing three hospital clients, and use the trained OCT image classification model to classify and predict the OCT images in the test set to obtain the classification results.

[0012] In one implementation, S2 specifically includes: S2.1: The spatial domain branch uses the ConvNeXt-Tiny model to extract the structural texture features of cervical OCT images; S2.2: The frequency domain branch decomposes the low-frequency background and high-frequency lesion details of the image through Fast Fourier Transform (FFT) and enhances the expression of key frequency components by combining the SCMA channel attention mechanism; S2.3: To align and fuse spatial and frequency domain features in the same dimension (256), we adopted the Transformer's multi-head self-attention mechanism. Specifically, the two features are treated as a token sequence of length 2 and input into the 4-head MHSA. Each attention head learns the interaction relationship between the two domain features in an independent 64-dimensional subspace. Then, the outputs of each head are concatenated and subjected to a linear transformation to obtain a fused vector with the dimension maintained at 256. S2.4: Add two fully connected layers after the above network structure. The first layer contains 256 neurons, and the second layer contains 2 neurons for classification. S2.5: Set up a Softmax layer to output the prediction results.

[0013] In one implementation, the ConvNeXt-Tiny model extracts structural texture features from cervical OCT images, S2.1 specifically includes: S2.1.1: The ConvNeXt-Tiny model consists of four stages. First, a 4×4 convolution with a stride of 4 is used as the initial feature extraction layer, which reduces the size of the input image to about 90×53 and expands the number of channels to 96.

[0014] S2.1.2: The following are four main stages, each consisting of multiple ConvNeXt Blocks, which output feature maps with 96, 192, 384, and 768 channels respectively. The key downsampling operation occurs at the beginning of each new stage: the feature map spatial size is halved sequentially through convolutions with a stride of 2, while the number of channels is multiplied. Specifically, the first stage maintains the input size (90×53×96), the second stage reduces it to 45×26×192, the third stage compresses it to 22×13×384, and finally, the fourth stage obtains a deep feature representation of 11×7×768. S2.1.3: After global pooling and fully connected layers, a 256-dimensional vector feature is obtained; In one implementation, the frequency domain branch is designed to capture the frequency components of the input data. These frequency characteristics reveal periodic variations and signal patterns that are difficult to observe in the spatial domain, providing a valuable supplement to the spatial characteristics. S2.2 specifically includes: S2.2.1: The image is transformed into the frequency domain using a Fast Fourier Transform (FFT) to generate a spectral representation. A predefined filter is then used to decompose the frequency domain data into low-frequency and high-frequency images, representing the overall background contour and local edge details of the image, respectively.

[0015] S2.2.2: Introducing the Spectral Channel and Spatial Mixed Attention (SCMA) mechanism. This mechanism simulates the selective response of neurons to different frequency components. It combines low-frequency and high-frequency images to form an image pair, which is then input into the SCMA module. The corresponding Fast Fourier Transform (FFT) spectrograms are jointly modeled. In this module, channel attention weights are first generated through two fully connected layers, and then spatial attention is used to enhance the structural domain feature representation. The final output is an enhanced spectral feature map with dimensions of (360×213×3).

[0016] S2.2.3: Input the enhanced spectral feature map described above into a ConvNeXt-Tiny model with the same structure as the spatial branch to extract a 256-dimensional frequency domain feature vector. Note: Although ConvNeXt-Tiny is also used in the spatial branch, it is used here for frequency domain image feature extraction; both have the same structure but independent domains. The spatial and frequency branches are processed in parallel throughout the dual-branch architecture, and the output features of the two branches are finally fused for classification decisions.

[0017] In one implementation, when the training process reaches the server-side model aggregation stage, a two-factor weighting mechanism is introduced, namely, client data volume weight and training loss weight, which respectively measure the sample size and training difficulty of each client, thereby more scientifically determining the contribution weight of each client to the global model update. S3 specifically includes: S3.1: In the early stages of training, the client's sample size dominates the calculation of aggregation weights, emphasizing global modeling capabilities. Utilizing clients with larger sample sizes allows the initial model to be trained quickly to a good level. The aggregation weights dominated by the sample size of the i-th client are defined as follows:

[0018] in, Let K represent the number of local samples of the i-th client, and K be the total number of clients participating in federated training. S3.2: In the later stages of training, the average loss on the local validation set gradually becomes dominant in the calculation of aggregate weights, as it represents the model's performance on "hard samples" to enhance the model's generalization ability.

[0019] in, Let be the average validation loss value for the i-th client, using cross-entropy loss. A smaller loss indicates better model performance, and its weight should be larger. S3.3: By designing a smoothing adjustment factor using the Sigmoid function, a dynamic balance transition from sample size-oriented to loss-oriented approaches is achieved. The following weighting strategy is used to combine sample size and loss:

[0020] This aggregation strategy also introduces a balance factor that varies with the training rounds. Its value gradually transitions from a preset maximum value to a preset minimum value as the training process progresses, controlled by the Sigmoid function:

[0021] t represents the current communication round. The initial weight values, For decay rate, This represents the total number of training rounds. S3.4: Client uploads only include parameter updates and verification loss information, ensuring the privacy of medical data is not leaked, and aggregating and updating the global model.

[0022] These are the model parameters obtained by the k-th client after the t-th round of local training. The aggregate weight of the k-th client represents the "influence" of that client on the global model update; In one implementation, the process not only follows the classic federated optimization paradigm, but also incorporates a two-branch network structure to enhance feature representation capabilities, and combines an adaptive dynamic weight aggregation mechanism to improve model generalization and robustness across clients. S4 specifically includes: S4.1: The server selects a set of clients that meet specific requirements. Medical sites / centers may only be able to check in to the server if they can correctly access the federated intranet with relatively good bandwidth. The server initializes a global model, which is a cervical OCT image classification neural network model maintained by the server with a spatial-frequency domain dual-branch structure, derived from the dual-branch network architecture described in Section S3 above. This global model serves as the starting model for collaborative training by all clients, and in subsequent rounds, it will continuously receive model updates from each client and perform aggregate optimization. The parameters of the global model are updated by the server after each round of training and redistributed to each client as a shared model for the new round of communication.

[0023] S4.2: The global model is sent to all participating healthcare sites / centers. Each site / center trains its model on its local cervical OCT image data using stochastic gradient descent.

[0024] S4.3: After local training is complete, each medical site / center calculates model updates and sends / uploads these updates back to the central server; S4.4: The central server aggregates the model update results from each client. The aggregation strategy used in this step is the "adaptive dynamic weight aggregation mechanism" defined in S3 above. This mechanism dynamically allocates aggregation weights based on the client data size and training loss. Through the aggregation operation, a new round of global model parameters is generated, marking the completion of the current training round. S4.5: During the broadcast step, the server sends updated model parameters or gradients to the client, enabling it to perform local computations and contribute to the collaborative model training process. S4.6: Completing the preset number of iterations or the model reaching a high level of accuracy marks the end of the complete federated learning process; otherwise, continue repeating the above steps.

[0025] In one implementation, S5 specifically includes: S5.1: Adjust the cervical OCT images in the test set to a pixel size that is compatible with the backbone network; S5.2: Normalize the resized image; S5.3: Each client loads the parameters of the trained OCT image classification global model for prediction; The 2D OCT images used in this invention are in the tag image file format (TIFF) format, which conforms to the digital imaging and communications in medicine (DICOM) specification.

[0026] In one implementation, a dynamic data augmentation strategy is used during the training phase, including random horizontal flipping, 30° rotation, color jittering, and grayscale conversion, to improve the model's generalization ability, and the images are uniformly scaled to a resolution of 360×213.

[0027] In one implementation, the training and test sets are divided in an 8:2 ratio, while maintaining a consistent proportion of samples from each class to reduce data bias caused by class imbalance. The training set is further divided into a training and validation set in an 8:2 ratio to optimize model hyperparameters and evaluate model performance.

[0028] In one implementation, the federated learning framework is based on Flower 1.8.0 and is designed to simulate a collaborative training scenario involving three medical institutions (clients). The number of clients is K=3, the number of global communication rounds is R=10, and each round of local training consists of 2 complete epochs.

[0029] In one implementation, the federated training process employs a round-by-round iterative mechanism, whereby the server initializes global model parameters and periodically selects clients to participate in each round of training and communication until the model converges or reaches a preset performance threshold.

[0030] In one implementation, the programming language used is Python, and the software tool used is PyTorch.

[0031] In one implementation, the classification result is a binary label. The model performs binary classification prediction (negative / positive) on each test image. The prediction result is output by the Softmax classification layer, and the label with the highest probability is taken as the predicted category.

[0032] In one implementation, to protect the privacy of each medical site / center, only model updates are shared, while the data itself cannot be shared.

[0033] Based on the same inventive concept, another aspect of the present invention provides a cervical OCT image classification method based on federated learning, including: The dataset partitioning module divides the acquired cervical OCT images into training, validation, and test sets. The dataset consists of spatial domain medical images and their corresponding frequency domain (FFT) images, covering two pathological labels: benign lesions (cervicitis, eversion, cysts) and malignant lesions (high-grade lesions, cervical cancer). A stratified sampling strategy is used to maintain consistency in the proportion of benign and malignant samples between the training and test sets, reducing the impact of class distribution bias on model evaluation. The classification model construction module is used to build a federated learning cervical OCT image model based on bi-branch feature fusion.

[0034] The classification model construction module includes a spatial domain branch, a frequency domain branch, a feature fusion module, and a classification layer. The spatial domain branch uses a pre-trained ConvNeXt-Tiny network as its backbone, extracting spatial structural features from cervical OCT images through multi-level residual modules. The frequency domain branch performs Fast Fourier Transform (FFT) on the input image to separate low-frequency (global structure) and high-frequency (local details) components, and enhances the expressive power of key frequency features through an SCMA channel attention mechanism. The feature fusion module introduces a multi-head self-attention mechanism to dynamically calculate the cross-domain correlation between spatial and frequency domain features, generating weighted fused features. Finally, the classification probability is output through a fully connected layer and a Softmax activation function to distinguish between low-risk and high-risk cervical lesions.

[0035] The dynamic weight aggregation module initially allocates weights based on the proportion of client sample size to ensure the model's dominance in the big data center; later, it adjusts the weights based on the client's local validation loss to reduce the risk of model deviation caused by data heterogeneity.

[0036] The federated training module, based on the Flower framework, implements a distributed training process: the server initializes global model parameters and distributes them to all clients. Clients perform multiple rounds of local training using local data, employing data augmentation strategies such as random flipping, rotation, and grayscale conversion to improve robustness to few-sample classes, and using a cross-entropy loss function to guide parameter updates. Clients only upload updated model parameters, not the original data, to protect privacy. The server aggregates client parameters according to dynamic weights and updates the global model. GradScaler and mixed-precision training techniques reduce memory usage, and finally, through multiple rounds of communication iterations, a globally optimal model is generated.

[0037] The testing module deploys the trained global model to multiple (e.g., three) medical center clients and performs inference on the test set that was not trained locally. The test set contains 2D cervical OCT images from the spatial and frequency domains to verify the model's adaptability to differences in image acquisition conditions and lesion manifestations in different hospitals.

[0038] The cervical tissue OCT image classification method provided by this invention significantly improves diagnostic robustness and generalization ability under multi-center medical data through dual-domain feature collaborative modeling and dynamic aggregation optimization mechanism within a federated learning framework. This method innovatively constructs a spatial-frequency domain dual-branch feature encoding architecture. By introducing a Fourier spectrum analysis module and an attention mechanism to fuse the network, it achieves multi-scale feature decoupling of the microscopic texture and macroscopic structure of cervical lesions: the spatial domain branch uses the ConvNeXt-Tiny architecture to extract tissue morphological features, while the frequency domain branch separates low-frequency background and high-frequency lesion details through fast Fourier transform and utilizes the SCMA channel weighting mechanism to enhance the response of key frequency bands. Simultaneously, a dynamic weight aggregation algorithm is designed, which effectively alleviates the model bias problem caused by Non-IID data through the nonlinear coupling of sample size factor and loss sensitivity factor, showing significant advantages, especially for small sample and class imbalance scenarios in primary healthcare institutions. Validated using heterogeneous data from three top-tier hospitals, this method improves upon traditional federated learning methods by 12.7%-15.3% in key metrics such as malignant lesion recall (96.62%) and AUC (0.999). It solves the technical challenges of incomplete feature representation, weak cross-domain generalization, and insufficient clinical interpretability in existing medical image classification models, and provides a deployable technical solution for intelligent diagnosis of multi-center medical images under privacy protection. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram illustrating the implementation process of an intelligent diagnostic method for cervical OCT images based on federated learning. Figure 2 This is a schematic diagram illustrating the framework for constructing a cervical OCT image classification model in an embodiment of the present invention; Figure 3 This is a schematic diagram of the adaptive dynamic weight aggregation module structure designed on the server side in an embodiment of the present invention; Figure 4 This is a schematic diagram of the adaptive dynamic weight aggregation method in an embodiment of the present invention; Figure 5 This is a diagram illustrating the overall framework of an intelligent diagnostic method for cervical OCT images based on federated learning.

[0041] Figure 6 This is a structural block diagram of the intelligent classification system for cervical OCT images based on federated learning in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.

[0043] This invention addresses the prominent problems of existing methods, such as the lack of modeling of OCT image characteristics and the difficulty in handling cross-institutional data heterogeneity and class imbalance. This paper proposes a dual-end collaborative optimization federated learning method and system for cervical OCT image classification tasks, starting from two levels: client-side feature extraction and server-side aggregation strategy.

[0044] Example 1: This embodiment provides an intelligent diagnostic method for cervical OCT images based on federated learning. Please refer to [link to relevant documentation]. Figure 1 The method includes: S1: Using cervical OCT image data from multiple medical institutions as the client, cervical tissue OCT images collected from multiple medical centers are grouped according to their source and divided into training set, validation set and test set; Specifically, each medical institution's cervical OCT image data serves as a client, and each client is divided into training, validation, and test sets. In the actual implementation, the cervical OCT images used are in portable network graphics (PNG) format.

[0045] Cervical OCT medical image data were obtained from three different hospitals (Huaxi, Xiangya, and Wuxi). These images were classified into five pathological categories: Mild Inflammation (MI), Cyst (CY), Eversion (EP), High-grade Squamous Intraepithelial Lesion (HSIL), and Cervical Cancer (CC). MI, CY, and EP were classified as low-risk (negative), while HSIL and CC were classified as high-risk (positive).

[0046] Huaxi Hospital provided 7600 images, of which 6790 were negative samples and 810 were positive samples; Xiangya Hospital's dataset contained 2990 images, of which 2250 were negative samples and 740 were positive samples; Wuxi Hospital's dataset included 6570 images, of which 6000 were negative samples and 570 were positive samples. In the class distribution of the different hospital datasets, the proportion of positive samples was 11% for Huaxi, 25% for Xiangya, and 9% for Wuxi. These statistics show that the proportion of positive cases in Xiangya Hospital is significantly higher than the other two hospitals, while Wuxi Hospital's data exhibits the most class imbalance. Furthermore, in the overall distribution of the datasets, negative samples far outnumber positive samples, demonstrating a significant class imbalance.

[0047] Table 1. Information on the cervical OCT image dataset used in the embodiments.

[0048] To verify the effectiveness of the method of this invention, the dataset was divided as follows: the training set and the test set were divided in an 8:2 ratio, while ensuring that the proportion of samples in each class remained consistent to reduce data bias caused by class imbalance. The training set was further divided into a training set and a validation set in an 8:2 ratio to optimize model hyperparameters and evaluate model performance.

[0049] S2: On the client side, a dual-branch feature modeling network, namely the OCT image classification model, is constructed, including a spatial domain branch and a frequency domain branch. The spatial structural features and frequency domain texture features of the cervical OCT image are extracted respectively. The feature vectors of the spatial domain and frequency domain branches are modeled across domains through a multi-head attention fusion module to generate a global feature representation. The fused features are passed through a fully connected classification layer and finally through the Softmax activation function. Specifically, S2 is the framework for building OCT image classification models, which mainly includes spatial domain branch, frequency domain branch, SCMA module, and feature fusion module.

[0050] like Figure 2 The diagram shows the framework structure of the cervical OCT image classification model in S2. In summary, this invention fuses the 256-dimensional vectors extracted from the spatial and frequency domains using a multi-head self-attention mechanism, setting four attention heads to model the feature relationships between different subspaces. Then, two fully connected layers are added, and the output dimension of the classification model is set to 2 for binary classification of cervical tissue OCT images, i.e., negative (MI, CY, and EP) and positive (HSIL and CC).

[0051] S3: Design an adaptive dynamic weight aggregation strategy on the server side. Please refer to [reference needed]. Figure 3 The model parameters are dynamically adjusted and aggregated based on the client's data size and local training loss to build a privacy protection framework, and the client only uploads model parameter updates. Specifically, S3 establishes an efficient interaction channel between local client-side distributed training and global model collaborative optimization, enabling robust feature modeling and improved accurate classification performance in cross-institutional data heterogeneous scenarios.

[0052] Furthermore, in the initial training phase, data size weights dominate, utilizing clients with larger sample sizes to enable the initial model to train quickly to a good level, ensuring model convergence stability. In the later training phase, loss value weights gradually become dominant, requiring the global model to focus on more difficult-to-train data distributions, strengthening the global model's generalization ability to marginal cases. During training, a sigmoid function-based adjustment factor is introduced, gradually shifting the aggregate weights from focusing on client data size to focusing on model loss performance, achieving adaptive allocation of contributions between easily learned and difficult-to-differentiate samples. Please refer to [reference needed]. Figure 4 ; S4: Distributed training is implemented using the Flower framework. In each round of communication, the server distributes the global model to the client. After the client completes local training, it uploads the parameters. The server then aggregates and updates the global model according to dynamic weights. Please refer to [reference needed]. Figure 5 .

[0053] Specifically, the server initializes global model parameters and selects medical sites to participate in training. Before communication begins, the model framework is built and hyperparameters are configured to ensure that each client has basic modeling capabilities. The server synchronizes the current global model parameters to all participating medical sites. Each site trains the model based on the locally stored cervical OCT image dataset and performs gradient descent optimization using a batch processing method. Furthermore, after the client completes local training, it uploads model parameter updates and validation loss information to the server, sharing only parameter increments without exposing the original medical data, thus ensuring data privacy and security. The server integrates the contributions of each client according to a dynamic balancing mechanism: in the early stage, it focuses on the scale of client data (large sample sites dominate model updates), and in the later stage, it shifts its focus to model validation loss (increasing the weight of difficult-to-learn samples). Robust aggregation in heterogeneous data distribution scenarios is achieved through a progressive weight allocation strategy. Furthermore, the updated global model parameters are redistributed to each medical site for initialization of the next round of local training, forming a continuously iterative collaborative optimization loop. The process terminates when the preset training rounds are reached or the model performance converges to the target threshold, and the final federated diagnostic model is output, completing the privacy-preserving joint modeling of cross-institutional medical data.

[0054] S5: Verify cross-center generalization by independently testing multiple hospital clients, and use the trained OCT image classification model to classify and predict OCT images in the test set to obtain classification results.

[0055] Specifically, S5 uses individual client test sets to perform prediction tests on the trained global model to obtain prediction results. As one implementation method, S5 uses the Softmax function for classification.

[0056] This invention provides a dual-end collaborative optimization federated learning method for cervical OCT image classification tasks. It collaboratively improves the federated training framework from both the server and client levels to enhance the model's ability to express cervical lesion features and improve generalization performance in multi-center data environments, thereby achieving accurate classification of cervical OCT images. In one implementation, a dynamic data augmentation strategy is used during the training phase, including random horizontal flipping, 30° rotation, color jittering, and grayscale conversion, to improve the model's generalization ability, and the images are uniformly scaled to a resolution of 360×213.

[0057] In one implementation, the federated learning framework is based on Flower 1.8.0 and is designed to simulate a collaborative training scenario involving three medical institutions (clients). The number of clients is K=3, the number of global communication rounds is R=10, and each round of local training consists of 2 complete epochs.

[0058] In one implementation, the federated training process employs a round-by-round iterative mechanism, whereby the server initializes global model parameters and periodically selects clients to participate in each round of training and communication until the model converges or reaches a preset performance threshold.

[0059] In one implementation, the programming language used is Python, and the software tool used is PyTorch.

[0060] In one implementation, the classification result is a binary label. The model performs binary classification prediction (negative / positive) on each test image. The prediction result is output by the Softmax classification layer, and the label with the highest probability is taken as the predicted category.

[0061] In one implementation, S2 specifically includes: S2.1: The spatial domain branch uses the ConvNeXt-Tiny model to extract the structural texture features of cervical OCT images; S2.2: The frequency domain branch decomposes the low-frequency background and high-frequency lesion details of the image through Fast Fourier Transform (FFT) and enhances the expression of key frequency components by combining the SCMA channel attention mechanism; S2.3: A multi-head self-attention mechanism is used to fuse the 256-dimensional vectors extracted from the spatial domain and the frequency domain. Four attention heads are set to model the feature relationships of different subspaces to obtain a 256-dimensional vector. S2.4: Add two fully connected layers after the above network structure; S2.5: Set up a Softmax layer to output the prediction results.

[0062] Specifically S2.1: ConvNeXt-Tiny is a lightweight visual model architecture proposed by Meta, aiming to combine the efficiency of Convolutional Neural Networks (CNNs) with the global modeling capabilities of Transformers. In the cervical OCT image classification task, ConvNeXt-Tiny, with its ability to finely depict complex tissue textures (such as edge sharpening and lesion region enhancement) and high utilization of computational resources, has become an ideal choice for client-side feature encoding in federated learning frameworks, especially suitable for medical scenarios with dual requirements for real-time performance and accuracy.

[0063] S2.2: The frequency domain branch is designed to capture the frequency components of the input data. These frequency characteristics reveal periodic variations and signal patterns that are difficult to observe in the spatial domain, providing a valuable supplement to the spatial characteristics.

[0064] S2.3: After the spatial and frequency domain features are encoded in their respective paths, they need to be modeled uniformly to achieve the final discrimination task. This paper introduces a multi-head attention mechanism to construct a cross-domain feature interaction model. This mechanism uses multiple parallel sub-attention heads to capture the response relationship of input features in different subspaces, thereby learning the dynamic dependency between space and frequency.

[0065] S2.4: Add two fully connected layers after the above network structure. The first layer contains 256 neurons, and the second layer contains 2 neurons for classification. In one implementation, the ConvNeXt-Tiny model extracts structural texture features from cervical OCT images, S2.1 specifically includes: S2.1.1: The ConvNeXt-Tiny model consists of four stages. The first stage is a stem layer consisting of 4×4 convolutions with a stride of 4, which reduces the size of the input image to approximately 90×53 and expands the number of channels to 96. S2.1.2: Next are four main stages, each containing multiple ConvNeXt Blocks and feature map outputs with 96, 192, 384 and 768 channels respectively. At the same time, spatial downsampling is performed through convolution with a stride of 2, and the final deepest feature map size is 11×7×768. S2.1.3: After global pooling, a global averaging operation is performed on each channel of the feature map to compress the spatial dimension to 1×1 while retaining the channel dimension, resulting in a 768-dimensional feature vector. This vector is then passed through a fully connected layer to obtain a 256-dimensional vector feature. In the specific implementation process, the original cervical 2D OCT image is 360×213×1 in size, representing the length, width, and number of channels, respectively. Before inputting into the model, it is converted to 360×213×3. After passing through the ConvNeXt-Tiny stem layer, the feature map output is 90×53×96. The four backbone stages contain 3, 3, 9, and 3 ConvNeXt Blocks, respectively, and feature map outputs of 90×53×96, 45×26×192, 22×13×384, and 11×6×768. Finally, global pooling is performed, averaging each channel of the feature map globally to compress the spatial dimension to 1×1 while retaining the channel dimension, resulting in a 768-dimensional feature vector. This vector is then passed through a fully connected layer to obtain a 256-dimensional feature vector.

[0066] S2.2.1: The image is transformed into the frequency domain by Fast Fourier Transform (FFT) to generate a spectral representation. The frequency domain data is then decomposed into low-frequency and high-frequency components using a predefined filter. S2.2.2: Introduce the SCMA mechanism. Input low-frequency and high-frequency amplitude spectra in pairs, perform attention modeling (channel + space) and feature enhancement, and output the enhanced spectral features.

[0067] S2.2.3: Input the 256-dimensional feature vector extracted by ConvNeXt-Tiny after the above network structure; In the specific implementation process, the SCMA module first stitches the low-frequency image and the high-frequency image of size 360×213×3 into a fused image of 360×213×6 in the channel dimension. After convolution, a 360×213×C spectral feature map is extracted. Then, a 1×1×C channel response vector is generated by global average pooling. After calculating the weight vector by MLP and Sigmoid, the feature map is channel-weighted, and finally the enhanced spectral feature map of size 360×213×3 is output.

[0068] In one implementation, when the training process reaches the server-side model aggregation stage, a two-factor weighting mechanism is introduced, namely, client data volume weight and training loss weight, which respectively measure the sample size and training difficulty of each client, thereby more scientifically determining the contribution weight of each client to the global model update. S3 specifically includes: S3.1: In the early stages of training, the client's sample size dominates the aggregation weight calculation to improve the model's convergence speed; S3.2: In the later stages of training, the client-side local validation loss dominates the aggregation weights to enhance the model's generalization ability; S3.3: By designing a smoothing adjustment factor through the Sigmoid function, a dynamic balance transition from sample size-oriented to loss-oriented approaches is achieved; S3.4: Client uploads only include parameter updates and verification loss information, ensuring that medical data privacy is not leaked; In one implementation, the process not only follows the classic federated optimization paradigm, but also incorporates a two-branch network structure to enhance feature representation capabilities, and combines an adaptive dynamic weight aggregation mechanism to improve model generalization and robustness across clients. S4 specifically includes: S4.1: The server selects a set of clients that meet specific requirements. Healthcare sites / centers may only check in to the server if they can correctly access the federated intranet with relatively good bandwidth. The initialization of the global model is done on the server side. This model serves as the starting point for training across different healthcare sites / centers (i.e., clients). S4.2: The global model is sent to all participating healthcare sites / centers. Each site / center trains its model on its local cervical OCT image data using stochastic gradient descent.

[0069] S4.3: After local training is complete, each medical site / center calculates model updates and sends / uploads these updates back to the central server; S4.4: The central server aggregates all updates uploaded by the client. The global aggregation strategy will use the adaptive weight aggregation method proposed in this paper. After aggregating the parameters of these local models, a model for updating the next round of training can be generated. The completion of aggregation and global model update indicates the end of this round of training. S4.5: During the broadcast step, the server sends updated model parameters or gradients to the client, enabling it to perform local computations and contribute to the collaborative model training process. S4.6: Completing the preset number of iterations or the model reaching a high level of accuracy marks the end of the complete federated learning process; otherwise, continue repeating the above steps.

[0070] In one implementation, S5 specifically includes: S5.1: Adjust the cervical OCT images in the test set to a pixel size that is compatible with the backbone network; S5.2: Normalize the resized image; S5.3: Each client loads the parameters of the trained OCT image classification global model for prediction.

[0071] Specifically, the size of the cervical OCT images in the test set is adjusted, and then input into the classification model to obtain the prediction results of the cervical OCT images. The specific implementation process is as follows: First, the original cervical OCT image to be tested is adjusted to a size of 360×213×3; then, the pixel values ​​of the image are normalized by subtracting the mean and dividing by 255; finally, the classification model built based on the relevant parameters saved in S3 and S4 is input, and the softmax function is used to obtain the corresponding prediction results (classification labels).

[0072] The beneficial effects of this invention are as follows: On the one hand, by loading a pre-trained CNN model for fine-tuning, some commonly used feature extractors can be utilized, reducing the training cost of the classification model; fine-tuning on this basis can also more effectively extract unique features from cervical OCT images. On the other hand, the introduction of a multi-scale feature fusion mechanism enables the classification model to better utilize the detailed information extracted by shallow convolutional layers and the semantic location information extracted by deep convolutional layers, as well as learn the weights of features at different scales, thereby improving the overall classification performance of the model.

[0073] To demonstrate the effectiveness of this invention, a systematic comparative experiment was conducted using the dataset shown in Table 1, comparing it with mainstream federated learning methods (FedAvg, FedProx, FedIIC, ViT-FL, and Data Mixing benchmarks). The classification results are shown in Table 2. Table 2 shows that the method of this invention performs better and is more stable (with a smaller standard deviation) in binary classification accuracy and sensitivity. The formulas for calculating accuracy, specificity, and sensitivity are as follows: Accuracy = (True positive + True negative) / (True positive + False positive + True negative + False negative) Precision rate = True positives / (True positives + False positives) Recall rate = True positives / (True positives + False negatives) F1 score = (2 × precision × recall) / (precision + recall) Negative predictive value = True negative / (True negative + False negative) Specificity = True negative / (True negative + False positive) AUC = Area under the curve (reflects the model's ability to distinguish between positive and negative samples, with a value range of 0-1). Table 2. Comparison of classification performance between the method of this invention and the benchmark method (mean ± standard deviation)

[0074] Example 2: Based on the same inventive concept, this embodiment provides an intelligent diagnostic system for cervical OCT images based on federated learning. Please refer to [link to documentation]. Figure 6 The system includes: The dataset partitioning module 201 is used to divide the acquired cervical OCT images into training, validation, and test sets. The dataset consists of spatial domain medical images and their corresponding frequency domain (FFT) images, covering two pathological labels: benign lesions (cervicitis, eversion, cysts) and malignant lesions (high-grade lesions, cervical cancer). A stratified sampling strategy is used to maintain consistency in the ratio of benign to malignant samples between the training and test sets, thereby reducing the impact of class distribution bias on model evaluation. The classification model construction module is used to construct a federated learning cervical OCT image model based on bi-branch feature fusion.

[0075] The classification model construction module 202 includes a spatial domain branch, a frequency domain branch, a feature fusion module, and a classification layer. The spatial domain branch uses a pre-trained ConvNeXt-Tiny network as its backbone, extracting spatial structural features from cervical OCT images through multi-level residual modules. The frequency domain branch performs Fast Fourier Transform (FFT) on the input image to separate low-frequency (global structure) and high-frequency (local details) components, and enhances the expressive power of key frequency features through an SCMA channel attention mechanism. The feature fusion module introduces a multi-head self-attention mechanism to dynamically calculate the cross-domain correlation between spatial and frequency domain features, generating weighted fused features. Finally, the classification probability is output through a fully connected layer and a Softmax activation function to distinguish between low-risk and high-risk cervical lesions.

[0076] The dynamic weight aggregation module 203 initially allocates weights based on the proportion of client sample size to ensure the model's dominance in the big data center; later, it adjusts the weights based on the client's local validation loss to reduce the risk of model deviation caused by data heterogeneity.

[0077] The Federated Training Module 204 implements a distributed training process based on the Flower framework: the server initializes global model parameters and distributes them to all clients. Clients perform multiple rounds of local training using local data, employing data augmentation strategies such as random flipping, rotation, and grayscale conversion to improve robustness to few-sample classes, and using the cross-entropy loss function to guide parameter updates. Clients only upload updated model parameters, not the original data, to protect privacy. The server aggregates client parameters according to dynamic weights and updates the global model. GradScaler and mixed-precision training techniques reduce GPU memory usage, and finally, through multiple rounds of communication iterations, a globally optimal model is generated.

[0078] Test module 205 deploys the trained global model to multiple (e.g., three) medical center clients and performs inference on the test set that was not trained locally. The test set contains 2D cervical OCT images from the spatial and frequency domains to verify the model's adaptability to differences in image acquisition conditions and lesion manifestations in different hospitals.

[0079] Since the system described in Embodiment 2 of this invention is the system used to implement the cervical OCT image depth-supervised classification method based on multi-scale texture feature fusion convolutional neural network in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0080] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0081] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Therefore, if these modifications and variations to the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A method for intelligent diagnosis of cervical OCT images based on federated learning, characterized in that, Comprising the following steps: S1: enhancing and grouping the cervical tissue OCT images collected by the client; S2: constructing an OCT image classification model on the client side, including a spatial domain branch and a frequency domain branch, extracting the spatial structure features and frequency domain texture features of the cervical OCT image respectively, modeling the feature vectors of the spatial domain and the frequency domain branch through a multi-head attention fusion module for cross-domain interaction, generating a global feature representation, and finally passing through a Softmax activation function after a fully connected classification layer; S3: designing an adaptive dynamic weight aggregation strategy on the server side, dynamically adjusting the model parameter aggregation weight according to the data size and local training loss, constructing a privacy protection framework, and the client only uploads the model parameter update; S4: implementing distributed federated training using the Flower framework, the server distributes the OCT image classification model to the client in each round of communication, the client completes local training and uploads the parameters, and the server updates the OCT image classification model according to the dynamic weight aggregation; S5: using the updated and trained OCT image classification model to classify and predict the OCT images in the test set, and obtaining the classification results.

2. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 1, characterized in that: Step 1 uses a dynamic data augmentation strategy for enhancement, including random horizontal flipping, 30° rotation, color jittering, and grayscale, and the image is scaled to a specific resolution. 3.The method of claim 1, wherein: S2 specifically includes: S2.1: The spatial domain branch uses a ConvNeXt-Tiny model to extract the structural texture features of the cervical OCT image; S2.2: The frequency domain branch decomposes the image low-frequency background and high-frequency lesion details through fast Fourier transform, and combines the SCMA channel attention mechanism to enhance the key frequency component expression; S2.3: A multi-head self-attention mechanism is used to fuse the vectors extracted from the spatial domain and the frequency domain, multiple attention heads are set to model the feature relationships in different subspaces, and a 256-dimensional vector is obtained; S2.4: Two fully connected layers are added after the above network structure, the first layer contains 256 neurons, and the second layer contains 2 neurons for classification; S2.5: A Softmax layer is set to output the prediction results.

4. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 3, characterized in that: The specific steps of the ConvNeXt-Tiny model extracting the structural texture features of the cervical OCT image include: S2.1.1: The ConvNeXt-Tiny model consists of four stages, first using a 4x4 convolution with a step size of 4 as the initial feature extraction layer to reduce the size of the input image and expand the number of channels; S2.1.2: The next four main stages are composed of multiple ConvNeXt Blocks, and output feature maps with channel numbers of 96, 192, 384, and 768 in turn; the key downsampling operation occurs at the beginning of each new stage: through a convolution with a step size of 2, the spatial size of the feature map is halved in turn, and the number of channels is doubled; S2.1.3: After global pooling and fully connected layer, a 256-dimensional vector feature is obtained.

5. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 3, characterized in that: S2.2 specifically includes: S2.2.1: The input image is transformed into the frequency domain by fast Fourier transform (FFT) to generate a spectral representation, and the frequency domain data is decomposed into a low-frequency image and a high-frequency image using a predefined filter, representing the overall background contour and local edge detail information in the image, respectively; S2.2.2: Introduce the frequency domain channel-spatial attention mechanism (SCMA) mechanism: This mechanism simulates the selective response of neurons to different frequency components, and inputs the low-frequency image and high-frequency image into the frequency domain channel-spatial attention module to jointly model the corresponding fast Fourier transform spectrum image. In this module, first, two fully connected layers are used to generate channel attention weights, then the domain feature expression is enhanced through spatial attention, and finally the enhanced spectral feature map is output; S2.2.3: The enhanced spectral feature map is input into a ConvNeXt-Tiny model with the same spatial branch structure as the above, and a 256-dimensional frequency domain feature vector is extracted.

6. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 1, wherein: The adaptive dynamic weight aggregation strategy in S3 specifically includes: S3.1: In the early stage of training, the sample size of the client dominates the aggregation weight calculation, and the sample size of the i-th client is defined as: wherein, represents the number of local samples of the i-th client, and K is the total number of clients participating in federated training. S3.2: In the later stage of training, the average loss of the client on the local validation set gradually dominates the calculation of the aggregation weight to enhance the generalization ability of the model: wherein, is the average loss for the ith client on the local validation set, using cross-entropy loss; S3.3: A sigmoid function is used to design a smoothing adjustment factor to realize the dynamic balance conversion from sample size orientation to loss orientation, and the following weighting strategy is used to integrate sample size and loss: Where: t denotes the current communication round, is the initial weight value, is the decay rate, is the total number of training rounds; S3.4: The client uploads only parameter updates and validation loss information to ensure that medical data privacy is not leaked, and the OCT image classification model is aggregated and updated: is the model parameter obtained by the kth client after the tth round of local training, is the aggregation weight of the kth client, indicating the influence of the client on the OCT image classification model update.

7. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 1, characterized in that: The federated training process in step S4 uses a round iteration mechanism, the server initializes the OCT image classification model parameters, and periodically selects clients to participate in each round of training and communication until the model converges or reaches the preset performance threshold.

8. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 1, characterized in that: The classification result is a binary classification label, and the OCT image classification model performs binary classification prediction on each test image. The prediction result is output by the Softmax classification layer, and the label corresponding to the maximum probability is taken as the predicted class.

9. The federated learning based intelligent diagnosis method for cervical OCT images according to claim 1, characterized in that: The client shares the updated OCT image classification model, while the collected image data itself cannot be shared. 10.A federated learning based intelligent diagnosis system for cervical OCT images, characterized in that, The steps include: A data set division module is used to enhance and group the cervical tissue OCT images collected by the client; A classification model construction module is used to construct an OCT image classification model on the client side, including a spatial domain branch and a frequency domain branch, which respectively extract the spatial structure features and frequency domain texture features of the cervical OCT image. The feature vectors of the spatial domain and frequency domain branches are cross-domain interaction modeled through a multi-head attention fusion module to generate a global feature representation. The fused features pass through a fully connected classification layer and finally pass through a Softmax activation function; A dynamic weight aggregation construction module is used to design an adaptive dynamic weight aggregation strategy on the server side, dynamically adjust the model parameter aggregation weight according to the data size and local training loss, construct a privacy protection framework, and the client only uploads model parameter updates; A federal training module is configured to implement distributed federal training by using a Flower framework. In each round of communication, a server distributes an OCT image classification model to a client, the client uploads parameters after completing local training, and the server aggregates and updates the OCT image classification model according to dynamic weights. A testing module is configured to use the updated and trained OCT image classification model to classify and predict OCT images in a test set, and obtain a classification result.