reviewing-reidentification-risk
यह क्या करती है
यह स्किल एजेंट को सिखाती है कि डी-आइडेंटिफ़ाई किए गए डेटासेट में लोग अब भी अलग किए जा सकते हैं या नहीं, यह कैसे मापें। यह स्कोर और एक लिखित मेमो बनाती है, जिसे गोपनीयता समीक्षक यह तय करने के लिए इस्तेमाल कर सके कि डेटा जारी करना सुरक्षित है या नहीं।
कब इस्तेमाल करें
- ✓जब कोई टीम डी-आइडेंटिफ़ाई किया डेटासेट जारी करना चाहती है और जोखिम बहुत कम होने का सबूत चाहिए।
- ✓जब उपयोगकर्ता चिंतित है कि उम्र, ZIP कोड या तारीखें किसी डेटासेट में लोगों की पहचान करा सकती हैं।
- ✓जब समीक्षक को ऐसा हमला परीक्षण चाहिए जो बाहरी व्यक्ति के अतिरिक्त जानकारी इस्तेमाल करने को मॉडल करे।
Skill का लिंक
https://github.com/maziyarpanahi/openmed/blob/master/skills/reviewing-reidentification-risk/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप जाँच सकते हैं कि मेरा डी-आइडेंटिफ़ाई किया डेटासेट उम्र और ZIP कोड से अब भी मरीज़ों की पहचान करा सकता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट गिनता है कि कितने रिकॉर्ड एक ही विवरण-संयोजन साझा करते हैं, जो k-anonymity माप है। यह एक सिम्युलेटेड लिंकिंग हमला भी चलाता है, फिर नतीजों को बचे हुए जोखिम के बारे में मेमो में लिखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Reviewing re-identification risk
Removing direct identifiers is not enough. A record stripped of name, SSN, and MRN can still be singled out by a combination of quasi-identifiers — age, ZIP/region, admission date, sex, rare diagnosis. The HIPAA Expert Determination pathway (45 CFR 164.514(b)(1)) requires a qualified person to apply statistical methods and document that the risk of re-identification is "very small." This skill produces that evidence: quasi-identifier risk metrics (k-anonymity, l-diversity) plus OpenMed's empirical re-identification attack, written up as a residual-risk memo.
When to use
- After direct-identifier removal passes
auditing-deid-leakage(no leaks) and you must decide whether the dataset is releasable. - The user invokes Expert Determination, asks for a re-identification risk score, k-anonymity, l-diversity, or a "very small risk" determination memo.
- You need an adversarial linkage attack — modeling an attacker with auxiliary data — not just a structural metric.
Quick start
from openmed.eval.attacks.reid import run_reid_attack, run_reid_benchmark
# Synthetic de-identified records; each row is the released, de-id'd data.
deidentified = [
{"record_id": "r1", "text": "[NAME], 47F, ZIP 021xx, admitted 2024-03."},
{"record_id": "r2", "text": "[NAME], 47F, ZIP 021xx, admitted 2024-03."},
{"record_id": "r3", "text": "[NAME], 88M, ZIP 597xx, admitted 2024-03."}, # singleton
]
# Auxiliary = what an attacker might already hold (e.g. a voter list).
auxiliary = [{"record_id": "v9", "text": "88M ZIP 597xx"}]
result = run_reid_attack(
fixtures=[], # bring your own records below
deidentified_records=deidentified,
auxiliary_records=auxiliary,
)
metric = result.to_metric()
print(metric["aux_linkage_rate"], # empirical linkage success
metric["k_min"], # smallest equivalence-class size
metric["singleton_count"], # k=1 records (uniquely identifiable)
metric["quasi_identifier_count"])
k_min is the population k-anonymity floor across the dataset; a k_min of 1
means at least one record is unique on its quasi-identifiers and is the highest
re-identification risk. aux_linkage_rate is the empirical attack: how often the
adversary's auxiliary data successfully links back to a released record.
To run against the bundled golden suite and emit a leaderboard-style report:
report = run_reid_benchmark(
suite="golden",
deidentified_records=deidentified,
auxiliary_records=auxiliary,
output_markdown="reid_risk.md",
)
Workflow
- Enumerate quasi-identifiers (QIs). List every field an outsider could
plausibly know and cross-reference: age/DOB, ZIP/region, dates of service,
sex, race, rare conditions, provider. Direct identifiers should already be
gone (verified by
auditing-deid-leakage); QIs are what's left to worry about. - Compute k-anonymity. For each equivalence class (records sharing the same
QI combination), the class size is k.
run_reid_attackreturnsk_minand the list ofsingleton_records(k=1). A common Expert Determination target is k ≥ a documented threshold (e.g. k ≥ 5 or k ≥ 11) for every record. - Check l-diversity on sensitive attributes. k-anonymity hides which record, but if every record in a class shares the same sensitive value (e.g. all HIV-positive), the attribute leaks anyway. Require ≥ l distinct sensitive values per class; flag homogeneous classes.
- Run the empirical attack.
run_reid_attack/run_reid_benchmarkmodel an adversary withauxiliary_recordsand measure actual linkage success (aux_linkage_rate), residual leakage (leakage_rate), surrogate-consistency leaks, and date-shift-inversion leaks. Structural metrics bound risk; the attack demonstrates it. - Generalize or suppress, then re-score. For singletons / low-k classes,
coarsen QIs (age → age band, ZIP5 → ZIP3, exact date → month/quarter) or
suppress the record, then re-run until
k_minand linkage rate meet your documented threshold. - Write the determination memo. Record the QIs considered, methods applied,
k_min, l-diversity, the attack'saux_linkage_rate, the assumptions about attacker capability, and the conclusion that residual risk is "very small." Cite the metrics — never paste raw records into the memo.
Hand-off to / from OpenMed
अक्सर पूछे जाने वाले सवाल
k-anonymity क्या है?
यह गिनती है कि एक ही विवरण-संयोजन कितने रिकॉर्ड साझा करते हैं, इसलिए छोटी गिनती का मतलब अधिक जोखिम है।
क्या इन परीक्षणों को पास करने का मतलब है कि डेटा सुरक्षित है?
अपने-आप नहीं। स्किल ऐसा मेमो माँगती है जो बचे हुए जोखिम का दस्तावेज़ीकरण करे, जिसका फ़ैसला एक योग्य व्यक्ति करे।
क्या यह HIPAA से जुड़ी है?
हाँ। स्किल इस काम को HIPAA Expert Determination मार्ग से जोड़ती है।
जानकारी
लेखक का मूल विवरण
Run expert-determination-style quasi-identifier risk scoring (k-anonymity, l-diversity) plus OpenMed's empirical re-identification attack on a de-identified dataset, then document residual risk in a defensible memo. Use when the user needs HIPAA Expert Determination (45 CFR 164.514(b)(1)) support, asks whether a dataset is safe to release, worries about singling-out via age/ZIP/dates, or wants a statistical \"very small risk\" determination. Covers identifying quasi-identifiers, computing k-anonymity / l-diversity, running openmed.eval.attacks.reid (run_reid_attack / run_reid_benchmark) as the
repo: maziyarpanahi/openmed
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14727
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
annotating-variants
5.8kआपके एजेंट को मुफ़्त सार्वजनिक एनोटेटर से जेनेटिक वेरिएंट का असर बताने, HGVS नामों को जीनोम पोज़िशन में बदलने और जनसंख्या आवृत्ति जोड़ने में मदद करती है।
ask-openmed
5.8kआपके एजेंट को क्लिनिकल टेक्स्ट अनुरोध के लिए सही OpenMed वर्कफ़्लो चुनने में मदद करती है, जहाँ मरीज़ का डेटा हो सकता है वहाँ पहले गोपनीयता जाँच से शुरू करके।
assembling-fhir-bundles
5.8kकई FHIR स्वास्थ्य रिकॉर्ड को एक ट्रांज़ैक्शन Bundle में पैक करती है, जो EHR को भेजने के लिए तैयार हो और आंतरिक संदर्भ सही जुड़े हों।
auditing-deid-leakage
5.8kडी-आइडेंटिफ़ाइड क्लिनिकल टेक्स्ट में बचे पहचानकर्ता जैसे SSN, कार्ड नंबर, ईमेल और तारीखें खोजती है, और कुछ बचा हो तो रिलीज़ रोक देती है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।