Elamur Research

Learning structures of the French clinical language:development and validation of word embedding models using 21 million clinical reports from electronic health records

Paper · 2022 · Basile Dura, Charline Jean, Xavier Tannier et al.

Summary

Hospital reports can contain details about a patient’s care that are hard to find in the structured fields of an electronic health record. Finding those details across a large collection requires software that can recognize how clinicians write about drugs, doses and other medical concepts. This study asks whether that software works better when its underlying word embeddings, numerical representations of words in context, are learned from hospital reports. The authors use 21M reports from the Greater Paris University Hospitals, or APHP, and start from the design of CamemBERT, which was originally trained on general-purpose French web text.

The authors compare the original CamemBERT-base with two versions adapted to hospital language. EDS-fine-tuned continues training from CamemBERT’s existing weights. EDS-from-scratch starts with random weights and learns its own way of breaking text into tokens. The authors then train each version to perform named entity recognition, the task of locating and labeling relevant spans of text. On APMed, a benchmark for medication information in APHP reports, clinical adaptation raised the average micro-averaged F1 score, a measure that balances missed entities against incorrect predictions, by 3 percentage points to 91%. Both adapted versions improved significantly on the original. Their performance difference on APMed was statistically inconclusive.

The results were more modest outside the hospital setting. The authors report that EDS-fine-tuned performed comparably to CamemBERT-base on QUAERO, which contains drug information and research article titles. EDS-fine-tuned also performed better than EDS-from-scratch overall on QUAERO. The new tokenizer did represent hospital reports more compactly. Its median was 1500 tokens per report, compared with 1724 for the original tokenizer. The study leaves open whether that saving speeds up processing in practice.

The comparison also matters for hospitals deciding how much text and computing time they need. A version initialized from CamemBERT and adapted on 100K reports achieved APMed performance similar to versions trained with the full 21M-report collection. On the reported hardware, each continued-training version took 2 days and the from-scratch run took 25 days. The small-corpus experiment held the number of training steps fixed, so it gives direct evidence that fewer distinct reports can suffice in this setting. How much earlier such a run could stop is a separate question.

Deep dive: Learning structures of the French clinical language:development and validation of word embedding models using 21 million clinical reports from electronic health records

A study of whether adapting CamemBERT to 21 million French hospital reports improves medical entity recognition and justifies training from scratch. · about 31 minutes to read

The problem and its context

What a hospital report adds to a record

Electronic health records contain information in forms that differ in how readily they can be searched and analyzed. A structured field gives a program a defined place to look for a value. A written report gives a clinician room to describe a care episode in the terms that fit the situation. The paper cites an earlier estimate that up to 80% of the entities identified in clinical reports are absent from other sources of record information. That estimate motivates a closer look at narrative text. It describes earlier research and does not measure the proportion of information missing from structured fields in the APHP collection.

The distinction matters whenever a research question depends on information recorded during care. The authors mention identifying potential adverse reactions to drugs, determining eligibility for clinical trials and finding temporal associations. These are reasons to work with narrative records in the first place. Each depends on being able to find relevant information before interpreting or linking it. The study isolates part of that work. It evaluates whether an adapted text representation helps a system locate and label medical expressions in written material, with particular attention to medication information in APHP reports.

A drug-related benchmark is a useful example of the difference between reading and searching a report. An extraction system needs to identify the portion of text that refers to a drug and distinguish it from text recording how the drug is used. The APMed task covers drug mentions and their posology, the information about how a medication is to be taken or administered. The way these details appear in a care report is part of what the language system must handle. A representation trained on ordinary web documents may have encountered medical words while still having relatively little exposure to the context in which hospital staff use them.

Clinical information extraction and the use of the extracted information are different stages of a study. A system may identify a medication span correctly while the surrounding report still requires interpretation for an adverse reaction study or an eligibility decision. Conversely, if it misses a span, that information may be unavailable to later processing. This makes recognition a sensible part of the larger problem to investigate. The authors evaluate a defined language task with human-labeled examples, which gives them a way to measure the effect of clinical pretraining directly at the point where text becomes structured information.

From fixed word vectors to contextual representations

The paper places the work within a transition in natural language processing. Earlier approaches relied on rules that specified what to look for in text. The authors describe a subsequent shift towards machine learning, in which the system learns patterns from examples. For the approaches considered here, a central question is how the words in a report become numbers that a learning system can use. The aim is for the resulting vectors to carry information about meaning and about the ways words are used together.

The authors cite GloVe, Word2Vec and fastText as examples of methods that learn static representations. In a static representation, the same vocabulary item has a fixed vector across its occurrences. The context in which the system encounters the item can still be processed elsewhere, but the initial vector for that item stays the same. The paper contrasts this with approaches such as ELMo and XLNet, which incorporate the context of an occurrence into its representation.

BERT is the starting point for the design used in the study. It uses a Transformer to build representations whose values depend on the surrounding input. A classifier using those representations can therefore receive different numerical descriptions of a word in different passages. The authors cite BERT’s performance across language tasks as the reason for using this family of methods. For French, the paper points to CamemBERT and FlauBERT as examples trained on general-purpose documents collected from the web.

Training a language model on a broad corpus gives it a starting point that can be reused on later tasks. In this study, the authors distinguish training on text from training on labeled examples of a specific prediction problem. A hospital warehouse can supply the text for the first stage, and researchers can supply labels for the second. The arrangement matters because a large collection of reports can support a shared starting point while individual projects address different questions. The paper evaluates that arrangement with entity recognition as the downstream task.

Why clinical text might warrant additional training

