CalQuity LabsBook a discovery call

Private and sovereign AI

Local LLMs are not automatically HIPAA compliant

Running a model on your own hardware satisfies none of the Security Rule by itself. The obligations attach to access control, audit logging, integrity, transmission security and the agreements covering anyone who touches the data, and self-hosting changes where those controls live rather than whether you need them.

Isometric line drawing of a secured data room. A worker badges a colleague into a glass-walled area holding a server rack marked AI and shelving labelled INTERNAL DATA, beside a monitor headed PRIVATE LLM showing a chat exchange, with a separate desk outside the secure area.

A local LLM changes control ownership, not HIPAA duties

No, HIPAA does not require a local LLM, and running one on your own hardware satisfies none of the Security Rule by itself. Self-hosting changes who operates the safeguards. It does not remove the duties governing access control, audit logging, integrity, authentication, transmission security, or outside parties that handle protected health information.

"HIPAA-compliant LLM" is therefore a misleading unit of analysis. Compliance depends on the information system and the organization operating it. The same model weights can sit inside a defensible deployment or an indefensible one.

An air-gapped inference server can remove transmission paths and subcontractors. A workstation running the same model under a shared account, with prompts written to an unreviewed log file, creates a different set of failures, and both machines qualify as "local." Locality is where the box sits; proving who is allowed to touch what runs on it is a separate, harder claim.

Failure class: network locality is mistaken for access control

The access-control question is not whether the server is inside the building. It is whether each person and software process can access only the electronic protected health information, or ePHI, for which it has been granted rights. That obligation applies to any information system maintaining ePHI under 1.

A local inference endpoint often begins with one bearer token shared by the application, evaluation scripts, notebooks, and operators. That token identifies a deployment, not the clinician, support engineer, patient-facing service, or retrieval worker making a request. It cannot express different authorization policies for those callers.

The result is an authorization collapse. Anyone holding the token receives the inference server's entire authority. Moving that token from a hosted API to an internal URL has not reduced its privilege.

The model service should receive a workload or user identity that can be tied to an authorization decision. The decision belongs at every point capable of disclosing ePHI: the application, retriever, document store, inference gateway, tool executor, and administrative interface. A frontend check is insufficient if a caller can reach the retrieval or inference endpoint directly.

RAG makes the distinction especially important. A user authorized to ask a question is not automatically authorized to retrieve every chunk that could help answer it. The retrieval pipeline must preserve source permissions through indexing, candidate selection, reranking, generation, and citation. How to preserve RAG access controls end to end covers that propagation problem in detail.

Isometric line drawing of a hospital operations room with a clinical workstation labeled NURSE on the left and an unattended batch-processing computer labeled BATCH beside stacked discharge-summary folders on the right, both connected to a central inference console using identical physical keycards stamped SHARED; its receipt printer produces two audit slips that each name only SERVER, with the single accent colour applied exclusively to the matching keycards and SERVER text while everything else remains monochrome.

Failure class: shared API credentials cannot authenticate the requester

Access control depends on knowing which person or entity is requesting data. The Security Rule requires procedures that verify the claimed identity of the requester under 1.

A shared inference key cannot provide that verification. Neither can a source IP address, a virtual private network connection, or physical presence on the hospital network. Those signals may contribute to a policy, but they do not establish a distinct accountable identity.

Consider a nurse practitioner asking the assistant about a medication interaction during an overnight shift, and the batch job that reindexes last month's discharge summaries for the retrieval corpus. Both authenticate with the same bearer token, copied into a deployment README long ago and never rotated since. When an auditor later asks who queried a specific patient's record, the token answers "the inference server," not either of them.

For interactive use, pass an authenticated subject from the application to the inference gateway without allowing the client to rewrite it. For service calls, issue separate workload identities to the retriever, batch evaluator, model server, and tool runner. Bind authorization policies and audit events to those identities.

Administrative paths need separate treatment. Shell access to the GPU node, access to model-server dashboards, and permission to read container volumes can expose prompt caches or loaded datasets without going through the inference API. An application-level identity system does not cover those paths unless infrastructure access is included in the same control design.

Failure class: logs exist, but cannot reconstruct an ePHI access

The audit-controls standard requires mechanisms to record and examine activity in systems that contain or use ePHI. Ownership of the hardware creates no exemption from that requirement under 1.

