Manuscript Offprint
arXiv:2610.26800Learning to Refer: Inference-Time Collaboration in Decentralized Federated Learning
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
In decentralized federated learning, heterogeneous clients may develop complementary expertise, yet each query is typically evaluated only by the client where it arrives. To exploit this distributed expertise without global coordination, we formulate inference-time collaboration as budgeted local expert referral, a graph-constrained routing process in which a query can move only between neighboring clients and only visited clients contribute to its final prediction. EdgeDRM implements this framework by learning a density-based routing potential for each client: differences between neighboring potentials provide the comparisons used to select successive referrals, while local task models generate predictions that are aggregated along the resulting route. Both training and inference are decentralized, using only neighbor-local information without a central router or graph-wide client scoring. We establish estimation guarantees for the learned comparisons and characterize how local improvement and graph structure govern prior-weighted density gains from referral. Experiments on benchmark and real-world medical data show that EdgeDRM outperforms graph-matched decentralized baselines in most settings, with the clearest benefits under sparse connectivity.
1 Introduction
Federated learning (FL) enables multiple clients to train a shared model without centralizing their raw data. Conventionally, a server distributes the model and aggregates locally computed updates (McMahan et al., 2017). In decentralized FL (Lalitha et al., 2019), clients form a communication graph whose nodes represent clients and whose edges specify which pairs can exchange model information directly, with no central server coordinating the network. The graph determines which clients can collaborate during training, but at inference a query is typically evaluated only by the client where it arrives. This inference limitation becomes consequential when client data distributions differ, a setting known as statistical heterogeneity. Consequently, a model may perform well on queries from its local distribution but poorly on those from other clients.
Such variation in local performance creates an opportunity for inference-time collaboration: a query that is poorly handled by its entry client may be better handled by another client. For instance, a patient may first visit a local hospital that lacks the expertise needed for the case, even though a better-suited specialist is available elsewhere in the hospital network. Reaching that specialist, however, may require a sequence of local referrals because each physician can refer the patient only to nearby or affiliated hospitals, which may in turn refer the patient onward. Each referral incurs delay and cost, while the referral path determines which specialists can ultimately be reached. We call the analogous inference process in decentralized FL local expert referral: a query enters at an arbitrary client, may traverse only a limited number of communication edges, and receives predictions only from the clients it visits. Here, a referral is one neighbor-to-neighbor transfer, routing is the process that selects successive referrals, and the route is the resulting sequence of visited clients. Unlike global expert selection, local expert referral is sequential and path-dependent: both the referral budget and the graph topology restrict which experts a query can reach. This raises our central question:
Authors are listed in alphabetical order by surname.
Corresponding author: Qiong Zhang (qiong.zhang@mbzuai.ac.ae).
PREPRINT

(a) No router.

(b) Centralized router.

