
Federated Learning, Trusted Third-Party Custody & Differential Privacy
Source:vignettes/federated_learning_and_ttp.Rmd
federated_learning_and_ttp.RmdOverview
dicomtk.fl enables multi-institutional imaging consortia
to collaborate without centralising patient-level DICOM or clinical
identifiers:
-
Trusted Third-Party (TTP) & Polymorphic Pseudonymisation
(
PEP):ttp_mainzelliste_client,pep_derive_site_token(), andpep_rekey_pseudonym()issue unlinkable project- and site-specific pseudonyms. -
Privacy-Preserving Record Linkage
(
PPRL):pprl_encode_bloom(),pprl_dice_similarity(), andpprl_link_cohorts()match patients across hospitals using frequency-hardened Bloom filters. -
Differential Privacy (
DP) Federated Statistics:dp_budget_accountant,dp_suppress_small_cells(),dp_federated_summary(), anddp_aggregate_sites()release bounded -DP cohort summaries while enforcing -anonymity. -
Governed FL Site Package Exports:
fl_site_approval_gateandfl_export_site_package()require cryptographicsite_adminsign-off before emitting Flower, NVIDIA FLARE, or OpenFL bundles.
library(dicomtk.fl)
# 1. TTP + Polymorphic Pseudonymisation
ttp <- ttp_mainzelliste_client$new(mode = "offline", ttp_secret = "demo-secret")
sess <- ttp$create_session()
root_id <- ttp$request_pseudonym(
sess$session_id,
list(vorname = "Alice", nachname = "Tan", geburtsdatum = "1985-04-12")
)
tok_a <- pep_derive_site_token(root_id$pid, "PROJ_A", "SITE_1", "pep-key")
tok_b <- pep_rekey_pseudonym(tok_a, "PROJ_B", "SITE_2", "pep-key")
tok_a$pseudonym != tok_b$pseudonym
#> [1] TRUE
# 2. DP Federated Summary
acc <- dp_budget_accountant$new(max_epsilon = 3.0, max_delta = 1e-5)
set.seed(1)
s1 <- dp_federated_summary(rnorm(120, 62, 8), lower = 0, upper = 120, accountant = acc, site_id = "SITE_1")
s2 <- dp_federated_summary(rnorm(150, 65, 8), lower = 0, upper = 120, accountant = acc, site_id = "SITE_2")
dp_aggregate_sites(list(s1, s2))
#> $n_sites
#> [1] 2
#>
#> $site_ids
#> [1] "SITE_1" "SITE_2"
#>
#> $total_count
#> [1] 263.4791
#>
#> $weighted_mean
#> [1] 81.20886