Elamur Research

Efficiently and Thoroughly Anonymizing a Transformer Language Model for Dutch Electronic Health Records: a Two-Step Method

Paper · 2022 · Stella Verkijk and Piek Vossen

Summary

Hospital notes contain the language a system needs to understand clinical writing, alongside names that can connect that writing to individual people. Training on notes inside a secure hospital environment protects access to the records during development. Releasing the resulting language model raises a separate question. Could someone give it a fragment of clinical text with a name missing and get back the name that appeared in the original note? The authors investigate that question for MedRoBERTa.nl, a Transformer trained from scratch on nearly 10 million Dutch hospital notes from Amsterdam University Medical Centres.

The method changes the training text first and the vocabulary after training. An automatic named entity recognition system replaces detected personal names with PERSON and detected geopolitical names with GPE. The shared labels preserve some information about the kind of expression that occurred in each position. The recognizer can miss names, however, and a missed name can be frequent enough to enter the vocabulary. The authors therefore ask the trained system to fill blanks in passages where PERSON had replaced a name. They inspect the resulting candidate tokens and substitute opaque labels for 212 distinct possible names in the vocabulary. The lookup can then return a label in place of the original spelling.

The final test uses a separate set of 200 sentences drawn from material used in pretraining and material held out from it. The researchers inspect the first 20 suggestions at each masked position. In those 4000 predictions, 8 tokens look like names, giving the reported prediction-level rate of 0.2%. Each appears in a different sentence, and each ranks below the leading suggestion. The authors document checks against the original wording for the 4 held-out sentences that elicited name-like outputs. In every documented check, the suggested name differs from the one in the note. The paper gives less detail about the corresponding checks on sentences drawn from the pretraining data.

The test measures a specific kind of exposure. Its evidence concerns single-token completions in selected contexts, after both stages of anonymization. It leaves open how much each stage contributed, what other forms of identifying information could be recovered, and how the changes affect performance on clinical tasks. The hospital’s privacy office reviewed the procedure, results and code and granted permission to release MedRoBERTa.nl openly, along with the held-out portion of the test set.

Deep dive: Efficiently and Thoroughly Anonymizing a Transformer Language Model for Dutch Electronic Health Records: a Two-Step Method

How MedRoBERTa.nl anonymizes Dutch hospital notes and screens its vocabulary, and what masked-name tests reveal about privacy after both steps. · about 32 minutes to read

The problem and its context

What a specialized system can learn from hospital notes

An electronic health record can contain free-text notes written by staff in the course of treating a patient. These notes express information in the language people use at work. The paper treats that writing as a resource for natural language processing in medicine. Systems that handle it accurately could support work such as recognizing early symptoms, estimating the likelihood of rehospitalization or helping clinicians make decisions. These are examples of what the authors hope specialized processing can enable. The anonymization study itself evaluates a privacy question about the underlying language technology.

The authors place MedRoBERTa.nl in a line of research that includes BERT and RoBERTa. Such systems learn from the contexts in which words occur during pretraining, the initial learning stage before adaptation to a particular application. The paper points to material such as Wikipedia as a source for general systems and to applications such as translation and question answering as uses of the resulting representations. A system trained for Dutch medicine faces a more specific requirement. Its input includes the lexical variation of clinical writing, and its representations need to serve tasks that use that vocabulary.

This concern shapes a choice with direct consequences for privacy. MedRoBERTa.nl uses a vocabulary derived from the hospital corpus. The vocabulary is the inventory of units the system can process and propose. Building it from the notes gives frequently occurring medical expressions a chance to have entries of their own. A term without its own entry can still be processed as smaller units, although the authors regard that as a less accurate way to represent the term. The same frequency-based procedure can preserve a personal name if the training text still includes it frequently enough. A design choice intended to retain useful domain language can also retain unwanted strings.

The paper gives BERTje and RobBERT as examples of general Dutch systems. They provide context for developing a Dutch system specifically for medical notes. Their role in the companion work on MedRoBERTa.nl concerns performance on medical language tasks. The privacy paper uses a different kind of evaluation, built around the ability to propose words for a blank in a note. Good performance on a clinical task and a low rate of name-like suggestions answer different questions about the same release.

Why removing record access leaves a privacy question

The paper distinguishes direct access to source data from exposure through the behavior of a trained system. In its account of MedRoBERTa.nl, the notes stayed on a secured hospital server. The authors regard that arrangement as protection against direct exposure in the development and release process. Their remaining concern is what someone could infer from the released artifact, which embodies associations learned from the notes and can be asked to apply them.

