Multilingual language models are supposed to place a German, Spanish, or English sentence about the same disease at the same point in their internal vector space. In practice they often do not. Clinical words such as drug names, diagnoses, and procedures are among the worst aligned, so a model trained to read English hospital notes loses much of its skill on notes written in other languages. The usual repair is to pull together the internal vectors of translated sentence pairs. Translated clinical text, however, is scarce, privacy-restricted, and often does not exist for a given hospital's language.
This proposal starts from a fact that clinical NLP has largely ignored. Hospitals in Spain, Germany, and France already attach the same international diagnosis codes (ICD-10, the WHO's International Classification of Diseases) to their notes that US hospitals attach to English ones. Every coded note is therefore a weak but language-independent label of what the note is about. We propose to treat each shared diagnosis code as an entry in a bilingual dictionary. The entry is not a word pair but a pair of averages: the mean internal vector of all English notes carrying that code, and the mean internal vector of all Spanish notes carrying it. We then use these code-level pairs to fit and enforce a cross-language alignment inside the encoder, without any parallel text. The test that matters is whether this alignment, fitted on codes that appear in both languages, carries English coding skill over to codes that the target-language hospital never labelled.
Core Claim
Our main claim is that per-code average vectors from code-tagged notes in two languages give enough anchor points to estimate a single global alignment of a multilingual encoder's middle layers. Because the alignment is global, it should transfer to codes seen only in the source language. Ordinary joint fine-tuning with a shared classification head cannot provide that, since it only receives target-language signal for codes that have target-language labels.
The idea is the clinical, document-level analogue of seed-dictionary alignment of word spaces. In that older setting, a few known word translations, or shared strings such as numerals (Bao et al.), pin down a rotation between monolingual spaces (Mohan; Zhao et al.). Here the shared strings are codes, and the "words" are averages over many contextual note representations. Averaging also sidesteps the objection, raised in Cao's study of contextual alignment, that rigid rotations fit poorly to vectors that change with context.
The proposal sits between existing pieces of work, each of which stops short of it.
CODER aligns isolated medical term strings across languages through contrastive learning on the UMLS knowledge graph. It never touches full notes, and it never asks whether encoder layers stay aligned once a model is trained for a downstream task. We use CODER as a competitor, not as the method.
Two papers align narrative text, but both need translated medical text. Multilingual Clinical NER shows that realigning an encoder with translated medical corpora lets cross-lingual transfer beat translate-train for extracting medications and adverse drug events. Gaschi et al. show more generally that contrastive realignment on translated word pairs closes much of the transfer gap. Our method substitutes code anchors for that translated text.
MedVL-XLRepE steers hidden states at inference time using parallel prompts. It is a motivating result: clinical representations cluster by language, and that clustering costs accuracy. It is not a persistent alignment, and it still needs translations.
Finally, Medical Crossing constrains our evaluation design. It shows that clinical entity-linking scores collapse once test concepts seen in training are filtered out. Any claim of transfer must therefore be measured specifically on unseen codes.
Research Program
The encoder and the anchors. We take a multilingual encoder (XLM-R Base and Large, plus distilmBERT, the three models compared in the clinical NER study). For layer $l$ and a note $x$, we define $h_l(x)$ as the mean-pooled hidden state of the note's chunks. For every ICD-10 category $c$ that appears in both the English and the Spanish training notes, we compute two averages:
- $\mu^{E}_{c,l}$, the average of $h_l(x)$ over English notes coded $c$;
- $\mu^{S}_{c,l}$, the same average over Spanish notes coded $c$.
We work at the three-character category level because MIMIC uses ICD-10-CM and Spain uses ICD-10-ES, and the national extensions differ below that level.
Measuring misalignment. Before any training, we measure how misaligned the encoder is at each layer. The measure is code-centroid retrieval accuracy: the fraction of Spanish centroids whose nearest English centroid carries the same code. This is a document-level version of the nearest-neighbour alignment score that Gaschi et al. found to track zero-shot transfer closely. Müller et al. locate cross-lingual alignment in lower and middle layers, so we expect this score to peak in the middle of the network. We expect clinical fine-tuning on English alone to erode it, which is the destructive effect Gaschi et al. report for general tasks.
Two alignment variants. The first is cheap and closed-form. We fit an orthogonal map $W$ that minimizes the frequency-weighted distance between anchor pairs:
$$W^{*} = \arg\min_{W^\top W = I} \sum_{c \in A} n_c \, \lVert W \mu^{S}_{c,l} - \mu^{E}_{c,l} \rVert^2 .$$
Here $A$ is the set of shared codes and $n_c$ is the smaller of the two languages' note counts for code $c$. Like word-level Procrustes alignment, this has a closed-form solution through a singular value decomposition. We insert $W$ at layer $l$ and run the English-trained coding model above it.
The second variant is trained. During English task fine-tuning, we add a contrastive term at layer $l$. For each code $c$, the term pulls a minibatch estimate of $\mu^{S}_{c,l}$ toward $\mu^{E}_{c,l}$ and pushes it away from the English averages of other codes. Following AlignFreeze, the layers below $l$ are frozen.
Repairing rare codes. Most codes are rare; half of ICD-10 codes occur in three or fewer discharge summaries according to Mimic-IV-ICD. Averages over a handful of notes are noisy. As the one ingredient drawn from clinical vectorization proper, we shrink each rare code's average toward its neighbours. The neighbours come from a code embedding learned on English MIMIC-IV visit sequences, in the Word2vec-over-trajectories style of Bajor and Lasko and Jia et al.. That embedding is built from codes alone, so it is language-independent, and it encodes which diagnoses occur together. Whether this shrinkage helps is an empirical question, and we ablate it.
Privacy. Code averages are aggregate statistics. A hospital could share them without sharing notes. We note this practical advantage but do not make it a claim to be tested here.
Data. English source notes come from MIMIC-IV discharge summaries with ICD-10 labels (MIMIC-IV-ICD10). The Spanish target is CodiEsp, Spanish clinical case texts coded with ICD-10, as used in Medical Crossing. We split CodiEsp codes into two groups:
- "anchored" codes, which appear in Spanish training notes and are used to fit the alignment;
- "held-out" codes, whose Spanish training labels are removed entirely and which are labelled only in English.
The held-out group is the decisive test set.
Limitations of the data. CodiEsp texts are published case reports rather than routine hospital notes. Spanish is also a high-resource, Latin-script language. The medical VQA study shows that resource level and script do not predict clinical robustness. We therefore treat a second, structurally distant coded corpus as a needed extension, not something this file supports.
Baselines
Naive reference. XLM-R Large fine-tuned end-to-end for ICD coding on English MIMIC-IV, then applied directly to Spanish CodiEsp. This is plain zero-shot transfer and measures what the misalignment costs.
Translate-test. Spanish notes are machine-translated into English and coded by PLM-ICD (the RoBERTa-based coder benchmarked in Mimic-IV-ICD), trained on the same MIMIC data. The clinical NER study found translate-test weaker than cross-lingual transfer for large models, but document-level coding may tolerate translation errors better than extracting spans, so it must be run.
Joint fine-tuning, the strongest competitor. XLM-R Large is trained on MIMIC-IV plus the Spanish training notes, with one shared output layer. It uses the same Spanish labels our method uses, so it is the honest version of "just use the codes." On anchored codes we expect it to match or beat us. Beating it means doing better on held-out codes.
Parallel-text realignment. Contrastive realignment in the style of Gaschi et al., using the translated medical corpora from the clinical NER study (BioWMT19, UFAL, Medline). This is the best alignment method that spends translated text instead of codes. Matching it without translations would be the practical win.
Term linking. CODER, used to link extracted Spanish mentions to ICD-10, with the linked codes aggregated per document. On held-out codes this is the most dangerous competitor, because CODER's knowledge-graph training covers concepts regardless of how often they appear in notes.
Reported numbers. There is no reported result on Lacuna for document-level CodiEsp coding by any of these systems. The closest figures concern linking single mentions. On CodiEsp, SapBERT Acc@1 drops from 47.83% to 32.61% once seen concepts are filtered out, and a general BERT drops to 6.49% (Medical Crossing). On the English side, the best Mimic-IV-ICD10 models reach Macro F1 of 5.42% with Macro AUC up to 97.07%, which shows how weak long-tail performance is even within English. We therefore rerun every baseline ourselves.
Fair comparison. All systems share the same backbone, chunking, label space at the three-character level, and hyperparameter search budget. Translation compute for translate-test and the realignment corpora is reported separately.
Ablations.
- Shuffled anchors. Spanish averages are paired with English averages of random codes. This isolates the code identity as the active ingredient.
- No shrinkage. Rare-code averages are used as estimated, without the trajectory-based repair.
- Layer choice. The alignment is placed at different layers, compared against the retrieval curve measured before training.
- Anchor-set size. The number of anchored codes is varied to find how many are needed.
Why not just…?
Why not just jointly fine-tune on both languages with a shared output layer? This is the real threat. On codes with Spanish labels, a shared output layer already acts as a code-anchored alignment. Our claim is narrower: explicit alignment of averages in a middle layer generalizes to codes without target labels, because one global map is fitted rather than separate per-code decision boundaries. The held-out split settles it. If joint fine-tuning matches us on held-out codes, the idea reduces to multilingual multi-task training, and we would report that as a negative result.
Why not just translate the Spanish notes and use an English coder? Translation of clinical text distorts abbreviations and local terms. The clinical NER study found translate-test behind cross-lingual transfer for large models, and the clinical QA study (When Multilingual Models Compete…) had to discard the worst 15% of projected alignments. Those were span-level tasks, though, and document-level coding may be more forgiving. We run translate-test with PLM-ICD at matched training data and let the held-out-code scores decide.
Why not just link mentions with CODER and skip the encoder? CODER handles the open-class terminology problem directly. It may well win on codes with clean surface mentions. It cannot use note-level context, such as negation, hedging, or diagnoses inferred from combinations of findings. That context is what multilingual negation work argues needs contextual encoders. We report results separately for codes whose Spanish gold label has an explicit mention in the text and for codes that are only implied. If CODER wins both groups, document-level alignment is unnecessary for this task.
Why not just use parallel medical text for realignment, which is known to work? It does work, as the clinical NER study shows. But it needs translated corpora that most target languages and hospitals lack, whereas coded notes are a by-product of billing. The comparison asks whether code anchors recover most of the realignment gain at zero translation cost. If they recover far less, that limits the proposal's practical value.
Decisive Checks
Primary metrics. Micro and macro F1, plus mean average precision, on CodiEsp. These are reported separately for anchored and held-out codes, with bootstrap confidence intervals over documents.
What would support the core claim. Two results together:
- On held-out codes, code-anchored alignment clearly beats both joint fine-tuning and naive zero-shot transfer.
- The shuffled-anchor ablation collapses back to zero-shot performance.
Secondary diagnostic. Code-centroid retrieval accuracy, measured layer by layer before and after English fine-tuning. Whether this score predicts held-out-code F1 across the three backbones tests whether Gaschi et al.'s correlation between alignment and transfer carries over to clinical document coding.
Shrinkage check. The trajectory-based repair earns its place only if it improves held-out codes in the rare-frequency range more than in the frequent range.
What would falsify the proposal. Any one of the following:
- joint fine-tuning or CODER matches the method on held-out codes;
- realignment with parallel text dominates it at every anchor-set size;
- the retrieval score rises without held-out F1 rising.
References
- Low-Resource Sequence Labeling via Unsupervised Multilingual Contextualized Representations
- Unsupervised Word Mapping Using Structural Similarities in Monolingual Embeddings
- A Distribution-based Model to Learn Bilingual Word Embeddings
- Multilingual Alignment of Contextual Word Representations
- CODER: Knowledge infused cross-lingual medical term embedding for term normalization
- Multilingual Clinical NER: Translation or Cross-lingual Transfer?
- Exploring the Relationship between Alignment and Cross-lingual Transfer in Multilingual Transformers
- Analyzing and Mitigating Cross-Lingual Degradation in Multilingual Medical VQA
- Medical Crossing: a Cross-lingual Evaluation of Clinical Entity Linking
- First Align, then Predict: Understanding the Cross-Lingual Ability of Multilingual BERT
- AlignFreeze: Navigating the Impact of Realignment on the Layers of Multilingual Models Across Diverse Languages
- Mimic-IV-ICD: A new benchmark for eXtreme MultiLabel Classification
- Predicting Medications from Diagnostic Codes with Recurrent Neural Networks
- The high-dimensional space of human diseases built from diagnosis records and mapped to genetic loci
- When Multilingual Models Compete with Monolingual Domain-Specific Models in Clinical Question Answering
- Multilingual Negation Scope Resolution for Clinical Text