FairRR: Pre-Processing for Group Fairness through Randomized Response

Xianli Zeng* Joshua Ward* Guang Cheng

<EMAIL_ADDRESS>NUS (Chongqing) Research Institute
<EMAIL_ADDRESS>University of California Los Angeles<EMAIL_ADDRESS>University of California Los Angeles

**footnotetext: These authors contributed equally to this work

###### Abstract

The increasing usage of machine learning models in consequential decision-
making processes has spurred research into the fairness of these systems.
While significant work has been done to study group fairness in the in-
processing and post-processing setting, there has been little that
theoretically connects these results to the pre-processing domain. This paper
proposes that achieving group fairness in downstream models can be formulated
as finding the optimal design matrix in which to modify a response variable in
a Randomized Response framework. We show that measures of group fairness can
be directly controlled for with optimal model utility, proposing a pre-
processing algorithm called FairRR 111All code for FairRR with corresponding
experiments can be found at: https://github.com/UCLA-Trustworthy-AI-Lab/FairRR
that yields excellent downstream model utility and fairness.

##  1 INTRODUCTION

As the use of machine learning models becomes increasingly prevalent in
decision-making processes, concerns about the fairness of algorithms have
become more pressing. Case studies from various domains such as criminal
justice, healthcare, and employment (Flores et al. [2016], Corbett-Davies et
al. [2023], Angwin et al. [2016], Tolan et al. [2019]), have demonstrated that
biased algorithms can perpetuate or even amplify discrimination against
individuals and groups. In response, a variety of approaches have been
developed to ensure fairness focusing on the pre-processing of data, the in-
processing of models, or the post-processing of model predictions (Zemel et
al. [2013], Louizos et al. [2016], Calmon et al. [2017], Xu et al. [2019a],
Celis and Keswani [2019], Cotter et al. [2019], Madras et al. [2018], Creager
et al. [2019], Johndrow and Lum [2019], Cho et al. [2020], Zeng et al.
[2024]). This litany of methods extends across many metrics of fairness that
can roughly be broken into two groups: group fairness (Calders et al. [2009],
Dwork et al. [2012], Hardt et al. [2016]) where fairness is defined as
ensuring various types of statistical parity across distinct protected groups,
and individual fairness (Joseph et al. [2016], Lahoti et al. [2019], Ruoss et
al. [2020]) which aims to provide nondiscriminatory predictions for similar
individuals.

In this paper, we focus on common group fairness criteria, including
demographic parity (Calders et al. [2009], Kamishima et al. [2012], Cho et al.
[2020]), equality of opportunity (Hardt et al. [2016], Zhang et al. [2018],
Cho et al. [2020]), and predictive equality (Corbett-Davies et al. [2017])
adding to a larger family of diverse pre-processing methods in the supervised
classification setting. In general, the goal of pre-processing is to modify
the feature space of the original dataset such that when a classifier is
trained on this altered data its output is fair. Strategies for this include
transforming the data (Feldman et al. [2015], Lum and Johndrow [2016], Calmon
et al. [2017], Johndrow and Lum [2019]), fair representation learning (Zemel
et al. [2013], Louizos et al. [2016], Madras et al. [2018], Creager et al.
[2019]) and fair generative models (Xu et al. [2018], Sattigeri et al. [2019],
Xu et al. [2019b], Ramaswamy et al. [2021]). These methods are convenient to
apply, as they do not change the training procedure and are generally
independent to downstream modelling tasks, allowing for the use of most
classifiers. However, they often do not allow for the control of the exact
fairness level, they do not always have full coverage of the variety of group
fairness metrics in use, and they do not take advantage of recent results from
the fair statistical learning literature.

Indeed, with such a variety of potential strategies to deploy in ensuring
algorthims are fair, a robust body of literature has developed to answer the
question of what exactly is the best theoretical classification strategy in
terms of model utility and fairness. In the in-processing domain where
fairness is achieved through the modification of a classifier itself, first
Corbett-Davies et al. [2017] proved that, under several group fairness
metrics, the fair Bayes-optimal classifiers are group-wise thresholding rules
with unspecified thresholds. Menon and Williamson [2018] related demographic
parity and equality of opportunity to cost-sensitive risks and derived fair
Bayes-optimal classifiers under these two fairness measures. Under the setting
of perfect demographic parity and equality of opportunity, exact forms of fair
Bayes-optimal classifiers were derived in Chzhen et al. [2019] and Schreuder
and Chzhen [2021], respectively. Finally, Zeng et al. [2024] and Zeng et al.
[2022] showed that in the general case, fair Bayes-optimal classifiers could
be derived for any level of disparity in most definitions of group fairness
which is an advantage in the applied setting if some level of unfairness is
allowed for better model utility. This paper extends this line of research to
the pre-processing area where our goal is to develop a method that allows for
an explicit level of control of disparity in training data and to extend these
theoretical results to create a unified framework for adjusting for disparity
at every step of machine learning model development.

Thus, we introduce the classic privacy technique Randomized Response (Warner
[1965], Wang et al. [2016]) which privatizes a variable by ’flipping’ its
labels based on some probability. We propose that measures of group fairness
and downstream model utility can be controlled by flipping the response
variable in relation to a sensitive attribute. Here, preserving model utility
can be thought of as minimizing the probability the label is flipped subject
to a fairness constraint that seeks to flip labels to make a training set more
fair. To derive this fairness constraint, we use fair group thresholding
results from recent work on Fair Bayes-Optimal Classification Zeng et al.
[2024, 2022] which allows for fairness to be exactly controlled for. Finally,
we find the solution to these optimal flipping probabilities and perturb the
response variable with the corresponding randomized response mechanism,
finding that downstream models trained on this perturbed variable achieve good
utility at various fairness settings.

Our contributions are thus summarized as follows:

  * •

We show that a response variable can be made to satisfy many measures of group
fairness at any disparity level, proposing a pre-processing method we call
Fair Randomized Response (FairRR).

  * •

We extend previous theoretical results from the in-processing to the pre-
processing group fairness domain.

  * •

We demonstrate that classifiers trained on modified data from FairRR
demonstrate excellent utility and fairness results.

##  2 PRELIMINARIES

###  2.1 Fairness

To introduce fair algorithmic design, we consider credit lending as an
example, where it is essential to ensure lending decisions are fair in order
to comply with legal requirements. This can be formulated as a fair
classification problem, where two types of features are observed for potential
creditors: standard features $X\in\mathcal{X}$ such as income and education,
and protected (or sensitive) features $A\in\mathcal{A}$ such as gender and
race. The objective is to predict the label $Y\in\\{0,1\\}$, if a creditor
were to default on a loan, accurately and fairly with respect to $A$.
Throughout this paper, we set the sensitive feature of $A=1$ and $A=0$
respectively be some privileged and the unprivileged groups. In this way, we
can split the population into four parts: the positive privileged (PP) group
($A=1$, $Y=1$), the positive unprivileged (PN) group ($A=0$, $Y=1$), the
negative privileged (NP) group ($A=1$, $Y=0$), and the negative unprivileged
(NN) group ($A=0$, $Y=0$).

Researchers have proposed multiple group fairness measures for the fair
classification setting. Generally, these measures depend on the constraints
imposed on the joint distribution of $A$, $Y$, and a classifier’s prediction
$\widehat{Y}$. Common fairness measures include:

######  Definition 2.1 (Demographic Parity).

A prediction $\widehat{Y}$ satisfies demographic parity if it achieves the
same acceptance rate among protected groups:
$\mathbb{P}(\widehat{Y}=1|A=1)=\mathbb{P}(\widehat{Y}=1|A=0).$

######  Definition 2.2 (Equality of Opportunity).

A prediction $\widehat{Y}$ satisfies demographic parity if it achieves the
same true positive rate among protected groups:
$\mathbb{P}(\widehat{Y}=1|A=1,Y=1)=\mathbb{P}(\widehat{Y}=1|A=0,Y=1).$

######  Definition 2.3 (Predictive Equality).

A prediction $\widehat{Y}$ satisfies predictive equality if it achieves the
same false positive rate among protected groups:
$\mathbb{P}(\widehat{Y}=1|A=1,Y=0)=\mathbb{P}(\widehat{Y}=1|A=0,Y=0).$

Essentially, these notions of fairness prohibit significant mistreatment of
one group over another. When the equalities holds in the aforementioned
definitions, the fairness constraint enforces identical treatment among
protected groups, referred to as perfect fairness.

In practice however, a relaxed or approximate versions of these notions could
be preferred as perfect fairness may require a large sacrifice of accuracy or
may not be possible. This means that instead of demanding identical treatment,
we require that there should not be a significant difference in the model
decisions between the two groups. Here, the disparity or unfairness of a
classifier can be easily quantified by the difference between the groups.
Specifically, we use DDP, DEO and DPE to measure the degree of violating
demographic parity, equality of opportunity, predictive equality,
respectively:

$\displaystyle\begin{aligned}
\textup{DDP}(f)&=\mathbb{P}(\widehat{Y}=1|A=1)-\\\
&\qquad\qquad\mathbb{P}(\widehat{Y}=1|A=0)\\\
\textup{DEO}(f)&=\mathbb{P}(\widehat{Y}=1|A=1,Y=1)-\\\
&\qquad\qquad\mathbb{P}(\widehat{Y}=1|A=0,Y=1)\end{aligned}$
$\displaystyle\begin{aligned}
\textup{DPE}(f)&=\mathbb{P}(\widehat{Y}=1|A=1,Y=0)-\\\
&\qquad\qquad\mathbb{P}(\widehat{Y}=1|A=0,Y=0)\end{aligned}$ (1)

###  2.2 Fair Bayes Optimal Classifiers under Demographic Parity

In classification problems, the prediction $\widehat{Y}$ is often determined
by a classifier $f$ that indicates the probability of predicting
$\widehat{Y}=1$ when observing $X=x$ and $A=a$. Specifically, a classifier is
a measurable function $f:\mathcal{X}\times\\{0,1\\}\to[0,1]$ and $Y\mid
X\sim\text{Bern}(f(X))$, with $\text{Bern}(p)$ the Bernoulli distribution with
success probability $p$. We denote by $\widehat{Y}_{f}$ the prediction induced
by the classifier $f$ and we call $f$ is fair if its induced prediction
$\widehat{f}$ satisfies the fairness constraints. Among all fair classifiers,
the Bayes optimal classifier serves as a critical theoretical benchmark, as it
establishes the highest achievable accuracy for a given fairness constraint
and serves as the theoretical objective that various algorithms aim to
estimate. Throughout, we will use $\textup{D}(f)$ to denote some level of
disparity from 2.1, depending on the context. We denote by
$\mathcal{F}_{\delta}$ the set of measurable functions satisfying the
_$\delta$ -parity_ constraint

$\mathcal{F}_{\delta}=\\{f\in\mathcal{F}:|\textup{D}(f)|\leq\delta\\}.$

A $\delta$-fair Bayes-optimal classifier is defined as

$f_{\delta}^{\star}\in\underset{f\in\mathcal{F}_{\delta}}{\operatorname*{arg\,min}}\,R(f)\text{
with }\ \ R(f):=\mathbb{P}\left(Y\neq\widehat{Y}_{f}\right).$

Zeng et al. [2024] and Zeng et al. [2022] studied the explicit form of fair
Bayes-optimal classifiers. They found that, for many fairness metrics, the
fair Bayes-optimal classifiers are group-wise thresholding rules with adjusted
thresholds. Specifically, the standard Bayes-optimal classifiers
$f^{*}:\mathcal{X}\times\\{0,1\\}\rightarrow[0,1]$ of the form:
$f^{*}(x,a)=I\left(\eta_{a}(x)>{1}/{2}\right)$ can be modified to satisfy
group fairness measures:

$f_{\delta}^{\star}(x,a)=I\left(\eta_{a}(x)>\frac{1+(2a-1)T_{a}(t^{\star}_{\delta})}{2}\right)$
(2)

Here, $(x,a)\in\mathcal{X}\times\\{0,1\\}$,
$\eta_{a}(x)=\mathbb{P}(Y=1|,A=a,X=x)$. $T_{1}(\cdot):\mathbb{R}\to[-1,1]$ and
$T_{0}(\cdot):\mathbb{R}\to[-1,1]$ are two monotone non-decreasing functions
with $T_{1}(0)=T_{0}(0)=0$ that are decided by the fairness metric and group-
wise probabilities. In particular, with
$p_{ay}=\mathbb{P}(A=a,Y=y),(a,y)\in\\{0,1\\}^{2}$, we have
$T_{a}(t)=t/(p_{a1}+p_{a0})$ for demographic parity,
$T_{a}(t)=t/[2p_{a1}-(2a-1)t]$ for equality of opportunity, and
$T_{a}(t)=t/[2p_{a0}+(2a-1)t]$ for predictive equality.

The parameter $t_{\delta}^{\star}$ is decided by the disparity level $\delta$
where for a given $t$ in a proper range, the classifier
$f_{t}(x,a)=I\left(\eta_{a}(x)>\frac{1+(2a-1)T_{a}(t)}{2}\right)$ is a fair
Bayes-optimal classifier for a certain disparity level $\delta_{t}$. In
particular, the disparity level $D(t)=D(f_{t})$ is a monotone non-increasing
function of $t$. In other words, $t_{\delta}^{\star}$ can be thought of as a
term that balances the fairness-accuracy tradeoff of the fair Bayes-optimal
classifier. Details on estimating $t_{\delta}^{\star}$ can be found in the
next section, but in practice it can also be treated as a hyperparameter to
control for disparity.

###  2.3 Design Matrices in Randomized Response

Randomized Response was first proposed by Warner [1965] to preserve the
privacy of survey respondents’ answers when asked sensitive questions and is a
classic privacy technique. To start, suppose $n$ individuals each have a
response for some sensitive binary attribute $Y$, $y_{i}\in{0,1}$. Each
individual wishes to preserve the privacy of their response and so they send
to an untrusted server a modified version of $y_{i}$ in which the label is
flipped to $\widetilde{y}_{i}$ by some probability. The probabilities in which
$y_{i}$ is flipped are determined by a design matrix which in the binary case
can be written as:

$\textbf{P}=\begin{bmatrix}P(\widetilde{Y}=1|Y=1)&P(\widetilde{Y}=1|Y=0)\\\
P(\widetilde{Y}=0|Y=1)&P(\widetilde{Y}=0|Y=0)\end{bmatrix}$ (3)

To anonymize $Y$ across a second binary variable $A\in\\{0,1\\}$, we can
rewrite 3 to consist of separate design matrices:

$\displaystyle\textbf{P}_{1}=$
$\displaystyle\begin{bmatrix}P(\widetilde{Y}=1|A=1,Y=1)&P(\widetilde{Y}=1|A=1,Y=0)\\\
P(\widetilde{Y}=0|A=1,Y=1)&P(\widetilde{Y}=0|A=1,Y=0)\end{bmatrix}$

and

$\displaystyle\textbf{P}_{0}=$
$\displaystyle\begin{bmatrix}P(\widetilde{Y}=1|A=0,Y=1)&P(\widetilde{Y}=1|A=0,Y=0)\\\
P(\widetilde{Y}=0|A=0,Y=1)&P(\widetilde{Y}=0|A=0,Y=0)\end{bmatrix}$

Since the columns for each matrix must sum to 1, $\textbf{P}_{1}$ and
$\textbf{P}_{0}$ can be expressed as the randomization mechanism
$\mathcal{R}_{(\theta_{11},\theta_{10},\theta_{01},\theta_{00})}$ where
$\theta_{ay}=\mathbb{P}(\widetilde{Y}=y|A=a,Y=y)$:

$\textbf{P}_{1}=\begin{bmatrix}\theta_{11}&1-\theta_{10}\\\
1-\theta_{11}&\theta_{10}\par\end{bmatrix}$

and

$\textbf{P}_{0}=\begin{bmatrix}\theta_{01}&1-\theta_{00}\\\
1-\theta_{01}&\theta_{00}\par\end{bmatrix}$

##  3 METHOD

###  3.1 Overview

We therefore have the preliminaries to begin developing a pre-processing
method to perturb $Y$ to be fair. Here, the goal is to find the randomization
mechanism $\mathcal{R}_{(\theta_{11},\theta_{10},\theta_{01},\theta_{00})}$
that maximizes downstream model utility subject to fairness constraints. The
design matrix for the best randomization mechanism can be easily found before
then being applied to the training dataset. After this application, a final
classifier can then be fit for the original $X$ and now perturbed label
variable $\widetilde{Y}$.

To start, we propose that the best
$\mathcal{R}_{(\theta_{11},\theta_{10},\theta_{01},\theta_{00})}$ from solely
a utility perspective would be the one that does not flip $Y$ at all as it
would not inject any noise into the training dataset. Thus, we wish to
maximize $\mathbb{P}(\widetilde{Y}=Y)$ or:

$\max p_{11}\theta_{11}+p_{10}\theta_{10}+p_{01}\theta_{01}+p_{00}\theta_{00}$

where $\frac{1}{2}\leq\theta_{11},\theta_{10},\theta_{01},\theta_{00}\leq 1$.
We will show that common group definitions of fairness can be written as
linear equality constraints for this function.

###  3.2 Fairness through Randomized Response

####  3.2.1 Randomized Response and the Fair Bayes-Optimal Classifier

To illustrate how fairness can be achieved by randomized response, we first
consider the Bayes-Optimal classifier with no protected attribute.
Specifically, let $\mathcal{R}_{\theta_{1},\theta_{2}}$ denote the
randomization mechanism as follows:
$\widetilde{Y}=\mathcal{R}_{\theta_{1},\theta_{0}}(Y)$ has the property that
$\mathbb{P}(\widetilde{Y}=Y)=\theta_{1}$ for $Y=1$ and $\theta_{0}$ for $Y=0$
for any $(\theta_{1},\theta_{0})\in[1/2,1]\times[1/2,1]$. Note that this
mechanism is im-balanced if $\theta_{1}\neq\theta_{0}.$ Denote by $\eta(x)$
and $\widetilde{\eta}(x)$ the conditional distribution of $Y$ and
$\widetilde{Y}$ given $X=x$, respectively. It can be verified that:

$\widetilde{\eta}(x)=\theta_{1}\eta(x)+(1-\theta_{2})(1-\eta(x)).$

Clearly, $\widetilde{\eta}(x)>1/2$ is equivalent to
$\eta(x)>(\theta_{0}-1/2)/(\theta_{1}+\theta_{0}-1)$. Hence,
$\mathcal{R}_{\theta_{1},\theta_{0}}(Y)$ essentially shifts the thresholds of
the decision rule when $\theta_{1}\neq\theta_{0}$. As we discussed in section
2, the optimal fair classifiers are known to be group-wise thresholding rules
for many fairness-metrics. The aformentioned technical connection enables us
to generate a fair dataset through an im-balanced randomization of response.

######  Theorem 3.1.

Let $(X,A,Y)$ follow a distribution $\mathbb{P}$ on
$\mathcal{X}\times\\{0,1\\}\times\\{0,1\\}$. Consider a group-wise im-balanced
randomized response mechanism
$\widetilde{Y}=\mathcal{R}_{\theta_{11},\theta_{10},\theta_{01},\theta_{00}}(A,Y)$
with, for $a\in\\{0,1\\}$,

