# Reactive Monte Carlo Simulations for Charge Regulation of Colloidal
Particles

Amin Bakhshandeh<EMAIL_ADDRESS>Instituto de Física, Universidade
Federal do Rio Grande do Sul, Caixa Postal 15051, CEP 91501-970, Porto Alegre,
RS, Brazil.  Derek Frydel<EMAIL_ADDRESS>Department of Chemistry,
Federico Santa Maria Technical University, Campus San Joaquin,7820275,
Santiago,Chile  Yan Levin<EMAIL_ADDRESS>Instituto de Física, Universidade
Federal do Rio Grande do Sul, Caixa Postal 15051, CEP 91501-970, Porto Alegre,
RS, Brazil.

###### Abstract

We use a reactive Monte Carlo simulation method and primitive model of
electrolyte to study acid-base equilibrium that controls charge regulation in
colloidal systems. The simulations are performed in a semi-grand canonical
ensemble in which colloidal suspension is in contact with a reservoir of salt
and strong acid. The interior of colloidal particles is modeled as a low
dielectric medium, different from the surrounding water. The effective
colloidal charge is calculated for different number of surface acidic groups,
pH, salt concentrations, and types of electrolyte. In the case of potassium
chloride the titration curves are compared with the the experimental
measurements obtained using potentiometric titration. A good agreement is
found between simulations and experiments. In the case of lithium chloride
specific ionic adsorption is taken into account through partial dehydration of
lithium ion.

Charge Regulation, Colloid

##  I Introduction

The interplay between electrostatic interactions Prusty  _et al._ (2020);
Leung  _et al._ (2013); Javidpour  _et al._ (2021, 2019); Fink  _et al._
(2020); Kubincová, Hünenberger, and Krishnan (2020); Krishnan (2017, 2013);
Behjatian  _et al._ (2020); Ma and Olvera de la Cruz (2021); Gao  _et al._
(2019); Avni, Podgornik, and Andelman (2020); Avni, Andelman, and Podgornik
(2019); Adar, Andelman, and Diamant (2017); Shen and Frey (2005); Tsao (2000);
Löwen  _et al._ (2005); Messina, Holm, and Kremer (2002a, b); Borkovec,
Jönsson, and Koper (2001); Narambuena  _et al._ (2021) and acid-base
equilibrium is of paramount importance in Chemistry and Biology Worms  _et
al._ (2006); Booth (1985); Antelo  _et al._ (2005); Brigante and Avena (2016);
Hammes and Verstraete (2002); Teixeira, Lund, and Barroso da Silva (2010). It
often defines the boundary between life and death. The protein functionality
can change due to modification of surrounding pH, affecting enzymatic activity
and the resulting metabolic processes Kurkdjian and Guern (1989). The
transport of ions through the cellular membranes Accardi and Miller (2004) is
strongly affected by pH. The same is true for the binding of heavy metals to
bacterial membrane Beveridge (1989); van der Wal  _et al._ (1997); Heinrich
_et al._ (2007). In biological systems pH, which depends on the activity of
proton inside the solution, can be significantly modified by the presence of
electrolyte, which at physiological concentration is around $150$ mM Pressman
(1965); Lund and Jönsson (2013), affecting the solubility and stability of
proteins Lunkad  _et al._ (2021a, b); Perutz (1978); Svensson, Jönsson, and
Woodward (1990); Woodward and Svensson (1991); Lund and Jönsson (2005);
Dickinson and Leser (2007); da Silva and Jönsson (2009); Teixeira, Lund, and
Barroso da Silva (2010); Szuttor  _et al._ (2021); Behrens and Grier (2001);
Lund and Jönsson (2013); Lund, Åkesson, and Jönsson (2005); Lund and Jönsson
(2005). In colloidal science both pH and electrolyte concentration regulate
colloidal charge and interaction between the particles Andelman (2006);
Podgornik (2018); Tsao (2000); Avni, Andelman, and Podgornik (2019). The Monte
Carlo (MC) titration method which uses explicit ions has been successful in
explaining of ionization equilibrium for complex systems such as protein
complexation and charge regulation Teixeira, Lund, and Barroso da Silva
(2010); da Silva and Jönsson (2009); Jönsson  _et al._ (1996); Kesvatera  _et
al._ (1999); André  _et al._ (2004); Labbez  _et al._ (2009). In these
methods, explicit ions are added and removed in constant pH to the system.

In the present paper we will use reactive Monte Carlo simulation to
efficiently explore the effective charge of colloidal particles inside an
electrolyte solution of a given pH. Differently from constant pH simulations
Svensson, Jönsson, and Woodward (1990); Woodward and Svensson (1991), we treat
all ions, including hydronium, explicitly in the semi-grand canonical
ensemble. The advantage of this approach is that it automatically enforces
uniform electrochemical potential of all ion inside the simulation cell
Madurga  _et al._ (2011); Nishio (1996, 1994); Johnson, Panagiotopoulos, and
Gubbins (1994); Valleau and Cohen (1980); Landsgesell  _et al._ (2020). In
this respect our approach is similar to other recently introduced grand
canonical simulation methods to account for charge regulation Grünewald  _et
al._ (2020); Curk and Luijten (2021); Stornes, Blanco, and Dias (2021);
Landsgesell  _et al._ (2020); Madurga  _et al._ (2009, 2011). However, the
exclusive treatment of all ions makes the method general and so it can be used
to treat other surface groups, not just those involving protonation. For
example, in this work, we consider adsorption of Li+. Similarly, the method
could be used to treat basic surface groups. This leads to the consistency in
the method as there is no need to switch from method to method to simulate
different surface groups.

This article is organized as follows. In Sec. (2) we introduce and describe
the system. In Sec. (3) we discuss the simulation method. In Sec. (4) we
compare the simulation method with the experimental results. In Sec. (5) we
consider the scenario in which a cation K+ is substituted by Li+, which can
specifically adsorb to carboxylate. The work is concluded in Sec. (6).

##  II Model and system details

The system consists of a single colloidal particle of radius $a$ fixed at the
center of a spherical Wigner-Seitz (WS) cell whose radius $R$ determines the
volume fraction of the colloidal suspension of a corresponding experimental
system. The cell is allowed to exchange ions with a reservoir containing
strong monovalent salt and acid, at concentrations $c_{s}$ and $c_{a}$,
respectively, both of which fully dissociate in an aqueous solution, see Fig.
1. All ions have charge $\pm q$, where $q$ is the proton charge. The
dielectric constant inside the colloidal sphere, representing a polystyrene
latex particle, is $\epsilon_{c}\approx 2.5$, while the dielectric constant of
the surrounding water is $\epsilon_{w}\approx 80$. One advantage of working
with the WS formalism is that contact theorem allows us to calculate the
osmotic pressure inside the colloidal suspension directly using ionic
densities at contact with the cell boundary Wennerström, Jönsson, and Linse
(1982).

The colloidal surface contains acidic groups of weak acid that only partially
dissociate upon contact with an aqueous solution: the process is governed by
the reaction HA <=> H+ + A- and the corresponding dissociation constant
$K_{a}$. These surface groups are modeled as small spheres of radius
$r_{0}=2$Å randomly distributed over the colloidal surface. (The results are
insensitive to the mode of distribution or the grade of randomness). The
dielectric constant of small spheres is the same as that of water, so that
dielectric discontinuity occurs only at the colloidal boundary. The choice to
keep the smaller spheres lying on the colloid surface rather than embedded
into it has a physical motivation. Charged surface groups prefer being
displaced from the region of low dielectric constant. The acidic surface
groups are also referred to as titration sites. In its deprotonated state a
titration site has charge $-q$, and in a protonated state it has charge $0$,
see Fig. 1. The charge of titration site is located at its center.

The region outside the colloidal particle is occupied by the ions of a fully
dissociated strong salt and acid, KCl -> K+ + Cl- and HCl -> H+ + Cl-. All
ions are represented by hard spheres of radius $3.3$ Å Nightingale Jr (1959),
corresponding to fully hydrated ions. In particular, a proton $\ch{H+}$, does
not exist separately, but is a hydronium ion, $\ch{H3O+}$.

Figure 1: Schematic representation of reactive MC moves. The deprotonated
acidic groups A- randomly distributed over the colloidal surface are
represented by the red spheres and protonated HA groups are represented by the
black spheres. The protonation of a titration site, A- + H+ $\rightarrow$ HA,
changes its charge from $-1q\rightarrow 0$, at the same time Cl- is added to
the cell with grand canonical probability, to preserve the overall charge
neutrality. Deprotonation reaction, HA $\rightarrow$ A- + H+, results in the
change $0\rightarrow-1q$ of the titration site, and a simultaneous removal of
Cl- from the simulation cell.

The dielectric contrast between the colloidal core and the surrounding water
results in induced surface charge density at the interface. The surface charge
distribution depends on the location of ions inside the suspension. Therefore,
the interaction between any two ions near a colloidal particle will not be
given simply by the Coulomb potential, but will also depend on their distance
from the colloidal surface. The Green function for the effective interaction
between two ions inside the WS cell is accurately approximated by Bakhshandeh,
Dos Santos, and Levin (2011); dos Santos, Bakhshandeh, and Levin (2011);
Bakhshandeh (2018)

$G({\bf r},{\bf r^{\prime}})=\frac{1}{\epsilon_{w}|{\bf r}-{\bf
r^{\prime}}|}+\frac{\gamma a}{\epsilon_{w}r^{\prime}|{\bf
r}-\frac{a^{2}}{r^{\prime 2}}{\bf r^{\prime}}|}+\gamma\psi_{c}({\bf r},{\bf
r^{\prime}}),$ (1)

with

$\psi_{c}({\bf r},{\bf
r^{\prime}})=\dfrac{1}{\epsilon_{w}a}\ln\left[\frac{rr^{\prime}-{\bf
r}\cdot{\bf r^{\prime}}}{a^{2}-{\bf r}\cdot{\bf
r^{\prime}}+\sqrt{a^{4}-2a^{2}({\bf r}\cdot{\bf r^{\prime}})+r^{2}r^{\prime
2}}}\right]\ ,$ (2)

