revtex4-1Repair the float  ††thanks: Corresponding author.

# Memory formation in jammed hard spheres

Patrick Charbonneau  Department of Chemistry, Duke University, Durham, North
Carolina 27708  Department of Physics, Duke University, Durham, North Carolina
27708  Peter K. Morse<EMAIL_ADDRESS>Department of Chemistry, Duke
University, Durham, North Carolina 27708

(August 27, 2024)

###### Abstract

Liquids equilibrated below an onset density share similar inherent states,
while above that density their inherent states markedly differ. Although this
phenomenon was first reported in simulations over 20 years ago, the physical
origin of this memory remains controversial. Its absence from mean-field
descriptions, in particular, has long cast doubt on its thermodynamic
relevance. Motivated by a recent theoretical proposal, we reassess the onset
phenomenology in simulations using a fast hard sphere jamming algorithm and
find it both thermodynamically and dimensionally robust. Remarkably, we also
uncover a second type of memory associated with a Gardner-like change in
behavior along the jamming algorithm.

The state of a material is nominally the product of its history, echoing both
states and processes previously encountered. Yet equilibrium states are
memoryless. Only certain non-equilibrium processes allow information to be
stored, retained, and summoned back. Because of the obvious uses for such
memory, both nature and industry have developed myriad ways of harnessing it,
including phase changes Ovshinsky (1968), mechanical instabilities Pine  _et
al._ (2005); Mahadevan and Rica (2005); Bowden  _et al._ (1998); Paulsen  _et
al._ (2014); Reid  _et al._ (2018), allostery Monod  _et al._ (1965); Rocks
_et al._ (2017); Yan  _et al._ (2017), and wiping out Barker  _et al._ (1983);
Sethna  _et al._ (1993). Given their rich out-of-equilibrium physics, glass-
forming materials exhibit all of these memory types, and thus broadly inform
our understanding of them. Spin glass models, in particular, form the
theoretical basis for both machine and biological learning Stein (1992);
Choromanska  _et al._ (2015); Baity-Jesi  _et al._ (2019). Structural glasses,
which are thought to be close relatives Parisi  _et al._ (2020), form an even
richer array of memory types via out-of-equilibrium processes as varied as
shearing Paulsen  _et al._ (2014); Reid  _et al._ (2018); Keim  _et al._
(2019), heating cycles Debenedetti and Stillinger (2001), and aging Angell
_et al._ (2000).

Inherent state memory, which relates an equilibrium liquid state to its
nearest energy minima or jammed configuration through fast out-of-equilibrium
quenches Debenedetti and Stillinger (2001); Heuer (2008), is one of the
simplest types of memories in glasses. What macroscopic properties of the
original liquid can the inherent structure recall? In _pure_ $p$-spin models,
which commonly inform the mean-field description of glasses Charbonneau  _et
al._ (2017), the answer is straightforward. Initial systems taken above the
dynamical (or mode-coupling) transition temperature, $T_{\mathrm{d}}$, are
quenched to inherent states indistinguishable from one another Cugliandolo and
Kurchan (1993). In other words, no information about the original liquid
persits, other than that it was a liquid. This memorylessness has long been
argued to be a general feature of glass-formers, but numerical simulations of
(Kob-Andersen binary) Lennard-Jones liquids Sastry  _et al._ (1998); Sastry
(2000, 2013), model polymers Kamath  _et al._ (2001), and soft spheres Ozawa
_et al._ (2012); Berthier  _et al._ (2016a); Jin and Yoshino (2020) do not
concur. In these systems, all states prepared above an onset
$T_{\mathrm{on}}>T_{\mathrm{d}}$ share a same inherent state, but inherent
states of liquids prepared below $T_{\mathrm{on}}$ differ. The resulting
amorphous solid thus encode some features of the original liquid.

Figure 1: a) Schematic of the two-step iterative jamming algorithm. (i)
Inflation: particles (black disks) separated by minimum gap $h_{\mathrm{n}}$
expand uniformly (red disks) until $h^{\prime}_{\mathrm{n}}$. (ii) Repulsion:
an effective free energy is minimized until the minimum gap reaches
$h_{\mathrm{n+1}}=h_{\mathrm{n}}$. The cycle is repeated until the density
converges at jamming. b) The onset is clearly visible in $d=3$ for all system
sizes considered. Lines are fits to the phenomenological crossover form Eq.
(2). The thermodynamic $N\rightarrow\infty$ limit of the fit parameters (black
line) shows that the onset appears well before the dynamical (mode-coupling)
crossover (dashed black line). c) Finite-size scaling of the jamming
transition $\phi_{\mathrm{J0}}$ below the onset (top), and the finite-size
scaling of the onset (below), where lines are fits to Eq. (1), and curves are
offset for visual clarity.

Attempts to explain away this discrepancy abound. Finite-size Crisanti and
Ritort (2000); Dasgupta and Valls (2000) or finite-dimensional corrections
Dasgupta and Valls (2000); Glotzer  _et al._ (2000) have been invoked,
measurement protocols have been questioned Ozawa  _et al._ (2012); Jin and
Yoshino (2020), as has the validity of the connection between spins and
particle models Dasgupta and Valls (2000). The solution of the glass problem
in the high-dimensional, $d\rightarrow\infty$ limit Parisi  _et al._ (2020),
however, has revealed that the mean-field analogy between spins and particles
glasses is quite strong, and some features of glass phenomenology are
remarkably robust to dimensional changes Charbonneau  _et al._ (2017). The
conceptual crisis was therefore complete when Folena et al. Folena  _et al._
(2020); Zamponi (2019) recently realized that _mixed_ $p$-spin models
generically present an onset, and hence that _pure_ $p$-spin models might be
exceptional rather than typical (see also Altieri  _et al._ (2020)).

While this advance offers a possible resolution of the original inconsistency,
it does not address many of the remaining concerns, including algorithmic and
finite-size considerations. In this letter, we use advanced computer
simulations to eliminate these hypotheses and strongly evince the existence of
a distinct landscape onset in liquids. We further uncover that the preparation
algorithm itself has signatures of a dynamical transition, which can be used
to define a memory that makes a distinction between all initial liquid
conditions, even before the onset is reached.

## Model and Simulation Method—

We consider the inherent states of hard sphere glass formers obtained by
rapidly compressing, i.e., crunching, an equilibrated liquid at volume
fraction $\phi_{\mathrm{eq}}$ to its nearest jamming point. Existing crunching
algorithms, however, either violate the hard sphere constraint O’Hern  _et
al._ (2003); Ashwin  _et al._ (2012); Morse and Corwin (2014), allow for
significant equilibration Lubachevsky and Stillinger (1990); Jin and Yoshino
(2020), or scale poorly with system size Lerner  _et al._ (2013a); Rojas  _et
al._ (2019). In order to avoid these pitfalls, we modify a recent algorithm by
Arceri and Corwin Arceri and Corwin (2020) and propose an iterative two-step
scheme based on the minimum scaled gap,
${h=\min_{ij}(h_{ij})=\min_{ij}[d_{ij}/(r_{i}+r_{j})]}$ between particles $i$
and $j$ of radii $r_{i}$ a distance $d_{ij}$ apart. Iterating step $n$
involves two sub-steps: inflation and repulsion. The former entails expanding
particles uniformly, thus creating a new minimum gap,
$h^{\prime}_{\mathrm{n}}=\alpha h_{\mathrm{n}}$, and the latter uses the FIRE
algorithm Bitzek  _et al._ (2006) to minimize the effective thermal potential
for hard spheres near jamming Brito and Wyart (2006); Altieri  _et al._
(2016), until $h_{\mathrm{n+1}}=h_{\mathrm{n}}$ (Appendix A). Although the
minimal scaled gap stays constant from one step to the next, interparticle
distances steadily decrease, and hence the algorithm converges at jamming. An
expansion factor $\alpha<1$ ensures that the hard sphere constraint is never
violated. Interestingly, a marked algorithmic slowdown of the FIRE
minimization arises well before jamming is reached. We cap the number of steps
of this minimization to a small multiple of the degrees of freedom,
$n_{\mathrm{FIRE}}=\tau Nd$ to prevent a full minimization–and thus unwanted
thermalization–as the crunching proceeds. Setting $\alpha=0.9$ and $\tau=2$,
achieves the lowest jamming density while also creating a reliably rigid
structure (Appendix B), thus ensuring that equilibration is maximally
suppressed along the process. A low-density fluid thus crunched hence best
approximates the maximally random jammed state Torquato  _et al._ (2000).

Figure 2: Infinite-system size onset curves for different dimensions can be
collapsed, suggesting that the inherent structure onset exists in both the
thermodynamic and the infinite-dimensional limits. Shaded regions give the
standard error of Eq. (2) with $95\%$ confidence intervals on parameters and
dashed lines denote $\phi_{\mathrm{d}}$ from Ref. Charbonneau  _et al._
(2014a). The steady increase of $\phi_{\mathrm{d}}$ with dimension on this
scale shows that $\phi_{\mathrm{co}}<\phi_{\mathrm{d}}$. The collapse further
suggests the indentification $\phi_{\mathrm{on}}\sim 0.9\phi_{\mathrm{co}}$.
(Inset) Scaling of $\phi_{\mathrm{J0}}$ and $\phi_{\mathrm{on}}$ with $d$,
compared with those for the avoided dynamical transition, $\phi_{\mathrm{d}}$,
and the onset of non-Fickian diffusion, $\phi_{\mathrm{nf}}$, from Ref.
Charbonneau  _et al._ (2014a) reveals that both $\phi_{\mathrm{nf}}$ and
$\phi_{\mathrm{on}}$ exhibit a trivial mean-field-like dimensional scaling
down to physical dimensions, unlike that of $\phi_{\mathrm{d}}$ and
$\phi_{\mathrm{J0}}$.

## Onset Memory—

The first quantity of interest is the density of jammed states
$\phi_{\mathrm{J0}}(N)$, obtained from low-density liquids, and its scaling
with system size $N$ upon approaching the thermodynamic $N\rightarrow\infty$
limit. Because of the critical nature of jamming, we expect

$\phi_{\mathrm{J0}}-\phi_{\mathrm{J0}}(N)\sim N^{-1/\nu d}$ (1)

with correlation length exponent $\nu$. Soft spheres studies have found
$\nu\approx 0.7$ O’Hern  _et al._ (2002, 2003); Ozawa  _et al._ (2012), which
is inconsistent with $\nu\approx 1$ obtained from direct measurements of the
correlation length at jamming Vågberg  _et al._ (2011). We here robustly find
$\nu\approx 1$ in all $d$, with $\nu=1.01\pm 0.04$, $0.99\pm 0.06$, $1.01\pm
0.10$, and $1.0\pm 0.3$ in $d=3$, $4$, $5$, and $6$ respectively, thus
resolving the discrepancy. Although different exponents can in principle be
attributed to model and algorithmic differences Vågberg  _et al._ (2011), the
scaling difference between soft and hard spheres might also originate from the
fact that minimization of the former, unlike crunching of the latter, allows
for weak barriers to be crossed. In support of this hypothesis, we note that
our thermodynamic extrapolations for $\phi_{\mathrm{J0}}$ are close to but
systematically smaller than those for soft spheres for all dimensions
considered (Appendix C), including the careful estimate of Ref. O’Hern  _et
al._ , 2002. In addition, the lack of dimensional dependence of this
particular critical exponent for a specific model and algorithm gives further
credence to $d_{u}=2$ being lower critical dimension for jamming Wyart (2005);
Goodrich  _et al._ (2012); Hexner  _et al._ (2019).

Figure 1c shows a clear dependence of the inherent state on the original
equilibrium liquid condition, such that for
$\phi_{\mathrm{eq}}\lesssim\phi_{\mathrm{on}}$, $\phi_{\mathrm{J}}$ is
constant, and for $\phi_{\mathrm{eq}}\gtrsim\phi_{\mathrm{on}}$,
$\phi_{\mathrm{J}}$ increases with $\phi_{\mathrm{eq}}$. The change from one
regime to the other, however, does not sharpen as the system size increases,
and thus remains a crossover in the thermodynamic limit. To quantify this
feature, we use the empirical softmax form Dugas  _et al._ (2001)

