Hospitals that treat drug-resistant epilepsy hold some of the most valuable brain recordings in existence. They are electrodes placed on or inside the brain of patients whose seizures medication cannot control, recorded for days before surgery. No single hospital has enough of these recordings to train a seizure detector that works on the next hospital's patients, and the recordings rarely leave the building. Training across hospitals without pooling data (federated learning) is the natural answer. It creates a problem the medical-AI literature has not examined. The standard defence against a corrupted or malicious participant is robust aggregation, meaning the server discards model updates that look like outliers. In a clinical federation, the sites that look like outliers are often simply different. One records children, another has electrodes only in frontal cortex, a third has a patient whose signals drifted over the monitoring stay. Discarding them buys robustness at the price of the population generalizability the federation was built to deliver.
We propose to split the model's parameters by brain region and to run outlier filtering separately for each region, among only the hospitals that actually record from it. This is the partitioning idea behind state sharding in distributed databases, applied to model state instead of ledger state. The filtering runs inside a hardware secure enclave, so it can inspect individual hospitals' updates in the clear without exposing them to the server operator. The claim is empirical and falsifiable. Compared with global robust aggregation, coverage-conditioned aggregation should wrongly exclude far fewer honest minority sites, should improve held-out performance on the populations those sites represent, and should keep comparable resistance to injected faulty updates.
Core Claim
Robust aggregation assumes honest updates cluster together. Intracranial epilepsy data violates that assumption by construction. Electrode placement follows clinical need rather than a research protocol, so different patients and centers cover non-overlapping parts of the brain. The open multi-center iEEG release of Seedat et al. documents this across 38 patients and 4,771 electrodes at three centers. Populations differ sharply as well. The patient-independent CNN-Transformer of Peh et al. generalizes across adult scalp and intracranial datasets but collapses to about 0.22 sensitivity on neonatal EEG. Within a single patient, Eberlein et al. report a human patient at an area under the ROC curve (AUC) of about 0.25, because the signal drifted over the stay and the learned features inverted. Each of these produces an honest update that a distance-based filter would score as anomalous.
The proposal makes two structural choices. First, the model is split into region shards plus a small fusion head that combines them. Each shard's "committee" is the set of sites with electrodes in that region. Second, outlier scores are computed within a committee, never across the whole federation. A frontal-only hospital is then compared only against other frontal recorders, and a neonatal site's frontal update is compared against other frontal updates rather than against the adult majority's temporal-lobe updates. The fusion head is the one component every site touches. It plays the role of cross-shard coordination, which sharding systems identify as the hard part. Sharding Eraser sidesteps it by assuming isolated shards. GriDB handles it by delegating cross-shard work to a separate verified path. We follow GriDB's lesson: the fusion head gets its own aggregation rule, which weights each site by its region coverage, rather than inheriting the per-shard filter.
We do not build a blockchain. Sharding enters as the partitioning and committee design, not as consensus infrastructure. A reviewer who asks for a ledger would be asking for a different paper.
Research Program
The backbone follows the channel-independent design of Peh et al.. It processes each channel with a 1D convolution and transformer and then pools by anatomical region, trained with belief-matching loss for calibrated uncertainty. That paper shows this design, not joint 2D spatial modelling, is what survives changes in electrode layout across centers. We keep it because it constrains our design. The joint spatial-temporal attention of STAN is more accurate within a fixed montage, but it assumes a uniform channel set that no federation of epilepsy centers will have.
Two sharded variants will be built. In the "adapter" variant, the shared per-channel encoder stays global and each region gets a small adapter and a pooling head. In the "full" variant, each region has its own encoder. Region labels come from electrode localization metadata where datasets provide it. For scalp datasets we use the five regional groupings Peh et al. already use.
Aggregation runs inside an Intel SGX enclave, with an Azure confidential virtual machine as a comparison point. The enclave gets remote attestation, meaning a cryptographic proof to each hospital of which aggregation code is running before it sends updates. Three methods are borrowed and cited for that purpose:
- Memory layout. We reuse the row-major and column-major layouts and sampled outlier detection from SEAR, which aggregates 1,000 clients' updates in 4–7 seconds. At roughly 3.5M parameters, the Peh model fits inside the 128MB enclave memory limit. We therefore expect the large paging penalties that motivate Marshaled Learning not to arise, and we will measure whether this holds.
- Per-shard filtering. Within each committee we run coordinate-wise median and Krum. Krum is a rule that keeps the update closest to its nearest neighbours.
- Fusion head. The fusion head uses coverage-weighted averaging with a norm bound.
Microarchitectural leakage of the kind shown by SgxPectre is out of scope for the accuracy claims. We will report whether per-shard filtering introduces access patterns that depend on the data. Oblivious primitives such as those in OLIVE are the stated extension.
The federation is simulated from public datasets. Each dataset, or each center within a multi-center dataset, becomes a site:
- Adult scalp EEG: TUH-SZ.
- Pediatric scalp EEG: CHB-MIT and Siena.
- Neonatal scalp EEG: HUH.
- Adult intracranial EEG: SWEC-ETHZ and EIM.
- Human and canine iEEG: the Kaggle/American Epilepsy Society iEEG data. For drug-resistant epilepsy patients with long recordings, the late portions of the stay become separate "drift sites," which recreates the kind of shift behind Eberlein et al.'s inverted-feature patient.
We also construct coverage-restricted sites by masking iEEG channels so that some sites see only temporal regions and others only frontal or parietal regions. This mirrors the placement heterogeneity documented by Seedat et al. Faults are injected in two forms:
- Benign faults: label noise and artifact-heavy recordings.
- Adversarial faults: scaled or sign-flipped updates from a controlled fraction of sites.
Baselines
Naive reference points. The first is local-only training, in which each site trains on its own data and is tested on other sites. This measures what federation buys. The second is plain federated averaging (FedAvg) with no filtering. It is the method to beat when no faults are present, and our claim is only that it degrades once faults are injected. Both are run with the same backbone, the same number of communication rounds, and the same local epochs and learning-rate search as every other federated method.
Strongest existing competitor. This is global robust aggregation inside an enclave in the manner of SEAR: coordinate-wise median and Krum over the whole update vector, on the identical Peh-style model. It is the fairest adversary. It has the same privacy and fault-tolerance story, and it differs from our method only in ignoring coverage. The file contains no federated number for it on EEG. Its closest reported performance is from the centralized version of the backbone: sensitivity 0.772 at a median false-positive rate of 0 per hour on TUH-SZ, cross-dataset adult sensitivity spanning 0.617–1.00, and neonatal sensitivity about 0.22 (Peh et al.). Beating it means a statistically reliable improvement in worst-site sensitivity, at matched false-positive rate per hour, under leave-one-site-out testing, with no loss in average sensitivity.
Centralized upper bound. The same model trained on pooled data shows how much federation costs. For unseen-patient detection on CHB-MIT, the strongest reported centralized number is 97.65% accuracy from BF-EML. That method uses patient-bias removal we do not replicate, so it is an upper reference, not a target.
Ablation of the key ingredient. This is the most important comparison. It keeps the sharded model but computes outlier scores globally. It is paired with the reverse ablation: an unsharded model where each site's update is simply masked to the regions it covers before global filtering. Only if committee-level scoring, rather than parameter partitioning or masking alone, drives the gain does the central claim stand.
Why not just…?
Why not just use FedAvg, since hospitals are honest? Honesty is not the issue. Corrupted recordings, mislabeled onsets and drift-inverted patients produce harmful updates without any malice. The drift sites and benign-fault injections test directly whether plain averaging degrades. If FedAvg matches our method under realistic benign faults, the conclusion is that robustness is unnecessary for this federation. That would be a useful negative result, and we would report it as such.
Why not just mask missing regions and keep one global filter? This is the real threat. Masking alone might make minority sites look normal enough. The reverse ablation above settles it. If masked global filtering matches coverage-conditioned filtering on wrongful exclusion and worst-site sensitivity, sharding adds nothing, and the paper becomes a study of masking.
Why not use cryptographic secure aggregation instead of an enclave? Secure aggregation reveals only the sum of updates, so it cannot compute the per-update distances that Krum or medians need. SEAR reports enclave aggregation 4–6 times faster than cryptographic secure aggregation even for simple averaging. Fully homomorphic encryption is reported at a 120x slowdown relative to enclaves on genomics workloads (PRESAGE). The enclave's weaker threat model is the stated cost.
Why not pool de-identified data centrally? Seedat et al. show pooling is possible for one-off task datasets. Continuous clinical monitoring data is harder to release, and even where it can be pooled, the question of which populations a robust federation silently drops remains open. The centralized upper bound quantifies what is lost by not pooling.
Proposed Experiments
Wrongful exclusion (decisive check 1). We track how often each honest site's update is down-weighted or discarded per round under global versus coverage-conditioned filtering, broken down by population (neonatal, pediatric, adult, canine) and by coverage type. The hypothesis predicts that global Krum or median disproportionately excludes neonatal, frontal-only and drift sites, and that per-committee filtering does not.
Held-out performance (decisive check 2). Sensitivity and false-positive rate per hour are measured under leave-one-site-out testing, and we report the worst site, not only the mean. Neonatal HUH is the hardest case. Peh et al.'s 0.22 is the reference it must move away from.
Fault resistance (decisive check 3). Adversarial updates are injected at 10–30% of sites. Coverage-conditioned filtering must stay within a small margin of global filtering's resistance. There is a structural reason it might not: small committees, such as a region covered by only two sites, give a median little to work with. We will measure the committee size below which the method fails, and in those cases fall back to norm bounding.
Systems costs. Enclave aggregation latency and memory paging are measured per round, compared against SEAR's reported 4–7 seconds and against the 1–3x enclave overhead reported for Marshaled Learning on confidential virtual machines.
If exclusion rates do not differ, or if worst-site sensitivity does not improve over masked global filtering, the claim is refuted.
References
- Open multi-center intracranial electroencephalography dataset with task probing conscious visual perception
- Multi-center Assessment of CNN-Transformer with Belief Matching Loss for Patient-independent Seizure Detection in Scalp and Intracranial EEG
- Convolutional Neural Networks for Epileptic Seizure Prediction
- Scalable Federated Unlearning via Isolated and Coded Sharding
- GriDB: Scaling Blockchain Database via Sharding and Off-Chain Cross-Shard Mechanism
- Spatio-Temporal Attention Network for Epileptic Seizure Prediction
- SEAR: Secure and Efficient Aggregation for Byzantine-Robust Federated Learning
- Marshaled Learning: Bridging Large Neural Networks with Memory-Constrained Trusted Execution Environments in Federated Learning
- SgxPectre Attacks: Leaking Enclave Secrets via Speculative Execution
- OLIVE: Oblivious and Differentially Private Federated Learning on Trusted Execution Environment
- Universal EEG Epilepsy Detection via Evidential Multi-View De-Biasing
- PRESAGE: PRivacy-preserving gEnetic testing via SoftwAre Guard Extension