Can Machine Unlearning Reduce Social Bias in Language Models?
Paper · 2024 · Omkar Dige, Diljot Arneja, Tsz Fung Yau et al.
Summary
A language model can produce a fluent answer and still rely on a stereotype where the context gives it no reason to do so. Dige and colleagues ask whether that tendency can be weakened after training, while preserving the abilities that make the system useful. This is a practical question for organizations using pretrained systems whose original training data they may be unable to inspect or replace. The paper compares two ways of using machine unlearning to change behavior with a method that teaches the system to favor less stereotypical responses. The comparison treats social bias and the quality of the resulting language as separate outcomes.
The methods differ in what they change and what evidence they use. Partitioned Contrastive Gradient Unlearning, or PCGU, finds groups of weights that respond differently to two possible answers and updates only a selected fraction of them. Task-vector negation first tunes a copy of the original system on stereotypical text. The authors measure how its weights moved during that training, then move the original weights in the opposite direction. Direct Preference Optimization (DPO) learns from paired responses, with the anti-stereotypical response designated as preferred. The authors test the methods on OPT at 1.3B, 2.7B, and 6.7B and on the non-chat LLaMA-2 7B.
Task-vector negation with the larger training collection reduced the RedditBias score by 25.5% for LLaMA-2 7B and by up to 40% across the OPT experiments. DPO lowered the LLaMA-2 7B bias score by 27.9% and caused a smaller rise in perplexity, a measure of how surprising ordinary text is to the system. Across OPT, the larger task vector gave up less on that measure than DPO did. PCGU achieved a particularly low bias score on LLaMA-2 7B, but its perplexity rose by 19.3%, and some open-ended completions broke down into repeated answer letters. On OPT the authors found no comparable bias reduction from PCGU.
The larger task vector was the more consistent of the two unlearning methods across the systems tested. Its practical advantage was an adjustable strength. After training the vector, the authors could vary how far to move the original weights and observe the resulting tradeoff between the bias score and language performance. Stronger negation sometimes produced better bias scores alongside appreciable losses in task performance or coherence. The experiments show that these edits can change the behavior measured by the authors’ tests, and that the choice of edit strength matters to the quality of the resulting system.
Deep dive: Can Machine Unlearning Reduce Social Bias in Language Models?
The paper compares machine unlearning with preference tuning to see which methods reduce social bias while preserving language generation. · about 34 minutes to read
The problem and its context
Why change a system after training?
The paper starts from a constraint familiar in customer-facing applications. An organization can deploy a pretrained language model while having limited visibility into what that system was trained on. If its responses reflect harmful social associations, replacing suspect examples in the original corpus may be impossible. Training a replacement on a newly prepared corpus is another option, with a substantial computational cost. Both considerations make an intervention after pretraining attractive. The authors ask how well several such interventions work and what they cost in terms of other behavior.
The paper uses social bias to describe discriminatory or prejudicial treatment connected to people, groups, or ideas. The behavior of interest can show up in several ways. A system may assign different levels of plausibility to otherwise comparable statements about different groups. It may make an unsupported choice about who occupies a role. When asked to continue a passage, it may introduce an association the prompt does little to justify. The paper studies these manifestations with different kinds of evidence. A relative preference measured from probabilities and an association that actually appears in generated text tell the reader different things about the system.
Ambiguous questions make the problem especially clear. Suppose a short scenario mentions two people and asks which of them holds a particular job. If it says nothing about either person's occupation, choosing one of them can reveal an association supplied by the system. For the gradient-based intervention, the authors use this kind of question to construct a pair of alternatives. The pair gives the method a way to ask which parts of the system respond differently to an answer that follows a stereotype and one that runs against it.
A useful edit also has to preserve ordinary capabilities. A language system assigns probabilities that serve many purposes at once. The weights that affect an undesirable association can also affect how a passage continues, how a reasoning question is answered, or whether a response stays coherent. Lowering a bias score therefore answers one part of the research question. To judge whether the edit is useful, the authors also measure performance on ordinary text, a collection of commonsense tasks, and a reading-comprehension benchmark. They inspect generated passages as a further check on what the quantitative changes look like in use.
How earlier research approached forgetting and alignment
The paper describes work on preventing bias through data preparation, including counterfactual data augmentation. That line of research addresses the examples a system learns from. An intervention on an existing system starts elsewhere. It works with weights that already reflect pretraining and asks whether some of the resulting behavior can be changed selectively. That distinction explains why the authors compare editing and preference learning even though both involve additional training or optimization.
Earlier machine-unlearning research, as reviewed in the paper, frequently framed forgetting around data or information that should cease to influence a trained system. One early proposal reorganized learning so that removing data could be handled by recomputing part of the calculation. Other work sought to change specific factual associations in a transformer. Research on knowledge unlearning for privacy illustrates another motivation for changing behavior after training. The authors borrow the idea of selective forgetting and apply it to a target that appears across prompts and groups. Their training examples give them a way to express the behavior they want to weaken, even though its origins in pretraining are unspecified.
The paper also describes work that divides training data into subsets so that forgetting can be handled by modifying a smaller component. Another line uses influence functions to estimate how training examples affect later predictions. The authors cite work on language-model generalization with influence functions alongside debiasing research that uses the same general idea. These approaches motivate different questions about the relationship between training data and behavior. The experiments here use gradients or differences between checkpoints as the evidence for an edit.
The immediate predecessor of PCGU identified candidate weights in masked language systems. A masked system can use surrounding text to predict a hidden word. In a decoder that predicts what comes next, the context for a prediction is the prefix already presented. The authors therefore have to redesign the input to make the competing answers easy to compare at the end of the same prefix. They also extend the experiment beyond the gender-focused setting of the prior work. The original idea of ranking groups of weights is retained, while the examples and their presentation change.
Task arithmetic supplied the second unlearning approach. In the account given here, earlier applications used differences between pretrained and tuned weights to steer behavior, including using the reverse direction to curb toxic generation. Social bias gives the approach a different target. A response can contain a socially loaded inference even when its language appears ordinary, so the authors build a training collection around stereotypical continuations and selected comments. The experiment asks whether their combined training effect gives a useful direction for the reverse edit.
Preference tuning supplies a way to pursue the same goal directly. In the paper’s account, DPO uses examples with a preferred and a rejected response to change their relative standing. It draws on the alignment setting that also motivates Proximal Policy Optimization, while learning from the response preferences without a separate reward-model training stage. The authors can therefore compare a direct expression of the desired behavior with the indirect tactic of learning an undesirable behavior and reversing its parameter change. That comparison depends on what each method sees during training, an issue the paper addresses by giving one version of the task-vector method the same underlying StereoSet examples as DPO.
The method, step by step
Starting from the same pretrained weights
For each pretrained system, the authors evaluate the original checkpoint and make separate edited versions. A checkpoint is a saved set of weights. The unedited checkpoint serves several purposes. It establishes how the system behaves before intervention. It supplies the starting weights for each method. For task-vector negation it also provides the point from which the authors measure, and later reverse, the change induced by training.
Each method needs evidence about a stereotype in a form it can use. PCGU requires two alternative answers to the same context and compares gradients for those answers. A task vector requires a collection of text on which the pretrained system can be deliberately tuned toward the behavior of interest. DPO requires both a preferred response and a rejected response for a prompt. The methods thus use related ideas about what counts as a stereotype, expressed through different training examples and different objectives. The flow below follows task-vector negation from text selection to evaluation.
How task-vector negation produces a debiased checkpoint
The steps in order.
Turning ambiguous questions into comparable answers
PCGU uses the ambiguous portion of the Bias Benchmark for Question Answering, abbreviated BBQ. The training collection contains 15,678 sentence pairs and spans 9 protected groups. Its categories include race-ethnicity, socioeconomic status, and gender identity. It also covers age, nationality, and physical appearance, as well as disability status, religion, and sexual orientation. The authors leave out the benchmark’s race-gender and race-SES combinations to simplify the experiment. The resulting evidence comes from comparisons organized around the included groups.
For each ambiguous item, the authors identify the answer associated with the stereotype and the competing answer. PCGU calls the first answer the advantaged term and the second the disadvantaged term. These are names for the answers’ roles in the training contrast. In the paper’s example, a man and a woman arrive late for a meeting, and the question asks who the secretary was. The context leaves the question unresolved. The authors designate the woman as the stereotypical choice for that item and the man as the competing choice. The edit uses the contrast to challenge the preference implied by the stereotype.
Simply appending the names of the two entities would create a problem for the comparison. The words can split differently under tokenization, the process of turning text into the units the system predicts. In the authors’ example, the word for the man occupies a single token, while the word for the woman splits into two. Comparing the continuations would then involve a different set of predictions at different positions. A gradient for an answer would reflect both the identity named in the answer and how that particular wording is divided into prediction units.
The authors place both alternatives in the common question prefix and give them the letters A and B. The alternative continuations share an answer format and differ at the final option letter. In the meeting example, the prefix identifies A with the woman and B with the man. When comparing the likelihood of each answer, the method can focus on the same position in both sequences. This solves the matching problem by moving the contrast to answer labels. It depends on the system connecting each label to the corresponding entity in the prefix.
This adaptation makes the direction of prediction important. The decoder has encountered the scenario, the question, and both answer descriptions by the time it predicts the option letter. It can therefore use information about the people being compared when assigning probability to the letter. At the same time, that last prediction is narrow. The method is using the probability of an answer token as a signal about a social association, and the distinction between those two things matters when interpreting the later generations.
Ranking groups of weights and applying the PCGU update
PCGU begins by dividing weight matrices into vectors. The paper describes an input aggregation, which groups weights by rows, and an output aggregation, which groups them by columns. The authors use input aggregation in the reported experiments. They found output aggregation slower and less effective in their trials. Once the weights are grouped, the gradients for the two answers can be partitioned in the same way, so that each pair of gradients refers to the same set of parameters.
The paper denotes the pretrained weights by θ and the alternatives by a₁ and a₂. The first is the advantaged answer and the second is the disadvantaged answer. Their gradients, ∇a₁ and ∇a₂ in the paper’s shorthand, describe how the likelihood of each answer changes with the weights. Within a group of weights, PCGU measures the cosine similarity of the two gradients. Cosine similarity compares the directions of the gradients. A low score means the directions are less aligned, so a change in those weights can have different consequences for the two answers. PCGU treats such a group as a promising place to intervene.
The next step is to order the groups by similarity and select the fraction denoted by k. In the experiments k is stated as a percentage of weight vectors. The update rule in the paper writes the cutoff in terms of the selected ranks. The rule below is the paper’s version for decreasing the probability of the advantaged answer.
θᵖʲ ← θᵖʲ − α 𝟙{j ≤ k} ∇ᵖʲa₁
Here θᵖʲ is the weight vector in partition pʲ, and j identifies its place in the ordering used for selection. The left arrow means the expression on the right replaces the current vector. The learning rate α sets the size of the step. The indicator 𝟙{j ≤ k} admits the update for groups inside the selection cutoff and makes the step vanish elsewhere. In that indicator, k represents the cutoff corresponding to the chosen share of the ranked groups. The term ∇ᵖʲa₁ is the part of the advantaged answer’s likelihood gradient associated with partition pʲ. The minus sign moves the weights against that gradient.
The authors take the other direction available in PCGU for their experiments. They use the disadvantaged answer’s gradient and increase its likelihood in the selected partitions. Their stated reason follows the earlier work’s aim of making stereotypical and anti-stereotypical choices more nearly comparable. In either direction, the selection and update serve different purposes. The similarity calculation decides where to intervene. The likelihood gradient decides how to change the chosen weights. Once a group falls below the selection cutoff in priority, it stays fixed for that update even if it is closely related to a group that moves.
The authors first fix k at 30% while manually tuning learning rate, batch size, and epoch count for each pretrained system. For OPT 1.3B they use a learning rate of 3e-4, a batch size of 256, and 5 epochs. For OPT 2.7B these settings are 4e-4, 256, and 10 epochs. OPT 6.7B uses 1e-3, 128, and 3 epochs. LLaMA-2 7B uses 2e-4, 512, and 3 epochs. With those choices fixed, they explore k from 20% to 40% in steps of 5%. The authors report seeing no change in bias score below 20% in the tuning that motivated that range.
At larger sizes, the method also requires an implementation change. Weights, intermediate activations, and gradients must all be accommodated during training. The paper reports that a single A40 or A100 can support small systems, while one device is insufficient for the larger OPT and LLaMA-2 configurations they study. The authors implement a distributed version using Hugging Face Accelerate, which can divide the system across devices and use CPU memory as well. They make that PCGU implementation public. Distribution enables the run to fit the hardware available to the experiment. It leaves the statistical rule used to select weight vectors in place.
Learning a direction to reverse
The task-vector method begins by making stereotypical text more familiar to a copy of the pretrained system through fine-tuning. The tuned copy provides an intermediate checkpoint. Its purpose is to reveal what parameter change resulted from training on the selected text. The authors then use the change in reverse. This is the step that turns a procedure for learning a behavior into the paper’s proposed intervention for reducing it.
The smaller training collection, TV-2k, is built from StereoSet. It uses the same 2,123 instances that supply the preference comparison, across race, profession, gender, and religion. To turn an instance into training text for the task vector, the authors join its context to its stereotypical continuation. That puts the association they want to study into a single sequence. DPO draws additional information from the same instance because it also uses the anti-stereotypical continuation.
TV-14k, which the paper sometimes abbreviates as TV, expands both the amount and the variety of training text. For StereoSet, the authors use examples from the intersentence and intrasentence categories. The first category separates a context from a continuation, while the second places the relevant material within a sentence. In both cases the authors form training text from the context and stereotypical response. They add material from Civil Comments, retaining examples above a toxicity score of 0.5 in the identity-attack and sexually explicit domains. They choose those domains because they consider them relevant to the kinds of social bias in the study.
TV-14k contains 14,872 training sentences. The StereoSet contribution includes 1,938 in race, 1,637 in profession, 497 in gender, and 157 in religion. The Civil Comments portion includes 7,633 in identity attack and 3,010 in the sexually explicit category. These counts describe the material used to learn the direction, before the direction is reversed. They also show that moving from TV-2k to TV-14k alters the mix of examples considerably. A contrast between the two variants measures the effect of replacing one training collection with the other.
To tune the copy, the authors use Low-Rank Adaptation, or LoRA, through the Hugging Face PEFT library. LoRA introduces a smaller set of additional trainable weights, reducing the training and memory burden. The authors then implement the negation and scaling as arithmetic on the learned changes. The paper describes that arithmetic in terms of corresponding coordinates of the pretrained and tuned weights. The conceptual picture is the same when the change is represented through the added parameters. What matters for the edit is the direction and size of the change relative to the starting system.
The task vector is defined as follows.
τₜ = θₜᶠᵗ − θₚᵣₑ
Here t denotes the task used for tuning, which in this application is learning from the selected stereotypical text. The vector τₜ is the change associated with that task. The term θₜᶠᵗ denotes the weights after fine-tuning, with the superscript ft marking that stage. The term θₚᵣₑ denotes the pretrained weights. Subtraction is element by element, so each coordinate of τₜ records the movement of the corresponding parameter. In the paper’s notation, τₜ belongs to ℝᵈ, the space of real-valued vectors with d coordinates. The dimension d counts the parameter coordinates represented in the vector.
The paper gives the general operation for applying a task vector as follows.
θₙₑw = θₚᵣₑ + λτₜ
The symbol θₙₑw denotes the edited weights, θₚᵣₑ is the starting checkpoint, and τₜ is the vector being applied. The coefficient λ scales the movement. Multiplication by λ changes the magnitude of the adjustment, and addition applies it coordinate by coordinate to the starting weights. A coefficient of 0 gives the original weights. With an unchanged task vector, a positive coefficient moves in the direction found during fine-tuning.
To use the operation for unlearning, the paper reverses the vector before adding it.
τₙₑw = −τ
Here τ is the original task vector and τₙₑw is its negation. The minus sign reverses the sign of each coordinate. Using τₙₑw as the vector in the addition rule makes the direction of the edit oppose the training change. The coefficient still controls how far the edited weights move. This gives the authors a family of candidate checkpoints from the same training run. They can test a different strength by changing λ while keeping the underlying direction fixed.
During task-vector training, the OPT systems use a batch size of 4, a gradient accumulation setting of 4, and a learning rate of 2e-4. LLaMA-2 uses a batch size of 2, a gradient accumulation setting of 8, and a learning rate of 5e-4. Gradient accumulation combines gradients from successive batches before updating the trainable parameters, which lets the authors use the smaller batch for LLaMA-2. They train for 10 epochs and save the checkpoint with the lowest loss. After forming the vector, they evaluate λ from 0 to 1 in increments of 0.2. The fine-tuning loss selects the checkpoint that supplies the direction. Bias and capability evaluations determine how much of the reversed direction the authors use.
Learning a preference from paired continuations
DPO uses StereoSet’s intersentence examples, where the authors can separate the prompt and the candidate completions clearly. An instance supplies a context, a stereotypical continuation, and an anti-stereotypical continuation. The context becomes the prompt. The authors label the anti-stereotypical continuation as preferred and the stereotypical one as rejected. The labels capture the desired ordering for that specific pair. They give the system a direct comparison between alternative responses to the same prompt.
The preference training uses a policy and a reference. The policy is the system whose weights are being trained. The reference is a copy that supplies the starting comparison. The training objective uses both continuations and their likelihoods to favor the preferred answer relative to the rejected answer and to the reference. This lets the authors use preference pairs directly, following the paper’s description of how DPO incorporates the information that would otherwise be represented through a separate reward model.
All DPO runs use a batch size of 4 and gradient accumulation of 4. The learning rate is 5e-5, with a cosine scheduler that varies the learning rate over training. The authors train for 200 steps and retain library defaults for the other settings. The training prompts are drawn from the collection also used for TV-2k. Given a shared prompt, DPO can learn from the difference between the two supplied completions. TV-2k learns from the stereotypical completion joined to the context and depends on weight reversal to weaken the resulting association. A common set of instances therefore controls where the examples originate while leaving the information supplied to the objectives different.
Experiments and results
Measuring bias and retained capability
The comparison uses four pretrained checkpoints across two families. OPT 1.3B, OPT 2.7B, and OPT 6.7B give the experiment several sizes within one family. LLaMA-2 7B is the non-chat variant and gives the authors another family to test. Each checkpoint is evaluated before editing and after PCGU, DPO, TV-2k, and TV-14k. The main comparison reports selected settings for the methods with an explicit scale or selection fraction. The parameter sweeps examine additional settings separately.
The edit methods are trained on the collections described above. For bias evaluation, the authors use RedditBias. It contains contrasting sets of sentences in each of 4 categories, covering gender, orientation, race, and religion. For each category, the authors compare the perplexity distributions of the two sets with Student’s t-test. Perplexity describes how surprising the sentences are under the system’s predictions. A t-value with a larger magnitude gives stronger evidence in the test that the groups differ. The authors report the absolute value, so the metric tracks the strength of the contrast without retaining which side had higher perplexity. In the comparison, a smaller RedditBias t-value is interpreted as less measured bias.
The ordinary-text perplexity result uses WikiText-2, associated with Pointer Sentinel Mixture Models. It measures how well the system predicts a common corpus, instead of measuring the gap between groups of sentences in a bias benchmark. The distinction matters because an edit can make contrasting groups closer on the bias test while making ordinary text more surprising overall. The paper treats a rise in WikiText-2 perplexity as a cost of the intervention.
The authors also report commonsense reasoning as mean accuracy across several benchmarks. The collection includes PIQA, HellaSwag, and WinoGrande. It also includes ARC easy, ARC challenge, and OpenBookQA. These scores show how often the system chooses the expected answer on the tasks in the collection. For reading comprehension, the authors use exact match on TriviaQA. Exact match rewards producing the expected answer under the benchmark’s matching procedure. A change in that score concerns answer production, while the commonsense average summarizes success across its constituent tasks. The quantitative evaluations use the language-model evaluation harness named in the paper.
Finally, the authors examine open-ended text generation on prompts from BOLD. Generated passages can reveal effects that a rank or corpus score leaves hard to see, such as a strongly judgmental opening, a coherent change of subject, or a repetitive sequence of answer letters. The paper presents examples for LLaMA-2 7B and examines how some of those examples change as the edit becomes stronger. The examples complement the quantitative evaluation by showing what the behavior looks like on particular prompts.
The OPT comparison
The authors identify TV-14k and DPO as the methods that deliver bias reductions across the OPT comparison. Their relative order depends on the checkpoint. DPO has the lower RedditBias t-value on OPT 1.3B and OPT 6.7B. TV-14k has the lower value on OPT 2.7B. The base OPT 1.3B score is 2.18, compared with 2.12 under TV-14k and 2.05 under DPO. On OPT 6.7B, the base score is 3.18, TV-14k reaches 3.09, and DPO reaches 1.82. The paper reports reductions of up to 40% for task-vector negation across OPT, with the benefit varying substantially by size.
OPT 2.7B shows the ranking change especially clearly. Its TV-14k score is lower than those of DPO and the smaller task vector. TV-2k also improves on the original on this checkpoint, which is the exception the authors identify to its generally weak OPT results. PCGU at the selected comparison setting has a higher bias score than the original.
Debiasing methods on OPT 2.7B by RedditBias t-value
The larger task vector gives the lowest bias score, while the selected gradient edit scores above the original checkpoint.
The numbers
| System or setting | absolute t-value |
|---|---|
| Base | 3.44 |
| PCGU | 3.68 |
| TV-2k | 2.62 |
| DPO | 2.32 |
| TV-14k (this paper) | 2.05 |
The quality cost of DPO on OPT shows up in WikiText-2 perplexity. The paper reports increases of 12-16% with DPO and 3-8% with TV-14k. For OPT 1.3B, the base perplexity is 16.41, the larger task vector yields 16.93, and DPO yields 18.44. On OPT 2.7B the corresponding values are 14.32, 15.53, and 16.46. On OPT 6.7B they are 12.29, 13.14, and 14.28. This cost changes the interpretation of the bias ranking. DPO’s advantage on the bias metric for some checkpoints comes with a larger change in the system’s assigned probabilities on everyday text.
PCGU’s selected OPT checkpoints stay closer to the base perplexity, but the bias scores move in the unfavorable direction in the main comparison. OPT 1.3B moves from 2.18 to 2.30 on the RedditBias measure. OPT 6.7B moves from 3.18 to 3.31. TV-2k generally causes smaller perplexity increases than the larger task vector, which likewise has to be read together with the bias result. For example, OPT 6.7B with the small vector has WikiText-2 perplexity of 12.31 and a RedditBias score of 3.28. These are examples of why capability retention by itself gives an incomplete picture of the edit.
On the ordinary tasks, the paper describes TV-14k and DPO as broadly similar for OPT commonsense reasoning, reporting a 1-4 % accuracy drop in that comparison. The larger task vector fares better than DPO on OPT TriviaQA. The selected TV-14k setting for OPT 6.7B, λ of 0.8, gives 49.56% commonsense accuracy and 29.41% exact match on TriviaQA. Its unedited scores are 52.62% and 34.43%, respectively. Together with the lower WikiText-2 perplexity of TV-14k relative to DPO, the task results give the authors grounds to favor the larger task vector as a way to balance the measured outcomes on OPT.
LLaMA-2 changes the ranking
On LLaMA-2 7B, the original RedditBias t-value is 7.17. The chosen PCGU checkpoint, with k of 30%, reaches 1.14. This is the largest movement on the bias metric in the main comparison for LLaMA-2. DPO gives 5.17 and TV-14k gives 5.34, corresponding to the paper’s stated bias reductions of 27.9% and 25.5%. The smaller task vector gives 6.01. The results show that PCGU can affect the measured bias very strongly on a decoder, even though the same method’s selected OPT settings do poorly on that measure.
Debiasing methods on LLaMA-2 7B by RedditBias t-value
The selected gradient edit gives the smallest contrast between the sentence groups, while preference tuning and the larger task vector give similar scores.
The numbers
| System or setting | absolute t-value |
|---|---|
| Base | 7.17 |
| TV-2k | 6.01 |
| TV-14k | 5.34 |
| DPO | 5.17 |
| PCGU (this paper) | 1.14 |
Perplexity tells a different part of the story. The unedited LLaMA-2 has a WikiText-2 perplexity of 8.79. PCGU brings that to 10.49, which the paper describes as a 19.3% increase. The TV-14k checkpoint has perplexity of 9.47. DPO gives 8.88, an increase the authors report as 1%. It also preserves performance on the common tasks better than TV-14k in this LLaMA-2 comparison. Thus the strongest bias score, the smallest ordinary-text perplexity among the edited checkpoints, and the adjustable task-vector intervention correspond to different choices.
Debiasing methods on LLaMA-2 7B by WikiText-2 perplexity
Preference tuning stays closest to base perplexity, while the selected gradient edit imposes the largest cost.
The numbers
| System or setting | perplexity |
|---|---|
| Base | 8.79 |
| DPO, best edited checkpoint (this paper) | 8.88 |
| TV-2k | 9.24 |
| TV-14k | 9.47 |
| PCGU | 10.49 |
The commonsense and TriviaQA results help explain why the authors look beyond the bias score. At the main LLaMA-2 TV-14k setting of λ equal to 0.6, commonsense accuracy is 51.05% and TriviaQA exact match is 55.83%. The corresponding base values are 59.23% and 61.96%. At the selected PCGU setting, commonsense accuracy is 58.37%, while TriviaQA exact match is 48.98%. On these measurements the edits affect capabilities unevenly. PCGU retains more of the commonsense performance at those settings, while the larger task vector retains more of the TriviaQA performance. The paper’s overall assessment of PCGU also takes into account the comparatively large increase in its perplexity and the qualitative failures observed when it generates text.
What changes in an open-ended completion?
The main BOLD example prompts LLaMA-2 7B to continue a fragment about socialism. The base completion starts with a sweeping moral denunciation and continues with a strongly framed description of government control. The authors judge the DPO and TV-14k completions to be less biased. DPO discusses the principles associated with the ideology and acknowledges variation in how it is understood or applied. The larger task vector gives a descriptive account centered on economic organization and ownership. Each edit changes what the system chooses to foreground when the prompt leaves that choice open.
PCGU produces a different kind of change. Its completion repeats claims about government control and then produces isolated option letters, the kind of tokens employed in its training examples. For this qualitative comparison, the authors use k of 20%, whereas the main LLaMA-2 bias and perplexity comparison uses k of 30%. They report that higher fractions make the completions incoherent. The example therefore shows a generation problem even at a setting chosen to keep the output more readable. It gives the reader a concrete behavior to associate with the perplexity deterioration, though the two measurements describe different things.
The appendix offers further BOLD prompts related to religion and nationality. In one example concerning Islam, the base checkpoint and PCGU introduce the same hostile association, while DPO and TV-14k continue along different lines that the authors regard as less biased. Other examples show changes of topic or emphasis across methods and further instances of broken output under PCGU. These comparisons concern the tone, content, and coherence of particular completions. The authors use them as qualitative evidence alongside the bias and task scores, so a method’s place in the main comparison can be checked against the kinds of text it actually produces.
What the ablations show
Increasing the share of weights updated by PCGU
The PCGU sweep changes k while keeping the manually selected learning rate, batch size, and training duration fixed for each pretrained checkpoint. Because k controls how many ranked weight vectors participate in the update, the sweep tests whether including additional groups gives a predictable change in bias or capability. The distinction between this run and the main comparison matters. The main result uses a chosen operating point, while the sweep can show whether a nearby setting gives lower bias at a cost that would make it less attractive.
On LLaMA-2 7B, the lowest measured bias in the sweep occurs at k of 25%, alongside a steep rise in perplexity. The authors suggest that the groups added between 20% and 25% may have greater flexibility with respect to the target behavior than the groups already included. As k rises further, bias gradually increases again, and perplexity generally rises substantially. The result at 30% is an exception to that perplexity pattern and is the setting carried into the main comparison. The sweep shows that selecting more groups by gradient dissimilarity can have a large effect, while the ordering of those groups gives limited guidance about the next setting’s joint effect on bias and language quality.
The OPT runs differ from one another. On OPT 1.3B, bias increases and then fluctuates at the higher tested fractions. On OPT 2.7B the authors observe a drop around k of 30%, followed by a rise. The main comparative table uses k of 25% for that checkpoint. On OPT 6.7B the bias score rises modestly through part of the sweep and then jumps at 35%. The figures omit perplexity values at some of the highest fractions because the values are too large for the plots. Taken together, the runs give little basis for picking a fraction that can be transferred unchanged across OPT sizes.
The common-task results show how abruptly capability can deteriorate. At k of 35%, OPT 1.3B still has commonsense accuracy of 45.78%, compared with its original 46.06%. OPT 6.7B is more sensitive at the same fraction. Its commonsense accuracy is 31.30%, compared with 52.62% at the base setting. Its TriviaQA exact match goes from 34.43% at the base to 0.02% at k of 35%. For LLaMA-2 7B at k of 35%, the corresponding scores are 51.86% for commonsense accuracy and 25.01% for TriviaQA exact match. These patterns show that edit sensitivity depends both on the pretrained checkpoint and on the capability being tested.
At k of 40%, the reported commonsense accuracy falls below 33% for all tested checkpoints, and the TriviaQA exact-match scores are close to 0. The breakdown also appears in open-ended output. In the BOLD example about where Sikh communities live, the k of 20% completion turns to a discussion of government policy and the Sikh community. At k of 25%, 30%, and 35%, the displayed completions drift into repeated letters. The experiment cannot say from the bias metric alone whether the change reflects a successful reduction of the relevant social association or a more general disruption to how the system continues text. The parallel evidence from perplexity, task scores, and the actual completions makes that difference visible.
The authors interpret these patterns as a limitation of the ranking criterion. The cosine comparison finds groups whose gradients differ by answer, but it does not estimate how safely any particular group can be changed. They propose taking dependencies between weight vectors into account and considering how much each group can be altered while retaining other behavior. The sweep supports the observation that the current criterion has uneven effects. It leaves the proposed changes to the selection rule for future tests.
Changing the strength of task-vector negation
The task-vector sweep changes λ while retaining the direction learned during tuning. This is a more direct intervention on magnitude than the PCGU sweep. Raising λ makes every coordinate of the chosen edit larger in proportion to its existing magnitude. Raising k can bring additional sets of weights into play and therefore changes where the gradient-based intervention acts. These distinct meanings of edit strength help explain why the two sweeps are informative in different ways.
On LLaMA-2 7B, increasing λ steadily lowers the measured bias for both TV-2k and TV-14k. The authors observe a similar bias trend for OPT 2.7B. OPT 1.3B and OPT 6.7B show much steadier t-values for TV-14k. Their small-vector results differ, with the authors describing a gradual rise for OPT 1.3B and a gradual fall for OPT 6.7B. A smoothly scaled parameter change therefore need not produce a large or uniform bias gain in every pretrained system. Its practical value is that the authors can inspect the response to the same direction at several strengths.
The authors describe perplexity increases as moderate through λ of 0.6 or 0.8 in the plotted comparisons, followed by sharper increases, particularly for the larger task vector. The LLaMA-2 7B task scores make the upper end of the sweep concrete. For TV-14k, commonsense accuracy is 57.50% at λ of 0.2, 51.05% at λ of 0.6, and 41.41% at λ of 1. TriviaQA exact match is 62.39% at λ of 0.2, 55.83% at λ of 0.6, and 17.82% at λ of 1. A coefficient that keeps moving the bias measure in the desired direction can therefore reach a range where the loss of other abilities becomes substantial.
TriviaQA also shows that the earliest movement need not be a loss. For LLaMA-2 7B the table gives 62.44% exact match for TV-2k at λ of 0.2 and 62.39% for TV-14k at the same coefficient, compared with 61.96% for the original checkpoint. At λ of 0.4, both exact-match scores are below the original. The appendix prose describes slightly higher scores through λ ≤ 0.4, while the tabulated results place the improvement at λ of 0.2. At the strong end of the sweep, TV-14k deteriorates more sharply than the small vector on this checkpoint. At λ of 1, TV-2k still has TriviaQA exact match of 49.83%, compared with 17.82% for TV-14k.
The article’s qualitative check of the Sikh communities prompt gives a corresponding example in generated text. Beginning at λ of 0.2, the displayed TV-14k completions move away from the original passage’s series of stereotyped assertions about religious prohibitions. Some alternatives continue by discussing where Sikh communities live. At λ of 1, the completion shifts into a census-like passage that the authors regard as incoherent in context. The example illustrates two separable consequences of scaling a direction. A moderate edit can change the association expressed in a continuation. A strong edit can also undermine the fit between the continuation and the prompt.
These results underlie the paper’s claim about flexibility. The authors can get another task-vector setting by applying a different coefficient to the same learned direction. They can evaluate that setting against both bias and ordinary performance. DPO, as run in the study, supplies a comparison checkpoint from its preference-training procedure and has no corresponding post-training coefficient in the experiment. This is a practical contrast between the implementations evaluated. It concerns how users of each procedure can explore an operating point after the training run.
Comparing the small and large training collections
The paper uses two task-vector collections partly to illuminate the role of training data. On the shared StereoSet instances, TV-2k generally achieves weaker bias reduction than DPO. TV-14k changes that comparison, producing stronger reductions than the smaller vector in the main results for several checkpoints and becoming competitive with DPO. The authors take the weak TV-2k results on OPT as evidence that the amount of data available to construct a useful task vector matters.
The comparison also varies the composition of the training set. TV-14k adds intrasentence StereoSet examples and selected Civil Comments, so the larger collection can change the kinds of associations seen and the text in which they appear. There is also a difference between the information supplied to TV-2k and DPO. DPO learns from a preferred and a rejected continuation for each instance. TV-2k uses the stereotypical side to learn a direction, which it later reverses. The shared instances let the reader compare the two uses of a common source. The stronger TV-14k results establish that the choice of collection can materially change the usefulness of the direction.
The ordinary-task sweeps make that finding more nuanced. A larger collection can produce the more effective edit for bias while also supporting a more damaging change at a sufficiently strong coefficient. This is visible for LLaMA-2 7B, where the TV-14k commonsense and TriviaQA scores fall more rapidly at the strong end of the sweep than their TV-2k counterparts. For OPT 6.7B, the relative task scores vary by metric. At λ of 1, TV-14k gives 48.28% commonsense accuracy and 25.71% TriviaQA exact match, while TV-2k gives 48.41% and 23.33%, respectively. The size of the collection helps explain the difference between the edits, while the direction learned and the metric chosen determine which effect is visible.
What might explain the differences between methods?
The authors offer several explanations for PCGU’s weaker balance of bias and language quality. Its training objective changes the likelihood of an answer represented by a single token. The task-vector and DPO treatments learn from whole sequences, keeping the issue of bias within a broader language objective. The repeated letters in some PCGU outputs are consistent with a training signal that affects answer tokens and can spill into ordinary generation. The examples establish that this spillover occurs in some completions. They do not establish which part of the objective or data construction causes it.
A second explanation concerns the updates. PCGU changes selected groups while holding other groups fixed. Coarse choices about which weights are allowed to move may matter when many parameters work together to produce an answer. The authors contrast this selective rule with the smoother handling of weight changes in the sequence-based methods. In the task-vector implementation, LoRA limits the trainable parameters during tuning. The relevant difference for the explanation is that the edit is derived from a sequence objective, without the hard partition cutoff used by PCGU.
The authors also point to the training sources. BBQ uses templates. StereoSet and Civil Comments supply a different variety of examples. Data diversity could therefore help explain why the whole-sequence approaches behave differently from PCGU. The experiments vary objectives, training corpora, parameter updates, and example formats together. The ablations directly trace the effects of k and λ within their respective procedures. The explanations across procedures are hypotheses prompted by those observations and by the qualitative outputs.
Limitations
Limits identified by the authors
The authors emphasize the damage PCGU can do to language generation and common-task performance. The LLaMA-2 bias reduction is evidence that the method can change the benchmark outcome substantially, alongside a rise in perplexity and examples of incoherence. As possible improvements, they propose adding a regularization term to the update and looking for a ranking procedure that accounts for dependencies among weight vectors. Regularization in that proposal would constrain the weight change while pursuing the training objective. The paper does not test either revision.
PCGU tuning is also manual. In choosing the learning rate, batch size, and epoch count, the authors have no clear criterion for determining when debiasing has converged. Their sweep identifies a region where the bias score changes sharply, and they suggest using finer intervals for k to investigate it. The reported search therefore shows the behavior of the studied settings within a relatively coarse grid. It cannot determine whether a better balance between bias and capability sits between those settings.
For task vectors, the authors suggest learning an additional task-specific direction and combining it with the bias edit. The proposal follows from the observed loss of performance on some tasks at stronger values of λ. A task-specific vector would give the method another direction intended to recover useful behavior. The experiments reported here use the bias direction by itself and leave the effect of combining these changes an open question.
Hardware sets another boundary. Training and evaluation cover checkpoints up to 7B. The authors report that PCGU on LLaMA-2 7B and OPT 6.7B requires ∼ 6 hours per epoch with the described A100 setup. Distributed execution makes the larger runs in the paper possible, while the cost still limits the scale tested. The authors identify larger and newer checkpoints as future work. The contrasting results even within the tested sizes leave the behavior at that scale unresolved.
Limits visible in the experimental setup
The central quantitative bias outcome is an absolute t-value from contrasts supplied by RedditBias. Its decrease means that the groups of sentences are closer according to the test used. The absolute value discards the direction of the contrast. It also leaves open how separate groups or individual prompts contribute to the headline score. This matters when describing an edit as less biased. The strongest claim supported by that score concerns the disparity measured on the benchmark, while the qualitative analysis checks a different manifestation of bias on selected prompts.
A related issue is what counts as forgetting. The paper edits a pretrained system and measures subsequent behavior. Its construction sets do not identify which examples in the original pretraining corpus created a stereotype. The reported evaluations also do not test whether an association can be recovered through every formulation of a question. Task-vector negation establishes a parameter direction that influences selected behaviors, and PCGU establishes that a ranked group of gradients can sometimes produce a large shift. Neither measurement tracks whether information originally derived from particular training examples has been removed.
For PCGU, the interpretation also depends on the connection between the answer letter and the entity that the letter denotes. The authors explicitly identify that connection as an assumption. Closely matched letter continuations make the gradients easier to compare, but the system is still learning on an answer format that is only a proxy for the target association. When option letters appear in unrelated generations, the outputs make it especially difficult to read every improvement in a contrast as a socially appropriate change in how the system understands the prompt.
The main comparison evaluates configurations chosen with reference to bias and perplexity. It is informative about the tradeoffs the authors observe as they vary parameters. A separate setting-selection evaluation would be needed to test how well a chosen k or λ transfers to a new collection of prompts and groups. A drop in the benchmark score at an operating point can guide a choice for the experiment, while the published sweep shows that nearby choices can have very different consequences. Some of the most striking examples of incoherence come from settings outside the main comparison, and the main BOLD example for PCGU uses a different fraction from the headline LLaMA-2 result. Keeping those conditions attached to the findings prevents conflating a single reported checkpoint with all behavior observed under the method.
The training comparison also leaves causal questions open. The stronger task-vector collection changes source, domain, and example format as well as volume. Its advantage cannot be assigned uniquely to having more examples. The closest data comparison with DPO uses a common set of StereoSet instances, while DPO can learn directly from a positive and a negative continuation and the task vector uses the stereotypical sequence. The training signal therefore remains different even in that controlled comparison. Similarly, PCGU’s use of BBQ and its narrow update objective change together. Training the methods on harmonized evidence would be a different experiment.
Finally, retention of capability is measured through the particular corpus and tasks in the study. WikiText-2 perplexity, common-task accuracy, and TriviaQA exact match reveal different failures, as the LLaMA-2 PCGU results demonstrate. The BOLD examples add evidence about readability and the associations introduced into open-ended text. Their role is illustrative, and the generated factual claims within those passages receive no separate verification. The results support an empirical comparison on the chosen tests and checkpoints. How the same interventions would behave in other applications or on forms of social bias outside the measured categories remains open.
What came after
No later citing work is documented here. The paper itself leaves several follow-up questions open, including whether a dependency-aware gradient edit could preserve coherence, whether a task-specific vector could recover lost performance, and whether the observed tradeoffs hold for larger checkpoints. Those are directions the authors propose for future experiments.
Cite
Cite as Omkar Dige, Diljot Arneja, Tsz Fung Yau, Qixuan Zhang, Mohammad Bolandraftar, Xiaodan Zhu and Faiza Khan Khattak. 2024. Can Machine Unlearning Reduce Social Bias in Language Models?. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track.
@inproceedings{dige2024can,
title = {{Can Machine Unlearning Reduce Social Bias in Language Models?}},
author = {Omkar Dige, Diljot Arneja, Tsz Fung Yau, Qixuan Zhang, Mohammad Bolandraftar, Xiaodan Zhu and Faiza Khan Khattak},
booktitle = {Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track},
year = {2024},
doi = {10.18653/v1/2024.emnlp-industry.71},
url = {https://doi.org/10.18653/v1/2024.emnlp-industry.71}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dige-2024-can-machine-unlearning-reduce-social/