The distinction matters because the useful and potentially revealing behavior can take the same form. In a fill-mask task, a piece of text contains a blank. The system scores possible tokens for that position using the text that surrounds it. A plausible completion can reflect ordinary usage. It can also resemble something the system encountered during training. The paper asks whether this capability could connect a person’s name to a particular piece of clinical writing. Because the system assigns scores to its suggestions, the privacy question also extends to what those scores might reveal.

Work on the internal behavior of BERT provides part of the authors’ motivation. Their reference to A Primer in BERTology supports their point that these systems can be difficult to interpret. A useful representation of clinical language offers little direct visibility into which specific associations have been retained. Testing an observable behavior therefore gives the study a practical starting point. A blank in a position known to have held a name creates an opportunity to see which alternatives the system actually ranks highly.

The authors draw their broader privacy terminology from a survey of deep learning. In that account, membership inference asks whether a particular item participated in training. The paper discusses model inversion and attribute inference in connection with learning something about source information from predictions. It also discusses property inference, which concerns patterns in the training data. These questions have different targets. Whether a specific note was present, whether a detail associated with a person can be recovered and whether a dataset has a particular property are distinct claims that call for distinct evidence.

The paper points to earlier work on membership inference to illustrate why prediction behavior deserves attention even when the underlying records are inaccessible. In the example it discusses, confidence scores provide evidence used to classify inputs by whether they belonged to training data. The anonymization study takes a narrower approach. It examines suggested tokens and their positions in a ranking, with some checks against the original wording. Its question is whether names surface in those completions. An evaluation of membership inference would instead need to judge decisions about the training status of particular inputs.

The survey also considers attempts to infer how a system was built or to recover its parameters. The authors set aside that concern for MedRoBERTa.nl because they planned to publish the system and its construction code. The disclosure they wanted to prevent concerned patients and other people mentioned in the notes. Openness about how the system was built was part of their publication plan, and the privacy assessment focused on information carried over from the records.

From editing records to examining what can be returned

The paper cites work on automatically de-identifying clinical text, including research on discharge summaries, longitudinal clinical narratives and Spanish medical text. In this setting, de-identification means finding information that identifies someone and editing the text to remove or replace it. This earlier work supplies the starting point for the authors’ procedure. At the scale of the Dutch notes, finding mentions by hand would be impractical. An automatic recognizer can apply the same operation across the corpus.

The object to be released changes the question. A team preparing a collection of notes for access can inspect the passages readers will receive. A team releasing a fill-mask system also has to consider the set of strings it can propose in response to input. A name missed during editing might show up among those strings. An inspection of the system’s output vocabulary can therefore address something that ordinary record editing leaves unresolved.

The two stages also handle errors at different levels. An automatic replacement changes what the system sees in an individual passage. If the recognizer mistakes a medical expression for a name, that occurrence disappears from the training text. If it misses a name, the name remains available as input. Vocabulary review concerns whether a particular spelling remains available as a single output unit after training. For a sensitive string that entered the inventory, the authors can change the form returned by the vocabulary lookup. This intervention has a narrower target than another pass over all the records.

The underlying tradeoff is especially visible in the decision about entity categories. A passage may contain the names of people, geopolitical places or institutions, along with medical expressions that a recognizer can mistake for names. Replacing a wider range of supposed entities can remove more of the language the researchers wanted to learn. The significance of a replacement depends on what was in the passage and why that information matters. The authors’ procedure reflects a priority on personal names, with separate treatment of geopolitical names and a different decision about organizations and other locations.

This makes the privacy problem concrete enough to test while leaving it broader than any one score. The authors can ask whether a name reaches the text the system learns from, whether its spelling becomes a vocabulary item and whether that item is then proposed in a name context. Each question concerns a different stage. The paper’s method works by putting an intervention at the first and last of those stages and checking the behavior at the end.

The method, step by step

Replace detected identifiers before learning from the notes

The corpus came from Amsterdam University Medical Centres and contained nearly 10 million hospital notes, amounting to more than 13.2 GB of data. Training took place on the hospital’s secured server. The scale determined where the authors could use human judgment. They automated the first pass over the text and reserved manual work for a much smaller collection of contexts and candidate tokens.

The first pass used spaCy’s Dutch nl_core_news_lg recognizer. Named entity recognition assigns categories to spans of text, such as a personal name or the name of a city. The Dutch recognizer described in the paper was trained using the LassySmall training material, which spaCy had augmented with entity annotations through NLP Town. The paper gives the size of that training set as 6641 sentences. That figure describes the material behind the recognizer, whereas the hospital notes are the separate corpus to which it was applied.