$\phi_{\mathrm{J}}(\phi_{\mathrm{eq}})=\phi_{\mathrm{J0}}+ab\ln(1+e^{(\phi_{\mathrm{eq}}-\phi_{\mathrm{co}})/b}),$
(2)

where $\phi_{\mathrm{co}}(N)$ marks the crossover point between the low
density and high density linear regimes,
$a=\frac{d\phi_{\mathrm{J0}}}{d\phi_{\mathrm{eq}}}$ for
$\phi_{\mathrm{eq}}\gg\phi_{\mathrm{co}}$, and $b(N)$ characterizes the width
of the crossover region. This form nicely recapitulates our observations, but
we note that $\phi_{\mathrm{co}}$ occurs well above the point at which
$\phi_{\mathrm{J}}$ deviates from $\phi_{\mathrm{J0}}$, which traditionally
defines the onset. Without loss of generality, we thus define
$\phi_{\mathrm{on}}=0.9\phi_{\mathrm{co}}$. The result scales as
$\phi_{\mathrm{on}}\sim N^{-1/d}$ (Figure 1b). Because of the limited density
range between $\phi_{\mathrm{co}}$ and $\phi_{\mathrm{d}}$, around which
standard computations become particularly onerous for monodisperse systems,
the fitting parameters $a$ and $b$, cannot be independently determined at
fixed $N$. Imposing that a single $a$ should fit all $N$, however, suffices to
obtain a robust extrapolation of Eq. (2) to the thermodynamic limit (Appendix
D).

In order to compare the dimensional trend quantitatively, we consider the
fractional deviation from $\phi_{\mathrm{J0}}$ with the normalized density
growth $\phi_{\mathrm{eq}}/\phi_{\mathrm{co}}$. The thermodynamic onset
results then collapse onto a master curve (Fig. 2), strongly suggesting that
the onset persists as a crossover as $d\rightarrow\infty$. This scaling also
shows that $\phi_{\mathrm{co}}$ and thus $\phi_{\mathrm{on}}$ are numerically
distinct from the (avoided) dynamical transition $\phi_{\mathrm{d}}$ as
indicated by the steady increase of $\phi_{\mathrm{d}}$ on this scale. Hence,
independently of the proposed scaling, our results validate earlier numerical
studeis and are in sharp contrast with those of Ref. Cugliandolo and Kurchan
(1993) for pure $p$-spin models. The inset of Fig. 2 suggests that upon
considering the mean-field, $d\rightarrow\infty$, limit the onset remains
roughly constant, while the (avoided) dynamical transition shifts markedly as
$d$ increases. Interestingly, this same qualitative behavior has been observed
for another onset, that of non-Fickian diffusion, $\phi_{\mathrm{nf}}$
Charbonneau  _et al._ (2014a).

From a theoretical standpoint, these various results are quite informative.
While the (avoided) dynamical transition of liquids is sensitive to structure
(especially compared to that of structureless liquids Charbonneau  _et al._
(2014a); Mangeat and Zamponi (2016)), both $\phi_{\mathrm{on}}$ and
$\phi_{\mathrm{nf}}$ are not. This distinction suggests that separate
underlying (landscape) mechanisms underlie the two types of features. Although
it is not immediately apparent why $\phi_{\mathrm{on}}$ and
$\phi_{\mathrm{nf}}$ should scale similarly, the robustness of our results
suggests that a complete out-of-equilibrium dynamical theory should account
for their (near) coincidence.

Figure 3: The onset of the algorithmic slowdown at $\phi_{\mathrm{G}}$ is
simultaneously characterized by three observables, which robustly identify a
change in the crunching process. (Results for $d=4$ with
$\phi_{\mathrm{eq}}=0.2$, which are shown here, are typical of other
dimensions and conditions.) a) At $\phi_{\mathrm{G}}$, the distribution of
gaps narrows significantly, such that the minimum gap most closely approaches
the average gap. b) The number of minimization loops necessary to complete the
repulsion sub-step (ii) of the jamming algorithm grows precipitously, and is
manually cut off at $\tau=2$. c) Comparing the contact network, $c_{i}$, for
an unperturbed system at jamming with the network, $c_{j}$, for a replica
perturbed at $\phi_{\mathrm{break}}$ shows that systems perturbed before
$\phi_{\mathrm{G}}$ (gray zone) end up with markedly different contact
networks while systems perturbed beyond $\phi_{\mathrm{G}}$ (white zone)
exhibit growing similarities. Increasing system size makes the effect more
prominent and shifts the process to higher densities that nonetheless remain
distinct from $\phi_{\mathrm{J}}$ (Appendix E). d) Taken together, these
observation suggest that saddles start to dominate the landscape of the crunch
algorithm around $\phi_{\mathrm{G}}$, thus resulting in sluggish dynamics and
a large contact network response to small perturbations in particle positions.
In other words, a slightly perturbed system (i) then jams as (iii), whereas
the original system jams at (ii). This series of observations for an out-of-
equilibrium algorithm is reminiscent of the Gardner-like behavior of quasi-
static state followings in ultrastable glasses Berthier  _et al._ (2016b)

## Algorithmic Memory—

Surprisingly, a second form of memory develops before jamming is reached. As a
liquid is initially crunched, interparticle gaps first grow more regular, such
that $\langle h\rangle/h_{\mathrm{min}}\sim 1$ (Figure 3a). Because of the
disordered, and thus frustrated, nature of the jammed state, however, the
repulsion sub-step becomes increasingly computationally arduous, as
illustrated by the rapid growth in the number of minimization loops necessary
to achieve $h_{\mathrm{n+1}}=h_{\mathrm{n}}$ (Fig. 3b). Gap regularization
then also goes into reverse. Remarkably, the two phenomena coincide at some
$\phi_{\mathrm{G}}$. This putative algorithmic onset can be further
characterized by considering the result of perturbing a state along the
jamming algorithm. Taking exact replicas at $\phi_{\mathrm{break}}$ and
applying a single Metropolis Monte Carlo step before crunching anew gives rise
to force contacts at jamming, $c_{i}$, that can vary. Comparing these contact
networks using ${1-(c_{i}\cap c_{j})/(c_{i}\cup c_{j})}$, in particular,
highlights structural differences. The quantity vanishes if the packings are
identical and unity if the packings share no contacts. Figure 3c indicates
that applying a perturbation before $\phi_{\mathrm{G}}$ results in markedly
different jammed states, whereas perturbations made after $\phi_{\mathrm{G}}$
present increasingly small deviations (Appendix E).

Taken together these observations suggest that saddles start to dominate the
optimization landscape around $\phi_{\mathrm{G}}$, forcing the selection of a
nearby sub-basin and thus of a contact network at jamming (Fig. 3d). A
transition which sharpened with system size above $\phi_{\mathrm{G}}$ would
imply that all replicas perturbed after $\phi_{\mathrm{G}}$ converge on the
same contact network. That it does not suggests instead a rich, multi-layered
landscape structure reminiscent of an equilibrium Gardner transition
Charbonneau  _et al._ (2019, 2017); Berthier  _et al._ (2016b); Charbonneau
_et al._ (2014b), for which mean-field theory predicts a fractal hierarchy of
sub-basins Charbonneau  _et al._ (2014b).

The evolution of $\phi_{\mathrm{G}}$ upon increasing $\phi_{\mathrm{eq}}$ is
akin to that of $\phi_{\mathrm{J}}$ (Fig. 4 and Appendix D) but with an
initial linear growth instead in lieu of a density-independent regime. To
estimate if both this linear scaling and $\phi_{\mathrm{G}}$ persist with
increasing system size and dimension, we fit the results to a modified form of
the softmax potential

$\phi_{\mathrm{G}}(\phi_{\mathrm{eq}})=\phi_{\mathrm{G0}}+\Gamma(\phi_{\mathrm{eq}}-\phi_{\mathrm{co}})+(a-\Gamma)b\ln(1+e^{(\phi_{\mathrm{eq}}-\phi_{\mathrm{co}})/b}),$
(3)

where $a$, $b$, and $\phi_{\mathrm{co}}$ are taken from fits to Eq. (3), and
${\Gamma=\left.\frac{d\phi_{\mathrm{G}}}{d\phi_{\mathrm{eq}}}\right|_{0}}$ is
the slope of the linear regime. Figure 4 shows that $\Gamma$ tends to a
constant as $N\rightarrow\infty$, and that this constant increases as $d$
increases (see also Appendix D). Hence, although systems prepared at different
$\phi^{(1)}_{\mathrm{eq}}<\phi^{(2)}_{\mathrm{eq}}<\phi_{\mathrm{on}}$ both
jam at a same density $\phi_{\mathrm{J0}}$, $\phi^{(1)}_{\mathrm{eq}}$
encounters a saddle-dominated regime at smaller densities than
$\phi^{(2)}_{\mathrm{eq}}$. In other words, while the jammed state may not
recall the liquid density used to prepare it, its crunching does.

The identification of $\phi_{\mathrm{G}}$, its similarity to a Gardner
transition, and its signature of the onset provide guidance for solving out-
of-equilibrium dynamical theories Agoritsas  _et al._ (2018, 2019); Altieri
_et al._ (2020). Indeed, while quasi-equilibrium calculations find that a
Gardner transition is a necessary step towards jamming for liquids
equilibrated beyond $\varphi_{\mathrm{d}}$Berthier  _et al._ (2016b, 2019),
our results suggest that an equivalent out-of-equilibrium phenomenon should be
uncovered in a mean-field description. If true, this would resolve the
paradoxical observation that jamming criticality is obtained in experimentally
relevant regime O’Hern  _et al._ (2003); Goodrich  _et al._ (2012); Lerner
_et al._ (2013b); Charbonneau  _et al._ (2015), with
$\phi\ll\phi_{\mathrm{on}}$, even in the absence of standard Gardner physics.

Figure 4: a) The algorithmic $\phi_{\mathrm{G}}$ in $d=3$, identified as in
Fig. 3, shifts with system size. (Inset) The low-density slope of
$\phi_{\mathrm{G}}$ tends to a finite value as $N$ increase in all dimensions
(dashed lines). Because the density dependence of $\phi<\phi_{\mathrm{on}}$
seemingly persists in the thermodynamic limit, memory of the initial state
appears upon crunching.

## Conclusion—

By devising an efficient crunching algorithm that does not violate the hard-
sphere condition, we have determined that inherent state memory persists in
the thermodynamic and high-dimensional limits. Such memory thus ought to exist
in mean-field descriptions. We have further identified a Gardner-like point in
the strongly out-of-equilibrium behavior of our crunching algorithm. This
quantity itself varies across $\phi_{\mathrm{eq}}$, and thus recalls the
original liquid, even at densities well below the inherent structure onset.
Although the location of this phenomenon is likely strongly algorithm
dependent, we expect all such procedures to encounter a comparable slowdown or
instability. Revisiting such algorithms might be particularly instructive, and
could offer a lens to broader class of problems, particularly within
generalized learning algorithms, for which interest in Gardner physics has
recently grown Abbara  _et al._ (2020). If the association is confirmed, then
experimental validations of the Gardner physics would then also be well within
reach.

###### Acknowledgements.

We acknowledge many stimulating discussions with Ada Altieri, Francesco
Arceri, Silvio Franz, Jorge Kurchan, Giorgio Parisi, and Francesco Zamponi.
This work was supported by the Simons Foundation grant # 454937. Most
simulations were performed at Duke Compute Cluster (DCC), for which the
authors thank Tom Milledge’s assistance. The authors also thank the Extreme
Science and Engineering Discovery Environment (XSEDE), supported by National
Science Foundation Grant No. ACI-1548562, for computer time. Data relevant to
this work have been archived and can be accessed at the Duke Digital
Repository https://doi.org/10.7924/XXXXXXX.

##  Appendix A Logarithmic Potential

The effective potential used in the repulsion step of our jamming algorithm is
given by $U=\sum_{i>j}U_{ij}(h_{ij})$ with