The study’s premise is that a shared language and a shared subject area do not guarantee a shared style of writing. The authors identify vocabulary and syntax as ways in which specialty writing can differ from general text. A hospital report also serves a different purpose from a web document or a research title. Adapting a system on reports gives it repeated exposure to the words and surrounding expressions that appear in this particular kind of writing. Whether that exposure proves useful depends on the task used to measure it.

The authors cite BioBERT and Clinical BERT as earlier evidence that training on specialty text can improve performance. Those precedents motivate testing an adaptation on French clinical reports. They also frame a more specific practical question. A hospital can continue training an existing French system on local material or devote a separate training run to learning from local material from the beginning. The latter option lets the authors design the vocabulary and initial representation around clinical text. Continuing training preserves the parameters already learned from a more general collection.

The paper also cites the original CamemBERT study, which found that a carefully selected subset containing under 10% of the original training data could yield comparable results. That prior finding motivates a question about how much hospital text is necessary, alongside the question about initialization. A corpus with many reports offers breadth, but the number of available reports and the amount of useful exposure needed to improve entity recognition are different quantities. The authors investigate both the number of distinct documents and the number of optimization steps, using different comparisons to address them.

The resulting study concerns the value of clinical training under concrete conditions. The authors need a benchmark close to the reports they train on to see whether domain adaptation helps where it is intended to help. They also need medical text from other settings to see whether the adapted system still performs on material with different origins and purposes. APMed represents the hospital setting. QUAERO supplies drug information from the European Medicines Agency and titles from MEDLINE. Together, these benchmarks let the authors examine local specialization and transfer beyond the local reporting environment.

The method, step by step

From the warehouse to a clinical training collection

The authors draw their training material from the Entrepôt des Données de Santé, or EDS, the clinical data warehouse of APHP. The warehouse contains electronic health record data from 39 hospitals in Greater Paris, with records concerning 11M patients and 80M clinical text reports. These figures describe the warehouse. The study uses a selected collection of reports dated from August 2017 to July 2021. Selection matters because the clinical language encountered during training comes from the reports that remain after the authors apply their date range, privacy rules and text filters.

The workflow begins with choosing which reports can be used and ends with assessing what their text helps a classifier learn. The original CamemBERT-base supplies a comparison at the last stage. It goes through the downstream entity-recognition procedure while skipping the clinical pretraining stages in the middle.

From hospital reports to entity recognition

The steps in order.

From hospital reports to entity recognitionStep 1: Select eligible reports from the clinical warehouse1. Select eligible reports from the clinical warehouseStep 2: Pseudonymize, filter, resample and clean reports2. Pseudonymize, filter, resample and clean reportsStep 3: Use general or clinical tokenization3. Use general or clinical tokenizationStep 4: Divide tokenized reports into training sequences4. Divide tokenized reports into training sequencesStep 5: Continue CamemBERT training or start from random weights5. Continue CamemBERT training or start from random weightsStep 6: Check performance on held-out clinical text6. Check performance on held-out clinical textStep 7: Train and evaluate entity classifiers7. Train and evaluate entity classifiers

The study was authorized by the warehouse’s institutional review board. The authors also describe the warehouse’s authorization by the French data protection authority and the exclusion of patients who objected to the reuse of their data. Reports were pseudonymized by replacing directly identifying expressions with substitute entries. This type of processing preserves text around the replaced items, so those passages can remain part of the collection. The authors followed the RECORD reporting guideline and included its checklist in the appendix.

Reports of less than 20 characters were removed. The authors also resampled the corpus to limit the influence of overrepresented report types, citing prescriptions, consultation reports and imaging reports as examples. A data warehouse reflects the documents produced in care, so simply taking every available text would expose training to the mixture of report types as they happen to occur in the warehouse. Resampling makes that mixture a design choice. The appendix describes the use of broader categories that group similar types and depicts their distribution before and after hierarchical sampling.

The team then used EDS-NLP, a package developed at APHP and built on spaCy, to identify and remove recurring administrative text. The appendix gives notices about patients’ rights over the use of their data as an example. Such notices belong in the original documents and may appear across a great many of them. For language learning, their repetition can give administrative phrasing disproportionate weight. Removing those passages changes what the system sees often and leaves the surrounding clinical report available for training.

The authors kept the cleaning conservative. They acknowledge that repeated content can take forms other than the administrative passages their procedure targets. The corpus therefore reflects different choices about repeated language. Document types were resampled to moderate their representation, and selected text that appeared across many reports was removed. Other possible duplicates were left in place. Both clinically meaningful recurrence and incidental repetition can persist in such a collection, which is relevant when later comparing the effect of different numbers of reports.

How a long report becomes an input sequence

Tokenization divides a passage into pieces that the system can process. A token can correspond to a word or to a smaller piece of a word. The distinction matters in specialty writing because different tokenizers can divide the same term differently. If one vocabulary lets the tokenizer use fewer pieces for expressions common in hospital reports, it will represent the same document with fewer positions. The paper examines this property across reports by comparing the token counts from the original CamemBERT tokenizer and the clinical tokenizer.

Tokenization precedes the contextual calculation. The tokenizer decides which pieces enter the system and in what order. The Transformer then uses the surrounding pieces in the input sequence to create contextual representations. Learning a clinical tokenizer changes the input units. Continuing to train the network changes how it interprets and combines those units. The from-scratch approach allows both changes together. The continued-training approach works with the original input vocabulary and adapts the network’s weights to the clinical material.

Most reports exceeded the architecture’s 512-token input limit, according to the paper. The authors divided documents into sequences of 128 tokens for training. A report is consequently a source of sequences, whereas a sequence is the text span presented to the network at a time. That distinction helps explain why the study uses several measures of training scale. A document count describes how much source material is available. A token count describes how compactly the text is represented. An optimization step counts an update during training.