For a span identified as someone’s name, the procedure put PERSON into the note. A span recognized as a country, state or city name received GPE. The latter is the category for a geopolitical entity. These labels suppress the spelling of the identified expression while retaining a coarse distinction between people and places. The replacement applies at the occurrence level. Detected names belonging to different people receive the same label, including names of staff as well as patients.

There is a second effect beyond hiding the spelling at each replaced position. The authors expect PERSON to become common in contexts where a personal name would otherwise occur. Consider the position after a form of address or a place in a sentence where the subject is the patient. Repeatedly putting a shared token there lets the system learn that this token fits a range of person-related contexts. The paper also notes that clinical notes already use abbreviated forms of address and words referring to patients on their own. A predictor has these ordinary alternatives available even if a name has escaped detection somewhere in the records.

That account is a reason for using a common label. An occurrence of a rare residual name has to compete at prediction time with expressions that the system has encountered across many relevant contexts. A label can therefore alter what the system learns to expect in a blank even where the original notes varied in which name they supplied. The authors describe this as a desirable change in contextual associations. The study later checks those associations by observing predictions, without measuring their strength before and after the text replacements.

The recognizer makes errors in both directions. A personal name can remain in the text, and an expression from clinical language can be marked as a person. The latter error matters twice. It removes a useful expression from that occurrence in the training data, and it can later make a PERSON position look suitable for a privacy test even though that position originally contained a medical term. The authors address the second problem by manually choosing contexts for the name probes.

They did not extend the replacement policy to a broader range of entities such as organizations and other locations. In preliminary experiments, spaCy frequently confused those categories with diseases, medicines or other medical terms. The team judged the resulting loss of domain vocabulary too costly, given the lower priority they assigned to the privacy of organizations. GPE was still used for recognized geopolitical names. This boundary is part of the procedure, and later appearances of hospital names among the suggestions are consistent with the decision to leave organization names in scope for learning.

Learn a vocabulary and train the system

MedRoBERTa.nl was trained from random initialization. In other words, it began this training with fresh settings for the quantities it would learn, rather than starting from a previously trained general Dutch system. It also used a newly constructed vocabulary. The authors report collecting the 52.000 most frequent words in the automatically anonymized corpus for that vocabulary. Building the inventory after replacing detected entities means that the frequencies used to build it reflect the edited notes.

Subword tokenization gives the system a way to handle words beyond its inventory of complete forms. The paper describes breaking a word that lacks its own entry into smaller pieces, down to byte units. A common clinical expression with its own entry can be handled as a unit. A word that requires segmentation is represented through the available pieces that make it up. This distinction is particularly important when interpreting what can fit in a single masked position. A predictor can still work with a word expressed in pieces in its input, while a single prediction has to come from the output inventory.

A vocabulary entry also connects a token to its learned embedding. An embedding is a numerical representation used in processing a token. In the authors’ explanation, the context in which a word occurs helps shape how the system represents and uses it. For the purpose of their anonymization procedure, the important connection is between a token the system can score and the string associated with it in the vocabulary. That is the connection the authors change in the second stage.

The training objective is to recover masked tokens. The system sees an input in which some of the original material has been covered, and it learns to assign higher scores to the missing material on the basis of its context. A fill-mask query uses this trained capability with a deliberately chosen blank. It returns possible tokens for that blank in descending order of score. The scores span the vocabulary, so a long enough list will include weak suggestions as well as tokens that fit well. The authors exploit that property when looking for possible names that the most obvious completions might obscure.

The procedure makes use of the difference between learning from occurrences and making output strings available. With the first stage, the system can learn from a clinical statement containing PERSON without seeing the name that occupied the position in the source note. Missed instances remain a difficulty because a name might survive into the training material or the vocabulary. With the second stage, the researchers look for individual vocabulary items to relabel. They do this after learning because the trained rankings supply evidence about which items to inspect.

Anonymizing the notes and screening the output vocabulary

The steps in order.

Anonymizing the notes and screening the output vocabularyStep 1: Replace detected names with shared entity labels1. Replace detected names with shared entity labelsStep 2: Build a vocabulary from the edited notes2. Build a vocabulary from the edited notesStep 3: Train by predicting masked tokens3. Train by predicting masked tokensStep 4: Select contexts where a name belonged4. Select contexts where a name belongedStep 5: Collect and inspect ranked completions5. Collect and inspect ranked completionsStep 6: Relabel vocabulary entries that could be names6. Relabel vocabulary entries that could be namesStep 7: Test on separate masked sentences7. Test on separate masked sentences