$U_{ij}(h_{ij})=\begin{cases}\infty&h_{ij}<0\\\
-\ln(h_{ij})+\frac{1}{c}(1+h_{ij})&0<h_{ij}<c\\\ 0&h_{ij}\geq c\end{cases}$
(4)

where $h_{ij}=\frac{d_{ij}}{r_{i}+r_{j}}-1$ is the scaled gap between
particles $i$ and $j$ with radii $r_{i}$ and $r_{j}$ and interparticle
distance $d_{ij}$. Particles are monodisperse, except in $d=3$, where they are
bidisperse with a 50:50 mixture of size ratio 1:1.4. The cutoff $c$ is set
such that there is an average of $2d$ contacts per particle with
$U_{ij}(h_{ij})>0$. This ensures that the potential smoothly goes to zero when
particles lose contact and allows only nearby particles to influence one
another.

##  Appendix B Algorithm optimization and jamming criterion

Figure 5: Determination of the optimal parameters $\alpha$ and $\tau$ in the
crunching algorithm for (generic conditions) $d=3$, $N=1024$, and
$\phi_{\mathrm{eq}}=0.4$. Optimal $\alpha$ and $\tau$ should result in: (i)
minimal inflation necessary to jam the corresponding soft sphere system
$\phi_{RS}$, and (ii) a minimal jamming density. a)
$\langle\phi_{\mathrm{J0}}\rangle$ steadily decreases with increasing $\alpha$
at fixed $\tau=2$, hence a larger $\alpha$ results in better inherent states.
b) $\phi_{\mathrm{RS}}$ decreases steadily, but rises sharply for
$\alpha>0.95$. c) $\phi_{\mathrm{J}}$ increases monotonically with $\tau$ at
fixed $\alpha=0.9$, hence a smaller $\tau$ results in better inherent states.
d) $\phi_{\mathrm{RS}}$ is constant above $\tau=2$, but raises significantly
for $\tau=1$. The combination $\alpha=0.9$ and $\tau=2$ is therefore near
optimal per our selection criteria. Dashed lines are provided as trend guides.

The crunching algorithm described in the text requires that two parameters be
optimized: the expansion parameter $\alpha$, which sets how much gaps shrink
in the expansion substep, and the stopping parameter $\tau=2$, which indicates
the maximum number of FIRE minimization steps in the repulsion substep. In
general, $\phi_{\mathrm{J}}$ decreases with increasing $\alpha$ and decreasing
$\tau$, but extreme values result in mechanically unstable packings. We thus
aim for parameters that minimize the inherent state density,
$\phi_{\mathrm{J}}$, subject to the algorithm producing a stable jammed
packing.

First, each crunch is run until the relative density difference between steps
$n$ and $n+1$ is $\frac{\phi_{\mathrm{n+1}}}{\phi_{\mathrm{n}}}-1<10^{-10}$,
which is set low enough to ensure that $\phi_{\mathrm{J}}$ does not further
evolve. Crunching beyond this point is possible, but numerically wasteful for
our needs. The quality of the resulting packing is then assessed by measuring
the distance from a putative mechanically stable state. This distance is
determined by inflating spheres (allowing overlaps) without minimization until
the system has at least one excess contact above isostaticity, after removing
rattlers, $\Delta\phi_{\mathrm{RS}}$ (found via a binary search
algorithm)Goodrich  _et al._ (2012). We finally choose $\alpha$ and $\tau$ so
as to produce the smallest $\phi_{\mathrm{J}}$ possible without significantly
increasing $\Delta\phi_{\mathrm{RS}}$. Figure 5b shows a jump in
$\Delta\phi_{\mathrm{RS}}/\phi_{\mathrm{J}}$ for $\alpha>0.95$ indicating that
$\alpha>0.95$ produces non-rigid packings and implying an optimum near
$\alpha=0.95$. Because the variance in $\phi_{\mathrm{J}}$ is then large,
however, we conservatively set $\alpha=0.9$. Similarly, Fig. 5e shows a rapid
increase in $\Delta\phi_{\mathrm{RS}}/\phi_{\mathrm{J}}$ for $\tau<2$ leading
to our choosing $\tau=2$.

##  Appendix C Comparison to soft sphere jamming

The jamming density of hard sphere (HS) crunching algorithm produces lower
inherent state densities than the infinite-temperature quench soft sphere (SS)
geometric-mean-search algorithm described in Ref. Morse and Corwin (2014), as
demonstrated in Fig. 6. The density spread of jammed densities,
$\sigma_{\phi_{\mathrm{J}}}$, scales as

$\sigma_{\phi_{\mathrm{J}}}\sim N^{-1/2}$ (5)

for all dimensions and $\phi_{\mathrm{eq}}$, consistent with results from
earlier algorithms, e.g., O’Hern  _et al._ (2003) (Fig. 7).

Figure 6: Comparison of $\phi_{\mathrm{J0}}$ between the HS algorithm used in
the text, and the SS protocol described in Ref. Morse and Corwin (2014) for a)
$d=3$, b) 4, c) 5, and d) 6,. The slopes appear consistent between algorithms,
indicating a similar value of $\nu$, but the asymptotic value of
$\phi_{\mathrm{J0}}$ reached by hard sphere crunching is significantly lower
than for its soft sphere counterpart. Lines are best fits to Eq. (1). Figure
7: The variance of the jamming density distribution, scaled as $N^{-1/2}$,
collapses results for all a) $d=3$, b) $d=4$, c) $d=5$, and d) $d=6$. The
spread of available jammed states decreases decreases with increasing
$\phi_{\mathrm{eq}}$.

##  Appendix D High-dimensional scaling and fit parameters

The onset curves for both $\phi_{\mathrm{J}}$ and $\phi_{\mathrm{G}}$ are
given in $d=3$ (Figs. 1 and 4), and the thermodynamic limit is reported for
$d=4-6$ (Fig. 2). The intermediate results for ${d=4-6}$ are provided in Fig.
8. Equations (2) and (3) are each fit simultaneously for all $N$ using
standard least-squares methods treating ${\phi_{\mathrm{J0}}(N)}$ (or
${\phi_{G0}(N)}$), ${\phi_{\mathrm{co}}(N)}$, and ${b(N)}$ as independent
parameters for each curve, and $a$ as a common parameter. The resulting
${\phi_{\mathrm{J0}}}$, ${\phi_{G0}}$, ${\phi_{\mathrm{co}}}$, and $b$ are
then fitted using the form ${x(\infty)-x(N)=c_{1}N^{-\nu/d}}$ with arbitrary
constant $c_{1}$. The exponent $\nu$ is allowed to vary for
$\phi_{\mathrm{J0}}$ and is found to be $\nu\approx 1$ for all $d$ as noted in
the text. For the other fitting parameters, we fix $\nu=1$ and verify that the
resulting fits are appropriate. Figure 9 confirms that both $b$ and
$\phi_{\mathrm{G0}}$ scale as $N^{-1/d}$. The resulting fit parameters are
given in Table 1.

Figure 8: The signature of the onset demonstrated in Fig. 1b is given for a) $d=4$, b) $5$, and c) $6$. Lines are fits to Eq. (2). In each case, the thermodynamic limit extrapolated from Eq. (2) (black line) is surrounded by a gray shaded region denoting the standard error with $95\%$ confidence intervals on the fit parameters. Note that these curves are the unscaled versions of those plotted in Fig. 2. The signature of the algorithmic slowdown for d) $d=4$, e) $5$, and f) $6$ is similar to that for in $d=3$ (see Fig. 4). Lines are fits to Eq. (3). $d$ | $\phi_{\mathrm{J0}}$ | $\phi_{\mathrm{on}}$ | $a$ | $b(\infty)$ | $\phi_{\mathrm{G0}}$
---|---|---|---|---|---
3 | 0.6487(7) | 0.5101(10) | 0.42(6) | 0.0193(8) | 0.6468(9)
4 | 0.4564(18) | 0.346(5) | 0.50(5) | 0.016(4) | 0.4525(6)
5 | 0.3083(9) | 0.225(3) | 0.52(7) | 0.009(3) | 0.3015(15)
6 | 0.2008(16) | 0.1416(14) | 0.56(5) | 0.0070(9) | 0.195(3)
Table 1: Numerical values for the fits to Eqs. (2) and (3) in the
thermodynamic limit. Errors represent a $95\%$ confidence interval. Figure 9:
a) The scaling of the crossover width fitting parameter $b$ from Eq. (2) is
consistent with ${b(N)-b(\infty)\sim N^{-1/d}}$. b) The scaling of
$\phi_{\mathrm{G0}}$, the zero density limit of $\phi_{\mathrm{G}}$, from Eq.
(3), is consistent with ${\phi_{\mathrm{G0}}-\phi_{\mathrm{G0}}(N)\sim
N^{-1/d}}$. Curves are offset for visual clarity, and error represent a $95\%$
confidence interval on the fit.

##  Appendix E State following finite-size scaling

In Fig. 3c, differences between replica contact networks are plotted as
${1-(c_{i}\cap c_{j})/(c_{i}\cup c_{j})}$. To show the robustness of the state
following routine, we introduce a second metric to test whether replicas tend
towards the same state. Equation (5) shows that the distance between typical
states scales as $\sigma_{\phi_{\mathrm{J}}}\sim N^{-1/2}$. It is then natural
to consider the difference between jamming densities of typical replicas
separated at $\phi_{\mathrm{break}}$, which we denote
$N^{1/2}\Delta_{\\{i,j\\}}\phi_{\mathrm{J}}$. Figure 10 shows that systems
separated at $\phi_{\mathrm{break}}<\phi_{\mathrm{G}}$ have
$N^{1/2}\Delta_{\\{i,j\\}}\phi_{\mathrm{J}}\sim\sigma_{\phi_{\mathrm{J}}}$,
while systems separated at $\phi_{\mathrm{break}}>\phi_{\mathrm{G}}$ begin to
converge on the same jammed state.

Figure 10: Evolution of the jamming density
difference,$\Delta_{\\{i,j\\}}\phi_{\mathrm{J}}$, between replicas perturbed
at $\phi_{\mathrm{break}}$. Scaling this difference with $N^{-1/2}$ allows a
direct comparison the typical density spread between jammed states obtained
from a same $\phi_{\mathrm{eq}}$ (Fig. 7). Replicas taken at
$\phi_{\mathrm{break}}<\phi_{G}$ (gray zone) have
$\Delta_{\\{i,j\\}}\phi_{\mathrm{J}}$ comparable to
$\sigma_{\phi_{\mathrm{J}}}$, but replicas taken at
$\phi_{\mathrm{break}}>\phi_{G}$ (white zone) converge towards the same
jamming density.