where
$\gamma=\left(\epsilon_{w}-\epsilon_{c}\right)/\left(\epsilon_{w}+\epsilon_{c}\right)$.
The first term of Eq. 1 is due to the direct Coulomb potential produced by an
ion located at position ${\bf r^{\prime}}$ from the center of colloidal
particle, while other two terms result from the induced surface charge Norris
(1995); Lindell (1993). Note that the Green function is invariant under the
exchange of the source and the observation points ${\bf r}\leftrightarrow{\bf
r^{\prime}}$. Eq. 1 is exact in the limit
$\epsilon_{c}/\epsilon_{w}\rightarrow 0$, $\gamma=1$. Furthermore, it was
shown that it remains very accurate for $\epsilon_{c}/\epsilon_{w}\ll 1$ dos
Santos, Bakhshandeh, and Levin (2011), which is appropriate for the present
system with $\epsilon_{c}/\epsilon_{w}=2.5/80$.

The expression in Eq. (1) is derived specifically for a spherical colloidal
particle. To account for dielectric polarization in more complex geometries,
one would need to resort to numerical boundary-element methods, such as the
Iterative Dielectric Solver (IDS) Curk and Luijten (2021), which is much more
computationally intensive.

The electrostatic energy of the system is:

$\displaystyle
U=\gamma\sum_{i=1}^{N}\left[\frac{q^{2}a}{2\epsilon_{w}\left(r_{i}^{2}-a^{2}\right)}+\frac{q\psi_{self}({\bf
r_{i}})}{2}\right]+$ (3)
$\displaystyle\sum_{i=1}^{N-1}\sum_{j=i+1}^{N}q_{i}q_{j}G({\bf r_{i}},{\bf
r_{j}}),$

where $N$ is the total number of particles inside the cell, including the
charged surface sites. The term in the square brackets is due to self-
interaction of an ion with its own induced surface charge and vanishes for
$\gamma=0$, where $\psi_{self}$ is given by

$\begin{split}\psi_{self}({\bf
r_{i}})=\frac{q}{\epsilon_{w}a}\ln{(1-\frac{a^{2}}{r_{i}^{2}})}.\end{split}$
(4)

Hard-sphere interactions between ions is not included in (3). Configurations
with overlapping hard-spheres are not allowed. Since the hydrated size of all
ions is the same, H3O+ and K+ are identical. The difference between the two
ions is that H3O+ can react with acidic groups. When reacting, it transfers
its charge to them, while the remaining neutral hard-sphere disappears. This
is physically justifiable since hard-sphere in our model represents a hydrated
structure, which vanishes upon the proton transfer.

##  III Simulation Method

The simulations are performed in the semi-grand canonical ensemble, in which
the system is in contact with an infinite reservoir of strong acid and salt.
Since the WS cell represents an infinite colloidal suspension at finite
concentration, we may think of it as being separated from the reservoir by a
semipermeable membrane which allows for a free passage of ions, but not of
colloidal particles. The diffusion of ions will result in an electric field
across the membrane, establishing a potential difference between the system
and the reservoir. This is known as the Donnan potential, $\varphi_{D}$. When
an ion moves from the reservoir into the system it will, therefore, gain
additional energy $q_{i}\varphi_{D}$.

Our reactive Monte Carlo involves two types of movements. The standard grand
canonical insertion/deletion of ions between the reservoir and the simulation
cell; and protonation and deprotonation moves for the surface sites. The grand
canonical acceptance probabilities for insertion or deletion of an ion of type
$i$ are given by $ACC=\min\left(1,\phi_{add/rem}\right)$, where
$\phi_{add/rem}$ is

$\begin{split}\phi_{add}=\frac{Vc_{i}}{N_{i}+1}\exp\left[-\beta\left(\Delta
E_{ele}-\mu_{ex}+q_{i}\varphi_{D}\right)\right],\\\
\phi_{rem}=\frac{N_{i}}{Vc_{i}}\exp\left[-\beta\left(\Delta
E_{ele}+\mu_{ex}-q_{i}\varphi_{D}\right)\right].\end{split}$ (5)

Here $\Delta E_{ele}$ is the change in electrostatic energy upon insertion or
deletion of an ion, $c_{i}$ is the concentration of ion of type $i$ in the
reservoir, $\mu_{ex}$ is the excess chemical potential of ions in the
reservoir, and $V$ is the free volume accessible to the ions. Note that since
all ions are assumed to have the same radius and are all monovalent, the
excess chemical potential of all ions is the same. The Donnan potential
$\varphi_{D}$ has to be adjusted each few MC steps to keep charge neutrality
inside the system Barr and Panagiotopoulos (2012). This makes simulations
slow. A simple solution to this problem is to perform insertion or deletion of
cations-anion pairs, so that the charge neutrality of the cell is always
preserved. For example, the probability of insertion/deletion of KCl pair is
the product $\phi_{add/rem}^{\ch{K+}}\phi_{add/rem}^{\ch{Cl-}}$, so that the
Donnan potential cancels out.

In the grand canonical ensemble concentrations are controlled indirectly via
chemical potentials. One way to establish the correspondence between
$\mu_{ex}$ and the ionic concentrations is to run simulations for a bulk
solution at a given concentration and then compute $\mu_{ex}$ using, for
example, the Widom insertion procedure. Alternatively one can perform a grand
canonical MC with fixed chemical potentials and observe the corresponding
concentration of ions inside the simulation box. We note, however, that our
ionic solution is a restricted primitive model. We can, therefore, take
advantage of this fact and use an accurate analytical approximation for the
excess chemical potential given by $\mu_{ex}=\mu_{CS}+\mu_{MSA}$, where
$\beta\mu_{CS}=\frac{8\eta-9\eta^{2}+3\eta^{3}}{\left(1-\eta\right)^{3}}$ is
the Carnahan-Starling expression for the excluded volume contribution Carnahan
and Starling (1969, 1970); Adams (1974); Maciel, Abreu, and Tavares (2018),
where the volume fraction is $\eta=\frac{\pi d^{3}}{3}c_{t}$, $d$ is the ionic
diameter, and $c_{t}=c_{s}+c_{a}$ is the total concentration of salt and acid.
The electrostatic contribution to the excess chemical potential can be
accurately calculated using the mean-spherical approximation (MSA) Ho/ye and
Lomba (1988); Ho, Tsao, and Sheng (2003); Levin and Fisher (1996); Waisman and
Lebowitz (1972a, b); Blum (1975),

$\beta\mu_{MSA}=\frac{\lambda_{B}\left(\sqrt{1+2\kappa d}-\kappa
d-1\right)}{d^{2}\kappa},\\\ $ (6)

where $\lambda_{B}=q^{2}/\epsilon_{w}k_{B}T$ is the Bjerrum length, and
$\kappa=\sqrt{8\pi\lambda_{B}c_{t}}$ is the inverse Debye length.

To test this procedure, we choose concentrations of acid and salt from which
we calculate $\mu_{ex}$ using the analytical expressions above. We then run a
grand canonical MC simulation for this value of $\mu_{ex}$, starting with an
empty simulation cell. If the approximate expression for $\mu_{ex}$ is
accurate, once the simulation is converged, we should recover the
concentration of acid and salt inside the simulation cell that we specified to
calculate $\mu_{ex}$. This is precisely what is observed in the simulations,
see Fig. 2, justifying the use of the analytical expression for $\mu_{ex}$.

Figure 2: Salt concentration inside the system as a function of the reservoir
concentration. The reservoir also contains strong acid at concentration
$c_{a}=0.001$M. The straight line indicates the theoretical expectation that
the concentrations of ions inside the system should be exactly the same as the
concentration of ions in the reservoir. The concentration of hydronium ion
inside the system is indicated next to the symbols. The excellent agreement
between concentrations inside the system and in the reservoir indicates
accuracy of our expression for $\mu_{ex}$.

To obtain the MC weights for protonation/deprotonation moves, we first
consider the free energy change for a reaction of a hydronium ion with an
isolated weak acid group A-, H3 O+ + A- <=> HA + H2 O. We can think of this
process as a removal of a hydronium ion from the reservoir, followed by a
reaction with a A- group. The internal partition function of the HA molecule
is $K_{eq}/\Lambda^{3}_{\ch{H+}}$, where $K_{eq}$ is the equilibrium constant
and $\Lambda_{\ch{H+}}$ is the hydronium’s de Broglie thermal wavelength. The
free energy change of the system$+$reservoir resulting from the removal of a
hydronium ion from the reservoir and bringing it into vicinity of A-, where it
will undergo a proton transfer reaction, is then $\beta\Delta
F_{p}=-\ln(K_{eq}/\Lambda^{3}_{\ch{H+}})-\mu_{\ch{H+}}$, where
$\beta\mu_{\ch{H+}}=\ln(c_{\ch{H+}}\Lambda^{3}_{\ch{H+}})+\beta\mu_{ex}$ is
the total chemical potential of a hydronium ion inside the reservoir. For the
deprotonation reaction the free energy change is $\Delta F_{d}=-\Delta F_{p}$.
The acceptance probabilities for protonation and deprotonation moves are,
therefore,

$\begin{split}\phi_{p}=\exp\left[-\beta\left(\Delta E_{ele}+\Delta
F_{p}+q\varphi_{D}\right)\right],\\\ \phi_{d}=\exp\left[-\beta\left(\Delta
E_{ele}+\Delta F_{d}-q\varphi_{D}\right)\right],\end{split}$ (7)

respectively. These simplify to

$\begin{split}\phi_{p}=c_{\ch{H+}}K_{eq}\exp\left[-\beta\left(\Delta
E_{ele}-\mu_{ex}+q\varphi_{D}\right)\right],\\\
\phi_{d}=\frac{1}{c_{\ch{H+}}K_{eq}}\exp\left[-\beta\left(\Delta
E_{ele}+\mu_{ex}-q\varphi_{D}\right)\right].\end{split}$ (8)

A Monte Carlo “reaction" move consists of selecting a random titration site,
followed by an attempt to change its “state" from protonated to deprotonated
and vice versa. Note that the acceptance probabilities depend on the Donnan
potential, which is a priori, unknown. We can overcome this difficulty by
again combining a protonation attempt with an insertion of Cl-. The
probability of acceptance of a protonation-Cl–insertion move is then
$\text{min}\\{1,\phi_{p}\phi_{add}\\}$. In the product, the Donnan potential
once again cancels out. Similarly a deprotonation move is combined with a
removal of Cl-, so that the probability is
$\text{min}\\{1,\phi_{d}\phi_{rem}\\}$. The final acceptance probabilities for
the pair moves are:

$\begin{split}\phi_{d+rem}=\frac{N_{\ch{Cl-}}}{c_{\ch{H+}}K_{eq}Vc_{\ch{Cl-}}}\exp\left[-\beta\left(\Delta
E_{ele}+2\mu_{ex}\right)\right],\\\
\phi_{p+add}=\frac{c_{\ch{H+}}K_{eq}Vc_{\ch{Cl-}}}{(N_{\ch{Cl-}}+1)}\exp\left[-\beta\left(\Delta
E_{ele}-2\mu_{ex}\right)\right]\end{split}$ (9)

where $N_{\ch{Cl-}}$ is the number of Cl- ions inside the cell. In Fig. 1 we
have schematically shown these movements.

##  IV Comparison with the experimental results

We now apply the simulation method discussed above to study the effective
charge of carboxyl latex particles Behrens  _et al._ (2000), the surface sites
of which undergo reaction –COOH <=> COO- + H+. The simulated system consists
of a spherical cell of radius $R=120$Å, with a spherical colloidal particle at
the center, represented by a hard-sphere of radius $a=60$Å, with surface
titration sites of $r_{0}=2$Å, see Fig. 1.

The mobile ions correspond to the dissociation of KCl and HCl. We are
interested in obtaining the effective charge of a colloidal particle as a
function of pH and salt concentration in the reservoir. Recall that
pH$=-\log[a_{\ch{H+}}]$, where
$a_{\ch{H+}}=c_{\ch{H+}}\exp[\beta\mu_{ex}(c_{t})]$ is the activity of
hydronium ions. Furthermore, the electrochemical potential of each ions inside
the system and in the reservoir are the same. Note that inside the simulation
cell electrochemical potential includes the Donnan potential. This means that
activity of hydronium ion is the same inside the cell and in the reservoir,
therefore, pH inside the simulation cell and inside the reservoir are also the
same.

We consider two different carboxyl latex colloidal particles, the effective
charge of which has been obtained experimentally using potentiometric
titration Behrens  _et al._ (2000). It is important to remember that the
surface association constant $K_{eq}$ is different from the bulk association
constant for the same acid Buffle and Chalmers (1988); Cera (1995); Lluís
Garcés  _et al._ (1998); Bakhshandeh  _et al._ (2019); Bakhshandeh, Frydel,
and Levin (2020); Gomez, Frydel, and Levin (2021). This difference may be
attributed to the distinct symmetry of the electronic wave function of a
chemical group when it is on the surface of colloidal particle and when it is
in the bulk. Our strategy, then, is to adjust $K_{eq}$ to fit the experimental
titration curve for colloidal particles with the bare surface charge density
$\sigma_{T}=78$ mC/m2 – determined by the total number of surface carboxyl
groups and amounting to about $~{}900$ titration sites distributed over the
colloid – inside the electrolyte solution of c${}_{\ch{KCl}}$ = 10 mM. We will
then use the same $K_{eq}$ to calculate the theoretical titration curves for
other salt concentrations and different colloidal bare charge. Recalling that
acid dissociation constant is $K_{a}=1/K_{eq}$, we obtain an excellent fit of
the experimental titration curve using
p$K_{a}=-\log[K_{a}]=\log[K_{eq}]=5.02$, see Fig. 3(a). This value is actually
very close to the p$K_{a}$ of bulk acetic acid. We next use the same value of
p$K_{a}$ to calculate the titration curve for a particle of the same bare
surface charge inside an electrolyte solution of $300$mM. Only a reasonable
agreement between experiment and theory is obtained for this case, Fig. 3(b),
with a significant deviation appearing at large pH. Finally, we calculate the
titration curves for colloidal particles of surface charge $\sigma_{T}=98$
mC/m2, in solutions of $10$mM and $300$mM electrolyte, using the same surface
equilibrium constant as before. A good agreement is found between simulations
and experiments for both of these concentrations of electrolyte, see Fig. 3
panels (c) and (d). At the moment we do not have a clear understanding of what
is the cause of the deviation between theory and experiment observed for
particles of surface charge $\sigma_{T}=78$ mC/m2 inside $300$mM electrolyte
solution. The deviation is particularly surprising in view of the fact that
for $\sigma_{T}=98$ mC/m2 and $300$mM electrolyte we do have a good agreement
between theory and experiment.

Figure 3: Effective charge obtained using the reactive MC simulations (curves)
compared with the experimental data (symbols). The solid black curve is the
effective charge in the presence of KCl and dashed green curve in the presence
of LiCl. The bare surface charge densities of colloidal particles are $78$
mC/m2 panels (a) and (b); and $98$ mC/m2 panels (c) and (d). Electrolyte
concentration is indicated in each panel. The surface equilibrium constant,
p$K_{a}=5.02$ is obtained by fitting the experimental data in the panel (a).
The same equilibrium constant is then used to calculate the effective charges
for other salt concentrations and colloidal bare charge: panels (b), (c) and
(d). A very good agreement is observed between theory and experiment Behrens
_et al._ (2000).

We should note that in our simulation the size of colloidal particles is much
smaller than in experiment. We have checked, however, that this does not
affect the titration curve, as long as the charge density of the particles is
the same. Similarly our calculations are performed for colloidal suspension at
finite volume fraction, while experiments were done at infinite dilution.
Again the size of the WS cell does not affect the titration curve, as long as
the cell is sufficiently large. To demonstrate this in Fig. 4 we present the
titration curve for particles with bare surface charge density $98$ mC/m2
inside two different WS cells of radius $120$Å and $200$Å. The two titration
curves are practically indistinguishable. This shows that the effective
colloidal charge does not depend of the volume fraction, for sufficiently
dilute suspensions.

Figure 4: Titration curves for a particle with surface charge density $98$
mC/m2 inside two different WS cells.

##  V Specific ion adsorption

The specific ion adsorption can be easily incorporated within the simulation
formalism introduced above. It is known that Li+ specifically associate with
COO- Uejio  _et al._ (2008); Sthoer  _et al._ (2019). We are, therefore,
interested to explore the effect of replacing KCl with LiCl salt. The specific
association of Li+ with COO- is a consequence of the law of matching water
affinities (LMWA) Collins (2012), which suggests that both lithium and
carboxylate can lose part of their hydration sheath resulting in strong
electrostatic interaction between the two ions Iwahara, Esadze, and
Zandarashvili (2015); Winstein, Klinedinst Jr, and Clippinger (1961); Record
Jr, Lohman, and De Haseth (1976); Lü  _et al._ (2005); Masnovi and Kochi
(1985); Yabe and Kochi (1992). Based on the LMWA we will take the distance of
closest approach between lithium and carboxylate contact pair to be $d=2.9$Å,
corresponding to the Latimer diameter of Li+ ion Diehl, Dos Santos, and Levin
(2012); Latimer, Pitzer, and Slansky (1993). We can then say that any lithium
ion that is within a distance $d=5.3$Å — the separation distance between a
fully hydrated Li+ and the adsorption site — is associated with the
carboxylate group, and will contribute to the renormalization of the effective
charge.

In Fig. 3 (dashed green curves) we show the effect of replacing K+ with Li+ on
the effective colloidal charge. Note the saturation of colloidal charge at
large pH, resulting from the association of Li+ ions with the carboxylate
groups. Specific adsorption of Li+ also affects the protonation of
carboxylate, although the effect appears to be quite small, see Fig. 5. We
expect to see a more significant effect if Li+ is replaced by divalent Ca^++
ion, which is known to strongly interact with the carboxylate. This will be
explored in the future work.

Figure 5: The fraction of protonated groups in the presence of $300$mM of
either KCl or LiCl salts. Specific adsorption of Li+ to carboxylate groups
results in stronger deprotonation, in particular at large pH.

The degree of protonation for the same pH is lower in the case of LiCl
compared to KCl salt, since Li+ ion effectively competes with H+ for acidic
sites. Although deprotonation is larger for LiCl, this does not imply that the
effective colloidal surface charge is also larger. Adsorbed Li+ ions
neutralize sites similarly to H+ and, therefore, contributed to the effective
charge of colloidal particles. Thus, the effective surface charge of colloidal
particles in the case of LiCl solutions is lower in modulus compared to
solutions of KCl, for which no specific association takes place, see Fig. 3.
Again we expect the effect of specific association to be even more important
for suspensions containing CaCl2 .  One quantity which normally use in
Biochemistry and analytical chemistry is Henderson–Hasselbalch (HH) equation
which relates $\text{pKa}^{HH}$ to pH and the ration of active and titrated
molecules of system, however when half of titration is done one can have:

$~{}\text{pK}_{a}^{HH}=\text{pH}_{1/2}+\varphi\log 10[\mathrm{e}],$ (10)

Using the Eq. 10 we compared the value of obtained from titration curve and HH
equation which can be seen in Table below:

$\sigma$ mCm-2 |  KCl mM |  $\text{pk}_{a}^{HH}$
---|---|---
78 | 10 | 5.47
78 | 300 | 5.25
98 | 10 | 5.31
98 | 300 | 5.32
Table 1: The values obtaied from HH equation. The value was fitted in
simulation $\text{pk}_{a}$ is 5.02.

##  VI Conclusions

We have presented a simulation method which allows us to very accurately
calculate the titration curves for suspensions of colloidal particles. The
results were compared with the experimental measurements of the effective
colloidal charge obtained using potentiometric titration. A good agreement was
found between simulations and experiments. We have also shown how the specific
ion interaction, responsible for the Hofmeister effect, can be easily included
in the simulation method. The approach presented in this paper can be also
applied to other scientifically and technologically important systems, such as
proteins, polyelectrolyte gels, polyampholytes, etc.

##  VII Acknowledgments

This work was partially supported by the CNPq, CAPES, National Institute of
Science and Technology Complex Fluids INCT-FCx. The authors are grateful to
the Instituto de Física e Matemática, UFPel for the use of computer resources.
D.F. acknowledges financial support from FONDECYT through grant number
1201192.