Find surviving name-like entries with masked contexts

The authors begin the vocabulary review with two pools of 8k sentences containing PERSON. One pool comes from the pretraining data. The paper calls these sentences seen because the system learned from the data that supplied them. The other pool comes from validation material drawn from the same source and held out from pretraining. Those sentences are unseen in the sense that they did not participate in the training updates. The distinction says where the sentence came from. It does not establish that every word or person mentioned in an unseen sentence was absent elsewhere in the corpus.

The authors manually choose 100 sentences from each pool. They look for cases in which a personal name clearly makes sense in the position occupied by PERSON. This screening matters because the recognizer can assign that label to other expressions. If a blank normally calls for a drug name, the system might generate a medical term with a high score and provide little insight into how it fills a person slot. Selecting contexts by hand keeps the development probes directed at the kind of output the authors want to find.

The resulting development set has 200 items. The authors replace PERSON with a mask, so the system receives the context around the label without being told which token had been placed there during anonymization. The task differs from reconstructing a source note verbatim. The original spelling had already been replaced in the chosen sentence. The authors ask which available vocabulary items the surrounding words bring into the ranking, including possible names that may have survived elsewhere in the training material.

This makes the starting material for the vocabulary review different from a general inventory of names. The researchers do not need a complete list of every person in the corpus to perform this step. They use the system’s rankings to surface strings that might serve as personal names in contexts drawn from the notes. At the same time, the review can only see candidate strings that the chosen probes raise far enough in the rankings. The kinds of sentences selected and the depth of the candidate lists define the search.

For each development sentence, the authors collect the top 40 predictions. Taking a broad slice of the ranking lets the review reach beyond obvious suggestions such as titles and patient labels. A name might be a comparatively poor fit yet still have a high enough score to make the list. The broader cutoff also brings in many ordinary words. The paper mentions titles, patient abbreviations, a medicine and a connective meaning roughly “so” or “therefore” as examples of the variety in the candidate pool.

Human review is what makes the second stage semi-automatic. The system proposes the tokens. People then inspect the collected material repeatedly and select forms that could be personal names. The paper describes treating capitalized nouns as potential names during inspection. The criterion is possibility, so a selected form need not be an unambiguous name in every use. That caution makes sense for screening, but it also means the procedure can choose entries that have ordinary or clinically relevant readings in another context.

The distinction between the seen and unseen pools gives the authors a way to compare what the review finds under two conditions. The seen probes come from the text used to build the system. The unseen probes test whether it makes similar strings available as ranked alternatives in other notes from the same source. The final vocabulary change uses the combined collection. A potential name that becomes visible only in one pool still qualifies for review and relabeling.

Relabel the selected entries

The combined review yields 212 distinct possible names. The authors replace each selected spelling in the vocabulary with a label formed from unk, meaning “unknown,” and a randomly generated number. This operation is performed on the vocabulary entry. When the system selects the corresponding entry in a fill-mask prediction, the returned form is the opaque label. The item can therefore appear in a prediction list without exposing the spelling selected for removal.

An output label of this kind serves a different purpose from PERSON. PERSON is a common training token introduced wherever the automatic pass detects a personal name. It pools many contexts into a shared expression. The unk labels are assigned after training to individual entries found during review. They change what is visible when those entries are selected. An unknown label among the predictions can be a sign of this substitution doing its job, even though the system still found the associated entry compatible with the context.

The published procedure is in that sense a vocabulary edit. Its privacy mechanism depends on which spellings were found and on the fact that the specific fill-mask operation outputs vocabulary entries. The paper describes no further training pass to erase the learned associations corresponding to the renamed entries. Possible names outside the selected set can still be returned if their entries remain available. A name absent as a complete entry also presents a different question if it can be represented through pieces.

The authors made the code used to build MedRoBERTa.nl available and identify the separate release of the unseen anonymization test sentences. The paper specifies the anonymization workflow through its replacement rules, sample sizes, rank cutoffs and manual judgments. It presents the masked training objective in prose. The inequalities in its results tables set ranges for prediction frequencies and do not define a training loss or a privacy guarantee.

Experiments and results

The final test and what it counts