## References

  * Ovshinsky (1968) S. R. Ovshinsky, Phys. Rev. Lett. 21, 1450 (1968).
  * Pine  _et al._ (2005) D. J. Pine, J. P. Gollub, J. F. Brady, and A. M. Leshansky, Nature 438, 997 (2005).
  * Mahadevan and Rica (2005) L. Mahadevan and S. Rica, Science 307, 1740 (2005).
  * Bowden  _et al._ (1998) N. Bowden, S. Brittain, A. G. Evans, J. W. Hutchinson, and G. M. Whitesides, Nature 393, 146 (1998).
  * Paulsen  _et al._ (2014) J. D. Paulsen, N. C. Keim, and S. R. Nagel, Phys. Rev. Lett. 113, 068301 (2014).
  * Reid  _et al._ (2018) D. R. Reid, N. Pashine, J. M. Wozniak, H. M. Jaeger, A. J. Liu, S. R. Nagel, and J. J. de Pablo, Proc. Natl. Acad. Sci. U.S.A. 115, E1384 (2018).
  * Monod  _et al._ (1965) J. Monod, J. Wyman, and J.-P. Changeux, J. Mol. Bio. 12, 88 (1965).
  * Rocks  _et al._ (2017) J. W. Rocks, N. Pashine, I. Bischofberger, C. P. Goodrich, A. J. Liu, and S. R. Nagel, Proc. Natl. Acad. Sci. U.S.A. 114, 2520 (2017).
  * Yan  _et al._ (2017) L. Yan, R. Ravasio, C. Brito, and M. Wyart, Proc. Natl. Acad. Sci. U.S.A. 114, 2526 (2017).
  * Barker  _et al._ (1983) J. A. Barker, D. E. Schreiber, B. G. Huth, and D. H. Everett, P. Roy. Soc. Lond. A Mat. 386, 251 (1983).
  * Sethna  _et al._ (1993) J. P. Sethna, K. Dahmen, S. Kartha, J. A. Krumhansl, B. W. Roberts, and J. D. Shore, Phys. Rev. Lett. 70, 3347 (1993).
  * Stein (1992) D. L. Stein,  _Spin Glasses and Biology_, Series on Directions in Condensed Matter Physics, Vol. 6 (World Scientific, 1992).
  * Choromanska  _et al._ (2015) A. Choromanska, M. Henaff, M. Mathieu, G. B. Arous, and Y. LeCun, in  _Journal of Machine Learning Research_, Vol. 38 (2015) pp. 192–204.
  * Baity-Jesi  _et al._ (2019) M. Baity-Jesi, L. Sagun, M. Geiger, S. Spigler, G. B. Arous, C. Cammarota, Y. LeCun, M. Wyart, and G. Biroli, J. Stat. Mech. 2019, 124013 (2019).
  * Parisi  _et al._ (2020) G. Parisi, P. Urbani, and F. Zamponi,  _Theory of Simple Glasses: Exact Solutions in Infinite Dimensions_ (Cambridge University Press, 2020).
  * Keim  _et al._ (2019) N. C. Keim, J. D. Paulsen, Z. Zeravcic, S. Sastry, and S. R. Nagel, Rev. Mod. Phys. 91, 035002 (2019).
  * Debenedetti and Stillinger (2001) P. Debenedetti and F. Stillinger, Nature 410, 259 (2001).
  * Angell  _et al._ (2000) C. A. Angell, K. L. Ngai, G. B. McKenna, P. F. McMillan, and S. W. Martin, J. Appl. Phys. 88, 3113 (2000).
  * Heuer (2008) A. Heuer, J. Phys.-Condens. Mat. 20, 373101 (2008).
  * Charbonneau  _et al._ (2017) P. Charbonneau, J. Kurchan, G. Parisi, P. Urbani, and F. Zamponi, Annu. Rev. Conden. Ma. P. 8, 265 (2017).
  * Cugliandolo and Kurchan (1993) L. F. Cugliandolo and J. Kurchan, Phys. Rev. Lett. 71, 173 (1993).
  * Sastry  _et al._ (1998) S. Sastry, P. G. Debenedetti, and F. H. Stillinger, Nature 393, 554 (1998).
  * Sastry (2000) S. Sastry, Phys. Chem. Comm. 3, 79 (2000).
  * Sastry (2013) S. Sastry, J. Indian I. Sci. 86, 731 (2013).
  * Kamath  _et al._ (2001) S. Kamath, R. H. Colby, S. K. Kumar, and J. Baschnagel, J. Chem. Phys. 116, 865 (2001).
  * Ozawa  _et al._ (2012) M. Ozawa, T. Kuroiwa, A. Ikeda, and K. Miyazaki, Phys. Rev. Lett. 109, 205701 (2012).
  * Berthier  _et al._ (2016a) L. Berthier, D. Coslovich, A. Ninarello, and M. Ozawa, Phys. Rev. Lett. 116, 238002 (2016a).
  * Jin and Yoshino (2020) Y. Jin and H. Yoshino, arXiv:2003.10814 [cond-mat] (2020).
  * Crisanti and Ritort (2000) A. Crisanti and F. Ritort, Europhys. Lett. 51, 147 (2000).
  * Dasgupta and Valls (2000) C. Dasgupta and O. T. Valls, J. Phys.-Condens. Mat. 12, 6553 (2000).
  * Glotzer  _et al._ (2000) S. C. Glotzer, N. Jan, and P. H. Poole, J. Phys.-Condens. Mat. 12, 6675 (2000).
  * Folena  _et al._ (2020) G. Folena, S. Franz, and F. Ricci-Tersenghi, Phys. Rev. X 10, 031045 (2020), publisher: American Physical Society.
  * Zamponi (2019) F. Zamponi, Journal Club for Condensed Matter Physics (2019), 10.36471/JCCM_June_2019_03.
  * Altieri  _et al._ (2020) A. Altieri, G. Biroli, and C. Cammarota, J. Phys. A-Math. Theor. 53, 375006 (2020).
  * O’Hern  _et al._ (2003) C. S. O’Hern, L. E. Silbert, A. J. Liu, and S. R. Nagel, Phys. Rev. E 68, 011306 (2003).
  * Ashwin  _et al._ (2012) S. S. Ashwin, J. Blawzdziewicz, C. S. O’Hern, and M. D. Shattuck, Phys. Rev. E 85, 061307 (2012).
  * Morse and Corwin (2014) P. K. Morse and E. I. Corwin, Phys. Rev. Lett. 112, 115701 (2014).
  * Lubachevsky and Stillinger (1990) B. D. Lubachevsky and F. H. Stillinger, J. Stat. Phys. 60, 561 (1990).
  * Lerner  _et al._ (2013a) E. Lerner, G. Düring, and M. Wyart, Comput. Phys. Commun. 184, 628 (2013a).
  * Rojas  _et al._ (2019) R. D. H. Rojas, G. Parisi, and F. Ricci-Tersenghi, arXiv:1911.07126 [cond-mat] (2019).
  * Bitzek  _et al._ (2006) E. Bitzek, P. Koskinen, F. Gähler, M. Moseler, and P. Gumbsch, Phys. Rev. Lett. 97, 170201 (2006).
  * Brito and Wyart (2006) C. Brito and M. Wyart, Europhys. Lett. 76, 149 (2006).
  * Altieri  _et al._ (2016) A. Altieri, S. Franz, and G. Parisi, J. Stat. Mech. 2016, 093301 (2016).
  * Arceri and Corwin (2020) F. Arceri and E. I. Corwin, Phys. Rev. Lett. 124, 238002 (2020).
  * Torquato  _et al._ (2000) S. Torquato, T. M. Truskett, and P. G. Debenedetti, Phys. Rev. Lett. 84, 2064 (2000).
  * Charbonneau  _et al._ (2014a) P. Charbonneau, Y. Jin, G. Parisi, and F. Zamponi, Proc. Natl. Acad. Sci. U.S.A. 111, 15025 (2014a).
  * O’Hern  _et al._ (2002) C. S. O’Hern, S. A. Langer, A. J. Liu, and S. R. Nagel, Phys. Rev. Lett. 88, 075507 (2002).
  * Vågberg  _et al._ (2011) D. Vågberg, D. Valdez-Balderas, M. A. Moore, P. Olsson, and S. Teitel, Phys. Rev. E 83, 030303 (2011).
  * Wyart (2005) M. Wyart, Ann. Phys. Fr. 30, 1 (2005).
  * Goodrich  _et al._ (2012) C. P. Goodrich, A. J. Liu, and S. R. Nagel, Phys. Rev. Lett. 109, 095704 (2012).
  * Hexner  _et al._ (2019) D. Hexner, P. Urbani, and F. Zamponi, Phys. Rev. Lett. 123, 068003 (2019).
  * Dugas  _et al._ (2001) C. Dugas, Y. Bengio, F. Bélisle, C. Nadeau, and R. Garcia, in  _Advances in Neural Information Processing Systems 13_ (MIT Press, 2001) pp. 472–478.
  * Mangeat and Zamponi (2016) M. Mangeat and F. Zamponi, Phys. Rev. E 93, 012609 (2016).
  * Berthier  _et al._ (2016b) L. Berthier, P. Charbonneau, Y. Jin, G. Parisi, B. Seoane, and F. Zamponi, Proc. Natl. Acad. Sci. U.S.A. 113, 8397 (2016b).
  * Charbonneau  _et al._ (2019) P. Charbonneau, E. I. Corwin, L. Fu, G. Tsekenis, and M. van der Naald, Phys. Rev. E 99, 020901 (2019).
  * Charbonneau  _et al._ (2014b) P. Charbonneau, J. Kurchan, G. Parisi, P. Urbani, and F. Zamponi, Nat. Commun. 5, 3725 (2014b).
  * Agoritsas  _et al._ (2018) E. Agoritsas, G. Biroli, P. Urbani, and F. Zamponi, J. Phys. A-Math. Theor. 51, 085002 (2018).
  * Agoritsas  _et al._ (2019) E. Agoritsas, T. Maimbourg, and F. Zamponi, J. Phys. A-Math. Theor. 52, 334001 (2019).
  * Berthier  _et al._ (2019) L. Berthier, G. Biroli, P. Charbonneau, E. I. Corwin, S. Franz, and F. Zamponi, J. Chem. Phys. 151, 010901 (2019).
  * Lerner  _et al._ (2013b) E. Lerner, G. Düring, and M. Wyart, Soft Matter 9, 8252 (2013b).
  * Charbonneau  _et al._ (2015) P. Charbonneau, E. I. Corwin, G. Parisi, and F. Zamponi, Phys. Rev. Lett. 114, 125504 (2015).
  * Abbara  _et al._ (2020) A. Abbara, B. Aubin, F. Krzakala, and L. Zdeborová, in  _Proceedings of Machine Learning Research_ , Vol. 107 (2020) pp. 27–54.


# SensePOLAR: Word sense aware interpretability for pre-trained contextual
word embeddings

Jan Engler
RWTH Aachen
<EMAIL_ADDRESS>
&Sandipan Sikdar11footnotemark: 1
L3S Research Center
<EMAIL_ADDRESS>

