---
title: "Driving Context into Text-to-Text Privatization — Arnold 2023"
description: "Driving Context into Text-to-Text Privatization tests whether choosing a word’s intended sense before adding noise preserves more meaning."
canonical: "https://research.elamur.ai/free/en/papers/arnold-2023-driving-context-into-text-text/"
---
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/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/arnold-2023-driving-context-into-text-text/)

[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/) / Driving Context into Text-to-Text Privatization

# Driving Context into Text-to-Text Privatization

Paper · 2023 · Stefan Arnold, Dilara Yesilbas and Sven Weinzierl

**Authors:** [Stefan Arnold](https://md.research.elamur.ai/free/en/authors/stefan-arnold/), [Dilara Yesilbas](https://md.research.elamur.ai/free/en/authors/dilara-yesilbas/) and [Sven Weinzierl](https://md.research.elamur.ai/free/en/authors/sven-weinzierl/) · **Year:** 2023 · **Venue:** Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **6** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/arnold-2023-driving-context-into-text-text/cited-by/) · Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2023.trustnlp-1.2/)
- [PDF](https://aclanthology.org/2023.trustnlp-1.2.pdf)
- [DOI 10.18653/v1/2023.trustnlp-1.2](https://doi.org/10.18653/v1/2023.trustnlp-1.2)

## Summary

A system that obscures sensitive text by replacing words has to decide which replacements make sense. A conventional approach gives each word a single position in a space of related words. It adds random noise to that position and returns the word nearest the result. This gives the system a way to vary what it releases while favoring related outputs. But a single position has to serve every use of an ambiguous word. For *bank*, the same position supplies replacements in a passage about a river and in a passage about money. A replacement drawn from the wrong neighborhood can change what a sentence seems to be about.

Arnold, Yesilbas, and Weinzierl change the starting point of this procedure. They build groups of related words from Wikipedia and use those groups to give a word several fixed representations when it has several senses. Before perturbing a word, they use its surrounding words to choose among those representations. This is a form of [word sense disambiguation](https://md.research.elamur.ai/free/en/concepts/word-sense-disambiguation/). The chosen representation receives noise, and the nearest candidate is converted back into an ordinary word. Context thus affects the distribution from which a replacement comes, while the final text retains the same kind of output as the conventional procedure.

Adding senses changes the geometry of the space, so the authors recalibrate the noise before comparing the methods. Their privacy measurements track how often a word comes back unchanged and how many different alternatives appear under repeated queries. The two methods show similar patterns on these measures across the noise settings, with the sense-based method reaching comparable proxy thresholds with less noise. In a separate comparison, replacements for occurrences of the same ambiguous word are more similar when the occurrences share a meaning than when they express different meanings. The conventional method shows much less separation. The advantage in agreement with human similarity judgments is clearest on the dataset that supplies context.

On the [Word-in-Context benchmark](https://md.research.elamur.ai/free/en/papers/pilehvar-2019-wic-word-context-dataset-evaluating/), BERT reaches validation accuracy of 0.6006 after training on text privatized with ordinary word representations and 0.6423 after training on text privatized with sense representations. The corresponding score without privatization is 0.6887. A selection of [GLUE tasks](https://md.research.elamur.ai/free/en/papers/wang-2018-glue-multi-task-benchmark-analysis/) also shows higher average performance at the stricter of the paper’s two calibration settings, although the gains vary across tasks. Together, these experiments show that a randomized substitution can retain clues about which meaning a word expressed. The empirical privacy comparison concerns substitution behavior under repeated queries, and the induced senses have no external definitions against which to check individual sense choices.

## Deep dive: Driving Context into Text-to-Text Privatization

Driving Context into Text-to-Text Privatization tests whether choosing a word’s intended sense before adding noise preserves more meaning. · 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

#### Changing words before using the text

The authors begin with a conflict between using text and controlling what it reveals. Text can contain personal information, and earlier studies cited by the paper show that information can be recovered from systems trained on it. Text-to-text privatization intervenes before that use. It takes a text as input and releases another text whose words have been chosen by a randomized procedure. A later classifier can still work with normal vocabulary. The practical question is how much of the original signal remains available after the words have changed. [Extracting Training Data from Large Language Models](https://md.research.elamur.ai/free/en/papers/carlini-2020-extracting-training-data-large-language/)

The inherited procedure uses [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical representations that place vocabulary items in a shared space. The approach assumes that nearby words tend to play related semantic or syntactic roles. A word’s vector supplies a location to perturb. Once noise moves that location, the procedure finds the nearest vocabulary vector and emits the associated word. The location of a possible substitute and the size of its neighborhood both matter. Some candidates may be easy to reach from the original location, while others require a much larger or differently directed perturbation.

Metric differential privacy gives a mathematical meaning to closeness in this setting. The paper traces the idea to privacy for locations, where locations close together should be harder to distinguish from their randomized reports. In text, the corresponding locations are word vectors. The guarantee bounds how differently two inputs can produce the same output, using their distance to set the bound. Closer inputs are subject to a tighter bound. The distance can be larger for a pair of inputs whose distinction the mechanism is allowed to preserve more readily. The geometry therefore governs both the formal comparison of inputs and the practical opportunities for substitution.

The authors relate this guarantee to ordinary differential privacy through Hamming distance. The paper describes ordinary differential privacy in terms of neighboring datasets with no more than one record’s difference between them. In the metric version, the distance function supplies the notion of adjacency or closeness. When the relevant inputs are a unit of Hamming distance apart, the distance factor gives the corresponding ordinary bound. An embedding distance gives different pairs different bounds. Consequently, the same privacy parameter can have a different practical interpretation after the representation space changes.

Earlier work had already modified text perturbation to improve utility or privacy. The paper’s closest example on the utility side uses a space whose geometry represents hierarchies. That approach seeks substitutions that preserve hierarchical relations among words. Arnold and colleagues keep Euclidean geometry and change what the points in the space stand for. A word with several uses can have several positions, so a nearby candidate can be chosen relative to a particular meaning. [Poincaré Embeddings for Learning Hierarchical Representations](https://md.research.elamur.ai/free/en/papers/nickel-2017-poincare-embeddings-learning-hierarchical-representations/)

#### Why a word can need several locations

The word embeddings reviewed in the paper learn from co-occurrences across a corpus. Continuous bag-of-words uses words in a local window to predict the central word. Skip-gram works in the other direction and uses the central word to predict its surroundings. Both produce dense vectors, which the paper contrasts with sparse representations that are expensive to store and process at high dimensionality. These dense representations can encode relations among words, but occurrences with different meanings still feed a common representation of the word. The paper notes that the most frequent meaning can dominate it. [Efficient Estimation of Word Representations in Vector Space](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/)

The problem becomes concrete when that representation is used to write a replacement. A single vector for *bank* pools evidence from financial and geographical uses. If the procedure always perturbs the same vector, the words around *bank* can change without changing the distribution from which its replacement is drawn. Some alternatives might fit a financial sentence and some might fit a river scene. Random sampling can select from either group in either setting. Replacing a word is therefore a stronger test of a useful representation than observing that the original word has sensible neighbors somewhere in the space. The procedure needs the neighborhood appropriate to this occurrence.

That distinction matters in the authors’ downstream evaluation. A classifier receives the privatized text and draws conclusions from the clues still present. Useful clues can disappear when a word is changed. A substitute can also supply a clue for an interpretation that was absent from the original. The risk is particularly clear in a task that asks whether the same spelling denotes the same thing in different sentences. If both occurrences are subjected to the same context-free substitution distribution, their replacements offer little systematic evidence about the label at the target position. The surrounding privatized text can of course still carry other clues.

#### Ways earlier work represented sense

The paper groups earlier sense embedding methods into staged training, joint training, and retrofitting. The staged approach first decides which occurrences belong together, then uses those groupings to learn or construct sense vectors. In one example the authors describe, occurrences of a word are represented by sparse vectors and clustered into a predetermined number of groups. The cluster centers act as sense representations, and occurrences acquire the labels of their clusters. Later work extends this idea to dense vectors. The approach makes the separation of uses a distinct operation, which also means that a fixed cluster count can impose the same number of distinctions on words with very different ranges of meaning. [Multi-Prototype Vector-Space Models of Word Meaning](https://md.research.elamur.ai/free/en/papers/reisinger-2010-multi-prototype-vector-space-models/) · [Improving Word Representations via Global Context and Multiple Word Prototypes](https://md.research.elamur.ai/free/en/papers/huang-2012-improving-word-representations-global-context/)

Another staged route starts with a sense inventory, a catalog that specifies which meanings can be assigned to a word. A disambiguation system labels a corpus using that catalog, and an embedding procedure learns from the resulting sense-labeled text. The labels can then be interpreted through the inventory. The paper identifies two dependencies in this route. The catalog needs to cover the words encountered, and its distinctions need to correspond to the meanings expressed in the text. A fixed inventory supplies definitions in advance, but it also determines what kinds of sense assignment the procedure can make. [SenseEmbed](https://md.research.elamur.ai/free/en/papers/iacobacci-2015-sensembed-learning-sense-embeddings-word/)

Joint training folds sense selection into embedding learning. The paper describes methods that represent a local context, select the nearest sense, and update that sense as training proceeds. Some fix the number of senses, while others use an inventory to let that number vary by word. The authors also describe a procedure that adds a sense when a new context is too dissimilar to the existing ones. Across these examples, the decision about how many senses to distinguish is part of how the representation is learned. Words with many uses can be treated differently from words whose occurrences fit a single group. [Efficient Non-parametric Estimation of Multiple Embeddings per Word in Vector Space](https://md.research.elamur.ai/free/en/papers/neelakantan-2014-efficient-non-parametric-estimation-multiple/)

Retrofitting starts with vectors that already exist. The paper describes work that adjusts their geometry using relations from a semantic network, as well as work that places new sense vectors near words associated with those senses. The approach chosen here belongs to this family and obtains its distinctions from the neighborhoods in the word space itself. A cluster of mutually related neighbors is treated as evidence for a shared meaning. Several clusters around a word can give it several positions. The resulting senses inherit information from the corpus and the initial vectors, and their identifiers derive from the clustering.

#### A fixed vocabulary with context-sensitive choices

Contextual embeddings take a different route to representing ambiguity. They compute a representation for an occurrence using the text in which it appears. The paper describes this as the direction much of the field had taken and cites work that introduces sense information into contextual representation learning. An occurrence-dependent representation is attractive for tracking meaning, but the inherited substitution procedure expects a fixed set of candidate vectors that can all be searched in a shared space. An occurrence-specific vector alone supplies no such catalog of replacements. [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/) · [SenseBERT](https://md.research.elamur.ai/free/en/papers/levine-2020-sensebert-driving-some-sense-into/)

The authors put the context dependence in the choice of vector. A word’s available sense vectors are computed in advance and stay fixed. The local text helps select one of them on each occurrence. This design preserves a fixed collection for the nearest-neighbor operation while giving the same spelling several possible starting points. It also gives the paper a specific question to test. Before a classifier is involved, does selecting the starting point change which alternatives appear for different uses of a word? If so, can a classifier still recognize and use that difference after the sense identifiers themselves have been removed?

### The method, step by step

#### From a sentence to a replacement

Consider *bank* in a sentence about a walk along a river. The method begins with the word as it occurs in the original input and gathers nearby words. It consults the induced inventory to find the fixed vectors for the senses associated with *bank*. It then asks which of those vectors best matches the surroundings. The same operation in a sentence about depositing money can choose another vector. The noise step starts from the chosen point, so the outcome remains random within each context even when the choice of sense is deterministic.

The nearest neighbor after perturbation comes from the broader sense vocabulary. The choices available during disambiguation and during substitution serve different purposes. Disambiguation chooses among representations of the input word. Substitution searches for a vocabulary entry close to the perturbed position, which can belong to another word. A candidate in that vocabulary carries a sense identifier internally. After retrieving it, the method removes the identifier and releases the vocabulary form. A later classifier gets a text string and can use its own representations.

From corpus neighborhoods to privatized text The steps in order.

#### Constructing the sense inventory

The starting word space is trained on a Wikipedia dump. The authors report a context window of size 3, a minimum word frequency of 5, and a 300-dimensional representation. They align the vocabulary with words covered by [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/). The resulting word embedding contains 95, 670 entries. This training stage supplies a vector for each vocabulary item and a common coordinate space in which to compare those vectors. Its local window is a training setting. The later disambiguation window controls which words are consulted on an actual occurrence.

For every word, the authors retrieve its 200 nearest neighbors by cosine similarity. Cosine similarity compares the directions of vectors, so it can rank neighbors by alignment even when their lengths differ. The authors build a graph from these similarities. The logic of the graph is that a collection of words related through the same use of the central word should be more strongly connected within the collection than to words associated with a different use. A neighbor’s relation to other neighbors is therefore informative in addition to its relation to the center.

An ego network is the part of a graph viewed around a particular node, in this case a word whose senses are to be induced. The authors cluster these local networks to find groups of related neighbors. The process is non-parametric in the sense specified in the paper. The clustering does not assume a predetermined number of senses per word. Local graph structure supplies the distinctions. It can therefore produce more groups around one word than another, without requiring the same division for the entire vocabulary.

The clustering yields 248, 218 word senses. Each cluster associated with a word receives a sense identifier. A sense vector is formed by a weighted pooling of the original word vectors of the items in its cluster. Pooling gives the sense a location in the same coordinate system as the original vectors. Its location summarizes the cluster membership rather than taking the original ambiguous word’s vector as the only representation of that word. The paper describes the weighted pooling operation in words and gives the cosine rule for the later selection step explicitly.

The identifiers distinguish candidates in the induced inventory. They carry no dictionary definition. A person inspecting the words in a cluster might infer a plausible reading, but the method never links that group to an externally specified entry. The paper’s example of geographical and financial meanings explains the behavior it seeks. The pipeline itself proceeds using the vectors and identifiers. Neither the clustering nor its use at substitution time requires a corpus with hand-assigned sense labels.

#### Selecting a sense for an occurrence

When an input word is processed, its form acts as a lookup key for the set of induced sense vectors. The authors use a window of 5 to select context words for the occurrence and average the word vectors of those context words. This average is the context vector. The original context is used for disambiguation before privatization. In a passage about the edge of a river, the surrounding vocabulary can pull the context vector towards a different region from the surrounding vocabulary in a sentence about financial transactions.

The paper’s disambiguation rule chooses the candidate with the greatest cosine similarity to that average.

```
argmaxᵢ [(c · sᵢ) / (‖c‖ · ‖sᵢ‖)]
```

Here, `c` is the mean vector of the context words, `sᵢ` is a candidate sense vector of the target word, and `i` indexes the candidates associated with that word. The dot denotes a dot product in the numerator and ordinary multiplication between the norms in the denominator. The paired bars give the length of the enclosed vector. `argmaxᵢ` returns the candidate index attaining the greatest value of the bracketed expression, and the vector at that index becomes the input to perturbation.

This comparison uses the surrounding words to choose a region in the space. Each context word contributes its ordinary word vector to the average, and the result is a single direction against which the eligible senses are ranked. The expression returns one choice for the occurrence. It supplies neither a probability over all its senses nor an average of the candidate senses. Accordingly, the perturbation step begins from a particular location even when the leading alternatives are close in cosine similarity.

The word-based baseline has a single starting vector for each input form. The distinction between the mechanisms arises before any noise is added. With sense vectors, two occurrences can start from different positions even when they have the same written form. Conversely, two contexts that favor the same sense lead to the same starting point. Later noise can still produce different outputs for those occurrences. Context sensitivity here is a change in the starting representation and hence in the probabilities of substitutes. It does not impose a requirement that every sampled replacement match the input meaning.

#### Perturbing the vector and recovering a word

The privatization step adds noise from a multivariate distribution to the selected sense vector. Multivariate noise perturbs a point across the coordinates of the embedding. The paper discusses the multivariate Laplace mechanism in its privacy calibration. It also mentions a truncated Gumbel distribution as an example from earlier work on text perturbation. A perturbed point generally lies between available vocabulary points. The mechanism projects it back into the discrete vocabulary by finding the nearest candidate.

The authors stay in Euclidean space for the perturbation and projection. That use of distance has a different role from cosine similarity in disambiguation. Cosine similarity ranks the available senses against the context vector. The projection asks which of the candidate locations is closest to a point that has already been moved by noise. Because this latter search can end at another word’s sense, candidate density matters. A space populated with sense vectors offers a different set of possible endpoints from the original word space even if the basic noise-and-projection procedure is the same.

Several sense entries may lead to the same output form. The identifier is removed only after the nearest entry has been chosen, so the mechanism may move from one internal sense to another and still emit the same spelling. Conversely, several routes through different sense entries can yield a different but identical-to-each-other released word. This is why motion in the vector space and diversity in the released text need separate descriptions. An observer receiving the text sees the output word. The chosen internal entry influences what that word will be, but its identifier is absent from the release.

#### The formal bound and its parameters

The paper presents metric differential privacy for a randomized mechanism on a discrete vocabulary. The embedding function maps each vocabulary item into a high-dimensional space. A metric on that space measures the distance between two embeddings. As the paper specifies, the metric is symmetric, gives zero distance only for identical points, and obeys the triangle inequality. The formal comparison considers two possible inputs and a common output. The output can be any vocabulary item, regardless of whether it equals either of the inputs.

```
P[M(w) = ŵ] / P[M(w′) = ŵ] ≤ e^{ε d{ϕ(w), ϕ(w′)}}
```

`M` is the randomized substitution mechanism, `w` and `w′` are the two possible input words, and `ŵ` is the output word being considered. `P` denotes probability over the mechanism’s randomness. Each equality inside the square brackets describes an output event, and the slash compares the probabilities of that event under the two inputs. `ϕ` maps an input word to its embedding, and `d` is the metric applied to the pair of embedded inputs. `ε` is the positive privacy budget. `e` is the base of the natural exponential, and `≤` means that the ratio can be at most the exponential bound.

For positive probabilities in the ratio, the paper also describes the guarantee in terms of its logarithm. Taking a logarithm gives a bound set by the privacy budget times the distance between the two input representations. The comparison is made for any ordered pair of inputs, so it also applies with their roles exchanged. The result is a statement about distinguishability given a possible release. It differs in purpose from a count of how frequently a sensitive input is replaced by some other word. The latter concerns the frequency of a particular outcome for a single input.

The paper gives the scaling of the multivariate Laplace noise as follows.

```
1 / ε
```

`1` is the numerator of the reciprocal and `ε` is the privacy budget. The slash denotes division. A smaller `ε` corresponds to a larger noise scale and a tighter bound for a fixed distance. A larger `ε` reduces the noise scale. The effect on released vocabulary depends on the space in which the point is moved. For instance, the same displacement can encounter a nearby candidate more readily in one region or representation space than in another.

This dependence is important when the authors replace the word space. The formal expression relates privacy to `ε` and to distance at the same time. Changing the representations changes the distances and alters which candidates compete to be returned after perturbation. The authors therefore examine the geometry of sense vectors and calibrate the two mechanisms using observed substitution behavior. They use the formal bound to describe the inherited mechanism and use separate statistics to select operating points for the comparisons.

#### The statistics used for calibration

The first statistic is the probability that an input is returned in its original form. The paper denotes this by `N` with a subscript identifying the input word.

```
N_w = P[M(w) = w]
```

`N_w` is the retention probability for `w`, the input word. The underscore attaches the word index. `M(w)` is the randomized output and `P` is the probability of the equality inside the brackets. The authors estimate the statistic by repeating the mechanism for the word 100 times and recording how frequently the released form equals the queried form. In the sense procedure, this assessment is at the level of the released spelling, after the sense identifier has been removed.

The second statistic is effective support, expressed by the paper as a count of the distinct output words. Its empirical calculation can be written as the cardinality of the observed output set.

```
S_w = |{w′ : w′ is observed as an output of M(w)}|
```

`S_w` is the effective support for input `w`. Inside the braces, `w′` denotes a possible released word, and the colon separates that word from the condition for including it in the set. `M(w)` again denotes the randomized substitution for `w`. The outer bars indicate the number of distinct elements in the set. The authors estimate this support from 100 runs. A candidate contributes to the count once whether it appears repeatedly or is observed only once.

The statistics capture different properties of the release. A low retention rate can occur even if the mechanism repeatedly substitutes the same alternative. A collection of distinct alternatives can coexist with frequent retention of the original word. The authors examine both when selecting noise settings. They interpolate the measurements across privacy budgets and use a criterion involving a threshold reported as 0.5 and a specified quantile of words. The stricter utility comparisons use the .90 quantile. The GLUE evaluation also reports a setting at .50. These criteria define how the utility comparisons are matched in the paper.

### Experiments and results

#### The geometry and the privacy measurements

Before testing downstream classification, the authors examine how sense vectors change the local structure of the embedding. They group words by the number of induced senses, then plot average pairwise Euclidean distances among the senses associated with a word. A reference line at 1.0550 represents the average pairwise distance between word forms in the embedding space. The within-word sense distances are considerably lower on average. Hence, even when the clusters give a word multiple locations, those locations generally occupy a smaller range than the space of word forms as a whole.

The privacy experiments use queries from [WikiText](https://md.research.elamur.ai/free/en/papers/merity-2016-pointer-sentinel-mixture-models/). The authors report averaging the proxy measurements over 100 independent queries. The privacy budgets they examine are 1, 5, 10, 15, 25, 50, 100, 250, 500, and ∞. For each budget, the measurements describe the tendency to return the queried word and the diversity of the observed outputs. The sweep shows how the statistics respond when the perturbation scale changes, and provides the measurements used to choose the utility settings.

As the budget rises, the perturbation becomes smaller. The original word then tends to be returned more frequently, and the selection of observed output words tends to narrow. Both mechanisms follow similar curve shapes. The sense-based curves are shifted along the budget axis, allowing a larger budget before reaching the same proxy thresholds. The authors characterize the change in the usable range as an order of magnitude. They attribute the shift to the extra candidate vectors in the sense space, which give a perturbed point more nearby entries it might reach.

The interpretation depends on what the experiment keeps comparable. A fixed budget in the two different spaces would apply the same noise-scale setting to different candidate geometries. The authors instead choose budgets by matching the specified retention and support behavior for a quantile of words. They then ask what utility each mechanism delivers under that criterion. The comparison therefore measures utility under the paper’s calibration of plausible deniability, while permitting different noise budgets in the two systems.

#### A word in two settings

To make the substitution behavior visible, the authors use *bank* in a river setting and in a setting about deposits and interest. They run 500 queries in total, divided equally across the two contexts. They record the substitutes and reduce the dimensionality of their vectors for a plot. In the plot for lexical privatization, alternatives associated with the two settings overlap and form a continuous region. The sense-based plot shows clearer separation between the regions associated with the two contexts.

This example shows the kind of change the procedure is meant to produce. The lexical mechanism repeatedly starts at one point for *bank*. The sense mechanism can start in a different neighborhood depending on the setting. Each resulting cloud still represents randomized outputs. The visualization captures a difference in their distributions instead of a single favored replacement. It also makes clear why the authors follow the example with larger evaluations. A specific word and pair of contexts can show how the mechanism behaves in a favorable case, while benchmark pairs test whether a related pattern appears across many examples.

#### Agreement with human similarity ratings

The word similarity experiments use pairs with human judgments. [WordSim-353](https://md.research.elamur.ai/free/en/papers/agirre-2009-study-similarity-relatedness-distributional-wordnet/) and [SimLex-999](https://md.research.elamur.ai/free/en/papers/hill-2015-simlex-999-evaluating-semantic-models/) present their words in isolation. The contextual dataset, called SCWS in the results table, supplies context for each word in its pair. That difference gives the disambiguation step evidence in SCWS that is absent from isolated pairs. All these utility experiments use the paper’s .90-quantile calibration. Each pair is queried 25 times with each privatization mechanism.

In each query the authors compare the vectors of the released words, using the cosine expression given in the paper.

```
(ŵᵢ · ŵⱼ) / (‖ŵᵢ‖ · ‖ŵⱼ‖)
```

In this expression, `ŵᵢ` and `ŵⱼ` stand for the vectors of the substitutes for the two original words. The indices `i` and `j` distinguish the members of the pair, and the hats indicate that the representations correspond to released substitutes. The dot in the numerator is their dot product. The double bars denote vector length, the dot between the lengths denotes multiplication, and the slash divides the dot product by that product. The expression returns their cosine similarity. The authors then correlate the measured similarities with the human annotations.

On WordSim-353, the correlation with the annotations is 0.5849 for the original pairs, 0.1353 after word-based privatization, and 0.1478 after sense-based privatization. On SimLex-999, the corresponding correlations are 0.2978 for the original pairs, 0.0696 with the word mechanism, and 0.0841 with the sense mechanism. Both isolated-word benchmarks show similar results for the two privatization procedures. Contextual SCWS shows a clearer advantage for the sense procedure, with correlations of 0.1911 after word-based replacement and 0.2358 after sense-based replacement. The original pairs have a correlation of 0.5183.

Correlation with human similarity ratings on SCWS Sense-based substitution retains more agreement with human ratings than word-based substitution, while the original pairs have the highest correlation.

**The numbers**

| System or setting | correlation |
| --- | --- |
| Original word pairs | 0.5183 |
| Word-based privatization | 0.1911 |
| Sense-based privatization (this paper) | 0.2358 |

These correlations concern agreement across rated pairs. They measure whether variation in computed similarity follows variation in human judgments. An individual substitution can look sensible in isolation and still contribute little to that relationship across a dataset. Likewise, a higher correlation leaves room for many poor substitutions. The original-pair results show how much agreement is available to this similarity measurement before privatization, and on each benchmark both substitution procedures reduce it. The informative comparison for the paper’s question is how much agreement the two procedures retain when the input offers context for choosing a sense.

#### Classification on Word-in-Context

Word-in-Context, abbreviated WiC, presents two passages containing the same target word. The label indicates whether the word expresses the same meaning in the two passages. The paper reports 5, 428 training pairs and 638 validation pairs. It describes the labels as balanced. The classification problem is therefore a direct way to ask whether a system can recover a distinction that the spelling itself leaves open.

The authors compare [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) trained with original data, BERT trained with data privatized using word embeddings, and BERT trained with data privatized using sense embeddings. The privatized training follows the procedure used for training without privatization. The comparison changes the training text that BERT receives. Both privatization mechanisms use the .90-quantile calibration for the utility experiment. The authors average the accuracy scores over three independent trials for each mechanism.

Validation accuracy reaches 0.6887 without privatization. It is 0.6006 when the training data are privatized with ordinary word vectors and 0.6423 when the training data are privatized with sense vectors. The paper describes its improvement using the figure 6.05%. The three reported accuracy values give the direct comparison across conditions, including the remaining gap from the system trained with the original data.

BERT validation accuracy on Word-in-Context by training text Sense-based privatization preserves more accuracy than word-based privatization, while training on the original text gives the highest score.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| Training on original text | 0.6887 |
| Training on word-privatized text | 0.6006 |
| Training on sense-privatized text (this paper) | 0.6423 |

The classifier result measures the consequence of using the privatized training text. That consequence can extend beyond the selected target word. Some nearby words may also have changed, and the sentence pair can supply evidence through more than the target replacement alone. The authors therefore accompany the accuracy comparison with a diagnostic focused on the substitutes for the target occurrences. That diagnostic asks whether the probabilistic outputs at the target position carry the same-sense distinction that the labels encode.

#### A wider set of language tasks

The authors also fine-tune pretrained BERT on a subset of GLUE. The selected tasks include classification of single texts, comparisons of texts for similarity, and textual entailment. Entailment asks whether the information in one text supports a statement in another. The paper singles out CoLA for its emphasis on syntactic acceptability and presents the other tasks in its selection as depending more on meaning. This range tests whether useful context survives beyond the benchmark designed expressly around ambiguous words. [Fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/)

The results use Matthews correlation for CoLA and Spearman correlation for STSB. Matthews correlation evaluates the association between predicted and reference labels. Spearman correlation evaluates whether two sets of scores rank examples in similar order. The other tasks use accuracy, the proportion of correct classifications. The table includes BERT results without privatization and with each privatization mechanism at both calibration levels. Its caption identifies the best results from three independent trials. WiC scores, by contrast, are described as averages over trials.

At the stricter setting, the reported average across the selected GLUE tasks is 0.5367 for the word mechanism and 0.6065 for the sense mechanism. These values summarize task scores with different metrics. They are best read as the paper’s aggregate comparison for its selected tasks, rather than as a single classification accuracy. The table also shows the same ordering in the less stringent condition, with averages of 0.6200 for word-based privatization and 0.6520 for sense-based privatization. The corresponding aggregate without privatization is 0.8146.

Average score across the selected GLUE tasks at the stricter calibration Sense-based privatization retains a higher average task score than word-based privatization.

**The numbers**

| System or setting | average task score |
| --- | --- |
| Word-based privatization | 0.5367 |
| Sense-based privatization (this paper) | 0.6065 |

CoLA gives a concrete boundary to the aggregate gain. At the stricter calibration, both privatization mechanisms record a Matthews correlation of 0.0000, compared with 0.5792 for BERT without privatization. At the less stringent setting, CoLA reaches 0.0416 for the word procedure and 0.0655 for the sense procedure. The authors interpret the broader results as evidence that sense-aware substitutions are especially helpful where a task depends on meaning. The CoLA scores show that retaining more semantic clues does little to recover the particular evidence this syntactic task needs under the study’s stronger perturbation.

### What the ablations show

#### Separate distributions for the same spelling

The paper offers controlled comparisons and diagnostic analyses of the combined sense-based method. It does not report a component-by-component ablation that varies the representation and the selection procedure independently. Its central comparison keeps the general perturbation-and-projection design and replaces the word representation with the induced sense space plus disambiguation. The *bank* experiment controls the spelling of the target and changes the context. In the lexical mechanism the target’s starting point is unchanged across the two inputs. In the sense mechanism the local words can change it, and the substitutions show stronger grouping by context.

The comparison makes the mechanism’s intended effect visible without involving a classifier. The sampled replacements provide direct evidence about the outcomes of changing the starting point. The lower-dimensional plot displays that evidence qualitatively. It does not measure the precise separation of the underlying probability distributions, and the graphical result applies to a deliberately chosen example with two contrasting uses. The authors’ larger analyses give the separation an operational meaning through the annotations and similarity scores of benchmark examples.

#### Similarity when the meaning agrees

For the WiC diagnostic, the authors query each record 25 times and compare the target substitutes using their GloVe vectors. They use the reference labels to group examples by whether the two occurrences have the same intended meaning. They exclude observations with cosine similarity equal to one, aiming to concentrate on cases in which a substitution produces a difference. Using GloVe for both systems gives the comparison a common measurement space. An improvement in this diagnostic therefore cannot be attributed simply to scoring each system’s outputs with its own internal geometry.

With ordinary word embeddings, the two groups have average similarities of 0.1860 and 0.2035. These are close compared with the separation the authors observe for sense-based substitutions. With sense embeddings, the same-meaning group has an average similarity of 0.3118, while the different-meaning group has an average of 0.2272. The authors read this ordering as a clue that the releases retain information about which sense was intended. It is the label-dependent relationship between the scores that matters here. Increasing all substitute similarities equally would give a classifier little help with the distinction WiC evaluates.

A pair of replacements need not be identical to signal agreement in sense. The diagnostic asks whether different outputs still fall in a related part of an independent word space. It can also register a distinction when two originally identical forms are replaced by words in different regions. This provides a plausible explanation for the improvement in validation accuracy. The diagnostic and the classifier result answer different questions. One measures a particular clue in the output words, and the other measures how well a trained system performs when exposed to the whole privatized text.

The filter on cosine similarity narrows the explanation. The reported averages describe the retained observations, so they cannot establish how much of the overall classification gain comes from cases in which the target word changes. An identical pair of outputs may also be informative in the full task, and sentences can preserve or lose useful context away from the targets. The diagnostic shows a difference in an identifiable source of evidence. It leaves open how BERT combines that source with other features of the texts.

#### What the presence of context changes

The similarity datasets give the paper another comparison. The word and sense mechanisms perform relatively similarly when the inputs consist of words in isolation. The contextual rating dataset shows greater separation in agreement with human judgments. That pattern is consistent with an advantage from using surrounding words to choose a starting representation. It also gives the authors a qualitative check on the isolated-word results. More candidate vectors alone do not produce a comparably clear advantage in every evaluation.

The isolated and contextual datasets differ in more than the availability of context. They contain different pairs and annotations, and the agreement scores for their original pairs differ. The difference across datasets is therefore supporting evidence, rather than a controlled intervention that removes context from identical examples. The repeated *bank* queries hold the target form fixed, and the WiC diagnostic groups occurrences using reference judgments. Those analyses address related questions from different directions and help locate what might account for the end-to-end gain.

#### Task type and the calibration setting

The GLUE comparisons test whether the improvement carries beyond direct judgments of word meaning. They show stronger average task performance with sense embeddings at the reported calibration settings. CoLA illustrates that tasks can respond very differently to the change. The paper connects the difference to the greater role of sentence structure in CoLA and the greater role of meaning in the other tasks. Since the procedure chooses substitutions through lexical context and vector distance, preservation of the original syntactic evidence is a separate question.

There is also a difference between changing the source point and changing the amount of noise. After recalibration, the word and sense systems can use different privacy budgets. Each end-to-end comparison combines the effects of candidate geometry, sense selection, and the noise permitted by the proxy threshold. The experiment therefore supports the complete procedure under its own matching rule. It cannot determine how much of the observed classification gain would remain if the authors held the noise scale fixed or disabled disambiguation while leaving the sense candidate space in place.

### Limitations

#### Limits the authors identify

The induced senses have no mapping to an external sense inventory. The authors identify this as a limit on interpretability. An identifier tells the procedure which cluster vector it has selected. It does not provide a definition, example usage, or conventional name for that sense. A person could examine the cluster’s words to see what they suggest. The reported experiments evaluate substitution behavior and classification, rather than validating each induced sense against a catalog.

This limitation also affects comparisons across words. The clustering is free to produce different numbers of senses for different words. That flexibility helps avoid imposing one granularity throughout the vocabulary, but the meaning of a split depends on the local graph. A sharp separation between two clusters can be easy to interpret for a familiar example. The inventory as a whole can contain distinctions whose relationship to human judgments is uncertain. Even where the substitutes are helpful, the results give no direct measure of how frequently the selected sense is the one a reader would assign.

The authors also discuss the role of contextual representations. They regard sense-aware contextual representations as stronger for interpreting words in use, while the substitution procedure needs a fixed collection of searchable candidates. Their method therefore relies on induced sense vectors for privatization and can use contextual representations for downstream classification. The reported improvement belongs to that arrangement. It does not compare the sense-based method with a separate privatization system that computes contextual candidate representations and provides an appropriate search procedure for them. [GlossBERT](https://md.research.elamur.ai/free/en/papers/huang-2019-glossbert-bert-word-sense-disambiguation/) · [Knowledge Enhanced Contextual Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2019-knowledge-enhanced-contextual-word-representations/)

#### Limits of the privacy comparison

The formal bound and the empirical calibration concern distinguishability in different ways. The bound presented by the paper applies to output probabilities for a mechanism and a specified metric. The proxy measurements record the retained form and the number of distinct observed forms. A lower rate of returning the input is evidence about one particular observable event. An increase in observed support shows that the sampled releases span more distinct words. Neither statistic expresses how probabilities are distributed over all outputs or all pairs of inputs, which is what the metric bound compares.

The calibration uses a quantile of words and estimates its statistics from repeated samples. An observed support can miss low-probability candidates. It also assigns the same contribution to a candidate seen once and a candidate seen frequently. The resulting curve describes measured behavior for the queries the authors make and the samples they record. Matching those curves at a criterion is a defined basis for the paper’s utility comparisons. It does not establish equivalence of the output distributions, of protections for individual inputs, or of risk across entire texts.

The reported threshold of 0.5 deserves care. The paper describes effective support as a count of distinct outputs, while the interpolation criterion uses 0.5 as the threshold for that statistic as well as for retention. It does not spell out a normalization that connects an observed count to that threshold. The sense calibration therefore has a partially specified empirical interpretation. The retention statistic has a direct probability scale, and the support curves still describe relative diversity. Reproducing the support-based budget selection exactly would require knowing the scale on which that threshold was applied.

The paper refers to earlier work for the full proof of the underlying privacy mechanism. Its adaptation selects the input representation using a window of original text. In an analysis at the level of the chosen representation, perturbation begins at an identifiable point in the sense space. At the level of a whole document, an edit to a word may also affect a nearby word’s context average and hence its selected sense. The paper does not derive a document-level bound that accounts for these dependencies. The experimental proxy results and the single-input formalism therefore support more limited conclusions than a guarantee for all information that might be inferred from a released passage.

The work also does not measure disclosure by attempting to recover original records or particular sensitive attributes from the generated text. Its motivation concerns such risks, but its privacy experiments evaluate retention and variation. A substitute can conceal the exact input form while still providing strong evidence about its semantic category. That semantic signal is useful for the downstream tasks in the paper. Whether it is also sensitive depends on what an application intends to protect and what other information is visible to an observer.

#### Limits of the utility evidence

The initial vectors and the sense inventory depend on the Wikipedia training source, the vocabulary alignment, and the graph built from that vocabulary. A meaning with little evidence in the underlying vectors may fail to produce a distinct cluster. The method description does not establish performance for words outside the induced inventory or report how frequently candidate coverage limits the operation. The reported comparisons establish what can be retained under the authors’ setup. They do not show how utility changes when the text comes from a domain with different vocabulary or different prevailing senses.

The selection rule averages a local window and chooses the highest-scoring sense. This is an economical way of passing context into a fixed space, but it uses a limited view of the text. It does not explicitly weight clues according to their relevance, or represent how relations among the surrounding words affect the intended reading. The paper does not report varying the size of the selection window to see how local or distant clues influence the result. Nor does it give a separate accuracy score for the chosen senses. The observable test is whether the complete procedure produces better replacements and task scores.

Noise and nearest-neighbor projection can degrade multiple properties of a text at once. The evaluations measure human-rating agreement through correlations, contextual evidence through similarities of target substitutes, and downstream utility through classification. They do not directly score the faithfulness of entire privatized sentences or collect reader judgments of fluency. A method can retain enough meaning to improve a label prediction even if the released text is awkward or some of its details have shifted. The classification gains give evidence about the investigated tasks and the systems trained on those data.

The size and reporting of the comparisons also matter. WiC results are trial averages, while the GLUE table identifies best results from repeated trials. The paper does not give trial-by-trial variation or uncertainty intervals with those scores. The reported averages and proxy-matched comparisons establish the observed ordering under the studied conditions. Their precision does not establish how stable every task-level difference would be under another run. Similarly, the broader semantic interpretation is strongest where the study directly connects labels to same-sense and different-sense substitutes. CoLA supplies a contrasting task, but the study does not isolate syntax and meaning across otherwise identical data.

### What came after

[A Systematic Exploration of Text Decomposition and Budget Distribution in Differentially Private Text Obfuscation](https://md.research.elamur.ai/free/en/papers/meisenbacher-2026-systematic-exploration-text-decomposition-budget/) takes up how text is divided for privatization and how the privacy budget is distributed. Those questions arise at a different level from the choice Arnold and colleagues study. Their unit of substitution is the word, with a local context helping select its representation. The later work’s stated scope puts the decomposition of text and the allocation of the budget themselves under examination.

The connection is that the behavior of a text privatization procedure depends on decisions made before noise is sampled. For Arnold and colleagues, different input representations change the geometry, which leads them to recalibrate the noise against their empirical criteria. The later work examines the choice of text units and the distribution of the available budget. Its citation places the sense-based procedure in that broader line of work. The stated scope does not establish that it reuses the induced sense inventory, repeats the Word-in-Context experiment, or tests the same privacy proxies.

## Cite

Cite as Stefan Arnold, Dilara Yesilbas and Sven Weinzierl. 2023. Driving Context into Text-to-Text Privatization. Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023).

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

```bibtex
@inproceedings{arnold2023driving,
  title = {{Driving Context into Text-to-Text Privatization}},
  author = {Stefan Arnold, Dilara Yesilbas and Sven Weinzierl},
  booktitle = {Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023)},
  year = {2023},
  doi = {10.18653/v1/2023.trustnlp-1.2},
  url = {https://doi.org/10.18653/v1/2023.trustnlp-1.2}
}
```

> 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)
