Federated Cross Learning for Medical Image Segmentation

Xuanang Xu, Hannah H. Deng, Tianyi Chen, Tianshu Kuang, Joshua C. Barber, Daeseung Kim, Jaime Gateno, James J. Xia, Pingkun Yan · MIDL (PMLR 227) · 2023

Xu et al., Federated Cross Learning for Medical Image Segmentation, MIDL 2023 (proceedings volume dated 2024).

In one paragraph

Hospitals cannot pool patient scans, so federated learning trains a shared model by sending it to each hospital, training locally and combining the results. The standard combination, FedAvg, averages the hospitals’ weights and is known to suffer when each hospital’s data look different (non-iid). The authors give a short algebraic argument that the averaging step is the weak link, and propose FedCross: skip averaging and pass a single model from hospital to hospital in turn. Training several such models in parallel and averaging their predictions (FedCrossEns) recovers centralised accuracy and gives a per-pixel disagreement map as an uncertainty estimate.

The picture, intuition first

FedAvg. Picture K hikers starting from the same point on a foggy mountain range, each told to walk downhill using only their own local map. After a while the server takes the average position of all hikers. If the terrain were a single bowl, the average would be a fine place to stand. On a rugged range, each hiker may have descended into a different valley, and the midpoint between two valleys can be on a ridge. The longer each hiker walks before the average (more local epochs E), the further apart the valleys.

FedCross. One hiker walks the mountain alone, but lets each hospital’s map take over in turn: first the model trains on hospital A for a while, then it is handed to B, then to C. No averaging, so no ridge between valleys. The cost: the walker is always drawn towards the hospital it visited last, and the visits cannot run at the same time.

FedCrossEns. Send K walkers along different random routes. At test time take the average of their predicted masks; the pixel-wise standard deviation across the K masks says where they disagree.

Notation in plain words

The analysis (Section 2.2), step by step

Each hospital runs J gradient steps (their Eq. 1): \theta_k^{j+1}=\theta_k^j-\alpha_j\nabla\ell(\theta_k^j,D_k). The server’s average is \theta'=\sum_k w_k\theta_k^{J+1} (Eq. 2). Substituting the local updates, and using \sum_k w_k=1 and \theta_k^1=\theta, gives (Eq. 3)

\theta'=\theta-\underbrace{\alpha_1\sum_k w_k\nabla\ell(\theta,D_k)}_{=\ \alpha_1\nabla L(\theta)}-\underbrace{\sum_k w_k\sum_{j=2}^{J}\alpha_j\nabla\ell(\theta_k^j,D_k)}_{\text{gradients at each hospital's own wandering iterate}}.

In words: the first correction is one genuine step on the federation’s loss; the second is each hospital’s later steps, taken at points that have already drifted away from \theta in different directions. The authors say this term “may not be a descent direction” and can “grow arbitrarily” with J, hence averaging is risky on non-iid data, and the risk rises with the local epochs E. The algebra checks out (the paper drops the factor \alpha_1 in front of \nabla L).

FedCross then trains on one hospital per round, with K times as many local epochs so the number of epochs per hospital matches FedAvg. They note it equals centralised training in which the samples arrive grouped by hospital.

Results (four prostate MRI datasets as four clients, 3D U-Net, 400 epochs in total)

Method Global Dice (%) Global ASD (mm)
Localised (each hospital alone) 85.08 2.33
Centralised (pooled data) 88.61 1.43
FedAvg 86.72 1.57
FedProx 87.64 1.54
FedBN 87.40 1.58
FedCross 87.91 1.57
FedCrossEns 88.73 1.22

Second experiment (Fig. 5): vary local epochs E=1,2,4,8,16 with T=400/E rounds. FedAvg, FedProx and FedBN lose accuracy as E grows; FedCross is claimed to degrade less.

Questions and doubts

Takeaways