gitwtfhub

wtf is fedrag?

athithyakrishnaa/fedrag — explained in plain English

Analysis updated 2026-05-18

35Audience · researcherComplexity · 5/5Setup · hard

TL;DR

A research system letting hospitals jointly search patient records to answer medical questions, without sharing the raw data.

Mindmap

mindmap
  root((FedRAG))
    What it does
      Federated biomedical QA
      Privacy preserving search
      Simulated hospital nodes
    Tech stack
      Python
      FAISS index
      BM25 search
      Flan-T5 and BioGPT
    Use cases
      Privacy research
      Federated retrieval prototype
      Healthcare AI benchmarking
    Audience
      Researchers
      Data scientists
      Privacy engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study how differential privacy noise trades off against search accuracy across separate data silos.

REASON 2

Prototype a federated search system that blends keyword and embedding based retrieval.

REASON 3

Benchmark how well a language model answers biomedical yes, no, maybe questions from retrieved passages.

What's in the stack?

PythonFAISSBM25Flan-T5BioGPT

How it stacks up

athithyakrishnaa/fedragaayusharyan/fake-iisalex-nlp/denoiserl
Stars353535
LanguageHTMLPython
Setup difficultyhardeasyhard
Complexity5/52/55/5
Audienceresearcherops devopsresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1day+

Requires setting up multiple simulated nodes, embedding models, and a shared search index, aimed at researchers rather than a quick install.

Wtf does this do

FedRAG is a research system that lets multiple hospitals answer medical questions together without ever sharing their patients' records. Each hospital keeps its documents on its own server, and that data never moves. Instead, the system converts documents into a numerical representation locally and then adds a layer of mathematical noise before sending anything to a shared coordinator. This noise scrambles the representation enough that an outsider cannot reconstruct the original text, yet the coordinator can still use the noisy data to find relevant passages. The coordinator combines results from all participating hospitals using a two-step search: one pass looks for exact keyword matches, another pass looks for meaning-level similarity. The two lists are blended together and then a reranking step reorders the final candidates. Once the best passages are selected, a text-generation model reads them and produces a short answer, typically yes, no, or maybe, for biomedical yes/no questions drawn from the PubMedQA dataset. The project tests several configurations to find where privacy and usefulness meet. At very high noise levels, the search quality collapses entirely. At a specific middle setting (labeled epsilon equals 256 in the results), the system finds the right passage 91 percent of the time and still adds enough noise that an attacker trying to identify which documents belong to which hospital gets results barely better than random guessing. The README includes tables showing these tradeoffs at each noise level tested. Scalability tests show the system runs at roughly the same speed whether there are 5, 10, or 20 hospital nodes, and latency stays under 60 milliseconds per query. Building the shared index takes about 9 minutes regardless of how many nodes participate, suggesting the architecture scales without a major time penalty. This is a student or researcher project, presented as a technical paper with reproducible experiments. It is aimed at people studying privacy-preserving machine learning or healthcare AI, not at a general technical audience seeking a ready-to-deploy product. The code supports swapping out the answer-generation model, and the README documents which model scored best on balanced class coverage across the yes/no/maybe categories.

Yoink these prompts

Prompt 1
Explain how the differential privacy noise in FedRAG protects patient data during federated search.
Prompt 2
Walk me through how FedRAG combines keyword and meaning based search results before reranking.
Prompt 3
Help me adapt FedRAG's federated node setup to a different dataset split across multiple sources.
Prompt 4
Summarize the privacy versus accuracy tradeoff shown in FedRAG's noise level experiments.

Frequently asked questions

wtf is fedrag?

A research system letting hospitals jointly search patient records to answer medical questions, without sharing the raw data.

How hard is fedrag to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is fedrag for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.