← all readouts

Privacy-Preserving Allele Frequency Aggregation Across Genomic Cohorts: A Correctness and Overhead Demonstration Using Homomorphic Encryption

Exact input: Can allele frequencies be computed across genomic cohorts with homomorphic encryption for privacy-preserving secure aggregation, without exposing individual genotypes?

Execution template: he secure aggregation

execution observatory

Attempt 1 of 1

done Completed · publish stage
committed record

immutable execution contract

exact input
Can allele frequencies be computed across genomic cohorts with homomorphic encryption for privacy-preserving secure aggregation, without exposing individual genotypes?
execution template
he secure aggregation
  1. scope
  2. dataset
  3. run
  4. write
  5. review
  6. correct
  7. publish

latest committed step

orchestration Opencode process exited.

wrapper_exited · run · observed · wrapper

committed steps
30
accepted / verified
6
warnings / rejects
1
elapsed
16 minutes
last recorded
tokens recorded
not recorded
data downloaded
8.01 KB

canonical execution ledger

Every committed step

Public execution facts only — never private model reasoning, prompts, or raw process output.

attempt-1-ledger hal9000/run/dd461a63/1 chronological · persisted · archived Reload
  1. 001 orchestration run_queued run · queued · rails Execution attempt 1 queued.
  2. 002 orchestration investigation_selected notice · observed · rails Capability gate passed with he_secure_aggregation. Started manually by an administrator.
  3. 003 orchestration run_claimed run · claimed · rails Engine claimed this execution attempt.
  4. 004 orchestration runner_launch_authorized run · started · rails Execution lease acquired; the runner may launch once.
  5. 005 orchestration wrapper_started run · started · wrapper Opencode process started for this exact attempt.
  6. 006 scoping scope_started action · started · agent Beginning scoping for this exact execution attempt.
  7. 007 scoping scope_proposed gate · proposed · agent Proposed one falsifiable scoped question using the supported reference analysis.
  8. 008 data dataset_search_started action · started · agent Searching one bounded zero-auth public source.
  9. 009 data dataset_proposed artifact · proposed · agent Proposed a bounded dataset provenance record for terminal validation.
  10. 010 data dataset_proposed artifact · proposed · agent Proposed a bounded dataset provenance record for terminal validation.
  11. 011 analysis analysis_started action · started · agent Executing the allowlisted analysis with a fixed seed.
  12. 012 analysis analysis_observed metric · observed · agent Observed the analysis result and measured its process duration.
  13. 013 writing draft_started action · started · agent Building the initial paper from committed evidence.
  14. 014 writing draft_written artifact · proposed · agent Wrote the initial paper draft from the available evidence.
  15. 015 review review_started action · started · agent Adversarial review round 1 against every available source artifact.
  16. 016 review review_observed gate · observed · agent Round 1 review: 1 blocker, 1 major, 2 minor.
  17. 017 correction correction_started action · started · agent Evidence-preserving corrections for round 1 findings.
  18. 018 correction correction_observed gate · observed · agent Round 1 correction: 4 resolved, 0 remaining.
  19. 019 review review_started action · started · agent Adversarial review round 2 against every available source artifact.
  20. 020 review review_observed gate · observed · agent Round 2 review: 0 blockers, 0 majors, 0 minors. Verdict PASS.
  21. 021 publishing publication_started action · started · agent Assembling the corrected artifacts for terminal validation.
  22. 022 correction ingest_rejected gate · rejected · rails Terminal payload rejected: dataset 1 access URL contains an invalid public URL
  23. 023 scoping scope_accepted gate · accepted · rails Accepted the run's scoped research question.
  24. 024 data datasets_accepted artifact · accepted · rails Accepted 1 dataset provenance record for this run.
  25. 025 analysis analysis_accepted artifact · accepted · rails Accepted the executed analysis, server-derived script hash, and 1 exact input artifact.
  26. 026 publishing figure_accepted artifact · accepted · rails Accepted the validated PNG figure for this run.
  27. 027 publishing paper_accepted artifact · accepted · rails Accepted the run-owned paper for publication.
  28. 028 publishing run_published run · completed · rails Execution attempt 1 published with outcome success.
  29. 029 orchestration wrapper_duration metric · observed · wrapper Measured opencode process duration.
  30. 030 orchestration wrapper_exited run · observed · wrapper Opencode process exited.

exact-attempt artifacts

Artifacts & paper

Nothing on this attempt is borrowed from a newer run.

Abstract

hal9000/run/dd461a63/attempt/1 · published Jul 18, 2026 · pooled alt AF = 0.4235 over 5 private cohorts, exact match to plaintext (err 0); 128x ciphertext, 184 ms secure aggregate at 1024-bit

pooled alt AF = 0.4235 over 5 private cohorts, exact match to plaintext (err 0); 128x ciphertext, 184 ms secure aggregate at 1024-bit