A useful inference audit event needs enough context to answer who accessed which protected data, through which component, for what operation, under which authorization result. An HTTP status and latency value cannot answer those questions.

A compliance officer investigating a patient complaint some weeks later pulls the inference gateway's access log for the afternoon in question and finds a timestamp, a success status code, and a latency value. Nothing in the row identifies which resident on the floor ran the query, which corpus it drew from, or which chunks of the chart it retrieved. The log proves a request happened. It cannot answer the question the complaint raised.

For a RAG request, the event usually needs an authenticated actor, workload identity, request identifier, policy decision, corpus identifier, retrieved document identifiers, model identifier, tool calls, and outcome. Record raw prompts or outputs only when the audit purpose requires them. Otherwise the audit system becomes another store of ePHI with its own access, integrity, and disclosure risks.

Collection alone is not the safeguard. The Security Rule separately requires procedures for regular review of audit logs, access reports, and security incident tracking under 2. An append-only bucket that nobody queries can preserve evidence after an incident, but it does not perform the required review.

Review procedures should identify an owner, specify the events being examined, define escalation conditions, and retain evidence that the review occurred. AI governance should produce evidence, not only policy explains why an approved policy without operating records provides little assurance.

Failure class: mutable models and corpora undermine integrity

The integrity standard requires policies protecting ePHI from improper alteration or destruction under 1. In an LLM system, the relevant integrity boundary extends beyond the clinical database.

A RAG corpus may contain ePHI directly. Its chunks, metadata, access-control attributes, embeddings, and deletion state can determine what the model discloses. An unauthorized metadata change can make a protected document retrievable by the wrong role even if the source document remains unchanged.

Model artifacts require integrity controls when they contain, reproduce, or govern the processing of ePHI. Fine-tuned weights, adapters, prompt templates, safety policies, and tool definitions can all change system behavior. Treating a filename as a model version does not establish which artifact served a request.

Picture a machine learning engineer who redeploys the discharge-summary model on a Friday afternoon, after retraining it on a slightly expanded corpus. The deployment manifest still reads model: discharge-summary-latest, the same string it held before the retrain. A reviewer trying to determine which weights produced a disputed summary from that weekend has no way to distinguish the old artifact from the new one without the digest neither was ever asked to record.

Pin artifacts by digest. Record the model, adapter, prompt, corpus snapshot, and authorization-policy revision used for each deployment. Restrict who can promote those artifacts. Preserve a reproducible path from approved source material to the deployed package. If the build cannot be repeated, Require vendors to prove every custom model can be rebuilt provides the relevant acceptance criteria.

These controls do not prove that the model's output is clinically correct. They prove that an operator can identify what ran, detect unauthorized changes, and reproduce the deployment under investigation.

Failure class: "local" still includes network transmission

A model running in the same facility as its application can still receive ePHI over an electronic communications network. The transmission-security standard requires technical measures guarding that data from unauthorized access while it moves under 1.

Relevant paths include the application to the inference gateway, the gateway to the model server, the retriever to the vector store, worker nodes to object storage, and administrative clients to the cluster. A private subnet limits who can reach those hops from outside the network, but it says nothing about whether the two ends authenticate each other or whether a compromised internal host can read the traffic passing through.

Encrypt every hop carrying ePHI and authenticate both ends where the architecture permits it. Terminate transport protection at a component whose access controls and logs are inside the assessed boundary. If a proxy decrypts a request before forwarding it in plaintext, the internal hop remains part of the transmission analysis.

Offline operation can eliminate these network paths. It also moves model distribution, patches, telemetry export, backup, and incident response into procedures the operator must control, since none of that traffic can travel over a network connection that no longer exists. Removing the wire does not remove the question of whether removable media, administrators, or exported logs are handled correctly; it just moves the evidence for that question onto a different set of procedures.

Failure class: self-hosting removes one vendor while leaving others

A party becomes a business associate through what it does with PHI, not through whether the primary model is hosted locally. A party that creates, receives, maintains, or transmits PHI on behalf of a covered entity for a regulated function can meet the definition under 3.

An organization may own the inference servers while an external GPU operator maintains them, a support vendor receives diagnostic bundles, an observability service ingests prompts, or an evaluation contractor reviews outputs. Each path requires analysis based on the party's function and actual data access.