## References

  * Prusty  _et al._ (2020) D. Prusty, R. J. Nap, I. Szleifer, and M. Olvera de la Cruz, Soft Matter 16, 8832 (2020).
  * Leung  _et al._ (2013) C.-Y. Leung, L. C. Palmer, S. Kewalramani, B. Qiao, S. I. Stupp, M. Olvera de la Cruz, and M. J. Bedzyk, Proceedings of the National Academy of Sciences 110, 16309 (2013).
  * Javidpour  _et al._ (2021) L. Javidpour, A. Božič, A. Naji, and R. Podgornik, Soft Matter 17, 4296 (2021).
  * Javidpour  _et al._ (2019) L. Javidpour, A. L. Božič, R. Podgornik, and A. Naji, Scientific reports 9, 1 (2019).
  * Fink  _et al._ (2020) L. Fink, C. Allolio, J. Feitelson, C. Tamburu, D. Harries, and U. Raviv, Langmuir 36, 10715 (2020), pMID: 32787004, https://doi.org/10.1021/acs.langmuir.0c01511 .
  * Kubincová, Hünenberger, and Krishnan (2020) A. Kubincová, P. H. Hünenberger, and M. Krishnan, J. Chem. Phys. 152, 104713 (2020).
  * Krishnan (2017) M. Krishnan, J. Chem. Phys. 146, 205101 (2017).
  * Krishnan (2013) M. Krishnan, J. Chem. Phys. 138, 114906 (2013).
  * Behjatian  _et al._ (2020) A. Behjatian, M. Bespalova, N. Karedla, and M. Krishnan, Phys. Rev. E 102, 042607 (2020).
  * Ma and Olvera de la Cruz (2021) B. Ma and M. Olvera de la Cruz, The Journal of Physical Chemistry B 125, 3015 (2021).
  * Gao  _et al._ (2019) C. Gao, S. Kewalramani, D. M. Valencia, H. Li, J. M. McCourt, M. Olvera de la Cruz, and M. J. Bedzyk, Proceedings of the National Academy of Sciences 116, 22030 (2019), https://www.pnas.org/content/116/44/22030.full.pdf .
  * Avni, Podgornik, and Andelman (2020) Y. Avni, R. Podgornik, and D. Andelman, The Journal of Chemical Physics 153, 024901 (2020).
  * Avni, Andelman, and Podgornik (2019) Y. Avni, D. Andelman, and R. Podgornik, Curr Opin Electrochem 13, 70 (2019).
  * Adar, Andelman, and Diamant (2017) R. M. Adar, D. Andelman, and H. Diamant, Advances in Colloid and Interface Science 247, 198 (2017), dominique Langevin Festschrift: Four Decades Opening Gates in Colloid and Interface Science.
  * Shen and Frey (2005) H. Shen and D. D. Frey, J. Chromatogr. A 1079, 92 (2005).
  * Tsao (2000) H. K. Tsao, Langmuir 16, 7200 (2000).
  * Löwen  _et al._ (2005) H. Löwen, A. Esztermann, A. Wysocki, E. Allahyarov, R. Messina, A. Jusufi, N. Hoffmann, D. Gottwald, G. Kahl, and M. Konieczny,  _Journal of Physics: Conference Series_ , 11, 021 (2005).
  * Messina, Holm, and Kremer (2002a) R. Messina, C. Holm, and K. Kremer, The Journal of Chemical Physics 117, 2947 (2002a).
  * Messina, Holm, and Kremer (2002b) R. Messina, C. Holm, and K. Kremer, Computer Physics Communications 147, 282 (2002b), proceedings of the Europhysics Conference on Computational Physics Computational Modeling and Simulation of Complex Systems.
  * Borkovec, Jönsson, and Koper (2001) M. Borkovec, B. Jönsson, and G. J. M. Koper, “Ionization processes and proton binding in polyprotic systems: Small molecules, proteins, interfaces, and polyelectrolytes,” in  _Surface and Colloid Science_ , edited by E. Matijević (Springer US, Boston, MA, 2001) pp. 99–339.
  * Narambuena  _et al._ (2021) C. F. Narambuena, P. M. Blanco, A. Rodriguez, D. E. Rodriguez, S. Madurga, J. L. Garcés, and F. Mas, Polymer 212, 123170 (2021).
  * Worms  _et al._ (2006) I. Worms, D. F. Simon, C. Hassler, and K. Wilkinson, Biochimie 88, 1721 (2006).
  * Booth (1985) I. R. Booth, Microbiological reviews 49, 359 (1985).
  * Antelo  _et al._ (2005) J. Antelo, M. Avena, S. Fiol, R. López, and F. Arce, Journal of colloid and interface science 285, 476 (2005).
  * Brigante and Avena (2016) M. Brigante and M. Avena, Microporous and Mesoporous Materials 225, 534 (2016).
  * Hammes and Verstraete (2002) F. Hammes and W. Verstraete, Reviews in environmental science and biotechnology 1, 3 (2002).
  * Teixeira, Lund, and Barroso da Silva (2010) A. A. R. Teixeira, M. Lund, and F. L. Barroso da Silva, Journal of chemical theory and computation 6, 3259 (2010).
  * Kurkdjian and Guern (1989) A. Kurkdjian and J. Guern, Annual Review of Plant Physiology and Plant Molecular Biology 40, 271 (1989).
  * Accardi and Miller (2004) A. Accardi and C. Miller, Nature 427, 803 (2004).
  * Beveridge (1989) T. J. Beveridge, Annual review of microbiology 43, 147 (1989).
  * van der Wal  _et al._ (1997) A. van der Wal, W. Norde, A. J. Zehnder, and J. Lyklema, Colloids and surfaces B: Biointerfaces 9, 81 (1997).
  * Heinrich  _et al._ (2007) H. T. Heinrich, P. J. Bremer, C. J. Daughney, and A. J. McQuillan, Langmuir 23, 2731 (2007).
  * Pressman (1965) B. C. Pressman, Proceedings of the National Academy of Sciences of the United States of America 53, 1076 (1965).
  * Lund and Jönsson (2013) M. Lund and B. Jönsson, Q. Rev. Biophys. 46, 265 (2013).
  * Lunkad  _et al._ (2021a) R. Lunkad, A. Murmiliuk, P. Hebbeker, M. Boublík, Z. Tošner, M. Štěpánek, and P. Košovan, Mol. Syst. Des. Eng. 6, 122 (2021a).
  * Lunkad  _et al._ (2021b) R. Lunkad, A. Murmiliuk, Z. Tošner, M. Štěpánek, and P. Košovan, Polymers 13, 214 (2021b).
  * Perutz (1978) M. Perutz, Science 201, 1187 (1978).
  * Svensson, Jönsson, and Woodward (1990) B. Svensson, B. Jönsson, and C. Woodward, Biophysical chemistry 38, 179 (1990).
  * Woodward and Svensson (1991) C. Woodward and B. R. Svensson, The Journal of Physical Chemistry 95, 7471 (1991).
  * Lund and Jönsson (2005) M. Lund and B. Jönsson, Biochemistry 44, 5722 (2005).
  * Dickinson and Leser (2007) E. Dickinson and M. E. Leser,  _Food colloids: self-assembly and material science_ (Royal Society of chemistry, 2007).
  * da Silva and Jönsson (2009) F. L. B. da Silva and B. Jönsson, Soft Matter 5, 2862 (2009).
  * Szuttor  _et al._ (2021) K. Szuttor, F. Weik, J.-N. Grad, and C. Holm, The Journal of Chemical Physics 154, 054901 (2021).
  * Behrens and Grier (2001) S. H. Behrens and D. G. Grier, The Journal of Chemical Physics 115, 6716 (2001).
  * Lund, Åkesson, and Jönsson (2005) M. Lund, T. Åkesson, and B. Jönsson, Langmuir 21, 8385 (2005).
  * Andelman (2006) D. Andelman,  _Soft condensed matter physics in molecular and cell biology_ , edited by W. C. Poon and D. Andelman, Vol. 6 (Taylor & Francis New York, 2006) p. 96.
  * Podgornik (2018) R. Podgornik, J. Chem. Phys. 149, 104701 (2018).
  * Jönsson  _et al._ (1996) B. Jönsson, M. Ullner, C. Peterson, O. Sommelius, and B. Söderberg, The Journal of Physical Chemistry 100, 409 (1996).
  * Kesvatera  _et al._ (1999) T. Kesvatera, B. Jönsson, E. Thulin, and S. Linse, Proteins: Structure, Function, and Bioinformatics 37, 106 (1999).
  * André  _et al._ (2004) I. André, T. Kesvatera, B. Jönsson, K. S. Åkerfeldt, and S. Linse, Biophysical journal 87, 1929 (2004).
  * Labbez  _et al._ (2009) C. Labbez, B. Jonsson, M. Skarba, and M. Borkovec, Langmuir 25, 7209 (2009).
  * Madurga  _et al._ (2011) S. Madurga, C. Rey-Castro, I. Pastor, E. Vilaseca, C. David, J. L. Garcés, J. Puy, and F. Mas, The Journal of chemical physics 135, 184103 (2011).
  * Nishio (1996) T. Nishio, Biophysical chemistry 57, 261 (1996).
  * Nishio (1994) T. Nishio, Biophysical chemistry 49, 201 (1994).
  * Johnson, Panagiotopoulos, and Gubbins (1994) J. K. Johnson, A. Z. Panagiotopoulos, and K. E. Gubbins, Molecular Physics 81, 717 (1994).
  * Valleau and Cohen (1980) J. P. Valleau and L. K. Cohen, The Journal of chemical physics 72, 5935 (1980).
  * Landsgesell  _et al._ (2020) J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Košovan, and C. Holm, Macromolecules 53, 3007 (2020).
  * Grünewald  _et al._ (2020) F. Grünewald, P. C. T. Souza, H. Abdizadeh, J. Barnoud, A. H. de Vries, and S. J. Marrink, The Journal of Chemical Physics 153, 024118 (2020).
  * Curk and Luijten (2021) T. Curk and E. Luijten, Phys. Rev. Lett. 126, 138003 (2021).
  * Stornes, Blanco, and Dias (2021) M. Stornes, P. M. Blanco, and R. S. Dias, Colloids and Surfaces A: Physicochemical and Engineering Aspects 628, 127258 (2021).
  * Madurga  _et al._ (2009) S. Madurga, J. L. Garcés, E. Companys, C. Rey-Castro, J. Salvador, J. Galceran, E. Vilaseca, J. Puy, and F. Mas, Theoretical Chemistry Accounts 123, 127 (2009).
  * Wennerström, Jönsson, and Linse (1982) H. Wennerström, B. Jönsson, and P. Linse, The Journal of Chemical Physics 76, 4665 (1982).
  * Nightingale Jr (1959) E. Nightingale Jr, The Journal of Physical Chemistry 63, 1381 (1959).
  * Bakhshandeh, Dos Santos, and Levin (2011) A. Bakhshandeh, A. P. Dos Santos, and Y. Levin, Phys. Rev. Lett. 107, 107801 (2011).
  * dos Santos, Bakhshandeh, and Levin (2011) A. P. dos Santos, A. Bakhshandeh, and Y. Levin, J. Chem. Phys. 135, 044124 (2011).
  * Bakhshandeh (2018) A. Bakhshandeh, Chem. Phys. 513, 195 (2018).
  * Norris (1995) W. Norris, IEE Proceedings-Science, Measurement and Technology 142, 142 (1995).
  * Lindell (1993) I. V. Lindell, American journal of physics 61, 39 (1993).
  * Barr and Panagiotopoulos (2012) S. A. Barr and A. Z. Panagiotopoulos, Phys. Rev. E 86, 016703 (2012).
  * Carnahan and Starling (1969) N. F. Carnahan and K. E. Starling, The Journal of chemical physics 51, 635 (1969).
  * Carnahan and Starling (1970) N. F. Carnahan and K. E. Starling, The Journal of Chemical Physics 53, 600 (1970).
  * Adams (1974) D. Adams, Molecular Physics 28, 1241 (1974).
  * Maciel, Abreu, and Tavares (2018) J. A. C. d. S. L. Maciel, C. R. A. Abreu, and F. W. Tavares, Brazilian Journal of Chemical Engineering 35, 277 (2018).
  * Ho/ye and Lomba (1988) J. S. Ho/ye and E. Lomba, The Journal of chemical physics 88, 5790 (1988).
  * Ho, Tsao, and Sheng (2003) C.-H. Ho, H.-K. Tsao, and Y.-J. Sheng, The Journal of chemical physics 119, 2369 (2003).
  * Levin and Fisher (1996) Y. Levin and M. E. Fisher, Physica A: Statistical Mechanics and its Applications 225, 164 (1996).
  * Waisman and Lebowitz (1972a) E. Waisman and J. L. Lebowitz, The Journal of Chemical Physics 56, 3086 (1972a).
  * Waisman and Lebowitz (1972b) E. Waisman and J. L. Lebowitz, The Journal of Chemical Physics 56, 3093 (1972b).
  * Blum (1975) L. Blum, Molecular Physics 30, 1529 (1975).
  * Behrens  _et al._ (2000) S. H. Behrens, D. I. Christl, R. Emmerzael, P. Schurtenberger, and M. Borkovec, Langmuir 16, 2566 (2000).
  * Buffle and Chalmers (1988) J. Buffle and R. A. Chalmers,  _Complexation reactions in aquatic systems_ (John Wiley and Sons Inc., New York, NY, 1988).
  * Cera (1995) E. D. Cera,  _Thermodynamic Theory of Site-Specific Binding Processes in Biological Macromolecules_ (Cambridge University Press, 1995).
  * Lluís Garcés  _et al._ (1998) J. Lluís Garcés, F. Mas, J. Puy, J. Galceran, and J. Salvador, J. Chem. Soc., Faraday Trans. 94, 2783 (1998).
  * Bakhshandeh  _et al._ (2019) A. Bakhshandeh, D. Frydel, A. Diehl, and Y. Levin, Physical review letters 123, 208004 (2019).
  * Bakhshandeh, Frydel, and Levin (2020) A. Bakhshandeh, D. Frydel, and Y. Levin, Phys. Chem. Chem. Phys. 22, 24712 (2020).
  * Gomez, Frydel, and Levin (2021) D. A. Gomez, D. Frydel, and Y. Levin, The Journal of Chemical Physics 154, 074706 (2021).
  * Uejio  _et al._ (2008) J. S. Uejio, C. P. Schwartz, A. M. Duffin, W. S. Drisdell, R. C. Cohen, and R. J. Saykally, Proceedings of the National Academy of Sciences 105, 6809 (2008).
  * Sthoer  _et al._ (2019) A. Sthoer, J. Hladílková, M. Lund, and E. Tyrode, Phys. Chem. Chem. Phys. 21, 11329 (2019).
  * Collins (2012) K. D. Collins, Biophysical chemistry 167, 43 (2012).
  * Iwahara, Esadze, and Zandarashvili (2015) J. Iwahara, A. Esadze, and L. Zandarashvili, Biomolecules 5, 2435 (2015).
  * Winstein, Klinedinst Jr, and Clippinger (1961) S. Winstein, P. E. Klinedinst Jr, and E. Clippinger, Journal of the American Chemical Society 83, 4986 (1961).
  * Record Jr, Lohman, and De Haseth (1976) M. T. Record Jr, T. M. Lohman, and P. De Haseth, Journal of molecular biology 107, 145 (1976).
  * Lü  _et al._ (2005) J.-M. Lü, S. V. Rosokha, S. V. Lindeman, I. S. Neretin, and J. K. Kochi, Journal of the American Chemical Society 127, 1797 (2005).
  * Masnovi and Kochi (1985) J. Masnovi and J. Kochi, Journal of the American Chemical Society 107, 7880 (1985).
  * Yabe and Kochi (1992) T. Yabe and J. Kochi, Journal of the American Chemical Society 114, 4491 (1992).
  * Diehl, Dos Santos, and Levin (2012) A. Diehl, A. P. Dos Santos, and Y. Levin, Journal of Physics: Condensed Matter 24, 284115 (2012).
  * Latimer, Pitzer, and Slansky (1993) W. M. Latimer, K. S. Pitzer, and C. M. Slansky, in  _Molecular Structure And Statistical Thermodynamics: Selected Papers of Kenneth S Pitzer_ (World Scientific, 1993) pp. 485–489.