The development sentences were used to discover which vocabulary items to relabel. The final test uses other sentences, chosen after the authors had made that distinction between development and evaluation. They return to the two source pools of 8k sentences and use the same relevance criterion to select new material. The resulting test set has 200 sentences in all, drawn from seen and unseen text. No sentence chosen for vocabulary development was reused in the final test.

The paper illustrates the kinds of positions the authors screened. In one passage, a person reports that illness has affected the family. In another, the missing expression refers to the person sent to an ophthalmologist. A sign-off creates a position for the name of a speech therapist, and a patient-record field explicitly asks for a name. Another passage places the blank before a description of someone’s fatigue. Taken together, the examples show how a name can fit narrative prose, a referral, a signature, a form field or a compressed note. These are contexts in which privacy can concern people other than the patient as well.

In each sentence, the test masks the position occupied by PERSON in the edited text and gathers the first 20 predictions. Across the combined test, this produces 4000 suggestions. The researchers count tokens judged to be name-like, examine which ranks they occupy and, where the paper describes the comparison, check the returned name against the original one. Three observations follow from this design. The rate of name-like tokens describes the contents of the candidate lists. The number of sentences with any such token describes how the candidates are distributed over queries. Checking the original spelling addresses whether any particular suggestion matches a name in a source note.

The test compares the same anonymized system across material seen during pretraining and material held out from it. The paper gives no fill-mask privacy results for BERTje or RobBERT and no results for an untreated version of MedRoBERTa.nl. The general Dutch systems mentioned earlier belong to the comparison on clinical tasks described in the companion work. The available controls here are the distinction between seen and unseen material, fresh sentences for the final test, and the check against original wording for documented cases.

The predictions were collected from passages where a name was judged appropriate. Still, a useful answer to the privacy question need not be a linguistically exact substitute for the name. A pronoun, a title or a label can all fit sufficiently well to receive a high score. The test is interested in whether a name is available as a likely suggestion when the context gives the predictor a reason to produce one. It does not need the system to choose a word that would reproduce the original sentence naturally in every respect.

How often names appeared and where they ranked

The authors find 8 name-like tokens among the 4000 predictions. The reported 0.2% is a rate over all inspected suggestions across both splits. The separate sentence-level result is that 192 out of 200 sentences produced no name-like token anywhere in the inspected list. The paper reports 4 name-like outputs for the seen sentences and 4 for the unseen sentences. The suggested names each appear only once.

None of the name-like outputs has the top score for its sentence. The highest-ranked one on seen material appears in the 6th position. On unseen material, the highest-ranked one appears in the 14th position. These ranks tell a reader how far down the returned list the first examples occur in each split. They are extrema across the test material, so they describe the most prominent observed name-like prediction in each group. They give no estimate of a typical rank across notes in the hospital corpus.

Rank of the highest-placed name-like output on the final anonymization test

The earliest name-like suggestion appeared deeper in the ranking for held-out sentences.

Rank of the highest-placed name-like output on the final anonymization testMedRoBERTa.nl on seen sentences: 6MedRoBERTa.nl on seen sentences6MedRoBERTa.nl on unseen sentences (this paper): 14MedRoBERTa.nl on unseen sentences (thispaper)14
The numbers
System or settingrank position
MedRoBERTa.nl on seen sentences6
MedRoBERTa.nl on unseen sentences (this paper)14

A larger position number in this chart means the candidate sits farther from the leading suggestion, which is preferable for this specific privacy diagnostic. The two rows are evaluations of the same system. The equal counts of name-like tokens on the two splits coexist with the difference in highest rank. A count treats every suggestion inside the cutoff equally. Rank distinguishes a name that a user sees near the top from one that appears after many other suggestions.

The absence of a name-like first choice is useful when interpreting a setting that displays only the most probable completion. The reported 0.2% addresses a wider output list. Neither figure describes every rank the system assigns, because the final check ends at its chosen cutoff. The paper’s distinction between the broader development search and the shorter final prediction lists is therefore important. The development search is a way of finding candidates for removal. The final test is a measurement of residual outputs within a specified window.

The authors also ask whether a name-like suggestion equals the name written in the source note. They report recovering the original wording for the 4 unseen sentences that elicited such suggestions. In all those documented cases, the spelling proposed by the system differs from the original name. The paper’s opening account describes the name-like predictions more generally as failing to reproduce the source names. The detailed test section gives the source comparison explicitly for the unseen cases. The seen cases contribute to the reported counts and ranks, with less information about comparison against their originals.