The choice of input length also specifies the scale at which contextual training takes place. A long report may contain related statements separated by more text than fits in a sequence. The training design gives the network repeated shorter views of report language. Within a sequence the representation can draw on the surrounding tokens, and material in another sequence is outside that immediate context. This is relevant to the scope of the evaluation, which concerns the recognition of annotated spans and does not test whether the system can relate events across an entire hospital report.

What the two training routes share and change

Every comparison uses the CamemBERT-base architecture. EDS-fine-tuned begins with the original CamemBERT-base weights, the learned numerical values that govern its internal calculations. The authors continue training those weights on the processed reports. In this part of the paper, fine-tuning means clinical adaptation of a general system. It occurs before the authors use any entity labels to train the final classifier.

EDS-from-scratch begins with randomly initialized weights and uses a tokenizer learned for the clinical domain. The authors follow CamemBERT’s training procedure and run the training for 12 epochs. An epoch represents a pass through the training material. The paper says the run uses more steps to compensate for its smaller batch size. A batch is the group of training inputs used for an update, so epochs and steps describe different aspects of the run. The from-scratch training schedule reflects the authors’ aim of learning a representation without having weights already trained on general French.

The main EDS-fine-tuned version trains for one epoch on the full collection. For the corpus-size comparison, the authors train versions using 100K, 300K, 1M, 3M, 10M and 21M documents. The smaller collections are drawn uniformly from the training dataset. This sampling comes after the curation of the main corpus and addresses a different question from the resampling by document type. Report-type resampling defines the material available to the study, while uniform sampling defines the amount of that material available to each continued-training run.

Every version in the corpus-size comparison receives the same number of training steps, corresponding to one epoch on 21M documents. Holding that budget fixed helps distinguish the effect of having fewer distinct documents from the effect of simply allowing fewer weight updates. It also changes the meaning of “training on 100K reports.” The number describes the size of the pool from which the system receives its training input. It does not say that the system makes a single pass through that pool or that it performs fewer updates than the full-corpus version. Interpretations about access to documents can therefore be made more directly than interpretations about savings in training time.

The clinical pretraining data were split into 19.6M training documents and 1M validation documents. Those figures refer to the partition used for training and validation. The authors also use 21M as the label for the full-corpus condition and to describe the scale of their collection. The report count, the training split and the validation split are useful for different comparisons. In particular, the clinical validation material is reserved for assessing how training carries over to held-out text. The downstream benchmarks have a separate purpose and contain entity labels.

The implementation uses the Hugging Face Transformers library, PyTorch and PyTorch Lightning. The authors identify their dataset-building and training code as an APHP release under a 3-Clause BSD licence and say it is archived through Zenodo. Access to the underlying reports follows the warehouse’s review process. The appendix also makes access to the trained weights and training data subject to institutional review. This means the study describes an open implementation alongside controlled access to the material needed to repeat the clinical training.

Validation before using entity labels

The paper uses the term intrinsic validation for checks on the representations and their training before asking whether they are useful for a separate task. One such check is perplexity on held-out clinical text. Perplexity reflects how difficult the text is for the trained system to predict under its language objective. The authors also track validation loss, the objective’s error on held-out input. These measures can show whether training continues to improve the system’s handling of reports from the selected collection.

The tokenizer comparison answers a separate intrinsic question. The authors tokenize clinical documents using the original and clinical vocabularies and compare the distributions of resulting lengths. A shift towards shorter sequences means fewer token positions for the same reports. This is evidence about how the vocabulary divides text. It does not depend on the entity classifier correctly identifying a medication span. The subsequent benchmark comparison provides that second kind of evidence.

Keeping these checks separate allows the authors to examine different outcomes of pretraining. A system can become better at the language-training objective as optimization continues. A vocabulary can also become a more compact way to express the reports. The downstream evaluation asks whether either adaptation makes the resulting representations more useful under the task’s labeling rules. Improvement on the first kinds of measurements gives a reason to inspect the last one closely, because each measurement describes a different part of the system.

From contextual vectors to labeled spans

The paper calls the downstream procedure extrinsic validation. It asks how well the pretrained representations support a task with its own labeled examples. APMed supplies APHP reports annotated for drug-related information. QUAERO supplies French texts annotated for medical entities, with EMEA and MEDLINE representing different document sources. Every task is framed as predicting a label for each token. In this way, the experiment compares alternative starting representations through a common type of prediction.

The labels use IOB2 notation. A beginning label marks the start of an entity, an inside label marks a continuation, and an outside label marks text beyond an annotated entity. Beginning and inside labels also convey the entity type. This scheme allows a series of token predictions to express the start, extent and category of a span. Consider the medication setting. A report can contain an expression naming a drug and a separate expression giving its posology. The labeling scheme gives the classifier a way to mark where an expression begins, which tokens belong to it and which category it receives.

For each task the authors add the same kind of classification head, the part of the network that turns contextual representations into predictions. A fully connected hidden layer combines the values in a token’s representation. A ReLU activation allows positive outputs from that layer to pass through while suppressing negative ones. A fully connected output layer then supplies scores for the labels. The authors train the underlying network as well as the head during downstream fine-tuning. Accordingly, the experiment measures how well each starting point adapts when the entity labels are available.

This second use of fine-tuning applies to all compared systems, including CamemBERT-base. The baseline starts with general French weights and then learns the annotated task. EDS-fine-tuned starts the same task after additional clinical language training. EDS-from-scratch starts it after learning from clinical reports with the new tokenizer. The difference under study is the preparation each system receives before supervised training. Keeping the task architecture consistent makes the starting point easier to compare, even though the from-scratch route differs in several aspects of that preparation.

Scoring the extracted entities