(c) Proposed local router.
Figure 1: Hospital analogy for inference-time routing. Gray lines indicate hospital pairs that can exchange information and know one another's capabilities, for example because they operate in the same region or health system. Without routing, a patient with a heart condition remains at an entry hospital whose expertise lies in gastroenterology (left). A centralized router sees all hospitals and dispatches the patient directly (center), but such global coordination is often infeasible because of administrative boundaries, privacy constraints, and geographic separation. In contrast, EdgeDRM (ours) makes stepwise local referrals (right): the gastroenterology hospital first routes the patient to a general chest center, whose thoracic expertise better matches the condition. The center then identifies the condition as cardiac and routes the patient to a dedicated cardiology hospital. Thus, each hop progressively improves the match between the patient and the hospital's expertise.
how can client specialization be exploited through graph-constrained local referral to improve on the entry client’s prediction? Figure 1 compares no routing, centralized routing, and local referral.
Existing work addresses only individual parts of this problem. Personalized and decentralized FL methods determine how clients collaborate during training, but typically leave each test query at the client where it arrives (Sun et al., 2023; Zantedeschi et al., 2020; Dai et al., 2022; Lin et al., 2025; Li et al., 2025). Federated routing and mixture-of-experts methods exploit specialization through global client scores, learned routing gates, or expert subsets, but do not model budgeted neighbor-to-neighbor query movement (Wang et al., 2026a; Reisser et al., 2021; Farhat et al., 2025). Graph-based referral and search methods support local query movement, but learn from observed referral outcomes or graph-wide search supervision rather than from the static datasets held by neighboring FL clients (KhudaBukhsh et al., 2016; Baranchuk et al., 2019). Together, these lines leave open how to learn query–client compatibility from decentralized client data and compose neighbor-local comparisons into an effective prediction path. See Appendix A for details.
Addressing this gap requires overcoming two coupled difficulties specific to decentralized routing. First, query–client comparisons must be learned without the graph-wide normalization used by centralized routers such as FedDRM (Wang et al., 2026a). Second, neighbor-local comparisons must remain coherent when composed along a multi-hop referral path. We therefore propose EdgeDRM, a decentralized density-ratio routing framework. It avoids graph-wide normalization by learning each edge comparison through balanced endpoint source classification. To make these comparisons composable, EdgeDRM assigns each client one routing potential shared across its incident edges. Under a common representation, the resulting differences accumulate to the potential difference between the entry client and each reached client. We also characterize discrepancies caused by different local representations. At deployment, each client compares only its neighbors using its own query representation and stored neighbor coefficients, requiring neither a global score vector nor predictions from unvisited clients. This work makes four contributions:
• We formulate inference-time collaboration in decentralized FL as budgeted local expert referral, in which queries move only between neighbors and only visited clients contribute to prediction.
• We develop EdgeDRM, a neighbor-local framework that replaces graph-wide normalization with balanced endpoint source classification. One potential per client makes edge comparisons coherent across hops, and history-weighted aggregation uses only visited clients.
• We show that, under a shared representation, EdgeDRM learns increasingly accurate neighbor comparisons as training data and optimization steps increase. When locally better neighbors consistently guide the route, these comparisons yield cumulative gains in query–client compatibility and lead to the globally best-matched client given sufficient referral budget.
• Across benchmark, scaling, tiered-hospital, and preliminary real-world medical evaluations, EdgeDRM outperforms graph-matched decentralized baselines in most settings, with clear gains on sparse graphs but no consistent advantage under complete connectivity.
PREPRINT
Each client has a local dataset consisting of samples drawn independently from a client-specific joint distribution . Let and let denote client 's sample proportion. For each class , let denote the marginal probability of class at client , write , and let denote the conditional feature distribution given . The feature marginal is then . We allow the clients' distributions to differ, so that for some .
Distributional models and conditional objective. The joint distribution factorizes as . Let denote a shared encoder and let be the resulting representation. We model under the restriction that it depends on only through . Then rather than modeling directly, we model its induced representation distribution .
Conditional label distribution. For each client , we model the conditional label distribution using the shared encoder and a private prediction head :
For identifiability, we set and for each client . The shared encoder provides a common representation across clients, while the client-specific heads allow their conditional label distributions to differ.
Representation marginal distribution. To share information across clients, we jointly model the representation marginals through a common-reference density-ratio model (DRM), following FedDRM (Wang et al., 2026a). Specifically, we assume that the measures admit strictly positive Radon–Nikodym derivatives with respect to a common baseline distribution and satisfy:
and is the density of relative to parameterized by and . For identifiability, we take and set and . Because all clients share the same baseline distribution, it cancels from every pairwise comparison: . Each client is associated with one coefficient pair . For a connected graph, differences across its edges determine these pairs relative to client 1.
From empirical likelihood to a conditional objective. The baseline distribution is unknown, so an empirical-likelihood (EL) construction leaves it unrestricted and assigns masses to the distinct pooled representations . These masses must normalize both and every tilted distribution . To state the connection with source classification, let denote the source client and define by and . Under the normalized DRM, Bayes' rule gives:
Thus, is the posterior probability that a representation originates from client . For fixed representations and finite slopes , maximizing EL over both the baseline masses and the free intercepts is equivalent, up to a constant independent of these coefficients, to maximizing over the intercepts. Appendix B proves this identity, including existence of the intercept optimum and the treatment of repeated representations. Profiling the masses alone does not give a pointwise equality at arbitrary intercepts. Motivated by this EL connection, we use the softmax expression as a conditional source model and combine it with the conditional-label model to define
PREPRINT
The conditional-label loss fits client-specific predictors, while the source-classification loss estimates density ratios by identifying each representation's source. For an edge , the odds provide the comparison used to evaluate referral from client to client . These odds measure distributional compatibility, not prediction accuracy; predictions come from the conditional-label models at visited clients. Computing the global source-classification loss requires all client scores and a graph-wide normalization, which graph-local communication cannot provide. This limitation distinguishes decentralized FL from FedDRM and motivates a conditional source comparison on each communication edge.
3 Decentralized Training and Local Expert Referral
Section 2 defines the statistical model and its global objective. We now describe how clients train this model through neighbor communication and use the fitted quantities for referral and prediction.
3.1 Decentralized training with graph-local source likelihoods
Because the two terms in (3) impose different communication requirements, we train the model in two stages. Stage I trains the encoders and private prediction heads using the conditional-label loss and neighbor mixing. Stage II freezes the learned encoders, refines the private prediction heads, and estimates the density-ratio coefficients from graph-local source likelihoods.
For training, client forms the local objective in (18) from its local conditional-label loss (the first term in (3)) and one local source-classification loss for each incident edge, all evaluated on . The graph objective in (19) then averages these client-local objectives with equal weights: . For the conditional-label component, this replaces the sample-proportion weight in (3) by . This equal weighting is the canonical formulation in decentralized optimization and is widely used in decentralized FL, where doubly stochastic neighbor mixing gives each client equal weight (Lalitha et al., 2019; Koloskova et al., 2020; Sun et al., 2023). This weighting convention differs from the centralized setting.
Stage I: conditional-label model training. The model in Section 2 uses a shared encoder parameter , but decentralized optimization requires each client to maintain a local copy . For compactness, let collect the local encoder and prediction-head parameters at client . Stage I runs for communication rounds. At round , client starts from and takes SGD steps on its empirical conditional-label loss using . Let denote the resulting encoder and prediction-head parameters. The graph determines which pairs of clients can exchange these intermediate parameters. Because no central server aggregates all client updates, each client instead combines its own intermediate parameters with those received from its neighbors. A mixing matrix determines the weights in this local aggregation. Specifically, let be symmetric and doubly stochastic, with whenever . Client then updates its parameters as
For each edge , we use the Metropolis weight and set . Neighbor mixing is an established decentralized optimization mechanism (Koloskova et al., 2020), but finitely many rounds need not produce exact consensus, so the learned encoders may differ across clients.
Stage II: frozen-encoder density-ratio fitting. Stage I uses local SGD and neighbor mixing to optimize the client-averaged conditional-label objective described above. Stage II addresses the remaining source-classification loss, which learns the density ratios by predicting the source client C from a representation Z. In centralized FL, a server can coordinate the scores of all m clients required to evaluate the source probabilities . In the decentralized setting, however, each client communicates only with its neighbors and therefore cannot evaluate the graph-wide normalization in . Because each referral traverses one edge, deciding whether to move the query requires only a comparison between the two endpoints. We therefore replace the global m-client source-classification problem with a binary source-classification problem on each edge.
For each edge with , we form a balanced binary source-classification problem by assigning equal weight to the two endpoint mean losses. Its posterior probability that comes from client rather than client is , with
This binary problem is the source-classification term in (3) restricted to the endpoints , and it learns the coefficient differences needed to compare them. Because client i uses the same coefficient pair on all its incident edges, the
PREPRINT
graph links these pairwise comparisons through their shared endpoints. The two endpoint losses receive equal weight, irrespective of and . Thus, the sample-count prior is not included in the training logit. The exact graph-local objective is given in Appendix B.4. After Stage I, clients freeze their encoders and fit their private heads and density-ratio coefficients using local conditional-label and incident-edge source losses. Only sample counts, density-ratio coefficients, and their gradient contributions are exchanged across edges. Encoders, private heads, and raw data remain local. These fitted quantities drive referral and prediction.
3.2 Budgeted local expert referral & Prediction using the referral history
Budgeted local expert referral. For a query , let denote the population pairwise log-odds obtained by adding the sample-count prior to the learned balanced comparison. This quantity provides the criterion for referring the query from client to client . At inference, client substitutes the fitted density-ratio coefficients and its own fitted representation into this quantity, giving the plug-in estimator
Hence training estimates the density-ratio term without sample-count weighting, and inference adds exactly once. Applying these fitted endpoint comparisons sequentially produces a query-dependent route through the graph. For a query entering at client under movement budget , the realized route is
The route construction is detailed in Algorithm 1. We describe its intuition below. During referral, x is passed between neighboring clients together with the visited-client set, accepted edge scores, and remaining movement budget. At client , the router scores each unvisited neighbor using (6) and selects the largest score, with ties broken deterministically. The query moves to the selected neighbor only if this score exceeds and otherwise terminates. Evaluating a candidate requires only the current client's representation of x and the stored sample counts and density-ratio coefficients of the two endpoints. The candidate need not inspect the query. The procedure uses neither the query label nor information about prediction correctness. It returns the visited route and accepted edge scores for the final prediction rule.
Algorithm 1: Budgeted local expert referral.
1: Input: Query x, entry client s, threshold , and movement budget L.
2: , ,
3: while do
4:
5: if then break
6:
7: if then break
8: Send the packet and accepted score to
9: ,
10:
11: end while
12: Output: and the accepted scores.
Prediction using the referral history. Because referral scores reflect distributional compatibility rather than prediction accuracy directly, earlier visited clients may still provide useful complementary predictions. We therefore aggregate the predictions from all clients on . Denote the fitted probability vector at client as . For each visited client , let and denote the cumulative accepted edge score from the entry client to for . We set . The final prediction is:
4 Theoretical Results
We establish theoretical guarantees for coefficient estimation and referral gain in EdgeDRM. Our results characterize the accuracy and asymptotic normality of parameter estimation (Section 4.1) and referral gains (Section 4.2). Proofs and additional results are given in Appendix C.
4.1 How accurately can we estimate the parameters?
We first study the performance of parameter estimation in stage II. To separate coefficient estimation from representation learning, consider a common representation from Section 2, fixed independently of the coefficient-fitting samples. Let collect the free density-ratio coefficients , and private-head parameters under the normalizations in Section 2.
PREPRINT
We analyze updates of Stage-II optimization on in (19), holding fixed and using unbiased mini-batch gradients with step sizes for . Here is a curvature constant and is a fixed offset. We refer to Appendix C.1 for further details on conditions on these constants. The following theorem bounds the statistical and optimization errors of the Stage-II output and establishes its asymptotic normality.
Theorem 1. Let denote the true coefficient vector of the models in Section 2, and suppose . Assume the coefficients are identifiable and assume the population Hessian at is positive definite and, with probability tending to one, , throughout a convex region containing a finite empirical minimizer and the optimization trajectory, for a constant independent of . Under the remaining regularity conditions in Appendix C.1, the Stage-II output from the specified SGD procedure satisfies, as ,
If, in addition, , then for some specified in Appendix C.1,
The first term in (8) is the statistical error from N training samples. The second is the optimization error after R updates. Thus, when , the optimization error is dominated by , and the output has the asymptotic distribution in (9).
We note that, under the stated models, changing client sample proportions does not change the population minimizer . The proportions need only satisfy , without a specified convergence rate. The coefficient-estimation bound in Theorem 1 implies a bound on the edge-comparison errors used for referral. In particular, for any fixed with finite , we obtain
This comparison-error bound yields the referral guarantee in Section 4.2. We remark that the result applies to coefficient fitting with a common, independently fixed encoder.
4.2 How far and how much can referral improve?
Fix a query and entry client , and consider the route in (7). Using the population coefficients of Section 2, write and . Thus, , and is the referral gain. Under the DRM, this gain is the log ratio of the terminal and entry clients' prior-weighted densities. Our referral guarantees rely on the following intuitive structural properties.
Minimum local improvement. Assume there is such that every nonoptimal client has a neighbor whose potential is at least higher:
Thus, a client with no higher-potential neighbor must be globally optimal.
Ascent depth. For , let be the longest strictly ascending path length from , with each step choosing a neighbor within of the highest neighbor potential. Then , and under the conditions below, it bounds the number of accepted referrals.
Theorem 2. Under the conditions of Theorem 1, use for referral at a fixed query with finite . For any , there exists a constant , independent of and , such that the following holds with . Suppose (11) holds, , and . For all sufficiently large , , with probability at least , Algorithm 1 with movement budget makes moves and satisfies
On the same event, guarantees that the route reaches a maximizer.
The guarantee in (12) lower-bounds , the improvement in source compatibility, by a product of two terms. The first term, , lower-bounds the population gain per accepted move. Larger per-step gains allow substantial improvement with fewer referrals. The second term, , is the effective step count. A smaller ascent depth requires less budget to guarantee reaching a global maximizer, while with the route may exhaust its budget first. Note that improvement in source compatibility does not by itself imply improved predictive performance. Appendix C.3 provides the proof and analyzes ascent depth and referral gain in several common graph types.
PREPRINT
5 Experiments
5.1 Experimental setup and evaluation
Benchmarks and topologies. We first evaluate on CIFAR-10, CIFAR-20, and CIFAR-100 benchmarks under 2 non-IID partitions. In the shards-per-client (SPC) partition based on (McMahan et al., 2017), each client receives five equal-sized, label-homogeneous shards for CIFAR-10 and 25 for CIFAR-20/100. In the Dirichlet partition, each client's class proportions are drawn from a Dirichlet distribution with concentration 0.3. The main benchmark has eight clients. We consider four communication topologies: clients are connected as a PATH, a CYCLE, a connected random graph in which every client has four neighbors (RR4), or a COMPLETE graph. These are standard decentralized communication topologies and are ordered by increasing connectivity. For further details on the benchmarks, graph topologies, and data construction, see Appendix D.1.
Training and inference. We train randomly initialized ResNet-18 models for 800 communication rounds using DFedAvgM (Sun et al., 2023), freeze each local encoder, and then fit the personalized classifier heads and routers for 200 rounds. The routing objective weights the two endpoints of every edge equally. At inference, EdgeDRM starts from a uniformly sampled non-source entry, excludes revisits, and averages predictions from visited experts using temperature-one score weights.
Comparisons and reporting. At test time, each query from source client is assigned uniformly at random to an entry client other than . Local trains one model per client using only local data and predicts with the model at that entry. The decentralized baselines DFedAvgM (Sun et al., 2023), DisPFL (Dai et al., 2022), and FedSPD (Lin et al., 2025) also predict with their learned model at that entry. By contrast, we include centralized FedDRM (Wang et al., 2026a) only as an illustrative reference because its client-selection head scores all clients globally and therefore cannot operate under the neighbor-only communication constraints of our decentralized setting. EdgeDRM-NR uses the same trained model but keeps each query at its entry client.
5.2 Main results
Table 1: Eight-client decentralized CIFAR benchmark reporting system accuracy (%) across three datasets and two non-IID partitions. Local and centralized FedDRM are illustrative references. Bold cells with blue shading mark the best decentralized result within each topology and setting. All entries are means sample SD across 3 seeds.
| Group | Method | CIFAR-10 | CIFAR-20 | CIFAR-100 | |||
|---|---|---|---|---|---|---|---|
| Dir-0.3 | 5-SPC | Dir-0.3 | 25-SPC | Dir-0.3 | 25-SPC | ||
| Reference | Local | ||||||
| FedDRM | |||||||
| PATH | DFedAvgM | ||||||
| DisPFL | |||||||
| FedSPD | |||||||
| EdgeDRM-NR | |||||||
| EdgeDRM | |||||||
| CYCLE | DFedAvgM | ||||||
| DisPFL | |||||||
| FedSPD | |||||||
| EdgeDRM-NR | |||||||
| EdgeDRM | |||||||
| RR4 | DFedAvgM | ||||||
| DisPFL | |||||||
| FedSPD | |||||||
| EdgeDRM-NR | |||||||
| EdgeDRM | |||||||
| COMPLETE | DFedAvgM | ||||||
| DisPFL | |||||||
| FedSPD | |||||||
| EdgeDRM-NR | |||||||
| EdgeDRM | |||||||
CIFAR benchmark results. The main results in Table 1 yield three main observations. First, EdgeDRM is the strongest graph-constrained method in most settings. It ranks first in 16 of the 18 dataset–partition configurations on the three
PREPRINT
sparse graphs and in 17 of the 24 graph–configuration pairs overall. Its mean accuracy difference relative to the strongest competing decentralized method in each sparse-graph setting is +3.61 percentage points. The two sparse-graph exceptions both occur on CIFAR-20/Dirichlet-0.3, which exhibits milder client label skew than CIFAR-20/25-SPC in the realized partitions. Across the sparse graphs, its mean margin over the strongest competing decentralized method is 4.75 percentage points under SPC versus 2.48 under Dirichlet-0.3, a difference of 2.27 points. Taken together with the EdgeDRM-NR ablation below, the results suggest that learned referral helps exploit stronger client specialization. Second, the COMPLETE graph, equivalent to the central server case, EdgeDRM is effectively tied with DFedAvgM, averaging only 0.49 points lower across settings. So full graph connectivity narrows the advantage of EdgeDRM. Both methods nevertheless remain below centralized FedDRM in all six settings, yielding the gap between routing designed for centralized setting. Third, referral itself provides a large and universal gain. EdgeDRM outperforms EdgeDRM-NR in all configurations, by 3.30–28.77 points and 11.87 points on average.
Where the referral gain comes from. We conduct an ablation to isolate the effect of the routing rule. Every method uses the terminal expert's hard prediction, without averaging predictions across visited experts. Besides EdgeDRM and EdgeDRM-NR, we also compare Count-only, which triggers a referral when , and Random, which samples uniformly among unvisited neighbors. The improvement over EdgeDRM-NR and Random shows that selecting suitable neighbors is more effective than null/arbitrary referral. Comparison with Count-only further shows that the gain comes from the trained router rather than solely from differences in local sample sizes.