That source check gives the term name-like a precise role. A string can resemble a name and be grammatically plausible in the blank without identifying anyone connected to that note. Conversely, an exact match would be worth investigating because the surrounding clinical context already comes from a real record. Counting plausible names is a screening measure. Recovering the original spelling and comparing it with the output is a separate step that determines whether a candidate passes that particular match test.

What frequently appeared in the lists

The paper tabulates tokens that appeared at least 4 times in the prediction lists for each split. These are counts across suggestions, and a large count can exceed the number of queries contributing the most probable suggestion for that token. The tables are best read as a description of the recurring alternatives that the system placed somewhere in its inspected rankings. They do not give a separate success rate for producing any one token as the top completion.

The person placeholder is prominent. In the seen split, the table lists PERSON at 179 predictions. In the unseen split, the displayed Person entry has 180 predictions. GPE occurs 113 times on seen material and 118 times on unseen material. Thus the missing-name probes frequently elicit the labels introduced during automatic replacement. The counts illustrate the authors’ account of how the edited notes shape the available completions. They describe the two-stage system and leave open what the relative frequencies would have been under another editing policy.

Titles and forms of address recur in both splits. So do references to patients and relatives, pronouns, and some words referring to clinical roles. The tables also contain opaque unk labels. Their presence connects the vocabulary edit to an observable output. Relabeled entries can still receive scores that put them within the recorded lists, while the displayed forms are anonymous. The tables also group several hospital names into an organization category for reporting. That grouping reflects how the table counts those predictions. It does not indicate that each hospital name was replaced with an organization label during training.

These distributions help show how a test item can generate very different suggestions without any of them being the intended name. A family relationship may make sense in a short progress note. A clinician’s title can fit a signature. A patient label can fit a form. The goal of the test is to draw out name suggestions in contexts where those alternatives are also possible. The results show that much of the recurrent output consists of categories and ordinary roles, while the residual forms judged to look like personal names are infrequent inside the inspected lists.

What the release decision covered

The authors took the system to the privacy office of Amsterdam University Medical Centres. They supplied documentation of the procedure, the anonymization results and the source code, and discussed the case with the office. The office then authorized open publication of MedRoBERTa.nl and the test sentences that had been held out from pretraining. The paper records public availability of the system for fine-tuning, the process of adapting pretrained capabilities to a more specific task.

That approval is part of the outcome of the project. It establishes that the institution responsible for the records considered the documented process and permitted the specified release. The quantitative evaluation is a separate piece of evidence. It describes observed outputs from the tested configuration and sample. Keeping those claims distinct helps a reader understand both the practical decision and the scope of the experiment.

What the ablations show

The paper has no formal ablation that repeats the final privacy test with either anonymization step removed. It instead offers a preliminary comparison that influenced which entity categories were replaced, an analysis of the candidates found during vocabulary review, and a comparison of final predictions across seen and unseen sentences. These comparisons illuminate different parts of the design. They cannot assign a measured share of the final result to each stage.

Why the replacement policy stayed selective

The preliminary spaCy experiments showed a practical source of error when the authors considered a broader de-identification pass. The recognizer frequently labeled medical vocabulary as an organization or location. That is consequential because the language of diseases and treatments is part of what the specialized system is intended to learn. A broader replacement policy would make the system encounter some of that language less often, and might affect which terms are frequent enough to receive vocabulary entries.

The paper gives this observation as the reason to refrain from anonymizing the broader organization and location categories. It does not present a numerical comparison between a broad replacement policy and the policy adopted. The evidence is enough to explain the design decision. It offers no estimate of how much clinical performance either policy would preserve or how much exposure the broader version would prevent. The final presence of hospital names is compatible with the selective policy. The paper treats this outcome differently from a residual personal name because the kinds of entities had different priorities in the design.

The same issue shows up in the manual choice of probe sentences. An erroneously assigned PERSON label can sit where the note calls for a medicine or an illness. Selecting sentences whose contexts clearly called for people controls that source of ambiguity for this experiment. It also changes what the experiment can tell us. The selected items target likely name positions, while positions that are difficult to interpret are less likely to be taken up by the probe set.

What the development pools found in common

During vocabulary review, the unseen development sentences yield 144 potential names. Of those, 97 also occur among the predictions collected from the seen development sentences. This overlap shows that a substantial part of what the reviewers found in held-out contexts could also be found using contexts from pretraining. The paper interprets the convergence as support for combining the lists into a useful collection of vocabulary entries to screen.

