Verial
guideshipaasynthetic-datacompliance

HIPAA-Compliant AI Testing with Synthetic Data

Synthetic data eliminates HIPAA risk in AI development while providing more realistic testing than de-identified PHI subsets.

K
Kevin Huang · Co-founder, Verial
·8 min read
Share

TL;DR

  • Use synthetic data instead of de-identified PHI in healthcare AI development. Zero re-identification risk, zero BAAs, no data pipeline to maintain.
  • HHS OCR's 2024 breach report documented breaches affecting over 275 million individuals in 2024, the worst year on record.
  • Safe Harbor strips dates, geography, and MRNs, which breaks temporal reasoning and cross-resource linkage needed for agent testing.
  • Expert Determination costs $50K to $200K per dataset (HHS guidance) and must be redone when data or use cases change.

The HIPAA problem in AI development

Building a healthcare AI agent requires realistic patient data. But realistic patient data is PHI, and PHI comes with regulatory requirements that make development slow, expensive, and risky.

The typical path: your team needs patient data. You sign a BAA. You set up a HIPAA-compliant dev environment with encrypted storage, access controls, audit logging, and workforce training. You get a subset of de-identified data. The de-identification stripped out fields your agent actually needs. You request a different subset. That takes three weeks. Meanwhile, engineers are guessing at data shapes.

This cycle repeats at every health system you onboard. Each has different DUAs, different de-identification standards, and different timelines.

"Cyberattacks and the theft of individuals' protected health information have become pervasive and increasingly sophisticated. OCR continues to urge all covered entities and business associates to strengthen their cybersecurity posture."

-- Melanie Fontes Rainer, Director, HHS Office for Civil Rights (HHS press release, 2024)

Synthetic data removes this bottleneck.

De-identification is harder than it looks

HIPAA provides two methods: Safe Harbor and Expert Determination. Both have limits for AI development.

Safe Harbor method

Safe Harbor requires removing 18 specific identifier categories: names, geographic data smaller than a state, dates (except year), phone/fax numbers, emails, SSNs, MRNs, health plan numbers, account numbers, license numbers, vehicle IDs, device IDs, URLs, IP addresses, biometric IDs, full-face photos, and any other unique identifying number.

For AI agent testing, this creates problems:

  • Dates are critical for clinical logic. Your agent calculates medication durations, identifies recent labs, and determines appointment timing. Year-only dates make temporal reasoning impossible.
  • Geography affects payer routing. Eligibility and prior auth vary by state and region. Sub-state geographic detail is needed for accurate payer matching.
  • MRNs enable cross-referencing. If your agent correlates across multiple FHIR resources (Condition to Encounter to Claim), removing identifiers breaks the linkages.

Expert Determination method

Expert Determination uses statistical methods to verify re-identification risk is "very small." More flexible than Safe Harbor, but costs $50K to $200K per dataset and must be redone when data or use cases change. Prohibitively slow for a startup testing across many health systems.

The re-identification risk nobody talks about

Even properly de-identified data carries residual risk. Research has repeatedly shown that combinations of demographic and clinical fields can re-identify individuals. A 2024 study at JAMIA demonstrated that diagnosis codes, procedure dates, and 3-digit zip codes could re-identify patients in datasets that passed Safe Harbor review.

For an AI company, a re-identification incident is existential. The HHS OCR 2024 breach report recorded breaches affecting more than 275 million individuals in 2024. Health systems will not work with a vendor that has been in one, regardless of fault.

Why synthetic data is better than de-identified data

Synthetic data is generated from statistical models, clinical rules, and demographic distributions. It was never real PHI. Zero re-identification risk. No BAA. No de-identification review. No DUA. See synthetic patient data for AI testing for how to generate clinically coherent patients.

The advantages go beyond compliance.

Controllable demographics

With de-identified data, you get whatever the health system gives you. If their population skews older and commercially insured, your test data carries that bias. Need pediatric Medicaid coverage? You are out of luck.

Synthetic data lets you specify the exact distribution. 40% Medicaid, 30% Medicare, 30% commercial. Ages 0 to 95. Every state for geographic-dependent payer logic. None of this works with de-identified production data.

Scenario-specific generation