Figure 2: Fixed-expert hard-terminal routing ablation on CIFAR-10 and CIFAR-100 with Dirichlet-0.3 partitions and RR4.
Scaling in number of clients. We test whether the behavior observed with few clients persists as the client population grows substantially. Table 2 shows that EdgeDRM remains the strongest decentralized method in both settings. We note that, because the total CIFAR-10 data pool is fixed, increasing the number of clients reduces the average local sample sizes, which likely contributes to the lower accuracy relative to the results in Table 1.
Table 2: CIFAR-10/RR4 system accuracy with 32 clients (%; mean ± SD over three seeds).
| Setting | Reference | Decentralized | Reference | ||||
|---|---|---|---|---|---|---|---|
| Local | DFedAvgM | DisPFL | FedSPD | EdgeDRM-NR | EdgeDRM | FedDRM | |
| Dir-0.3 | 16.45 ± 1.15 | 27.79 ± 3.25 | 23.71 ± 2.65 | 17.82 ± 0.69 | 21.52 ± 1.50 | 30.06 ± 1.16 | 38.45 ± 0.52 |
| 5-SPC | 18.11 ± 0.47 | 27.92 ± 1.22 | 24.87 ± 0.95 | 20.54 ± 0.75 | 22.76 ± 1.20 | 31.70 ± 0.39 | 35.96 ± 0.52 |
5.3 Referral traffic
We conduct an ablation study to examine how a sample-count prior changes referral traffic across hospital tiers. We use 32 clients: 16 small, eight medium, and eight large hospitals holding 250, 1000, and 4000 training examples, respectively. We evaluate two graph structures. In the layered graph, each tier forms a cycle, every small hospital connects to one medium hospital, and medium and large hospitals are matched one-to-one. Thus, a small hospital can reach the large tier only through the medium tier, requiring at least two hops. The shortcut graph retains all edges and adds one direct small–large edge for each small hospital, making a large hospital reachable from every small hospital in one hop. EdgeDRM w/o prior applies the same history-weighted referral rule after removing the sample-count offset and serves as a sample-size-agnostic comparison. In Figure 3, EdgeDRM w/o prior largely preserves the EdgeDRM-NR tier proportions, whereas EdgeDRM substantially increases large-hospital traffic, with an even stronger concentration when shortcut edges provide direct access to large hospitals. This pattern captures a realistic
Small Medium Large
(a) Layered

(b) Shortcut

