Guiding Text-to-Text Privatization by Syntax
Paper · 2023 · Stefan Arnold, Dilara Yesilbas and Sven Weinzierl
Summary
When a system replaces words to protect sensitive text, a substitute can be close in meaning and still be wrong for the sentence. A word associated with an action might name the person who performs it, for example. If a replacement procedure treats those words as interchangeable, it can turn a verb into a noun and leave the sentence without a usable predicate. Arnold and colleagues study this problem in MADLIB, a method that adds random noise to word embeddings before choosing replacements. They find that, as the noise increases, the original procedure tends to produce nouns even when the source words belong to other grammatical categories.
Their modification changes the choice made after the noise is added. MADLIB ordinarily takes the vocabulary word closest to the perturbed position. The authors retrieve a list of nearby words and prefer the closest candidate whose grammatical category matches the source word’s category, using labels such as noun, verb, and adjective. They keep the ordinary nearest candidate as a fallback. In repeated trials on a vocabulary of 24, 525 words, the guided method reached a reported category preservation rate of 81.4% at the moderate privacy setting ε = 10. At the stronger privacy setting ε = 5, the appendix reports a preservation score of 0.4163. The amount of noise therefore still matters even when the selection procedure has a grammatical preference.
The authors then train BERT on privatized versions of training corpora from GLUE. Under their stricter empirical privacy calibration, the average benchmark score is 55.45% with ordinary MADLIB and 60.11% with the grammatical constraint. The paper reports this gain as 4.66%. Its reference score from training on unprotected text is 81.46%. The improvement extends beyond sentiment classification, the task that originally motivated the authors to preserve categories such as adjectives.
The privacy evidence has two parts. In repeated word queries at ε = 10, grammatical guidance slightly increases how frequently the original word reappears and decreases how many distinct outputs the mechanism produces. A separate IMDb experiment finds that an attacker trying to infer which records were used for training performs around the paper’s reference mark of 0.5 for both privatization variants. The authors also acknowledge that their selection rule uses the original grammatical category in a way that introduces unaccounted information leakage. The experiments establish a utility gain under the paper’s empirical comparisons, while the privacy cost of consulting that category remains open.
Deep dive: Guiding Text-to-Text Privatization by Syntax
Arnold and colleagues use part-of-speech tags to guide private word replacement and test what the resulting text preserves for downstream tasks. · about 33 minutes to read
The problem and its context
The reason to keep text as text
A privacy procedure can transform a document into a numerical representation or produce another document that people and existing language-processing systems can use. This paper studies the second kind of procedure. The released material is a surrogate text, assembled from replacements for words in the sensitive original. Its purpose is to retain enough information for a later task, such as classifying sentiment or comparing sentences, while making it harder to determine which words the author actually wrote.
The authors situate this work among several approaches to text privacy. A common starting point is to find and remove personally identifiable information. A related strategy generalizes some details and suppresses others, as in text adaptations of k-anonymity. Both rely on decisions about which pieces of information make a record identifiable. In prose, commonplace details can become revealing when combined with what a reader already knows. The paper cites earlier work on inferring authorship and on recovering information from trained systems, including an experiment that recovered verbatim training material through queries. Extracting Training Data from Large Language Models
This context explains the appeal of differential privacy. The basic idea is to bound how much the chance of an output can change when the input changes in a specified way. A method defined this way gives a statement about the behavior of its randomization procedure. The paper contrasts this with redaction decisions that depend on anticipating which particular clues an observer might use. It also distinguishes between settings where a curator can see raw data and settings where individual records are randomized before they are used downstream.
The distinction matters for the form of output. In the global setting described by the authors, a trusted curator collects original records and releases a randomized result, such as an aggregate statistic. In the local setting, individual records are randomized separately. Text-to-text privatization follows the local pattern in the paper’s account. A downstream learner can receive surrogate records, and the experiment can ask how much useful evidence survives in them.
Why the noise needs a notion of closeness
Randomized response offers an intuitive starting point. A reported answer can be a plausible alternative to the true answer, which gives the person who supplied it some deniability. Applying that idea directly to whole sentences imposes a difficult requirement. Even an unrelated sentence needs an appreciable chance of being output in place of a given original. The number of possible sentences grows rapidly with length, so plausible responses that happen to preserve the topic or meaning occupy a small part of the available space.
Metric differential privacy makes closeness part of the guarantee. The paper traces the idea to location privacy, where reporting a nearby location can be more useful than reporting a point on the other side of the map. For written language, a continuous representation supplies an analogous geometry. A word embedding assigns a vector, or list of coordinates, to each word. Words that tend to occur in related contexts can occupy nearby positions. A privacy mechanism can then offer tighter indistinguishability for nearby inputs and allow greater differences in the output distributions of distant inputs.
The paper describes earlier work that used a bag of words and Earth Mover’s distance. A bag of words represents which words are present while setting aside their sequence. MADLIB instead works directly with continuous word embeddings. It moves the source word’s vector by a random amount and translates the resulting point back into a word. Embedding methods such as GloVe supply the space in which those operations take place. GloVe
A vector’s neighborhood is also shaped by how crowded that part of the space is. The paper explains that the magnitude of MADLIB’s perturbation depends on the dimensionality of the representation. Its noise rule treats crowded and sparse areas alike in that respect. In a crowded region, many different words can become plausible nearest neighbors once a point moves. In a sparse region, even a perturbed point can still lie closest to the source word. Earlier extensions addressed geometric concerns through different distances, including Euclidean, Manhattan, Mahalanobis, and hyperbolic distances. Arnold and colleagues keep the Euclidean setting for their comparison and look at a separate question about the kinds of words returned by the search.
Meaning in a neighborhood and grammar in a sentence
Word co-occurrence supplies evidence about meaning. It also places words near one another because they participate in the same events, appear in discussions of the same topics, or occur next to each other. Those relationships give a word embedding much of its practical value. Replacing a word in a particular sentence poses an additional question. The substitute must fit the position occupied by the original and work with the words around it. A noun can be closely related to a verb in the embedding space while contributing a different element to the sentence.
The distinction becomes concrete in the authors’ motivating example of sentiment analysis. An adjective can express an evaluation of the thing a sentence describes, and an adverb can modify the force of an evaluation. A substitute that stays within the broad topic may still remove or change that evidence. The authors consequently ask whether some downstream utility is lost at the moment when the procedure maps a noisy vector back to a word. Their proposal targets that choice.
The paper operationalizes grammatical fit using part-of-speech tagging, which assigns categories such as noun, adjective, and verb. A category describes a broad kind of grammatical behavior. It gives fewer details than a sentence analysis that identifies which noun is the subject or which phrase modifies the verb. The authors use this coarse distinction because it can be attached to vocabulary entries and consulted during word replacement. That decision makes the intervention small enough to compare directly with MADLIB and determines what the experiments can observe.
The method, step by step
From a sensitive word to a surrogate
Consider the path of a word through conventional MADLIB. The mechanism finds its vector in a fixed vocabulary and adds a random displacement. The new position generally falls between known vocabulary entries. To produce text again, the mechanism searches for a word near that position. Ordinary MADLIB returns the nearest approximate neighbor. Replacing the words of a text this way produces a sequence that can be passed to a downstream application.
The authors give the final lookup more flexibility. They request a ranked neighborhood around the perturbed point and compare the grammatical labels of its candidates with the label of the original word. If the closest candidate already matches, the search can return it. If a candidate farther down the ranking matches, it can take precedence over the closer candidate. When the neighborhood contains no match, the ordinary nearest choice is returned.
This makes the neighborhood serve two purposes. Its distances identify candidates that fit the sampled position, and its category labels distinguish candidates that are preferable under the grammatical rule. An unrestricted search for a category match could range far from the noisy point. A bounded list lets the procedure give category agreement priority within a local set of choices. The precision of the search is still described in terms of approximate nearest neighbors.
Syntax-guided word replacement in MADLIB
The steps in order.
To see why the ranking matters, suppose a source word is tagged as a verb and the closest candidate is tagged as a noun. If another candidate in the returned list is a verb, the mechanism selects the nearest candidate labeled as a verb. The same input can behave differently in the next run because a new displacement can place the vector in a region whose candidates have a different composition. The preference is deterministic once the candidate ranking and source label are given, while the ranking can change from query to query.
The paper’s candidate-pool parameter is k, the number of nearby entries considered after a perturbation. With k = 1, the method reduces to conventional MADLIB. Either the sole candidate matches the tag and is selected or the fallback selects that same candidate. With k = 20, the lookup can choose a matching word from a larger pool, and the fall-through to the nearest candidate remains available. This relationship gives the paper a baseline that shares the perturbation and vocabulary with the proposed variant.
The distance to a candidate in this decision is measured from the noisy point. This detail separates the selection rule from the later geometric analysis, which measures how far the selected replacement ended up from the original word. A candidate can lie lower in the ranking from the noisy point and happen to be closer to the original source position. The two rankings answer different questions. The distinction makes it possible to understand the geometric results without assuming that a grammatical choice necessarily moves the replacement farther from the source.
What the privacy formulas say
The paper introduces the standard definition of differential privacy before its metric version. It gives the following inequality for adjacent inputs and any event in the output range.
P[M(d) ∈ S] ≤ e^ε · P[M(d′) ∈ S]
Here M is the randomized mechanism, d and d′ are adjacent inputs, and the prime distinguishes the alternative input. In the paper, two datasets are considered adjacent if they differ by no more than a single record. S is any subset of the output range. P denotes probability, ∈ means that the output belongs to S, and ≤ gives the upper bound. The symbol e is the base of the natural exponential, ε is the privacy budget, and the dot indicates multiplication. In the paper’s notation, the mechanism maps an input domain D to an output range R.
For a fixed event S, the inequality compares its probability in two possible situations. The random mechanism runs on one dataset in the first situation and on an adjacent dataset in the second. The exponential factor limits how much more likely the event can be in the first. Since the definition ranges over pairs of adjacent inputs, exchanging their roles gives the comparison in the other direction. A smaller ε brings the multiplier closer to equality and gives the stricter guarantee.
At the word level, the paper uses a vocabulary W, an embedding function ϕ that sends words into the embedding space, and a distance function d on that space. The notation d here refers to distance, while d in the preceding formula was a dataset. The distance is non-negative. It is zero for a point compared with itself, symmetric between the points, and obeys the triangle inequality. These are the metric properties on which the formulation relies.
P[M(w) = ŵ] ≤ e^(ε · d(ϕ(w), ϕ(w′))) · P[M(w′) = ŵ]
In this expression M maps a vocabulary word to an output word in W. The symbols w and w′ are two possible inputs, and ŵ is a fixed candidate output. The hat distinguishes an output from an input, and the prime again distinguishes the alternative input. P is probability, = specifies the event that the chosen word is ŵ, and ≤ marks the bound. The function ϕ returns a word’s embedding vector, d measures the distance between the two vectors, and ε is the positive privacy budget. The base e and multiplication dots play their usual roles. Parentheses delimit the arguments of a function and group the exponent.
The additional factor inside the exponent is the core of metric differential privacy. If the input vectors are close, the permitted probability ratio for the same output is correspondingly tight. Distant inputs can have more distinguishable output distributions. The numerical value of ε must therefore be read together with the metric and embedding geometry. An ε setting describes the chosen mechanism in that space, and its practical interpretation depends on the distances to which it is applied.
The paper relates this definition to conventional differential privacy through the case of a Hamming-style distance that assigns 1 to distinct alternatives in the comparison. With a constant distance of 1, the exponent for those alternatives reduces to ε. The embedding formulation instead lets the permitted bound vary across pairs of words. That variation supports the goal of returning meaningful surrogates while expressing privacy in terms of how strongly the possible origins of the surrogate can be distinguished.
MADLIB implements its random perturbation with multivariate Laplace noise. Multivariate means that the displacement applies to a vector with several coordinates. The paper describes the noise scale as reciprocal to the budget.
1 / ε
The symbol 1 is the numerator, / denotes division, and ε is the privacy budget. This expression describes the direction in which the noise scale changes. A smaller ε means more noise and stronger intended privacy. A larger ε means less noise and more opportunity for the output to remain near its source. For the word analyses, the authors use ε = 5 for their high-privacy regime, ε = 10 for the moderate regime, and ε = 25 for their low-privacy regime.
The paper identifies robustness to post-processing as one of the attractions of differential privacy. The distinction relevant to the new lookup is what the selection step can see. A projection that uses only the perturbed point and public vocabulary data can be understood as a function of the noisy result. The grammatical rule also consults a label tied to the original word. That dependency becomes important when interpreting the empirical privacy comparison and the limitation the authors state at the end of the paper.
How the vocabulary and lookup were prepared
The authors use 100-dimensional GloVe for their experiments. To inspect the space before running substitutions, they take its 1, 000 most frequent words and display a two-dimensional projection. The projection uses t-distributed stochastic neighbor embedding, a visualization method for placing points from a higher-dimensional space on a plane. The displayed points are colored by their grammatical labels. The authors use the display to ask how readily a neighborhood in the embedding separates category types.
The visualization shows nouns, verbs, and adjectives distributed across the space, with more distinct regions for numerals and punctuation. The authors flag an important aspect of the setup. The category assigned to each word comes from the word in isolation. A form that can serve as either a noun or a verb has no surrounding sentence to resolve the ambiguity. The authors suggest that some items labeled as nouns may be verbs that received the wrong interpretation. The display therefore motivates a category-sensitive selection procedure and also reveals a weakness in the labels used to drive it.
The vocabulary for the experiments is a separate, larger selection built to keep the computation manageable. The paper reports a vocabulary size of 24, 525. It lists 5, 000 entries each for nouns, adjectives, and verbs, and also lists 5, 000 numerals. The selection includes 4, 341 adverbs, as well as categories with considerably fewer entries. The paper gives 26 pronouns and 92 adpositions. It also lists 6 conjunctions, 2 particles, 39 determiners, and 19 punctuation entries. Each vocabulary entry has a stored label from the scheme the authors take from the Universal Part-of-Speech Tagset.
The category counts give useful context for candidate selection. A neighborhood has to supply a matching word from the available vocabulary, and the availability of an alternative depends on where words of a particular category lie in the space. Entries from small categories can have few alternatives across the entire vocabulary. Entries in large categories can have many alternatives overall and still have an immediate neighborhood dominated by other tags. Both the distribution of tags and their positions matter.
To set k, the authors examine the unperturbed neighborhood of each vocabulary entry. They count how far they have to go through the neighbors to encounter another word with the same category and average that count across the vocabulary. From this procedure they choose k = 20 and use it throughout the guided experiments. The choice reflects typical neighborhood behavior before perturbation. After a displacement, the search is centered at a different point, and a given category can be rarer in that new neighborhood. The fallback is therefore part of normal operation.
The authors describe the computational overhead of the candidate-selection step in terms of the pool size.
O(log k)
O denotes asymptotic upper-bound notation, log is the logarithm, and k is the candidate-pool size. This is the paper’s stated cost for the added selection step. The experiment’s concrete setting is the fixed pool of k = 20. The paper treats the pool size as a hyper-parameter because the neighborhood needed to find a tag match can depend on the geometry and composition of the vocabulary.
The preparation supplies a fixed embedding, a vocabulary with a stored category for each word, and a chosen search-pool size. The learning stage that produces the downstream scores comes later. For those tests, the authors run the text substitution procedures over the training corpora and train BERT on the resulting texts. A reference run uses the training corpora in their unprotected form. This separation matters when reading the results. The intervention occurs in the material available for training, while the subsequent training runs follow the reference procedure.
Experiments and results
What happens to grammatical categories
The first experiment examines isolated words so that the authors can count category changes directly. They query each word in the 24, 525-entry vocabulary 100 times. For each query they record the stored category of the source and the stored category of the output. The resulting counts are arranged like a confusion matrix. Entries on its diagonal correspond to agreement between the input and output tag. An off-diagonal entry shows a particular transition, such as a source in one category being replaced by a noun.
At ε = 10, the conventional mechanism produces a prominent concentration of outputs in the noun category. As the intended privacy gets stronger and the perturbations become larger, the paper describes a tendency towards outputs composed almost entirely of nouns. That diagnosis comes from the direction of the changes. A single category-agreement score would reveal that errors occurred. The matrix shows that many errors lead to the same category.
The guided version produces a clearer diagonal. The authors report 81.4% category preservation for the constrained method at ε = 10 in the main discussion. The appendix gives 0.8145 for the corresponding guided setting and 0.4163 at ε = 5. Across the tested budgets, the appendix figures show that the benefit varies with perturbation. Where the noise is stronger, the nearby candidates can still fail to furnish suitable replacements. At ε = 25 the appendix reports that the advantage diminishes as perturbation becomes less frequent.
The main discussion uses 45.1% in two ways. It first gives that figure as the baseline estimate for changes in category and later calls it the baseline value in a sentence comparing the guided method’s preservation capability. The first usage has a clear meaning in the discussion of category changes. The wording of the later comparison leaves the baseline measure ambiguous, so the guided preservation score and the baseline change figure describe their respective reported quantities.
The authors compare their category-change estimate with the 7.8% reported by Mattern and colleagues for an identical budget. They attribute the discrepancy to the scope of the measurements. The earlier analysis counts nouns, verbs, adjectives, and adverbs, whereas Arnold and colleagues include eleven categories and tabulate transitions between them. A measure over the broader category scheme can capture changes that a study restricted to the most frequent lexical categories does not describe. The two percentages belong to their respective study designs.
A sentence example in the paper makes one kind of error concrete. Ordinary MADLIB replaces the word before with 1979. The example shows what can happen when the decision is governed solely by the noisy embedding position. A numerical word can win the nearest-neighbor search for a source whose original use called for a different kind of expression. The guided procedure is designed to favor a candidate with the corresponding tag when the neighborhood contains one. The example illustrates a substitution failure at word level, while the repeated-query matrix shows how such cross-category behavior is distributed more generally.
How far the replacements move
The geometric comparison looks at the Euclidean distances from original words to their selected substitutes. It compares the ordinary and guided procedures on cases in which a substitution has occurred and the methods select different candidates. Those cases expose the effect of choosing a different word from the neighborhood. A self-substitution would have zero distance from the original, and a shared output would contribute the same distance for both procedures.
The paper writes the two distances as norms. With the embedding function made explicit, the baseline distance is as follows.
‖ϕ(w) − ϕ(ŵ)‖
Here ϕ maps a vocabulary entry to its vector, w is the original word, and ŵ is the substitute chosen by the baseline. The minus sign indicates subtraction of the vectors, and the double bars denote the Euclidean norm, or length, of their difference.
‖ϕ(w) − ϕ(ŵ′)‖
The function ϕ, source word w, subtraction sign, and norm bars have the same meanings. The symbol ŵ′ is the alternative substitute produced by the grammatically constrained method. The prime distinguishes this output from the baseline output in the preceding formula.
Using 100 queries for each word and examining ε = 5, ε = 10, and ε = 25, the authors find very similar distributions of distance for the two mechanisms. The guided version shows a slight shift toward shorter distances from the source. Larger perturbations lead to greater distances overall. The authors interpret the similarity of the distributions as evidence that both procedures tend to draw from comparable regions of the embedding space.
This result can coexist with a guided procedure that sometimes passes over the nearest candidate. The skipped candidate is ranked by proximity to the random point. The plotted quantity instead measures proximity to the original word. If the selected tag match falls a little farther from the random point but back towards the source, the plotted distance can decrease. Euclidean distance here describes the position of an individual replacement in the embedding. The practical value of the resulting text is tested separately through the downstream tasks.
How often the original word reappears
The paper’s word-level privacy analysis uses two proxies for plausible deniability. The first is self-substitution, the tendency to return the sensitive word itself. The second is effective support, the diversity of outputs actually seen from repeated runs for that word. The paper denotes the first quantity by N with a subscript identifying the word.
Nᵥ = P[M(v) = v]
The subscript v identifies the input word, M is the randomized substitution mechanism, and P denotes probability. Inside the brackets, M(v) = v is the event that the word returned by the mechanism is the input again. The equality outside the brackets defines the proxy. The authors estimate this probability by recording self-substitutions over 100 runs, and they discuss the observed counts when comparing the procedures.
For effective support, the operational measure is the number of distinct outputs observed in the repeated queries. It can be written in terms of those runs as follows.
Sᵥ = |{Mᵢ(v) : i indexes the queries for v}|
The subscript v again identifies the word. Sᵥ is its observed effective support, Mᵢ(v) is the output for that word on query i, and i identifies a run of the randomized mechanism. The braces form the set of outputs, the colon introduces which queries contribute to that set, and the vertical bars give the set’s cardinality. Duplicate outputs therefore contribute a single member. The runs used to estimate Sᵥ number 100 for each word.
The authors expect stronger noise to make the source word less common in its results and to produce a wider variety of substitutes. Their histograms compare both measures at the three chosen budgets. Grammatical guidance shifts them modestly in the direction of more copies and fewer distinct outputs. Both changes are consistent with preferring candidates from a particular category. A candidate list can contain few matches, and the source word can itself be the closest available match.
At ε = 10, an average word returns itself about 29 times under ordinary MADLIB and about 32 times under the guided method over 100 queries. The average number of distinct observed outputs moves from about 66 to about 61. The authors interpret these results relative to a reference count of 50 for their average-case discussion. This comparison concerns typical repetition and diversity across their vocabulary. The histograms matter because an average does not describe the exposure of every word, especially when different parts of the embedding have different densities.
How well training on the surrogate text works
For their utility test, the authors select tasks from GLUE and privatize each task’s training corpus once for each comparison mechanism. The benchmark covers different kinds of decisions. CoLA is used for grammatical acceptability, and SST2 for sentiment. QQP and MRPC compare text pairs. STSB measures textual similarity on a graded scale, and MNLI, QNLI, and RTE are grouped under textual entailment in the paper. This range lets the authors test a motivation drawn from sentiment on tasks that depend on other aspects of the text as well.
CoLA is reported using Matthews correlation, which compares predicted and actual labels while accounting for their different combinations. STSB is reported using Spearman correlation, which measures agreement in the ordering of scores. Accuracy, the fraction of decisions that receive the correct label, is the metric listed for the remaining tasks. The paper then reports an average across the selected benchmark scores. This average combines those different task metrics and should be read as the benchmark summary reported in the study.
The authors calibrate the utility comparisons using their word-level plausible-deniability criteria. They present p = 0.9 as their stricter condition, with the main discussion describing it as a .90 quantile of words, and p = 0.5 as the average-case condition, described as a .50 quantile. Here p specifies the share of words covered by the calibration criterion. It is distinct from ε, which controls the random perturbation through the noise scale. The authors calibrate the available budget for each procedure to reach the intended coverage, because the two procedures differ slightly in their empirical proxy behavior.
Average downstream score on the selected GLUE tasks by training condition
Syntax guidance improves the average at both calibration levels, and training on unprotected text gives the highest score.
The numbers
| System or setting | Average reported GLUE score |
|---|---|
| BERT trained on unprotected text | 0.8146 |
| Ordinary MADLIB, p = 0.9 | 0.5545 |
| Ordinary MADLIB, p = 0.5 | 0.6875 |
| Syntax-guided MADLIB, p = 0.9 (this paper) | 0.6011 |
| Syntax-guided MADLIB, p = 0.5 | 0.7077 |
In the stricter condition, the paper describes the ordinary and guided averages as 55.45% and 60.11%, respectively. It presents the gain as 4.66% and gives an unprotected-training reference of 81.46%. The reference establishes how the same downstream training procedure performs when the original text is available. Both private training conditions have lower averages, which puts the improvement from grammatical selection in context.
CoLA offers a task-specific view because its labels concern the linguistic acceptability of sentences. The guided system scores higher than ordinary MADLIB under each calibration level in the paper’s table. The figure also shows how sensitive performance is to the change from the average-case to the stricter regime.
CoLA Matthews correlation by training condition
The grammatical constraint improves acceptability classification at each calibration level.
The numbers
| System or setting | Matthews correlation |
|---|---|
| BERT trained on unprotected text | 0.5792 |
| Ordinary MADLIB, p = 0.9 | 0.0248 |
| Ordinary MADLIB, p = 0.5 | 0.2303 |
| Syntax-guided MADLIB, p = 0.9 (this paper) | 0.0928 |
| Syntax-guided MADLIB, p = 0.5 | 0.3493 |
The CoLA comparison concerns recovering useful training evidence for an acceptability classifier. The linguistic matrix concerns a different outcome, whether a particular source word and surrogate word share a stored tag. The rise in the CoLA score connects the word-level intervention to task performance. The gap from unprotected training shows how much acceptability evidence remains difficult to exploit after the substitutions.
The broader result goes beyond the paper’s original emphasis on sentiment. Preserving word type can help a learner extract different kinds of evidence from the training material, and the average improves under both empirical calibration conditions. The task results also vary. RTE, for example, has a reported accuracy of 0.5663 for ordinary MADLIB and 0.4525 for the guided version under p = 0.9. At p = 0.5 the corresponding accuracies are 0.6027 and 0.5420. The average thus describes a mixture of task-level outcomes, including cases where the intervention is less helpful.
What the IMDb privacy experiment measures
The appendix examines membership inference on IMDb. In this setting an observer sees a trained classifier’s outputs on example records and tries to infer which of those records were used during training. The existence of a privacy effect is tested through this inference task, separately from the vocabulary histograms. Where the histograms ask what a perturbation mechanism returns for a word, the attack asks what a subsequent classifier reveals about uses of whole records.
The authors divide IMDb into four disjoint partitions and balance the member and nonmember categories in the attack setup. Once the procedure being studied has privatized the first partition, that partition is used to train the target classifier. A shadow classifier with the same architecture is trained on the unprivatized second partition. The shadow classifier supplies examples of how training members and nonmembers might look to the observer. Its outputs on the second partition serve as member examples for training the attack, and its outputs on the third supply nonmember examples.
The inputs to the attack classifier are logits, the scores the target or shadow classifier produces before its final output conversion. The appendix describes a multilayer perceptron with a hidden size of 64 and nonlinear activations as the attack classifier. Once it has learned from the shadow outputs, it receives logits from the target on the first partition and the fourth. The first contains target training records, and the fourth provides records outside target training. Disjoint partitions give the attack separate records on which to learn and on which to be assessed.
The appendix discusses macro-averaged precision and recall and reports its attack score as area under the precision–recall curve. Precision asks how frequently a prediction of membership is right. Recall asks how much of the membership group the attack identifies. The curve summarizes their relationship as the decision threshold varies. While the paper frequently calls its reported result attack accuracy, the area under that curve is the quantity it says it reports.
The authors report a score of 0.53 for the attack on unprotected training. With a practical privacy budget, both privatized settings give results around 0.5 over three independent trials. The paper uses 0.5 as its random-guessing reference. In this experiment the attack therefore yields little evidence of a systematic distinction between the ordinary and grammatical variants. The observed scores belong to the IMDb setup and the attacker the authors trained.
What the ablations show
The comparison isolates the replacement rule as a package
The principal controlled comparison is between ordinary MADLIB at k = 1 and the proposed rule at k = 20. Both start with the same vocabulary and embedding representation and use the multivariate Laplace perturbation. The larger pool is useful because the categorical preference can move the chosen word away from the first-ranked candidate. This comparison tests the neighborhood expansion and tag-based selection together. It provides evidence about the complete proposed rule as a change to MADLIB.
An unrestricted larger pool would still need a policy for choosing an output. If that policy always chose its closest candidate, retrieving extra entries would leave the result the same as ordinary nearest-neighbor selection. What makes a larger pool consequential here is how the candidates are ranked for selection once the tag constraint is applied. The paper studies that particular use of the extra candidates. The experiments focus on one guided pool size, so the behavior of intermediate or much larger pools remains a question for further comparison.
The word-level matrices reveal which change the added rule produces most directly. There is a stronger diagonal and less concentration exclusively in the noun column. An evaluation based only on replacement frequency could miss this. A mechanism might change many words and still collapse a range of source categories into one frequent output category. Showing the source and output tags together indicates which classes keep some of their identity under the proposed rule.
The matrix also helps separate category preservation from vocabulary preservation. A different word with the same tag counts as a success on the grammatical measure. The self-substitution proxy separately records when the returned word is exactly the source word. Looking at both measures gives a more informative picture of what is retained. The study reports higher tag agreement alongside a modest rise in exact copies, while the observed support shows that the constrained mechanism still produces a range of outputs.
Changing the noise reveals where guidance has room to help
The appendix repeats the category comparison at ε = 5, ε = 10, and ε = 25. This is a controlled change to the noise setting within each mechanism. The results show how the same grammatical preference can act differently depending on where the perturbed point falls. The preference can select only among the candidates near that point, which links its success to the interaction of noise scale and embedding geometry.
At ε = 5, stronger noise can move the search into a neighborhood with little representation of the source’s category. The appendix’s guided preservation score of 0.4163 belongs to this setting. The result puts a concrete limit on what a finite neighborhood can supply under stronger perturbation. Even when a suitable tag is stored in the dictionary, a suitable candidate still has to appear among the retrieved entries.
At ε = 10, the guided matrix is more strongly diagonal, and the appendix reports a preservation score of 0.8145. Under ε = 25, perturbations are less frequent or less disruptive in the paper’s interpretation, and the advantage of adding the guidance becomes smaller. A baseline search that already returns the original word or a nearby word of the same tag leaves fewer decisions for the extra rule to change.
The authors’ choice of k = 20 derives from average neighborhood behavior around the original vectors. The budget comparison reveals why preserving a category is harder in some trials than that initial neighborhood count might suggest. Larger perturbations make the original neighborhood a weaker guide to the composition of the actual candidate list. A fixed pool can therefore support many successful choices at a moderate privacy setting while leaving greater reliance on fallback at a stronger setting.
Distance, utility, and privacy give different views of the same change
The geometric analysis selects cases in which the two mechanisms choose different substitutes. It asks whether the grammatical preference typically pushes replacements into distinctly more distant regions of the space. The plotted Euclidean distributions stay close, with the guided distances shifting slightly towards the source. This makes large changes in distance an unlikely description of what happens in the comparisons actually plotted. A categorical change in the choice can occur within much the same span of embedding distances.
The utility test asks whether those choices change what a downstream learner can do. CoLA provides a direct connection to the motivation for retaining grammatical information, while the average across the selected GLUE tasks shows that the observed improvement extends beyond one kind of label. The lower RTE scores show why the task-by-task comparisons matter. The rule acts on individual words in every training corpus, and tasks can differ in how much their useful signal depends on the particular relations preserved or disrupted by those replacements.
The privacy proxies reveal a further consequence of the same rule. In the moderate regime, a matching-category preference results in somewhat more exact repetitions and somewhat fewer distinct observed words. This is consistent with drawing more often from a narrower part of the available candidates. The privacy-calibrated utility test responds to the difference by comparing procedures at the chosen coverage levels rather than relying only on the equality of ε. The IMDb attack then provides a separate comparison in terms of a downstream observer’s performance.
Together these analyses help distinguish what was changed experimentally from what was interpreted. The category histograms directly record the behavior targeted by the rule. The geometric comparison locates the resulting replacements relative to their sources. The task scores measure the usefulness of privatized training sets, and the privacy analyses measure two sets of observable consequences. A direct estimate of how much of the benchmark improvement is mediated by grammatical agreement would require more independent variation of the properties changed by the selector.
Limitations
Limits identified by the authors
The authors explicitly acknowledge that choosing candidates by reference to the original word’s grammatical category incurs additional information leakage. The noise mechanism and metric establish the background against which the paper compares variants, but the final choice in the guided procedure uses information tied to the sensitive input. A recipient who sees a substitute may gain evidence about the original category precisely because matching that category has become more likely.
This is the central qualification on the privacy result. In a standard post-processing argument, the later operation receives the private output of the earlier operation and acts on that output. The proposed selector has access to the noisy location and the source tag. Though the tag can be obtained from a fixed dictionary, the choice of which tag to consult depends on the private word. The operation can therefore distinguish between inputs in a way that is additional to the distance-based perturbation.
The authors suggest formulating candidate selection through the exponential mechanism to address the leakage. That is a proposed direction, and the experiments evaluate the matching rule already described. A formal treatment would need to account for the privacy effect of the category-dependent choice, in addition to the randomness used to obtain the noisy point.
The paper also calls attention to the category labels assigned in isolation. A stored label on a word type is an economical lookup tool, but the authors recognize that it can misclassify words whose roles depend on context. They mention possible verbs being counted as nouns in the embedding analysis. This issue bears on the measurement as well as the selection rule, because the same kind of label used to prefer a surrogate is used to count agreement.
Limits apparent from the experimental setup
Category agreement is narrower than syntactic preservation of a sentence. The word experiment identifies whether a source and its replacement share a dictionary label. A pair of verbs can differ in what arguments they require, and a pair of nouns can differ in number or in the constructions in which they fit. These are examples of why a useful tag preference can still leave substantial work for sentence-level evaluation. Similarly, a replacement can keep a category while affecting the sentiment or meaning of the sentence.
The paper’s sentence example and the CoLA scores offer two views beyond the isolated-word matrix, each with its own scope. The example demonstrates a particular kind of category error and illustrates how a grammatical constraint can help. CoLA measures the performance of training on surrogate text for an acceptability task. A direct assessment of grammaticality across privatized sentences would ask how often the released sentences themselves are acceptable and which constructions survive. The experiments reported here support conclusions about tag retention and downstream utility.
The vocabulary is another important boundary. The authors choose a particular subset of GloVe and set the guided pool size using neighborhood statistics from that subset. A different inventory changes which words are available and can change the local mix of labels. The paper’s results therefore characterize the specified vocabulary and embedding configuration. Its numerical comparisons do not determine a suitable pool size for another embedding or the behavior of words outside the selected list.
The isolated-word tests and the corpora used for downstream training also weight words differently. Querying every entry 100 times gives each entry equal attention in the vocabulary experiment. A training corpus naturally gives more influence to words that occur frequently or matter particularly strongly for its task. Even a precise estimate of the average tag retention across the experimental vocabulary would leave open how much usable evidence a given corpus preserves.
The reported utility averages likewise depend on what is being combined. Most tasks contribute accuracy, while CoLA and STSB contribute correlations. The paper’s aggregate summarizes the chosen evaluations, and the individual results give the appropriate scale for each task. The report of improved average performance under each calibration condition is therefore strongest when read alongside task-level gains and losses. Extrapolation to a new task requires knowing which distinctions in the original text supply the evidence that task needs.
The two empirical privacy approaches have separate limits. Self-substitution measures how often a particular sensitive word reappears when queried, and support measures how many distinct outputs are observed in a fixed series of runs. Neither directly estimates how likely the same surrogate is under two alternative inputs, the comparison required by the word-level privacy inequality. Large observed support can coexist with output probabilities that are highly uneven. Likewise, a low self-substitution count leaves open how much someone can infer from a recurring substitute that reliably signals the source or its category.
The quantile-based calibration provides a practical coverage criterion for comparing the procedures. It concerns the share of words satisfying the proxy conditions. Individual words can occupy the tails of those distributions, which is relevant to the authors’ observation that dense and sparse regions pose different problems. An evaluation in which every word needs a formal guarantee would have to establish how the selection rule behaves for such cases, including those with few same-category neighbors.
The membership experiment supplies evidence about an attacker observing logits from a target trained under a particular IMDb partition and privatization procedure. The near-reference scores describe that test. Other possible inferences, including identifying a particular source word in a released surrogate text, have different targets and access assumptions. The modest distinction between the attack score for unprotected training and the paper’s reference mark also confines the comparison to the sensitivity of that experiment. The formal privacy of the guided rule remains an independent question even when the tested attacker makes little progress.
Finally, the paper’s word-level bound is stated for possible replacements of a vocabulary entry. A published surrogate sentence contains a combination of outputs, including any stylistic or grammatical regularities that survive across positions. The downstream benefits show that useful information does survive. Determining how the grammatical guidance affects disclosure from sequences would require an account that connects the individual substitutions with the information available to an observer of the complete text.
What came after
One later study citing Arnold and colleagues is Meisenbacher’s A Systematic Exploration of Text Decomposition and Budget Distribution in Differentially Private Text Obfuscation. Its stated subject is how text is decomposed for differentially private obfuscation and how the privacy budget is distributed. These are decisions about what pieces of a text to process and how to allocate protection across the resulting treatment of those pieces.
Arnold and colleagues hold the basic unit of replacement fixed at a vocabulary word. They study what happens after that word’s vector is perturbed, when the procedure has to select a discrete substitute. Their two empirical utility calibrations concern the share of vocabulary words meeting plausible-deniability conditions. The later study puts decomposition and budget distribution themselves at the center of the research question. That change of emphasis links the studies at the level of experimental design. Both concern choices in the transformation of text that affect how the released material represents its source.
The citation establishes that the later study considered the earlier syntax-guided work in addressing private text obfuscation. The later study’s stated scope supports a connection through choice of textual unit and allocation of privacy budget. Whether it implements the part-of-speech constraint, reproduces the GLUE comparison, or assigns a privacy cost to consulting the source tag remains unspecified.
Cite
Cite as Stefan Arnold, Dilara Yesilbas and Sven Weinzierl. 2023. Guiding Text-to-Text Privatization by Syntax. Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023).
@inproceedings{arnold2023guiding,
title = {{Guiding Text-to-Text Privatization by Syntax}},
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.14},
url = {https://doi.org/10.18653/v1/2023.trustnlp-1.14}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/arnold-2023-guiding-text-text-privatization-syntax/