$\mathbb{P}(\widetilde{Y}=Y|A=a)=\left\\{\begin{array}[]{ll}\theta_{a1},&\text{
for }Y=1;\\\ 1-\theta_{a0},&\text{ for }Y=0.\\\ \end{array}\right.$ (4)

When the flipping probabilities satisfy:

$\displaystyle(T_{1}(t_{\delta}^{\star})+1)\theta_{11}+(T_{1}(t^{\star}_{\delta})-1)\theta_{10}=T_{1}(t^{\star}_{\delta});$
$\displaystyle(T_{0}(t_{\delta}^{\star})-1)\theta_{01}+(T_{0}(t^{\star}_{\delta})+1)\theta_{00}=T_{0}(t^{\star}_{\delta});$

where $T_{1}(\cdot)$, $T_{0}(\cdot)$ and $t^{\star}$ are the same as in (2).
Denote $\widetilde{\mathbb{P}}$ as the joint distribution of
$(X,A,\widetilde{Y})$. Then, the Bayes optimal classifier learned on
$\widetilde{\mathbb{P}}$ is a $\delta$-fair Bayes-optimal classifier (2)
learned on $\mathbb{P}$.

######  Remark 3.2.

We need to maximize $\theta_{ay}\in[1/2,1]$ to maximize the objective function
(3.1). As a result, we can take, when $t^{\star}_{\delta}>0$,

$\displaystyle{}(\theta_{11},\theta_{10},\theta_{01},\theta_{00})=\left(\frac{1}{1+T_{1}(t^{\star}_{\delta})},1,1,\frac{1}{1+T_{0}(t^{\star}_{\delta})}\right),$
(5)

and, when $t^{\star}_{\delta}<0$,

$\displaystyle{}(\theta_{11},\theta_{10},\theta_{01},\theta_{00})=\left(1,\frac{1}{1-T_{1}(t^{\star}_{\delta})},\frac{1}{1-T_{0}(t^{\star}_{\delta})},1\right),$
(6)

By Theorem 3.1 we can express group fairness definitions such as Demographic
Parity, Equalized Opportunity, and Predictive Equality in terms of the
randomization mechanism which double as equality constraints.

######  Definition 3.3 (Demographic Parity).

A randomization mechanism achieves Demographic Parity if it satisfies:

$\displaystyle(p_{11}+p_{10}+t_{\delta}^{\star})\theta_{11}+(t^{\star}_{\delta}-p_{11}-p_{10})\theta_{10}=t_{\delta}^{\star};$
$\displaystyle(t_{\delta}^{\star}-p_{01}-p_{00})\theta_{01}+(t^{\star}_{\delta}+p_{01}+p_{00})\theta_{00}=t_{\delta}^{\star}.$

######  Definition 3.4 (Equality of Opportunity).

A randomization mechanism achieves Equalized Opportunity if it satisfies:

$\displaystyle
2p_{11}\theta_{11}+2(t^{\star}_{\delta}-p_{11})\theta_{10}=t_{\delta}^{\star};$
$\displaystyle-2p_{01}\theta_{01}+2(t_{\delta}^{\star}+p_{01})\theta_{00}=t_{\delta}^{\star}.$

######  Definition 3.5 (Predictive Equality).

A randomization mechanism achieves Predictive Equality if it satisfies:

$\displaystyle
2(t^{\star}_{\delta}+p_{10})\theta_{11}-2p_{10}\theta_{10}=t_{\delta}^{\star};$
$\displaystyle
2(t^{\star}_{\delta}-p_{00})\theta_{01}+2p_{00}\theta_{00}=t_{\delta}^{\star}.$

Table 1: Benchmarking Results: Original vs FairRR Pre-processed Datasets

Panel A: Original Datasets
---
| Metrics
Datasets | Acc | $f_{1}$ | DDP | DEO | DPE
Adult | 0.841 | 0.620 | 0.188 | 0.184 | 0.086
| (0.003) | (0.007) | (0.006) | (0.026) | (0.005)
COMPAS | 0.676 | 0.632 | 0.283 | 0.313 | 0.186
| (0.015) | (0.016) | (0.031) | (0.052) | (0.035)
Law School | 0.787 | 0.499 | 0.060 | 0.084 | 0.024
| (0.003) | (0.005) | (0.005) | (0.015) | (0.004)

Panel B: Fair Randomized Response
---
| Fairness Criteria
| Demographic Parity | Equality of Opportunity | Predictive Equality
| Metrics | Metrics | Metrics
Datasets | Acc | $f_{1}$ | DDP | Acc | $f_{1}$ | DEO | Acc | $f_{1}$ | DPE
Adult | 0.820 | 0.534 | 0.007 | 0.839 | 0.608 | 0.024 | 0.829 | 0.563 | 0.005
| (0.004) | (0.009) | (0.005) | (0.003) | (0.007) | (0.02) | (0.004) | (0.009) | (0.004)
COMPAS | 0.660 | 0.608 | 0.027 | 0.661 | 0.610 | 0.046 | 0.667 | 0.614 | 0.031
| (0.015) | (0.017) | (0.019) | (0.014) | (0.016) | (0.037) | (0.014) | (0.016) | (0.024)
Law School | 0.785 | 0.486 | 0.006 | 0.785 | 0.489 | 0.015 | 0.786 | 0.493 | 0.004
| (0.003) | (0.005) | (0.004) | (0.003) | (0.005) | (0.011) | (0.003) | (0.005) | (0.004)

####  3.2.2 FairRR: a Randomized Response Mechanism for Fair Classification

In this section, we propose the Randomized Response Mechanism that removes the
discrimination from the training dataset. Based on the aformentioned theory,
we are able to derive the optimal fair flipping probabilities as long as we
estimate $p_{ay},(a,y)\in\\{0,1\\}^{2}$ and $t^{\star}_{\delta}$ from the
training data. $p_{ay}$ can be estimated directly by using its empirical
estimator and $t^{\star}_{\delta}$ can be conveniently estimated using
bisection methods due to its monotonic relationship with the decision
disparity.

Here, we set $t_{min}=\inf_{t}:\\{|T_{a}(t)|\leq 1\text{ for
}a\in\\{0,1\\},\\}$ and $t_{max}=\sup_{t}:\\{|T_{a}(t)|\leq 1\text{ for
}a\in\\{0,1\\},\\}$. In each iteration, we update $t=(t_{max}+t_{min})/2$ and
calculate the flipping probabilities as referenced in (5) and (6). Then,
classifier $\hat{f}_{t}$ is learned from $(X,A,\widetilde{Y})$ with
$\widetilde{Y}=\mathcal{R}_{\theta_{11},\theta_{10},\theta_{01},\theta_{00}}(Y)$.
If the disparity level of $\hat{f}_{t}$ is greater than the pre-specified
disparity level, we set $t_{min}=t_{mid}$ iterate until $t^{\star}_{\delta}$
is found.

Thus, with $p_{ay}$ and $t^{\star}_{\delta}$ estimated, the optimal
$(\theta_{11},\theta_{10},\theta_{01},\theta_{00})$ can be solved for using
(5), (6) and a corresponding group fairness definition, which maximizes 3.1
subject to the constraints of either 3.3, 3.4, or 3.5. With this randomization
mechanism, the values in the privileged group $A=1$ are randomly flipped from
$Y=1$ to $Y=0$ and values in the unprivileged group $A=0$ are randomly flipped
from $Y=0$ to $Y=1$ such that a new perturbed response variable
$\widetilde{Y}$ is created. Any classifier can then be fit to the original
data $X$ with perturbed $\widetilde{Y}$.

The time complexity of this method is dependent on which classifier is chosen
for estimating $t^{\star}_{\delta}$ in the aforementioned bisection method.
Here, a classifier has to be iteratively trained and evaluated to find the
desired $t^{\star}_{\delta}$. In practice, we find that this takes relatively
few iterations. In the case of using logistic regression with the LBFGS solver
for example, the training complexity is O($p\times m$) where $p$ is the number
of parameters and $m$ is the number of memory corrections (Saputro and
Widyaningsih [2017]). The evaluation of each iteration simplifies to
O($n\times p$) where $n$ is the size of the evaluation set. Once
$t^{\star}_{\delta}$ is estimated, the perturbation of $Y$ is an O($N$)
process where $N$ is the sample size of all data to be perturbed. The overall
time complexity is thus dependent on $n$, $m$, $p$, and $N$ as to what the
final complexity reduces to.

Table 2: Benchmarking Results: Pre-processing Methods |  | Methods
---|---|---
Datasets | Metrics | Original | FairRR | TabFairGan | FS | FAWOS
Adult | Acc | 0.841 | 0.820 | 0.804 | 0.836 | 0.786
|  | (0.003) | (0.004) | (0.008) | (0.003) | (0.004)
| DDP | 0.188 | 0.007 | 0.023 | 0.091 | 0.008
|  | (0.006) | (0.005) | (0.024) | (0.008) | (0.006)
COMPAS | Acc | 0.676 | 0.660 | 0.631 | 0.659 | 0.632
|  | (0.015) | (0.015) | (0.034) | (0.014) | (0.015)
| DDP | 0.283 | 0.027 | 0.150 | 0.033 | 0.022
|  | (0.031) | (0.019) | (0.110) | (0.026) | (0.017)
Law School | Acc | 0.787 | 0.785 | 0.774 | 0.784 | 0.782
|  | (0.003) | (0.003) | (0.030) | (0.003) | (0.003)
| DDP | 0.060 | 0.006 | 0.060 | 0.006 | 0.006
|  | (0.005) | (0.004) | (0.153) | (0.004) | (0.004)
Table 3: Direct Control on Pre-specified Disparity Levels ($\delta$) Datasets | Metrics
---|---
Adult | $\delta$ | 0.000 | 0.040 | 0.080 | 0.120 | 0.160
| DDP | 0.007 | 0.040 | 0.081 | 0.121 | 0.161
|  | (0.005) | (0.008) | (0.008) | (0.008) | (0.007)
| Acc | 0.820 | 0.826 | 0.833 | 0.838 | 0.841
|  | (0.004) | (0.004) | (0.003) | (0.003) | (0.003)
COMPAS | $\delta$ | 0.000 | 0.060 | 0.120 | 0.180 | 0.240
| DDP | 0.027 | 0.062 | 0.123 | 0.182 | 0.239
|  | (0.019) | (0.030) | (0.032) | (0.030) | (0.032)
| Acc | 0.660 | 0.665 | 0.669 | 0.674 | 0.676
|  | (0.015) | (0.014) | (0.014) | (0.015) | (0.015)
Law School | $\delta$ | 0.000 | 0.012 | 0.024 | 0.036 | 0.048
| DDP | 0.006 | 0.013 | 0.025 | 0.036 | 0.049
|  | (0.004) | (0.006) | (0.007) | (0.006) | (0.006)
| Acc | 0.785 | 0.785 | 0.786 | 0.786 | 0.786
|  | (0.003) | (0.003) | (0.003) | (0.003) | (0.003)

##  4 EXPERIMENTS

###  4.1 Empirical Data Analysis

Datasets: We test FairRR on three benchmark datasets for fair classification:
Adult Dua and Graff [2017], COMPAS Angwin et al. [2016] and Law School
Wightman [1998].

  * •

Adult: The target variable $Y$ is whether the income of an individual is more
than $50,000. Age, marriage status, education level and other related
variables are included in $X$, and the protected attribute $A$ refers to
gender.

  * •

COMPAS: In the COMPAS dataset, the target is to predict recidivism. Here $Y$
indicates whether or not a criminal will reoffend, while $X$ includes prior
criminal records, age and an indicator of misdemeanor. The protected attribute
$A$ is the race of an individual, “white-vs-non-white”.

  * •

Law School: The task of interest in Law School data set is to predict whether
an applicant gets an admission from a law school based on common features
include LSAT score and undergraduate GPA. The protected attribute $A$ is the
race of the individual: “white-vs-non-white”

Compared algorithms: In addition to FairRR, we also consider several benchmark
methods in our experiments. As FairRR is a pre-processing method, we only
include other pre-processing methods for comparison. Specifically, we consider
the following:

  * •

(1) Fair Sampling

Fair Sampling Kamiran and Calders [2012] is a method based on adjusting the
size of PP, PN, NP and NN groups. Its idea is to apply over/down sampling such
that the label on the training data is independent of the sensitive attribute.
Specifically, size of group PP, PN, NP and NN after sampling are:

$n_{ay}=\frac{(n_{a1}+n_{a0})(n_{1y}+n_{0y})}{n_{11}+n_{10}+n_{01}+n_{00}}$

  * •

(2) FAWOS

FAWOS Salazar et al. [2021] is another sampling method for fairness proposed
recently. Unlike fair sampling that adjust the sizes of all four groups, FAWOS
only applies SMOTE (Chawla et al. [2002], a popular oversampling method for
unbalanced classification problem) to over-sample the points in the NN group
where the number of points generated is:

$N=\alpha\times\left(\frac{n_{11}n_{00}}{n_{10}}-n_{01}\right)$

  * •

(3) TabFairGAN

TabFairGAN Rajabi and Garibay [2021] is a fair synthetic generation method
based on the framework of generative adversarial network which adds a fairness
penalty term to the generator loss of a standard WGAN model. Specifically, the
fairness penalty is equal to the demographic parity of the generated data
squared.

Experimental Setting: The goal of fair classification is to learn a classifier
with the highest model utility, subject to some fairness constraint. Thus to
test and benchmark FairRR we first apply each aforementioned fair pre-
processing algorithm to each training dataset. A logistic regression
classifier is then learned on the returned de-biased training dataset where it
is then evaluated based on the average accuracy, $f_{1}$ score and disparity
levels over 100 random 80:20 train/test splits. All model hyperparameters are
left as the scikit-learn defaults for reproduciblity. The standard deviations
of these metrics are also reported. All training and evaluations were
processed using an Apple M1 CPU.

###  4.2 Results

We first evaluate the performance of FairRR controlling for either Demographic
Parity, Equalized Opportunity, or Predictive Equality. We present the
simulation results in Table 1. We observe that FairRR significantly controls
for disparity across each fairness metric while seeing minimal decreases of
model utility measured by accuracy and $f_{1}$ score. We then benchmark FairRR
with other existing pre-processing methods. Here, only demographic parity is
considered as it is the only common fairness metric supported across all pre-
processing methods. We present these benchmarking results in Table 2.

Finally, we showcase the ability of FairRR to control for specific levels of
disparity. In Table 3, FairRR was set to control for disparity at the
quintiles between perfect demographic parity and the DDP level of the original
dataset. The corresponding average DDP values in the final logistic regression
and corresponding accuracies with standard deviations over 100 random seeds
are reported. Figure 1 plots this experiment to highlight the accuracy/
disparity trade-off, comparing FairRR to FAWOS at these quintiles of
controlled-for disparity. Figure 2 showcases the Pareto Curves of FairRR, Fair
Sampling, FAWOS, and FairTabGAN when an SVM is trained on pre-processed data
from the Adult Dataset.

##  5 DISCUSSION

Overall, FairRR achieves favorable or comparable-to-the-leader accuracy and
disparity scores across the three benchmarking datasets. FairRR effectively
maintains model utility while enforcing small amounts of disparity, regardless
of the chosen group fairness definitions. One surprising result was the
stability of the algorithm. One potential downside to FairRR could be with it
randomly flipping labels the effectiveness could vary widely depending on the
random seed. With low standard deviations across evaluation metrics though,
FairRR proves to be also be robust. One interesting finding is that FairRR,
Fair Sampling (FS), and FAWOS generally performed better than TabFairGan. We
suspect this is because TabFairGan learns both $X$ and $y$, which has
advantages for applications such as privacy, but likely makes it weaker for
pure fair classification tasks where FairRR and the over/under sampling
strategies in FS and FAWOS perturb the feature space less.

FairRR also favorably controls for exact levels of disparity, an added benefit
in applications where perfect group fairness is impractical or not needed.
Table 3 shows empirically that disparity can be set to a level a-priori to
model training and the downstream model will have that final level of
disparity. Similarly, the trade-off between accuracy and disparity is better
than competing methods that have this feature. With FAWOS conveniently
allowing for the control of disparity we compare it with FairRR in Figure 1,
showing that FairRR has a preferable utility curve to FAWOS in that at nearly
all levels of disparity, the model trained with FairRR-processed data has
better accuracy. This is further shown in Figure 2 which evaluates all
competing methods on the Adult dataset with Support Vector Machines. Here,
FairRR dominated the Pareto Frontier, noting that Fair Sampling does not allow
for disparity control.

Another component investigated was the corresponding privacy offered by
FairRR. As Randomized Response was first introduced as a privacy method, a
natural extension of FairRR is to investigate the relationship between its
utility/ fairness trade-off and the additional privacy it provides. This
proves to be technically challenging. While Randomized Response is shown to
satisfy ($\epsilon,\delta$)- Label Differential Privacy (Wang et al. [2016],
Shirong et al. [2023]), the added fairness component of FairRR complicates a
typical privacy analysis as it makes the privacy mechanism no longer
independent of the data it is privatising. This is highlighted in the
estimation of $t_{\delta}^{\star}$ where the design matrix is explicitly
calculated based off of the disparity level in the original dataset. While
$\widetilde{Y}$ is more private than $Y$, it remains unsolved how to quantify
exactly how much more private it is in the context of some privacy budget.
However, in application an advantage of pre-processing is that other pre-
processing techniques can also be applied to the training data and in the
context of privacy, FairRR is well-suited to be used in conjunction with other
privacy mechanisms such as Laplacian and Exponential Noise (Jain et al.
[2018]).

##  6 CONCLUSION

FairRR can be an excellent choice achieving group fairness in that it is a
downstream model agnostic, efficient, and theory motivated algorithm that
supports most group fairness definitions. In benchmarking, it performs
comparably or better than other choices for pre-processing algorithms and
additionally connects previous fair statistical learning theory to the pre-
processing domain.

There are a variety of future research opportunities with FairRR. For
starters, this paper only addresses the single binary sensitive attribute,
single binary outcome problem formulation of fair classification. We believe
that FairRR could be generalized to work in settings where multiple sensitive
attributes are needed. Another interesting line of work is studying FairRR in
the context of privacy, what Randomized Response was initially designed for.
While this is technically challenging, we believe that extensions on FairRR
could help shed light into the theoretical trade-offs between fairness and
privacy. Lastly, we suspect there are a variety of additional mechanisms
outside of randomized response to further apply the idea of pre-processing or
post-processing data based on the Fair Optimal Bayes thresholding to achieve
group fairness.

Figure 1: Logistic Regression Accuracy/ Disparity Trade-offs: FairRR and FAWOS
comparison across datasets. Figure 2: Accuracy/ Disparity Pareto Curves of
various pre-processing algorithms on the Adult dataset evaluated with Support
Vector Machines.

#### Acknowledgements

We thank the anonymous reviewers for their helpful comments and suggestions.
This work was partially supported by the JP Morgan Chase Faculty Research
Award, NSF – CNS (2247795), and the Office of Naval Research (ONR
N00014-22-1-2680). This work is also partially supported by the National
Natural Science Foundation of China, No. 72033002.

## References

  * Angwin et al. [2016] J. Angwin, J. Larson, S. Mattu, and L. Kirchner.  Machine Bias. There’s software used across the country to predict future criminals. And it’s biased against blacks.  ProPublica, May 2016.
  * Calders et al. [2009] T. Calders, F. Kamiran, and M. Pechenizkiy.  Building classifiers with independency constraints.  In _2009 IEEE International Conference on Data Mining Workshops_ , pages 13–18, 2009.
  * Calmon et al. [2017] F. Calmon, D. Wei, B. Vinzamuri, K. Natesan Ramamurthy, and K. R. Varshney.  Optimized pre-processing for discrimination prevention.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2017.
  * Celis and Keswani [2019] L. E. Celis and V. Keswani.  Improved adversarial learning for fair classification.  _arXiv preprint arXiv:1901.10443_ , 2019.
  * Chawla et al. [2002] N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer.  SMOTE: synthetic minority over-sampling technique.  _Journal of Artificial Intelligence Research_ , 16(1):321–357, 2002.
  * Cho et al. [2020] J. Cho, G. Hwang, and C. Suh.  A fair classifier using kernel density estimation.  In _Advances in Neural Information Processing Systems_ , pages 15088–15099. Curran Associates, Inc., 2020.
  * Chzhen et al. [2019] E. Chzhen, C. Denis, M. Hebiri, L. Oneto, and M. Pontil.  Leveraging labeled and unlabeled data for consistent fair binary classification.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2019.
  * Corbett-Davies et al. [2017] S. Corbett-Davies, E. Pierson, A. Feller, S. Goel, and A. Huq.  Algorithmic decision making and the cost of fairness.  In _Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , page 797–806. Association for Computing Machinery, 2017.
  * Corbett-Davies et al. [2023] S. Corbett-Davies, J. D. Gaebler, H. Nilforoshan, R. Shroff, and S. Goel.  The measure and mismeasure of fairness.  _Journal of Machine Learning Research_ , 24(312):1–117, 2023.
  * Cotter et al. [2019] A. Cotter, H. Jiang, M. Gupta, S. Wang, T. Narayan, S. You, and K. Sridharan.  Optimization with non-differentiable constraints with applications to fairness, recall, churn, and other goals.  _Journal of Machine Learning Research_ , 20(172):1–59, 2019.
  * Creager et al. [2019] E. Creager, D. Madras, J.-H. Jacobsen, M. Weis, K. Swersky, T. Pitassi, and R. Zemel.  Flexibly fair representation learning by disentanglement.  In _Proceedings of the 36th International Conference on Machine Learning_ , pages 1436–1445. PMLR, 2019.
  * Dua and Graff [2017] D. Dua and C. Graff.  UCI machine learning repository, 2017.  URL http://archive.ics.uci.edu/ml.
  * Dwork et al. [2012] C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel.  Fairness through awareness.  In _Proceedings of the 3rd Innovations in Theoretical Computer Science Conference_ , pages 214–226. Association for Computing Machinery, 2012.
  * Feldman et al. [2015] M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian.  Certifying and removing disparate impact.  In _Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , pages 259–268. Association for Computing Machinery, 2015.
  * Flores et al. [2016] A. W. Flores, K. Bechtel, and C. T. Lowenkamp.  False positives, false negatives, and false analyses: A rejoinder to Machine Bias: “There’s software used across the country to predict future criminals. And it’s biased against blacks”.  _Federal Probation_ , 80(2):38–46, 2016.
  * Hardt et al. [2016] M. Hardt, E. Price, E. Price, and N. Srebro.  Equality of opportunity in supervised learning.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2016.
  * Jain et al. [2018] P. Jain, M. Gyanchandani, and N. Khare.  Differential privacy: its technological prescriptive using big data.  _Journal of Big Data_ , 5(15), 2018.
  * Johndrow and Lum [2019] J. E. Johndrow and K. Lum.  An algorithm for removing sensitive information: application to race-independent recidivism prediction.  _The Annals of Applied Statistics_ , 13(1):189–220, 2019.
  * Joseph et al. [2016] M. Joseph, M. Kearns, J. H. Morgenstern, and A. Roth.  Fairness in learning: Classic and contextual bandits.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2016.
  * Kamiran and Calders [2012] F. Kamiran and T. Calders.  Data preprocessing techniques for classification without discrimination.  _Knowledge and Information Systems_ , 33:1–33, 2012.
  * Kamishima et al. [2012] T. Kamishima, S. Akaho, H. Asoh, and J. Sakuma.  Fairness-aware classifier with prejudice remover regularizer.  In _Machine Learning and Knowledge Discovery in Databases_ , pages 35–50. Springer Berlin, Heidelberg, 2012.
  * Lahoti et al. [2019] P. Lahoti, K. P. Gummadi, and G. Weikum.  iFair: Learning individually fair data representations for algorithmic decision making.  In _2019 IEEE 35th International Conference on Data Engineering (ICDE)_ , pages 1334–1345. IEEE, 2019.
  * Louizos et al. [2016] C. Louizos, K. Swersky, Y. Li, M. Welling, and R. S. Zemel.  The variational fair autoencoder.  In _4th International Conference on Learning Representations (ICLR)_ , 2016.
  * Lum and Johndrow [2016] K. Lum and J. Johndrow.  A statistical framework for fair predictive algorithms.  _arXiv preprint arXiv:1610.08077_ , 2016.
  * Madras et al. [2018] D. Madras, E. Creager, T. Pitassi, and R. Zemel.  Learning adversarially fair and transferable representations.  In _Proceedings of the 35th International Conference on Machine Learning_ , pages 3384–3393. PMLR, 2018.
  * Menon and Williamson [2018] A. K. Menon and R. C. Williamson.  The cost of fairness in binary classification.  In _Proceedings of the 1st Conference on Fairness, Accountability and Transparency_ , pages 107–118. PMLR, 2018.
  * Rajabi and Garibay [2021] A. Rajabi and O. O. Garibay.  TabFairGAN: Fair tabular data generation with generative adversarial networks.  _arXiv preprint arXiv:2109.00666_ , 2021.
  * Ramaswamy et al. [2021] V. V. Ramaswamy, S. S. Y. Kim, and O. Russakovsky.  Fair attribute classification through latent space de-biasing.  In _IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2021.
  * Ruoss et al. [2020] A. Ruoss, M. Balunovic, M. Fischer, and M. Vechev.  Learning certified individually fair representations.  In _Advances in Neural Information Processing Systems_ , pages 7584–7596. Curran Associates, Inc., 2020.
  * Salazar et al. [2021] T. Salazar, M. S. Santos, H. Araújo, and P. H. Abreu.  FAWOS: Fairness-aware oversampling algorithm based on distributions of sensitive attributes.  _IEEE Access_ , 9:81370–81379, 2021.
  * Saputro and Widyaningsih [2017] D. R. S. Saputro and P. Widyaningsih.  Limited memory broyden-fletcher-goldfarb-shanno (l-bfgs) method for the parameter estimation on geographically weighted ordinal logistic regression model (gwolr).  _AIP Conference Proceedings_ , 1868(1):040009, 2017.
  * Sattigeri et al. [2019] P. Sattigeri, S. C. Hoffman, V. Chenthamarakshan, and K. R. Varshney.  Fairness GAN: Generating datasets with fairness properties using a generative adversarial network.  _IBM Journal of Research and Development_ , 63(4/5):3:1–3:9, 2019.
  * Schreuder and Chzhen [2021] N. Schreuder and E. Chzhen.  Classification with abstention but without disparities.  In _Proceedings of the Thirty-Seventh Conference on Uncertainty in Artificial Intelligence_ , pages 1227–1236. PMLR, 2021.
  * Shirong et al. [2023] X. Shirong, C. Wang, W. W. Sun, and G. Cheng.  Binary classification under local label differential privacy using randomized response mechanisms.  _Transactions on Machine Learning Research_ , 2023.
  * Tolan et al. [2019] S. Tolan, M. Miron, E. Gómez, and C. Castillo.  Why machine learning may lead to unfairness: Evidence from risk assessment for juvenile justice in catalonia.  In _Proceedings of the Seventeenth International Conference on Artificial Intelligence and Law_ , pages 83–92. Association for Computing Machinery, 2019.
  * Wang et al. [2016] Y. Wang, X. Wu, and D. Hu.  Using randomized response for differential privacy preserving data collection.  In _EDBT/ICDT Workshops_ , 2016.
  * Warner [1965] S. L. Warner.  Randomized response: A survey technique for eliminating evasive answer bias.  _Journal of the American Statistical Association_ , 60(309):63–69, 1965.
  * Wightman [1998] L. F. Wightman.  Lsac national longitudinal bar passage study. lsac research report series, 1998.  URL https://archive.lawschooltransparency.com/reform/projects/investigations/2015/documents/NLBPS.pdf.
  * Xu et al. [2018] D. Xu, S. Yuan, L. Zhang, and X. Wu.  FairGAN: Fairness-aware generative adversarial networks.  In _2018 IEEE International Conference on Big Data (Big Data)_ , pages 570–575. IEEE, 2018.
  * Xu et al. [2019a] D. Xu, Y. Wu, S. Yuan, L. Zhang, and X. Wu.  Achieving causal fairness through generative adversarial networks.  In _Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19_ , pages 1452–1458. International Joint Conferences on Artificial Intelligence Organization, 2019a.
  * Xu et al. [2019b] D. Xu, S. Yuan, L. Zhang, and X. Wu.  FairGAN+: Achieving fair data generation and classification through generative adversarial nets.  In _2019 IEEE International Conference on Big Data (Big Data)_ , pages 1401–1406, 2019b.
  * Zemel et al. [2013] R. Zemel, Y. Wu, K. Swersky, T. Pitassi, and C. Dwork.  Learning fair representations.  In _Proceedings of the 30th International Conference on Machine Learning_ , pages 325–333. PMLR, 2013.
  * Zeng et al. [2022] X. Zeng, E. Dobriban, and G. Cheng.  Fair Bayes-optimal classifiers under predictive parity.  In _Advances in Neural Information Processing Systems_ , pages 27692–27705. Curran Associates, Inc., 2022.
  * Zeng et al. [2024] X. Zeng, G. Cheng, and E. Dobriban.  Bayes-optimal fair classification with linear disparity constraints via pre-, in-, and post-processing.  _arXiv preprint arXiv:2402.02817_ , 2024.
  * Zhang et al. [2018] B. H. Zhang, B. Lemoine, and M. Mitchell.  Mitigating unwanted biases with adversarial learning.  In _Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society_ , pages 335–340. Association for Computing Machinery, 2018.


Low dimensional cohomology of Hom-Lie algebras

and $q$-deformed $W(2,2)$ algebra111Corresponding author:
<EMAIL_ADDRESS>
Lamei Yuan${}^{\,{\ddagger}}$, Hong You${}^{\,{\ddagger}\,{\dagger}}$

‡Academy of Fundamental and Interdisciplinary Sciences,

Harbin Institute of Technology, Harbin 150080, China

†Department of Mathematics, Suzhou University, Suzhou 200092, China

E-mail<EMAIL_ADDRESS><EMAIL_ADDRESS>
Abstract. This paper aims to study the low dimensional cohomology of Hom-Lie
algebras and $q$-deformed $W(2,2)$ algebra. We show that the $q$-deformed
$W(2,2)$ algebra is a Hom-Lie algebra. Also, we establish a one-to-one
correspondence between the equivalence classes of one dimensional central
extensions of a Hom-Lie algebra and its second cohomology group, leading us to
determine the second cohomology group of the $q$-deformed $W(2,2)$ algebra. In
addition, we generalize some results of derivations of finitely generated Lie
algebras with values in graded modules to Hom-Lie algebras. As application we
compute all $\alpha^{k}$-derivations and in particular the first cohomology
group of the $q$-deformed $W(2,2)$ algebra.

Key words: Hom-Lie algebras, $q$-deformed $W(2,2)$ algebra, derivation, second
cohomology group, first cohomology group.

Mathematics Subject Classification (2000): 17A30, 17A60, 17B68, 17B70.

1\. Introduction

The notion of Hom-Lie algebras was initially introduced in [3] motivated by
examples of deformed Lie algebras coming from twisted discretizations of
vector fields. In this paper we will follow the slightly more general
definition of Hom-Lie algebras given by Makhlouf and Silvestrov in [6].
Precisely, a Hom-Lie algebra is a triple $({\cal L},[\cdot,\cdot],\alpha)$
consisting of a vector space ${\cal L}$, a bilinear map $[\cdot,\cdot]:{\cal
L}\times{\cal L}\rightarrow{\cal L}$ and a linear map $\alpha:{\cal
L}\rightarrow{\cal L}$ such that

$\displaystyle[x,y]$ $\displaystyle=$ $\displaystyle-[y,x],\ \ (\mbox{skew-
symmetry})$ $\displaystyle\circlearrowleft_{x,y,z}[[x,y],\alpha(z)]$
$\displaystyle=$ $\displaystyle 0,\ \ \ (\mbox{Hom-Jacobi identity})$

for all $x,y,z\in{\cal L}$, and where the symble $\circlearrowleft_{x,y,z}$
denotes summation over the cyclic permutation on $x,y,z.$ One sees that the
classical Lie algebras recover from Hom-Lie algebras if the twisting map
$\alpha$ is the identity map. The Hom-Lie algebras were discussed intensively
in [7, 8, 9, 10] while the graded cases were considered in [1, 5, 11]. But the
cohomology with values in graded Hom-modules is not very clear. Therefore, one
of the aims of the present paper is to fill this gap.

The $W(2,2)$ Lie algebra was introduced in [13] for the study of
classification of vertex operator algebras generated by vectors of weight $2$.
It is an extension of the Virasoro algebra. In the following we denote by
$\mathcal{W}$ the centerless $W(2,2)$ Lie algebra, which is an infinite
dimensional Lie algebra generated by $L_{n}$ and $M_{n}$ ($n\in\mathbb{Z}$)
satisfying the following Lie brackets

$\displaystyle\ \ \ [L_{m},L_{n}]=(n-m)L_{m+n},\
{[L_{m},M_{n}]}=(n-m)M_{m+n},\ {[M_{m},M_{n}]}=0,\ \mbox{for}\
m,n\in\mathbb{Z}.$

In [12] we presented a realization of the centerless $W(2,2)$ Lie algebra
$\mathcal{W}$ by using bosonic and fermionic oscillators. The bosonic
oscillator $a$ and its hermitian conjugate $a^{+}$ obey the commutation
relations:

$\displaystyle[a,a^{+}]=aa^{+}-a^{+}a=1,\ \ \ [1,a^{+}]=[1,a]=0.$ (1.1)

It follows by induction on $n$ that

$[a,(a^{+})^{n}]=n(a^{+})^{n-1},\ \mbox{for all}\ n\in\mathbb{Z}.$

The fermionic oscillators $b$ and $b^{+}$ satisfy the anticommutators

$\displaystyle\\{b,b^{+}\\}=bb^{+}+b^{+}b=1,\ \ \ b^{2}=(b^{+})^{2}=0.$ (1.2)

Moreover, we set $[a,b]=[a,b^{+}]=[a^{+},b]=[a^{+},b^{+}]=0.$

###### Lemma 1.1

([12]) With notations above. The generators of the form

$\displaystyle\ \ \ \ \ \ \ \ L_{n}\equiv(a^{+})^{n+1}a,\ \ \
M_{n}\equiv(a^{+})^{n+1}b^{+}a,\ \ \mbox{for all}\ n\in\mathbb{Z},$ (1.3)

realize the centerless $W(2,2)$ Lie algebra $\mathcal{W}$ under the commutator

$[A,B]=AB-BA,\ \ \mbox{ for all}\ A,B\in\mathcal{W}.$

Now fix a nonzero $q\in\mathbb{C}$ such that $q$ is not a root of unity. We
introduce the following notation

$\displaystyle[A,B]_{(\alpha,\beta)}=\alpha AB-\beta BA,$

and the $q$-number

$\displaystyle[n]_{q}=\frac{q^{n}-q^{-n}}{q-q^{-1}}.$

It is clear to see that $[-n]_{q}=-[n]_{q}.$ Furthermore, one can deduce that

$\displaystyle q^{n}[m]_{q}-q^{m}[n]_{q}=[m-n]_{q},\ \ \
q^{-n}[m]_{q}+q^{m}[n]_{q}=[m+n]_{q}.$ (1.4)

Then the generators $L_{n}$ and $M_{n}$ ($n\in\mathbb{Z}$) satisfy the
following $q$-brackets:

$\displaystyle[L_{n},L_{m}]_{(q^{n-m},\,q^{m-n})}$ $\displaystyle=$
$\displaystyle[m-n]_{q}L_{m+n},$
$\displaystyle{[L_{n},M_{m}]_{(q^{n-m},\,q^{m-n})}}$ $\displaystyle=$
$\displaystyle[m-n]_{q}M_{m+n},$
$\displaystyle{[M_{n},M_{m}]_{(q^{n-m},q^{m-n})}}$ $\displaystyle=$
$\displaystyle 0,$

for all $m,n\in\mathbb{Z}$. We call this algebra the $q$-deformed $W(2,2)$
algebra, which is the second object considered in this paper. In the following
we will denote $q$-deformed $W(2,2)$ algebra by $\mathcal{W}_{q}$ and simply
write the $q$-bracket as $[\cdot,\cdot]_{q}$. In [12] we determined quantum
groups and one dimensional central extensions of $\mathcal{W}_{q}$. In this
paper, we will study its low dimensional cohomology theory. That is the second
aim of this paper.

Throughout this paper, $\mathbb{C}$ denotes the field of complex number and
$\mathbb{Z}$ denotes the set of all integers. All vector spaces and algebras
are assumed to be over $\mathbb{C}$.

2\. Second cohomology group

In this section, we first recall some basic definitions and in particular
central extension of Hom-Lie algebras. Then we establish a one-to-one
correspondence between the equivalence classes of one dimensional central
extensions of a Hom-Lie algebra and its second cohomology group with
coefficients in $\mathbb{C}$. As application we determine the second
cohomology group of the $q$-deformed $W(2,2)$ algebra which is considered as a
Hom-Lie algebra.

In the sequel we will often simply write a Hom-Lie algebra $({\cal
L},[\cdot,\cdot],\alpha)$ as $({\cal L},\alpha)$. A Hom-Lie algebra $({\cal
L},\alpha)$ is said to be multiplicative if the twisting map $\alpha$ is an
endomorphism. Let $G$ be an abelian group. A Hom-Lie algebra $({\cal
L},\alpha)$ is said to be $G$-graded, if its underlying vector space is
$G$-graded (i.e., ${\cal L}=\oplus_{g\in G}{\cal L}_{g}$) satisfying $[{\cal
L}_{g},{\cal L}_{h}]\subseteq{\cal L}_{g+h}$, and if $\alpha$ is an even map,
i.e., $\alpha({\cal L}_{g})\subseteq{\cal L}_{g}$, for all $g,h\in G$.

The theory of central extensions of Hom-Lie algebras was studied in [3, 4]. An
extension of a Hom-Lie algebra $({\cal L},\zeta)$ by an abelian Hom-Lie
algebra $({\mathfrak{a}},\zeta_{\mathfrak{a}})$ is a commutative diagram with
exact rows

$\begin{CD}0@>{}>{}>{\mathfrak{a}}@>{\rm\iota}>{\rm}>{\hat{\cal L}}@>{\rm
pr}>{}>{\cal L}@>{}>{}>0\\\
@V{\zeta_{\mathfrak{a}}}V{}V@V{\hat{\zeta}}V{}V@V{\zeta}V{}V\\\
0@>{}>{}>{\mathfrak{a}}@>{\rm\iota}>{\rm}>{\hat{\cal L}}@>{\rm pr}>{}>{\cal
L}@>{}>{}>0\end{CD}$

where $({\hat{\cal L}},{\hat{\zeta}})$ is a Hom-Lie algebra. The extension is
central if

$\iota({\mathfrak{a}})\subseteq Z({\hat{\cal L}})=\\{x\in{\hat{\cal
L}}\,|\,[x,{\hat{\cal L}}]_{\hat{\cal L}}=0\\}.$

In the following we focus on the central extension of $({\cal L},\alpha)$ by a
one-dimensional center $\mathbb{C}c$, where ${c}=\iota(1)$. Note that the
center $\mathbb{C}c$ can be considered as the one-dimensional trivial Hom-Lie
algebra with the identity map.

###### Definition 2.1

Let $({\cal L},\alpha)$ be a Hom-Lie algebra. A bilinear map $\psi:{\cal
L}\times{\cal L}\rightarrow\mathbb{C}$ is called a $2$-cocycle on ${\cal L}$
if the following conditions are satisfied

$\displaystyle\psi(x,y)=-\psi(y,x),$ (2.1)
$\displaystyle\psi(\alpha(x),[y,z])+\psi(\alpha(y),[z,x])+\psi(\alpha(z),[x,y])=0,$
(2.2)

for all $x,y,z\in L$.

Now we have the following theorem:

###### Theorem 2.2

Let $({\cal L},\alpha)$ be a Hom-Lie algebra and $\psi:{\cal L}\times{\cal
L}\rightarrow\mathbb{C}$ be a bilinear map. Define on the vector space
${\hat{\cal L}}={\cal L}\oplus\mathbb{C}$ the following bracket and linear map
by

$\displaystyle[x+c,y+b]_{\hat{\cal L}}$ $\displaystyle=$
$\displaystyle[x,y]_{{\cal L}}+\psi(x,y),$ (2.3)
$\displaystyle{\hat{\alpha}}(x+c)$ $\displaystyle=$
$\displaystyle\alpha(x)+c,$ (2.4)

for all $x,y\in{\cal L}$ and $c,b\in\mathbb{C}$. Then $({\hat{\cal
L}},[\cdot,\cdot]_{\hat{\cal L}},{\hat{\alpha}})$ is a Hom-Lie algebra one
dimensional central extension of $({\cal L},\alpha)$ if and only if $\psi$ is
a $2$-cocycle on $({\cal L},\alpha)$. If, in addition, $({\cal L},\alpha)$ is
multiplicative and $\psi$ satisfies $\psi(\alpha(x),\alpha(y))=\psi(x,y)$, for
all $x,y\in{\cal L}$, then the Hom-Lie algebra $({\hat{\cal
L}},{\hat{\alpha}})$ is also multiplicative.

Proof.  Since $[\cdot,\cdot]_{{\cal L}}$ is skew-symmetric, the new bracket
$[\cdot,\cdot]_{\hat{\cal L}}$ is skew-symmetric if and only if the map $\psi$
is skew-symmetric. For any $x,y,z\in{\cal L}$ and $a,b,c\in\mathbb{C}$, we
have

$\displaystyle[{\hat{\alpha}}(x+a),[y+b,z+c]_{\hat{\cal L}}]_{\hat{\cal L}}$
$\displaystyle=$ $\displaystyle[\alpha(x)+a,[y,z]_{{\cal
L}}+\psi(y,z)]_{\hat{\cal L}}$ $\displaystyle=$
$\displaystyle[\alpha(x),[y,z]_{{\cal L}}]_{{\cal
L}}+\psi(\alpha(x),[y,z]_{{\cal L}}).$

Consequently,

$\displaystyle[{\hat{\alpha}}(x+a),[y+b,z+c]_{\hat{\cal L}}]_{\hat{\cal
L}}+[{\hat{\alpha}}(y+b),[z+c,x+a]_{\hat{\cal L}}]_{\hat{\cal
L}}+[{\hat{\alpha}}(z+c),[x+a,y+b]_{\hat{\cal L}}]_{\hat{\cal L}}=0$

if and only if

$\displaystyle\psi(\alpha(x),[y,z]_{{\cal L}})+\psi(\alpha(y),[z,x]_{{\cal
L}})+\psi(\alpha(z),[x,y]_{{\cal L}})=0,$

which proves $({\hat{\cal L}},[\cdot,\cdot]_{\hat{\cal L}},{\hat{\alpha}})$ is
a Hom-Lie algebra if and only if $\psi$ is a $2$-cocycle on $({\cal
L},\alpha)$.

If $({\cal L},\alpha)$ is multiplicative, then we have

$\displaystyle{\hat{\alpha}}([x+a,y+b]_{\hat{\cal L}})$ $\displaystyle=$
$\displaystyle{\hat{\alpha}}([x,y]_{\cal L}+\psi(x,y))$ $\displaystyle=$
$\displaystyle\alpha([x,y]_{\cal L})+\psi(x,y)$ $\displaystyle=$
$\displaystyle[\alpha(x),\alpha(y)]_{\cal L}+\psi(x,y).$

On the other hand, we have

$\displaystyle[{\hat{\alpha}}(x+a),{\hat{\alpha}}(y+b)]_{\hat{\cal L}}$
$\displaystyle=$ $\displaystyle[\alpha(x)+a,\alpha(y)+b]_{\hat{\cal L}}$
$\displaystyle=$ $\displaystyle[\alpha(x),\alpha(y)]_{\cal
L}+\psi(\alpha(x),\alpha(y)).$

According to the hypothesis that $\psi(\alpha(x),\alpha(y))=\psi(x,y)$ for all
$x,y\in{\cal L}$, we have

$\displaystyle{\hat{\alpha}}([x+a,y+b]_{\hat{\cal
L}})=[{\hat{\alpha}}(x+a),{\hat{\alpha}}(y+b)]_{\hat{\cal L}},\ \mbox{for\
all}\ x,y\in{\cal L},\ a,b\in\mathbb{C},$

which shows that $({\hat{\cal L}},{\hat{\alpha}})$ is multiplicative.

Finally, we define $\rm pr$ and $\iota$ as the natural projection and
inclusion respectively by

$\displaystyle{\rm pr}:\hat{\cal L}\rightarrow{\cal L},\qquad{\rm pr}(x+a)=x;$
$\displaystyle\iota:\mathbb{C}\rightarrow\hat{\cal L},\qquad\iota(a)=0+a.$

Then it is easy to show that $({\hat{\cal L}},{\hat{\alpha}})$ is a one-
dimensional central extension of $({\cal L},\alpha)$. $\Box$

Denote by $Z^{2}({\cal L},\mathbb{C})$ the vector space of all $2$-cocycles on
a Hom-Lie algebra $({\cal L},\alpha)$. For any linear map $f:{\cal
L}\rightarrow\mathbb{C}$, we can define a $2$-cocycle $\psi_{f}$ by

$\psi_{f}(x,y)=f([x,y]),\ \ \mbox{for\ all}\ x,y\in{\cal L}.$ (2.5)

Such a $2$-cocycle is called a $2$-coboundary or a trivial $2$-cocycle on
${\cal L}$. Let $B^{2}({\cal L},\mathbb{C})$ denote the vector space of all
$2$-coboundaries on ${\cal L}$. The quotient space

$H^{2}({\cal L},\mathbb{C})=Z^{2}({\cal L},\mathbb{C})/B^{2}({\cal
L},\mathbb{C})$

is called the second cohomology group of ${\cal L}$ with trivial coefficients
$\mathbb{C}$. A $2$-cocycle $\psi$ is said to be equivalent to another
$2$-cocycle $\phi$ if $\psi-\phi$ is trivial. For a $2$-cocycle $\psi$, let
$[\psi]$ be the equivalent class of $\psi$. Then we have the following
corollary:

###### Corollary 2.3

For any Hom-Lie algebra $({\cal L},\alpha)$, there exists a one-to-one
correspondence between the equivalence classes of one dimensional central
extensions of $({\cal L},\alpha)$ and its second cohomology group $H^{2}({\cal
L},\mathbb{C})$.

In the following, we consider the $q$-deformed $W(2,2)$ algebra
$\mathcal{W}_{q}$. Note that $\mathcal{W}_{q}$ is not a Lie algebra, because
the classical Jacobi identity does not hold (but the antisymmetry is true). By
straightforward calculations, we have

$\displaystyle(q^{l}+q^{-l})[\,[\,L_{m},L_{n}]_{(q^{m-n},\,q^{n-m})},L_{l}\,]_{(q^{m+n-l},\,q^{l-m-n})}+\mbox{cyclic\
permutations}=0,\ \ \ \ \ \ \ \ $ (2.6)
$\displaystyle(q^{l}+q^{-l})[\,[\,L_{m},L_{n}]_{(q^{m-n},\,q^{n-m})},M_{l}\,]_{(q^{m+n-l},\,q^{l-m-n})}+\mbox{cyclic\
permutations}=0.$ (2.7)

Define on $\mathcal{W}_{q}$ a linear map $\alpha$ by

$\displaystyle\alpha(L_{n})=(q^{n}+q^{-n})L_{n},\ \
\alpha(M_{n})=(q^{n}+q^{-n})M_{n}.$

Then, using the $q$-deformed Jacobi identities (2.6) and (2.7), we obtain the
following result.

###### Theorem 2.4

The triple ($\mathcal{W}_{q},[\cdot,\cdot]_{q},\alpha$) forms a Hom-Lie
algebra.

In [12] we provided a computation of one-dimensional central extensions of
$\mathcal{W}_{q}$. Hence, according to Corollary 2.3, we can determine the
second cohomology group of the $q$-deformed $W(2,2)$ algebra $\mathcal{W}_{q}$
as follows:

###### Proposition 2.5

$H^{2}(\mathcal{W}_{q},\mathbb{C})=\mathbb{C}\beta\oplus\mathbb{C}\gamma$,
where

$\displaystyle\beta(L_{m},L_{n})$ $\displaystyle=$
$\displaystyle\delta_{m,-n}\frac{[m-1]_{q}[m]_{q}[m+1]_{q}}{[2]_{q}[3]_{q}\langle
m\rangle_{q}},\ \ \ \beta(L_{m},M_{n})=\beta(M_{m},M_{n})=0,$
$\displaystyle\gamma(L_{m},M_{n})$ $\displaystyle=$
$\displaystyle\delta_{m,-n}\frac{[m-1]_{q}[m]_{q}[m+1]_{q}}{[2]_{q}[3]_{q}\langle
m\rangle_{q}},\ \ \ \gamma(L_{m},L_{n})=\gamma(M_{m},M_{n})=0,$

and where $\langle m\rangle_{q}=q^{m}+q^{-m}$, for all $m,n\in\mathbb{Z}.$

3\. Derivations of Hom-Lie algebras and $q$-deformed $W(2,2)$ Lie algebra

This section is devoted to discuss derivations of graded Hom-Lie algebras. We
extend to Hom-Lie algebras some concepts and results of derivations of
finitely generated Lie algebras with values in graded modules studied in [2].
As application we compute all $\alpha^{k}$-derivations and particularly the
first cohomology group of the $q$-deformed $W(2,2)$ algebra.

###### Definition 3.1

Let $({\cal L},\alpha)$ be a Hom-Lie algebra. A representation of ${\cal L}$
is a triple $(V,\rho,\beta)$, where $V$ is a $\mathbb{C}$-vector space,
$\beta\in End(V)$ and $\rho:{\cal L}\rightarrow End(V)$ is a
$\mathbb{C}$-linear map satisfying

$\displaystyle\rho([x,y])\circ\beta=\rho(\alpha(x))\circ\rho(y)-\rho(\alpha(y))\circ\rho(x),$

for all $x,y\in{\cal L}.$ $V$ is also called a Hom-${\cal L}$-module, denoted
by $(V,\beta)$ for convenience.

One recovers the definition of a representation in the case of Lie algebras by
setting $\alpha={\rm id}_{\cal L}$ and $\beta={\rm id}_{V}$. For any
$x\in{\cal L},$ define ${\rm ad}:{\cal L}\rightarrow End({\cal L})$ by ${\rm
ad}_{x}(y)=[x,y]$ for all $y\in{\cal L}$. Then $({\cal L},{\rm ad},\alpha)$ is
a representation of ${\cal L}$, which is called the adjoint representation of
${\cal L}$.

###### Definition 3.2

Let $(V,\beta_{V})$ and $(W,\beta_{W})$ be two Hom-${\cal L}$-modules. A
linear map $f:V\rightarrow W$ is called a morphism of Hom-${\cal L}$-modules
if it satisfies

$\displaystyle f\circ\beta_{V}$ $\displaystyle=$ $\displaystyle\beta_{W}\circ
f,$ $\displaystyle f(x\cdot v)$ $\displaystyle=$ $\displaystyle x\cdot f(v),$

for all $x\in{\cal L},$ $v\in V.$

Let $G$ be an abelian group, $({\cal L}=\oplus_{g\in G}{\cal
L}_{g},[\cdot,\cdot],\alpha)$ be a $G$-graded Hom-Lie algebra. An Hom-${\cal
L}$-module $V$ is said to be $G$-graded if $V=\oplus_{g\in G}V_{g}$ and ${\cal
L}_{g}V_{h}\subseteq V_{g+h}$ for all $g,h\in G$. For any nonnegative integer
$k$, denote by $\alpha^{k}$ the $k$-times composition of $\alpha$, i.e.,

$\displaystyle\alpha^{k}=\alpha\circ\alpha\circ\cdots\circ\alpha.$ (3.1)

In particular, $\alpha^{0}={\rm id}$ and $\alpha^{1}=\alpha.$ Then we can
define $\alpha^{k}$-derivations of ${\cal L}$ with values in its Hom-${\cal
L}$-modules.

###### Definition 3.3

A linear map $D:{\cal L}\rightarrow V$ is called an $\alpha^{k}$-derivation if
it satisfies

$\displaystyle D\circ\alpha$ $\displaystyle=$ $\displaystyle\alpha\circ D,$
$\displaystyle D[x,y]$ $\displaystyle=$ $\displaystyle\alpha^{k}(x)\cdot
D(y)-\alpha^{k}(y)\cdot D(x),$

for all $x,y\in{\cal L}$

We recover the definition of a derivation by setting $k=0$ in the definition
above. Hence, an $\alpha^{0}$-derivation is often simply called a derivation
in the present paper. We say that an $\alpha^{k}$-derivation $D$ has degree
$g$ (denoted by ${\rm deg}(D)=g$) if $D\neq 0$ and $D({\cal L}_{h})\subseteq
V_{g+h}$ for any $h\in G$. Let $D$ be an $\alpha^{k}$-derivation. If there
exists $v\in V$ such that $D(x)=\alpha^{k}(x)\cdot v$ for all $x\in{\cal L}$,
then $D$ is called an inner $\alpha^{k}$-derivation. Denote by
$Der_{\alpha^{k}}({\cal L},V)$ and $Inn_{\alpha^{k}}({\cal L},V)$ the space of
$\alpha^{k}$-derivations and the space of inner $\alpha^{k}$-derivations,
respectively. In particular, let $Der({\cal L},V)$ and $Inn({\cal L},V)$
denote the space of derivations and the space of inner derivations,
respectively, and write $Der({\cal L},V)_{g}:=\\{D\in Der({\cal
L},V)\,\big{|}\,{\rm deg}(D)=g\\}\cup\\{0\\}$. The first cohomology group of
${\cal L}$ with coefficients in $V$ is defined by

$\displaystyle H^{1}({\cal L},V):=Der({\cal L},V)/Inn({\cal L},V).$ (3.2)

###### Remark 3.4

The set $Der_{\alpha^{k}}({\cal L},V)$ (resp. $Inn_{\alpha^{k}}({\cal L},V)$)
is not close under map composition or commutator bracket. But the space of all
such $\alpha^{k}$-derivations $\oplus_{k\geq 0}Der_{\alpha^{k}}({\cal L},V)$
(resp. $\oplus_{k\geq 0}Inn_{\alpha^{k}}({\cal L},V)$) form an Lie algebra via
commutator bracket.

Now let ${\cal L}$ be a $G$-graded Hom-Lie algebra which is finitely
generated. In the following we present two results, which can be seen as Hom
versions of those obtained in [2].

###### Proposition 3.5

Let $V$ be a $G$-graded Hom-${\cal L}$-module. For every $D\in Der({\cal
L},V)$, we have

$\displaystyle D=\mbox{$\sum_{g\in G}D_{g}$},$ (3.3)

where $D_{g}\in Der({\cal L},V)_{g}$ and where there are only finitely many
$D_{g}(u)\neq 0$ in the equation $D(u)=\sum_{g\in G}D_{g}(u)$, for any
$u\in{\cal L}$.

Proof. For any $g\in G$, define a homogeneous linear map $D_{g}:{\cal
L}\rightarrow V$ as follows: for any $u\in{\cal L}_{h}$ with $h\in G$, write
$D(u)=\sum_{p\in G}u_{p}$ with $u_{p}\in V$, then set $D_{g}(u)=u_{g+h}$.
Clearly, $D_{g}$ is well defined and $D_{g}\in Der({\cal L},V)_{g}$. Also,
(3.3) is true. $\Box$

###### Proposition 3.6

Let $V$ be a $G$-graded Hom-${\cal L}$-module such that

  * (a)

$H^{1}({\cal L}_{0},V_{g})=0$, for $g\in G\setminus\\{0\\}$.

  * (b)

${\rm Hom}_{L_{0}}({\cal L}_{g},V_{h})=0$, for $g\neq h$.

Then

$Der({\cal L},V)=Der({\cal L},V)_{0}+Inn({\cal L},V).$

Proof. Let $D$ be a derivation from ${\cal L}$ into its Hom-${\cal L}$-module
$V$. According to (3.3) we can decompose $D$ into its homogeneous components
$D=\sum_{g\in G}D_{g}$ with $D_{g}\in Der({\cal L},V)_{g}.$ Suppose that
$g\neq 0$. Then $D_{g}|_{{\cal L}_{0}}$ is a derivation from ${\cal L}_{0}$
into the Hom-${\cal L}_{0}$-module $V_{g}$. By virtue of (a), $D_{g}|_{{\cal
L}_{0}}$ is inner, i.e., there exists $v_{g}\in V_{g}$ such that
$D_{g}(u)=u\cdot v_{g}$ for all $u\in{\cal L}_{0}.$ Consider $\psi_{g}:{\cal
L}\rightarrow V$ defined by $\psi_{g}(x):=D_{g}(x)-x\cdot v_{g}$ for all
$x\in{\cal L}$. Then $\psi_{g}$ is a derivation of degree $g$ which vanishes
on ${\cal L}_{0}$. Hence $\psi_{g}$ is a morphism of Hom-${\cal
L}_{0}$-modules and condition (b) entails the vanishing of $\psi_{g}$ on
${\cal L}_{h}$ for every $h\in G$. Consequently, $D_{g}\in Inn({\cal L},V)$,
which completes the proof. $\Box$

In the following we focus on the $q$-deformed W(2,2) algebra $\mathcal{W}_{q}$
as a Hom-Lie algebra ($\mathcal{W}_{q},[\cdot,\cdot]_{q},\alpha$) defined in
Theorem 2.4. Obviously, $\mathcal{W}_{q}$ is $\mathbb{Z}$-graded by

$\mathcal{W}_{q}=\oplus_{n\in\mathbb{Z}}\mathcal{W}_{q}^{n},\ \mbox{where}\
\mathcal{W}_{q}^{n}=span_{\mathbb{C}}\\{L_{n},M_{n}\\}.$

Note that $\mathcal{M}:=span_{\mathbb{C}}\\{M_{n}\\}$ is an ideal of
$(\mathcal{W}_{q},\alpha)$, or in other words, $\mathcal{M}$ is an adjoint
Hom-$\mathcal{W}_{q}$-module. In addition, $\mathcal{W}_{q}$ is finitely
generated by $\\{L_{1},L_{-1},M_{1}\\}$. Let $D$ be an $\alpha^{k}$-derivation
of $\mathcal{W}_{q}$. For all $m,n\in\mathbb{Z}$, we have

$\displaystyle(q^{m}+q^{-m})^{k}[D(L_{n}),L_{m}]_{q}+(q^{n}+q^{-n})^{k}[L_{n},D(L_{m})]_{q}$
$\displaystyle=$ $\displaystyle[m-n]_{q}D(L_{m+n}),$ (3.4)
$\displaystyle(q^{m}+q^{-m})^{k}[D(L_{n}),M_{m}]_{q}+(q^{n}+q^{-n})^{k}[L_{n},D(M_{m})]_{q}$
$\displaystyle=$ $\displaystyle[m-n]_{q}D(M_{m+n}).$ (3.5)

Now we aim to determine all $\alpha^{k}$-derivation of $\mathcal{W}_{q}$.
First, we compute the ($\alpha^{0}$-)derivations of $\mathcal{W}_{q}$. Denote
by $Der(\mathcal{W}_{q})$ and $Inn(\mathcal{W}_{q})$ the set of all
derivations and the set of all inner derivations, respectively. Let
$Der(\mathcal{W}_{q})_{m}$ be the set of derivations of degree $m$.

###### Lemma 3.7

$H^{1}(\mathcal{W}_{q}^{0},\mathcal{W}_{q}^{n})=0$ for any nonzero integer
$n$.

Proof. Note that $[L_{0},X_{0}]_{q}=0$, for any
$X_{0}\in\mathcal{W}_{q}^{0}=span\\{L_{0},M_{0}\\}$. Let $D$ be any element in
$Der(\mathcal{W}_{q}^{0},\mathcal{W}_{q}^{n})$. Then it follows
$D(L_{0})\in\mathcal{W}_{q}^{n}.$ Applying $D$ to $[L_{0},X_{0}]_{q}=0$, we
have $[n]_{q}D(X_{0})=[L_{0},D(X_{0})]=[X_{0},D(L_{0})]$. Consequently,
$D(X_{0})=[X_{0},v]$ with $v=\frac{1}{[n]_{q}}D(L_{0})$ in
$\mathcal{W}_{q}^{n}$. In other words, $D$ is an inner derivation from
$\mathcal{W}_{q}^{0}$ into its adjoint module $\mathcal{W}_{q}^{n}$. $\Box$

###### Lemma 3.8

${\rm Hom}_{\mathcal{W}_{q}^{0}}(\mathcal{W}_{q}^{m},\mathcal{W}_{q}^{n})=0$
for $m\neq n$.

Proof. Let $f\in{\rm
Hom}_{\mathcal{W}_{q}^{0}}(\mathcal{W}_{q}^{m},\mathcal{W}_{q}^{n})$ with
$m\neq n$. For any $X_{m}\in\mathcal{W}_{q}^{m}$, we have

$(q^{n}+q^{-n})\big{(}f(X_{m})\big{)}=\alpha\big{(}f(X_{m})\big{)}=f\big{(}\alpha(X_{m})\big{)}=(q^{m}+q^{-m})f(X_{m}),$

leading to $f(X_{m})=0$, since $m\neq n$. Hence, $f=0$. $\Box$

Now according to Proposition 3.6, we have the following result:

###### Proposition 3.9

$Der(\mathcal{W}_{q})=Der(\mathcal{W}_{q})_{0}+Inn(\mathcal{W}_{q})$.

Thanks to Proposition 3.9, the study of $Der(\mathcal{W}_{q})$ reduces to that
of its constitute of degree zero. Let $D$ be an element of
$Der(\mathcal{W}_{q})_{0}$. For any integer $n$, assume that

$\displaystyle D(L_{n})=a_{n}L_{n}+b_{n}M_{n},\ \
D(M_{n})=c_{n}L_{n}+d_{n}M_{n},$ (3.6)

where the coefficients are complex numbers. Applying $D$ to
$[L_{0},L_{n}]_{q}=[n]_{q}L_{n}$, one can obtain $D(L_{0})=0,$ i.e.,
$a_{0}=b_{0}=0$. Using (3.4), we have

$\displaystyle a_{m+n}=a_{m}+a_{n},\ \ b_{m+n}=b_{m}+b_{n},\ \mbox{for}\ m\neq
n.$

Let $m=-n$. Then we have

$\displaystyle a_{-m}=-a_{m},\ \ b_{-m}=-b_{m},\ \mbox{for}\ m\neq 0.$

Furthermore, we have

$\displaystyle a_{m}=ma_{1},\ \ b_{m}=mb_{1},\ \ \mbox{for all}\
m\in\mathbb{Z}.$

Similarly, using (3.5) we have

$\displaystyle c_{m+n}=c_{n},\ \ d_{m+n}=a_{m}+d_{n},\ \ \mbox{for}\ m\neq n,$

from which it follows

$\displaystyle c_{m}=c_{0},\ \ d_{m}=ma_{1}+d_{0},\ \ \mbox{for\ all}\
m\in\mathbb{Z}.$

Applying $D$ to $[M_{1},M_{0}]=0$, we have $c_{0}=0$. It follows that
$c_{m}=0$ for all $m\in\mathbb{Z}$. Hence, there exist $a,b,d\in\mathbb{C}$
such that

$\displaystyle D(L_{n})=n(aL_{n}+bM_{n}),\ \ D(M_{n})=(na+d)M_{n},\ \
\mbox{for\ all}\ n\in\mathbb{Z}.$ (3.7)

From the discussions above we obtain the following result:

###### Proposition 3.10

All the derivations of $\mathcal{W}_{q}$ is

$Der(\mathcal{W}_{q})=span_{\mathbb{C}}\\{D\\}\oplus Inn(\mathcal{W}_{q}),$

where $D$ is defined by (3.7).

###### Corollary 3.11

The first cohomology group of $\,\mathcal{W}_{q}$ with values in its adjoint
module is one-dimensional.

Next we compute the $\alpha^{1}$-derivations of $\mathcal{W}_{q}$. Let $D$ be
an $\alpha^{1}$-derivation of degree $s$. Assume that

$\displaystyle D(L_{n})=a_{s,n}L_{n+s}+b_{s,n}M_{n+s},\ \
D(M_{n})=c_{s,n}L_{n+s}+d_{s,n}M_{n+s},$

where the coefficients are complex numbers. Then from equation (3.4) we obtain

$\displaystyle[m-n]_{q}a_{s,m+n}$ $\displaystyle=$
$\displaystyle(q^{m}+q^{-m})[m-s-n]_{q}a_{s,n}+(q^{n}+q^{-n})[m+s-n]_{q}a_{s,m},$
(3.8) $\displaystyle{[m-n]_{q}b_{s,m+n}}$ $\displaystyle=$
$\displaystyle(q^{m}+q^{-m})[m-s-n]_{q}b_{s,n}+(q^{n}+q^{-n})[m+s-n]_{q}b_{s,m}.$
(3.9)

We first consider the case of $s\neq 0$. Taking $m=0$ in (3.8), we have

$\displaystyle(2[s+n]_{q}-[n]_{q})a_{s,n}=(q^{n}+q^{-n})[s-n]_{q}a_{s,0}.$

Furthermore,

$\displaystyle
a_{s,n}=\frac{(q^{n}+q^{-n})[s-n]_{q}}{(2[s+n]_{q}-[n]_{q})}a_{s,0}.$ (3.10)

Plugging (3.10) into (3.8), we have

$\displaystyle\frac{(q^{m+n}+q^{-m-n})[m-n]_{q}[s-m-n]_{q}}{2[s+m+n]_{q}-[m+n]_{q}}a_{s,0}$
$\displaystyle=$
$\displaystyle\frac{(q^{m}+q^{-m})(q^{n}+q^{-n})[m-s-n]_{q}[s-n]_{q}}{2[s+n]_{q}-[n]_{q}}a_{s,0}$
$\displaystyle+$
$\displaystyle\frac{(q^{m}+q^{-m})(q^{n}+q^{-n})[m+s-n]_{q}[s-m]_{q}}{2[s+m]_{q}-[m]_{q}}a_{s,0}.$

Let $m=s$ in the equation above, we have

$\displaystyle\frac{(q^{s+n}+q^{-s-n})[s-n]_{q}[-n]_{q}}{2[2s+n]_{q}-[s+n]_{q}}a_{s,0}=\frac{(q^{s}+q^{-s})(q^{n}+q^{-n})[s-n]_{q}[-n]_{q}}{2[s+n]_{q}-[n]_{q}}a_{s,0}.$
(3.11)

Then taking $n=-s$ in (3.11), we get

$\displaystyle\frac{[2s]_{q}[s]_{q}}{[s]_{q}}a_{s,0}=\frac{(q^{s}+q^{-s})^{2}[2s]_{q}[s]_{q}}{[s]_{q}}a_{s,0}.$

It follows $a_{s,0}=0$ since $s\neq 0$. Then we have $a_{s,n}=0$ for
$n\in\mathbb{Z}$ and $s\neq 0$ by (3.10). Similarly, from (3.9) we can deduce
that $b_{s,n}=0$ for $s\neq 0$ and $n\in\mathbb{Z}$.

In the case of $s=0$, we simply write $a_{0,n}$ as $a_{n}$. Then it can be
deduced from (3.8) that

$\displaystyle a_{m+n}=(q^{m}+q^{-m})a_{n}+(q^{n}+q^{-n})a_{m},\ \mbox{for}\
m\neq n.$ (3.12)

Let $m=0$ in (3.12), we have

$\displaystyle a_{n}=-(q^{n}+q^{-n})a_{0},$ (3.13)

which implies $a_{n}=a_{-n}$ for $n>0$. Taking $m=-n$ in (3.12), we have

$\displaystyle a_{0}=(q^{n}+q^{-n})(a_{n}+a_{-n}).$ (3.14)

Substituting (3.13) into (3.14), we have $a_{0}=0$ and $a_{n}=0$ for all
$n\in\mathbb{Z}$. Similarly, we can deduce that $b_{0,m}=0$ for all
$m\in\mathbb{Z}$ by using (3.9) where $s=0$. Hence, we have proved that

$\displaystyle a_{s,m}=b_{s,m}=0,\ \mbox{for all}\ m,s\in\mathbb{Z},$

or, in other words, we get $D(L_{m})=0$ for $m\in\mathbb{Z}.$

It remains to determine $D(M_{n})$ for all $n\in\mathbb{Z}.$ Using
$D(L_{n})=0$, we can deduce from (3.5) that

$\displaystyle[m-n]_{q}c_{s,m+n}$ $\displaystyle=$
$\displaystyle(q^{n}+q^{-n})[m+s-n]_{q}c_{s,m},$ (3.15)
$\displaystyle{[m-n]_{q}d_{s,m+n}}$ $\displaystyle=$
$\displaystyle(q^{n}+q^{-n})[m+s-n]_{q}d_{s,m}.$ (3.16)

Let $m=0$ in (3.15) and (3.16), respectively. We have

$\displaystyle-[n]_{q}c_{s,n}$ $\displaystyle=$
$\displaystyle(q^{n}+q^{-n})[s-n]_{q}c_{s,0},$ (3.17)
$\displaystyle-[n]_{q}d_{s,n}$ $\displaystyle=$
$\displaystyle(q^{n}+q^{-n})[s-n]_{q}d_{s,0}.$ (3.18)

Taking $n=0$ in (3.15) and (3.16), respectively, one has

$\displaystyle[m]_{q}c_{s,m}$ $\displaystyle=$ $\displaystyle
2[m+s]_{q}c_{s,m}.$ (3.19) $\displaystyle{[m]_{q}d_{s,m}}$ $\displaystyle=$
$\displaystyle 2[m+s]_{q}d_{s,m}.$ (3.20)

Taking $m=0$ in (3.19) and (3.20), respectively, we have $c_{s,0}=d_{s,0}=0$
for $s\neq 0$. Then it follows from (3.17) (resp. (3.18)) that $c_{s,n}=0$
(resp. $d_{s,n}=0$) for $n\in\mathbb{Z}$ and $s\neq 0.$

If $s=0$, then it follows from (3.15) that

$\displaystyle[m-n]_{q}c_{0,m+n}$ $\displaystyle=$
$\displaystyle(q^{n}+q^{-n})[m-n]_{q}c_{0,m}.$ (3.21)

Let $n=0$ in (3.21), we have $[m]_{q}c_{0,m}=2[m]_{q}c_{0,m}.$ It follows that
$c_{0,m}=0$ for $m\neq 0.$ Taking $n=-m$ in (3.21), we have
$[2m]_{q}c_{0,0}=(q^{m}+q^{-m})[2m]_{q}c_{0,m}$, leading us to $c_{0,0}=0$.
Similarly, we can deduce from (3.16) that $d_{0,m}=0$ for all
$m\in\mathbb{Z}.$ Thereby, the following proposition is proved.

###### Proposition 3.12

If $D$ is an $\alpha^{1}$-derivation of $\mathcal{W}_{q}$, then $D=0$.

With the similar discussions as above, we can compute $\alpha^{k}$-derivations
of $\mathcal{W}_{q}$ for $k>1$ and thus we have all the
$\alpha^{k}$-derivations of $\mathcal{W}_{q}$ for $k>0$ determined.

###### Proposition 3.13

For $k>0$, all the $\alpha^{k}$-derivations of $\mathcal{W}_{q}$ are zero.

## References

  * [1] F. Ammar, A. Makhlouf, Hom-Lie superalgebras and Hom-Lie admissible superalgebras, J. Algebra, 324(7) (2010), 1513–1528.
  * [2] R. Farnsteiner, Derivations ans central extensions of finitely generated graded Lie algebras, J. Algebra, 118 (1988), 33–45.
  * [3] J.T. Hartwig, D. Larsson, S.D. Silvestrov, Deformations of Lie algebras using $\sigma$-derivation, J. Algebra, 295(2006), 314–361.
  * [4] D. Larsson, S.D. Silvestrov, Quasi-hom-Lie algebras, central extensions and 2-cocycle-like identities, J. Algebra, 288(2005), 321–344.
  * [5] D. Larsson, S.D. Silvestrov, Graded quasi-Lie agebras, Czechoslovak J. Phys., 55 (2005), 1473–1478.
  * [6] A. Makhlouf, S.D. Silvestrov, Hom-algebra structures, J. Gen. Lie Theory Appl., 2(2) (2008), 51–64.
  * [7] A. Makhlouf, S.D. Silvestrov, Notes on $1$-parameter formal deformations of Hom-associative and Hom-Lie algebras, Forum Math., 22 (2010), 715–739.
  * [8] Y. Sheng, Reprensentations of Hom-Lie algebras, Algebras and Representation Theory, (2010), 1–18.
  * [9] D.Yau, Enveloping algebras of Hom-Lie algebras, J. Gen. Lie Theory Appl. 2 (2008), 95–108
  * [10] D.Yau, Hom-algebras and homology, J. Lie Theory, 19 (2009), 409–421.
  * [11] Lamei Yuan, Hom-Lie color algebra structures,Comm. Algebra, 40(2)(2012), 575–592.
  * [12] Lamei Yuan, $q$-Deformation of $W(2,2)$ Lie algebra associated with quantum groups, Acta Mathematica Sinica, English Series, (2012), DOI: 10.1007/s10114-012-0544-y.
  * [13] W. Zhang, C. Dong, $W$-Algebra $W(2,2)$ and the Vertex Operator Algebra $L(\frac{1}{2},0)\otimes L(\frac{1}{2},0)$, Comm. Math. Phys., 285 (2009), 991–1004.