Where a business associate relationship exists, the contract must establish the permitted and required uses and disclosures of PHI under 4. Calling a service "infrastructure," "telemetry," or "quality assurance" does not decide whether the rule applies.

A business associate agreement is also not a preventive security control. The rule addresses what a covered entity must do after learning of a pattern of material breach, including taking reasonable steps to cure the breach or end the violation. Removing a subcontractor through self-hosting can eliminate an exposure path that a signed agreement cannot technically block.

Hosted, self-hosted, and de-identified designs move different costs

A hosted model service can transfer operation of some physical, platform, and inference controls to a provider. The covered entity still has to evaluate the data path, configure access, review activity, manage incidents, and determine whether the provider's agreement covers the actual use.

Self-hosting removes the model provider from the runtime path. It also makes the deploying organization responsible for the inference gateway, host hardening, artifact provenance, patching, backups, audit pipeline, and administrative access. The relevant comparison is control ownership, not a binary compliance label.

A design that sends only de-identified data to the model can remove that data from the HIPAA definition of individually identifiable health information. The threshold is not informal redaction. There must be no reasonable basis to believe the remaining information can identify a person under 5.

The permitted routes are expert determination by a qualified person using accepted statistical methods with documented analysis, or safe harbor removal of the specified identifier categories. Safe harbor enumerates 18 categories. An engineering team's regex scrubber or prompt instruction does not establish either method.

De-identification can therefore change the compliance boundary more directly than model location. It can also remove clinical details required for the task. That trade must be evaluated against the use case rather than treated as a preprocessing checkbox.

Apply the rule as a control-mapping procedure

Use the following sequence before choosing hardware or signing an inference contract.

  1. Draw every flow that can carry ePHI. Include prompts, retrieved passages, outputs, tool arguments, caches, evaluation datasets, logs, backups, and support bundles.

  2. Mark the system and organization responsible at each hop. Distinguish ownership from operation. A server in your rack can still be administered by an outside party.

  3. Assign an accountable identity to each human and workload. Remove shared credentials where actions must be attributable to different requesters.

  4. Attach authorization decisions to the protected object. For RAG, carry source permissions into the index and enforce them during retrieval, not only in the user interface.

  5. Define an audit event that can reconstruct an access. Then define who reviews those events, what conditions trigger investigation, and what proves that review occurred.

  6. Protect the integrity of corpora, model artifacts, prompts, policies, and deployment manifests. Use immutable identifiers and controlled promotion rather than mutable names.

  7. Encrypt and authenticate every network hop that carries ePHI. Verify where transport protection terminates and whether plaintext reappears inside the stack.

  8. Inventory every external party that can receive, maintain, transmit, or administratively access PHI. Determine business associate status from function, then verify that required agreements cover the real data use.

  9. Test incident evidence before production. An unauthorized local log access can meet the breach definition, and notification to affected individuals is required without unreasonable delay and no later than 60 calendar days after discovery when notification applies under 6 and 7.

This procedure should produce artifacts: a data-flow map, identity inventory, authorization matrix, audit schema, review record, artifact manifest, transmission map, vendor register, and incident evidence package. A rack location is not one of those artifacts.

Isometric line drawing of a cutaway LOCAL server room whose model rack connects through the wall to VECTOR, LOGS, EVAL, and SUPPORT modules, with coloured patient-document packets visibly continuing beyond the local boundary.

Self-hosting fails where the local boundary is imaginary

Self-hosting does solve a narrower problem. It can keep raw prompts away from a model API provider, remove a subcontractor, support disconnected operation, and give the operator direct control over retention and deployment artifacts. Those are valid architectural reasons to choose it.

It does not solve excessive internal privilege, unreviewed logs, corrupted retrieval metadata, shared service identities, plaintext east-west traffic, or support exports sent to an uncovered party. It also does not establish that data was properly de-identified or that model output is clinically safe.

The design breaks down when "local" is defined by the inference process while the rest of the data path is ignored. A local model backed by a remotely managed vector store, hosted log sink, external evaluation queue, or vendor-accessible support channel is a distributed system for compliance purposes.

The defensible boundary is the set of components, people, and organizations that can touch ePHI. Self-hosting is useful only when it removes a path from that set or lets the operator implement and prove a stronger control on it.