---
title: "AliBERT — paper by Berhe et al. (2023) — summary and ideas"
description: "AliBERT learns from French biomedical writing and is tested on medical entity recognition, masked-word prediction, and document classification."
canonical: "https://research.elamur.ai/free/en/papers/berhe-2023-alibert-pre-trained-language-model/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/berhe-2023-alibert-pre-trained-language-model/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / AliBERT: A Pre-trained Language Model for French Biomedical Text

# AliBERT: A Pre-trained Language Model for French Biomedical Text

Paper · 2023 · Aman Berhe, Guillaume Draznieks, Vincent Martenot et al.

**Authors:** Aman Berhe, Guillaume Draznieks, Vincent Martenot, Valentin Masdeu, Lucas Davy and Jean-Daniel Zucker · **Year:** 2023 · **Venue:** Proceedings of the 22nd Workshop on Biomedical Natural Language Processing and BioNLP Shared Tasks · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**9** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4385565282) · [Cited by **10** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/berhe-2023-alibert-pre-trained-language-model/cited-by/) · [Proceedings of the 22nd Workshop on Biomedical Natural Language Processing and BioNLP Shared Tasks](https://aclanthology.org/volumes/2023.bionlp-1/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2023.bionlp-1.19/)
- [PDF](https://aclanthology.org/2023.bionlp-1.19.pdf)
- [DOI 10.18653/v1/2023.bionlp-1.19](https://doi.org/10.18653/v1/2023.bionlp-1.19)
- [OpenAlex](https://openalex.org/W4385565282)

Citations: OpenAlex, 2026-10-14.

## Summary

A French clinical case report can describe a symptom, record a measurement and name a drug in the same passage. Finding those details automatically requires a system that can handle the surrounding French as well as the vocabulary of medicine. The authors of AliBERT saw a gap between available general-purpose French systems and biomedical systems trained mainly on English. They asked whether [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) pretraining on French biomedical writing could produce a better starting point for working with that material.

The authors assembled a 7.0 GB corpus from sources that included scientific articles, thesis summaries and drug information. They trained a [subword tokenizer](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) on biomedical text so that its inventory of words and word fragments would reflect the material AliBERT would read. Before learning that inventory, they standardized spacing around selected punctuation. AliBERT then learned by predicting hidden parts of a passage. A companion system, AliBERT-ELECTRA, used the same vocabulary and instead learned to detect tokens that had been replaced. Both started pretraining from scratch.

For [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), the authors adapted the pretrained systems to locate and label mentions such as anatomical structures, symptoms and devices. On the selected categories of the clinical CAS dataset, macro F1 was 0.88 for AliBERT, 0.89 for AliBERT-ELECTRA and 0.81 for CamemBERT. On selected categories from QUAERO-MEDLINE article titles, the corresponding scores were 0.793, 0.782 and 0.655. The gains varied by category. CamemBERT had the highest pathology F1 on CAS, while both AliBERT variants registered gains for disorder and device mentions on QUAERO-MEDLINE. AliBERT also reached 0.72 top-choice accuracy on the masked-text evaluation, compared with 0.49 for CamemBERT. The top-choice scores on the private classification dataset were closer, at 0.68 for each AliBERT variant and 0.66 for CamemBERT.

The experiments show where the complete biomedical training setup helped on the authors’ evaluations. They also give a closer look at choices within that setup. Lowercasing and punctuation normalization were favored in the tokenizer experiments. The LAMB optimizer brought the training loss down faster, while the Adam run yielded higher F1 for most CAS categories in the optimizer comparison. The paper leaves the separate contributions of the corpus and vocabulary open, along with how well the system would transfer to a broader range of clinical documents, particularly physicians’ notes.

## Deep dive: AliBERT: A Pre-trained Language Model for French Biomedical Text

AliBERT learns from French biomedical writing and is tested on medical entity recognition, masked-word prediction, and document classification. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The language and the kind of writing both matter

The starting point is a distinction between knowing the language of a document and being prepared for the way a particular field uses it. A French drug description and a general French article share many words and grammatical patterns. Familiarity with those patterns is useful in both settings. A drug description also contains names, quantities and specialized expressions whose meaning depends on their surroundings. A system trained to find a substance in a clinical report needs to learn which part of the passage refers to the substance and where the mention ends. A system trained to categorize a biomedical document has to use cues distributed across the text. These tasks make it possible to test whether the preparation a system received carries over to work on French biomedical text.

The authors describe a field in which the building blocks for that preparation were already available. What they saw as scarce was their combination. General systems for [French](https://md.research.elamur.ai/free/en/topics/french/) had demonstrated the value of training on text in that language. Biomedical pretraining had also made progress, primarily on English corpora. Bringing the approaches together meant collecting suitable French material, deciding how to represent medical terminology and establishing whether the resulting system would improve on a strong general French baseline. Each decision concerns a different stage of the work. The corpus supplies examples, the tokenizer determines the units the system sees, and the downstream evaluation establishes what can be done with the representations learned from those units.

Earlier French health-language research had already examined [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical representations learned from patterns of word use. The paper cites a comparison of word2vec and [GloVe](https://md.research.elamur.ai/free/en/papers/pennington-2014-glove-global-vectors-word-representation/) on French health-related documents. The authors use that work to place AliBERT in a line of efforts to represent French biomedical vocabulary computationally. AliBERT shifts the emphasis to contextual representations. The representation used for a piece of a word comes from processing its position in the surrounding passage. The distinction matters for entity recognition because deciding what a mention refers to, and which words belong to it, can require information beyond the vocabulary item itself.

#### What earlier pretraining offered

The architecture comes from the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) family. Through attention, the representation at a position can draw on information from other positions in a passage. The paper traces the use of this architecture for text understanding to [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) and describes work that reused its approach for different languages and tasks. In this pattern of research, pretraining supplies general representations using a large text collection. [Fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) then adjusts the pretrained system using examples labeled for a particular task. The source of supervision changes between the stages. Text can supply its own answers when a training procedure hides a word, whereas an entity-labeling task needs annotations identifying the mentions the system is supposed to learn to find.

The general French baselines sit within that history. The authors describe CamemBERT as trained on broad French web text drawn from OSCAR. [FlauBERT](https://md.research.elamur.ai/free/en/papers/le-2019-flaubert-unsupervised-language-model-pre/) likewise used general French material, with 71 GB of raw text reported in the paper. General training provides a basis for parsing the ordinary language that occurs in medical writing, including the words that connect technical expressions. The question the authors pose is whether examples collected specifically from biomedicine provide better preparation for biomedical tasks. Their experiments address that question by comparing AliBERT with CamemBERT. FlauBERT helps situate the work among French systems and appears in the broader discussion of French comparisons.

The discussion also describes forms of specialization that do not start from a blank slate. BERTweetFR began with CamemBERT and adapted it using French tweets. In biomedicine, [BioBERT](https://md.research.elamur.ai/free/en/papers/lee-2019-biobert-pre-trained-biomedical-language/) extended BERT using biomedical text, including article abstracts. Both illustrate continual pretraining, in which an existing system acquires further experience from a new collection of raw text. A related option discussed in the paper is mixed-domain pretraining, which draws training material from general and specialized writing. AliBERT takes the domain-specific route from scratch, so its initial vocabulary and its learned representations both come from the biomedical project. The paper also places [PubMedBERT](https://md.research.elamur.ai/free/en/papers/gu-2020-domain-specific-language-model-pretraining/) among the English biomedical precedents.

#### Where AliBERT fits among earlier French efforts

French specialization already had precedents of its own. [JuriBERT](https://md.research.elamur.ai/free/en/papers/douka-2021-juribert-masked-language-model-adaptation/) focused on legal language and used 6.3 GB of raw legal text. That is an example of collecting material around an area of practice within French. CamemBioBERT was closer to the question AliBERT addresses. The paper describes it as an adaptation of CamemBERT using biomedical material from DEFT, a French-language text-mining evaluation campaign. The distinction is the starting point of training. AliBERT was designed to learn both its representations and its token inventory from the project’s biomedical corpus, whereas CamemBioBERT drew on an existing general French system.

The authors also note an ongoing French clinical effort based on a more specific source of text. The data EDS used comprised 21 million clinical reports taken from electronic health records associated with hospitals in the Paris area. The earlier work described both training from scratch and continuing from CamemBERT. Its use of proprietary records placed it in a different setting from AliBERT’s collection of articles, thesis summaries and drug materials. The paper presents EDS as concurrent clinical work when explaining the scope of its claim about the scarcity of French biomedical pretraining from scratch. [Learning structures of the French clinical language](https://md.research.elamur.ai/free/en/papers/dura-2022-learning-structures-french-clinical-language/)

The authors’ account of earlier biomedical research also shows why the choice of sources matters to the scope of the project. The surveys they discuss cover research writing, radiology reports, electronic health records and social media. Each provides a different sample of how biomedical information is expressed. A title is short and frequently names the central subject directly. A drug information document is organized around a product. A clinical case can relate findings over the course of a narrative. The word biomedical describes the subject area shared by these texts, while the particular collection determines which forms of writing the system will encounter. AliBERT was designed around a collection of sources that the authors could bring together in French, with evaluation tasks that sampled some of the varied uses of the resulting representations.

### The method, step by step

#### Assemble a corpus with several styles of biomedical writing

The first step was to gather French material whose subject matter aligned with the intended tasks. The corpus combined research articles from ScienceDirect with thesis summaries obtained through SuDoc, a university documentation catalog. The authors obtained the articles through a subscription interface and selected French items in the biomedical domain. They also collected pages from Cochrane. These sources expose the system to scientific writing in different forms. An article can develop an argument at length, while a thesis summary condenses a broader project and may put its central terms close together. The paper treats this variety as part of the motivation for combining sources.

Drug descriptions formed another part of the collection. The public drug database supplied short passages and sentences about medicines and their characteristics. The RCP collection provided product information intended for health professionals. The distinction helps explain what the authors expected to gain from both. Text about a medicine can be organized differently depending on readership and purpose, even when the underlying subject is the same. Combining the drug sources with research material broadened the set of contexts in which the training procedure could encounter names, quantities and biomedical expressions.

The corpus inventory records 500K items from the article collection and lists its size as 4300Mb. The RCP entry lists 35K items and 2200Mb. The public drug database contributed 23K items listed at 550Mb, while the thesis collection contributed 300K summaries at 300Mb. The Cochrane entry lists 7.6K items at 27Mb. These are source-level counts and sizes as reported by the authors. The units of collection vary across sources, so the count of thesis summaries and the count of article items describe different kinds of material. The paper gives the overall AliBERT corpus size as 7.0 GB in its comparison with other French training collections.

The source inventory also explains the authors’ use of the word biomedical. Their training text covers a collection of research and medication-related genres. The description of what went into pretraining is important when the paper later evaluates clinical entity recognition. The drug collections may contain references to substances and measurements, and the scientific collections may feature anatomical terms or procedures. The ability to apply what was learned from those contexts to annotated clinical cases is one of the questions the CAS experiment puts to the test.

#### Standardize spacing before learning the vocabulary

Raw documents have to be turned into units that a neural system can process. [Tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) is the step that maps text to those units. A token might correspond to a whole word or a reusable fragment. This is particularly relevant to a biomedical corpus because a system needs some way to represent a specialized term even when the exact term is absent from its vocabulary. With sub-words, a term can be represented by several pieces. The segmentation decisions also determine how many positions a passage occupies and which units the system sees repeatedly in similar contexts.

Before training the tokenizer, the authors standardized spacing around selected punctuation. Their illustrated procedure inserts space after punctuation and removes space before it where applicable. The paper calls attention to characters such as opening parentheses, colons and hyphens as places where punctuation can affect how an adjacent expression is represented. The rationale is that layout differences can turn a familiar string into a different vocabulary candidate. When a tokenizer encodes a word boundary as part of a token, a surface form at a marked boundary can occupy a different entry from the same form attached to neighboring material. Standardizing the boundary can bring more occurrences under a common representation.

The appendix compares what happens to the same text under several treatments. One Unigram tokenizer keeps the case of the input, another lowercases it, and another omits the custom spacing normalization. The CamemBERT tokenizer provides a general French comparison. Using the same input for the illustration makes the differences visible before any task scores are involved. The text can look almost the same to a reader while offering different strings to a tokenizer learning which pieces belong in its vocabulary. Lowercasing and spacing standardization address different sources of variation. The first changes the alphabetic form, and the second changes the boundaries around punctuation.

The authors refer to their procedure as a regularization of tokenization. In practical terms, the key operation described is the effort to make recurring surface forms appear more consistently before the tokenizer learns from them. An occurrence after punctuation and another occurring between words can then contribute to a more consistent set of candidates. Whether this preserves intact words, and whether any gain carries through to later tasks, are empirical questions. The appendix uses a segmentation comparison to address the first and discusses the authors’ experience training and fine-tuning with different choices.

#### Learn subwords from the biomedical corpus

The authors tried Unigram, WordPiece and byte-pair encoding, or BPE, with different configurations. The selected Unigram approach begins with a large inventory of candidate pieces. It evaluates the text under the current vocabulary and estimates the cost of dropping individual entries. Entries whose removal least harms the representation of the corpus are candidates for pruning. The process repeats towards the intended vocabulary size. A piece stays useful when keeping it gives the tokenizer a better way to account for the strings it encounters. A redundant piece can frequently be represented through other pieces already in the inventory.

The paper explains the rationale for this pruning process in words. The loss at this stage evaluates the tokenizer’s representation of the corpus with its current inventory. The projected change in loss is used to judge how expensive it would be to remove a candidate. This is a different operation from the loss used later to train AliBERT to predict a masked token. The tokenizer procedure is choosing the discrete units available to the system. Next, pretraining will learn the typical meanings of those units in context and the relationships among them.

The experiment settings describe a vocabulary of 40K sub-word units. In the discussion, the authors give the implemented Unigram vocabulary size as 40,008 and the CamemBERT vocabulary size as 32,005. They report about 10,000 entries in common. The inventory comparison makes clear how much the representation can change even when both systems process French. A specialized vocabulary can allocate entries to expressions that recur in articles or drug information. The comparison describes which pieces each system has available. It leaves open how much of a particular downstream gain is attributable to those pieces, since the systems also learned their contextual representations from different corpora.

From French biomedical documents to task evaluations The steps in order.

#### Learn from text by predicting what was hidden

AliBERT starts with fresh weights and uses a RoBERTa-style implementation of masked language modeling. The idea is to turn ordinary text into a learning exercise. The system receives a passage with selected material hidden and tries to identify what fits each hidden position. The original passage supplies the target. As the procedure is repeated across the corpus, a successful prediction depends on learning regularities in how biomedical texts are written. A drug name, for example, may become easier to predict when the surrounding expression describes a medication, while a measurement may be constrained by the language that introduces the result. Such regularities are learned from the corpus by repeatedly comparing predictions with the original text.

The paper describes selecting 15% of the input words for masking. After tokenization, padding or truncation produces inputs with a maximum of 512 tokens. Padding supplies designated positions when the sequence is short. Truncation limits what a sequence can contain when the tokenized material is long. The authors identify `[CLS]` and `[PAD]` among the special tokens used in packaging the input. The limit is expressed in tokens, so its relationship to the amount of prose depends on how the vocabulary splits the text. A passage with more fragmented words can occupy more positions than a similar passage whose words fit entries in the vocabulary.

In the architecture description, L is the reported depth of the stack, H is its hidden representation dimension, and A is the number of self-attention heads. The paper gives L as 12, H as 512 and A as 12 for AliBERT base. Each input token is represented numerically before passing through the Transformer layers. Attention lets the representation at a position take account of other positions in the sequence, and the heads provide several such patterns of interaction within a layer. The output for a hidden position goes to a feed-forward component that assigns probabilities to candidate tokens. Pretraining adjusts the system using the original token as the answer to recover.

There are two different senses of context in this procedure. The immediate context is the material available around an individual hidden position. The broader training context is the recurring use of expressions across the biomedical corpus. The system sees the first directly in an input sequence. The second is reflected in parameters learned over many examples. This distinction explains why the source of the text can matter even if the architecture is shared with a general French system. The same prediction exercise repeated on different documents can teach different regularities.

#### Detect replacements as an alternative learning signal

For AliBERT-ELECTRA, the authors retained the project’s vocabulary and tokenization and changed the pretraining exercise to replaced token detection. A generator predicts candidates for masked positions. These predictions are inserted into the passage, creating an input that includes original material and possible replacements. The discriminator processes that input and learns to decide which tokens came from the original passage and which were substituted. The generator supplies candidate words. The discriminator learns to evaluate what it receives in the surrounding context.

The distinction can be understood by looking at what constitutes an answer. In masked language modeling, the answer is the original item at a hidden position, selected from the vocabulary. In replacement detection, the answer is a judgment about a token already present in the input. The substituted item can be a plausible expression, since it comes from a generator trying to fill the gap. Detecting it can therefore require sensitivity to which linguistic or biomedical expression belongs in that precise context. The downstream evaluation then asks which of the two resulting sets of contextual representations is easier to adapt to the annotated tasks.

The paper’s comparison uses a common biomedical tokenization procedure, which makes the objective a more focused point of comparison than in the headline CamemBERT results. It still compares two training setups. Replacement detection brings a generator and discriminator into the process, whereas the masked version uses token prediction as its training target. The results measure how the respective implementations transferred under the study’s conditions.

#### Choose how to update the parameters

The default pretraining optimizer was Adam. An optimizer uses the training loss and its gradients to decide how to adjust the system’s parameters. Adam adapts its updates using estimates derived from recent gradients. The authors also tested LAMB because earlier work described it as a way to accelerate BERT training with large batches. That earlier speed result motivated a separate run for AliBERT. The paper evaluates this choice by looking at how quickly the training loss decreases and at what the resulting pretrained system can do after adaptation to CAS. [Large Batch Optimization for Deep Learning](https://md.research.elamur.ai/free/en/papers/you-2019-large-batch-optimization-deep-learning/)

For the AliBERT base run, the paper reports 20 hours on 48 Nvidia A100 GPUs. These were arranged across 12 nodes with 4 GPUs each. The reported batch size was 960, with 20 examples per GPU, and the input setting was 512 tokens. A batch groups examples for a training update. The hardware and batch details give the elapsed time its practical setting. They describe a distributed run, while the study-wide computation estimate discussed in the limitations covers a broader scope.

#### Adapt the pretrained system to each labeled task

For entity recognition, the authors used the HuggingFace token classification pipeline. The system processes an input passage and produces label predictions at token positions. Fine-tuning uses text whose entities have already been marked so the system can learn which sequences of tokens correspond to the annotated categories. In a clinical case, the relevant sequence might be a substance mention or a description of an anatomical structure. In an article title, it could be a procedure or a device. Each dataset provides its own definitions of the labels the system is asked to predict.

The authors used a sequence classification setup for the private biomedical dataset. The prediction concerns the category of the text as a whole. Evidence can come from different parts of the sequence, and the evaluation checks the rank given to the assigned category. The authors also examined masked-text prediction. That brings the evaluation back to the kind of contextual prediction used to train AliBERT, this time on a collection assembled for evaluation. Together the tasks probe the representations at different levels. Entity recognition measures localized labeling, classification concerns an entire input, and masked prediction checks whether the system can recover a hidden item.

The paper reports that the pretrained AliBERT materials were made available through the Hugging Face hub under Quinten-datalab/AliBERT and identifies an AliBERT project repository for the data it makes public. CAS and QUAERO are public evaluation resources. The document classification collection is private, which places a different constraint on verifying that part of the experiment.

### Experiments and results

#### CAS clinical cases

CAS contains French clinical cases in specialties including cardiology, urology and oncology. The authors selected the five most heavily annotated entity types for their experiment. Substance concerns medicines and related pharmacological mentions. The symptom and anatomy categories capture findings and anatomical structures, respectively. Value covers measurements and associated units or grades. Pathology covers diseases and pathological descriptions. The annotation inventory gives 2,009 substance occurrences, 5,240 symptom occurrences, 4,780 anatomy occurrences and 1,743 value occurrences. These counts describe the annotations listed for CAS. They do not identify the contents of individual experimental partitions.

The distinction among the categories matters because they make different demands on the prediction. A substance mention may be concentrated in a product name. A value can join a quantity with a unit or a description of a grade. The authors give a pathology example about a tumor whose annotation extends through an account of how it invaded surrounding anatomy. That kind of label can cover a long phrase in which much of the vocabulary is ordinary French. Detecting the presence of a biomedical word is only part of the task. The system also has to assign the category across the portion of text that the annotation treats as the mention.

CamemBERT is the general French baseline in the main CAS comparison. The reported fine-tuning settings for that comparison include a batch size of 80, a learning rate of 2e-5 and a weight decay of 0.01. The learning rate governs the size of parameter updates during adaptation. Weight decay applies pressure against large parameter values. The recognition results are reported with precision, recall and F1. Precision reflects how many predictions are correct among the entities predicted. Recall reflects how many annotated entities are recovered. F1 combines the two with a score that is sensitive to a shortfall in either. A macro average treats categories equally when aggregating their scores, so a category can influence the result even if it has fewer mentions than another category.

Macro F1 for named entity recognition on CAS AliBERT-ELECTRA leads the CAS comparison, and both biomedical variants score above CamemBERT.

**The numbers**

| System or setting | F1 |
| --- | --- |
| CamemBERT | 0.81 |
| AliBERT | 0.88 |
| AliBERT-ELECTRA (this paper) | 0.89 |

The aggregate scores capture an advantage for both AliBERT variants across the selected categories. The macro precision and recall are 0.94 and 0.85 for AliBERT, 0.92 and 0.87 for AliBERT-ELECTRA, and 0.89 and 0.79 for CamemBERT. This shows a difference within the biomedical pair. AliBERT reports the higher precision, while AliBERT-ELECTRA reports the higher recall and macro F1. The rankings answer related questions about the same task. An aggregate based on F1 incorporates both the recovery of annotated mentions and the correctness of the mentions predicted.

The value category illustrates why looking at precision and recall alongside F1 helps. CamemBERT records 0.88 precision, 0.46 recall and 0.60 F1 for values. AliBERT records 0.98 precision, 0.99 recall and 0.98 F1, while AliBERT-ELECTRA reports 0.93 for each metric. The baseline’s particularly low recall indicates that its value predictions cover less of what is annotated. For symptom recognition, CamemBERT has 0.90 F1, AliBERT 0.97 and AliBERT-ELECTRA 0.96. Both variants also reach 0.93 F1 on substance mentions, where CamemBERT records 0.91. The domain system’s advantage varies with the kinds of entity being measured.

Pathology reverses the overall F1 ordering. CamemBERT reports 0.74 F1, AliBERT-ELECTRA 0.68 and AliBERT 0.52. The precision and recall columns clarify where the reversal occurs. For AliBERT, pathology precision is 0.81 and recall is 0.39. CamemBERT reports precision of 0.79 and recall of 0.70 for the same category. The general French baseline recovers more of the annotated pathology mentions in this comparison. The authors suggest that long spans filled with common French words contribute to the pattern. The annotated tumor example makes that explanation plausible, while the evaluation gives the category result as a whole.

#### QUAERO-MEDLINE article titles

The QUAERO experiment takes its inputs from French MEDLINE titles. QUAERO’s annotations use semantic groups from the Unified Medical Language System. The paper describes a process of automatic pre-annotation followed by validation by trained human annotators. For this experiment, the authors chose anatomy, chemical, device, disorder and procedure because of their pertinence to biomedicine. The reported inventory includes 1,464 anatomy annotations, 1,028 chemical annotations, 2,825 disorder annotations and 1,631 procedure annotations. These figures concern the selected annotation inventory. The evaluation is specifically for the MEDLINE title material and the five chosen categories.

The labels give this second experiment a different scope from CAS. Chemical can include proteins and enzymes as well as clinical drugs. Disorder encompasses abnormalities and diseases, and the paper’s description includes symptoms as examples. It therefore intersects with the subject matter of CAS pathology while following a different set of annotation definitions. The input genre changes as well. A title has less surrounding prose than a clinical narrative, and a central procedure or disorder may be expressed in a compact phrase. The two experiments show how the systems fare under distinct conditions for a common kind of extraction task. Their aggregate scores can be interpreted against the baseline within each dataset.

Macro F1 for named entity recognition on QUAERO-MEDLINE AliBERT leads the article-title comparison, followed by AliBERT-ELECTRA.

**The numbers**

| System or setting | F1 |
| --- | --- |
| CamemBERT | 0.655 |
| AliBERT (this paper) | 0.793 |
| AliBERT-ELECTRA | 0.782 |

The clearest category-level contrast occurs for device mentions. The reported precision, recall and F1 for CamemBERT are all 0.000. AliBERT reaches 0.418 F1 and AliBERT-ELECTRA reaches 0.419. The variants identify devices that the baseline missed under the scoring used in that evaluation. There is also a difference in their precision and recall profiles. AliBERT reports device precision of 0.506 and recall of 0.356, while AliBERT-ELECTRA reports 0.549 and 0.338. The similar F1 scores thus come from slightly different balances of correct predictions and recovered annotations.

The improvement extends beyond devices. For QUAERO-MEDLINE procedure mentions, F1 is 0.887 for CamemBERT, 0.968 for AliBERT and 0.960 for AliBERT-ELECTRA. For anatomy, the scores are 0.645, 0.803 and 0.800 in the same order. For chemical, CamemBERT records 0.846, AliBERT 0.885 and AliBERT-ELECTRA 0.856. The disorder results are 0.794, 0.850 and 0.845. The disorder comparison is particularly informative beside the CAS pathology result. The same systems compare differently as the writing genre and the label definition change. A conclusion about one dataset’s pathology spans therefore has limited reach across ways of annotating disease-related text.

The overall ordering within the biomedical pair changes as well. AliBERT-ELECTRA has the leading macro F1 on CAS. The masked-pretraining variant leads on QUAERO-MEDLINE. The advantage common to both tables is the higher macro F1 of both biomedical variants relative to CamemBERT. The task-specific preference between the variants is a narrower result. It depends on which collection and which balance across categories is being evaluated.

#### Recovering a hidden item

The masked prediction evaluation uses 3000 texts selected for this purpose. The stated composition is 1000 ScienceDirect articles, 1000 Cochrane articles and 1000 SuDoc thesis abstracts. These are familiar kinds of material in the sense that sources of the same kinds contributed to pretraining. The question asked by this evaluation is how well the systems recover a hidden item in French biomedical writing of those genres. The paper reports ordinary accuracy for the first-ranked prediction, with further scores for whether the answer appears among the first three or first five predictions. The latter scores give credit when the answer is available among plausible alternatives.

Top-choice masked prediction accuracy on the French biomedical text sample The biomedical variants recover the hidden item more often as their first prediction.

**The numbers**

| System or setting | Accuracy |
| --- | --- |
| CamemBERT | 0.49 |
| AliBERT (this paper) | 0.72 |
| AliBERT-ELECTRA | 0.71 |

CamemBERT reports 0.57 top-three accuracy and 0.62 top-five accuracy on the masked-text evaluation. Both biomedical variants report 0.83 and 0.87 on those measures. The pattern shows an advantage in the leading prediction and in the broader candidate list. For a reader interpreting these scores, the first-ranked metric treats a plausible alternative above the original item as a miss. A wider cutoff gives some information about cases where the system placed the original item near the top. The evaluation is still keyed to the form that actually appeared in the source sentence.

The authors illustrate the task with examples that show ranked candidate lists for individual blanks. The figure distinguishes the positions in which the original answer appeared. This is useful for seeing what the aggregate scores count. Two systems can both include the answer in their candidate lists, but differ in how early they offer it. The illustrations provide examples of ranking behavior alongside the reported benchmark accuracy. They are strongest as explanations of how to read the task, since a small display of sentences has a different evidentiary role from the full evaluation collection.

#### Classifying private biomedical texts

For the classification experiment, the starting collection contains 410,000 examples organized into 789 classes. The authors keep the classes with more than 1000 examples, leaving 50 classes for the reported experiment. The filtering decision changes the prediction problem from the full collection to a subset of labels with more training material. The classification system assigns scores to the candidates. As in the masked prediction task, top-choice accuracy checks the first answer, and the wider cutoffs check whether the assigned class is present near the top of the list.

On this filtered classification dataset, CamemBERT reaches 0.66 top-choice accuracy and 0.72 top-three accuracy. Both AliBERT variants reach 0.68 and 0.73, respectively. At the top-five cutoff, all three systems report 0.99. The result indicates a difference in where the correct class appears near the head of the ranking, with the same reported accuracy at the widest cutoff. It is a smaller separation than the one seen on masked prediction. The results table provides these aggregated values, while the paper elsewhere describes the private nature of the dataset as a constraint on reporting.

Across the experiments, the strongest quantitative evidence concerns performance on the selected annotated entity categories and on the masked-text collection. The classification table extends the comparison to a sequence-level task and shows the scale of the gains under that setup. The numerical tables use CamemBERT as the general French comparator. The paper’s broader discussion includes FlauBERT, but the main CAS, QUAERO-MEDLINE and classification tables support the detailed comparisons with CamemBERT.

### What the ablations show

#### Tokenization changes how the corpus is represented

The paper examines tokenization, case treatment, the pretraining objective and the optimizer. The tokenizer comparisons are the closest look at what happens before any contextual representation is learned. The appendix compares Unigram, BPE and WordPiece through a measure of how heavily individual words are split. A tokenizer fares well under this measure when a larger share of the words can be encoded in a small number of pieces. The authors report that Unigram performed best in their comparison of this kind and learned faster in their experiments. They also favor the Unigram setting in their account of training and fine-tuning AliBERT.

The spacing illustration and the segmentation comparison address related questions. The illustration shows how shifting a punctuation boundary changes the string available for tokenization. The comparative plot asks what degree of splitting occurs over a collection of words. When a normalization procedure makes boundaries more consistent, a tokenizer can encounter a recurring form under fewer layout variants. The segmentation comparison helps establish that the tokenizers handle word forms differently. It is a diagnostic of the input representation, and its relationship to any particular entity score remains to be quantified.

The authors also compare preserving case with converting text to lower-case. They found the lower-cased setting preferable. Biomedical text contains capitalized forms, but in the authors’ account their occurrence in this corpus did not provide adequate support for preserving case during training. Pooling upper-case and lower-case forms can give the tokenizer more occurrences of a common string. At the same time, the procedure collapses a feature that a case-sensitive system could use. The paper’s result supports lowercasing in the particular training setup it examines. It leaves open how case would affect a task whose labels depend closely on distinctions among capitalized forms.

The overlap of about 10,000 vocabulary entries with CamemBERT provides a different piece of evidence. It demonstrates that the domain-focused tokenizer and the general French tokenizer arrived at substantially different inventories. Several choices can contribute to that difference, including the training text, target inventory size and treatment of surface forms. A downstream comparison that held the corpus and pretraining budget fixed while changing only the vocabulary would clarify how much of the recognition or prediction performance comes from tokenization. The available analyses support the selection of a tokenizer for this system and give plausible mechanisms for its behavior.

#### The two objectives trade places across datasets

AliBERT and AliBERT-ELECTRA give the authors a comparison of two ways to learn from the same kind of raw material. They share the project’s tokenizer and its biomedical focus. The principal change is from predicting the original item at a hidden position to detecting a replacement in an input passage. The comparison is particularly informative in the task tables because both training schemes can be assessed under the same category definitions and metrics within each dataset.

On CAS, the replaced-token variant gives the higher macro F1. On QUAERO-MEDLINE, the masked variant gives the higher macro F1. In masked-text prediction, AliBERT leads on the first choice and ties AliBERT-ELECTRA at the wider cutoffs. The private classification results are the same for the two variants at every reported cutoff. These patterns support a more precise reading of the authors’ preference for masked pretraining than a single overall rank would provide. Its edge appears in particular measures. The replaced-token approach remains competitive and leads on CAS macro F1.

The authors describe the differences between the objectives as slight overall. The paper reports point scores, so the ordering shows what happened in the runs summarized in the tables. Assessing whether a small difference reliably follows from the choice of objective would require information about variation across runs or an explicit statistical comparison. The consistent aspect of the reported experiment is that both routes yield useful adaptation to the selected biomedical tasks when initialized with the representations learned in this project.

#### Faster optimization and downstream recognition can diverge

The optimizer comparison pairs the masked-pretraining AliBERT configuration using Adam with AliBERT-LAMB. The training figure shows that LAMB brings the loss down more quickly. That is evidence about how efficiently the pretraining run progresses on the objective it is optimizing. CAS recognition evaluates a later stage after fine-tuning with annotations. The paper shows that a configuration can do well by the first measure while its adaptations give mixed results by the second.

The largest separation in the reported CAS optimizer comparison occurs on the value category. The Adam run has 0.98 F1, and the LAMB run has 0.86. Symptom F1 is 0.97 for Adam and 0.96 for LAMB. Anatomy F1 is reported as 0.98 and 0.96, respectively. Pathology goes in the other direction. LAMB gives 0.65 F1, with precision of 0.87 and recall of 0.52. The Adam run gives 0.52 F1, with precision of 0.81 and recall of 0.39. The authors’ conclusion that they generally favored Adam for CAS is compatible with a meaningful category-specific advantage for LAMB.

Some individual entries warrant care. For example, the optimizer table gives the Adam run 0.90 substance F1, while the main CAS table gives AliBERT 0.93 for that category. The two figures belong to their respective tables, and the paper gives limited information for reconciling them. The direction of the optimizer comparison for value and the reversal for pathology can be read directly within its own table. Keeping the comparisons tied to the reported settings avoids treating every number for the same named system as interchangeable.

The training curve and the fine-tuning experiment consequently answer different questions about the optimizer. The curve supports a speed advantage during pretraining. The CAS comparison shows which version tends to deliver the stronger recognition scores in that evaluation and identifies a category for which the faster run does better. The study does not supply an equivalent optimizer comparison across all the other downstream settings, so the conclusion about the reuse of those weights is specific to CAS.

### Limitations

#### Limits the authors state

The authors identify the range of writing in the pretraining corpus as a central limitation. The collection includes sources with different audiences and styles, yet the inventory leaves out the clinical material they most want to add. In particular, they name electronic health records and physicians’ notes as directions for expanding the corpus. Research articles, drug documents and thesis summaries can teach biomedical vocabulary and patterns of use. Clinical notes would contribute examples tied more directly to the way practitioners document cases. The paper treats the anticipated benefit as a direction for future work. Its current evidence comes from the corpus it assembled and the downstream datasets it evaluates.

The input window is another limit they identify. An AliBERT input contains at most 512 tokens, with the amount of original prose depending on segmentation. When truncation is used, recognition and classification can draw on the context that fits in the input. This particularly matters when interpreting what it would take to apply the same approach to a long biomedical document. A title presents a compact evaluation case. A longer narrative can distribute the evidence for a decision across more text. The authors point to work such as [Big Bird](https://md.research.elamur.ai/free/en/papers/zaheer-2020-big-bird-transformers-longer-sequences/) when discussing longer sequences as a possible extension.

The authors also propose continual training from an existing French system as a direction for further comparison. Continuing from CamemBERT would allow inherited general French representations to be adapted to the biomedical corpus. That experiment could address a choice left open by AliBERT’s from-scratch design. It would need to account for the tokenization difference between the systems, which the authors acknowledge in the discussion. Their plans also include biomedical text generation. In this paper the classification and recognition evaluations concern the use of representations for analysis, and the masked prediction experiment concerns a restricted completion task with surrounding text available.

Compute is part of the authors’ own account of the cost of the study. They report approximately 20,160 GPU hours across the creation of the three pretrained versions and estimate an associated cost of 1.45 MWh or 71.11 kg CO2e with Green Algorithms. The study-wide figure and the separately reported 20 hours for the AliBERT base run use different frames. The first aggregates GPU computation over the project scope given by the authors. The second is elapsed time for a particular run on the stated hardware. The figures are useful on those terms, and a full comparison of efficiency against the baseline would require equivalent accounting for the training being compared.

The ethics statement raises concerns about bias, privacy, misinformation, access and accountability. The performance evaluations concern entity labels, class rankings and masked predictions. A reader assessing use with clinical records would need evidence about how the system performs across the relevant populations and document sources, along with data-handling safeguards for those records. The paper reports its ethical considerations separately from the measured task scores. The latter directly establish performance only for the evaluation conditions described.

#### Limits visible in the experiment design

The most important qualification in interpreting the baseline comparison is that AliBERT bundles several choices. It changes the source of the pretraining text, the text normalization, the segmentation procedure and the vocabulary. Those choices all affect what the resulting system learns. CamemBERT makes sense as a practical comparator for a reader choosing a starting point for biomedical adaptation. Its inclusion answers how the complete AliBERT setup compares with one general French alternative on these tasks. Isolating the independent effects of domain text and vocabulary would require training systems that exchange one factor at a time under otherwise comparable conditions. The diagnostic evidence about tokenization and the stronger downstream scores help explain the authors’ design choice, while leaving the relative size of those contributions open.

The paper’s account of existing alternatives also sets the scope of the baseline evidence. The main experiments use CamemBERT, and the authors say they could not make the corresponding comparison with a French biomedical pretrained system. CamemBioBERT and EDS help define the research context, but they do not supply rows in those main result tables. The numerical evidence therefore supports the named comparisons with CamemBERT on the selected tasks. Claims about the relative merits of training from scratch, adapting CamemBERT on the same corpus or learning directly from clinical reports would require a shared evaluation with those settings.

The choice of categories limits what the NER results represent. CAS is restricted to the most annotated types, so the results chiefly describe categories that had adequate examples for the chosen setup. QUAERO-MEDLINE is restricted to categories selected for their biomedical relevance. Macro F1 gives each included category equal influence. Other annotations from the broader datasets fall outside that average. The two entity experiments extend the evidence across clinical cases and article titles, while the category selections and annotation definitions still bound what can be said about French biomedical entity recognition more generally. The reversal between CAS pathology and QUAERO-MEDLINE disorder illustrates the importance of those boundaries.

The authors state that their downstream datasets were kept out of pretraining and acknowledge possible overlap with QUAERO-MEDLINE article titles. A title can occur by itself in the evaluation and as part of the publication material encountered during pretraining. The possibility matters for interpreting the degree of separation between the tasks. Prior exposure to a string, if it occurred, would be different from access to its evaluation annotation, but it could affect how familiar the title is to the pretrained system. The paper does not establish how often such overlap occurred or how the results change after removing it.

The private classification result has two additional constraints. Independent readers cannot inspect the class labels and examples in the way they can use the public recognition resources. The filtering to frequent classes also leaves the behavior on the long tail of the original collection unevaluated. Within the subset, the scores establish a difference in top-choice accuracy and a tie at the reported top-five cutoff. For interpreting that gain or comparing another system with it, the evaluation partitions and the composition of the classes would be relevant. The paper reports the aggregate comparison, with limited detail available about those conditions.

The masked-text evaluation likewise leaves questions about comparability. AliBERT and CamemBERT draw on different sub-word inventories. An original expression could be represented compactly by one system and split by the other. AliBERT-ELECTRA also uses a different pretraining objective from AliBERT. The paper reports the three ranked-prediction scores, but gives limited detail about how predictions were made comparable across tokenizations or how the replaced-token system produced its candidate rankings. The result is best read as performance under the procedure the authors report. Its clearest evidentiary role is showing a gap between the biomedical variants and CamemBERT on the paper’s selected masked-text sample.

Finally, small score separations are reported as point estimates. This particularly affects the reading of comparisons between the two biomedical variants and of the classification gain. The paper shows which run scored higher on the reported evaluation. The likely spread of results under different initializations, sampling decisions or fine-tuning runs remains open. The category results supply more texture than a single aggregate does, including places where the general baseline or a different optimizer does better. They still concern a specific experimental setup. Clinical accuracy, the factual reliability of generated statements and consequences for healthcare decisions would each require an evaluation designed around that outcome.

### What came after

The later work identified here is [A Benchmark Evaluation of Clinical Named Entity Recognition in French](https://md.research.elamur.ai/free/en/papers/bannour-2024-benchmark-evaluation-clinical-named-entity/), published in 2024. It cites AliBERT and addresses the evaluation of entity recognition in French clinical text. That subject follows directly from the clinical part of the earlier paper. AliBERT used CAS as one of the settings for testing whether biomedical pretraining would transfer to a labeled task. The later paper takes clinical recognition itself as the subject of a benchmark evaluation.

The documented connection is the citation and this shared evaluation problem. The role of AliBERT within the later benchmark, including whether it was run as a baseline or used to initialize a system, is unspecified. The significance of the connection can be understood from the earlier experiment. AliBERT’s CAS results show that conclusions about clinical recognition depend on the annotated category as well as the aggregate score. Its comparison with QUAERO-MEDLINE also shows why a result on biomedical article titles answers a different question from a result on clinical narratives. A benchmark devoted to French clinical entities places that distinction at the center of the evaluation.

## Cite

Cite as Aman Berhe, Guillaume Draznieks, Vincent Martenot, Valentin Masdeu, Lucas Davy and Jean-Daniel Zucker. 2023. AliBERT: A Pre-trained Language Model for French Biomedical Text. Proceedings of the 22nd Workshop on Biomedical Natural Language Processing and BioNLP Shared Tasks.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2023.bionlp-1.19](https://doi.org/10.18653/v1/2023.bionlp-1.19)

```bibtex
@inproceedings{berhe2023alibert,
  title = {{AliBERT: A Pre-trained Language Model for French Biomedical Text}},
  author = {Aman Berhe, Guillaume Draznieks, Vincent Martenot, Valentin Masdeu, Lucas Davy and Jean-Daniel Zucker},
  booktitle = {Proceedings of the 22nd Workshop on Biomedical Natural Language Processing and BioNLP Shared Tasks},
  year = {2023},
  doi = {10.18653/v1/2023.bionlp-1.19},
  url = {https://doi.org/10.18653/v1/2023.bionlp-1.19}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
