Multi-Tier Edge Triage: Optimizing Latency for Safe Clinical Agents

Joshua Broyde, Sarita A. JoshiarXiv 2026

Imagine you are building an AI assistant for a busy hospital. This assistant needs to be incredibly smart, but more importantly, it needs to be safe. It can’t leak patient data (HIPAA), it can’t give medical diagnoses it’s not qualified to give, and it needs to speak in a way a fifth-grader can understand.

The standard way to do this is to have a "judge" LLM in the cloud check every single message. But there’s a catch: every time you ask the cloud for a safety check, you’re adding a second or more of lag. In a fast-paced clinical setting, that latency is a dealbreaker. This paper introduces a way to have your cake and eat it too: a "Multi-Tier Edge Triage" system that is lightning-fast and just as safe.

TL;DR

Clinical AI agents require rigorous safety checks that usually happen in the cloud, creating frustrating delays. This paper proves that a small, fine-tuned model living directly on the local server can handle over 90% of these checks 14x faster than a cloud LLM, matching its accuracy and only escalating the "tricky" cases to the cloud.

What Problem Does This Paper Address?

The "latency tax" of AI safety. When an AI agent operates in a high-stakes environment like healthcare, it must follow complex policies: no Protected Health Information (PHI) leaks, staying within the legal scope of practice, and maintaining a specific reading level.

Currently, developers use a "cloud judge"—a massive model like Gemini or GPT-4—to vet every interaction. This adds significant network overhead and processing time (often 0.6 to 1.6 seconds per check). If your agent needs to take five steps to answer a question, the user is left staring at a loading spinner for nearly ten seconds. The authors sought to move these "guardrails" to the "edge" (the local application server) to make them nearly instantaneous without sacrificing the high safety standards required in medicine.

Methods

The authors propose a Multi-Tier Edge Triage architecture. Think of it like a hospital ER:

  1. Tier-1 (The Triage Nurse): A compact, local encoder model (like BGE-Large, with 335 million parameters) sits directly on the application server. It processes the query in milliseconds.
  2. The Decision: If the local model is highly confident that a query is safe or unsafe, it handles it immediately.
  3. Tier-2 (The Specialist): If the query falls into an "ambiguity zone," it is escalated to a powerful cloud LLM for a final verdict.
The Multi-Tier Edge Triage architecture co-locates the Tier-1 guardrail with the application logic to eliminate network hops.

Crucially, the authors found that "off-the-shelf" small models are easily fooled by "lexical shortcuts"—they might flag a sentence just because it contains the word "illegal," even if the context is safe. To fix this, they used end-to-end representation fine-tuning, teaching the small model to actually understand the nuances of clinical policy rather than just looking for "bad words."

Datasets

The researchers didn't just use standard benchmarks; they hardened them to ensure the models weren't "cheating." * MedSafetyBench: Focused on medical ethics. * ASQ-PHI: Focused on HIPAA and privacy. * Generic HealthCorp: A new, synthetic dataset simulating a four-mandate enterprise policy (PHI, Reading Level, Brand Integrity, and Legal Scope). * Contrastive Twins: For every "unsafe" example, they generated a "safe" twin that was nearly identical in length and topic. This forced the models to rely on semantic meaning rather than superficial cues like sentence length.

Key Insights and Ideas

  • Frozen Models are Lazy: Small models used "out of the box" rely heavily on surface-level triggers. When the authors removed these "shortcuts" in their hardened datasets, the performance of frozen models plummeted.
  • Fine-Tuning is the Great Equalizer: Once fine-tuned, a 335M-parameter model (BGE-Large) achieved 98.9% accuracy, essentially matching the 99.2% accuracy of a massive cloud-based Gemini model.
  • Errors are Policy-Specific: The local model became a "perfect student" for PHI and brand violations (100% recall) but struggled slightly more with stylistic checks like "reading level." This insight allows developers to tune exactly when to escalate to the cloud.
Comparison of shortcut vulnerability: frozen models (yellow/green) struggle when "trigger words" are removed, while cloud models (blue) and fine-tuned models hold steady.

Key Results

  • Speed: The local Tier-1 model executed in 39.0 ms, which is over 14x faster than the cloud LLM (568.8 ms).
  • Efficiency: By using a two-threshold system, the architecture only had to escalate 1.9% to 6.2% of prompts to the cloud.
  • Safety: The combined system (Tier-1 + Tier-2) achieved an impressive 99.4% to 99.7% accuracy with zero false positives (meaning it didn't accidentally block safe, helpful medical information).

Limitations and Future Work

  • Synthetic Data: The benchmarks were largely synthetic. While they were "hardened" to be difficult, they may not capture the full, messy unpredictability of real-world patient-doctor transcripts.
  • Hardware Dependence: The latency gains were measured on specific hardware (Apple M5 Pro). Performance will vary based on the server infrastructure.
  • Future Directions: The authors suggest exploring even smaller models or "ensembles" of policy-specific classifiers to see if they can squeeze out even more speed without losing that critical "specialist" level of understanding.

Reference: Broyde, J., & Joshi, S. A. (2026). Multi-Tier Edge Triage: Optimizing Latency for Safe Clinical Agents. Preprint.

Summary updated

Abstract

Deploying generative AI agents in enterprise clinical workflows requires enforcing multi-dimensional safety and compliance policies--preventing HIPAA Protected Health Information (PHI) exposure, maintaining clinical scope-of-practice boundaries, ensuring patient-appropriate reading comprehension, and preserving brand integrity--under interactive latency constraints. Synchronous outbound calls to cloud Large Language Model (LLM) judges add substantial network and decoding overhead onto the critical response path. We present Multi-Tier Edge Triage, a safety screening architecture that co-locates a compact Tier-1 sequence classifier on the clinical agent's host server, resolving clear queries in-process without a network round-trip and escalating only ambiguous queries to a Tier-2 cloud LLM judge. To evaluate Tier-1 encoders without length or unigram shortcuts, we construct four length-matched contrastive twin benchmarks seeded from MedSafetyBench, ASQ-PHI, and a synthetic four-mandate clinical assistant policy (Generic HealthCorp). While frozen local encoders match cloud models on structured PHI detection (>= 98.3% accuracy in <= 23.5 ms), they degrade markedly on semantic safety and symmetric-blocklist prompts. However, end-to-end representation fine-tuning closes the multi-policy accuracy gap: a fine-tuned 335M-parameter BGE-Large classifier achieves 98.90% out-of-fold accuracy versus 99.20% for a zero-shot cloud LLM judge (exact McNemar p = 0.648, zero shared errors), 97.8%-98.2% recall, and a 0.0%-0.4% over-refusal rate in 39.0 ms (>14x faster than cloud LLM evaluation on our benchmark host). Per-policy error analysis reveals ceiling local recall on PHI (100.0%), brand (100.0%), and clinical scope (98.7%-99.3%) violations, isolating residual errors to reading-level checks (93.3%-95.3%) and motivating targeted multi-tier escalation.
BibTeX
@misc{broyde2026multi,
  author = {Joshua Broyde and Sarita A. Joshi},
  title = {{Multi-Tier Edge Triage: Optimizing Latency for Safe Clinical Agents}},
  year = {2026},
  eprint = {2611.26914},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26914},
}
Figure