Skip to main content

Researchers published 54,518 AI clinical notes. Clinicians can still spot them

Ilustrační obrázek
A three-billion-parameter Llama model, tuned with QLoRA on a single virtual machine, produced 100,000 clinical notes in Portuguese. After filtering, 54,518 of them were published as LusoClin, a free corpus for medical search research. The authors say patient privacy is preserved. In their own human evaluation, annotators could still tell the notes were machine-written.

What the Porto team released

LusoClin comes from the University of Porto and INESC TEC. The preprint went up on arXiv on 17 November 2026 as 2611.23454, and the authors published the corpus together with the generation prompts, the clinical entity annotations and the human evaluation data. The PDF version describes the full pipeline.

The build has four stages. Clinical text is pre-processed first. A Llama-3.2-3B-Instruct model is then fine-tuned on that material with Quantized Low-Rank Adaptation, the technique that keeps a small model's fine-tune inside a single GPU's memory. Prompts drive generation of four note types: admission notes, ambulatory notes, discharge summaries and nursing notes. A BERT-based tagger finally labels clinical entities in every note, so the corpus can be indexed semantically and not only by keyword.

Four note types is a deliberate choice. A retrieval system that only ever sees discharge summaries learns to match discharge summaries. Nursing notes form the largest block in the final set, and they carry the running observation text that hospital search tools usually ignore.

The filtering funnel in numbers

Raw generation produced 25,000 notes per category, 100,000 in total. The run took 17 days, 20 hours, 50 minutes and 44 seconds on the fine-tuning VM. That is about 428.9 hours, or roughly 233 notes per hour: about four notes per minute, sustained for well over two weeks.

Generated100,000
Removed as non-Portuguese6
Removed as generic or prompt echo2,362
Removed in additional rule-based filtering (not itemised)1,430
Remaining after rule-based filtering96,202
Remaining after the PT-PT dialect filter54,518

The paper reports 96,202 as the total after rule-based filtering. The 1,430 removal is the arithmetic difference between that total and the itemised filters above; the preprint does not break it down further.

The final corpus breaks down into 14,253 admission notes, 13,561 ambulatory notes, 9,032 discharge summaries and 17,672 nursing notes. Those 54,518 notes are 56.7% of the 96,202 that survived the rules, which matches the roughly 57% PT-PT share the authors report. The dialect classifier removed more text than every other filter combined.

On repetition, the authors measured an average pairwise sentence cosine similarity of 0.091. The SemClinBr reference corpus scores 0.137 on the same metric, and a lower number means less repeated phrasing between notes.

A hosted API would have billed this run differently. Assume a 500-token note and a 150-token prompt. At an illustrative frontier rate of about $2 per million input tokens and $10 per million output tokens, 100,000 notes come to about $30 of input and $500 of output, so roughly $530. At a lower illustrative rate of about $1.36 per million input and $4.18 per million output tokens, the same job lands near $20 plus $209, or about $230. Local generation swaps those bills for GPU time, and the paper does not say what the virtual machine cost.

European Portuguese versus Brazilian Portuguese

Clinical NLP in Portuguese has leaned on Brazilian corpora, and SemClinBr is the benchmark the authors compare against. PT-PT differs in vocabulary and in hospital convention: Portuguese records talk about utente and internamento, Brazilian ones about paciente and internação. Entity lists and search indexes built for pt-BR miss those forms, and a Portuguese hospital that pastes its own notes into a Brazilian-tuned system gets quietly worse results.

The rejection rate tells its own story. A 3B model trained mostly on web Portuguese drifted toward Brazilian usage in close to half of its output, even after fine-tuning on Portuguese clinical text. That is a data problem more than a model problem, and it is the reason a corpus like this has to be filtered by dialect rather than by language tag.

Privacy, the GDPR and the AI Act

Synthetic records are not anonymous by default. The GDPR test is whether a person can be identified directly or indirectly, and the European Data Protection Board made the same point about model outputs in its Opinion 28/2024: status depends on the case, not on the label. A hospital that builds a search tool on LusoClin and on its own notes still needs its own assessment, and the fine-tuned generator is itself a compressed copy of patterns from the source data.

Article 50 of the AI Act has applied since 2 August 2026. Providers of systems that generate synthetic content must tell users they are dealing with a machine and mark outputs in a machine-readable format. A corpus downloaded from a repository is not a deployed chatbot, but a product built on top of these notes inherits the marking duty, and the training text being fake does not remove it.

Running this on a 16 GB card

A 3B model quantised to 4 bits plus LoRA adapters is the sort of job a single consumer GPU can hold. Our AI Arena rig runs a 16 GB RTX 5060 Ti, and that class of card should have room for the weights, the adapter and a small batch. We have not run this pipeline ourselves, and the paper does not report VRAM use, so treat that as an expectation and not a measurement.

About four notes per minute is slow for a 3B model. Serving the same architecture through a modern inference server normally returns a short note much faster, which suggests the 17-day run was single-stream and not tuned for throughput. For a team that builds a corpus once, that is a one-off cost. For a hospital that wants to synthesise notes on demand inside its own network, the serving stack matters as much as the model. Keeping a 3B model on premises in Portugal also sidesteps shipping records to a US API, which is the reason this kind of work gets funded in the EU at all.

What the corpus does not fix

Medical inconsistencies persist in the generated notes, and the authors say so. Human evaluators could distinguish synthetic text from real clinical notes. For retrieval benchmarking that is tolerable, since the task is matching queries to documents. For training a clinical decision model it matters more, because an inconsistent note teaches an inconsistent pattern.

Scope is narrow in other ways too. One language variant, four note types, text only, no structured fields and no imaging reports. LusoClin is a starting point for PT-PT medical search research, released at 54,518 notes with its prompts and its evaluation data attached, and the authors' own human study records that the synthetic notes remain recognisable as synthetic.

Do I need permission to use LusoClin?

The paper points to a public repository where the dataset, prompts and annotations are hosted. Check the licence stated there before commercial use, since the arXiv preprint does not settle the terms, and the generator itself derives from Llama 3.2 under Meta's community licence.

Can these notes replace real records for testing a hospital search tool?

For retrieval and entity-indexing tests, partly yes, and that is the stated purpose. Because medical inconsistencies remain and evaluators can identify the text as synthetic, a tool tuned only on this corpus should still be validated on a small set of real, properly governed records.

Is the corpus usable for Brazilian Portuguese projects?

The authors filtered deliberately for PT-PT, so a large share of the originally generated text was dropped for dialect reasons. Brazilian teams are better served by SemClinBr and its successors, which the paper uses as its comparison baseline.

Discussion

No comments yet — be the first to share your thoughts.
X

Don't miss out!

Subscribe for the latest news and updates.