The authors use seqeval to calculate micro-averaged F1. Precision describes the share of predicted entities that are correct. Recall describes the share of annotated entities that the system recovers. F1 combines these measures so that a system needs to control false predictions and missed annotations to score well. Micro-averaging pools the relevant counts across entity categories before calculating the score. As a result, categories with more instances can contribute more to the overall result than categories that appear rarely.

There is a practical distinction between the classifier’s immediate output and the benchmark score. The classifier emits token labels, which are used to form entity spans. Precision and recall then judge the extracted entities. An incorrect boundary can matter even if the system has recognized several tokens associated with the right concept. This makes the metric relevant to information extraction, where the span is the part of the report that a later process would receive.

The authors repeat the downstream experiments ten times with different random initializations to characterize variation across runs. For the significance comparisons, they use the Wilcoxon signed-rank test, a paired test that considers the direction and ranked magnitude of differences. The tests examine differences in either direction. The authors use the following criterion for statistical significance.

p < 0.05

Here, p is the probability, under the test’s null hypothesis, of obtaining a result at least as extreme as the observed result. < means “less than,” and 0.05 is the threshold chosen for the analysis. The criterion says how the authors classify a test result. The F1 scores and their reported change express the size of a performance difference.

Experiments and results

The benchmarks and the reference system

The main experiments compare EDS-fine-tuned and EDS-from-scratch with the original CamemBERT-base. The baseline is trained on the annotated tasks using the same downstream architecture. Its scores indicate what the general French starting point can do once it has examples of the entities it is expected to extract. A comparison with an adapted version therefore addresses how much the additional clinical training contributes beyond what the baseline learns from those same task labels.

APMed is the closest benchmark to the clinical pretraining collection in institutional origin. Its reports were produced at APHP, and its annotations concern medication information. The resource covers the detection and normalization of drug mentions with posology. In this paper, the benchmark enters the experiment as a span-labeling problem and is scored by micro-averaged F1. That setup makes the evidence about what the entity classifier extracts. It gives local clinical language a direct opportunity to help, because both the unlabeled reports and the labeled task come from APHP.

QUAERO broadens the kinds of medical writing covered by the evaluation. Its EMEA portion contains long texts about marketed medications, originating from the European Medicines Agency. Its MEDLINE portion consists of research article titles. Both use clinical entity categories drawn from the UMLS Semantic Groups. The categories include, among others, anatomy, chemicals and drugs, disorders and procedures. The collection is wider in scope than medication extraction alone, while its two document types differ in how much surrounding text an entity mention has available.

These benchmarks answer related but distinct questions. Matching the report source makes APMed informative about adaptation for APHP applications. QUAERO shows how the adapted representations perform on medical material outside that report environment. Differences between them can reflect the kind of text, the source of the documents and the range of labels. The paper’s interpretation consequently rests on a pattern across benchmarks, rather than on a single score treated as a measure of all French medical language.

APMed improves after clinical adaptation

On APMed, the authors report an increase of 3 percentage points in average micro-averaged F1, reaching 91% with clinical pretraining. Both EDS versions improve significantly in their comparisons with CamemBERT-base. The largest p-value reported for these improvements is 4 · 10⁻³. The gain is observed after supervised training on the task, so it concerns the effect of the clinically trained starting point on the eventual extractor. It shows that annotated APMed examples and general French training alone leave room for improvement through exposure to the reports.

The comparison between the adapted systems gives a different answer. The paper reports a p-value of 0.1 for EDS-fine-tuned versus EDS-from-scratch on APMed. Under the chosen threshold, the observed difference was statistically inconclusive. The authors therefore found clear evidence for clinical adaptation relative to the general baseline, and much weaker evidence for spending the additional effort to start over. The latter comparison matters because both adaptations offer the target classifier exposure to APHP language but differ substantially in how they obtain it.

F1 gives the headline result a specific scope. The reported change combines precision and recall across the labeled entities. It does not establish whether the extra clinical training recovered more previously missed spans, reduced false predictions or improved both. Nor does the aggregate score identify where the additional correct predictions fall among the medication labels. The gain is a result for micro-averaged extraction performance on the benchmark. A reader considering a specific use of posology information would need a more focused breakdown to judge that use.

QUAERO checks transfer beyond hospital reports

On QUAERO the authors characterize EDS-fine-tuned as comparable to CamemBERT-base. The large local improvement observed on APMed does not recur as a comparable headline gain across the external material. The paper also reports that EDS-fine-tuned outperformed EDS-from-scratch overall on QUAERO, with a p-value of 4 · 10⁻³. The reference point matters in reading this result. The significant comparison is between the two clinical versions, while the comparison with the general French baseline is described as comparable for the continued-training version.

The authors suggest that starting from CamemBERT may preserve general language knowledge that remains useful outside clinical reports. The QUAERO result fits that explanation: continued training gives the network experience with hospital language while leaving it able to begin the external task with parameters learned from general French. The comparison establishes the ordering of the trained systems under the QUAERO evaluation. It does not trace the contribution of particular parameters or identify which features of general-text training account for the difference.

The paper makes a separate observation about MEDLINE. The tested BERT-based approaches performed much worse on its titles than the leading rule-based systems from the QUAERO evaluation. A title offers relatively little surrounding text compared with a long document from EMEA. The authors propose that this could hinder systems that depend on context and say the explanation needs further validation. The observation is useful because a benchmark can favor different approaches according to its document format, even within a shared language and subject area.

The clinical tokenizer produces shorter inputs

On the hospital reports, the original CamemBERT tokenizer required a median of 1724 tokens per document. The clinical tokenizer required a median of 1500. This comparison uses the document as its unit. It shows what happens when an alternative vocabulary is applied to the same kind of clinical text, before the trained network assigns any entity labels. The paper interprets the shorter representation as evidence that the clinical tokenizer is better suited to the vocabulary it encounters in the reports.