Figure 3: Referral traffic by hospital tier on two topologies. Bars show the mean share of visited-classifier calls over 3 seeds.
PREPRINT
healthcare trade-off: the sample-count prior is a plausible way
to represent the stronger expertise of larger hospitals, but systematically trusting those hospitals concentrates demand and increases their service burden. The shortcut amplification further highlights the need for tiered referral systems: allowing patients to bypass intermediate hospitals and go directly to the largest regional centers can overwhelm scarce specialist capacity, whereas staged referrals distribute demand across levels of care.
5.4 Real medical data
To assess EdgeDRM beyond synthetic benchmarks, we conduct a real-world skin-lesion classification study on ISIC2019 using the six source-center assignments distributed with FLamby (du Terrail et al., 2022). Unlike the CIFAR benchmarks, where client heterogeneity is imposed through synthetic label-skew partitions, these clients follow source and acquisition metadata from real medical image collections. Every test image is evaluated at all six entry clients, and we report pooled balanced accuracy, which weights recall equally across classes to account for the pronounced class imbalance in ISIC2019. Appendix D.3 provides the data provenance, split audit, graph, training, and evaluation details. EdgeDRM matches or improves upon the graph-matched DFedAvgM baseline on three of the four topologies. On COMPLETE, it is 0.14 points lower, consistent with previous results, where full connectivity likewise narrows or eliminates the advantage of learned local referral.
Table 3: ISIC2019 balanced accuracy (%; three-seed mean). Parentheses show the EdgeDRM change from DFedAvgM.
| Graph | DFedAvgM | EdgeDRM |
|---|---|---|
| PATH | 28.45 | 28.62 (+0.18) |
| CYCLE | 27.20 | 28.35 (+1.15) |
| RR3 | 27.45 | 27.76 (+0.31) |
| COMPLETE | 28.93 | 28.79 (-0.14) |
6 Conclusion and Limitations
EdgeDRM formulates inference-time collaboration in decentralized federated learning as budgeted local expert referral. A query moves only between neighbors on the communication graph, and only visited experts contribute to its final prediction. Neighbor-local density-ratio comparisons make referral trainable without a central router or global expert scoring, while our analysis relates referral gains to comparison accuracy and graph structure.
Across six CIFAR settings, EdgeDRM ranks first among graph-matched decentralized methods in 16 of the 18 sparse-graph comparisons, with a mean accuracy difference of percentage points relative to the strongest competing method in each comparison. The COMPLETE graph gives EdgeDRM its highest absolute accuracy in every setting, but its mean advantage over DFedAvgM disappears (-0.49 points). Together, these results establish graph-constrained referral as a distinct inference setting and a useful mechanism under sparse connectivity, while showing that greater connectivity can improve absolute accuracy without increasing the relative benefit of learned referral. Closing the gap between the theory and learned neural representations remains future work.
References
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Aarti Singh and Xiaojin (Jerry) Zhu, editors, Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, AISTATS 2017, 20-22 April 2017, Fort Lauderdale, FL, USA, volume 54 of Proceedings of Machine Learning Research, pages 1273–1282. PMLR, 2017. URL http://proceedings.mlr.press/v54/mcmahan17a.html.
Anusha Lalitha, Osman Cihan Kilinc, Tara Javidi, and Farinaz Koushanfar. Peer-to-peer federated learning on graphs. arXiv preprint arXiv:1901.11173, 2019. URL https://arxiv.org/abs/1901.11173.
Tao Sun, Dongsheng Li, and Bao Wang. Decentralized federated averaging. IEEE Trans. Pattern Anal. Mach. Intell., 45(4):4289–4301, 2023. doi: 10.1109/TPAMI.2022.3196503. URL https://doi.org/10.1109/TPAMI.2022.3196503.
Valentina Zantedeschi, Aurélien Bellet, and Marc Tommasi. Fully decentralized joint learning of personalized models and collaboration graphs. In Silvia Chiappa and Roberto Calandra, editors, The 23rd International Conference on Artificial Intelligence and Statistics, AISTATS 2020, 26-28 August 2020, Online [Palermo, Sicily, Italy], volume 108 of Proceedings of Machine Learning Research, pages 864–874. PMLR, 2020. URL http://proceedings.mlr.press/v108/zantedeschi20a.html.
Rong Dai, Li Shen, Fengxiang He, Xinmei Tian, and Dacheng Tao. Dispfl: Towards communication-efficient personalized federated learning via decentralized sparse training. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato, editors, International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 4587–4604. PMLR, 2022. URL https://proceedings.mlr.press/v162/dai22b.html.
PREPRINT
I-Cheng Lin, Osman Yagan, and Carlee Joe-Wong. Fedspd: A soft-clustering approach for personalized decentralized federated learning. In Silvia Chiappa and Sara Magliacane, editors, Conference on Uncertainty in Artificial Intelligence, Rio Othon Palace, Rio de Janeiro, Brazil, 21-25 July 2025, volume 286 of Proceedings of Machine Learning Research, pages 2618–2641. PMLR, 2025. URL https://proceedings.mlr.press/v286/lin25a.html.
Xiang Li, Chendi Wang, Buxin Su, Qi Long, and Weijie Su. Mitigating the privacy-utility trade-off in decentralized federated learning via f-differential privacy. In Danielle Belgrave, Cheng Zhang, Laura N. Montoya, Hsuan-Tien Lin, Razvan Pascanu, Piotr Koniusz, Marzyeh Ghassemi, Nancy Chen, Iván Vladimir Meza Ruíz, and Arturo Loaiza-Bonilla, editors, Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2025, NeurIPS 2025, San Diego, CA, USA, December 2-7, 2025 / Mexico City, Mexico, November 30 - December 5, 2025, 2025. URL http://papers.nips.cc/paper_files/paper/2025/hash/f6913c4fd14f608077a4145f2744ec89-Abstract-Conference.html.
Zijian Wang, Xiaofei Zhang, Xin Zhang, Yukun Liu, and Qiong Zhang. Beyond aggregation: Guiding clients in heterogeneous federated learning. In International Conference on Learning Representations, volume 2026, pages 149981–150004, 2026a.
Matthias Reisser, Christos Louizos, Efstratios Gavves, and Max Welling. Federated mixture of experts. arXiv preprint arXiv:2107.06724, 2021.
Yehya Farhat, Hamza ElMokhtar Shili, Fangshuo Liao, Chen Dun, Mirian Hipolito Garcia, Guoqing Zheng, Ahmed Awadallah, Robert Sim, Dimitrios Dimitriadis, and Anastasios Kyrillidis. Learning to specialize: Joint gating-expert training for adaptive moes in decentralized settings. In Danielle Belgrave, Cheng Zhang, Laura N. Montoya, Hsuan-Tien Lin, Razvan Pascanu, Piotr Koniusz, Marzyeh Ghassemi, Nancy Chen, Iván Vladimir Meza Ruíz, and Arturo Loaiza-Bonilla, editors, Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2025, NeurIPS 2025, San Diego, CA, USA, December 2-7, 2025 / Mexico City, Mexico, November 30 - December 5, 2025, 2025. URL http://papers.nips.cc/paper_files/paper/2025/hash/03bb44eceb94537ee2e2f00a8dca60b1-Abstract-Conference.html.
Ashiqur R. KhudaBukhsh, Peter J. Jansen, and Jaime G. Carbonell. Distributed learning in expert referral networks. In Gal A. Kaminka, Maria Fox, Paolo Bouquet, Eyke Hüllermeier, Virginia Dignum, Frank Dignum, and Frank van Harmelen, editors, ECAI 2016 - 22nd European Conference on Artificial Intelligence, 29 August-2 September 2016, The Hague, The Netherlands - Including Prestigious Applications of Artificial Intelligence (PAIS 2016), volume 285 of Frontiers in Artificial Intelligence and Applications, pages 1620–1621. IOS Press, 2016. doi:10.3233/978-1-61499-672-9-1620. URL https://doi.org/10.3233/978-1-61499-672-9-1620.
Dmitry Baranchuk, Dmitry Persiyanov, Anton Sinitsin, and Artem Babenko. Learning to route in similarity graphs. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 475–484. PMLR, 2019. URL http://proceedings.mlr.press/v97/baranchuk19a.html.
Anastasia Koloskova, Nicolas Loizou, Sadra Boreiri, Martin Jaggi, and Sebastian U. Stich. A unified theory of decentralized SGD with changing topology and local updates. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 5381–5393. PMLR, 2020. URL http://proceedings.mlr.press/v119/koloskova20a.html.
Jean Ogier du Terrail, Samy-Safwan Ayed, Edwige Cyffers, Felix Grimberg, Chaoyang He, Regis Loeb, Paul Mangold, Tanguy Marchand, Othmane Marfoq, Erum Mushtaq, Boris Muzellec, Constantin Philippenko, Santiago Silva, Maria Telenczuk, Shadi Albarqouni, Salman Avestimehr, Aurélien Bellet, Aymeric Dieuleveut, Martin Jaggi, Sai Praneeth Karimireddy, Marco Lorenzi, Giovanni Neglia, Marc Tommasi, and Mathieu Andreux. Flamby: Datasets and benchmarks for cross-silo federated learning in realistic healthcare settings. In Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh, editors, Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, 2022. URL http://papers.nips.cc/paper_files/paper/2022/hash/232eee8ef411a0a316efa298d7be3c2b-Abstract-Datasets_and_Benchmarks.html.
Zijian Wang, Pengfei Li, Guangyu Yang, and Qiong Zhang. FedSPM: Routing-enabled federated learning under dual heterogeneity via semiparametric mixture. arXiv preprint arXiv:2607.04085, 2026b. URL https://arxiv.org/abs/2607.04085v1.
Rui Ye, Zhenyang Ni, Fangzhao Wu, Siheng Chen, and Yanfeng Wang. Personalized federated learning with inferred collaboration graphs. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 39801–39817. PMLR, 2023. URL https://proceedings.mlr.press/v202/ye23b.html.
PREPRINT
Salma Kharrat, Marco Canini, and Samuel Horváth. DPFL: decentralized personalized federated learning. In Yingzhen Li, Stephan Mandt, Shipra Agrawal, and Mohammad Emtiyaz Khan, editors, International Conference on Artificial Intelligence and Statistics, AISTATS 2025, Mai Khao, Thailand, 3-5 May 2025, volume 258 of Proceedings of Machine Learning Research, pages 5086–5094. PMLR, 2025. URL https://proceedings.mlr.press/v258/kharrat25a.html.
Jon M. Kleinberg. The small-world phenomenon: an algorithmic perspective. In F. Frances Yao and Eugene M. Luks, editors, Proceedings of the Thirty-Second Annual ACM Symposium on Theory of Computing, May 21-23, 2000, Portland, OR, USA, pages 163–170. ACM, 2000. doi: 10.1145/335305.335325. URL https://doi.org/10.1145/335305.335325.
Liang Ma, Mudhakar Srivatsa, Derya Cansever, Xifeng Yan, Sue Kase, and Michelle Vanni. Performance bounds of decentralized search in expert networks for query answering. ACM Trans. Knowl. Discov. Data, 13(2):18:1–18:23, 2019. doi: 10.1145/3300230. URL https://doi.org/10.1145/3300230.
Masashi Sugiyama, Taiji Suzuki, and Takafumi Kanamori. Density ratio estimation in machine learning. Cambridge University Press Cambridge, 2012.
Xiaoye Jiang, Lek-Heng Lim, Yuan Yao, and Yinyu Ye. Statistical ranking and combinatorial Hodge theory. Math. Program., 127(1, Ser. B):203–244, 2011. ISSN 0025-5610,1436-4646. doi: 10.1007/s10107-010-0419-x. URL https://doi.org/10.1007/s10107-010-0419-x.
Carlos Hernández-Pérez, Marc Combalia, Sebastian Podlipnik, Noel CF Codella, Veronica Rotemberg, Allan C Halpern, Ofer Reiter, Cristina Carrera, Alicia Barreiro, Brian Helba, et al. BCN20000: Dermoscopic lesions in the wild. Scientific data, 11(1):641, 2024.
Philipp Tschandl, Cliff Rosendahl, and Harald Kittler. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific data, 5(1):180161, 2018.
Noel C. F. Codella, David A. Gutman, M. Emre Celebi, Brian Helba, Michael A. Marchetti, Stephen W. Dusza, Aadi Kalloo, Konstantinos Liopyris, Nabin K. Mishra, Harald Kittler, and Allan Halpern. Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (isbi), hosted by the international skin imaging collaboration (ISIC), 2018. URL https://doi.org/10.1109/ISBI.2018.8363547.
A Related Work
Federated routing and mixtures of experts. FedDRM is the closest starting point for our work. It learns a globally indexed source-classification head and asks a server to compare all clients for every query (Wang et al., 2026a). FedSPM instead uses a semiparametric mixture to represent inter- and intra-client heterogeneity (Wang et al., 2026b). Federated mixture-of-experts methods also construct specialized predictors: FedMix adapts a client-specific subset of experts, whereas DDOME jointly trains gates and experts for on-the-fly selection (Reisser et al., 2021; Farhat et al., 2025). These methods establish the value of specialization, but they do not address our information constraint: at inference, no server or client can evaluate a global gate. EdgeDRM replaces global selection with a sequence of graph-supported comparisons and forms its prediction only from the experts reached by that sequence.
Personalized and decentralized federated learning. Personalized FL decides which information clients should share during training. pFedGraph learns a weighted collaboration graph at a server (Ye et al., 2023). Fully decentralized methods learn personalized models and sparse collaboration graphs, exchange sparse model masks, optimize budgeted collaborator selection, or form soft clusters through peer-to-peer updates (Zantedeschi et al., 2020; Dai et al., 2022; Kharrat et al., 2025; Lin et al., 2025). DFedAvgM combines local momentum with neighbor model averaging (Sun et al., 2023), while decentralized SGD theory characterizes gossip and local-update convergence (Koloskova et al., 2020). These approaches determine how models collaborate during training and ordinarily return a model at each client. Our problem begins after training: for each new query, the system must decide whether and where that query should move. We therefore use DFedAvgM as the primary graph-matched training baseline and isolate referral with EdgeDRM-NR, evaluated on the same EdgeDRM predictors.
Expert referral and local graph search. Expert-referral networks are closer to our deployment protocol because they model accept-or-forward decisions on sparse graphs. DIEL learns topic-dependent neighbor expertise from observed referral outcomes through a distributed active-learning rule (KhudaBukhsh et al., 2016). Decentralized-search theory studies when local connections yield short query paths (Kleinberg, 2000; Ma et al., 2019), and learned similarity-graph routing can use graph-wide search supervision (Baranchuk et al., 2019). EdgeDRM requires neither logged referral outcomes nor target paths. Its local scores are learned from the static datasets held at neighboring clients, and its movement budget makes the access constraint explicit.
PREPRINT
Density ratios and pairwise consistency. Classifier-based density-ratio estimation recovers pointwise density ratios from prior-corrected posterior odds (Sugiyama et al., 2012). Statistical Hodge theory shows how pairwise comparison flows decompose into gradient, cyclic, and harmonic components (Jiang et al., 2011). We do not propose a new density-ratio estimator in isolation. Instead, one potential per client induces compatible edge differences, while balanced endpoint classification estimates pairwise density-ratio terms and the sample-count prior is added only at inference. We then analyze how estimation error, representation disagreement, and graph structure affect the resulting referral policy.
B Derivation of the EdgeDRM Objective
This appendix establishes the precise connection between empirical likelihood (EL) and the global client-source conditional likelihood in Section 2. The equality requires profiling both the baseline masses and the density-ratio intercepts at fixed representations and slopes. We then derive the graph-local conditional objective used by EdgeDRM.
B.1 Empirical likelihood under the reference density-ratio model
Our objective is to estimate the label model and the representation density ratios by maximizing their joint empirical likelihood while treating the reference distribution as an unrestricted nuisance parameter. Recall that client holds with , total sample size , and sample proportion . Given the shared encoder , write for the observed representation and let denote the induced representation distribution on client . For client , the reference density-ratio model specifies
The reference constraint makes , whereas the remaining density ratios describe how each client distribution tilts the common baseline . For the empirical-likelihood construction, treat the common representations as fixed. Let be the distinct pooled representations, let , and write for the index satisfying . Thus, and . We represent the unknown reference distribution by assigning mass to each distinct pooled representation . Let denote the joint distribution of the label and representation at client . Following the empirical-likelihood construction in Wang et al. (2026a), we first define the joint empirical log-likelihood of the observed labels and representations as
Because the conditional label model depends on X only through , the joint distribution factorizes into the conditional label distribution and the representation marginal:
The density-ratio model and the definition of the empirical baseline masses then give
Substituting these two identities into the joint empirical log-likelihood yields
The empirical-likelihood problem maximizes this joint objective over the model parameters and baseline masses subject to the requirement that and every tilted measure are probability distributions. The baseline normalization and the client-specific normalizations therefore impose
PREPRINT
Assigning one mass to each distinct representation avoids counting the same atom of more than once, while the multiplicity preserves its full contribution to the likelihood. A finite objective value further requires for every observed atom. Because the normalization constraints couple and , profiling only at fixed does not generally recover the client-source likelihood pointwise in . The exact equivalence therefore requires profiling both the baseline masses and the density-ratio intercepts, as established next.
B.2 Exact equivalence after profiling masses and intercepts
At fixed representations and slopes, our objective is to profile the baseline masses and density-ratio intercepts and express the resulting empirical likelihood as a conditional source-classification likelihood. To define this conditional likelihood, introduce the source variable and let denote the pooled source–representation distribution with
Under a normalized density-ratio model, Bayes' rule gives the posterior source probability
For any finite candidate coefficients, this softmax expression remains a valid conditional source model even when no normalized baseline exists for those coefficients. For the profiling identity, fix and the resulting pooled representations, and fix finite slopes with . Define the joint empirical-likelihood feasible set
Our claim is that jointly maximizing the empirical likelihood over the baseline masses and intercepts is equivalent to maximizing the conditional source likelihood over the intercepts alone:
where . Thus, after profiling both the unrestricted baseline masses and the density-ratio intercepts, the two optimized objectives differ only by the fixed conditional-label term and the data-dependent constant . We follow the profiling argument of Wang et al. (2026a): first profile the baseline masses, then identify their Lagrange multipliers through the intercept score equations, and finally verify existence and global optimality.
Profiling the baseline masses. Fix an intercept vector for which the empirical-likelihood constraints admit positive masses. The conditional-label term and do not depend on , so profiling only requires maximizing . Using the equivalent constraints and for , introduce the multiplier for the baseline normalization and for the normalization of client . The Lagrangian for the -dependent term is
Differentiating with respect to gives
Multiplying this equation by , summing over , and applying the constraints gives , so . Hence the profiled masses have the form
Because is strictly concave in the positive masses and the constraints are affine in , any feasible solution of these equations is the unique profiled mass vector. For fixed , the multipliers must satisfy the normalization constraints and generally depend on .
PREPRINT
Identifying the multipliers at the joint optimum. Suppose a joint interior optimum exists, denote it by , and evaluate at throughout this paragraph. Differentiation of the full Lagrangian with respect to gives, for ,
The second equality uses the normalization . Therefore, the multiplier at the joint optimum is . Substituting these values into (14) and using gives
Substitution into the empirical log-likelihood then yields
This calculation identifies the objective at a joint optimum, but it does not by itself establish that such an optimum exists or is globally optimal.
Existence and uniqueness of the intercept maximizer. We now establish that the conditional source log-likelihood has a unique finite maximizer and that the masses in (15) are feasible at this intercept vector. Write and . For , let , , and . To establish existence, we bound each numerator score above by and each log normalizer below by :
The bound shows that the conditional source log-likelihood tends to as the free intercepts diverge, so continuity guarantees a finite maximizer. To establish uniqueness, take any nonzero perturbation of the free intercepts and extend it by setting . The corresponding Hessian quadratic form is
Because for every client and is nonconstant, for every . The Hessian is therefore negative definite, which proves strict concavity and uniqueness of the intercept maximizer. Let denote this unique maximizer, consistently with the notation used above, and evaluate at . Its score equations verify that the masses in (15) satisfy every empirical-likelihood constraint. For each , the score equation is
Because , these equations imply for every . Their baseline normalization follows from and :
Thus is a feasible pair.
PREPRINT
Global-optimality verification. It remains to verify that this feasible pair is globally optimal rather than merely stationary. For any , the normalization constraints give . Jensen's inequality therefore gives
Equality holds precisely for the masses in (15). The conditional source log-likelihood is uniquely maximized at , so this upper bound is attained by and proves (13).
Scope of the equivalence. Equation (13) is an optimization identity obtained by profiling both the baseline masses and the intercepts at fixed representations and slopes. At fixed representations, optimizing the slopes as well preserves equality of the suprema, and finite global maximizers correspond through the displayed masses whenever such maximizers exist. However, existence of a finite slope maximizer is a separate condition and can fail under source separation. Moreover, the identity does not assert that profiling only the baseline masses at a fixed yields the conditional-label and conditional-source terms in (13) plus the same constant . For example, take two clients with one observation each, , , and , while . The EL constraints force both baseline masses to be , giving marginal likelihood , whereas the source likelihood is and . The model in this example is already reference normalized, so fixing the reference does not remove the need to optimize the intercepts. If all pooled representations are distinct, . With repeated representations, is constant for a fixed representation but can change if learning changes their multiplicities. Consequently, we use (3) as a conditional-label plus source-classification objective, while interpreting the EL equivalence only at fixed representations rather than as an unrestricted identity throughout encoder training.
B.3 From the global source loss to graph-local comparisons
The global source posterior cannot be evaluated from graph-local information because its denominator requires scores from all clients. Our objective is therefore to construct an edgewise source model that uses only the two endpoint scores while preserving their pairwise density ratio. Fix an edge and consider a balanced endpoint experiment that first selects or with probability and then draws a representation from the selected endpoint. Let denote the conditional probability that representation originated from endpoint in this experiment. Under the density-ratio model, Bayes' rule gives
whose logit is the pairwise log-density ratio
For the orientation and endpoint , define the endpoint-normalized source loss
Because the endpoint prior is balanced, the negative empirical conditional log-likelihood averages the two endpoint-specific losses equally:
This equal weighting removes the sample-proportion offset, so the population logit targets only the pairwise density ratio. Moreover, each edgewise likelihood requires no graph-wide normalization because it depends only on the endpoint scores. Summing the edgewise terms therefore produces an implementable conditional composite likelihood rather than the global source likelihood in (13).
PREPRINT
B.4 Balanced graph-local objective used in training
Our objective is now to combine label prediction with the edgewise source likelihood in a client-local form whose average assigns the intended weight to every task and edge term. The main text presents these components separately to distinguish prediction from source classification, whereas the implementation combines them using the weighting derived below. Client maintains a local representation and evaluates on its own examples. The local parameters need not coincide after a finite number of neighbor-mixing rounds; setting all recovers the common-representation model used in the derivation above.
We now combine the endpoint source loss in (16) with the conditional-label probabilities in (1).
We next choose the scaling that makes the client-local losses aggregate to the desired graph-level objective. Let denote the weight assigned to task prediction, leaving weight for source classification. To weight the task losses uniformly and the edge losses uniformly after averaging over clients, set
Let denote the routing potential owned by client . The resulting client-local contribution is
and averaging these contributions over clients yields
Thus, each endpoint loss is a mean over its local data, the two endpoints of every edge receive equal weight, and all edges receive equal weight without an additional degree normalization. The reported experiments use , while gives the task-only ablation. For fixed features, the prediction-head and routing-potential subproblems separate.
To optimize (19) using only neighbor communication, each endpoint differentiates every incident edge loss with respect to both endpoint potentials and returns the neighbor-owned component. The resulting unregularized routing-potential gradient received by owner i is
This expression equals in unrestricted potential coordinates when all endpoint contributions are evaluated at the same local-step snapshot. For the reference-constrained theoretical update, remains fixed at zero and only the components for are used. The private head receives , while the frozen encoder receives no gradient.
The balanced endpoint likelihood estimates the pairwise density ratio without incorporating the sample-count prior. Because the global source posterior includes that prior, inference recovers the appropriate source odds by adding it to the learned comparison:
Therefore, training excludes the sample-count prior and inference adds exactly once.
Finally, when the frozen local representations differ, the fitted reverse-edge scores need not be antisymmetric. Section 4 separates this representation-disagreement error from coefficient-estimation error.
C Proofs and Additional Theory
Appendix C.1 proves the coefficient-estimation guarantee, Appendix C.2 derives the comparison identities, and Appendix C.3 proves the referral guarantee. For the routing arguments, fix the positive training counts and query . We use the route from (7), with terminal client , and the scores and weights from Section 3.2. Empty sums are zero and .
PREPRINT
C.1 Proof of Theorem 1
Statistical conditions. Fix a connected graph with , the number of classes, the representation and coefficient dimensions, and the task weight . The common representation is fixed independently of the fitting samples. Within each client the observations are i.i.d. from a fixed distribution , and different clients are independent. The deterministic allocations satisfy ; for a fixed , these are exactly the proportions used by the inference-time prior in Section 3. The conditional-label model and the common-reference DRM are correctly specified by the same finite coefficient vector for all . For identifiability, we use and fix and , so that . In identifiable coordinates the limiting population objective defined below has a unique interior minimizer . On a compact convex parameter region containing this point in its interior, the observation losses and their first two derivatives have integrable envelopes; the score at has finite second moment, and the population Hessian is positive definite. Losses are measurable and twice continuously differentiable on a neighborhood of the region, and empirical minimizers are measurable. These compact-region regularity conditions apply directly to the balanced training losses below. The optimization conditions below specify existence of a finite empirical minimizer and containment of the iterates.
Observation contributions. We decompose the graph objective in (19) into observation-level contributions. For a generic observation , let . For candidate coefficients , write
At , the parameterized quantity reduces to the main-text posterior . The density-tilt coefficients retain their definition in (2); no sample-count offset appears in this training logit. For an edge , orient its endpoints so that . The observation-level contribution needed for the asymptotic analysis is
Here , and denotes expectation under . All terms evaluated on the same observation remain inside the same . Thus for every allocation: the sample proportions affect the estimator's variance and the inference-time prior, but not the balanced population training objective.
Identifiable coordinates and the gradient update. The routing coordinates are the free blocks for , with held fixed. For each private head, retain and and use orthonormal coordinates on this class-contrast subspace. All parameter derivatives and norms in Theorem 1 are taken in these coordinates. All unqualified vector norms below denote the Euclidean norm. Choosing client 1 as the density reference preserves every pairwise ratio: from any common baseline with coefficients , take and . Then remains a normalized density. The private-head gradient sums to zero across classes, so common-step unpenalized updates preserve its class-contrast subspace. The analyzed routing update acts only on the free blocks and keeps .
We analyze synchronous, unpenalized plain SGD in these free coordinates for Stage II. Write and for the method's client-local and endpoint-normalized losses. For each free routing-potential owner , the gradient is exactly
The head owner receives , expressed in the head coordinates above. Client 1 still contributes its task gradient and the source gradients of its observations to neighboring free routing blocks. With the same snapshot for every endpoint contribution, concatenating the free routing blocks and all head-coordinate blocks gives , including the gradients returned by neighbors. Divide the assembled gradient by ; equivalently, a step of size on the normalized gradient uses step size on the raw owner gradients. The analyzed update is
PREPRINT
where the data and initialization are included in the optimization history . At each update, independently across clients, sample local indices uniformly with replacement and average over them, then sum these averages over . This gives exactly the conditional mean in (20). If is the empirical distribution at client , the conditional covariance of this normalized mini-batch gradient is
Its trace is the conditional noise second moment. This covariance includes the correlations between incident-edge losses evaluated on the same observation. A variance bound for raw owner gradients must be divided by to give the corresponding normalized bound. Other samplers are covered only when the stated conditional unbiasedness and joint noise bound hold.
Optimization conditions. The optimization analysis uses the following finite-minimizer, curvature, and bounded-iterate conditions. On a data-and-initialization event whose probability tends to one, let be a finite empirical minimizer with zero coordinate gradient, and let a convex region contain this minimizer and the initial iterate, with
Any uniform positive lower and finite upper curvature bounds admit this form after choosing sufficiently small. Assume the conditional noise second moment is at most while the iterate is in this region. The constants are uniform in , and . As in the bounded-iterate premise, all iterates up to the analyzed budget must remain in the region, either almost surely conditional on these data or with probability tending to one. For high-probability containment, the proof uses the first exit time from . On a bounded-logit region, positive-definite augmented-feature Gram matrices for every task head and balanced edge mixture, together with graph connectivity, are sufficient for positive curvature in the free reference-client and private-head coordinates. Existence of a finite minimizer and containment of the iterates are separate assumptions; complete separation and unidentified design directions are excluded. The curvature condition is local to .
Proof of Theorem 1. Step 1: A common population minimizer. Under the correctly specified DRM, the main-text endpoint-source posterior is
Let be the gradient in identifiable coordinates of . It does not depend on the parameter value, since these logits are affine. At parameter , the source-label gradient for an observation with representation from endpoint is . Consequently, at ,
The two equally weighted endpoint means therefore cancel exactly. For the task term, write for the model class-probability vector. Let be the Jacobian of the task logits with respect to , and let denote the class indicator vector. Correct specification gives
Thus, with and , the population-score identity is
Convexity already makes a minimizer. More explicitly, is the sum of
and
PREPRINT
All weights are positive. Equality requires the correct task probabilities and density-score differences on every edge. The stated identification condition therefore makes the unique minimizer of the balanced population objective .
Step 2: Score covariance. The endpoint score second moments follow from the information identity. At the true balanced posterior,
The right-hand side is the trace of the edge's population Hessian before its positive graph-level coefficient. All Hessian contributions are positive semidefinite, so finiteness follows from the stated Hessian envelope. Each endpoint term is finite. The task-score second moment follows from the stated moment condition (and from its correctly specified softmax information identity). Uniform integrable gradient envelopes also follow by expanding each gradient from over the compact region using its Hessian envelope.
Here are the exact score and Hessian for the balanced objective. All probabilities in the following displays are evaluated at and the displayed representation:
Set
Here is centered within client stratum , whose score mean may be nonzero. If for , , then the routing part of contains the full double sum
The terms with account for the reuse of each observation on incident edges. The full vector definition of also retains task contributions and their covariance with routing contributions. Under correct task specification, the task–routing cross-covariances vanish because the task score has conditional mean zero given . In general is not the same as .
Step 3: Statistical consistency and asymptotic normality. The uniform-law conditions give, on the compact parameter region,
and the analogous uniform convergence for the Hessians. Uniqueness and interior positive curvature yield . On any sufficiently small sphere about , the population objective exceeds its value at uniformly, and so does the empirical objective with probability tending to one. Convexity then excludes a better empirical minimizer outside that sphere, by considering the segment to .
PREPRINT
The exact cancellation of total score means gives
The centered summands have independent client strata. For each client the ordinary finite-variance multivariate i.i.d. central limit theorem applies to . Since and the number of clients is fixed, . Thus the allocation proportions enter the asymptotic covariance, although they do not enter the balanced population objective.
On the event that the empirical minimizer is interior, its exact first-order condition gives
Consequently,
Step 4: Optimization error. Take with , so that and . An integral Hessian expansion along the segment between and gives, for ,
Conditional unbiasedness makes the cross term with the gradient noise zero. Let be the first iterate index outside and put
This is the usual mean-square error when containment holds almost surely. The event is measurable with respect to . Since ,
Applying conditional unbiasedness on the -measurable event inside this expectation gives
The last inequality uses . Induction gives
Indeed, writing , if with , then . The initial condition starts the induction. Since , conditional Markov's inequality and the stated containment condition imply
With high-probability containment, (22) bounds the stopped error ; the exit probability is controlled separately by the containment assumption.
Step 5: The SGD output. Combining this expansion with (22) yields
which proves (8). If , the stopped mean-square bound and the containment condition imply , so (21) proves (9). This proves Theorem 1.
Full-gradient updates. For full gradients and , the same curvature and iterate-containment conditions give
Adding the statistical error gives . Thus suffices for the same normal limit. For fixed , it is sufficient to take ; when the contraction is zero after one update.
PREPRINT
C.2 Balanced source fitting and prior-weighted comparison identities
For , , the source-label distribution in the edge risk assigns probability 1/2 to each endpoint. Bayes' rule under this balanced mixture gives
The equally weighted binary cross-entropy is minimized by this posterior, which contains no sample-count term and agrees with (5). Correct specification, connectivity, and the stated identifiable-design condition identify the routing coefficients relative to the fixed client 1. Correctly specified task cross-entropies identify the private-head contrasts. At inference, adding to the fitted balanced logit converts the learned density ratio into the desired prior-weighted source odds. Thus the sample-count prior is absent from training and appears exactly once in deployment.
With a common fitted representation ,
The identity holds for any fitted coefficients with a common representation. If the DRM holds for this representation and its density-score differences are recovered exactly, then
The history weights normalize the prior-weighted densities over the visited clients. With different local encoders, the count terms still telescope but the remaining score sum can be path dependent.
For a reference representation and its coefficients, adding and subtracting the fitted comparison at this representation gives
(24)
Both scores use the same finite-N count prior, so their known offsets cancel exactly, irrespective of how quickly the proportions converge. If the coefficient term is bounded by , the fitted slope contrast by , and the representation difference by , the score error is at most . For common representations and the same count prior, each comparison is affine in the identifiable coefficients. Using client 1 as the reference for both fitted and true coefficients, its error is bounded by . Theorem 1 therefore proves (10) at a fixed query; bounded representations give a uniform version. For different local encoders, (24) remains an algebraic decomposition. However, these encoders also change the representation distributions used for coefficient fitting. The coefficient term may therefore contain effects of this change in addition to statistical estimation error, and Theorem 1 does not automatically bound it. Extending the rate to this setting requires controlling both the coefficient-fitting error and the representation-disagreement term.
The reverse-edge discrepancy is
Here the two count offsets and the intercept differences cancel even with different encoders. Let denote the comparison obtained by replacing the training proportions with positive reference-population proportions . Its additional prior error is , so
The last term measures the difference between the training-source prior and the reference population prior.
C.3 Proof of Theorem 2 and structural examples
From estimation error to comparison tolerance. Under Theorem 1, (10) bounds the maximum comparison error over all graph edges at the fixed query . By the definition of , for every fixed there is a finite constant such that, for all sufficiently large , , the event
PREPRINT
has probability at least over the training data and SGD randomness. The constant may depend on the fixed query, graph, and model, but not on N, R, or the realized route. With the common representation, reverse comparisons are negatives of each other, so this event controls both edge directions. It therefore controls every candidate edge on the adaptively selected route without an additional probability bound for individual steps. All remaining arguments are deterministic on ; the reference potentials and are fixed given the training counts and query. For an independently random frozen representation, the argument is conditional on that representation, as in Theorem 1.
Definition of the depth. Suppress in potentials and let be the largest integer for which there exists a path satisfying, at every step ,
The one-node path is permitted. Strict increase excludes revisits, so . The maximum is attained because the graph is finite. Throughout the proof, denotes this exact maximum for the given graph, potentials, entry, and tolerance.
Proof of Theorem 2. Work on and put .
Step 1: Accepted moves and stopping. Every accepted edge satisfies . Hence every previously visited client has smaller potential than the current client, and every positive-gain neighbor is unvisited. At a nonoptimal client , let maximize the true neighboring gain. By (11), it is eligible and . Thus the route cannot stop at while budget remains. For the selected neighbor ,
This also gives , so the realized route is admissible in the definition of . Consequently and
At a global maximizer, every candidate fitted score is at most , so no further move is accepted. An early stop therefore occurs at a maximizer.
Step 2: The budget bound. If , (28) gives . If , Step 1 gives . Thus
Step 3: The total potential gap and ascent depth. Let attain the maximum in the definition of . Its terminal vertex is a maximizer: otherwise, a highest-potential neighbor has positive gain by (11), is unvisited by strict ascent, and extends the admissible path. For each , the near-best-neighbor condition gives
Telescoping along this path yields the separate total-gap bound
Together with Step 2, this proves (12):
Step 4: A sufficient budget for reaching a maximizer. Suppose and the terminal client is suboptimal. Step 1 then implies budget exhaustion, so . Together with , this gives . A highest-potential neighbor would extend the realized admissible path, contradicting the definition of . Thus the terminal client is a maximizer. The same arguments include and an optimal entry, and hold under any tie breaking among score maximizers.
Examples and the proportional-ascent alternative. The following sufficient conditions concern the prior-adjusted potentials at a fixed query. Their conclusions hold on the comparison-error event used above.
Assumption 1 (Uniform ascent). Every nonoptimal client has a neighbor with gain at least , as in (11).
Assumption 2 (Referral hierarchy). A spanning tree is oriented toward a maximizing root. Each nonroot client i has a parent such that
PREPRINT
When , only the parent can belong to an admissible ascent path. Thus is exactly the number of parent edges from to the root. Under the theorem's threshold condition,
The preferred-parent condition therefore identifies ascent depth with the distance to the root in this hierarchy.
Assumption 3 (Mixture of expert types). Clients of the same type have equal potential. There is a best type with whenever and . Every nonbest-type client has a best-type neighbor.
If and , then . Only best-type neighbors are admissible, so for a nonoptimal entry and for an optimal entry. Therefore
Equal representation distributions and equal source priors within each type suffice for the equal-potential condition.
Assumption 4 (Graph–PL ascent). There is such that each nonoptimal client satisfies .
This is an alternative to uniform ascent: the available improvement scales with the remaining potential gap. Under this assumption, the candidate error bound and alone imply
To prove it, hold a stopped route at its terminal node until index only for the analysis, and put . On a moving step, the preceding noisy-greedy inequality gives . On a stopped step, the best neighboring gain is at most , so and . Using and solving the common recursion proves (32). In particular an early stop satisfies
When , the sharper numerator follows from the moving-step recursion. Use , including . The holding steps are an analytical convention; , the prediction history, and communication counts are those of the original route.
D Experiment Details
The subsections below collect the data construction, communication graphs, optimization schedules, baseline provenance, sensitivity analyses, inference diagnostics, and real-data protocols used throughout Section 5.
D.1 CIFAR Data, Graphs, Baselines, and Traffic Construction
The benchmark uses the client construction from the released FedDRM code (Wang et al., 2026a). CIFAR-10 has ten labels, CIFAR-20 maps the CIFAR-100 fine labels to 20 superclasses, and CIFAR-100 retains all 100 fine labels. The official training and test collections are pooled before partitioning among eight clients using one of two label-skew constructions. In the SPC construction, label-sorted data are divided into equal-sized, label-homogeneous shards, and each client receives five uniformly sampled shards for CIFAR-10 or 25 for CIFAR-20/100, yielding equal client dataset sizes. In the Dirichlet construction, client-wise class proportions are randomly drawn from a Dirichlet distribution with concentration 0.3, yielding heterogeneous label marginals and unequal client dataset sizes. Each client's assigned images are shuffled and divided into 70% training and 30% evaluation data. The latter is split into 20% validation and 80% test data. Training, validation, and test indices are disjoint.
The eight deterministic client transformations combine a gamma-correction exponent in , hue shift in , and saturation in . The CIFAR models use a GroupNorm ResNet-18 followed by a 256-dimensional task projection with LayerNorm and a local classifier. Within each paired run, all clients share a random initialization; no pretrained FedDRM parameters are loaded. Both CIFAR training phases retain the released random-resized crop to pixels with scale 0.9–1.0, followed by the fixed client color transformation and normalization. Evaluation uses one seeded crop per image, shared across paired models and readouts. Freezing fixes encoder parameters and buffers; it does not fix the augmented input at every training access. The fixed evaluation view and non-source entry assignments are shared between each 800+200 model and its DFedAvgM control. The source ID is used to construct the evaluation and for observer-only diagnostics; it is not given to the routing or history-weighting rule.
PREPRINT
The PATH has edges , and the CYCLE adds . The fixed RR4 graph has neighbor sets
The COMPLETE graph contains all 28 undirected edges. The sparse-graph movement budgets are the diameters 7, 4, and 2. The primary COMPLETE control uses ; is retained for the training-duration diagnostics. Previously visited experts are excluded from subsequent moves. No posttraining representation consensus is applied.
Thirty-two-client scaling. The CIFAR-10 scaling benchmark uses gamma-correction levels , hue shifts , saturation levels , and two-bit posterization for clients 28–32. The pooled-data construction and within-client split remain the same. The connected degree-four graph uses seed 82025, has 64 edges and diameter four, and retains the primary movement budget .
Eight-client baseline measurements. For Table 1, Local and FedDRM use 1000 rounds with ten local updates per round. DisPFL uses 1000 rounds with five local updates per round and 50% dynamic sparsity. FedSPD uses 999 communication rounds with five local updates per round, followed by five final personalization updates, yielding 1000 round equivalents and 5000 local updates per client. All four baselines are evaluated at fixed final checkpoints on the same seed-specific held-out test split used for EdgeDRM and DFedAvgM; Table 1 reports means and sample SDs over seeds 2025–2027. Local, DisPFL, and FedSPD predict with the non-source entry model, whereas FedDRM uses its global client-selection head. The round-equivalent budgets and evaluation splits are aligned, although the numbers of local updates differ.
Hospital-network construction. The 16/8/8 small/medium/large hospitals receive disjoint, exactly class-balanced subsets of the official CIFAR-10 training split with 250/1,000/4,000 examples each. The layered graph has a cycle within each tier, one small–medium edge per small hospital, and a one-to-one medium–large matching (56 edges). The shortcut graph adds one predetermined small–large edge per small hospital (72 edges). Each graph uses its own shared-training prefix and frozen-encoder continuation.
The common diagnostic panel contains 20 official test images per class. Each of the 200 distinct images is reused in 64 arrival records, yielding 12,800 records with exactly uniform entry counts across hospitals. Seeds 2025–2027 vary training and entry assignments. The prior-on and prior-off evaluations share the model, query panel, and arrival records; both exclude revisits and allow at most two referrals. The panel is an existing diagnostic set rather than a newly blinded test set. Workload quantities count the diagnostic calls made along these finite query paths.
Cumulative diagnostic workload. Let be the visited hospitals for arrival , and let contain the hospitals in tier . Each hospital supplies one prediction when visited, including the entry and terminal hospitals. Because the route excludes revisits, its cumulative call counts are
where is the number of moves and . The reported tier share, peak individual share, and calls per arrival are, respectively,
Table 4 reports both the large-tier share and , retaining the absolute large-hospital workload scale as the total number of calls changes. It also reports and to distinguish additional collaboration from concentration at any single hospital. Each seed's counts and ratios are computed first, followed by their mean and sample SD across the three seeds. Per-hospital counts reconstructed from the saved paths match the recorded classifier calls. These quantities weight each classifier invocation equally.
PREPRINT
Table 4: Accuracy and diagnostic workload in the hospital-network experiment. Large share and peak share are percentages of all visited-classifier calls; large calls/100 is the absolute number of large-hospital calls per 100 arrivals. Accuracy uses history-weighted predictions. Entries are mean sample SD over seeds 2025–2027; EdgeDRM-NR workload quantities are fixed by uniform entry.
| Condition | Accuracy (%) | Calls/query | Large share (%) | Large calls/100 | Peak share (%) |
|---|---|---|---|---|---|
| Layered: EdgeDRM-NR | |||||
| Layered: History, no prior | |||||
| Layered: History + prior | |||||
| Shortcut: EdgeDRM-NR | |||||
| Shortcut: History, no prior | |||||
| Shortcut: History + prior |
D.2 CIFAR Training, Evaluation, and Additional Results
The balanced-endpoint schedule below applies to the benchmark and hospital protocol. The prediction-rule comparison uses CIFAR-100/Dirichlet-0.3, and the sensitivity sweep uses CIFAR-10/Dirichlet-0.3. Both use eight clients and seeds 2025–2027. Each primary model uses its saved 200-round head and router checkpoint with the original 800-round encoder state. The same continuation length is used for every graph and seed. Evaluation preserves the training random-number and loader states.
D.2.1 Training schedule and implementation details
The routing loss assigns equal weight to the two endpoint means of every edge. At inference, the deployed incident score adds the single sample-count offset . The pretraining duration and subsequent encoder freezing are experimental optimization choices, rather than defining components of EdgeDRM.
Stage I: 800 shared-training rounds. All clients start from the same model initialization. Each round takes local SGD steps on the task loss and then mixes the full model by (4). Both representation and classifier are exchanged, using only physical neighbors. Thus shared refers to full-model collaboration toward a common task objective, not a server-owned model or identical local parameters. This stage uses the same graph and full-model mixing as the matched DFedAvgM control (Sun et al., 2023).
Stage II: 200 rounds with frozen local encoders. Each expert inherits its own Stage-I model and sampler state, fixes , and initializes its routing potential to zero. The encoder includes the backbone, feature projection, and feature normalization. Its parameters and persistent buffers remain unchanged, and it runs in evaluation mode. There are no encoder gradient updates or representation-mixing steps:
Each local step minimizes (18) only over the private classifier and the endpoint potentials. Classifier heads are not exchanged, and potentials are not averaged. Freezing keeps each local feature map stationary during this stage; it does not align different experts' feature maps. The fitted representation used at inference is under this experimental protocol.
The head and routing-potential updates instantiate Stage II of Section 3.1, with no parameter mixing. Routing gradients do not flow into the encoder or task head. Training counts are exchanged before coefficient fitting. After round 200, final potentials are published to neighbors. All parameters remain fixed during inference, and no additional consensus phase is applied.
PREPRINT
Algorithm 2 Experimental 800+200 training schedule
Require: Graph G, neighbor weights W, local steps , ; ,
1: Initialize all local task models identically
2: for do
3: Each client takes task-only SGD steps
4: Mix full models with physical neighbors using W
5: end for
6: Inherit local models and sampler states; set
7: Freeze encoder parameters and buffers in evaluation mode; initialize owner potentials to zero and exchange training counts along edges
8: for do
9: for do
10: Owners send potential snapshots to incident neighbors
11: Each endpoint computes local features with its frozen encoder
12: Differentiate task loss for its private head and balanced endpoint losses for endpoint potentials
13: Return neighbor-owned potential gradients along their edges
14: Update only private heads and owner potentials with accumulated gradients
15: end for
16: end for
17: Publish final potentials to neighbors; freeze heads and routers
Fixed budget and learning-rate schedule. For the CIFAR protocol, each round has five local mini-batches of size 128. SGD uses momentum 0.9, reset each round, and weight decay . The phase-local learning rate is
Stage II restarts at 0.01 but stops at round 200, with ; it does not run to the end of the 600-round decay horizon. The encoder remains frozen throughout this phase; the schedule applies only to heads and routing potentials. The model at total round 1000 is the fixed endpoint, without test-based early stopping. The finite neural optimizer with weight decay is distinct from the unpenalized fixed-representation estimator in Section 4.
This schedule keeps local features stationary during coefficient fitting, but does not make different clients' representations identical or independent of the reused training data. It therefore does not by itself satisfy the statistical assumptions of Theorem 1.
D.2.2 Fixed-expert referral-score ablation
The comparison in Figure 2 reuses the final CIFAR-10 and CIFAR-100 Dirichlet-0.3 RR4 checkpoints for all three seeds. No model parameter is updated. EdgeDRM routing uses the deployed incident score, including the single offset. EdgeDRM-NR reports the same entry expert without referral. Count-only replaces the learned part of every incident score by zero, leaving exactly , and retains the learned rule's strict zero threshold. Random routing samples uniformly from the unvisited incident neighbors and stops only at the two-move budget or when none remain; its seed is fixed before evaluation. All three routing rules exclude revisits. The primary prediction is the terminal expert's classifier, which changes only through the selected route.
D.2.3 Sensitivity of
There are three independent training seeds; graphs reuse each seed's partition. Validation/test query counts are 3,600/14,403 for seed 2025, 3,603/14,400 for seed 2026, and 3,601/14,402 for seed 2027. All prediction rules and controls use matched query indices, labels, source IDs, entry nodes, and shared-checkpoint hashes. Accuracy is measured over the fixed non-source arrivals, with one view per query.
PREPRINT
Table 5: Task-routing weight on CIFAR-10/Dirichlet-0.3, eight clients, RR4, and . All branches reuse the same seed-specific 800-round prefix and fit heads and routers for 200 rounds. Accuracy is in percent, referral gain in percentage points, and calls per query. Entries are final-checkpoint means sample SD across seeds 2025–2027.
| λ | EdgeDRM | EdgeDRM-NR | Referral gain | Calls |
|---|---|---|---|---|
| 0.10 | ||||
| 0.25 | ||||
| 0.40 | ||||
| 0.50 | ||||
| 0.60 | ||||
| 0.75 | ||||
| 0.90 | ||||
| 0.95 | ||||
| 1.00 |
Table 6: Prediction-rule comparison and inference costs using identical frozen models and paths. Accuracy is in percent (three-seed mean sample SD). Hard terminal uses the final visited expert; uniform and weighted history use only visited predictions. Edge scores and classifier calls are mean logical operations per query, not measured latency.
| Graph | Hard terminal | Uniform history | Weighted history | Calls | Incident scores |
|---|---|---|---|---|---|
| PATH | 1.72 | 2.35 | |||
| CYCLE | 1.81 | 2.81 | |||
| RR4 | 2.10 | 6.56 | |||
| COMPLETE | 1.94 | 12.66 |
The sweep in Table 5 is a sensitivity analysis rather than test-set model selection. Referral remains effective across the nonzero routing-loss settings, whereas removing the routing term at weakens performance.
Table 6 compares prediction rules on identical routes. Weighted history achieves the highest mean accuracy on the sparse graphs and is comparable to hard-terminal prediction on COMPLETE.
D.3 ISIC2019: Data, Protocols, and Additional Results
The study in Section 5.4 uses a fixed 400-round shared-training prefix followed by 50 rounds of balanced-endpoint frozen-encoder adaptation, with three training seeds.
D.3.1 Shared data, preprocessing, and graphs
Data provenance and center identities. We use the 23,247 images and six source-center assignments in the ISIC2019 split distributed with FLamby (du Terrail et al., 2022). Images come from the public ISIC2019 training collection, including BCN20000, HAM10000, and MSK contributions (Hernández-Pérez et al., 2024; Tschandl et al., 2018; Codella et al., 2018). In particular, the evaluation set here is FLamby's held-out subset of that collection, not the separate ISIC challenge test collection. Center identities follow source and acquisition metadata and should not be interpreted as six independent hospitals. The FedSPM package (Wang et al., 2026b) serves only as a reference for the data input pipeline; we do not use its within-server subpopulation model or its pooled resplitting procedure. Each observed center is represented by one expert.
Leakage control and fixed split. The released FLamby partition contains 18,597 training and 4,650 test images. Our metadata audit finds 2,302 lesion identifiers shared across these folds. We preserve every test image and label and remove the 6,102 training images whose lesion identifier also occurs in the test fold. We additionally link lesion identifiers through identical original or preprocessed image files and one visually confirmed near-duplicate pair. These links are computed globally, including across centers; groups with conflicting labels are excluded from the training candidates. The image-level audit removes four additional training candidates. A deterministic grouped split (seed 42) targets a validation share within center-class cells, while reserving at least one training group for each represented cell. The resulting counts are given in Table 7. Training, validation, and test are disjoint in the audited lesion/duplicate groups. The grouping metadata do not establish patient-level independence, and the near-duplicate review is not an exhaustive guarantee against all transformed duplicates. This modified split is not directly comparable to the unmodified FLamby leaderboard.
PREPRINT
Table 7: Fixed ISIC2019 split after global lesion and identified duplicate grouping. Excluded images come from the original training fold. The used for the deployed sample-count offset are the final training counts.
| Node | FLamby source | Train | Validation | Test | Excluded |
|---|---|---|---|---|---|
| 1 | BCN | 3,802 | 954 | 2,483 | 5,174 |
| 2 | vidir_molemax | 2,528 | 632 | 791 | 3 |
| 3 | vidir_modern | 1,686 | 424 | 672 | 581 |
| 4 | rosendahl | 1,221 | 308 | 452 | 278 |
| 5 | MSK4 | 520 | 131 | 164 | 4 |
| 6 | vienna_dias | 229 | 56 | 88 | 66 |
| Total | 9,986 | 2,505 | 4,650 | 6,106 |
Images and model. We resize each RGB image with bilinear interpolation so that its shorter side is 224 pixels, apply the FLamby shades-of-gray color-constancy transform with power six, and save a JPEG with quality 75. Training uses a random crop, independent horizontal and vertical flips, rotation within degrees, and brightness/contrast jitter of 0.15/0.1. Validation and test use a deterministic center crop. All roles use ImageNet channel normalization. These torchvision transforms are shared by all methods; we do not claim exact reproduction of FLamby's augmentation code. The model is the existing FedDRM GroupNorm ResNet-18 with its stride-one stem, a projection with LayerNorm/ReLU, and a private eight-class linear head. Within each seed, all six experts and all methods start from the same random initialization; no pretrained weights are used. EdgeDRM adds a 256-dimensional slope and scalar intercept per node.
Communication graphs. The four undirected graphs—PATH, CYCLE, RR3, and COMPLETE—are fixed before training. PATH has edges for , and CYCLE adds the edge . The intermediate regular graph is
COMPLETE contains all pairs. Their edge counts are 5, 6, 9, and 15 and their diameters are 5, 3, 2, and 1. We use symmetric Metropolis mixing, with on an edge and the diagonal completing each row to one. Graph diameter alone does not ensure that the positive-gain, no-revisit referral rule reaches a globally best expert.
D.3.2 Training Details
Shared-training prefix. Each graph uses six identically initialized local models, three training seeds, and 400 rounds of task-only SGD followed by full-model Metropolis mixing. There are ten local optimizer steps per round, effective batch size 32, and microbatch size 16. The initial learning rate is 0.03 with a 400-round cosine horizon; SGD momentum is 0.9, reset each round, and weight decay is . The RR3 prefix reuses the unchanged final checkpoint of the earlier DFedAvgM run, before its evaluation-only consensus. The other graphs require their own task-only prefixes; old joint-training EdgeDRM checkpoints are not substituted for them. The comparison uses fixed round 400, not the historical validation-selected checkpoint.
Frozen adaptation. The backbone, feature projection, feature normalization, and their buffers are fixed to the prefix checkpoint and evaluated in inference mode. Private classifier heads inherit their prefix values, and all node routing potentials start at zero. For 50 rounds, five local mini-batches per round update only the heads and balanced-endpoint routing potentials, using equal endpoint weights and . Microbatch gradients are weighted by their fractions of the full batch. Endpoint owners accumulate both local and neighbor contributions from a common snapshot before updating. No encoder or head mixing is performed, and no extra consensus phase is added. The head/router learning rate starts at 0.01 and uses (34) with horizon 600, stopping at round 50; momentum, weight decay, and batch sizes are as above. Training retains random image augmentation despite the frozen representation parameters.
Selection, inference, and budget interpretation. Validation readouts are saved at adaptation rounds 0, 10, 25, and 50. Within each topology, test comparisons use the fixed prefix and round-50 endpoint without selecting a model from the test scores. The main table reports PATH, CYCLE, RR3, and COMPLETE; topology comparisons are descriptive rather than a preregistered test. The full prefix uses 4,000 local optimizer steps per client; adaptation adds 250 head/router steps. Thus comparison with DFedAvgM400 estimates the change from adding adaptation and referral to that prefix, and does not establish superiority at equal total training effort. The adapted entry, hard terminal, uniform history, and score-weighted history controls use identical final model parameters and matched queries. The graph, split, loss weights, and inference protocol are fixed before each run. Each graph has three fixed training seeds.
PREPRINT
Metric and access checks. For a prediction rule and the test images of class , the uniform-entry metric is
For the primary rule, is the argmax of the visited-history probability mixture. Each of 4,650 unique test images contributes six entry records, for 27,900 records per model. These records are paired comparisons of repeated images, not independent test subjects. The deployed router adds the single sample-count offset to the balanced-endpoint logit, and the cumulative history weights use the resulting scores without another correction. Its zero threshold and local frozen representations do not establish the additional statistical or routing assumptions in Section 4.