# Language Models Get a Gender Makeover:
Mitigating Gender Bias with Few-Shot Data Interventions

Himanshu Thakur Atishay Jain Praneetha Vaddamanu11footnotemark: 1
Paul Pu Liang Louis-Philippe Morency
Carnegie Mellon University
<EMAIL_ADDRESS>Equal Contribution

###### Abstract

_Caution: this paper contains potentially offensive or upsetting model
outputs._

Societal biases present in pre-trained large language models are a critical
issue as these models have been shown to propagate biases in countless
downstream applications, rendering them unfair towards specific groups of
people. Since large-scale retraining of these models from scratch is both time
and compute-expensive, a variety of approaches have been previously proposed
that de-bias a pre-trained model. While the majority of current state-of-the-
art debiasing methods focus on changes to the training regime, in this paper,
we propose data intervention strategies as a powerful yet simple technique to
reduce gender bias in pre-trained models. Specifically, we empirically show
that by fine-tuning a pre-trained model on only 10 de-biased (intervened)
training examples, the tendency to favor any gender is significantly reduced.
Since our proposed method only needs a few training examples, our few-shot
debiasing approach is highly feasible and practical. Through extensive
experimentation, we show that our debiasing technique performs better than
competitive state-of-the-art baselines with minimal loss in language modeling
ability.

##  1 Introduction

Recently, there has been a surge of interest in pre-trained large language
models (LLM) in natural language processing (NLP). It has been shown that the
pre-training + finetuning of a model drastically improves its performance on
downstream tasks as the knowledge captured by the pre-training on a large
corpus is transferred to the downstream application when finetuning the model.
However, this also leads to societal biases like gender bias that were
implicitly learned by the pre-trained models being transferred to crucial
downstream applications like job recommendation engines Zhao et al. (2019);
Barocas et al. (2017); Kurita et al. (2019). Analyzing and mitigating bias
without requiring significant re-training or compute resources is crucial to
the widespread adoption of LLMs in downstream applications.

Previous work Nadeem et al. (2021), Nangia et al. (2020a), Cer et al. (2018)
has attempted to quantify bias, and others such as Ravfogel et al. (2020) and
Liang et al. (2021) have attempted to remove it algorithmically from the
models. Closer to our work are data-manipulative techniques such as Zmigrod et
al. (2019) and Maudslay et al. (2019) that modify the dataset and further
fine-tune the model. In this paper, we propose simple data intervention
strategies and show that they can mitigate gender bias in pre-trained models
with the help of few-shot fine-tuning. Moreover, taking inspiration from
Schick et al. (2021), we find that by utilizing a biased pre-trained LLM for
mining for most gender-biased samples in a dataset, our methods can mitigate
gender bias with very few training samples. Finally, we perform an extensive
evaluation of our debiasing technique on two recent bias benchmarks Nadeem et
al. (2021) and show that our method outperforms three existing state-of-the-
art techniques and performs comparably to the other two. Our main
contributions are the following:

  * •

We propose simple data intervention techniques that can be used to reduce
gender bias in a pre-trained LLM with few training examples (few-shot), thus
making human-in-the-loop bias mitigation strategies feasible.

  * •

We introduce a novel data sampling technique that utilises LLMs to mine for
the most biased samples from a dataset and can benefit existing state-of-the-
art debiasing methods. When used for debiasing a model, these few samples
serve as exemplars and induce large reductions in gender bias.

Figure 1: Our method can be summarized as a combination of bias discovery and
mitigation. First, we use a pre-trained LLM to find the most gender-biased
samples. Then, we apply our data intervention techniques and use these
modified training samples to fine-tune the model. Experiments show that our
method is very effective at reducing gender bias, outperforming three state-
of-the-art baselines and being comparable to two other baselines.

##  2 Related Work

In recent years, there has been growing concern about the bias/stereotypical
discriminatory behavior by NLP models, particularly concerning gender. Several
studies have investigated the presence of gender bias in various NLP tasks and
proposed methods for mitigating it.

