Christopher Thomas Trevethan | Quadratic Intelligence Swarm Research | Preprint — Not peer reviewed
Abstract
Federated learning (FL) has been proposed as a privacy-preserving mechanism for distributed medical research. However, the mathematical foundation of FL — gradient averaging across client datasets — introduces a structural exclusion problem for rare disease research. When local cohort size n_local falls below approximately 30, local gradients become statistically indistinguishable from noise under the central limit theorem. For rare diseases, where median institutional cohort size ranges from 1 to 5 patients, this threshold is unreachable at the vast majority of participating sites. We formalize this exclusion mathematically, quantify its epidemiological scope across 7,000+ identified rare diseases affecting 300 million people worldwide, and present the Quadratic Intelligence Swarm (QIS) architecture as an alternative that resolves the exclusion by routing distilled outcome packets rather than model weights. A single validated patient observation is sufficient for QIS participation. We calculate that a 500-institution network averaging 3 rare disease patients per site yields 124,750 synthesis opportunities under QIS — and zero under FL. Implications for OHDSI, TriNetX, and Matchmaker Exchange are discussed.
1. Introduction
The rare disease research community faces a compounding crisis that federated learning, despite its promises, is structurally unable to address.
Consider the operational reality of a hospital rare disease clinic in rural Brazil, a genomics center in rural Ghana, or a specialized metabolic disease unit at a regional hospital in Eastern Europe. Each of these institutions may have followed a single patient with a confirmed diagnosis of a given rare disease for years — accumulating longitudinal phenotype data, treatment response records, biomarker trajectories. That clinician's observation may represent one of the most complete natural history records for that condition anywhere in the world.
Under federated learning, this observation is worthless. Not because the data lacks quality, but because the architecture is incapable of extracting signal from it.
Federated learning, as formalized by McMahan et al. (2017) in the seminal FedAvg algorithm, operates by distributing model training across clients, each of whom computes local gradients on their private data and returns those gradients to a central coordinator for aggregation. The theoretical guarantee of FedAvg — convergence toward a globally optimal model — depends on assumptions about client data distributions that simply do not hold in rare disease contexts. Most critically, it depends on gradient signal quality, and gradient signal quality degrades predictably as local cohort size decreases.
The consequence is a two-tier research infrastructure. Institutions with large patient volumes — academic medical centers in high-income countries — can participate fully in FL networks. Institutions with small patient volumes — community hospitals, specialist clinics in low- and middle-income countries (LMICs), and any site that has seen only one or two patients with a given rare condition — are mathematically excluded from contributing, regardless of the quality of their observations.
This is not a software engineering problem. It is not solvable by better hyperparameter tuning or communication compression. It is a consequence of what FL routes: model weight updates, which require volume to carry signal.
This paper makes three contributions. First, we formalize the gradient variance exclusion threshold and map it against the known rare disease population distribution. Second, we present the Quadratic Intelligence Swarm (QIS) architecture — discovered by Christopher Thomas Trevethan, with 39 provisional patents filed — as an alternative routing paradigm that resolves the exclusion by routing outcome packets rather than model weights. Third, we quantify the synthesis opportunity differential between FL and QIS at realistic network scales and discuss implications for major rare disease data infrastructure projects.
2. The Federated Learning Exclusion: Mathematical Analysis
2.1 Gradient Variance and Cohort Size
The core convergence guarantee of FedAvg (McMahan et al., 2017) relies on the assumption that client-side stochastic gradient estimates are sufficiently accurate approximations of the true gradient of the global loss function. For a client k with local dataset of size n_k, the variance of the local stochastic gradient estimate is:
Var[∇L_k(w)] ∝ σ² / n_k
where σ² represents the variance of individual sample gradients. As n_k decreases, gradient variance increases proportionally. When n_k = 1 — a single patient observation — the local gradient is:
∇L_k(w) = ∇ℓ(w; x₁, y₁)
This is a gradient computed on a single sample. It carries zero averaging benefit. Under the central limit theorem, meaningful gradient signal requires n_k ≥ 30 for convergence to the expected gradient. Below this threshold, the local gradient is statistically indistinguishable from a sample drawn from the gradient noise distribution alone. Aggregating noise across K clients does not recover signal — it averages noise.
Formally, the expected squared error of the FedAvg update step grows as:
E[||w_t+1 - w*||²] ≤ (1 - ηλ)ᵀ||w_0 - w*||² + η·Σ_k (σ²_k / n_k)
where η is learning rate, λ is the strong convexity constant, and the second term — the irreducible error floor — grows without bound as n_k → 1. This is not a convergence slowdown. It is a convergence failure.
Kairouz et al. (2021) explicitly identify statistical heterogeneity as a fundamental open problem in FL, noting that non-IID data distributions across clients degrade convergence. Rare disease distributions are the most extreme case of non-IID: a site with one Niemann-Pick patient and zero others does not have a data distribution. It has a single observation.
2.2 The Rare Disease Cohort Reality
The epidemiological context makes this exclusion quantitatively severe:
- 7,000+ rare diseases have been identified (Orphanet, 2023)
- 300 million people worldwide are affected by rare diseases (EURORDIS, 2022)
- 95% of rare diseases have no approved treatment (NIH NCATS)
- Median institutional cohort size for any given rare disease at any given institution: 1–5 patients
The last figure is the critical one. A network of 500 institutions, each with an average of 3 patients per rare disease of interest, has a total cohort of 1,500 patients. Under ideal conditions — equal distribution, IID data, cooperative clients — that is sufficient for FL. But rare disease distributions are not equal. The actual distribution across 500 sites likely follows a power law: a handful of specialist centers with 20–50 patients, a long tail of sites with 1–3.
Li et al. (2020) demonstrate that FL performance degrades substantially when client data is highly non-IID, and that no current FL algorithm fully resolves the non-IID problem for highly imbalanced distributions. For rare diseases, the imbalance is not merely high — it is absolute at the majority of sites.
Bonawitz et al. (2019), reporting on production FL deployment at Google scale, document the minimum viable client requirements for stable FL operation. These requirements — which include minimum local dataset sizes, minimum participation rates per round, and dropout tolerance mechanisms — all assume a floor of usable local data volume that the rare disease context cannot provide.
2.3 The Exclusion Is Architectural
This is the critical distinction. The FL exclusion of rare disease single-site institutions is not a failure of implementation or parameter choice. It follows directly from what FL routes.
FL routes model weight updates. Weight updates require gradient computation. Gradient computation requires sufficient local data volume to produce a signal that exceeds noise. Rare disease single-site institutions, by definition, often cannot meet this requirement.
No modification to the FL protocol resolves this without abandoning the core FL routing mechanism. Differential privacy requirements worsen the exclusion further: adding calibrated noise to already-noisy gradients from n_k = 1 sites produces output that is purely noise by any measure.
3. The QIS Mathematical Alternative
3.1 Architecture of the Complete Loop
The Quadratic Intelligence Swarm protocol, discovered by Christopher Thomas Trevethan (39 provisional patents filed), routes not model weights but distilled outcome packets. The complete architectural loop is:
Raw signal → Local processing → Distillation into outcome packet (~512 bytes) → Semantic fingerprinting → Routing by similarity to a deterministic address → Delivery to relevant agents → Local synthesis → New outcome packets → Loop continues.
This loop is the breakthrough. Not the routing mechanism, not the fingerprinting, not the distillation step in isolation — the complete closed loop that allows any site that has produced one validated observation to contribute to and receive from the network.
The routing layer is transport-agnostic: outcome packets can be routed via DHT, vector databases, REST APIs, pub/sub queues, or any mechanism that can route an addressed packet to a deterministic destination. The architecture does not depend on any specific transport.
3.2 The N=1 Threshold Proof
The minimum participation threshold for QIS is one validated observation. A site with a single patient who has completed a treatment course can emit an outcome packet encoding:
- Encoded phenotype fingerprint
- Treatment protocol identifier
- Observed outcome vector
- Temporal markers
- Provenance hash
This packet is approximately 512 bytes. It requires no gradient computation. It requires no minimum cohort size. It requires only that the local observation has been validated and distilled.
3.3 Synthesis Opportunity Differential
The number of unique synthesis opportunities in a QIS network of N participating sites is:
S = N(N-1)/2
Routing cost is at most O(log N) for DHT-based transports, and O(1) for direct indexing transports. At 500 institutions with average 3 rare disease patients each:
- Total observations available: 1,500
- FL gradient signal: ~0 (all sites below n≥30 threshold, no site produces a usable gradient)
- QIS synthesis opportunities: 500(499)/2 = 124,750 unique synthesis paths
FL gets zero of these. QIS gets all of them.
The mathematical difference is not a performance improvement — it is a category difference. FL cannot produce any output. QIS produces 124,750 opportunities for synthesis between site observations.
4. Concrete Implementation: Single-Site Rare Disease Node
The following Python class illustrates the architectural distinction. A RareDiseaseSiteNode can emit an outcome packet from a single patient observation — the operation FL cannot perform at all.
import hashlib
import json
from dataclasses import dataclass, field
from typing import Optional
from datetime import datetime
@dataclass
class OutcomePacket:
"""
A ~512-byte distilled outcome packet for QIS routing.
Transport-agnostic: can be routed via DHT, REST API,
vector DB, pub/sub, or any addressed transport.
"""
phenotype_fingerprint: str # SHA-256 of encoded phenotype
treatment_id: str # Protocol or drug identifier
outcome_vector: list # [efficacy, tolerability, durability]
observation_timestamp: str
site_provenance_hash: str # Non-identifying site identifier
n_observations: int = 1 # Explicit: N=1 is valid and sufficient
@dataclass
class RareDiseaseSiteNode:
"""
A QIS network participant for rare disease research.
Minimum viable participation: one validated patient observation.
Contrast with FL requirement: n_local >= 30 for gradient stability.
This class produces valid output at n_local = 1.
"""
site_id: str
disease_code: str # Orphanet or OMIM code
patients: list = field(default_factory=list)
def _encode_phenotype(self, patient_record: dict) -> str:
canonical = json.dumps(patient_record.get("phenotype", {}), sort_keys=True)
return hashlib.sha256(canonical.encode()).hexdigest()
def _site_hash(self) -> str:
return hashlib.sha256(self.site_id.encode()).hexdigest()[:16]
def emit_outcome_packet(self, patient_index: int = 0) -> Optional[OutcomePacket]:
"""
Emit an outcome packet for a single patient observation.
FL cannot produce a gradient from this. QIS produces a
fully routable outcome packet from this single observation.
"""
if not self.patients:
return None
# N=1 is sufficient. No minimum cohort size requirement.
patient = self.patients[patient_index]
packet = OutcomePacket(
phenotype_fingerprint=self._encode_phenotype(patient),
treatment_id=patient.get("treatment_protocol", "unknown"),
outcome_vector=[
patient.get("efficacy_score", 0.0),
patient.get("tolerability_score", 0.0),
patient.get("durability_months", 0.0),
],
observation_timestamp=datetime.utcnow().isoformat(),
site_provenance_hash=self._site_hash(),
n_observations=1,
)
return packet
def emit_all_packets(self) -> list:
"""Emit one outcome packet per validated patient observation."""
return [
self.emit_outcome_packet(i)
for i in range(len(self.patients))
if self.patients[i].get("validated", False)
]
# Example: rural LMIC clinic with one Gaucher disease patient
site = RareDiseaseSiteNode(
site_id="clinic_accra_001",
disease_code="ORPHA:355", # Gaucher disease type 1
patients=[{
"phenotype": {"splenomegaly": True, "anemia": True, "bone_crisis": False},
"treatment_protocol": "imiglucerase_60U_kg",
"efficacy_score": 0.78,
"tolerability_score": 0.91,
"durability_months": 18.0,
"validated": True,
}]
)
# This produces a valid, routable QIS outcome packet.
# The equivalent FL operation produces: nothing (n < 30, gradient is noise).
packet = site.emit_outcome_packet()
print(f"Packet emitted: n_observations={packet.n_observations}")
print(f"Phenotype fingerprint: {packet.phenotype_fingerprint[:16]}...")
print(f"Outcome vector: {packet.outcome_vector}")
The contrast is architectural: FL routes objects (weight gradients) that require volume to carry signal. QIS routes objects (outcome packets) that carry signal at volume = 1.
5. Global Equity Implications
The FL exclusion of single-site rare disease institutions is not uniformly distributed geographically. It falls most heavily on institutions in LMICs.
Specialist rare disease centers in high-income countries are more likely to have accumulated cohorts of 20–50 patients through decades of operation, referral networks, and dedicated disease registries. Institutions in LMICs — serving populations that are equally affected by rare diseases but with less diagnostic infrastructure — are more likely to encounter rare disease patients one at a time, with no systematic registry, no referral pipeline, and no prospect of reaching an n≥30 threshold within any reasonable research timeframe.
The practical consequence of FL's exclusion threshold is that rare disease research networks built on FL architecture reproduce the access inequities of traditional centralized research — they simply do so in a distributed system. Institutions with patient volume participate. Institutions without volume do not. LMIC institutions, which most often lack volume, are excluded by the mathematics of the protocol.
QIS resolves this structurally. A rural clinic in Ghana with one confirmed Gaucher disease patient treated with enzyme replacement therapy can emit one outcome packet. That packet enters the synthesis network. That observation reaches the agents positioned to synthesize it with observations from Accra, from São Paulo, from Manila. The minimum viable contribution is one validated observation — a threshold every functioning clinical institution can meet.
This is not a marginal improvement in equity. It is the difference between inclusion and exclusion.
6. Discussion
6.1 Implications for OHDSI
The OHDSI network and its Observational Medical Outcomes Partnership (OMOP) common data model have made substantial progress in standardizing clinical observation data across institutions. However, OHDSI's analytical tools are predominantly designed for condition-population analyses where participating site cohorts number in the hundreds or thousands. Rare disease subgroup analyses within OHDSI frequently fail data density requirements and are suppressed before output.
QIS outcome packet routing, applied over OMOP-standardized observations, would allow OHDSI sites with single rare disease patients to contribute distilled observations to a synthesis network without exposing individual patient records and without requiring cohort size thresholds. The OMOP phenotype encoding is directly compatible with the phenotype fingerprinting step in the QIS loop.
6.2 Implications for TriNetX
TriNetX operates as a federated query network where sites respond to population-level queries. Sites below minimum cell size thresholds are suppressed in aggregate results — again, an exclusion that falls disproportionately on rare disease observations. QIS packet routing would allow these sites to contribute their observations through distillation rather than through direct query response.
6.3 Implications for Matchmaker Exchange
Matchmaker Exchange (MME) was specifically designed to connect clinicians who each have one or a few patients with undiagnosed rare diseases, enabling matching by phenotypic and genotypic similarity. This is precisely the N=1 use case. MME's current architecture routes patient-level summary records to a central matching service. QIS outcome packet architecture would allow MME participants to emit packets that enter a decentralized synthesis network, removing the central matching coordinator as a single point of failure and extending the matching surface to any transport that can route an addressed packet.
6.4 Limitations
This analysis focuses on the gradient variance exclusion problem and does not address all FL limitations in rare disease contexts. Additional issues — including catastrophic forgetting in continual learning settings, communication overhead for infrequent rare disease updates, and model capacity allocation across heterogeneous task distributions — are outside the scope of this paper. The QIS framework's performance at network scale beyond 500 nodes under adversarial packet conditions requires further empirical evaluation.
References
McMahan, B., Moore, E., Ramage, D., Hampson, S., & Agüera y Arcas, B. (2017). Communication-efficient learning of deep networks from decentralized data. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 54, 1273–1282.
Kairouz, P., McMahan, H. B., Avent, B., Bellet, A., Bennis, M., Bhagoji, A. N., ... & Zhao, S. (2021). Advances and open problems in federated learning. Foundations and Trends in Machine Learning, 14(1–2), 1–210.
Li, T., Sahu, A. K., Talwalkar, A., & Smith, V. (2020). Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine, 37(3), 50–60.
Bonawitz, K., Eichner, H., Grieskamp, W., Huba, D., Ingerman, A., Ivanov, V., ... & Van Overveldt, T. (2019). Towards federated learning at scale: A system design. Proceedings of the 2nd SysML Conference.
Orphanet. (2023). Rare Disease Nomenclature and Classification. INSERM. https://www.orpha.net
EURORDIS — Rare Diseases Europe. (2022). Rare Diseases: Understanding this Public Health Priority. EURORDIS.
National Organization for Rare Disorders (NORD). (2022). Rare Disease Facts. https://rarediseases.org
NIH National Center for Advancing Translational Sciences (NCATS). Rare Diseases at NCATS. https://ncats.nih.gov/research/rare-diseases
Köhler, S., Carmody, L., Vasilevsky, N., Jacobsen, J. O. B., Danis, D., Gourdine, J.-P., ... & Robinson, P. N. (2019). Expansion of the Human Phenotype Ontology (HPO) knowledge base and resources. Nucleic Acids Research, 47(D1), D1018–D1027.
Philippakis, A. A., Azzariti, D. R., Beltran, S., Brookes, A. J., Brownstein, C. A., Brudno, M., ... & Beggs, A. H. (2015). The Matchmaker Exchange: A platform for rare disease gene discovery. Human Mutation, 36(10), 915–921.
Hripcsak, G., Duke, J. D., Shah, N. H., Reich, C. G., Huser, V., Schuemie, M. J., ... & Ryan, P. B. (2015). Observational Health Data Sciences and Informatics (OHDSI): Opportunities for observational researchers. Studies in Health Technology and Informatics, 216, 574–578.
Duan, M., Liu, D., Chen, X., Liu, R., Tan, Y., & Liang, L. (2019). Self-balancing federated learning with global imbalanced data in mobile systems. IEEE Transactions on Parallel and Distributed Systems, 32(1), 59–71.
The Quadratic Intelligence Swarm protocol was discovered by Christopher Thomas Trevethan. 39 provisional patents filed.
Preprint submitted for indexing. Not peer reviewed.
Top comments (0)