Marlene Lutz
University of Mannheim
&Markus Strohmaier
University of Mannheim, GESIS, CSH Vienna
{marlene.lutz<EMAIL_ADDRESS>
Equal contribution

###### Abstract

Adding interpretability to word embeddings represents an area of active
research in text representation. Recent work has explored the potential of
embedding words via so-called _polar_ dimensions (e.g. good vs. bad, correct
vs. wrong). Examples of such recent approaches include SemAxis, POLAR,
FrameAxis, and BiImp. Although these approaches provide interpretable
dimensions for words, they have not been designed to deal with polysemy, i.e.
they can not easily distinguish between different senses of words. To address
this limitation, we present SensePOLAR, an extension of the original POLAR
framework that enables word-sense aware interpretability for pre-trained
_contextual_ word embeddings. The resulting _interpretable_ word embeddings
achieve a level of performance that is comparable to original contextual word
embeddings across a variety of natural language processing tasks including the
GLUE and SQuAD benchmarks. Our work removes a fundamental limitation of
existing approaches by offering users sense aware interpretations for
contextual word embeddings.

Figure 1: SensePOLAR overview. Pre-trained contextual word embeddings are
transformed into an interpretable space where the word’s semantics are rated
on scales individually encoded by opposite senses such as
“good”$\leftrightarrow$“bad”. The scores across the dimensions are
representative of the strength of relationship (between word and dimension)
which allows us to rank the dimensions and thereby identify the most
discriminative dimensions for a word. In this example, the word “wave” is used
in two senses: _hand waving_ and _ocean wave_. SensePOLAR not only generates
dimensions that are representative of individual contextual meanings, the
alignment to the respective sense spaces also aligns well with human
judgement. SensePOLAR generates neutral scores for dimensions not related to
the word in the given context (e.g., “idle”$\leftrightarrow$“work”,
“social”$\leftrightarrow$“unsocial”). We follow the WordNet convention to
represent a particular sense of a word. For example, “Tide.v.01” represents
the word “tide” in the sense of _surge (rise or move forward)_.

##  1 Introduction

The overwhelming success of deep neural networks (DNN) in the last decade has
been accompanied by increasing concerns about the lack of interpretability
Ribeiro et al. (2016). This problem is amplified in the area of Natural
Language Processing (NLP) where word embeddings are used as input to machine
learning models instead of more classical, understandable features.
Traditional (static) word embedding models like Word2Vec Mikolov et al. (2013)
or Glove Pennington et al. (2014), that create one embedding for each word,
are currently being replaced by contextual word embedding models like BERT
Devlin et al. (2019) which have achieved competitive performance in NLP
benchmarks such as GLUE Wang et al. (2018) and SQuAD Rajpurkar et al. (2016).

To improve interpretability, recent approaches such as SemAxis An et al.
(2018), POLAR Mathew et al. (2020), FrameAxis Kwak et al. (2021), and BiImp
Şenel et al. (2022) have explored the potential of embedding words via polar
dimensions (e.g. good vs. bad, correct vs. wrong). While these approaches have
been useful for interpreting word vectors, they have not been designed to deal
with polysemy, i.e. multiple senses of words.

Objective: Addressing polysemy, in this paper we aim to enable _word-sense
aware_ interpretability for pre-trained contextual word embeddings.

Approach: We base our approach on the original POLAR framework Mathew et al.
(2020) and the idea of semantic differentials Osgood et al. (1957), which are
psychometric scales between two antonym words, e.g. “right” $\leftrightarrow$
“wrong”. SensePOLAR extends POLAR Mathew et al. (2020) to contextual word
embeddings, and defines polar sense instead of polar word scales. This enables
SensePOLAR to offer polar dimensions that distinguish between the correctness
sense of “right” and the direction sense of “right”, for example.

Results: SensePOLAR enables word sense aware _interpretability_ of contextual
embeddings by selecting polar sense dimensions that align reasonably well with
human judgements, as demonstrated in survey experiments. SensePOLAR exhibits
competitive _performance_ on various NLP tasks where it is used as input
features for a separate model (feature-based approach) as well as directly
integrated in the model itself (fine-tuning approach).

Contributions: SensePOLAR introduces the notion of _sense aware_
interpretations. To the best of our knowledge, SensePOLAR represents the first
(semi-) supervised method that enables word sense aware interpretability for
contextual word embeddings. SensePOLAR is publicly
available111https://github.com/JanEnglerRWTH/SensePOLAR.

##  2 SensePOLAR

The key idea of SensePOLAR is to transform pre-trained word embeddings into an
interpretable, _sense aware_ space. In this space, each dimension represents a
scale on which words are rated, inspired by the semantic differential
technique Osgood et al. (1957). In a departure from the existing approaches,
we define opposite senses for the poles of these scales (e.g. “left direction”
$\leftrightarrow$ “right direction”), as opposed to opposite words (e.g.
“left” $\leftrightarrow$ “right”), as used in Mathew et al. (2020).

Given a contextual word embedding model $\mathcal{M}$, the interpretable
embeddings are obtained through the following steps. 1) We use $\mathcal{M}$
to obtain the (non-interpretable) contextual embedding space. 2) We obtain
polar senses with contextual information from an oracle. 3) We proceed with
generating representative sense embeddings from which we 4) construct the
interpretable polar sense space. 5) The original embedding is transformed into
the polar sense space, which enables interpretation with regard to opposite
sense pairs. We illustrate each step in figure 1 and elaborate them next.

1\. Obtaining contextual embeddings: To obtain the embedding of a particular
word, we forward the word with its context, i.e. an example sentence, to the
embedding model $\mathcal{M}$. The embedding of the corresponding word can
then be retrieved from the output of $\mathcal{M}$. Because most models deploy
subword tokenization algorithms, such as WordPiece Wu et al. (2016),
embeddings of only _subword_ tokens, rather than entire words, are generated
by the contextual embedding models. This provides for obtaining
representations for out-of-vocabulary words but, at the same time, makes
embeddings of even common words not directly available. Following existing
literature McCormick and Ryan (2019); Bommasani et al. (2020), we compute the
embedding of a word by averaging over the embeddings of the constituent
tokens.

2\. Selecting opposite polar senses: Each dimension in the interpretable space
corresponds to a scale spanned by opposite polar senses, which we define as a
_polar sense dimension_. We assume that the poles and corresponding contexts
are provided by an oracle. In this paper, we use WordNet Miller (1995) as an
oracle, since the database already provides senses, contexts and antonyms for
many words. Each sense of a word is represented by a unique identifier, e.g.
“Right.r.0” (a convention followed in WordNet) encodes “right” in the sense of
_direction_. From over 6000 sense-antonym pairs that are available in WordNet,
we use only a subset (1763) that are annotated with example sentences for both
words. After various post-processing steps (cf. Appendix), these example
sentences are used as context in step 3.

3\. Generating polar sense embeddings: We propose to generate polar sense
embeddings for each sense that is chosen by the oracle. Let $w$ denote the
word of interest and $s$ the word-sense. Furthermore, let
$C_{s}=\\{c_{1},...,c_{m}\\}$ be $m$ context examples for the sense $s$, which
we assume are provided by the oracle. In each context $c\in C_{s}$, the word
$w$ is used in the sense $s$, e.g. “A strange sound came from the right side.”
for the word “right” in the sense of direction (i.e., we intend to embed
“Right.r.04”). We create polar sense embeddings in two steps. First, we input
$m$ context examples for a sense $s$ to the embedding model $\mathcal{M}$ and
retrieve an embedding $\mathbf{w}_{c}^{s}\in\mathbb{R}^{d}$ of the word $w$
for each context $c\in C_{s}$. If the word $w$ consists of several subword
tokens, the individual subword embeddings are averaged. We also allow for
senses consisting of multiple words, e.g. “keep track” $\leftrightarrow$ “lose
track”, where we again average the embeddings of the individual tokens.
Second, we compute the average of the contextual word embeddings per sense and
define it as the sense embedding $\mathbf{s}\in\mathbb{R}^{d}$:

$\mathbf{s}=\frac{1}{m}\sum_{j=1}^{m}\mathbf{w}_{c_{j}}^{s}$ (1)

This is a rather straightforward way to represent individual senses of words
in a (semi-) supervised manner. The method is dependent on the quality and the
number of the example sentences provided by the oracle. We observe that more
context examples lead to a better and stable representation, but we usually
achieve a satisfactory representation with already one suitable example
sentence. This is motivated by the observations in Reif et al. (2019) which
provide strong evidence that BERT positions the embeddings of senses in
individual clusters in space and that these clusters are usually sufficiently
spatially separated from each other. A polar sense dimension is represented by
a pair of opposite senses $(s_{-i},s_{i})$ (e.g., “Right.a.02”, “Wrong.a.01”).

4\. Constructing a polar sense space:

Given $n$ polar sense dimensions
${\mathbf{S}=((s_{-1},s_{1}),...,(s_{-n},s_{n}))}$ with their contexts
$\mathbf{C}=((C_{s_{-1}},C_{s_{1}}),(C_{s_{-n}},C_{s_{n}}))$, we compute the
polar sense embedding $\mathbf{s}_{i}$ for each sense $s_{i}$ and
corresponding context $C_{s_{i}}$, following equation 1.

We now utilize the representations of individual senses to construct the
interpretable polar sense space. Each polar sense dimension
$(s_{i},s_{-i})\in\mathbf{S}$ defines an interpretable scale, which is encoded
by the direction vector $\mathbf{a_{i}}$, defined as follows:

$\mathbf{a}_{i}=\mathbf{s}_{-i}-\mathbf{s}_{i}$ (2)

The direction vectors for all polar sense dimensions are then stacked to
obtain the change of basis matrix $\mathbf{a}\in\mathbb{R}^{n\times d}$ for
the interpretable polar sense space.

5\. Transformation to interpretable embeddings: Finally, an embedding of a
word $x$ in a context $c$, $\mathbf{x}_{c}$ can be transformed into the polar
sense space in the following way. Given $\mathbf{a}$ represents the change of
basis matrix, we can compute the polar sense embedding $\mathbf{p}_{c}$
following the rules of linear algebra:

$\displaystyle\mathbf{a}^{T}\;\mathbf{p}_{c}=$ $\displaystyle\;\mathbf{x}_{c}$
(3) $\displaystyle\mathbf{p}_{c}=$
$\displaystyle\;(\mathbf{a}^{T})^{-1}\;\;\mathbf{x}_{c}$ (4)

The inverse of $\mathbf{a}^{T}$ is computed by the Moore-Penrose generalized
inverse Ben-Israel and Greville (2003). The resulting contextual word
embedding $\mathbf{p}_{c}$ in the polar sense space is of dimension $n\times
1$. The absolute value across axis $\mathbf{a_{i}}$ corresponds to the word’s
rating on the scale between the polar senses $(s_{-i},s_{i})$ and the sign
represents the direction of alignment to a particular pole. A higher absolute
value represents a stronger relationship to the corresponding polar sense
dimension. This allows us to obtain the most expressive polar sense dimensions
for a given word and context.

Normalization: As a post-processing step, we average the word embeddings of
all words (from a corpus) to get the average-word embedding in our
interpretable space and subtract this average word embedding from each
embedding when analyzing interpretability. This also allows us to deal with
the _anisotropic_ nature of contextual word embeddings Ethayarajh (2019)
whereby the embeddings are not randomly distributed but rather lay on a high-
dimensional cone in space.

##  3 Evaluation

Note that while SensePOLAR allows for deployment across any contextual word
embedding model, in this work, we consider BERT Devlin et al. (2019) as our
model for illustration. We consider a BERT-base model which utilizes 12
transformer Vaswani et al. (2017) encoder layers and generates embeddings of
size 768. The pre-trained BERT-base model was downloaded from
Huggingface222https://huggingface.co/docs/transformers/model_doc/bert, we used
“bert-base-uncased”. In addition, we use WordNet as our oracle with 1763 polar
sense pairs.

###  3.1 Performance on downstream tasks

The goal of SensePOLAR is to add interpretability to word embeddings without
major losses in performance. Hence, we evaluate SensePOLAR on a wide range of
NLP downstream tasks. We investigate whether replacing the original BERT
embeddings with SensePOLAR embeddings has any effect on performance.

ML Model SVM FFN Task Base SensePOLAR Base SensePOLAR Sport 0.941
0.935${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.6\%}$ 0.961
0.956${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.5\%}$ Religion 0.891
0.848${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow
4.8\%}$ 0.880
0.894${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow
1.6\%}$ Computer 0.770
0.750${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
2.6\%}$ 0.763
0.727${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
4.7\%}$

Table 1:  Performance of the original BERT (Base) embeddings and SensePOLAR
embeddings on feature-based tasks with a support vector machine (SVM) and a
feed-forward neural network (FFN) classifier. SensePOLAR achieves performance
comparable to the original BERT embeddings across all three tasks.

####  3.1.1 Feature-based tasks

We analyze the effectiveness of SensePOLAR embeddings in a “classical” NLP
pipeline, where word embeddings are generated beforehand and are used as
input-features to a separate machine learning model. We consider a binary text
classification task utilizing the 20 Newsgroups dataset Lang (1995). The
dataset consists of $\sim 20K$ news articles covering 20 types of news. Our
experiment follows the structure of Panigrahi et al. (2019), where we only
consider the topics sports, computer and religion. For each topic, an article
must be classified into one of two categories (“baseball” or “hockey” for
sports, “IBM” or “Apple” for computer, “christianity” or “atheism” for
religion). In table 1, we present the results in terms of accuracy across the
three tasks. We use a support vector machine (SVM) and a 2-layer feed-forward
neural network (FFN) as classifier models, which use the BERT and SensePOLAR
embeddings as features. Across all three tasks, SensePOLAR achieves a level of
performance that is comparable to the original embeddings.

####  3.1.2 Fine-tuning tasks

Integrating SensePOLAR into fine-tuned models: The models achieving state-of-
the-art performances on different NLP tasks usually deploy a task specific
network layer (usually a feed-forward network) on top of the embedding layers.
The embedding layers and the task specific layers are then fine-tuned on the
task specific dataset. Consequently, SensePOLAR embeddings need to be computed
considering the fine-tuned version of the embeddings rather than the original
pre-trained version. In this particular setting, we propose to utilize the
embedding layer of the fine-tuned model (instead of the original pre-trained
version) to construct the polar sense space. Given an input text, each token
(including the `[CLS]` token) can then be transformed to a corresponding
SensePOLAR embedding. Because of the dimensionality mismatch between the
original embedding and the transformed SensePOLAR embedding, we replace the
first layer of the task specific feed-forward network and re-fine-tune it on
the task specific dataset. Note that the weights of the underlying embedding
model are frozen during this re-fine-tuning procedure. This is computationally
inexpensive as only the task specific layers need to be trained, which are
often just 1 or 2-layered feed-forward network.