One line of research has focused on analyzing the extent of gender bias in
pre-trained language models such as BERT and GPT-2. These studies have found
that these models exhibit a significant amount of gender bias in their word
embeddings for BERT Jentzsch and Turan (2022) and for GPT-2 Kirk et al. (2021)
and are prone to making stereotypical gender-based predictions (e.g., assuming
that a doctor is male and a nurse is female). A standard evaluation metric
used in this line of research is Stereotype metrics such as StereoSet Nadeem
et al. (2021), which evaluates the model’s ability to predict gender
stereotypes and CrowS pairs Nangia et al. (2020b) which measure whether a
model generally prefers more stereotypical sentences. A similar line of work
is gender bias tests proposed in BIG-bench Srivastava et al. (2022). The tests
assess the language model’s gender biases, stereotypes, and ability to infer
gender information. It evaluates gender bias and stereotype between male and
female, and gender minority bias and stereotype between majority and minority.
It also examines the model’s language modeling performance, which can be
affected during de-biasing.

Another line of research has proposed methods for debiasing these models.
These methods can be broadly categorized into two groups: data-based and
algorithm-based. Data-based methods aim to reduce bias by removing or altering
biased words from the training set. In contrast, algorithm-based methods aim
to modify the model’s architecture or training procedure to reduce bias. One
popular data-based method is "uncertainty sampling" Lewis and Gale (1994),
where the model is trained on the instances that it is most uncertain about,
which can help to reduce bias by forcing the model to learn from a diverse set
of examples. A popular algorithm-based method is "Adversarial Debiasing"
proposed by Zhang et al. (2018), which fine-tunes the model using an
adversarial loss to make it less sensitive to sensitive attributes such as
gender. OSCar proposed by Dev et al. (2021), is another algorithm based method
that utilizes the idea of disentangling "problematic concepts" like occupation
and gender relationship instead of removing them altogether. MABEL He et al.
(2022) has both algorithm and data-based components, as it first augments the
training data by swapping gender words and then applies a contrastive learning
objective and alignment via entailment pairs. Their data augmentation strategy
is similar in spirit to the data intervention techniques we propose, however
our analysis does not require training auxiliary models and uses significantly
lesser data.

Data-based methods include the "Equalization" technique proposed by Bolukbasi
et al. (2016), which aims to equalize the representation of gender-specific
words in the embedding space, the "Counterfactual Data Augmentation" (CDA)
method proposed by Zimmermann and Hoffmann (2022), which generates
counterfactual examples to improve the model’s robustness to bias, and "Name-
Based Counterfactual Data Substitution" proposed by Maudslay et al. (2019)
which reduces gender bias by replacing gender-informative names in the dataset
with gender-neutral names. Our proposed method is also a data-based method,
which aims to effectively reduce gender bias by taking inspiration from
different techniques such as uncertainty sampling and name-based
counterfactual data substitution Maudslay et al. (2019).

##  3 Probing Bias in Large Language Models

Pre-trained LLMs are biased towards different genders, as seen in a simple
mask-fill experiment using BERT. (Here, and in the rest of the paper, we
assume a binary treatment of gender for simplicity.) The task is then to mask
out the gender-related nouns and pronouns (such as he, she, her, woman, etc.)
and get BERT to predict the masked words for the affected sequences in the
dataset. Here, we consider a fixed list of gender-specific words curated from
previous work Lu et al. (2018); Zmigrod et al. (2019) and neutral words
list111https://github.com/joelparkerhenderson/inclusive-language. We finally
compute the "total confidence difference" as the sum of differences in the
model’s prediction confidence for each gender-word pair (such as confidence of
predicting he $-$ she, man $-$ woman, etc.). Formally, we define total
confidence difference as
$|\sum\nolimits_{i=0}^{N}(f(x_{female}^{(i)})-f(x_{male}^{(i)}))|$ where
$f(x)$ represent the confidence of model’s prediction, $N$ is the total number
of tokens in the dataset and $x$ is the tokenized gender word. The higher this
number, the more biased the model is concluded to be. We compute the metric at
token level and ensure that each of the gender word gets tokenized into
exactly one token by initially extending the tokenizer with our gender word
list. The top 3 biased gender-word pairs in StereoSet are shown in Table 1.
Intuitively, our technique for gauging bias in LLMs is sensitive to the fixed
word list used to represent the sensitive attributes (here, gender). In Table
2, we show the number of words covered by the word list used for both
WikiText-2 and StereoSet datasets.

Gender-Word Pairs |  | Mean
---
Confidence
Difference
Mean | Std. Dev.
he, she | 0.317 | 0.288
Will, May | 0.316 | 0.225
boy, girl | 0.219 | 0.218

Table 1: Confidence difference for the Top 3 gender-word pairs in StereoSet

Dataset | Samples |  | Affected Words
---
(mean)
WikiText-2 | 10 | 191
50 | 627
100 | 1028
StereoSet | 10 | 55
50 | 227
100 | 463

Table 2: Number of words (mean ) covered by the word list vs dataset and
number of sequences sampled from each dataset

##  4 Data Interventions

In order to reduce gender bias in pre-trained models, we carefully select
diverse and hard-biased examples and then replace gender words with more
neutral or equality-focused phrases. This is achieved by using a wordlist to
find gender terms in sentences and then segregating words as name and non-name
words.

We call our initial approach naive-masking as it does not require a word list
for mapping gender words to gender-neutral words. Instead, it replaces all
gender words with the fixed word "person." In our next approach, neutral-
masking, we swap words in a slightly more semantically accurate manner. In
this, we use a word-pair list that goes from gender words to gender-neutral
words. With both approaches, we intend to introduce new words in a model’s
vocabulary to make it more likely to choose a more neutral word in gender-
biased sentences.

In our final approach, we exploit the existing vocabulary of the model and try
to balance the confidence of prediction on opposite-gender words by using
phrases instead. Thus, we call our final approach random-phrase-masking as we
instead substitute words with phrases that reflect the equality of gender.
This approach not only reduces gender bias but also preserves the original
meaning of the sentence in most cases. In our approach, we chose the phrases
and order of gender words at random with equal probability.

Intervention | Input word | Converted word
---|---|---
naive-masking | he | person
she | person
boy | person
neutral-masking | he | they
her | their
schoolgirl | schoolkid
random-phrase-masking | he | he or she
she | she and he
boy | either girl or boy

Table 3:  Example conversions for three methods. In Random Phrase Masking, the
phrase is being chosen and it’s order was random.

Additionally, we hypothesize that the choice of the dataset for fine-tuning is
also essential. We choose two datasets: the WikiText-2 Merity et al. (2017)
dataset, which has implicit gender bias since its sources from Wikipedia
articles, and the StereoSet dataset Nadeem et al. (2021), which has
explicit/more gender bias as it has been designed to evaluate gender bias.
WikiText-2222An English language dataset (Creative Commons Attribution-
ShareAlike License). has 600 train articles and roughly 2M tokens while
StereoSet333An English language dataset available at bias-bench (Creative
Commons Attribution-ShareAlike 4.0 International Public License) (dev) has
2123 samples out of which we only consider 800 samples which are not
unrelated. Naturally, our data intervention method should work better on a
dataset with training examples with gender bias while being devoid of
meaningful gender associations like "She needs a gynecologist," where the
gender of the person is important. By testing our method on both datasets, we
can understand the sensitivity of our approach to the quality of training
samples used.

##  5 Bias Evaluation Metrics

We focus on evaluating the bias of a model while also measuring its language
modeling capability. The ideal model would not just be one with the least bias
but also one which does not compromise its language modeling performance. The
dual estimation of bias and performance of a model was proposed in the
StereoSet benchmark Nadeem et al. (2021), with the Language Modeling Score
(LMS) measuring the percentage of times a meaningful token is predicted for
the mask as opposed to a meaningless token, the Stereotype Score (SS)
measuring the percentage of times the model predicted a stereotypical word as
compared to an anti-stereotypical word, and an idealized CAT score (ICAT)
combining the LMS and SS score into a single metric. An ideal model has an
ICAT score of 100, while the worst biased model has an ICAT score of 0. We
additionally evaluate the CrowS-Pairs benchmark Nangia et al. (2020a), which
captures data with greater diversity in both the stereotypes expressed and the
structure of sentences (50 is ideal). However, we note that the Crow-S
benchmark is much more limited compared to StereoSet Nadeem et al. (2021) in
terms of both the volume and variety of linguistic phenomenon relating to
gender bias it covers.

##  6 Experiments

We compare our proposed interventions with five baselines, 4 of which are
state-of-the-art methods and the original pre-trained model. Our first
baseline is the application of dropouts to neural networks, Dropout proposed
by Webster et al. (2020). Next, we consider an algorithmic de-biasing
technique INLP technique proposed by Ravfogel et al. (2020). Then, we consider
a sentence embedding de-biasing approach SentenceDebias Liang et al. (2020).
Finally, we consider a data-based approach CDA Zmigrod et al. (2019) that is
closest to our work. For a fairer comparison, we run the baselines with the
same size (100) of the training set as our method. For all of our experiments,
we consider the “bert-base-uncased” pre-trained model available from
HuggingFace. For fine-tuning our model, we select a varying number of most-
biased training samples (10, 50, and 100) from the WikiText-2 and StereoSet
(we only use the dev set) datasets, as discussed in section 4. We also compare
this to a random selection of data points as an ablation study. On the
selected dataset, we apply our interventions and obtain the modified dataset,
which is then used to fine-tune our pre-trained model using masked language
modeling (MLM) loss. The key point is that we only fine-tune the model on the
gender words conditioned on the remaining text, significantly reducing the
fine-tuning time. We perform ablations on various types of interventions as
discussed in Table 7. The model is trained for 30 epochs, with a learning rate
of 0.001 and AdamW optimizer. We ran all of our experiments on NVIDIA Tesla T4
GPU on Google Colab for roughly 48 hours. For all experiments, we report the
numbers as the mean and standard deviations (6) of 3 different runs. Our
experiment code can be found here.444https://github.com/himansh005/data_debias

Figure 2: Qualitative analysis of our approach on fill-mask task shows that
our intervention techniques are able to modify stereotypical sentences. In the
this example, we prompted a pre-trained bert-base-uncased model and the same
pre-trained model debiased using random-phrase-masking with stereotypical
sentences and found that the our method is successfully able to reduced biased
substitutions.