Median tokens per APHP report by tokenizer

The clinical tokenizer represents a typical report with fewer tokens.

Median tokens per APHP report by tokenizerOriginal CamemBERT tokenizer: 1724Original CamemBERT tokenizer1724EDS clinical tokenizer (this paper): 1500EDS clinical tokenizer (this paper)1500
The numbers
System or settingtokens per report
Original CamemBERT tokenizer1724
EDS clinical tokenizer (this paper)1500

The median describes the middle of the document-length distribution, so the result concerns the typical report in the paper’s comparison. It does not identify which kinds of words became shorter to encode or whether the savings were distributed evenly across prescriptions, consultations and imaging reports. Since training uses 128-token sequences, representing the same source text with fewer tokens changes how much of the text may fit in a sequence. The timing consequences depend on how reports are processed at inference, which the study leaves for future investigation.

The intrinsic validation also shows that loss on unseen clinical text continued to decrease at the end of training. The appendix plots this evolution for EDS-from-scratch. The language-training objective was therefore still improving on held-out material when the run ended. That outcome can coexist with small downstream differences between training routes. A language objective measures performance across the text it sees, while APMed measures the extraction of particular spans. The paper evaluates both to distinguish progress in learning report language from measurable gains on the annotated task.

Training time and emissions estimates

Using eight Tesla V100 GPUs, it took 25 days to train EDS-from-scratch for 12 epochs on 21 million reports. Each version that continued from CamemBERT took 2 days on the same setup. The shared hardware makes the time comparison directly interpretable for the runs described in the paper. The runs also had different training schedules, so the comparison conveys the cost of the actual alternatives evaluated. It does not estimate what time would be required if both alternatives were given an identical schedule.

Clinical pretraining time on the reported APHP hardware

Continuing from CamemBERT took less time than starting from random weights.

Clinical pretraining time on the reported APHP hardwareEDS-from-scratch: 25EDS-from-scratch25EDS-fine-tuned per version (this paper): 2EDS-fine-tuned per version (this paper)2
The numbers
System or settingdays
EDS-from-scratch25
EDS-fine-tuned per version (this paper)2

The authors use the MachineLearning Impact calculator to estimate emissions. The reported figure is 10 kgCO2eq for each EDS-fine-tuned run and 110 kgCO2eq for EDS-from-scratch. The unit expresses emissions in carbon dioxide equivalents. These are estimates attached to the training runs, and the continued-training figure is per version. The study tested several such versions to examine corpus size. The estimate for an individual adaptation and the resource use of the research project are therefore different accounting questions. Quantifying the Carbon Emissions of Machine Learning

The time and emissions figures give practical context to the APMed comparison. A small difference in task score could matter if a hospital had a specific operational requirement, and the significance test cannot settle every such decision. For the experiments reported here, however, the longer training run yielded no statistically established APMed advantage over the shorter route. Its distinct measured benefit was a more compact tokenizer. Whether that benefit pays back some of the training expense during later processing is unresolved.

Performance with a smaller report collection

The paper’s corpus-size analysis finds that the version adapted on 100K reports reached APMed performance similar to versions trained using the full 21M-report collection. This result is pertinent for organizations that have a limited pool of eligible reports. It shows that a starting point trained on general French can benefit from a sample of hospital writing far smaller than the warehouse collection represented in the full-corpus condition.

The exact comparison is about the number of distinct source reports available at a fixed number of optimization steps. The paper gives the smaller condition the same training-step budget as the larger one. A hospital with a small pool can therefore read this as evidence about the feasibility of adaptation with that amount of data. Savings in optimization would require an additional result about how many updates the smaller run actually needs to reach the desired performance. The study also examines the progress of a from-scratch run, but that experiment addresses a different training route.

What the ablations show

The effect of adding clinical text

The paper does not present a component-by-component ablation. It offers comparisons of clinical pretraining routes, numbers of training documents and checkpoints, along with a direct comparison of tokenizer output. These analyses differ in how cleanly they isolate a single change. The strongest comparison for the basic domain-adaptation question is CamemBERT-base versus EDS-fine-tuned. Both start from the same general French system, and the adapted version gets additional training on the APHP corpus before both are fitted to the labeled task.

The improvement on APMed in that comparison supports the value of the clinical training stage as implemented. The adaptation involves a particular curated corpus, its distribution of document types and its amount of training. The baseline omits that added stage altogether. An equally long additional run on general French would help distinguish the value of clinical content from the effect of more optimization in general. The paper’s result shows that the proposed route works better on the local task than the original CamemBERT starting point.

The QUAERO performance qualifies the interpretation of the APMed improvement. Continued clinical training produces an advantage on the in-domain task while keeping performance comparable to the original on the external evaluation as the authors describe it. This is a check against an obvious concern with specialization, since a representation might become more useful locally while becoming less useful for other forms of medical language. The evidence concerns the supplied QUAERO tasks. It gives no general measure of how well the adapted system retains other abilities associated with its original web training.

What training from scratch changes together

Comparing EDS-fine-tuned with EDS-from-scratch addresses a practical choice between two complete training routes. The from-scratch version changes initial weights, tokenizer and training schedule. Any APMed difference could reflect those changes acting together. The comparison cannot isolate the contribution of random initialization or of the domain tokenizer to entity recognition. Its direct finding is that, under the authors’ schedules and with their clinical corpus, the from-scratch route fails to establish a significant advantage on the local benchmark.