The overlap also makes sense given the question the probes pose. Both sets of sentences ask for plausible completions in a name position, and both draw on the same hospital source. A token that the system associates broadly with person contexts can therefore appear in either collection. The comparison says that the vocabulary review surfaced recurring candidates across these two samples. It leaves their origins unresolved. A form might be proposed because it appears in various clinical contexts, because it has uses beyond naming someone or because of a more specific learned association.

Some candidates appear under just one condition, which gives the combined review a practical advantage over relying on either collection alone. The paper reports the final union as 212 distinct possible names. The development counts are counts of selected candidates, whereas the final test counts are occurrences among ranked predictions. The two counts come from different sentences and differently sized prediction lists, with vocabulary relabeling between the stages. Treating the change in counts as an estimate of treatment effect would mix discovery and evaluation.

The paper gives a qualitative mechanism for including the broader set of development suggestions. Common forms of address and the placeholder itself can occupy the highest positions. Looking farther down allows the reviewers to see weaker associations that would otherwise be hidden by those common forms. The results provide the output of that search at the chosen depth. They do not show how the number or kinds of names discovered would change with another cutoff or a different set of contexts.

What the final split comparison can support

The final test detects 4 name-like predictions in each split. The strongest name-like suggestion on seen material is closer to the top of its list than the strongest such suggestion on unseen material. Those observations support a limited conclusion. Name-like suggestions survive vocabulary editing on both sources of test sentences, and the observed counts are equal, even though the highest observed ranks differ. The sample also shows recurring placeholders and forms of address in both groups.

A direct causal comparison would require a different design. The seen and unseen examples are different sentences. They can differ in subjects, style and how strongly their context calls for a name. The study does not hold that surrounding text constant while varying whether an example was used for training. The comparison consequently does not establish that exposure during pretraining moves a name up the ranking, or that the exposure has no effect. It describes the behavior of the finalized system on two selected groups.

The frequent appearance of PERSON is consistent with the authors’ rationale for automatic replacement. Similarly, the appearance of unk labels is consistent with the vocabulary edit intercepting some selected forms at the point where they are returned. Both observations connect the reported outputs to the design. A comparison of the full procedure with automatic replacement alone would be needed to measure how much relabeling changed name-like outputs under the final protocol. A corresponding test with different training data would be needed to estimate the contribution of the first pass. The paper measures the combined result.

Limitations

Limits the authors identify

The first acknowledged limitation is imperfect automatic de-identification. spaCy can leave some names untouched and can label clinical expressions as names. These errors matter in opposite ways. Missed names leave some of the sensitive strings in the material used for vocabulary construction and pretraining. False identifications strip out text that could otherwise help the system learn medicine. The vocabulary review is motivated by the first problem. Manual selection of clear name contexts is in part a response to the second.

The authors also acknowledge a cost in manual work. Reviewing output candidates more than once and judging whether a sentence really calls for a person’s name both require human attention. The authors argue that automatic editing reduces this burden by allowing the manual effort to focus on the smaller set of candidate forms. Their study illustrates how they organized that work at the hospital’s scale. It reports no timing or comparison of person-hours that would quantify efficiency against alternative procedures.

The authors leave a utility question open. They propose studying whether anonymization reduces predictive power and, if it does, how large the loss is. This could matter wherever the procedure removes an occurrence of a useful word or relabels a vocabulary item with both a personal and an ordinary interpretation. The paper’s reference to stronger performance on medical tasks in the companion work gives the reason for developing the system. It supplies no controlled estimate of the effect of anonymization on that performance.

The conclusion proposes applying the same broad design to other Transformer systems. The reusable design is to edit the training text and then address residual forms through a vocabulary review. The practical details depend on how the next system processes text and produces output. The paper demonstrates a particular implementation for Dutch hospital notes, with a Dutch recognizer, a domain vocabulary and a fill-mask interface. The authors provide no separate experiment establishing how the procedure performs in another language, at another institution or with a different output mechanism.

Limits of the claims supported by the design

The privacy endpoint is narrow. The test begins with a sentence chosen because one position clearly suits a personal name. It removes the shared label from that position, collects single-token suggestions and examines a limited part of the ranking. This protocol can reveal a name surfaced by that specific behavior. It does not directly test whether someone could learn a diagnosis given an identity, whether a note’s membership in training could be inferred from score patterns, or whether combinations of details could identify someone. The paper motivates the work with these broader kinds of risks, while the results concern the named-slot completion task.