Question answering: This task deals with locating an answer to a question in a
given paragraph and is often referred to as a reading comprehension task. We
consider the SQuAD benchmark, including both SQuAD1.1 Rajpurkar et al. (2016)
and SQuAD2.0 Rajpurkar et al. (2018) versions. The BERT-based QA model
consists of the embedding module followed by a span-classification head, which
is a 1-layer feed-forward network. The model takes both the question text and
the passage text as input. The `[CLS]` token (a special token generated by
BERT for classification tasks) obtained from the embedding module is then
passed onto the span-classification head, which predicts the start and the end
position of the span in the text passage that contains the answer.

SQuAD 1.1 SQuAD 2.0 Metric Base SensePOLAR Base SensePOLAR EM 86.92
86.85${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.07\%}$ 80.88
81.06${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow
0.22\%}$ F1 93.15
93.12${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.03\%}$ 83.87
83.89${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow
0.02\%}$

Table 2: Results of fine-tuned BERT embeddings and with SensePOLAR transformed
embeddings on the SQuAD benchmark. The results are competitive and even
improve marginally after applying SensePOLAR.

The polar sense space is computed using the BERT embedding module already
fine-tuned on the task. The `[CLS]` token is then transformed into the
interpretable space before being passed on to the span-classification head.
This classification head, however, needs to be replaced (to match the
dimension of the transformed embedding) and re-trained. In table 2, we report
the exact match (EM) and F1 scores with the original BERT (base) and the
SensePOLAR model. SensePOLAR again achieves comparable performance, even
marginally outperforming the base model for SQuAD2.0.

(a) Benefits of sense dimensions

(b) Connotative meanings across dimensions

Figure 2: Illustration of polar sense dimensions. (a) SensePOLAR allows for
interpretability along multiple senses. “black”$\leftrightarrow$“white” in the
sense of _ethnicity_ (top) can be differentiated from
“black”$\leftrightarrow$“white” in the sense of _color_ (bottom). Words like
“snow”or “coal” - which are not semantically related to ethnicity - score
neutral on the upper scale while being clearly distinguishable on the lower
scale. (b) The connotative meanings of words can also be investigated through
SensePOLAR. For example, “politician” is associated with “hate” while “mother”
is associated with “love”.

Natural language understanding: We utilize the General Language Understanding
Evaluation (GLUE) benchmark, which is designed for comparing models on the
task of natural language understanding (NLU). It consists of nine tasks that
cover a diverse range of text genres, dataset sizes, and degrees of difficulty
Wang et al. (2018). We point the reader to the original paper by Wang et al.
(2018) for a general overview of the tasks. To evaluate SensePOLAR, we follow
a similar procedure to the previous question answering task. The polar sense
space is computed using the underlying BERT embedding module, already fine-
tuned on the task. This is followed by transforming the `[CLS]` token into the
interpretable polar sense space. The feed-forward layers on top are then
replaced and re-trained.

Task Train size Metric Base SensePOLAR CoLa 8.5k Matthew’s corr. 56.62 55.05
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
2.77\%}$ SST-2 67k Accuracy 91.51 91.40
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.12\%}$ MRPC 3.7k Accuracy 84.31 82.84
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
1.74\%}$ F1 89.00 87.41
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
1.79\%}$ STS-B 7k Person corr. 89.03 84.17
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
5.46\%}$ QQP 364k Accuracy 90.59 90.15
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.49\%}$ F1 87.29 86.82
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.54\%}$ MNLI 393k Accuracy 84.49 84.04
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
0.53\%}$ QNLI 105k Accuracy 91.54 91.58
${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow
0.04\%}$ RTE 2.5k Accuracy 63.18 59.93
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow
5.14\%}$ WNLI 634 Accuracy 56.34 56.34
${\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\uparrow}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\downarrow}0\%$

Table 3: Comparison of the fine-tuned BERT model and the re-fine-tuned BERT
model with SensePOLAR embeddings. Mostly, comparable performance is achieved.
Slightly worse performance is achieved for tasks with smaller training
datasets.

In table 3, we report the results on GLUE tasks with both the original BERT
(Base) and the SensePOLAR embeddings. SensePOLAR achieves competitive
performances across all the tasks.

The results indicate that SensePOLAR is able to achieve interpretability
without compromising performance on downstream tasks.

###  3.2 Interpretability

We turn our attention to evaluating the interpretability of SensePOLAR.

(a) Run

(b) Music

(c) Right

(d) Happy

Figure 3:  Illustration of SensePOLAR embeddings. We show the top 5 dimensions
as selected by SensePOLAR for exemplary words. The pre-trained embeddings are
obtained using BERT. The top dimensions and the word’s rating/alignment to the
pole reasonably align with human judgement (cf. table 4).

Qualitative analysis: We transform the embeddings of the words into a polar
sense space and analyze the position/rating (determined by the signed value on
that dimension) of different words on selected dimensions. More specifically,
we consider a context in which the word is used and pass it through the BERT
module. The embedding corresponding to the target word (note that BERT
generates embeddings corresponding to each word in the context) is then
transformed into the polar sense space through the base change operation.
Analyzing the ratings of words in a selected dimension, allows us to
demonstrate the advantages of interpreting word embeddings in terms of polar
sense dimensions. We first consider the dimension
“Black.a.02”$\leftrightarrow$“White.a.02” (in the sense of _ethnicity_) and
transform the embeddings of celebrities and nationalities on this dimension.
The observations mostly match the ethnicities of the individuals (see figure
2(a)). We also consider words such as milk, coal etc. which are not related to
“Black.a.02”$\leftrightarrow$“White.a.02” in the sense of _ethnicity_ and
observe their corresponding scores in this dimension to be neutral. However,
their representation on the dimension
“Black.a.01”$\leftrightarrow$“White.a.01” (in the sense of _color_), captures
their semantic well. This demonstrates the benefits of using polar senses as
dimensions instead of words, which would have failed to differentiate between
the two senses.

We also consider other dimensions and present the connotative meanings of
words across these dimensions in figure 2(b) which leads to interesting
observations. For example, “politician”, “meeting” are more aligned towards
“Hate.a.01” (in the sense of _disgust_). Similarly, “murder” and “devil” are
aligned towards “Wrong.a.01” (in the sense of _morality_).

In addition to picking out interesting dimensions by hand, we also propose to
evaluate interpretability by investigating the most descriptive dimensions of
a given word. The dimensions for a word are ranked based on the absolute value
across all dimensions. Ideally, the top dimensions should be the most
descriptive and fitting for the word. For illustration, we provide example
words and the corresponding top-5 dimensions in figure 3. The top dimensions
mostly have a high semantic similarity with the word, and they also reasonably
align with human judgement.

Survey experiment: For evaluating interpretability on a larger scale, we
follow the approach by Mathew et al. (2020) and conduct a human judgment
survey. We utilize the crowdsourcing platform
Clickworker333https://www.clickworker.com/ where we randomly select 15 common
English nouns, verbs and adjectives (with short context) and compute their
interpretable embedding with SensePOLAR. Then, for each word, we extract the
top-5 polar sense dimensions (measured in absolute value) and additionally
five random dimensions from the lower 50%. These 10 dimensions are then
presented to the participants in a random order. Participants are asked to
select five dimensions that are most representative of a given word and to
rate each dimension based on their alignment to one of the poles on a likert
scale between 1 and 7 (with 4 as neutral). Each word is assigned 3 annotators.
For a given word, each dimension is assigned a score depending on how many
annotators found it relevant. We then select the top 5 dimensions based on
this score and we consider them as the ground-truth dimension to which we
compare the ones selected by SensePOLAR.

In table 4, we present the conditional probability of the top $k$ dimensions
selected by SensePOLAR to be also chosen by the human annotators. In the same
table, we also report the random chance of getting selected. For the top-1
dimension, agreement is roughly 87% and for the top-2 dimension it is still
around 65%, indicating strong alignment with human judgment. We also found
that the participant’s ratings on these dimensions were the (absolute)
highest, showing that the word is strongly connected to one of the polar
senses.

Top-$k$ | 1 | 2 | 3 | 4 | 5
---|---|---|---|---|---
SensePOLAR | 0.876 | 0.558 | 0.312 | 0.187 | 0.093
Random | 0.5 | 0.22 | 0.083 | 0.023 | 0.004
Table 4: Alignment with human judgement. The conditional probability of the
top-$k$ dimensions selected by SensePOLAR to be also chosen by the human
annotators, together with the random chance of guessing. Significantly higher
probabilities than random chance are achieved, indicating that the chosen
dimensions are meaningful and match human judgment reasonably well.

Differentiating between senses: We also evaluate the interpretability of
SensePOLAR in terms of its ability to differentiate between two senses of a
given word. As an illustrative example, we consider the word “right” in the
sense of both _direction_ and _correctness_ (refer to figure 4). The selected
polar sense dimensions are indeed representative of the correct sense. Note
that the original POLAR framework would not be able to differentiate between
the senses, given it generates exactly one embedding for a given word.

Figure 4: Top-5 dimensions of the word “left” for two different contexts in
the sense of _going away_ (left) and _direction_ (right). The top dimensions
are indeed different for the different word-senses and are reasonably
descriptive of the correct sense.

We follow up with another human judgement experiment where we present the
top-10 polar sense dimensions of words with multiple meanings, together with
the word’s score on these dimensions, to the annotators. The task is to
identify in which sense the target word is being used in. We limit this
experiment to only two common senses for each word and present the WordNet
definitions as the answer possibilities. Thus, by random guessing, an accuracy
of 50% would be achieved. For our hand-picked examples, the correct sense was
identified in around 95% of the examples. The average inter-participant
agreement on the result is around 78%.

The results in this section indicate that SensePOLAR is indeed able to add
interpretability to contextual word embeddings and that it aligns reasonably
well with human judgement.

##  4 Applications

We discuss two potential use cases: (i) analyzing bias in contextual
embeddings and (ii) explaining model decisions on downstream tasks.

###  4.1 Bias Analysis

Contextual embedding models have been shown to capture bias from training data
Nadeem et al. (2021); Ahn and Oh (2021); Bartl et al. (2020); Mozafari et al.
(2020). We demonstrate that SensePOLAR can be used for analyzing biases by
examining the polar sense dimensions which differ the most. For our
evaluation, we utilize examples from the Stereoset dataset from Nadeem et al.
(2021).

Next sentence prediction: BERT can be used to predict the probability of a
second sentence following a first one. Consider the sentence pair “Hispanic
people are very diverse. All people like that are criminals.”. Replacing the
word “Hispanic” by “American” leads to significant decrease in BERT’s
confidence score. We pick the SensePOLAR embeddings of the words “Hispanic”
and “American” from these sentences and compute the polar sense dimensions in
which they differ the most. Noticeably, the most discriminative dimensions
mostly encode senses related to being or not being a legal citizen such as
“Documented.a.01”$\leftrightarrow$“Undocumented.a.01” or
“Irregular.a.01”$\leftrightarrow$“Regular.a.01”. We observe that the word
“Hispanic” is rated on the side of irregular, undocumented, unrighteous and
unconcerned, as opposed to “American”.

Masked LM: We conduct a similar experiment on the task of masked language
modeling. Consider the sentence “Because he is black, he works as a
`[MASK]`.”. Replacing “black” with “white” leads to vastly different
predictions for the `[MASK]` token. We apply SensePOLAR to analyze the polar
sense dimensions of the `[MASK]` token in both contexts. We find that the most
discriminative dimension is “Employed.a.01”$\leftrightarrow$“Unemployed.a.01”,
indicating that BERT predicts a word more related to _unemployed_ when the
word “black” is used.

###  4.2 Explaining classifier results