|  | StereoSet Scrores |
---|---|---|---
Type | Method | SS ($\downarrow$) | LMS ($\uparrow$) | ICAT ($\uparrow$) |  Crow-S Scores ($\downarrow$)
| None | 60.279 | 84.172 | 70.300 | 57.250
| CDA | 60.022 | 83.466 | 70.892 | 56.107
| Dropout | 60.529 | 83.811 | 70.171 | 55.977
| SentenceDebias | 59.221 | 84.166 | 71.308 | 53.817
Baselines | INLP | 58.205 | 83.391 | 70.966 | 55.727
| random-phrase-masking (10) | 59.442 | 80.312 | 70.406 | 54.580
| random-phrase-masking | 58.037 | 78.676 | 69.949 | 54.457
| neutral-masking (10) | 60.341 | 83.956 | 72.548 | 55.535
Ours | neutral-masking | 60.814 | 83.587 | 72.213 | 56.490

Table 4: StereoSet and Crow-S benchmark results on WikiText-2 dataset. A lower
SS and Crow-S score means lesser gender bias while higher ICAT and LMS denote
better language modelling ability. The number in the parentheses denotes
number of training samples and ones without it use 100.

##  7 Results

Table 4 shows the StereoSet and Crow-S scores for our baselines and our best-
performing interventions on the WikiText-2 Dataset. In the StereoSet
benchmark, we observe that random-phrase-masking obtains lower SS than all
other baselines. On the Crow-S benchmark, random-phrase-masking does better
than thre of the baselines except SentenceDebias which achieves slightly
better scores. While random-phrase-masking results in lower SS scores than
neutral-masking, it also obtained very low LMS scores. We attribute this
performance degradation to the blunt substitution of phrases that our method
uses, which might lead to odd-sounding sentences. In the Crow-S benchmarks, we
see similar behavior and find that random-phrase-masking does better than
neutral-masking. Since we believe that our method is sensitive to the choice
of the dataset, we also present results on the StereoSet (dev) dataset 6. In
Figure 2, we perform a qualitative analysis of our proposed approach and find
that random-phrase-masking is able to flip the predictions on fill-mask tasks
for stereotypical sentences.

##  8 Conclusion

In this paper, we show that simple data interventions on limited training data
effectively reduce gender bias in LLMs. We also show that a biased pre-trained
LLM can be used to mine the most effective de-biasing training examples.
Evaluation of our methods on state-of-the-art bias benchmarks empirically
suggests that our methods effectively reduce gender bias. Given that our
methods can work in a few-shot manner and do not require any auxiliary model
training, we hope that our work benefits further research in the domain of
human-in-the-loop bias mitigation techniques by making the creation of bias
mitigation datasets feasible.

##  9 Limitations

Our proposed method has the following main limitations which we believe are
important directions for future work to address:

  1. 1.

Gender dependency: Our approach does not account for sentences that only make
sense for a single gender. For example, sentences like "She needs to see a
gynecologist" would not be captured by our method. This is a common problem
encountered by most debiasing algorithms as it is difficult to distinguish
these.

  2. 2.

Finite wordlist: The wordlist does not contain all gender-based words as the
language continues to evolve. We believe that future works could employ better
approaches that can automatically mine gender words relevant to a dataset.

  3. 3.

Blunt substitution: The phrase substitution method is an improvement over
direct word substitution, but there are still plenty of instances where the
new sentence might be semantically incorrect. This does not have any major
implication on inference as we are only doing few-shot learning, but it should
not be extended to the entire dataset.

  4. 4.

Binary gender: The method only focuses on the male and female gender. It does
not consider non-binary or gender-neutral pronouns such as "ze/hir." This can
be solved by using an updated wordlist, but the authors could not come across
one at the time of writing.

  5. 5.

Downstream analyses: While our work proposes methods that show reduced gender
bias as per a set of metrics, the work in no way claims to reduce gender bias
in general, especially on downstream tasks. However, we strongly believe that
this technique holds potential to reduce gender bias on downstream tasks as
well since we adopt a regular fine-tuning approach and focus mainly on better
data interventions. Moreover, recent research has shown that fine-tuning-based
debiasing approaches do not damage a model’s internal representations to a
critical extent Meade et al. (2022).

Overall, these limitations suggest that our approach may not be suitable for
use in contexts where gender-specific or non-binary language is prevalent, and
the underlying wordlist should be frequently updated.

##  10 Ethics Statement

This study was conducted in accordance with ethical principles and guidelines.
The study was designed to provide beneficial knowledge and not harm any group
or individual. We recognize that the wordlist we use might not represent all
contexts of gender bias and that our debiasing method does not cover all
contexts of occurrences of gender bias. However, we made sure to consider the
ethical implications of our methodologies and the results of our analysis. The
authors have tried to ensure the method does not amplify any other inherent
bias but also acknowledge that our approach may have limitations. We take
responsibility for any ethical concerns that may arise as a result of our
research.

## Acknowledgments