The tokenizer comparison is more narrowly controlled in what it measures. For a given report, the choice of tokenizer determines the length of the resulting token sequence. The difference between the medians supports the case that the EDS vocabulary divides these reports more compactly. It says nothing directly about the behavior of a classifier receiving those tokens. Testing two tokenizers for their independent effect on F1 would require a training design that varies tokenization while addressing the fact that the network’s input representation is learned with its vocabulary.

The two results help explain why compactness and task accuracy need separate assessments. A vocabulary can reduce fragmentation across many words in a report. Some of those words may never be part of a span that the task scores. An existing tokenizer may also divide a relevant expression into pieces that the adapted network still learns to interpret in context. These are possible reasons the system with fewer tokens does not achieve a demonstrated extraction advantage. The study measures the aggregate outcomes, so it leaves the relative importance of such mechanisms open.

On QUAERO, the advantage of EDS-fine-tuned over EDS-from-scratch is consistent with the authors’ interpretation that general French training remains useful for medical text beyond hospital reports. The groups of differences between the two systems again matter. The comparison can guide a choice between those complete starting points for this benchmark. It cannot tell how a system trained only on clinical reports would have fared with the original tokenizer or under a different schedule.

How much changes when the document pool shrinks

The six corpus sizes in the continued-training comparison vary how many distinct documents can contribute to adaptation while keeping the update count fixed. This is useful when the immediate constraint is access to text. A smaller organization may be able to run a training job while having relatively few reports available for it. By starting the runs from CamemBERT-base and drawing their material from the curated corpus, the study asks whether increasing the pool of similar documents yields a clear downstream benefit under a shared budget.

The small-corpus result provides evidence that the APMed benefit can be obtained with limited breadth of exposure in this setup. It does not specify the smallest useful amount of data. The sizes examined are particular sampling conditions, and a report collection with different document types could provide different evidence to the same classifier. Uniform sampling from the EDS training material also leaves open whether some reports contribute more than others or whether selecting documents for relevance could alter the relationship between pool size and task performance.

A fixed step count permits repeated use of material in a smaller pool. This makes the experiment informative about whether diversity of distinct reports is essential to the observed gain. It leaves the tradeoff between repetitions and unique reports unresolved. In particular, the similar results for 100K and 21M reports do not establish that equal entity-recognition performance would persist if the smaller condition were also given proportionally less training. The authors’ cost discussion should be read alongside that schedule.

What the checkpoint comparison adds

The authors also follow APMed F1 at different training checkpoints of EDS-from-scratch and use CamemBERT-base without clinical pretraining as the reference. The horizontal axis is logarithmic, which allows early and later stages of the run to appear on the same figure. The caption relates the steps to exposure and estimated emissions. It reports that every 100k steps the system goes through 5.6M documents and emits roughly 4 kgCO2eq. The document figure describes exposure during training and can include material encountered again as the run progresses.

This comparison addresses progress along a training trajectory. It asks how early a system with random initialization begins to provide a useful starting point for APMed, and how its downstream performance develops with more updates. The text’s broader interpretation is that useful downstream performance appears with relatively limited training exposure. The study supplies a separate loss curve for held-out reports, reminding the reader that the training step at which the language objective still improves need not be the step at which a downstream result becomes practically useful.

The checkpoint and corpus-size comparisons should be read together without treating them as interchangeable. In the checkpoint analysis, the system has undergone a different amount of optimization and seen more of the training stream at later points. In the corpus-size analysis, the update budget for continued training stays fixed while access to distinct text varies. The first analysis informs how to think about stopping a from-scratch run. The second directly supports the paper’s claim about the feasibility of adaptation when access to clinical reports is limited.

Limitations

Limits the authors identify

The authors describe their corpus cleanup as conservative. They removed recurring administrative material and adjusted the distribution of document types, while recognizing that clinical reports can contain other forms of duplicate text. Repetition is tied to how clinical documentation is produced, so it may preserve familiar ways of writing as well as repeated passages. The study leaves those effects in the corpus. Counts of reports therefore give a useful measure of collection size while allowing for shared text across documents.

The paper measures the reduction in token count with the custom tokenizer and leaves its impact on inference time for future work. The measured training times describe the pretraining jobs. Running a trained system over new reports is a different operation, and the study supplies no timing comparison for it. A shorter token sequence is therefore evidence for more compact representation. The runtime implications depend on the way the text is segmented and processed when the system is used.

The authors also flag uncertainty about their explanation for the MEDLINE result. They suggest that short titles provide too little context for the tested approaches to work as well as the leading rule-based methods. That interpretation is plausible given the form of the input. The evaluation observes a difference across approaches and tasks without varying the length of otherwise comparable texts. The authors accordingly leave the role of context length open to further validation.

Access is another practical limit stated by the authors. The released code describes how the corpus was assembled and how the systems were trained and evaluated. The raw data, the selected training material and the weights have access conditions tied to institutional review, and external researchers seeking raw warehouse access also need a collaboration agreement. An independent reimplementation on a different corpus can test whether the approach transfers. Repeating the actual APHP experiments requires access to their clinical resources.

Limits that follow from the design

The clearest performance gain comes from an evaluation close to the pretraining setting. Both APMed and the clinical training collection are associated with APHP. The warehouse includes reports from many hospitals, but the paper does not report a comparison in which clinical recognition is evaluated at another hospital system. QUAERO serves as an external test of different medical writing. Its regulatory drug information and article titles give evidence about transfer across genres, leaving transfer to independently produced hospital reports unresolved.

APMed also represents a particular extraction problem. The labels cover medication-related expressions and their posology. The study gives useful evidence for recognizing such spans in French hospital reports. It does not test downstream clinical decisions, relations between spans, the interpretation of complete care episodes or the extraction of every kind of information mentioned in the introduction. The original motivation is therefore broader than the part of the problem measured in the experiments.