SensePOLAR can further be deployed to explain decisions of classifier models
that make use of contextual word embeddings. To illustrate this we consider
binary sentiment prediction (positive or negative) on the SST-2 dataset Socher
et al. (2013). We sample and average the SensePOLAR transformed `[CLS]` tokens
from the positive and negative class separately and examine the most
discriminative dimensions. We find the most discriminative dimensions to be
“sharp”$\leftrightarrow$“dull”, “unpleasant”$\leftrightarrow$“pleasant”,
“endemic”$\leftrightarrow$“cosmopolitan”, “soft”$\leftrightarrow$“loud” and
“tasteless”$\leftrightarrow$“tasteful”. BERT is more likely to classify a
review as negative when it is seen as more sharp, unpleasant, endemic, and
tasteless.

##  5 Discussion

Next, we discuss issues pertinent to SensePOLAR.

Generalizability: SensePOLAR is applicable to any pre-trained contextual
embedding model. It can also be deployed on top of any of the constituent
transformer layers. This allows for not only comparing different contextual
word embedding models in terms of interpretability or bias analysis but also
performing similar analysis across transformer layers of the same embedding
model.

Extension to other languages: SensePOLAR should also be extendable to other
languages. The only requirement would be to be able to obtain suitable sense
antonym pairs as well as example contexts via an oracle.

Interpretable decision-making. In section 4.2, we demonstrated how SensePOLAR
could be used to explain decisions of text classifiers. However, the design of
SensePOLAR allows for deployment across any other downstream task as well.
This is in contrast with existing interpretability methods which are often
developed with a particular downstream task in mind.

Quantitative comparison with other interpretability methods: An ideal
evaluation set up would have been to quantitatively compare SensePOLAR to
other interpretability methods. However, as pointed out in the existing
literature Sundararajan et al. (2017); Sikdar et al. (2021), when two models
provide different interpretations, it is difficult to judge if one is better
than the other. Involving humans makes it even harder, as one now needs to
tease out a person’s own subjective biases. Hence, our crowdsourcing
experiments were only designed to understand the efficacy of SensePOLAR.
Nevertheless, we provide a qualitative comparison with the existing methods in
section 6.

SensePOLAR variants: Other variants of SensePOLAR can be devised as well. For
example, linear transformation instead of base change could be used for
obtaining SensePOLAR embeddings. However, we observed that linear
transformation does not preserve the original structure of the embedding
space, where the different senses of words are already sufficiently separated.
One can also experiment with different normalization techniques, such as
scaling or standardization. In this paper, we concentrated on an exhaustive
evaluation setup to include more downstream tasks and crowdsourcing
experiments rather than exploring other variants. We consider all the above
variants promising avenues for future work.

##  6 Related work

In this section, we briefly summarize previous research on enabling
interpretability for both static and contextual word embeddings.

Unsupervised methods: The key idea for this class of methods is to create
sparse embeddings, which is achieved through a post-processing step on top of
the embeddings Murphy et al. (2012); Faruqui et al. (2015); Luo et al. (2015).
Additionally, the idea of creating sparse embeddings can also be integrated
into the word embedding training itself, as demonstrated in Sun et al. (2016);
Chen et al. (2017). The meaning of the dimensions are assigned by the model
itself (hence unsupervised) and are often intelligible to humans. Notably,
Word2Sense Panigrahi et al. (2019) proposes to create sparse non-negative
vectors through Latent Dirichlet Allocation (LDA). Each dimension is assigned
a meaning, which is retrieved from a training corpus. The methods discussed
above are specific to static word embeddings. Berend (2020) extends some of
these ideas to contextual word embeddings.

(Semi-)supervised methods: This class of methods aims at adding
interpretability to word embeddings by first defining an interpretable space
and then transforming the pre-trained embeddings to this space. In this space,
each dimension spans between two pole words. While SemAxis An et al. (2018)
proposes to use antonym pairs retrieved from ConceptNet Speer et al. (2017),
the POLAR framework Mathew et al. (2020) utilizes the semantic differential
technique pioneered by Osgood Osgood et al. (1957). Similarly, BiImp Şenel et
al. (2022) proposes to use opposite semantic concepts as poles. Not only are
the dimensions interpretable, these methods are computationally less
expensive.

Embedding geometry: Part of the existing research has focussed on analyzing
the position of words in the embedding space. Ethayarajh (2019) provides
evidence that the BERT embeddings are not uniformly distributed in the space,
but rather lay on a high dimensional cone. Reif et al. (2019) demonstrate that
BERT is able to separate fine-grained senses of words by placing them in
different locations in space. Similar observations are made by Schmidt and
Hofmann (2020) as well.

Probing: The goal in probing tasks is to determine whether some syntactic or
semantic knowledge is encoded in the produced word embeddings (or attention
heads). The embeddings (or attentions) are fed into a simple linear classifier
to predict unseen linguistic properties. The performance of the classifier is
indicative of the extent to which these linguistic properties are encoded in
the embeddings. For BERT, these probing experiments have demonstrated that the
layers on the top are more contextual Ethayarajh (2019) and the layers at the
center contain a large amount of syntactic information Hewitt and Manning
(2019); Goldberg (2019); Jawahar et al. (2019); Chi et al. (2020). The
semantic information is generally spread across the entire network Tenney et
al. (2019); Zhao et al. (2020); Lin et al. (2019).

Visual explanations: Finally, recent work has also considered visualizing
attention in transformer layers to explain contextual language models Hoover
et al. (2020); Vig (2019). Similarly, visualizing word embeddings can also aid
in explaining what a model learns as demonstrated in Liu et al. (2017);
Heimerl and Gleicher (2018); Boggust et al. (2022) (static) and Sevastjanova
et al. (2021); Berger (2020) (contextual).

Comparison with SensePOLAR: To the best of our knowledge, SensePOLAR is the
first (semi-) supervised method for enabling interpretability for contextual
word embeddings. We extend the idea of rating the meaning of words on a scale
- defined between two polar _words_ \- to two polar senses. SensePOLAR can
also be integrated into task specific fine-tuned models as well. In comparison
to _unsupervised_ methods, our method enables us to understand the individual
dimensions and actively choose and adjust polar sense dimensions for the task
at hand. While _probing_ and _visualization_ methods can reveal whether
specific linguistic information is encoded in the embeddings, analyzing the
_embedding geometry_ can help in uncovering the model characteristics.
However, none of these methods can directly augment interpretability to the
embeddings. Since with SensePOLAR interpretability is directly incorporated
into the embeddings, it is applicable to any downstream task. This is in
contrast to most of the existing methods, which are often specific to
embedding methods or downstream tasks.

##  7 Conclusion

We introduced SensePOLAR which enables word sense aware interpretability for
contextual word embeddings. The key idea is to project word embeddings onto an
interpretable space which is constructed from polar sense pairs obtained from
an oracle. SensePOLAR extends the original POLAR framework developed for
static word embeddings to contextual word embeddings. We demonstrated that the
obtained interpretable embeddings align well with human judgement. Moreover,
SensePOLAR could be integrated into fine-tuned models and can be deployed to
specific applications like bias analysis and explaining prediction results of
classifier models.

##  8 Limitations

Underlying embedding models: SensePOLAR uses embeddings of polar senses to
build an interpretable subspace. Thereby, we assume that the underlying
embedding model captures the semantics of words from which we construct the
sense embeddings. As a result, SensePOLAR is dependent on the quality of the
underlying contextual word embedding model. Compared to the original POLAR
framework proposed in Mathew et al. (2020), the present approach also depends
on the ability of the model to capture individual word-senses with sufficient
accuracy.

Presence of bias: Naturally, our model inherits the biases of the underlying
embedding model. The word “physics”, for example, has a high rating towards
“male” on the polar sense scale of “male” $\leftrightarrow$ “female”. However,
SensePOLAR could be used to make these biases visible and potentially help to
remove them. One can also tap into state-of-the-art bias mitigation methods
(e.g. Ahn and Oh (2021); Bartl et al. (2020); Mozafari et al. (2020)) to
address this issue.

Dependence on oracles: The construction of the polar sense space depends
largely on the choice of polar opposite senses and the quality of the context
examples. Using the example of WordNet, we have shown how a general model can
be created. However, we observed that rare senses and low-quality example
sentences can lead to poor results. Moreover, it is not clear how the optimal
number of polar dimensions can be determined. Empirically, we observed that
adding more pairs does not necessarily lead to improvement in performance. For
a particular downstream task, it may also be appropriate to discard polar
sense pairs that are not relevant to the task (e.g. if they never occur in the
corpus).

Counter-intuitive rating of words. We find that in some cases the rating of
words on the polar sense scales does not coincide with human judgement. The
word “doctor”, for example, is highly skewed towards “guilty” on a scale from
“innocent” $\leftrightarrow$ “guilty”, which does not match the typical
perception of doctors. We believe this is because word embeddings by design
are shaped by their context. There are probably more articles and stories
about “guilty doctors” than “innocent doctors”, because these stories would be
less interesting.

## Acknowledgements

Sandipan Sikdar was supported in part by RWTH Aachen Startup Grant No.
StUpPD384-20.