This material is based upon work partially supported by the National Science
Foundation (Awards #1722822 and #1750439) and National Institutes of Health
(Awards #R01MH125740, #R01MH096951, and #U01MH116925). PPL is partially
supported by a Facebook PhD Fellowship and a Carnegie Mellon University’s
Center for Machine Learning and Health Fellowship. Any opinions, findings,
conclusions, or recommendations expressed in this material are those of the
author(s) and do not necessarily reflect the views of the NSF, NIH, Facebook,
or CMLH, and no official endorsement should be inferred. Additionally, we
express our appreciation to the anonymous reviewers for their insightful
suggestions, which greatly improved our work. Furthermore, we would like to
acknowledge the contributions of our colleagues, Atishay Jain and Praneetha
Vaddamanu, who played a significant role in the development of this research.

## References

  * Barocas et al. (2017) Solon Barocas, Kate Crawford, Aaron Shapiro, and Hanna Wallach. 2017.  The problem with bias: Allocative versus representational harms in machine learning.  In _9th Annual conference of the special interest group for computing, information and society_.
  * Bolukbasi et al. (2016) Tolga Bolukbasi, Kai-Wei Chang, James Y. Zou, Venkatesh Saligrama, and Adam Tauman Kalai. 2016.  Man is to computer programmer as woman is to homemaker? debiasing word embeddings.  In _Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain_ , pages 4349–4357.
  * Cer et al. (2018) Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, Brian Strope, and Ray Kurzweil. 2018.  Universal sentence encoder for English.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pages 169–174, Brussels, Belgium. Association for Computational Linguistics.
  * Dev et al. (2021) Sunipa Dev, Tao Li, Jeff M Phillips, and Vivek Srikumar. 2021.  OSCaR: Orthogonal subspace correction and rectification of biases in word embeddings.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 5034–5050, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
  * He et al. (2022) Jacqueline He, Mengzhou Xia, Christiane Fellbaum, and Danqi Chen. 2022.  Mabel: Attenuating gender bias using textual entailment data.  _ArXiv preprint_ , abs/2210.14975.
  * Jentzsch and Turan (2022) Sophie Jentzsch and Cigdem Turan. 2022.  Gender bias in BERT - measuring and analysing biases through sentiment rating in a realistic downstream classification task.  In _Proceedings of the 4th Workshop on Gender Bias in Natural Language Processing (GeBNLP)_ , pages 184–199, Seattle, Washington. Association for Computational Linguistics.
  * Kirk et al. (2021) Hannah Rose Kirk, Yennie Jun, Filippo Volpin, Haider Iqbal, Elias Benussi, Frédéric A. Dreyer, Aleksandar Shtedritski, and Yuki M. Asano. 2021\.  Bias out-of-the-box: An empirical analysis of intersectional occupational biases in popular generative language models.  In _Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual_ , pages 2611–2624.
  * Kurita et al. (2019) Keita Kurita, Nidhi Vyas, Ayush Pareek, Alan W Black, and Yulia Tsvetkov. 2019.  Measuring bias in contextualized word representations.  In _Proceedings of the First Workshop on Gender Bias in Natural Language Processing_ , pages 166–172, Florence, Italy. Association for Computational Linguistics.
  * Lewis and Gale (1994) David D. Lewis and William A. Gale. 1994.  A sequential algorithm for training text classifiers.  In _SIGIR ’94_ , pages 3–12, London. Springer London.
  * Liang et al. (2020) Paul Pu Liang, Irene Mengze Li, Emily Zheng, Yao Chong Lim, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020.  Towards debiasing sentence representations.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 5502–5515, Online. Association for Computational Linguistics.
  * Liang et al. (2021) Paul Pu Liang, Chiyu Wu, Louis-Philippe Morency, and Ruslan Salakhutdinov. 2021\.  Towards understanding and mitigating social biases in language models.  In _Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event_ , volume 139 of _Proceedings of Machine Learning Research_ , pages 6565–6576. PMLR.
  * Lu et al. (2018) Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. 2018\.  Gender bias in neural natural language processing.
  * Maudslay et al. (2019) Rowan Hall Maudslay, Hila Gonen, Ryan Cotterell, and Simone Teufel. 2019.  It’s all in the name: Mitigating gender bias with name-based counterfactual data substitution.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 5267–5275, Hong Kong, China. Association for Computational Linguistics.
  * Meade et al. (2022) Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022.  An empirical survey of the effectiveness of debiasing techniques for pre-trained language models.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1878–1898, Dublin, Ireland. Association for Computational Linguistics.
  * Merity et al. (2017) Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017.  Pointer sentinel mixture models.  In _5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings_. OpenReview.net.
  * Nadeem et al. (2021) Moin Nadeem, Anna Bethke, and Siva Reddy. 2021.  StereoSet: Measuring stereotypical bias in pretrained language models.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 5356–5371, Online. Association for Computational Linguistics.
  * Nangia et al. (2020a) Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020a.  CrowS-pairs: A challenge dataset for measuring social biases in masked language models.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 1953–1967, Online. Association for Computational Linguistics.
  * Nangia et al. (2020b) Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020b.  CrowS-pairs: A challenge dataset for measuring social biases in masked language models.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 1953–1967, Online. Association for Computational Linguistics.
  * Ravfogel et al. (2020) Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020\.  Null it out: Guarding protected attributes by iterative nullspace projection.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7237–7256, Online. Association for Computational Linguistics.
  * Schick et al. (2021) Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021.  Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in NLP.  _Transactions of the Association for Computational Linguistics_ , 9:1408–1424.
  * Srivastava et al. (2022) Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, et al. 2022.  Beyond the imitation game: Quantifying and extrapolating the capabilities of language models.  _arXiv preprint arXiv:2206.04615_.
  * Webster et al. (2020) Kellie Webster, Xuezhi Wang, Ian Tenney, Alex Beutel, Emily Pitler, Ellie Pavlick, Jilin Chen, Ed Chi, and Slav Petrov. 2020.  Measuring and reducing gendered correlations in pre-trained models.
  * Zhang et al. (2018) Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. 2018.  Mitigating unwanted biases with adversarial learning.  _ArXiv preprint_ , abs/1801.07593.
  * Zhao et al. (2019) Jieyu Zhao, Tianlu Wang, Mark Yatskar, Ryan Cotterell, Vicente Ordonez, and Kai-Wei Chang. 2019.  Gender bias in contextualized word embeddings.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 629–634, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Zimmermann and Hoffmann (2022) Victor Zimmermann and Maja Hoffmann. 2022.  Absinth: A small world approach to word sense induction.  In _Proceedings of the 18th Conference on Natural Language Processing (KONVENS 2022)_ , pages 121–128, Potsdam, Germany. KONVENS 2022 Organizers.
  * Zmigrod et al. (2019) Ran Zmigrod, Sabrina J. Mielke, Hanna Wallach, and Ryan Cotterell. 2019.  Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 1651–1661, Florence, Italy. Association for Computational Linguistics.

##  Appendix A Appendix

###  A.1 Dataset Bias Analysis

To gauge the feasibility of using a wordlist based intervention approach, we
first analyze our datasets for occurrences of gender words. As shown in the
word cloud 4, gender pronouns are the most-frequent word in our datasets.
Moreover, as per Figure 1, "she," "he," and "her" are the top three most
frequently occurring words in our dataset. This suggests that we can
definitely detect gender words in our corpus and apply our interventions.

Sentences |  | Mean
---
Confidence
Difference
| She rushed to see what he wanted and said she loved him.
---
She punched him in the face and told him to go away.
6.85
| Jessica is a new mommy.
---
Jessica finds being a mother does not come easy to her.
She will no longer work so she can stay home and take care of her child.
6.34
| The little girl missed her mommy.
---
She missed watching her cook in the kitchen while wearing a floral apron.
She was never home because she worked long hours in the oil field.
4.70
Table 5: Sentences from StereoSet with maximum difference in confidence of
prediction between opposite gender words. Figure 3: Frequency of gender words
on the StereoSet dataset. Figure 4: Top 10 most frequent gender words on the
StereoSet dataset.

###  A.2 Sensitivity to Choice of Dataset

To understand the effectiveness of our proposed data-interventions, we study
apply our methods to two datasets under varying number of training samples
(10, 50 and 100) and selection strategies (most biased first and random) as
per Table 6. Our methods obtain better results on StereoSet (dev) dataset. One
reason this could happen is due to the fact that StereoSet has explicit gender
bias, thus it would be less likely for a sentence like "She needs a
gynaecologist" to appear on it. Because our interventions perform blunt
substitutions, this sentence might become incorrect due to our method -
"Either he or she needs a gynaecologist".

Dataset |  Sampling Method |  Number of Samples | Crow-S Pair Score | StereoSet Scores | Perplexity
---|---|---|---|---|---
Total | Stereotype Score | Anti-stereotype Scoe | SS (gender) | LMS (gender) | ICAT (gender)
StereoSet | most-biased | 10 | 54.481 (2.583) | 50.408 (5.295) | 60.991 (3.854) | 58.736 (1.215) | 80.858 (2.988) | 66.708 (2.584) | 50.449 (54.983)
random | 10 | 55.47 (3.247) | 50.527 (3.632) | 63.107 (4.234) | 58.952 (0.859) | 80.226 (2.85) | 65.862 (2.655) | 86.024 (107.709)
most-biased | 50 | 52.994 (1.894) | 47.567 (4.564) | 61.428 (5.25) | 58.498 (1.19) | 80.255 (2.428) | 66.595 (2.207) | 29.599 (28.648)
random | 50 | 53.817 (1.011) | 50.107 (2.972) | 59.547 (3.925) | 58.485 (0.758) | 79.158 (1.992) | 65.707 (0.886) | 62.498 (11.593)
most-biased | 100 | 53.054 (2.402) | 49.063 (6.025) | 59.291 (4.663) | 58.071 (1.158) | 81.086 (3.226) | 67.972 (2.671) | 19.079 (14.095)
random | 100 | 53.563 (1.801) | 48.113 (6.499) | 62.137 (5.405) | 57.719 (1.94) | 79.038 (1.406) | 66.805 (2.074) | 34.826 (12.109)
WikiText-2 | most-biased | 10 | 55.6 (3.06) | 54.668 (5.606) | 57.118 (1.671) | 59.344 (0.742) | 84.624 (2.134) | 68.811 (2.176) | 87.06 (80.998)
random | 10 | 56.617 (1.344) | 57.983 (1.305) | 54.693 (2.019) | 60.616 (0.72) | 85.076 (0.896) | 67.021 (1.895) | 59.901 (102.019)
most-biased | 50 | 54.276 (1.513) | 53.394 (3.847) | 55.834 (2.652) | 59.238 (1.068) | 83.348 (3.003) | 67.902 (0.977) | 212.365 (155.526)
random | 50 | 54.2 (2.383) | 51.783 (5.272) | 57.93 (2.969) | 59.611 (1.155) | 83.456 (1.9) | 67.386 (0.74) | 116.872 (100.401)
most-biased | 100 | 55.473 (1.42) | 54.827 (4.255) | 56.637 (4.329) | 59.426 (1.719) | 83.442 (3.185) | 67.629 (1.178) | 220.957 (207.243)
random | 100 | 54.457 (1.444) | 51.363 (4.283) | 59.223 (4.451) | 59.545 (0.387) | 81.953 (1.442) | 66.3 (0.597) | 326.017 (181.822)

Table 6: StereoSet and Crow-S scores for random-phrase-masking method on two
datasets, 3 sample sizes and 2 selection methods. We report mean (standard
deviation) across 3 different runs. Selecting most-biased samples and using
the StereoSet dataset for fine-tuning gives best results.

Name Word Mask Method |  Non-Name Word Mask Method | Crow-S Pairs | StereoSet | Perplexity
---|---|---|---|---
Total | Stereotype Score | Anti-Stereotype Score | SS | LMS | ICAT
| female-first-
---
random-phrase-masking
53.18 (3.106) | 49.06 (6.627) | 59.55 (3.678) | 58.283 (0.4) | 79.059 (0.436) | 65.96 (0.27) | 26.3 (9.545)
naive-masking | 50.637 (0.585) | 43.607 (1.449) | 61.49 (1.486) | 59.521 (0.458) | 83.325 (0.62) | 67.456 (0.414) | 1.0 (0.0)
naive-masking | random-phrase-masking | 52.673 (1.374) | 49.057 (5.998) | 58.253 (5.906) | 58.05 (0.851) | 78.218 (0.633) | 65.618 (0.937) | 30.045 (8.019)
neutral-masking |  | female-first-
---
random-phrase-masking
53.44 (0.0) | 53.46 (0.891) | 53.4 (1.372) | 58.246 (0.285) | 87.182 (0.391) | 72.806 (0.823) | 11.39 (6.649)
random-phrase-masking | 54.195 (1.619) | 48.43 (0.891) | 63.11 (2.744) | 57.316 (0.164) | 78.339 (0.196) | 66.877 (0.424) | 54.413 (0.212)
fixed-phrase-masking-1 | 53.307 (1.761) | 46.837 (8.494) | 63.43 (8.807) | 57.688 (1.718) | 79.554 (0.17) | 67.32 (2.64) | 14.484 (1.512)
fixed-phrase-masking-2 | 51.783 (4.965) | 46.43 (10.381) | 60.193 (3.503) | 57.229 (1.739) | 80.551 (1.251) | 68.879 (1.882) | 13.374 (1.174)
fixed-phrase-masking-3 | 52.927 (1.541) | 48.317 (3.78) | 60.193 (4.234) | 56.963 (1.373) | 79.3 (1.531) | 68.284 (3.478) | 15.546 (2.997)
fixed-phrase-masking-4 | 53.567 (4.186) | 50.083 (9.006) | 59.223 (3.885) | 58.13 (1.208) | 79.834 (0.533) | 66.86 (2.309) | 14.51 (1.339)

Table 7: StereoSet Gender SS scores on StereoSet (dev) dataset on 100 samples
across various interventions techniques. All numbers are reported as mean and
standard deviation across 3 runs.

###  A.3 Sensitivity to Number of Training Samples and Sampling Strategy

$\displaystyle{10}$$\displaystyle{50}$$\displaystyle{100}$Number of training
samples$\displaystyle{58}$$\displaystyle{59}$$\displaystyle{60}$StereoSet
Gender SSsample_methodmost-biasedrandom

Figure 5: StereoSet Gender SS scores on StereoSet (dev) dataset with varying
number of training samples. Compared to random selection of samples, selecting
most-biased samples help achieve lower SS scores.

As per Figure 5, When we vary the number of training samples, we observe that
the difference in performance is not huge when we transition from 10 to 100
samples, thus suggesting that our method is capable of few-shot fine-tuning.
Moreover, sampling the most biased data points helps our methods achieve
better performance consistently, as shown in Figure 5 and Table 6. Table 5
shows some top three most gender biased entries found in the StereoSet
dataset.

###  A.4 Ablations of interventions

We study the effects of choosing different ways of replacement for name and
non-name words. In addition to our three interventions proposed previously, we
also experimented with a couple of others. In female-first-random-phrase-
masking, we always keep the female gendered word before a male word. We wanted
to understand if the order of gender words encountered by a model renders any
effect on the debiasing. In Table 7, we see that it does not perform any
better than random-phrase-masking. Then, we also try fixing the phrases from
random-phrase-masking, thus making it fixed-phrase-masking. We obtain 4
variants of this method corresponding to the following four phrases:

  1. 1.

both [1] and [2]

  2. 2.

[1] and [2]

  3. 3.

[1] or [2]

  4. 4.

either [1] or [2]

Here, [1] and [2] are substituted with opposite gender words. As we observe in
Table 7, fixed-phrase-masking-3 obtains the lowest StereoSet Gender SS score
out of all our intervention methods. Similarily, naive-masking obtains the
lowest Crow-S pair score.