Micro-averaged F1 further limits what can be inferred from the score. Frequent categories contribute more counts to the pooled metric. A statistically significant aggregate gain can coexist with smaller gains, no gain or worse performance on individual labels. The ten repeated runs characterize variation under different random initializations. They do not capture how results vary across institutions, patient groups, report categories or changing documentation practices. The evaluation supports a claim about the benchmark and training setup, with those other sources of variation left open.

The statistical interpretation of the comparison between clinical training routes deserves particular care. A p-value of 0.1 on APMed leaves the superiority question unresolved under the authors’ threshold. The finding supports the practical observation that the more expensive route did not demonstrate a benefit in this study. Establishing that the two approaches are close enough for a specified application would require a criterion for how big a difference matters and an analysis designed for that question. The authors’ significance test addresses whether they observed evidence of a difference.

The continued-training comparison also limits what can be claimed about cost at small corpus sizes. The authors suggest that a small report collection could make adaptation feasible for smaller warehouses. Their observations support the data-access part of that argument. Since the experiments keep the number of steps constant and report the same training duration for each adapted version, they do not measure an optimization saving attributable to reducing the number of distinct reports. The strongest measured cost contrast is between continuing an existing system and the from-scratch procedure actually run.

Finally, the pretraining schedule and the use of separate tokenizers mean that the paper compares full procedures. Its conclusions depend on the choices made for CamemBERT-base, the APHP collection and the tasks. The falling validation loss shows that the endpoint remains one point on a training trajectory. The clinical tokenizer’s shorter sequences show an immediate measurable effect of changing vocabulary. The entity scores show the outcome of the complete procedures. Taken together, these observations justify a conclusion about the routes the authors tested while leaving open how different training schedules, report collections or downstream tasks would change the balance.

What came after

No subsequent study is identified that tests or extends the reported findings. The paper leaves two follow-up questions open. One is whether the shorter sequences produced by the clinical tokenizer reduce inference time. The other is whether limited context explains the performance of the tested BERT-based methods on MEDLINE titles. The experiments establish the token-count difference and the performance pattern that motivated those questions.

Cite

Cite as Basile Dura, Charline Jean, Xavier Tannier, Alice Calliger, Romain Bey, Antoine Neuraz and Remi Flicoteaux. 2022. Learning structures of the French clinical language:development and validation of word embedding models using 21 million clinical reports from electronic health records. arXiv:2207.12940.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2207.12940 · arXiv 2207.12940

@misc{dura2022learning,
  title = {{Learning structures of the French clinical language:development and validation of word embedding models using 21 million clinical reports from electronic health records}},
  author = {Basile Dura, Charline Jean, Xavier Tannier, Alice Calliger, Romain Bey, Antoine Neuraz and Remi Flicoteaux},
  year = {2022},
  doi = {10.48550/arxiv.2207.12940},
  eprint = {2207.12940},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2207.12940}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/dura-2022-learning-structures-french-clinical-language/

References