Vocabulary relabeling also has a precise scope. An entry whose displayed form has been changed will return the replacement label when selected. That fact says nothing by itself about whether its former spelling can be represented as smaller pieces or whether related information remains in the learned representations. The paper explains that strings lacking full vocabulary entries can still be processed in pieces. Its final test concerns one masked position at a time. The reported output rate therefore cannot establish behavior for names that span multiple predicted units or for broader sequences.

The selection process shapes the interpretation of 0.2%. The predictions come from a fixed set of 200 manually selected sentences and from the first 20 suggestions for each. The denominator is the number of predictions under those conditions. A randomly drawn note from the corpus would present a different sampling question. So would a system that offers a different number of suggestions, or a user who supplies contexts unlike the carefully chosen examples. The paper provides a descriptive rate for its experiment and no uncertainty interval or sampling analysis to extend it to those settings.

Manual selection has a benefit here. It gives the authors reason to believe the blank really belongs to a person, which addresses known recognition errors. The same choice favors clear cases, and clarity can vary with style. A patient field and an abbreviated progress note place different demands on identification. The examples demonstrate some variety, but the paper gives no distribution over such contexts from which to judge coverage. Likewise, a string’s status as name-like involves judgment. The vocabulary review uses a deliberately inclusive rule, and the study gives no measure of agreement among reviewers that would show how reproducibly ambiguous outputs were classified.

The seen and unseen distinction is useful at the sentence level. It leaves open whether an unseen sentence mentions a person, role or phrase pattern that occurs elsewhere in the pretraining data. The paper identifies the unseen pool as validation material from the same source. It does not establish that the split was made by patient or test a separate hospital’s notes. The result is accordingly evidence about new sentences under the study’s split, with limited information about independence at the level of individuals or institutions.

There is also an asymmetry in how the paper documents recovery of original names. Its detailed account explicitly reports the comparison for the 4 unseen cases. In those cases a name-like suggestion was plausible enough to be flagged, but the original wording named someone else. The corresponding check for the seen cases is less fully described. This matters because the test’s most privacy-relevant distinction is between a plausible name and the actual name associated with a particular note. The counts support the first distinction on both splits. The detailed source comparison supports the second for the subset the authors describe.

Finally, the method gives priority to personal names. It does not apply the same editing policy to all possible identifiers, and the prediction tables show why that difference matters in practice. Some hospital names remain available. A shared person label can reduce exposure through a name while a note still contains contextual information whose privacy significance the experiment does not measure. The study provides evidence that this system rarely returned a personal-name-like token in the tested rankings and documents an institutional decision to publish. The evidence does not amount to a general guarantee about what can be inferred from the released system.

What came after

The paper documents the release of MedRoBERTa.nl and the held-out anonymization test sentences following the hospital privacy review. It presents the system as available for adaptation to medical language tasks. The release establishes what others could use and examine. The paper records no subsequent study that adopted the two-stage procedure, evaluated the released test set or measured the effects of the vocabulary edit in another setting.

The authors’ open question about predictive power identifies a concrete way a follow-up could extend the work. The privacy study measures whether recognizable personal names surface among ranked suggestions after the edits. An evaluation of utility would examine what happens to medical predictions when those edits are introduced. The procedure offers two distinct places to investigate that question. Automatic replacement changes the language available during learning, while vocabulary relabeling changes the displayed form of selected outputs after learning. A later comparison could examine their effects separately. The paper leaves that comparison open.

There is a corresponding research question about how far the privacy evaluation can extend beyond a single blank. The authors connect their study to broader concerns about inference from trained systems, but their evidence is tied to one observable behavior. The released unseen sentences make that particular evaluation easier to inspect. They also preserve the distinction the authors drew between data available for open inspection and sentences from the pretraining material. The next claims about other kinds of exposure or clinical utility would require their own measurements.

Cite

Cite as Stella Verkijk and Piek Vossen. 2022. Efficiently and Thoroughly Anonymizing a Transformer Language Model for Dutch Electronic Health Records: a Two-Step Method. Proceedings of the Thirteenth Language Resources and Evaluation Conference.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{verkijk2022efficiently,
  title = {{Efficiently and Thoroughly Anonymizing a Transformer Language Model for Dutch Electronic Health Records: a Two-Step Method}},
  author = {Stella Verkijk and Piek Vossen},
  booktitle = {Proceedings of the Thirteenth Language Resources and Evaluation Conference},
  year = {2022},
  doi = {10.63317/4jkv4oq2gtcf},
  url = {https://doi.org/10.63317/4jkv4oq2gtcf}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/verkijk-2022-efficiently-thoroughly-anonymizing-transformer-language/