Real data does not contain the edge cases you need to test. If you need a patient with four active insurance plans, overlapping coverage, and a specific prior auth denial, you could search millions of records and not find one. With synthetic data, you define the scenario and generate the patient.

This is especially valuable for failure mode testing:

  • Patient with mid-treatment insurance change creating conflicting coverage
  • Rare condition mapping to an ambiguous ICD-10 code
  • Lab results with dataAbsentReason instead of a value
  • Name with special characters that break portal validation
  • Medication list exceeding the portal's display limit

Each is a real production failure mode. None easy to find in de-identified datasets.

Data freshness

De-identified datasets are snapshots. By the time you receive it, the data may be months old. EHR configs change. Code systems evolve. Synthetic data is generated on demand. When a payer changes prior auth rules, you update the generation rules.

No data pipeline maintenance

De-identified pipelines (extract, de-identify, transfer, refresh) fail at every step. Synthetic data is self-contained. Generated programmatically. No external dependencies.

Building HIPAA-compliant development environments

Even with synthetic data, follow HIPAA practices. The habits carry over to production.

Environment architecture

Maintain strict separation:

  • Development: synthetic only. No PHI. No BAA. Engineers have full access.
  • Staging: synthetic mirroring production patterns. Final validation before deployment.
  • Production: real patient data. Full HIPAA controls.

This separation means development velocity is unconstrained by HIPAA.

Access controls

Even in development, use role-based access mirroring production. Your synthetic FHIR server should enforce the same OAuth scopes and patient-level controls. If your agent needs patient/Observation.read in production, it should need it in the sandbox. This is one of the key gaps in existing FHIR sandboxes teams overlook.

Audit logging

Log all data access in development using the same audit framework as production. Auditors appreciate seeing consistent security practices across all environments.

What auditors want to see

When a health system compliance team evaluates you, they are assessing risk. "If we give this company access, what is the breach likelihood?"

Synthetic data simplifies this dramatically.

  • Data inventory: simple. No PHI in development. No external data transfers. No BAAs with development data providers.
  • Risk assessment: development risk effectively zero. Production assessment unchanged.
  • Training: engineers can work without PHI access until they need production.
  • Incident response: synthetic-data incidents have no breach notification implications.

Making the switch

If you currently rely on de-identified production data, switching requires upfront investment in generation capabilities. Build or adopt tools that produce clinically realistic FHIR resources, payer configs, and patient scenarios.

The investment pays off within one or two health system onboarding cycles. Instead of weeks of DUA negotiation, your team generates test data on demand. Combined with a structured testing framework and deterministic sandbox environments, this enables velocity de-identified pipelines cannot match.

Key Takeaways

  • Synthetic data removes re-identification risk entirely and eliminates BAAs, DUAs, and de-identification reviews for development.
  • Safe Harbor breaks dates, geography, and MRNs, which are essential for agent clinical logic and cross-resource linkage.
  • Expert Determination costs $50K to $200K and must be redone when data or use cases change.
  • 2024 was the worst year on record for HIPAA breaches, with over 275 million individuals affected per HHS OCR.
  • Use synthetic in development, synthetic mirroring production in staging, real PHI only in production with full HIPAA controls.
  • Synthetic data lets you generate the edge cases (hyphenated names, mid-treatment coverage changes, rare conditions) you cannot find in real data.

FAQ

Does synthetic data satisfy HIPAA?

Synthetic data is not PHI and is not subject to HIPAA. No BAA, no de-identification review, no DUAs. Best practice: treat your synthetic environments with HIPAA-grade controls anyway to build the habits you need for production.

Is synthetic data realistic enough to find production bugs?

Yes, when you generate for clinical coherence and specific scenarios. It is often more effective than de-identified data because you can create the edge cases you need, rather than hoping the health system's export happens to contain them.

How do I validate synthetic data matches real clinical patterns?

Compare distributions of common fields (age, diagnosis frequency, coverage mix) against published benchmarks like the CDC NAMCS or HCUP. Check that generated FHIR resources pass US Core and USCDI profile validation.

What about training models on synthetic data?

For agent evaluation and integration testing, synthetic is the right answer. For training clinical decision models where distributional fidelity matters most, you will still need some real data under BAA, but you can drastically reduce the volume needed.

K
Kevin Huang · Co-founder, Verial
·8 min read
Share