26 references, from the paper's own bibliography.

  1. Preethi Raghavan, James L. Chen, Eric Fosler-Lussier, and Albert M. Lai. How essential are unstructured clinical narratives and information fusion to clinical trial recruitment? AMIA Summits on Translational Science Proceedings, 2014:0 218–223, April 2014. ISSN 2153-4063. URL https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4333685/. OpenAlex ↗ · Scholar ↗
  2. Kory Kreimeyer, Matthew Foster, Abhishek Pandey, Nina Arya, Gwendolyn Halford, Sandra F Jones, Richard Forshee, Mark Walderhaug, and Taxiarchis Botsis. Natural language processing systems for capturing and standardizing unstructured clinical information: A systematic review. Journal of Biomedical Informatics, 73:0 14–29, September 2017. ISSN 15320464. . URL https://linkinghub.elsevier.com/retrieve/pii/S1532046417301685. OpenAlex ↗ · Scholar ↗
  3. Jeffrey Pennington, Richard Socher, and Christopher Manning. GloVe: Global Vectors for Word Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532–1543, Doha, Qatar, October 2014. Association for Computational Linguistics. . URL https://www.aclweb.org/anthology/D14-1162. our card
  4. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient Estimation of Word Representations in Vector Space. arXiv:1301.3781 [cs], September 2013. URL http://arxiv.org/abs/1301.3781. arXiv: 1301.3781. our card
  5. Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching Word Vectors with Subword Information. arXiv:1607.04606 [cs], June 2017. URL http://arxiv.org/abs/1607.04606. arXiv: 1607.04606. our card
  6. Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv:1802.05365 [cs], March 2018. URL http://arxiv.org/abs/1802.05365. arXiv: 1802.05365. our card
  7. Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. XLNet: Generalized Autoregressive Pretraining for Language Understanding. arXiv:1906.08237 [cs], January 2020. URL http://arxiv.org/abs/1906.08237. arXiv: 1906.08237. our card
  8. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv:1810.04805 [cs], May 2019. URL http://arxiv.org/abs/1810.04805. arXiv: 1810.04805. our card
  9. Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, and Didier Schwab. FlauBERT: Unsupervised Language Model Pre-training for French. arXiv:1912.05372 [cs], March 2020. URL http://arxiv.org/abs/1912.05372. arXiv: 1912.05372. our card
  10. Louis Martin, Benjamin Muller, Pedro Javier Ortiz Suárez, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah, and Benoît Sagot. CamemBERT: a Tasty French Language Model. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7203–7219, 2020. . URL http://arxiv.org/abs/1911.03894. arXiv: 1911.03894. our card
  11. Jinhyuk Lee, Wonjin Yoon, Sungdong Kim, Donghyeon Kim, Sunkyu Kim, Chan Ho So, and Jaewoo Kang. BioBERT: a pre-trained biomedical language representation model for biomedical text mining. Bioinformatics, page btz682, September 2019. ISSN 1367-4803, 1460-2059. . URL http://arxiv.org/abs/1901.08746. arXiv: 1901.08746. our card
  12. Emily Alsentzer, John R. Murphy, Willie Boag, Wei-Hung Weng, Di Jin, Tristan Naumann, and Matthew B. A. McDermott. Publicly Available Clinical BERT Embeddings. arXiv:1904.03323 [cs], June 2019. URL http://arxiv.org/abs/1904.03323. arXiv: 1904.03323. our card
  13. Eric I. Benchimol, Liam Smeeth, Astrid Guttmann, Katie Harron, David Moher, Irene Petersen, Henrik T. Sørensen, Erik von Elm, Sinéad M. Langan, and RECORD Working Committee. The REporting of studies Conducted using Observational Routinely-collected health Data (RECORD) Statement. PLOS Medicine, 120 (10):0 e1001885, October 2015. ISSN 1549-1676. . URL https://dx.plos.org/10.1371/journal.pmed.1001885. OpenAlex ↗ · Scholar ↗
  14. Nicolas Paris, Matthieu Doutreligne, Adrien Parrot, and Xavier Tannier. Désidentification de comptes-rendus hospitaliers dans une base de données OMOP. In TALMED 2019 : Symposium satellite francophone sur le traitement automatique des langues dans le domaine biomédical, Lyon, France, August 2019. URL https://hal.archives-ouvertes.fr/hal-02564721. OpenAlex ↗ · Scholar ↗
  15. Basile Dura, Perceval Wajsburt, Thomas Petit-Jean, Ariel Cohen, Charline Jean, and Romain Bey. EDS-NLP: efficient information extraction from French clinical notes, April 2022. URL https://zenodo.org/record/6444608. OpenAlex ↗ · Scholar ↗
  16. Matthew Honnibal, Ines Montani, Sofie Van Landeghem, and Adriane Boyd. spaCy: Industrial-strength Natural Language Processing in Python, 2020. URL https://github.com/explosion/spaCy. original-date: 2014-07-03T15:15:40Z. OpenAlex ↗ · Scholar ↗
  17. William Digan, Maxime Wack, Vincent Looten, Antoine Neuraz, Anita Burgun, and Bastien Rance. Evaluating the Impact of Text Duplications on a Corpus of More than 600,000 Clinical Narratives in a French Hospital. page 5. OpenAlex ↗ · Scholar ↗
  18. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Perric Cistac, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-Art Natural Language Processing, October 2020. URL https://zenodo.org/record/5553107. our card
  19. pytorch/pytorch, April 2022. URL https://github.com/pytorch/pytorch. original-date: 2016-08-13T05:26:41Z. OpenAlex ↗ · Scholar ↗
  20. William Falcon and The PyTorch Lightning team. PyTorch Lightning, March 2019. URL https://github.com/PyTorchLightning/pytorch-lightning. OpenAlex ↗ · Scholar ↗
  21. Antoine Neuraz, Ivan Lerner, William Digan, Nicolas Paris, Rosy Tsopra, Alice Rogier, David Baudoin, Kevin Bretonnel Cohen, Anita Burgun, Nicolas Garcelon, Bastien Rance, AP-HP/Universities/INSERM COVID-19 Research Collaboration, and Ap-Hp Covid Cdr Initiative. Natural Language Processing for Rapid Response to Emergent Diseases: Case Study of Calcium Channel Blockers and Hypertension in the COVID-19 Pandemic. Journal of Medical Internet Research, 220 (8):0 e20773, August 2020. . URL https://www.jmir.org/2020/8/e20773. Company: Journal of Medical Internet Research Distributor: Journal of Medical Internet Research Institution: Journal of Medical Internet Research Label: Journal of Medical Internet Research Publisher: JMIR Publications Inc., Toronto, Canada. OpenAlex ↗ · Scholar ↗
  22. Jordan Jouffroy, Sarah F Feldman, Ivan Lerner, Bastien Rance, Anita Burgun, and Antoine Neuraz. Hybrid Deep Learning for Medication-Related Information Extraction From Clinical Texts in French: MedExt Algorithm Development Study. JMIR Medical Informatics, 90 (3):0 e17934, March 2021. ISSN 2291-9694. . URL http://medinform.jmir.org/2021/3/e17934/. OpenAlex ↗ · Scholar ↗
  23. Aurélie Névéol, Cyril Grouin, Jeremy Leixa, Sophie Rosset, and Pierre Zweigenbaum. The Quaero French Medical Corpus: A Resource for Medical Entity Recognition and Normalization. page 7. OpenAlex ↗ · Scholar ↗
  24. Hiroki Nakayama. seqeval: A Python framework for sequence labeling evaluation, 2018. URL https://github.com/chakki-works/seqeval. original-date: 2018-02-15T00:02:36Z. OpenAlex ↗ · Scholar ↗
  25. Alexandre Lacoste, Alexandra Luccioni, Victor Schmidt, and Thomas Dandres. Quantifying the Carbon Emissions of Machine Learning. arXiv:1910.09700 [cs], November 2019. URL http://arxiv.org/abs/1910.09700. arXiv: 1910.09700. our card
  26. Aurelie Neveol, K Bretonnel Cohen, Cyril Grouin, Thierry Hamon, Thomas Lavergne, Liadh Kelly, Lorraine Goeuriot, Gregoire Rey, Aude Robert, Xavier Tannier, and Pierre Zweigenbaum. Clinical Information Extraction at the CLEF eHealth Evaluation lab 2016. page 15. OpenAlex ↗ · Scholar ↗