Federated genomic analytics requires computing population-level statistics across multiple data holders without sharing raw genotypes. We evaluate whether Paillier additive homomorphic encryption (HE) can faithfully compute a pooled allele frequency across genomic cohorts by testing correctness and measuring overhead. Using publicly available 1000 Genomes phase-3 allele frequency data from the APOE region (chr19:44905000–44910000), we treat the five super-population cohorts (AFR, AMR, EAS, EUR, SAS) as proxy data holders, encrypt their allele counts under a 1024-bit Paillier scheme, homomorphically sum the ciphertexts, and decrypt the pooled result. The HE-computed pooled alt-allele frequency of 0.423522 exactly matched the plaintext pooled frequency (max absolute error = 0.0), confirming that additive HE is lossless for this aggregation. The ciphertext expanded 128× relative to plaintext, and the per-query secure aggregation (encrypt + homomorphic add + decrypt) completed in 184 ms, with one-time key generation adding 159 ms. This demonstration validates HE correctness for allele-frequency pooling on a public proxy dataset; genuine privacy gains would require deployment with truly private cohort-level genotype data.

Computed figure for Privacy-Preserving Allele Frequency Aggregation Across Genomic Cohorts: A Correctness and Overhead Demonstration Using Homomorphic Encryption
Figure · computed from the named dataset, not illustrative.

Introduction

Federated genomic analytics aims to compute population-level statistics across multiple institutions without sharing individual-level genotypes. Homomorphic encryption (HE) allows computation on encrypted data, making it a candidate for privacy-preserving secure aggregation in genomics. The key question is whether additive HE schemes like Paillier can faithfully aggregate allele counts across cohorts — that is, whether the decrypted pooled result is bit-exact with the plaintext pooled frequency.

This study tests that correctness claim using the five 1000 Genomes super-populations (AFR, AMR, EAS, EUR, SAS) as proxy data holders. For the most population-differentiated variant in a genomic region, each cohort's allele counts are encrypted; an untrusted aggregator homomorphically sums the ciphertexts; and only the pooled ciphertexts are decrypted. We note that the 1000 Genomes allele frequencies are publicly available aggregate statistics, so this analysis is a correctness and overhead demonstration, not a genuine privacy-preserving computation on sensitive data. Real privacy benefits would emerge when the same HE scheme is applied to truly private cohort-level genotype data held by separate institutions.

Methods

Data Source

We fetched a tabix-indexed region slice from the 1000 Genomes phase-3 VCF (chr19:44905000–44910000, GRCh37) via zero-auth HTTP range requests. The slice contained 163 variants with per-super-population allele frequencies (EASAF, AMRAF, AFRAF, EURAF, SAS_AF). The 1000 Genomes panel provides aggregate allele frequencies, not individual genotypes. These frequencies are publicly available, making them suitable as a correctness testbed but not as genuinely private data.

Lead Variant Selection

From variants with complete population AF data, we selected the lead variant as the one with the largest spread (max AF − min AF) across the five super-populations. The selected variant is at chr19:44908967 (CA→C), with a spread of 0.6567 across populations (AFR: 0.1127, AMR: 0.5202, EAS: 0.2500, EUR: 0.7694, SAS: 0.5982).

Paillier Homomorphic Encryption

We implemented a minimal, dependency-free Paillier cryptosystem using pure-Python big-integer modular arithmetic. The scheme uses:

  • Key generation: two random primes p, q of half the key size; modulus n = pq; generator g = n+1 for efficient encryption.
  • Encryption: for plaintext m, ciphertext = (1 + m·n) · rn mod n², where r is a random blinding factor.
  • Homomorphic addition: E(a) · E(b) mod n² = E(a + b).
  • Decryption: standard Paillier decryption using the private key.

For each of the five super-populations, the party's data consists of (altallelecount, totalallelecount) for the lead variant. Counts are derived from the published allele frequencies using fixed panel sizes (2N haplotypes per super-population: AFR=1322, AMR=694, EAS=1008, EUR=1006, SAS=978).

Correctness Verification

The HE-computed pooled alt-allele count and total-allele count were compared against the plaintext pooled values. The primary outcome is exactmatch: whether both counts are bit-identical, and consequently maxabs_error = 0.

Overhead Measurement

We measured: (1) ciphertext expansion (ciphertextbytes / plaintextbytes); (2) wall-clock latency for keygen, encryption of all parties, homomorphic aggregation, and decryption. The per-query cost (encrypt + homomorphic add + decrypt) is separated from the one-time keygen cost.

Seed and Reproducibility

A fixed seed (1234) was used for all prime generation and blinding to ensure bit-for-bit reproducibility.

Results

The analysis completed successfully (outcome: success). For the lead variant at chr19:44908967 (CA→C) in the APOE region:

Metric Value
Pooled alt-allele frequency (HE) 0.423522
Pooled alt-allele frequency (plaintext) 0.423522
Max absolute error 0.0
Exact match Yes
Pooled alt-allele count 2121
Pooled total alleles 5008
Ciphertext expansion 128×
Key generation time (one-time) 158.65 ms
Encryption time (all 5 parties) 154.55 ms
Homomorphic addition time 0.12 ms
Decryption time 29.5 ms
Per-query secure aggregate (enc+add+dec) ~184 ms
Full cost including keygen ~343 ms
Paillier key size 1024-bit

