Manuscript Offprint

arXiv:2610.21300

Making every stage of medical device document assessment with large language models deterministic

Ryosuke Suzuki

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

To show that a medical device complies with regulation, experts judge whether documents and records meet each requirement and record the judgment for others to verify. For each assessment item that experts define, large language models could prepare a preliminary assessment: a label such as Satisfied or Not satisfied, a reason and quoted evidence. We sent fourteen commercial deployments of such models (seven models from three providers, through six routes) the same request repeatedly, with the deterministic sampling settings each accepted; every deployment returned differing assessments for at least one request, and in twelve the label changed. Reducing reasoning where the interface allows it did not reduce the variation, and prompts of retrieved passages removed it only for the smallest models. The same open-weight model was reproducible or not depending only on how it was served. A pipeline we built to be deterministic at every stage—text extraction and optical character recognition (OCR), chunking, embedding, indexing, retrieval and inference—returned byte-identical output at each stage across reruns, interruptions, edits, machines of one graphics processing unit (GPU) model and days, for blood glucose meter and infusion pump documents. OCR, embedding and approximate retrieval varied when their own serving was not made invariant, and outputs changed with the GPU model and with the inference engine's scheduling settings, which therefore belong in the recorded configuration. End-to-end determinism is achievable and gives a testable basis for audit and change control.

Keywords: large language models, reproducibility, determinism, medical devices, regulatory science, assessment science, quality management, validation

Introduction

Demonstrating that a medical device complies with regulation is expert work that must leave a record. Experts interpret the applicable requirements, judge whether the documents and records—technical files, test reports and data held in electronic quality management systems—meet them, and record each judgment with its evidence. The work recurs with every submission, design change and audit, on the manufacturer's side and on the side of notified bodies and regulators, and the records are kept for at least ten years [1]; a notified body must document its conformity assessment so that its conclusions "can represent objective evidence of such compliance to persons that are not themselves involved in the assessment" [1], and the US Food and Drug Administration (FDA) reviews the substance of a 510(k) (premarket notification) submission only after a completeness screening [2, 3].

Large language models (LLMs) could help with this work [4–6]. We take a limited view of their role. Deciding which regulations, standards and guidance apply, and stating what must be shown as assessment items, remains the experts' work. For each item that experts define, an LLM can prepare a preliminary assessment—a label such as Satisfied or Not satisfied, a short reason and the passages it relies on, quoted verbatim—for a qualified expert to check against the source; the judgment, and the responsibility for it, stay with the expert, whose decision, not the preliminary assessment, enters the quality record [7]. Regulators' guidance recommends exactly this form of evidence, quoted sentences that can be checked [6], and warns against the documented tendency of even expert users to over-rely on an automated suggestion [8–10].

The recorded judgment rests on what the expert was shown. A system that prepares such assessments should therefore return exactly the same assessment whenever the documents, the assessment items and its own configuration are the same. Software used in a quality management system must be validated for its intended use, including when it changes (ISO 13485:2016, subclause 4.1.6, incorporated by 21 CFR 820.10(a); 11–14), and electronic-record systems for “accuracy, reliability, consistent intended performance, and the ability to discern invalid or altered records” [15, §11.10(a)]; with a system whose output varies from run to run, a single difference observed after a change—to a document, an item, a model or the hardware—cannot be told from ordinary variation without repeated runs, and the individual assessments the change affects cannot be identified. An LLM pipeline does not give the same output for the same input by construction: floating-point reductions depend on how requests are batched [16], embeddings and retrieval drift with precision and with insertions [17], a commercial deployment runs on hardware and software the user cannot see [18], and in a recent preprint covering five API providers, repeated outputs at temperature zero were character-identical 22% of the time on average for the two models evaluated on every task [19]. Reproducibility is a separate axis from accuracy, and this paper concerns only reproducibility.

Deterministic inference is now available: batch-invariant kernels and, more recently, verified and scheduling-based engines make a model's output independent of how requests are batched [16, 20–23]. What has not been tested is whether a complete assessment pipeline, in which inference is one stage among several, can be made reproducible, and what a user of a commercial deployment actually observes in the fields of an assessment record. We asked whether preliminary assessments of public FDA documents can be produced again, byte for byte, and found three things. Commercial LLM deployments did not reproduce their assessments at the deterministic sampling settings they accepted: the quoted evidence changed more often than the label, one model varied differently through different routes, another changed labels only between days, and reducing reasoning did not help. For the open-weight models we served, reproducibility was a property of how the model was served. A pipeline deterministic from text extraction to inference reproduced every intermediate result and output across repetition, reordering, concurrency, interruption, corpus edits, machines and days for two device types, provided the GPU model and the inference engine's configuration are held fixed and recorded; left to their defaults, OCR, embedding and approximate retrieval were themselves sources of variation. We argue that, where judgments recorded in a quality system rest on LLM-prepared preliminary assessments, byte-level reproducibility of the entire pipeline is a strong and testable engineering condition for auditing those judgments and controlling change. It is not a regulatory requirement, and it is not sufficient for validation.

References (49)