## References

  * Ahn and Oh (2021) Jaimeen Ahn and Alice Oh. 2021.  Mitigating language-dependent ethnic bias in BERT.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 533–549, Online and Punta Cana, Dominican Republic.
  * An et al. (2018) Jisun An, Haewoon Kwak, and Yong-Yeol Ahn. 2018.  SemAxis: A lightweight framework to characterize domain-specific word semantics beyond sentiment.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 2450–2461, Melbourne, Australia.
  * Bartl et al. (2020) Marion Bartl, Malvina Nissim, and Albert Gatt. 2020.  Unmasking contextual stereotypes: Measuring and mitigating BERT’s gender bias.  In _Proceedings of the Second Workshop on Gender Bias in Natural Language Processing_ , pages 1–16.
  * Ben-Israel and Greville (2003) Adi Ben-Israel and Thomas NE Greville. 2003.  _Generalized inverses: Theory and Applications_ , volume 15.  Springer Science & Business Media.
  * Berend (2020) Gábor Berend. 2020.  Sparsity makes sense: Word sense disambiguation using sparse contextualized word representations.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing_ , pages 8498–8508.
  * Berger (2020) Matthew Berger. 2020.  Visually analyzing contextualized embeddings.  In _2020 IEEE Visualization Conference (VIS)_ , pages 276–280. IEEE.
  * Boggust et al. (2022) Angie Boggust, Brandon Carter, and Arvind Satyanarayan. 2022.  Embedding comparator: Visualizing differences in global structure and local neighborhoods via small multiples.  In _27th International Conference on Intelligent User Interfaces_ , pages 746–766.
  * Bommasani et al. (2020) Rishi Bommasani, Kelly Davis, and Claire Cardie. 2020.  Interpreting Pretrained Contextualized Representations via Reductions to Static Embeddings.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 4758–4781.
  * Chen et al. (2017) Yunchuan Chen, Ge Li, and Zhi Jin. 2017.  Learning sparse overcomplete word vectors without intermediate dense representations.  In _International Conference on Knowledge Science, Engineering and Management_ , pages 3–15. Springer.
  * Chi et al. (2020) Ethan A Chi, John Hewitt, and Christopher D Manning. 2020.  Finding universal grammatical relations in multilingual bert.  _arXiv preprint arXiv:2005.04511_.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  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 4171–4186.
  * Ethayarajh (2019) Kawin Ethayarajh. 2019.  How contextual are contextualized word representations? Comparing the geometry of BERT, ELMo, and GPT-2 embeddings.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing_ , pages 55–65, Hong Kong, China.
  * Faruqui et al. (2015) Manaal Faruqui, Yulia Tsvetkov, Dani Yogatama, Chris Dyer, and Noah A. Smith. 2015\.  Sparse overcomplete word vector representations.  In _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 1491–1500, Beijing, China.
  * Goldberg (2019) Yoav Goldberg. 2019.  Assessing bert’s syntactic abilities.  _arXiv preprint arXiv:1901.05287_.
  * Heimerl and Gleicher (2018) Florian Heimerl and Michael Gleicher. 2018.  Interactive analysis of word vector embeddings.  In _Computer Graphics Forum_ , volume 37, pages 253–265. Wiley Online Library.
  * Hewitt and Manning (2019) John Hewitt and Christopher D. Manning. 2019.  A structural probe for finding syntax in word representations.  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 4129–4138, Minneapolis, Minnesota.
  * Hoover et al. (2020) Benjamin Hoover, Hendrik Strobelt, and Sebastian Gehrmann. 2020.  exbert: A visual analysis tool to explore learned representations in transformer models.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations_ , pages 187–196.
  * Jawahar et al. (2019) Ganesh Jawahar, Benoît Sagot, and Djamé Seddah. 2019.  What does bert learn about the structure of language?  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 3651–3657.
  * Kwak et al. (2021) Haewoon Kwak, Jisun An, Elise Jing, and Yong-Yeol Ahn. 2021.  Frameaxis: characterizing microframe bias and intensity with word embedding.  _PeerJ Computer Science_ , 7:e644.
  * Lang (1995) Ken Lang. 1995.  Newsweeder: Learning to filter netnews.  In _Machine Learning Proceedings 1995_ , pages 331–339. Elsevier.
  * Lin et al. (2019) Yongjie Lin, Yi Chern Tan, and Robert Frank. 2019.  Open sesame: Getting inside BERT’s linguistic knowledge.  In _Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP_ , pages 241–253, Florence, Italy.
  * Liu et al. (2017) Shusen Liu, Peer-Timo Bremer, Jayaraman J Thiagarajan, Vivek Srikumar, Bei Wang, Yarden Livnat, and Valerio Pascucci. 2017.  Visual exploration of semantic relationships in neural word embeddings.  _IEEE transactions on visualization and computer graphics_ , 24(1):553–562.
  * Luo et al. (2015) Hongyin Luo, Zhiyuan Liu, Huanbo Luan, and Maosong Sun. 2015.  Online learning of interpretable word embeddings.  In _Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing_ , pages 1687–1692.
  * Mathew et al. (2020) Binny Mathew, Sandipan Sikdar, Florian Lemmerich, and Markus Strohmaier. 2020.  The polar framework: Polar opposites enable interpretability of pre-trained word embeddings.  In _Proceedings of The Web Conference 2020_ , pages 1548–1558.
  * McCormick and Ryan (2019) Chris McCormick and Nick Ryan. 2019.  BERT word embeddings tutorial.  https://mccormickml.com/2019/05/14/BERT-word-embeddings-tutorial/.
  * Mikolov et al. (2013) Tomas Mikolov, Kai Chen, G.s Corrado, and Jeffrey Dean. 2013.  Efficient estimation of word representations in vector space.  _Proceedings of the 1st International Conference on Learning Representations_ , 2013.
  * Miller (1995) George A Miller. 1995.  Wordnet: a lexical database for english.  _Communications of the ACM_ , 38(11):39–41.
  * Mozafari et al. (2020) Marzieh Mozafari, Reza Farahbakhsh, and Noël Crespi. 2020.  Hate speech detection and racial bias mitigation in social media based on bert model.  _PloS one_ , 15(8):e0237861.
  * Murphy et al. (2012) Brian Murphy, Partha Talukdar, and Tom Mitchell. 2012.  Learning effective and interpretable semantic models using non-negative sparse embedding.  In _Proceedings of COLING 2012_ , pages 1933–1950.
  * 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.
  * Osgood et al. (1957) Charles Egerton Osgood, George J Suci, and Percy H Tannenbaum. 1957.  _The Measurement of Meaning_.  47\. University of Illinois press.
  * Panigrahi et al. (2019) Abhishek Panigrahi, Harsha Vardhan Simhadri, and Chiranjib Bhattacharyya. 2019.  word2sense: sparse interpretable word embeddings.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 5692–5705.
  * Pennington et al. (2014) Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014.  Glove: Global vectors for word representation.  In _Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing_ , pages 1532–1543.
  * Rajpurkar et al. (2018) Pranav Rajpurkar, Robin Jia, and Percy Liang. 2018.  Know what you don’t know: Unanswerable questions for SQuAD.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)_ , pages 784–789, Melbourne, Australia.
  * Rajpurkar et al. (2016) Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016.  Squad: 100 ,000+ questions for machine comprehension of text.  In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_ , pages 2383–2392.
  * Reif et al. (2019) Emily Reif, Ann Yuan, Martin Wattenberg, Fernanda B Viegas, Andy Coenen, Adam Pearce, and Been Kim. 2019.  Visualizing and measuring the geometry of BERT.  _Advances in Neural Information Processing Systems_ , 32.
  * Ribeiro et al. (2016) Marco Ribeiro, Sameer Singh, and Carlos Guestrin. 2016.  “why should I trust you?”: Explaining the predictions of any classifier.  In _Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Demonstrations_ , pages 97–101, San Diego, California. Association for Computational Linguistics.
  * Schmidt and Hofmann (2020) Florian Schmidt and Thomas Hofmann. 2020.  Bert as a teacher: Contextual embeddings for sequence-level reward.  _arXiv preprint arXiv:2003.02738_.
  * Şenel et al. (2022) Lütfi Kerem Şenel, Furkan Şahinuç, Veysel Yücesoy, Hinrich Schütze, Tolga Çukur, and Aykut Koç. 2022.  Learning interpretable word embeddings via bidirectional alignment of dimensions with semantic concepts.  _Information Processing & Management_, 59(3):102925.
  * Sevastjanova et al. (2021) Rita Sevastjanova, Aikaterini-Lida Kalouli, Christin Beck, Hanna Schäfer, and Mennatallah El-Assady. 2021.  Explaining contextualization in language models using visual analytics.  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 464–476.
  * Sikdar et al. (2021) Sandipan Sikdar, Parantapa Bhattacharya, and Kieran Heese. 2021.  Integrated directional gradients: Feature interaction attribution for neural nlp 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 865–878.
  * Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013.  Recursive deep models for semantic compositionality over a sentiment treebank.  In _Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing_ , pages 1631–1642.
  * Speer et al. (2017) Robyn Speer, Joshua Chin, and Catherine Havasi. 2017.  Conceptnet 5.5: An open multilingual graph of general knowledge.  In _Proceedings of the 31st AAAI Conference on Artificial Intelligence_.
  * Sun et al. (2016) Fei Sun, Jiafeng Guo, Yanyan Lan, Jun Xu, and Xueqi Cheng. 2016.  Sparse word embeddings using l1 regularized online learning.  In _Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence_ , pages 2915–2921.
  * Sundararajan et al. (2017) Mukund Sundararajan, Ankur Taly, and Qiqi Yan. 2017.  Axiomatic attribution for deep networks.  In _International Conference on Machine Learning_ , pages 3319–3328. PMLR.
  * Tenney et al. (2019) Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019.  BERT rediscovers the classical NLP pipeline.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 4593–4601.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Advances in Neural Information Processing Systems_ , pages 5998–6008.
  * Vig (2019) Jesse Vig. 2019.  A multiscale visualization of attention in the transformer model.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations_ , pages 37–42.
  * Wang et al. (2018) Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018.  GLUE: A multi-task benchmark and analysis platform for natural language understanding.  In _Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP_ , pages 353–355, Brussels, Belgium. Association for Computational Linguistics.
  * Wu et al. (2016) Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016.  Google’s neural machine translation system: Bridging the gap between human and machine translation.  _arXiv preprint arXiv:1609.08144_.
  * Zhao et al. (2020) Mengjie Zhao, Philipp Dufter, Yadollah Yaghoobzadeh, and Hinrich Schütze. 2020\.  Quantifying the contextualization of word representations with semantic class probing.  _arXiv preprint arXiv:2004.12198_.

##  Appendix A Appendix

###  A.1 Post-processing

We point out some issues when using WordNet directly as our oracle and present
ways to address them.

####  A.1.1 Sense Post-processing

We notice that word-senses identified by WordNet can be overly granular (e.g.
according to WordNet there are five different polar sense pairs for “wet”
$\leftrightarrow$ “dry”). To get rid of redundant senses, we propose to use
dimension-reduction methods such as variance maximization and orthogonality
maximization from the original POLAR framework Mathew et al. (2020).
Alternatively, one could merge similar senses if the cosine similarity between
their sense embeddings is high. Selecting or discarding a rare sense is often
task specific.

####  A.1.2 Low-quality Example Sentences

The polar sense embeddings are dependent on the quality of the context (i.e.,
example sentences demonstrating a particular sense). While deploying WordNet
as source for contexts, we encountered some issues which we elaborate on next.

Flections. When constructing polar sense dimensions, we use the respective
word in its basic form and extract the embedding from the example context.
However, in WordNet’s example sentences, words often do not appear in their
basic form, but in inflections (e.g. “She walks with a slight limp” for
“Walk.v.01”).

Synonyms. Occasionally, the word itself is not present in the context sentence
but is replaced by a synonym (e.g. “the right answer” for “Correct.a.01”).

Misspellings. We observe that the example sentences often contain spelling
mistakes (e.g. “toungued lightning” for “Tongued.a.01”)

Mixed-up examples. In some cases, the example sentences of a sense are
identical to those of the opposite pole (e.g. “we docked at noon” for
“Undock.v.01”).

These problems need to be addressed with manual checks of the obtained polar
sense pairs and context sentences.

###  A.2 Sense Scales

Instead of rating words on scales defined between two pole words (e.g. “left”
$\leftrightarrow$ “right”), our scales are defined between two pole word-
senses (e.g. “left” $\leftrightarrow$ “right” in the sense of direction).
While the static POLAR framework rates the word “correct” highly on the
dimension “left” $\leftrightarrow$ “right”, we expect our framework to rate it
low on the dimension “left” $\leftrightarrow$ “right” in the sense of
direction but rate it high on the dimension “wrong” $\leftrightarrow$ “right”
in the sense of correctness.

To this aim, we analyze whether our constructed representative sense
embeddings encode enough sense-related information. As an illustrative
example, we consider the word “right” which is used in the senses of
direction, correctness and lawfulness. For each context, we compute the
SensePOLAR embeddings for the word and rank the dimensions based on the
absolute value.

Sense-Scales Context he went to the right his argument is right film rights
Direction “left” $\leftrightarrow$ “right” 1st 38th 32nd Correct “wrong”
$\leftrightarrow$ “right” 44th 1st 291st Lawful “wrong” $\leftrightarrow$
“right” 55th 27th 9th

Table 5: Ability of SensePOLAR in differentiating between senses. We consider
the word “right” in three different contexts and obtain a ranking of the
dimensions for each case. We report the rank of a SensePOLAR dimension in each
of the three contexts in each row. For example, the dimension “left”
$\leftrightarrow$ “right” representing the sense of _direction_ is ranked
first for the context “he went to the right”, while it is ranked 38th and 32nd
respectively in the other two contexts. SensePOLAR is indeed able to identify
the correct sense dimensions depending on the context.

In table 5, we report the ranks of the polar sense dimensions for each
context. For the word “right” in the context of direction “he went to the
right”, the dimension “left” $\leftrightarrow$ “right” is selected as the most
representative dimension (rank 1), while the correctness and the lawful
dimensions are ranked much lower (44 and 55 respectively). Similar results are
obtained for the other contexts (see table 5).

These results indicate that the sense-dimensions of SensePOLAR precisely
captures the individual semantics of the senses.

###  A.3 Computational Requirements

SensePOLAR embeddings of words for a given context can be obtained at low cost
if the polar sense space is pre-computed. We provide such an implementation
along with the submission and encourage readers to review it. Our
implementation can even be run on a personal computer.

Given $n$ polar sense dimensions, inversion of the matrix can be computed in
the worst case in $O(n^{3})$. Since in our case $n=1762$, the computation is
very fast. Moreover, this computation needs to be performed only once.

Retraining the task-specific feed-forward layer with SensePOLAR embeddings was
performed on a computing server with 1 TB RAM, 72 cores, each Intel Xeon Gold
6140 CPU at 2.30 GHZ and 2 Tesla P100-PCIE, 16GB GPUs. We would like to
reiterate that the retraining is also quite cheap given only the task-specific
feed-forward layer needs to be trained.