Per-cohort alt-allele contributions: AFR: 149, AMR: 361, EAS: 252, EUR: 774, SAS: 585.

The figure shows the per-cohort alt-allele contributions and the verified pooled allele frequency computed via Paillier homomorphic encryption.

Discussion

The analysis confirms that Paillier additive homomorphic encryption computes a pooled allele frequency across five genomic cohorts that is bit-exact with the plaintext pooled frequency. This is the core scientific finding: additive HE is lossless for this aggregation task. The max absolute error is 0.0, which means no rounding, wrapping, or precision loss occurs under 1024-bit keys.

The 128× ciphertext expansion is a known property of the Paillier scheme at this key size (256-byte ciphertexts for 2-byte plaintexts). The per-query secure aggregation cost (encrypt + homomorphic add + decrypt) is ~184 ms for five parties, and the homomorphic addition itself is negligible at 0.12 ms. One-time key generation adds ~159 ms and can be amortized across multiple aggregation queries.

Limitations

  1. Public proxy data: The 1000 Genomes allele frequencies are publicly available aggregate statistics. This analysis demonstrates HE correctness and overhead, not genuine privacy protection. Real privacy gains require deployment with truly private cohort-level data.
  2. 1024-bit key size: This is a fast demonstration; production deployments should use 2048+ bits for long-term security.
  3. Single-variant analysis: The demonstration pools counts for one lead variant (chr19:44908967, CA→C). A real genomic study would aggregate across many variants.
  4. No network latency: The five "parties" run in-process; a distributed deployment would add network round-trip time.
  5. Simulated federated setting: All five cohorts' data resides in a single process; real federated aggregation would require secure multi-party communication channels.

Provenance

Provenance · exact attempt · input bundle retained
attempt 1 · exact retained execution
exact input Can allele frequencies be computed across genomic cohorts with homomorphic encryption for privacy-preserving secure aggregation, without exposing individual genotypes?
execution template he secure aggregation
Acquisition → Analysis
  1. Step 1 1000 Genomes fetcher

    argv
    1. --region
    2. 19:44905000:44910000
    3. --out
    4. {{workspace:kg.csv}}
    declared outputs
    • kg.csv

Analysis

argv
  1. --kg
  2. {{workspace:kg.csv}}
  3. --label
  4. APOE region (chr19:44905000-44910000)
  5. --seed
  6. {{seed}}
  7. --key-bits
  8. 1024
  9. --outdir
  10. {{workdir}}
dataset 1000 Genomes phase 3 (ALL.chr19.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz) · 19:44905000-44910000 (byte-range tabix slice, pysam)
exact inputs 1 files · 8.01 KB retained
kg.csv input · text/csv · 8.01 KB
88c93b3a8d507677b223f24b6dec959be5fd347ea341ff4782ba564396af89aa
fetched 2026-07-18T19:01:48Z · 1000 Genomes phase 3
script sha256 7cfef09d05778800481091c5e2b1e0a7744f2a781b9ff4f9c3747577ea2b7332
seed 1234
app git sha 5625dd5f30547fb07997efeb3ab46d953d71f60c
exact replay Exact input bytes and invocation manifest retained; runtime lock and hardened executor readiness are not yet available.
statistic {"label":"APOE region (chr19:44905000-44910000)","seed":1234,"reference_template":"he_secure_aggregation","scheme":"paillier_additive_homomorphic","key_bits":1024,"n_parties":5,"n_variants_in_slice":163,"lead_variant":".","private_alt_counts_by_pop":{"afr":149,"amr":361,"eas":252,"eur":774,"sas":585},"pooled_alt_allele_count_he":2121,"pooled_alt_allele_count_plaintext":2121,"pooled_total_alleles":5008,"pooled_allele_freq":0.423522,"plaintext_allele_freq":0.423522,"max_abs_error":0.0,"exact_match":true,"outcome":"success","ciphertext_bytes":256,"plaintext_bytes":2,"ciphertext_expansion":128.0,"keygen_ms":158.65,"encrypt_ms":154.55,"homomorphic_add_ms":0.12,"decrypt_ms":29.5,"headline_statistic":"pooled alt AF = 0.4235 over 5 private cohorts, exact match to plaintext (err 0); 128x ciphertext, 184 ms secure aggregate at 1024-bit"}
corrections none

deterministic re-runs of this exact attempt

Reproduction attempts

Executor health and scientific verdict are separate. Public-safe summaries only; leases and raw process output are never shown.

No reproduction attempt recorded

This exact run has not yet entered the deterministic re-run queue. Its original ledger, artifacts, and provenance remain available above.

Keyboard shortcuts

  • Cmd/Ctrl+K
    Focus global search
  • ?
    Open keyboard shortcuts

Send feedback

We'll only use this to respond to your feedback.