Privacy-Preserving Retrieval-Augmented Generation for Healthcare
IEEE HEALTHCOM 2026 · WCIHS WORKSHOP · NEW YORK, 19 TO 21 OCTOBER 2026
Two-Server Secret Sharing with Information-Theoretic Guarantees
Muntaser Syed, Ameerah Alsulami, Mahasen Enam, Nidadavolu Venkat Durga Sai Siva Vara Prasad Raju, Marius Silaghi
Florida Institute of Technology, Melbourne, FL, USA · Independent Researcher, UAE · Birla Institute of Technology and Science, Pilani, India
Healthcare RAG and Patient Privacy
INTRODUCTION
Why RAG in medicine
Where PHI can leak
Goal: retrieval exactly as useful as today, with servers that learn nothing.
Syed et al. · IEEE HealthCom 2026
2 / 20
Existing Privacy Approaches
INTRODUCTION
Homomorphic encryption (CKKS)
CORRECT BUT SLOW
Differential privacy
FAST BUT UNUSABLE
Trusted execution environments
HARDWARE YOU MUST TRUST
Wanted: exact arithmetic, low latency, and no computational hardness assumption.
Syed et al. · IEEE HealthCom 2026
3 / 20
Split every embedding into two random shares. Neither server learns anything. Together they compute the exact inner product.
OUR APPROACH
Additive secret sharing over the 64-bit integer ring, with matrix-vector Beaver triples prepared offline, one per query. The servers reproduce the fixed-point inner product exactly. Security proofs and the triple construction are in the companion paper (Syed, Alsulami and Silaghi, IEEE ICTAI 2026).
Syed et al. · IEEE HealthCom 2026
4 / 20
Threat Model and Privacy Modes
APPROACH
Assumptions
Query-private mode
Only the query is protected; the knowledge base is public (drug references, guidelines).
Mutual-privacy mode
Query and corpus are both secret-shared. For sensitive clinical records.
Each server's view is independent of the protected embeddings; it learns only N, d, the precision, and the number and timing of queries.
Syed et al. · IEEE HealthCom 2026
5 / 20
Hospital and Cloud Deployment
APPROACH
1 Query shares to both servers
2 Masked query F exchanged (single-use mask)
3 Score shares to the client
4 Top-k from the local EHR
5 Docs and query to local LLM
6 Response to the clinician
The LLM never talks to the cloud server.
Syed et al. · IEEE HealthCom 2026
6 / 20
Offline Setup Phase
APPROACH
1 · Encode to fixed point
Multiply each coordinate by 2¹⁶ and round to the nearest integer. The largest inner product is about 2⁴¹, well inside the signed 64-bit range.
2 · Share the documents
Mutual-privacy: the dealer splits every document into two uniformly random shares, one per server. Query-private: documents stay in plaintext.
3 · Corpus tier (once per version)
The dealer shares a uniform mask A; the servers open E = D̂ - A once per corpus version. A changed document gets a fresh row of A first.
4 · Query tier (once per query)
The dealer pools single-use pairs (B, C = A·B); each query consumes one. Reusing a pair would reveal the difference between two queries.
Corpus tier: 0.5 to 114 ms for N ≤ 10,000; a pool of 1,000 query pairs is 79 MB per server.
Syed et al. · IEEE HealthCom 2026
7 / 20
Online Query Phase
APPROACH
1 · Share the query
The client encodes the query and sends one fresh random share to each server. Query-private mode: no Beaver material, no server-to-server traffic.
2 · Exchange the query mask
Mutual-privacy: each server broadcasts its share of F = q̂ - B for this query's single-use pair. 2d ring elements per query, independent of N.
3 · Compute score shares
Each server combines the public E and F with its private shares of A, B and C to form a share of every inner product.
4 · Reconstruct and rank
The client adds the two shares. Scores are exact fixed-point integers; cosine similarity is the score divided by 2³². Select the top-k.
Exact fixed-point arithmetic; agreement with float32 retrieval is empirical: 99.7 to 100%.
Syed et al. · IEEE HealthCom 2026
8 / 20
End-to-End RAG Pipeline
APPROACH
1
Embed
Client encodes the query with MedCPT or MiniLM
2
Encode and share
Fixed-point integers split into two fresh additive shares
3
Private retrieval
Two servers compute score shares without seeing the query or the shared documents
4
Reconstruct and rank
Client adds the shares, selects top-k, fetches plaintext from the local store
5
Secure generation
Local open-weight LLM (Llama 3, Meditron) or a BAA-covered endpoint
Generation stays inside the client's trust boundary. Sending PHI to a public LLM API would negate every guarantee of the protocol.
Syed et al. · IEEE HealthCom 2026
9 / 20
A single share reveals zero bits about the secret, regardless of the adversary's computational power.
PRIVACY ANALYSIS
Theorem 1 (informal, per mode). With honest-but-curious servers that collude with neither each other nor the dealer, each server's view is independent of the protected embeddings; it learns only N, d, the encoding precision, and the number and timing of queries.
Syed et al. · IEEE HealthCom 2026
10 / 20
HIPAA Technical Safeguards
PRIVACY ANALYSIS
Safeguard | Section | How the protocol meets it |
Access Control | §164.312(a) | Each server holds only its share; no single server can reconstruct PHI. |
Audit Controls | §164.312(b) | Share-level operation logs contain no PHI content. |
Integrity | §164.312(c) | The secure computation adds no error; only the public, bounded fixed-point encoding. |
Transmission Security | §164.312(e) | TLS in transit; the shares add a second layer of defense. |
Minimum Necessary | §164.502(b) | No PHI-bearing content reaches either server beyond the public parameters. |
Safe Harbor leaves data to re-identify; a single server's shares leave nothing.
Syed et al. · IEEE HealthCom 2026
11 / 20
Enforcing Non-Collusion
PRIVACY ANALYSIS
$2.19M
civil penalty cap per calendar year for violations of the same requirement (2025 inflation adjustment)
$250K
criminal fine, with up to 10 years of imprisonment (42 U.S.C. §1320d-6)
Both servers operate under separate Business Associate Agreements. Collusion means two organizations jointly violating independent legal obligations: a legal assumption rather than a hardness assumption, and one that holds against quantum computers.
Syed et al. · IEEE HealthCom 2026
12 / 20
Experimental Setup
EVALUATION
Datasets
PubMedQA (1,000 yes/no/maybe), MedQA (1,000 USMLE-style), MedMCQA (2,000 questions, 21 subjects). Corpora of 1,000 to 2,000 documents.
Embedding models
MedCPT, 768-d, trained on PubMed search logs. all-MiniLM-L6-v2, 384-d, as a general-purpose baseline.
Baselines
Plaintext float32 cosine similarity. CKKS homomorphic encryption at 128-bit security. Differential privacy: Gaussian noise, δ = 10⁻⁶, ε from 0.5 to 10, classical calibration.
Hardware and software
One workstation: RTX 4090, 64 GB RAM, Python 3.12. NumPy with native uint64 arithmetic. Every timing is a median over at least 50 repetitions.
Syed et al. · IEEE HealthCom 2026
13 / 20
Retrieval Agreement with Plaintext
EVALUATION
100%
Recall@1 and Recall@5 agreement
ρ = 1.0000
mean Spearman correlation, MPC
3.3 × 10⁻⁵
max similarity error (rounding)
Method | R@1 | R@5 |
MPC-QP (ours) | 1.000 | 1.000 |
MPC-MP (ours) | 1.000 | 1.000 |
DP ε = 1 | 0.001 | 0.000 |
DP ε = 10 | 0.006 | 0.000 |
PubMedQA, 1,000 queries, 1,000 documents, MiniLM; MedCPT identical for MPC. R@k agreement = exact equality of the top-k sets.
At ε = 10, DP displaces the gold document by 325 to 393 ranks on average.
MedMCQA and MedQA: 99.7 to 100% Recall@k for MPC; DP at or below 0.2%.
Syed et al. · IEEE HealthCom 2026
14 / 20
End-to-End RAG Accuracy
EVALUATION
Retrieval | Accuracy | Yes | No | Maybe |
Plaintext / MPC | 0.430 | 0.562 | 0.215 | 0.391 |
DP ε = 1 | 0.205 | 0.116 | 0.185 | 0.696 |
DP ε = 10 | 0.180 | 0.089 | 0.138 | 0.739 |
Majority class (always yes) | 0.560 | 1.000 | 0.000 | 0.000 |
PubMedQA, 200 queries (112 yes, 65 no, 23 maybe), top-5, Phi-3.5-mini (3.8B, Q4_K_M). Yes, No, Maybe = per-class accuracy. MPC returns the same top-5 sets as plaintext on every PubMedQA query (R@5 = 1.000).
43.0%
plaintext and MPC accuracy
76 to 78%
of DP answers are maybe
DP falls to 20.5% and 18.0%: below chance (33%) by the 95% intervals; McNemar p below 10⁻⁵.
Syed et al. · IEEE HealthCom 2026
15 / 20
Latency and Throughput
EVALUATION
1.43 ms
per query, query-private, N = 1,000, d = 384
698 q/s
throughput at the same point; 283 q/s in mutual-privacy mode
3.53 ms
mutual-privacy, incl. per-query triple generation; 1.4 to 3.2× QP
15.6 ms
query-private at N = 10,000; latency is linear in N and in d
Sub-millisecond up to N = 500 (QP, d = 384). Both servers in one process, no network.
Syed et al. · IEEE HealthCom 2026
16 / 20
Comparison with Baselines
EVALUATION
Method | R@1 | Latency | Storage | Security |
MPC-QP (ours) | 1.000 | 1.4 ms | 3.0 KB | IT |
MPC-MP (ours) | 1.000 | 3.5 ms | 6.0 KB | IT |
CKKS (N = 500) | 1.000 | 7.7 s | 327 KB | Comp. |
DP ε = 1 | 0.001 | not timed | 3.0 KB | (ε, δ) |
DP ε = 10 | 0.006 | not timed | 3.0 KB | (ε, δ) |
N = 1,000, d = 384, MiniLM; CKKS measured at N = 500 (7,655 ms), not run at N = 1,000. Storage per document per server. IT = information-theoretic; Comp. = computational.
4,569 to 6,750×
faster than CKKS, mutual-privacy mode against CKKS at N = 100 and 500
27×
less storage per document: 12.0 KB of shares across both servers vs 326 KB; 54× per server
Syed et al. · IEEE HealthCom 2026
17 / 20
Limitations
CLOSING
01
Non-collusion is a trust assumption. The servers must collude with neither each other nor the dealer; enforceable through BAAs, absent from single-server HE.
02
Fixed-point encoding can swap near-ties. Score error at most 3.0 × 10⁻⁴ at d = 384 (3.3 × 10⁻⁵ observed); top-5 sets differed from float32 for at most 0.3% of queries.
03
Linear scan over all N documents. Practical at clinical corpus sizes; full-catalog retrieval (N above 10⁶) needs private approximate nearest neighbor pre-filtering.
04
Honest-but-curious servers; experimental randomness. SPDZ-style MACs extend to malicious adversaries at extra cost; deployment needs a CSPRNG in place of PCG64.
05
Model privacy is out of scope. The embedding model runs on the client. No real patient data was used; every evaluation runs on public benchmarks.
Syed et al. · IEEE HealthCom 2026
18 / 20
Conclusion
CLOSING
Exact secure computation
Bit-for-bit the fixed-point scores; top-5 agreement with float32 retrieval on 99.7 to 100% of queries across three benchmarks.
Information-theoretic security
Each server's view is independent of the protected embeddings; maps to the HIPAA technical safeguards and Minimum Necessary.
Millisecond latency
1.4 ms per query at 1,000 documents; three to four orders of magnitude faster than CKKS, with 27 to 54× less storage.
Deployable on existing infrastructure
Two servers under separate BAAs, a dealer and an LLM inside the hospital, and a FHIR-compatible interface at the client.
Future work: private approximate nearest neighbor search for full-catalog retrieval; evaluation on real clinical data under IRB approval; authenticated secret sharing against malicious servers.
Syed et al. · IEEE HealthCom 2026
19 / 20
Questions?
THANK YOU
Muntaser Syed · msyed2011@my.fit.edu
Florida Institute of Technology, Melbourne, FL, USA
Companion paper: M. Syed, A. Alsulami, and M. Silaghi, "Exact Privacy-Preserving Similarity Search via Two-Server Additive Secret Sharing," IEEE ICTAI 2026.
Syed et al. · IEEE HealthCom 2026
20 / 20