Cohomology of Restricted Filiform Lie Algebras
${\mathfrak{m}}_{2}^{\lambda}(p)$

Cohomology of Restricted Filiform Lie Algebras
$\boldsymbol{{\mathfrak{m}}_{2}^{\lambda}(p)}$††This paper is a contribution
to the Special Issue on Algebra, Topology, and Dynamics in Interaction in
honor of Dmitry Fuchs. The full collection is available at
https://www.emis.de/journals/SIGMA/Fuchs.html

Tyler J. EVANS † and Alice FIALOWSKI ‡§

T.J. Evans and A. Fialowski

† Department of Mathematics, Humboldt State University, Arcata, CA 95521, USA
<EMAIL_ADDRESS>https://sites.google.com/humboldt.edu/tylerjevans

‡ Institute of Mathematics, University of Pécs, Pécs, Hungary
<EMAIL_ADDRESS>
§ Institute of Mathematics Eötvös Loránd University, Budapest, Hungary
<EMAIL_ADDRESS>
Received August 19, 2019, in final form November 24, 2019; Published online
December 01, 2019

For the $p$-dimensional filiform Lie algebra ${\mathfrak{m}}_{2}(p)$ over a
field ${\mathbb{F}}$ of prime characteristic $p\geq 5$ with nonzero Lie
brackets $[e_{1},e_{i}]=e_{i+1}$ for $1<i<p$ and $[e_{2},e_{i}]=e_{i+2}$ for
$2<i<p-1$, we show that there is a family ${\mathfrak{m}}_{2}^{\lambda}(p)$ of
restricted Lie algebra structures parameterized by elements
$\lambda\in{\mathbb{F}}^{p}$. We explicitly describe bases for the ordinary
and restricted 1- and 2-cohomology spaces with trivial coefficients, and give
formulas for the bracket and $[p]$-operations in the corresponding restricted
one-dimensional central extensions.

restricted Lie algebra; central extension; cohomology; filiform Lie algebra

17B50; 17B56

We dedicate this paper to Dmitry B. Fuchs
on the occasion of his 80th birthday

##  1 Introduction

$\mathbb{N}$-graded Lie algebras of maximal class have been intensively
studied in the last decade. A Lie algebra of _maximal class_ is a graded Lie
algebra

$\mathfrak{g}=\oplus_{i=1}^{\infty}\mathfrak{g}_{i}$

over a field $\mathbb{F}$, where
$\dim(\mathfrak{g}_{1})=\dim(\mathfrak{g}_{2})=1$, dim$(\mathfrak{g}_{i})\leq
1$ for $i\geq 3$ and $[\mathfrak{g}_{1},\mathfrak{g}_{i}]=\mathfrak{g}_{i+1}$
for $i\geq 1$.

A Lie algebra of dimension $n$ is called _filiform_ if

$\dim\big{(}\mathfrak{g}^{k}\big{)}=n-k,\qquad 2\leq k\leq n,\qquad{\rm
where}\quad\mathfrak{g}^{k}=\big{[}\mathfrak{g},\mathfrak{g}^{k-1}\big{]}.$

Lie algebras of maximal class with two generators over fields of
characteristic zero have been classified, and exactly three of these algebras
are of filiform type [9]. We list them with the nontrivial bracket structures:

$\displaystyle\mathfrak{m}_{0}\colon\quad$
$\displaystyle[e_{1},e_{i}]=e_{i+1},\qquad$ $\displaystyle i\geq 2,$
$\displaystyle\mathfrak{m}_{2}\colon\quad$
$\displaystyle[e_{1},e_{i}]=e_{i+1},\qquad$ $\displaystyle i\geq 2,$
$\displaystyle[e_{2},e_{j}]=e_{j+2},\qquad$ $\displaystyle j\geq 3,$
$\displaystyle\mathfrak{V}\colon\quad$
$\displaystyle[e_{i},e_{j}]=(j-i)e_{i+j},\qquad$ $\displaystyle i,j\geq 1.$

Filiform $\mathbb{N}$-graded Lie algebras $\mathfrak{g}$ of dimension $n$ over
a field of characteristic zero that satisfy
$[\mathfrak{g}_{1},\mathfrak{g}_{i}]=\mathfrak{g}_{i+1}$ and
$\dim(\mathfrak{g}_{i})=1$ for $i<n$ (which is equivalent to having 2
generators) are classified in [14]. They include the natural “truncations” of
$\mathfrak{m}_{0}(n)$ and $\mathfrak{m}_{2}(n)$ obtained by taking the
quotient by the ideal generated by $e_{n+1}$. The algebra $\mathfrak{V}$ (the
Witt algebra) is isomorphic to the algebra of derivations of the polynomial
algebra $\mathbb{F}[x]$. If $\mathbb{F}$ has characteristic $p>0$, then the
truncation $\mathfrak{V}(p)$ of $\mathfrak{V}$ is the derivation algebra of
the quotient of $\mathbb{F}[x]$ by the ideal generated by $x^{p}-1$. The
algebra $\mathfrak{V}(p)$ is called the (modular) Witt algebra.

The above picture is more complicated in the modular case (that is, over
fields of positive characteristic), see [1, 2, 13], but $\mathfrak{m}_{0}$,
$\mathfrak{m}_{2}$, $\mathfrak{V}$ and their truncations always show up. We
refer the reader to the book [15] for a general treatment of modular Lie
algebras. In this paper, we show that if the field $\mathbb{F}$ has
characteristic $p\geq 5$, then the Lie algebra $\mathfrak{m}_{2}(p)$ admits a
family of restricted Lie algebra structures $\mathfrak{m}_{2}^{\lambda}(p)$
parameterized by elements $\lambda\in\mathbb{F}^{p}$. We describe the
isomorphism classes of these algebras, calculate the ordinary and restricted
cohomology spaces with trivial coefficients
$H^{q}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ and
$H_{*}^{q}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ for $q=1,2$ and give
explicit bases for those spaces. We also give the bracket structures and
$[p]$-operations for the corresponding restricted one-dimensional central
extensions of these restricted Lie algebras.

With this, we complete the description of all three types of truncated
filiform restricted Lie algebras ($\mathfrak{m}_{0}^{\lambda}(p)$,
$\mathfrak{m}_{2}^{\lambda}(p)$, and $\mathfrak{V}(p)$), their low dimensional
cohomology spaces with trivial coefficients and their restricted one-
dimensional central extensions. The algebras $\mathfrak{m}_{0}^{\lambda}(p)$
were studied in [5], and the algebra $\mathfrak{V}(p)$ was studied in [6]
(where it is denoted by $W$).

######  Remark 1.1.

For $p=2$ and $p=3$, $\mathfrak{m}_{0}(p)=\mathfrak{m}_{2}(p)$ so these
algebras were treated in [5].

In this paper, all cochain and cohomology spaces are with coefficients in the
trivial $\mathbb{F}$-module. The organization is as follows. In Section 2 we
construct the restricted Lie algebra family $\mathfrak{m}_{2}^{\lambda}(p)$,
determine the isomorphism classes of these restricted Lie algebras, and
describe both the ordinary and restricted 1- and 2-cochains, including
formulas for all differentials. In Section 3 we calculate both the ordinary
and restricted 1-cohomology by giving explicit cocycles. Section 4 contains
the calculation of the ordinary and restricted 2-cohomology spaces, again by
giving explicit cocycles. In Section 5 we describe all restricted one-
dimensional central extensions and give their brackets and $[p]$-operations.

##  2 Preliminaries

###  2.1 The Lie algebra $\boldsymbol{\mathfrak{m}_{2}(p)}$

Let $p\geq 5$ be a prime, and let $\mathbb{F}$ be a field of characteristic
$p$. Define the $\mathbb{F}$-vector space

$\mathfrak{m}_{2}(p)=\mathop{\rm
span}\nolimits_{\mathbb{F}}(\\{e_{1},\dots,e_{p}\\}),$

and define a bracket on $\mathfrak{m}_{2}(p)$ by

$\displaystyle[e_{1},e_{i}]=e_{i+1},\qquad 1<i<p,$
$\displaystyle[e_{2},e_{i}]=e_{i+2},\qquad 2<i<p-1,$

with all other brackets $[e_{i},e_{j}]$ (for $i<j$) being $0$. Note that
$\mathfrak{m}_{2}(p)$ is a graded Lie algebra with $k$-th graded component
$(\mathfrak{m}_{2}(p))_{k}=\mathbb{F}e_{k}$ for $1\leq k\leq p$. If
$\alpha_{i},\beta_{i}\in\mathbb{F}$ and $g=\sum_{i=1}^{p}\alpha_{i}e_{i}$,
$h=\sum_{i=1}^{p}\beta_{i}e_{i}$, then

$\displaystyle[g,h]=(\alpha_{1}\beta_{2}-\alpha_{2}\beta_{1})e_{3}+(\alpha_{1}\beta_{3}-\alpha_{3}\beta_{1})e_{4}$
$\displaystyle\hphantom{[g,h]=}{}+\sum_{j=5}^{p}((\alpha_{1}\beta_{j-1}-\alpha_{j-1}\beta_{1})+(\alpha_{2}\beta_{j-2}-\alpha_{j-2}\beta_{2}))e_{j}.$
(2.1)

###  2.2 The restricted Lie algebras
$\boldsymbol{\mathfrak{m}_{2}^{\lambda}(p)}$

We refer the reader to [12, Chapter V, Section 7] and [15, Section 2.2] for
the definition of a restricted Lie algebra, and for the construction of the
$[p]$-mapping on a given Lie algebra ($\mathfrak{m}_{2}(p)$ in the current
paper) used below. For any $j\geq 2$ and
$g_{1},\dots,g_{j}\in\mathfrak{m}_{2}(p)$, we denote the $j$-fold bracket

$[g_{1},g_{2},g_{3},\dots,g_{j}]=[[\dots[[g_{1},g_{2}],g_{3}],\dots],g_{j}].$

Since $p\geq 5$, (2.1) implies that the center of the algebra is
$Z(\mathfrak{m}_{2}(p))=\mathbb{F}e_{p},$ and $p$-fold brackets are zero.
Therefore for each $\lambda=(\lambda_{1},\dots,\lambda_{p})\in\mathbb{F}^{p}$,
setting $e_{k}^{[p]}=\lambda_{k}e_{p}$ for each $k$ defines a restricted Lie
algebra that we denote by $\mathfrak{m}_{2}^{\lambda}(p)$. Because $p$-fold
brackets in $\mathfrak{m}_{2}^{\lambda}(p)$ are zero, for all
$g,h\in\mathfrak{m}_{2}^{\lambda}(p)$, $\alpha\in\mathbb{F}$,

$(g+h)^{[p]}=g^{[p]}+h^{[p]}\qquad{\rm and}\qquad(\alpha
g)^{[p]}=\alpha^{p}g^{[p]},$

and therefore the $[p]$-mapping on $\mathfrak{m}_{2}^{\lambda}(p)$ is
$p$-semilinear (see also [15, Chapter 2, Lemma 1.2]). From this we get that if
$g=\sum\alpha_{k}e_{k}\in\mathfrak{m}_{2}^{\lambda}(p)$, then

$\displaystyle
g^{[p]}=\left(\sum_{k=1}^{p}\alpha_{k}^{p}\lambda_{k}\right)e_{p}.$ (2.2)

Everywhere below, we write $\mathfrak{m}_{2}^{\lambda}(p)$ to denote both the
graded Lie algebra $\mathfrak{m}_{2}(p)$ and the graded restricted Lie algebra
$\mathfrak{m}_{2}^{\lambda}(p)$ for a given $\lambda\in\mathbb{F}^{p}$. The
Lie brackets and restricted $[p]$-operators for these algebras are explicitly
given by (2.1) and (2.2), respectively.

######  Remark 2.1.

For $p=2$ there are several other possible $[2]$-mappings, namely any
2-semilinear transformation on $\mathfrak{m}_{2}(2)$.

###  2.3 Isomorphism classes

######  Proposition 2.2.

Let $p\geq 5$. If $\lambda,\lambda^{\prime}\in\mathbb{F}^{p}$, the graded
restricted Lie algebras $\mathfrak{m}_{2}^{\lambda}(p)$ and
$\mathfrak{m}_{2}^{\lambda^{\prime}}(p)$ are isomorphic if and only if there
exists a non-zero $\mu\in\mathbb{F}$ such that
$\lambda_{k}=\mu^{(k-1)p}\lambda^{\prime}_{k}$ for $k=1,\dots,p$.

###### Proof.

We only consider isomorphisms that preserve the grading as we are interested
in these algebras as graded restricted Lie algebras. Assume that there exists
a graded restricted Lie algebra isomorphism
$\varphi\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathfrak{m}_{2}^{\lambda^{\prime}}(p)$,
and let $\varphi(e_{1})=\mu e_{1},\varphi(e_{2})=\nu e_{2}$ for some non-zero
$\mu,\nu\in\mathbb{F}$. Since $\varphi$ preserves the Lie bracket, we must
have $\varphi(e_{3})=\mu\nu e_{3}$, $\varphi(e_{4})=\mu^{2}\nu e_{4}$,
$\varphi(e_{5})=\mu^{3}\nu e_{5}$. On the other hand, as
$[e_{1},e_{4}]=[e_{2},e_{3}]$, we also must have
$\varphi(e_{5})=\mu\nu^{2}e_{5}$. From this it follows that $\nu=\mu^{2}$ and
$\varphi(e_{k})=\mu^{k}e_{k}$ for $k=1,\dots,p$.

Moreover, $\varphi$ preserves the restricted $[p]$-structure so that

$\varphi(e_{k}^{[p]})=\varphi(e_{k})^{[p]^{\prime}}$

for $k=1,\dots,p$ (here $[p]^{\prime}$ denotes the restricted $[p]$-structure
on $\mathfrak{m}_{2}^{\lambda^{\prime}}(p)$). Now,

$\varphi(e_{k}^{[p]})=\varphi(\lambda_{k}e_{p})=\lambda_{k}\mu^{p}e_{p}\qquad{\rm
and}\qquad\varphi(e_{k})^{[p]^{\prime}}=(\mu^{k}e_{k})^{[p]^{\prime}}=\mu^{kp}\lambda_{k}^{\prime}e_{p}$

so $\lambda_{k}\mu^{p}=\mu^{kp}\lambda^{\prime}_{k},$ and hence

$\lambda_{k}=\mu^{(k-1)p}\lambda^{\prime}_{k}.$

It remains to show that the above condition on $\lambda_{k}$ gives rise to a
graded restricted Lie algebra isomorphism between
$\mathfrak{m}_{2}^{\lambda}(p)$ and $\mathfrak{m}_{2}^{\lambda^{\prime}}(p)$.
If, for $0\neq\mu\in\mathbb{F}$, we define $\varphi(e_{1})=\mu e_{1}$,
$\varphi(e_{k})=\mu^{k}e_{k}$ $(2\leq k\leq p)$, then it is easy to check that
the argument above is reversible, and we obtain a graded isomorphism between
the restricted Lie algebras. ∎

###  2.4 Cochain complexes with trivial coefficients

For the convenience of the reader and to establish our notations, we briefly
recall the definitions of the cochain spaces used below to compute both the
ordinary and restricted Lie algebra 1- and 2-cohomology. The reader can find
more details on these complexes in [3, 4, 5, 10, 11].

####  2.4.1 Ordinary cochain complex

For ordinary Lie algebra cohomology with trivial coefficients, the relevant
cochain spaces from the Chevalley–Eilenberg complex (with bases) for our
purposes are

$\displaystyle
C^{0}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\mathbb{F},\qquad$
$\displaystyle\\{1\\},$ $\displaystyle
C^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\mathfrak{m}_{2}^{\lambda}(p)^{\prime},\qquad$
$\displaystyle\big{\\{}e^{k}\,|\,1\leq k\leq p\big{\\}},$ $\displaystyle
C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\big{(}{\wedge}^{2}\mathfrak{m}_{2}^{\lambda}(p)\big{)}^{\prime},\qquad$
$\displaystyle\big{\\{}e^{i,j}\,|\,1\leq i<j\leq p\big{\\}},$ $\displaystyle
C^{3}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\big{(}{\wedge}^{3}\mathfrak{m}_{2}^{\lambda}(p)\big{)}^{\prime},\qquad$
$\displaystyle\big{\\{}e^{s,t,u}\,|\,1\leq s<t<u\leq p\big{\\}},$

($V^{\prime}$ denotes the dual vector space) and the differentials are defined
by

$\displaystyle{\rm d}^{0}\colon\
C^{0}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)},\qquad$ $\displaystyle{\rm
d}^{0}=0,$ $\displaystyle{\rm d}^{1}\colon\
C^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)},\qquad$ $\displaystyle{\rm
d}^{1}(\psi)(g,h)=\psi([g,h]),$ $\displaystyle{\rm d}^{2}\colon\
C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{3}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)},\qquad$ $\displaystyle{\rm
d}^{2}(\varphi)(g,h,f)=\varphi([g,h]\wedge f)-\varphi([g,f]\wedge h)$
$\displaystyle\hphantom{{\rm d}^{2}(\varphi)(g,h,f)=}{}+\varphi([h,f]\wedge
g).$

The cochain spaces $C^{n}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ are
graded

$\displaystyle
C^{1}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\mathop{\rm
span}\big{(}\big{\\{}e^{k}\big{\\}}\big{)},\qquad$ $\displaystyle 1\leq k\leq
p,$ $\displaystyle
C^{2}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\mathop{\rm
span}\big{(}\big{\\{}e^{i,j}\big{\\}}\big{)},\qquad$ $\displaystyle 1\leq
i<j\leq p,\quad i+j=k,\quad 3\leq k\leq 2p-1,$ $\displaystyle
C^{3}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\mathop{\rm
span}\big{(}\big{\\{}e^{s,t,u}\big{\\}}\big{)},\qquad$ $\displaystyle 1\leq
s<t<u\leq p,\quad s+t+u=k,\quad 6\leq k\leq 3p-3,$

and the differentials are graded maps. If we adopt the convention that
$e^{i,j}=0$ whenever $j\leq i$, we can write for $1\leq k\leq p$

$\displaystyle{\rm d}^{1}\big{(}e^{k}\big{)}=e^{1,k-1}+e^{2,k-2}.$ (2.3)

Using the convention that $e^{i,j,k}=0$ unless $i<j<k$, we can write

$\displaystyle{\rm d}^{2}\big{(}e^{1,j}\big{)}=-e^{1,2,j-2},\quad 2\leq j,$
$\displaystyle{\rm
d}^{2}\big{(}e^{i,j}\big{)}=e^{1,i-1,j}+e^{1,i,j-1}+e^{2,i-2,j}+e^{2,i,j-2},\qquad
2\leq i<j\leq p.$ (2.4)

####  2.4.2 Restricted cochain complex

The relevant restricted cochain spaces are

$\displaystyle
C^{0}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=C^{0}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)},$
$\displaystyle
C^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=C^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)},$
$\displaystyle
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\big{\\{}(\varphi,\omega)\,|\,\varphi\in
C^{2}(\mathfrak{m}_{2}^{\lambda}(p)),\,\omega\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$
$\displaystyle\hphantom{C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\big{\\{}}{}\text{\rm
has the $*$-property with respect to $\varphi$}\big{\\}}$ $\displaystyle
C^{3}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=\big{\\{}(\zeta,\eta)\,|\,\zeta\in
C^{3}(\mathfrak{m}_{2}^{\lambda}(p)),\,\eta\colon\mathfrak{m}_{2}^{\lambda}(p)\times\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}\big{\\}}.$

We recall that if $\varphi\in
C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$, then a map
$\omega\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ has the $*$-property
with respect to $\varphi$ if for all $\alpha\in\mathbb{F}$ and all
$g,h\in\mathfrak{m}_{2}^{\lambda}(p)$ we have $\omega(\alpha
g)=\alpha^{p}\omega(g)$ and

$\displaystyle\omega(g+h)=\omega(g)+\omega(h)+\sum_{\begin{subarray}{c}g_{i}=g\
{\rm or}\ h\\\
g_{1}=g,\,g_{2}=h\end{subarray}}\frac{1}{\\#(g)}\varphi([g_{1},g_{2},\dots,g_{p-1}]\wedge
g_{p}).$ (2.5)

Here $\\#(g)$ is the number of factors $g_{i}$ equal to $g$. Moreover, given
$\varphi$, we can assign the values of $\omega$ arbitrarily on a basis for
$\mathfrak{m}_{2}^{\lambda}(p)$ and use (2.5) to define
$\omega\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ that has the
$*$-property with respect to $\varphi$ (see [5, pp. 249–250]). Recall the
space of Frobenius homomorphisms $\operatorname{Hom}_{\rm Fr}(V,W)$ from the
$\mathbb{F}$-vector space $V$ to the $\mathbb{F}$-vector space $W$ is defined
by

$\operatorname{Hom}_{\rm Fr}(V,W)=\big{\\{}f\colon V\to W\,|\,f(\alpha x+\beta
y)=\alpha^{p}f(x)+\beta^{p}f(y)\big{\\}}$

for all $\alpha,\beta\in\mathbb{F}$ and $x,y\in V$. A map
$\omega\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ has the $*$-property
with respect to $\varphi=0$ if and only if $\omega\in\operatorname{Hom}_{\rm
Fr}(\mathfrak{m}_{2}^{\lambda}(p),\mathbb{F})$. In particular, if $1\leq k\leq
p$, then the map
$\overline{e}^{k}\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ defined by

$\overline{e}^{k}\left(\sum_{i=1}^{p}\alpha_{i}e_{i}\right)=\alpha_{k}^{p},$

has the $*$-property with respect to $0$.

We will use the following bases for the restricted cochains

$\displaystyle C^{0}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$
$\displaystyle\\{1\\},$ $\displaystyle
C^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$
$\displaystyle\big{\\{}e^{k}\,|\,1\leq k\leq p\big{\\}},$ $\displaystyle
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$
$\displaystyle\big{\\{}\big{(}e^{i,j},\tilde{e}^{i,j}\big{)}\,|\,1\leq i<j\leq
p\big{\\}}\cup\big{\\{}\big{(}0,\overline{e}^{k}\big{)}\,|\,1\leq k\leq
p\big{\\}},$

where $\tilde{e}^{i,j}$ is the map
$\tilde{e}^{i,j}\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ that
vanishes on the basis and has the $*$-property with respect to $e^{i,j}$. More
generally, given $\varphi\in C^{2}(\mathfrak{m}_{2}^{\lambda}(p))$, let
$\tilde{\varphi}\colon\mathfrak{m}_{2}^{\lambda}(p)\to\mathbb{F}$ be the map
that vanishes on the basis for $\mathfrak{m}_{2}^{\lambda}(p)$ and has the
$*$-property with respect to $\varphi$. The restricted differentials are
defined by

$\displaystyle{\rm d}^{0}_{*}\colon\
C^{0}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$ $\displaystyle{\rm
d}^{0}_{*}=0,$ $\displaystyle{\rm d}^{1}_{*}\colon\
C^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$ $\displaystyle{\rm
d}^{1}_{*}(\psi)=\big{(}{\rm
d}^{1}(\psi),\operatorname{ind}^{1}(\psi)\big{)},$ $\displaystyle{\rm
d}^{2}_{*}\colon\ C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{3}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\qquad$ $\displaystyle{\rm
d}^{2}_{*}(\varphi,\omega)=\big{(}{\rm
d}^{2}(\varphi),\operatorname{ind}^{2}(\varphi,\omega)\big{)},$

where $\operatorname{ind}^{1}(\psi)(g):=\psi\big{(}g^{[p]}\big{)}$ and
$\operatorname{ind}^{2}(\varphi,\omega)(g,h):=\varphi\big{(}g\wedge
h^{[p]}\big{)}$. If $\psi\in
C^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ and $(\varphi,\omega)\in
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$, then
$\operatorname{ind}^{1}(\psi)$ has the $*$-property with respect to ${\rm
d}^{1}(\psi)$ [7, Lemma 4]. If $g=\sum\alpha_{i}e_{i}$,
$h=\sum\beta_{i}e_{i}$, $\psi=\sum\mu_{i}e^{i}$ and
$\varphi=\sum\sigma_{ij}e^{i,j}$, then

$\displaystyle\operatorname{ind}^{1}(\psi)(g)=\mu_{p}\left(\sum_{j=1}^{p}\alpha_{j}^{p}\lambda_{j}\right)$

and

$\displaystyle\operatorname{ind}^{2}(\varphi,\omega)(g,h)=\left(\sum_{i=1}^{p}\beta_{i}^{p}\lambda_{i}\right)\left(\sum_{j=1}^{p-1}\alpha_{j}\sigma_{jp}\right).$
(2.6)

######  Remark 2.3.

For a given $\varphi\in C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$, if
$(\varphi,\omega),(\varphi,\omega^{\prime})\in
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$, then ${\rm
d}^{2}_{*}(\varphi,\omega)={\rm d}^{2}_{*}(\varphi,\omega^{\prime})$. In
particular, with trivial coefficients,
$\operatorname{ind}^{2}(\varphi,\omega)$ depends only on $\varphi$.

##  3 The cohomology
$\boldsymbol{H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}}$ and
$\boldsymbol{H^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}}$

In this short section we compute, for $p\geq 5$, both the ordinary and
restricted 1-cohomology spaces $H^{1}(\mathfrak{m}_{2}^{\lambda}(p))$ and
$H^{1}_{*}(\mathfrak{m}_{2}^{\lambda}(p))$, and in particular we show that
these spaces are equal.

######  Theorem 3.1.

If $p\geq 5$ and ${\bf\lambda}\in\mathbb{F}^{p}$, then

$H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=H^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$

and the classes of $\big{\\{}e^{1},e^{2}\big{\\}}$ form a basis.

###### Proof.

Easily, the differential (2.3) has a kernel spanned by
$\big{\\{}e^{1},e^{2}\big{\\}}$, and $d^{0}=0$, so that

$H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\cong\mathbb{F}e^{1}\oplus\mathbb{F}e^{2}.$

As for any restricted Lie algebra,
$H^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ consists of those
ordinary cohomology classes $[\psi]\in
H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ for which
$\operatorname{ind}^{1}(\psi)=0$ (see [11, Theorem 2.1] or [7, Theorem 2]). If
$\psi=\sum_{k=1}^{p}\mu_{k}e^{k}$ is any ordinary cocycle, then $\mu_{p}=0$
($p\geq 5$) so that for any $g\in\mathfrak{m}_{2}^{\lambda}(p)$, we have

$\operatorname{ind}^{1}(\psi)(g)=\psi\big{(}g^{[p]}\big{)}=\mu_{p}\left(\sum_{k=1}^{p}\alpha_{k}^{p}\lambda_{k}\right)=0,$

and hence
$H^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}=H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$.
∎

######  Remark 3.2.

An alternate proof is the following

$H^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\cong\big{(}\mathfrak{m}_{2}^{\lambda}(p)/\big{[}\mathfrak{m}_{2}^{\lambda}(p),\mathfrak{m}_{2}^{\lambda}(p)\big{]}\big{)}^{\prime},$

where
$\mathfrak{g}^{\prime}=\operatorname{Hom}_{\mathbb{F}}(\mathfrak{g},\mathbb{F})$
denotes the vector space dual of $\mathfrak{g}$ and

$H^{1}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\cong\big{(}\mathfrak{m}_{2}^{\lambda}(p)/\big{(}\big{[}\mathfrak{m}_{2}^{\lambda}(p),\mathfrak{m}_{2}^{\lambda}(p)\big{]}+\mathop{\rm
span}\big{(}\mathfrak{m}_{2}^{\lambda}(p)^{[p]}\big{)}\big{)}\big{)}^{\prime}$

(see [8, Proposition 2.7]).

In particular, since $\mathop{\rm
span}\big{(}\mathfrak{m}_{2}^{\lambda}(p)^{[p]}\big{)}\subseteq\mathbb{F}e_{p}\subseteq\big{[}\mathfrak{m}_{2}^{\lambda}(p),\mathfrak{m}_{2}^{\lambda}(p)\big{]}$,
the ordinary and the restricted 1-cohomology spaces coincide.

######  Remark 3.3.

For $p\geq 5$, formula (2.3) shows that for $1\leq k\leq p$, ${\rm
d}^{1}(e_{k})=e^{1,k-1}+e^{2,k-2}$. For $k\geq 3$, let

$\displaystyle\varphi_{k}={\rm d}^{1}\big{(}e^{k}\big{)}=e^{1,k-1}+e^{2,k-2}.$

The set $\\{\varphi_{3},\varphi_{4},\dots,\varphi_{p}\\}$ is a basis for the
image ${\rm
d}^{1}\big{(}C^{1}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\big{)}$.

##  4 The cohomology
$\boldsymbol{H^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}}$ and
$\boldsymbol{H^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}}$

###  4.1 Ordinary cohomology

######  Lemma 4.1.

Let $p>5$. For $3\leq k\leq 2p-1$, let ${\rm d}^{2}_{k}\colon
C^{2}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{3}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ denote the restriction
of the differential ${\rm d}^{2}\colon
C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\to
C^{3}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ to the $k$th graded
component $C^{2}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$ of
$C^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$. Then $\ker\big{(}{\rm
d}^{2}_{k}\big{)}=0$ for $k\geq p+2$, and for $3\leq k\leq p+1$, basis
elements of $\ker\big{(}{\rm d}^{2}_{k}\big{)}$ are listed in the following
table:

$k=3$ |  $\varphi_{3}=e^{1,2}$ 1pt
---|---
$k=4$ |  $\varphi_{4}=e^{1,3}$1pt
$k=5$ |  $e^{1,4}$, $e^{2,3}$1pt
$k=6$ |  $\varphi_{6}=e^{1,5}+e^{2,4}$1pt
$k=7$ |  $\varphi_{7}=e^{1,6}+e^{2,5}$, $e^{1,6}+e^{3,4}$1pt
$8\leq k\leq p+1$ |  $\varphi_{k}=e^{1,k-1}+e^{2,k-2}$1pt

###### Proof.

A direct calculation using (2.4) shows that $d^{2}_{k}=0$ for $k=3,4,5$, ${\rm
d}^{2}_{6}\big{(}\sigma_{1,5}e^{1,5}+\sigma_{2,4}e^{2,4}\big{)}=(-\sigma_{1,5}+\sigma_{2,4})e^{1,2,3}$
and ${\rm
d}^{2}_{7}\big{(}\sigma_{1,6}e^{1,6}+\sigma_{2,5}e^{2,5}+\sigma_{3,4}e^{3,4}\big{)}=(-\sigma_{1,6}+\sigma_{2,5}+\sigma_{3,4})e^{1,2,4}$.

If $k\geq p+2$ and $\varphi=\sum\sigma_{i,j}e^{i,j}\in
C^{2}_{k}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$, then (2.4) implies that
${\rm d}^{2}_{k}(\varphi)$ will contain the terms

$\sum_{\begin{subarray}{c}k-p\leq i<s(k)\\\
i+j=k\end{subarray}}(\sigma_{i,j}+\sigma_{i+1,j-i})e^{1,i,j-1},$

where $s(k)=k/2-1$ if $k$ is even and $s(k)=(k-1)/2$ if $k$ is odd. If, in
addition, $\varphi$ is a cocycle, then we have the system of equations

$\displaystyle\sigma_{i,j}+\sigma_{i+1,j-i}=0,$ (4.1)

where $k-p\leq i<s(k)$ and $i+j=k$. Note that every coefficient $\sigma_{i,j}$
of $\varphi$ occurs in the system (4.1). Now, if $k<2p-2$ is even, then ${\rm
d}^{2}_{k}(\varphi)$ contains exactly one term with $e^{2,k/2-2,k/2}$, and
hence $\sigma_{k/2-2,k/2+2}=0$. The system (4.1) then implies that
$\sigma_{i,j}=0$ for all $i$, $j$ and hence $\varphi=0$. Likewise, if $k<2p-1$
is odd, then $e^{2,(k-1)/2-1,(k-1)/2}$ occurs once in ${\rm
d}^{2}_{k}(\varphi)$ forcing $\sigma_{(k-1)/2-1,(k-1)/2+2}=0$, and hence
$\varphi=0$. We can use (2.4) to directly check that $\ker\big{(}{\rm
d}^{2}_{2p-2}\big{)}=\ker\big{(}{\rm d}^{2}_{2p-1}\big{)}=0$ so that
$\ker\big{(}{\rm d}^{2}_{k}\big{)}=0$ for $k\geq p+2$.

Finally, if $8\leq k\leq p+1$, then ${\rm d}^{2}_{k}(\varphi)$ will also
contain the terms

$\sum_{\begin{subarray}{c}2\leq i<s(k)\\\
i+j=k\end{subarray}}(\sigma_{i,j}+\sigma_{i+1,j-i})e^{1,i,j-1}$

in addition to the term $-\sigma_{1,k-1}e^{1,2,k-3}$. If $\varphi$ is a
cocycle, then we have the system of equations

$\displaystyle-\sigma_{1,k-1}+\sigma_{2,k-2}+\sigma_{3,k-3}=0,$
$\displaystyle\sigma_{i,j}+\sigma_{i+1,j-i}=0,\qquad 3\leq i<s(k).$ (4.2)

The same argument used for $k\geq p+2$ above shows that the system (4.2)
implies $\sigma_{i,j}=0$ for $i\geq 3$. Therefore
$\sigma_{1,k-1}=\sigma_{2,k-2}$ and $\varphi_{k}=e^{1,k-1}+e^{2,k-2}$ spans
$\ker\big{(}{\rm d}^{2}_{k}\big{)}$. ∎

######  Theorem 4.2.

If $p=5$, then

$\dim\big{(}H^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(5)\big{)}\big{)}=3$

and the cohomology classes of the cocycles
$\big{\\{}e^{1,4},e^{1,5}+e^{2,4},e^{2,5}-e^{3,4}\big{\\}}$ form a basis.

If $p>5$, then

$\dim\big{(}H^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\big{)}=3$

and the cohomology classes of the cocycles
$\big{\\{}e^{1,4},e^{1,6}+e^{3,4},e^{1,p}+e^{2,p-1}\big{\\}}$ form a basis.

###### Proof.

If $p=5$, then the results of Lemma 4.1 still hold except for $k=7,8$ where we
have ${\rm
d}^{2}_{7}\big{(}\sigma_{2,5}e^{2,5}+\sigma_{3,4}e^{3,4}\big{)}=\big{(}\sigma_{2,5}+\sigma_{3,4}\big{)}e^{1,2,4}$
and $\ker\big{(}{\rm d}^{2}_{8}\big{)}=0$. It follows that

$\big{\\{}e^{1,2},e^{1,3},e^{1,4},e^{2,3},e^{1,5}+e^{2,4},e^{2,5}-e^{3,4}\big{\\}}$

is a basis for $\ker\big{(}{\rm d}^{2}\big{)}$. We can replace $e^{2,3}$ with
$\varphi_{5}=e^{1,4}+e^{2,3}$ in this basis so that, by Remark 3.3, the
classes of $\big{\\{}e^{1,4},e^{1,5}+e^{2,4},e^{2,5}-e^{3,4}\big{\\}}$ form a
basis for $H^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(5)\big{)}$.

If $p>5$, then Lemma 4.1 gives a basis for $\ker\big{(}{\rm d}^{2}\big{)}$. We
can again replace $e^{2,3}$ with $\varphi_{5}=e^{1,4}+e^{2,3}$ in this basis
so that, by Remark 3.3, the classes of
$\big{\\{}e^{1,4},e^{1,6}+e^{3,4},e^{1,p}+e^{2,p-1}\big{\\}}$ form a basis for
$H^{2}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}$. ∎

###  4.2 Restricted cohomology for $\boldsymbol{\lambda=0}$

If $\lambda=0$, then (2.6) shows that $\operatorname{ind}^{2}=0$ so that every
ordinary 2-cocycle $\varphi\in C^{2}\big{(}\mathfrak{m}_{2}^{0}(p)\big{)}$
gives rise to a restricted 2-cocycle $(\varphi,\tilde{\varphi})\in
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{0}(p)\big{)}$. Moreover, in the case that
$\varphi={\rm d}^{1}(\psi)$ is a 1-coboundary, we can replace
$\tilde{\varphi}$ with $\operatorname{ind}^{1}(\psi)$ and
$\big{(}\varphi,\operatorname{ind}^{1}(\psi)\big{)}=\big{(}{\rm
d}^{1}(\psi),\operatorname{ind}^{1}(\psi)\big{)}={\rm d}^{1}_{*}(\psi)$ is a
restricted 1-coboundary as well, and ${\rm
d}^{2}_{*}(\varphi,\tilde{\varphi})={\rm
d}^{2}_{*}\big{(}\varphi,\operatorname{ind}^{1}(\psi)\big{)}$ by Remark 2.3.
Finally, ${\rm d}^{2}_{*}\big{(}0,\overline{e}^{k}\big{)}=(0,0)$ for all
$1\leq k\leq p$, and the $\big{(}0,\overline{e}^{k}\big{)}$ are clearly
linearly independent. Together these remarks prove the following

######  Theorem 4.3.

Let $\lambda=0$. If $p=5$, then

$\dim\big{(}H_{*}^{2}\big{(}\mathfrak{m}_{2}^{0}(5)\big{)}\big{)}=8$

and the cohomology classes of the cocycles

$\big{\\{}\big{(}0,\overline{e}^{1}\big{)},\big{(}0,\overline{e}^{2}\big{)},\big{(}0,\overline{e}^{3}\big{)},\big{(}0,\overline{e}^{4}\big{)},\big{(}0,\overline{e}^{5}\big{)},\big{(}e^{1,4},\tilde{e}^{1,4}\big{)},\big{(}\varphi_{6},\tilde{\varphi}_{6}\big{)},\big{(}\xi,\tilde{\xi}\big{)}\big{\\}}$

form a basis where $\xi=e^{2,5}-e^{3,4}$.

If $p>5$, then

$\dim\big{(}H^{2}_{*}\big{(}\mathfrak{m}_{2}^{0}(p)\big{)}\big{)}=p+3$

and the cohomology classes of

$\big{\\{}\big{(}0,\overline{e}^{1}\big{)},\dots,\big{(}0,\overline{e}^{p}\big{)},\big{(}e^{1,4},\tilde{e}^{1,4}\big{)},\big{(}\eta,\tilde{\eta}\big{)},\big{(}\varphi_{p+1},\tilde{\varphi}_{p+1}\big{)}\big{\\}}$

form a basis where $\eta=e^{1,6}+e^{3,4}$.

######  Remark 4.4.

If $p\geq 5$, the maps $\tilde{\varphi}_{k}$ are identically zero for $k<p+1$
because the $(p-1)$-fold bracket in (2.5) always gives a multiple of $e_{p}$
so that $\varphi_{k}$ vanishes on $e_{p}\wedge\mathfrak{m}_{2}^{\lambda}(p)$
when $k<p+1$. This, in turn, implies that
$\tilde{\varphi}_{k}\in\operatorname{Hom}_{\rm
Fr}\big{(}\mathfrak{m}_{2}^{\lambda}(p),\mathbb{F}\big{)}$, and since
$\tilde{\varphi}_{k}(e_{i})=0$ for all $i$, we have $\tilde{\varphi}_{k}=0$.
Likewise, $\tilde{e}^{1,4}=0$, $\tilde{\eta}=0$, and $\tilde{\xi}=0$ unless
$p=5$. The restriction of $\varphi_{p+1}$ to
$e_{p}\wedge\mathfrak{m}_{2}^{\lambda}(p)$ is equal to $e^{1,p}$ so that
$\tilde{\varphi}_{p+1}=\tilde{e}^{1,p}$. If $p=5$, then the restriction of
$\xi$ to $e_{5}\wedge\mathfrak{m}_{2}^{\lambda}(5)$ is equal to $e^{2,5}$ so
$\tilde{\xi}=\tilde{e}^{2,5}$. We can then use (2.5) to give explicit
descriptions for $\tilde{\varphi}_{p+1}$ and $\tilde{\xi}$ (when $p=5$):

$\displaystyle\tilde{\varphi}_{p+1}\left(\sum_{i=1}^{p}\alpha_{i}e_{i}\right)=\tilde{e}^{1,p}\left(\sum_{i=1}^{p}\alpha_{i}e_{i}\right)=\alpha_{1}^{p-1}\alpha_{2},$
$\displaystyle\tilde{\xi}\left(\sum_{i=1}^{5}\alpha_{i}e_{i}\right)=\tilde{e}^{2,5}\left(\sum_{i=1}^{5}\alpha_{i}e_{i}\right)=\frac{1}{2}\alpha_{1}^{3}\alpha_{2}^{2}.$

######  Remark 4.5.

The dimensions in Theorem 4.3 can also be deduced from Theorems 3.1 and 4.2
and the six-term exact sequence in [11] precisely as in [5, Remark 4].

###  4.3 Restricted cohomology for $\boldsymbol{\lambda\neq 0}$

If $\varphi=\sum\sigma_{ij}e^{i,j}$ and $(\varphi,\omega)\in
C^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}\big{)}$, then (2.6) shows that

$\operatorname{ind}^{2}(\varphi,\omega)(e_{j},e_{i})=\lambda_{i}\sigma_{jp}.$

Therefore, if $\lambda\neq 0$, then ${\rm
d}^{2}_{*}(\varphi,\omega)=\big{(}{\rm
d}^{2}\varphi,\operatorname{ind}^{2}(\varphi,\omega)\big{)}=(0,0)$ if and only
if ${\rm d}^{2}\varphi=0$ and
$\sigma_{1p}=\sigma_{2p}=\cdots=\sigma_{p-1p}=0$.

######  Theorem 4.6.

If $p=5$, then

$\dim\big{(}H^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(5)\big{)}\big{)}=6$

and the cohomology classes of

$\big{\\{}\big{(}0,\overline{e}^{1}\big{)},\big{(}0,\overline{e}^{2}\big{)},\big{(}0,\overline{e}^{3}\big{)},\big{(}0,\overline{e}^{4}\big{)},\big{(}0,\overline{e}^{5}\big{)},\big{(}e^{1,4},\tilde{e}^{1,4}\big{)}\big{\\}}$

form a basis.

If $p>5$, then

$\dim\big{(}H^{2}_{*}\big{(}\mathfrak{m}_{2}^{\lambda}(p)\big{)}\big{)}=p+2$

and the cohomology classes of

$\big{\\{}\big{(}0,\overline{e}^{1}\big{)},\dots,\big{(}0,\overline{e}^{p}\big{)},\big{(}e^{1,4},\tilde{e}^{1,4}\big{)},\big{(}\eta,\tilde{\eta}\big{)}\big{\\}}$

form a basis where $\eta=e^{1,6}+e^{3,4}$.

##  5 One-dimensional central extensions

One-dimensional central extensions $E=\mathfrak{g}\oplus\mathbb{F}c$ of an
ordinary Lie algebra $\mathfrak{g}$ are parameterized by the cohomology group
$H^{2}(\mathfrak{g})$ [10, Chapter 1, Section 4.6], and restricted one-
dimensional central extensions of a restricted Lie algebra $\mathfrak{g}$ with
$c^{[p]}=0$ are parameterized by the restricted cohomology group
$H^{2}_{*}(\mathfrak{g})$ [11, Theorem 3.3]. If $(\varphi,\omega)\in
C^{2}_{*}(\mathfrak{g})$ is a restricted 2-cocycle, then the corresponding
restricted one-dimensional central extension $E=\mathfrak{g}\oplus\mathbb{F}c$
has Lie bracket and $[p]$-operation defined by

$\displaystyle[g,h]=[g,h]_{\mathfrak{g}}+\varphi(g\wedge h)c,$
$\displaystyle[g,c]=0,$ $\displaystyle
g^{[p]}=p^{[p]_{\mathfrak{g}}}+\omega(g)c,$ $\displaystyle c^{[p]}=0,$ (5.1)

where $[\cdot,\cdot]_{\mathfrak{g}}$ and $\cdot^{[p]_{\mathfrak{g}}}$ denote
the Lie bracket and $[p]$-operation in $\mathfrak{g}$, respectively [7,
equations (26) and (27)]. We can use (5.1) to explicitly describe the
restricted one-dimensional central extensions corresponding to the restricted
cocycles in Theorems 4.3 and 4.6. For the rest of this section, let
$g=\sum\alpha_{i}e_{i}$ and $h=\sum\beta_{i}e_{i}$ denote two arbitrary
elements of $\mathfrak{m}_{2}^{\lambda}(p)$.

Let $E_{k}=\mathfrak{m}_{2}^{\lambda}(p)\oplus\mathbb{F}c$ denote the one-
dimensional restricted central extension of $\mathfrak{m}_{2}^{\lambda}(p)$
determined by the cohomology class of the restricted cocycle
$\big{(}0,\overline{e}^{k}\big{)}$. Then just as with
$\mathfrak{m}_{0}^{\lambda}(p)$ and $\mathfrak{V}(p)$ (see [5, Theorem 5.1]
and [6, Theorem 3.1]), the $\big{(}0,\overline{e}^{k}\big{)}$ span a
$p$-dimensional subspace of $H^{2}_{*}$, and (5.1) gives the bracket and
$[p]$-operation in $E_{k}$:

$\displaystyle[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)},$
$\displaystyle[g,c]=0,$ $\displaystyle
g^{[p]}=g^{[p]_{\mathfrak{m}_{2}^{\lambda}(p)}}+\alpha_{k}^{p}c,$
$\displaystyle c^{[p]}=0.$

For restricted cocycles $(\varphi,\tilde{\varphi})$ with $\varphi\neq 0$, we
summarize the corresponding restricted one-dimensional central extensions
$E_{(\varphi,\tilde{\varphi})}$ in the following tables. Everywhere in the
tables, we omit the brackets $[g,c]=0$ and $[p]$-operation $c^{[p]}=0$ for
brevity.

If $\lambda=0$, then there are three restricted cocycles
$(\varphi,\tilde{\varphi})$ with $\varphi\neq 0$ for a given prime (Theorem
4.3). We note that if $\lambda=0$, then (2.2) implies
$g^{[p]_{\mathfrak{m}_{2}^{\lambda}(p)}}=0$ for all
$g\in\mathfrak{m}_{2}^{\lambda}(p)$.

Table 1: Restricted one-dimensional central extensions with $\varphi\neq 0$
and $\lambda=0$. $p=5$
---
$\big{(}e^{1,4},0\big{)}$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{4}-\alpha_{4}\beta_{1})c$2pt
| $g^{[p]}=0$
$\big{(}\xi,\tilde{\xi}\big{)}$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{2}\beta_{5}-\alpha_{5}\beta_{2}-\alpha_{3}\beta_{4}+\alpha_{4}\beta_{3})c$2pt
$\xi=e^{2,5}-e^{3,4}$ |  $g^{[p]}=\frac{1}{2}\alpha_{1}^{3}\alpha_{2}^{2}c$2pt
$(\varphi_{6},\tilde{\varphi}_{6})$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{5}-\alpha_{5}\beta_{1}+\alpha_{2}\beta_{4}-\alpha_{4}\beta_{2})c$2pt
|  $g^{[p]}=\frac{1}{2}\alpha_{1}^{4}\alpha_{2}c$2pt
$p>5$
$\big{(}e^{1,4},0\big{)}$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{4}-\alpha_{4}\beta_{1})c$2pt
| $g^{[p]}=0$
$(\eta,0)$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{6}-\alpha_{6}\beta_{1}+\alpha_{3}\beta_{4}-\alpha_{4}\beta_{3})c$2pt
$\eta=e^{1,6}+e^{3,4}$ | $g^{[p]}=0$
$(\varphi_{p+1},\tilde{\varphi}_{p+1})$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{p}-\alpha_{p}\beta_{1}+\alpha_{2}\beta_{p-1}-\alpha_{p-1}\beta_{2})c$2pt
| $g^{[p]}=\alpha_{1}^{p-1}\alpha_{2}c$

If $\lambda\neq 0$ and $p=5$, then the only restricted cocycle
$(\varphi,\tilde{\varphi})$ with $\varphi\neq 0$ is $(e^{1,4},0)$. If $p>5$,
then the restricted cocycles $(\varphi,\tilde{\varphi})$ with $\varphi\neq 0$
are $(e^{1,4},0)$ and $(\eta,0)$ (Theorem 4.6).

Table 2: Restricted one-dimensional central extensions with $\varphi\neq 0$
and $\lambda\neq 0$. $p=5$
---
$\big{(}e^{1,4},0\big{)}$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{4}-\alpha_{4}\beta_{1})c$2pt
| $g^{[p]}=g^{[p]_{\mathfrak{m}_{2}^{\lambda}(p)}}$
$p>5$
$\big{(}e^{1,4},0\big{)}$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{4}-\alpha_{4}\beta_{1})c$2pt
| $g^{[p]}=g^{[p]_{\mathfrak{m}_{2}^{\lambda}(p)}}$
$(\eta,0)$ |  $[g,h]=[g,h]_{\mathfrak{m}_{2}^{\lambda}(p)}+(\alpha_{1}\beta_{6}-\alpha_{6}\beta_{1}+\alpha_{3}\beta_{4}-\alpha_{4}\beta_{3})c$2pt
$\eta=e^{1,6}+e^{3,4}$ | $g^{[p]}=g^{[p]_{\mathfrak{m}_{2}^{\lambda}(p)}}$

### Acknowledgements

The authors are grateful to Dmitry Fuchs for fruitful conversations, and the
referees whose comments greatly improved the exposition of this paper.

## References

  * [1] Caranti A., Mattarei S., Newman M.F., Graded Lie algebras of maximal class, Trans. Amer. Math. Soc. 349 (1997), 4021–4051.
  * [2] Caranti A., Newman M.F., Graded Lie algebras of maximal class. II, J. Algebra 229 (2000), 750–784, arXiv:math.RA/9906160.
  * [3] Chevalley C., Eilenberg S., Cohomology theory of Lie groups and Lie algebras, Trans. Amer. Math. Soc. 63 (1948), 85–124.
  * [4] Evans T.J., Fialowski A., Restricted one-dimensional central extensions of restricted simple Lie algebras, Linear Algebra Appl. 513 (2017), 96–102, arXiv:1506.09025.
  * [5] Evans T.J., Fialowski A., Restricted one-dimensional central extensions of the restricted filiform Lie algebras ${\mathfrak{m}}_{0}^{\lambda}(p)$, Linear Algebra Appl. 565 (2019), 244–257, arXiv:1801.08178.
  * [6] Evans T.J., Fialowski A., Penkava M., Restricted cohomology of modular Witt algebras, Proc. Amer. Math. Soc. 144 (2016), 1877–1886, arXiv:1502.04531.
  * [7] Evans T.J., Fuchs D., A complex for the cohomology of restricted Lie algebras, J. Fixed Point Theory Appl. 3 (2008), 159–179.
  * [8] Feldvoss J., On the cohomology of restricted Lie algebras, Comm. Algebra 19 (1991), 2865–2906.
  * [9] Fialowski A., On the classification of graded Lie algebras with two generators, Moscow Univ. Math. Bull. 38 (1983), 76–79.
  * [10] Fuks D.B., Cohomology of infinite-dimensional Lie algebras, Contemporary Soviet Mathematics, Consultants Bureau, New York, 1986.
  * [11] Hochschild G., Cohomology of restricted Lie algebras, Amer. J. Math. 76 (1954), 555–580.
  * [12] Jacobson N., Lie algebras, Interscience Tracts in Pure and Applied Mathematics, Vol. 10, Interscience Publishers, New York – London, 1962.
  * [13] Jurman G., Graded Lie algebras of maximal class. III, J. Algebra 284 (2005), 435–461.
  * [14] Millionschikov D.V., Graded filiform Lie algebras and symplectic nilmanifolds, in Geometry, Topology, and Mathematical Physics, Amer. Math. Soc. Transl. Ser. 2, Vol. 212, Amer. Math. Soc., Providence, RI, 2004, 259–279, arXiv:math.RA/0205042.
  * [15] Strade H., Farnsteiner R., Modular Lie algebras and their representations, Monographs and Textbooks in Pure and Applied Mathematics, Vol. 116, Marcel Dekker, Inc., New York, 1988.


# A Car Model Identification System for Streamlining the Automobile Sales
Process

Said Togru
<EMAIL_ADDRESS>Marco Moldovan
<EMAIL_ADDRESS>
###### Abstract

This project presents an automated solution for the efficient identification
of car models and makes from images, aimed at streamlining the vehicle listing
process on online car-selling platforms. Through a thorough exploration
encompassing various efficient network architectures including Convolutional
Neural Networks (CNNs), Vision Transformers (ViTs), and hybrid models, we
achieved a notable accuracy of 81.97% employing the EfficientNet (V2 b2)
architecture. To refine performance, a combination of strategies, including
data augmentation, fine-tuning pretrained models, and extensive hyperparameter
tuning, were applied. The trained model offers the potential for automating
information extraction, promising enhanced user experiences across car-selling
websites.

##  1 Introduction

For individuals looking to sell their cars, online platforms like mobile.de or
AutoScout24 offer a convenient way to showcase their vehicles to potential
buyers. However, entering all vehicle details can be cumbersome, requiring
users to manually input various information such as the car model,
manufacturer, etc. Given that images of the vehicles for sale are typically
uploaded in this process, there exists a promising potential for automating
the identification and extraction of key details from these images, reducing
the chances of errors and expediting the listing process.

Recognizing the need for an efficient and user-friendly solution, our project
addresses this challenge by employing a deep learning (DL) model that
accurately identifies car models and makes in images. We aim to find and
optimize a model architecture that performs well in the given task while still
being lightweight and fast.

##  2 Theory

###  2.1 Fine-grained Image Classification

Fine-grained image classification involves categorizing objects within a
broader category into more specific subcategories. Unlike traditional image
classification, where the goal is to differentiate between broad object
categories (e.g., cats vs. dogs), fine-grained classification targets subtle
differences between visually similar subcategories (e.g., different species of
birds or, in our case, distinct car models) which makes it more challenging
[1]. For example, cars from different manufacturers might share similar body
shapes or design cues, creating a potential for misclassification.
Additionally, even within a single car model, considerable design differences
may exist, such as variations in color, features, accessories, and more.

###  2.2 Deep Neural Networks for Image Classification

Deep learning has ushered in a paradigm shift in computer vision,
revolutionizing the way machines understand visual information. Unlike
traditional algorithms that require handcrafted features, deep learning
employs neural networks with multiple layers to automatically learn relevant
patterns and representations from raw data. This enables the system to
decipher intricate details and nuances that are often difficult for human
engineers to define.

####  2.2.1 Convolutional Neural Networks

As a subset of deep neural networks, Convolutional Neural Networks (CNNs)
occupy a pivotal position in the field of image classification and are
therefore ideally suited for our task of recognizing car models and brands
from images.

CNNs excel in their ability to perform hierarchical feature extraction.
Starting with low-level features in early layers - such as edges and vertices
- CNNs progressively move to higher-level features representing complex
patterns and objects. The architecture of CNNs is inspired by the organization
of the human visual system. It consists of interconnected layers, each of
which serves a specific purpose in the feature extraction process.
Convolutional layers use adaptive filters to detect specific features such as
edges, textures, and more complex shapes. Subsequent pooling layers downsample
the data to preserve essential information while reducing computational
overhead. Fully connected layers at the end of the network combine these
extracted features to make high-level predictions.

Figure 1: Comparison of ImageNet performances of different model
architectures. [6] Figure 2: Performance of EfficientNet. [26]

Figure 1 provides a comparative overview of various deep neural network
architectures in terms of their performances on the ImageNet dataset [6]
relative to their computational complexity measured in FLOPs (Floating Point
Operations). Certain models stand out for their architectural innovations and
remarkable performance.

One of the most popular CNN architectures [3] is ResNet [13], which introduced
the concept of residual connections. This allowed for the training of much
deeper networks than was previously feasible.

In the DenseNet architecture [14], each layer receives input from all
preceding layers, improving information flow and reducing the number of
parameters. This architecture enhances feature reuse and leads to more compact
models.

EfficientNet [26] uses a compound scaling method to scale up the network
width, depth, and resolution simultaneously. By optimizing these three
dimensions together,state-of-the-art performance is achieved with fewer
parameters and lower computational costs (see Figure 2). It has become a
popular choice for a wide range of computer vision applications due to its
efficiency and effectiveness.

Other notable architectures that have made significant contributions to the
field of computer vision include Inception [25], with its multi-scale feature
extraction, and Xception [9], with its depthwise separable convolutions. Older
popular CNN models, such as AlexNet [17] and VGG [24], have been largely
superseded by these more recent architectures. Additionally, smaller-sized
models like SqueezeNet [15] and MobileNet [23] were designed to prioritize
lightweight and efficient computations for mobile deployment, although they do
trade off some accuracy to achieve these goals.

####  2.2.2 Vision Transformers

Vision Transformers, or ViTs, offer an alternative to Convolutional Neural
Networks (CNNs) for image classification tasks by employing a transformer-
based model. While transformers have originally been developed for natural
language processing tasks, their application to visual data has yielded
remarkable results. For instance, the best-ranked classification models on
Papers With Code for the ImageNet dataset used transformer models [2].

The transformer architecture relies on a mechanism known as self-attention,
enabling it to capture global dependencies within a sequence of data, whether
it’s a sentence or an image. In the context of images, the Vision Transformer
(ViT) segments the image into fixed-size patches and flattens them into a
sequence of vectors. Subsequently, these vectors are processed by the
transformer’s attention mechanism to capture intricate, long-range
relationships between patches. As a result, the model gains the ability to
focus on multiple regions within the image, a capability that CNNs may
struggle with. This quality makes ViTs particularly intriguing for tasks that
demand comprehension of both overarching context and fine-grained
distinctions, as in the case of fine-grained image classification. ViTs can
outperform CNNs, especially when trained on large datasets. However, ViTs
often come with higher computational and memory costs. The self-attention
mechanism in transformers has quadratic complexity with respect to the
sequence length (number of patches in the case of images), and transformer-
based models typically have a large number of parameters, increasing memory
requirements and training time.

Recent advancements in transformer architectures have, however, helped reduce
the computational costs of ViTs, making them more competitive with CNNs.

MobileViT [19] is a variant of the Vision Transformer designed for mobile and
edge devices. It combines the self-attention mechanism of transformers with
the efficient convolutional layers of MobileNets. MobileViT is optimized for
low computational cost and memory footprint, making it suitable for deployment
on resource-constrained devices while still achieving competitive performance
on image classification tasks.

Swin Transformer [18] is another variant of the Vision Transformer that
introduces a hierarchical structure to the self-attention mechanism. It
partitions the image into non-overlapping windows and applies self-attention
within each window, effectively reducing the computational burden. This local
self-attention is then progressively expanded to larger windows in deeper
layers, capturing both local and global dependencies.

####  2.2.3 Hybrid Models

Hybrid models in the context of image classification aim to leverage the
strengths of both CNNs and transformers, such as the local feature extraction
capabilities of CNNs and the global context understanding of transformers.

One example of a hybrid model is CoAtNet [11], which integrates the self-
attention mechanism of transformers with the convolutional layers of CNNs. In
CoAtNet, convolutional layers are used for feature extraction, capturing local
patterns and textures in the image. These extracted features are then fed into
transformer layers, which use self-attention to capture global dependencies
and relationships between different regions of the image. This combination
makes the model versatile and adaptive, suitable for complex visual tasks
requiring both detailed feature recognition and broader context understanding.

##  3 Data

To create a robust foundation for our model aimed at streamlining online car
sales, we’ve decided to use an extensive car model dataset. The dataset
comprises two key sections: ”BMW-10,” featuring a set of ultra-fine-grained
BMW sedan images (512 images), and ”car-197,” a comprehensive collection
encompassing 197 car models (16,185 images), spanning various categories like
sedans, SUVs, coupes, convertibles, pickups, hatchbacks, and station wagons.

The process of dataset construction was not without challenges. Addressing the
issue of identifying visually distinct classes, the authors initiated by
crawling a prominent car website to obtain a list of car types produced since
1990. A rigorous deduplication approach, employing perceptual hashing, was
subsequently applied to example images, resulting in a subset of visually
distinct classes, from which we selected 197.

Candidate images were collated from sources like Flickr, Google, and Bing for
each class. To ensure effective annotation and a diverse dataset, the
candidate images underwent deduplication using the same perceptual hash
algorithm, ultimately retaining several thousand images for each of the 197
target classes. These images were then annotated via Amazon Mechanical Turk
(AMT) to ascertain their alignment with the respective target classes.

To address the challenge posed by non-expert annotators, we devised a
qualification task, complemented by sets of positive and negative example
images. In the quest for reliable annotations, we employed the Get Another
Label (GAL) system, which estimates candidate image probabilities for target
classes and annotator quality.

After compiling images for all 197 classes, we employed AMT to annotate
bounding boxes using a quality-controlled system. A final deduplication phase
was implemented following the cropping of images to bounding boxes. This
carefully curated ”Stanford Cars Dataset” serves as a valuable resource,
driving the development of a model tailored to optimize online car sales.[16]

##  4 Implementation

###  4.1 Project Architecture

The successful realization of our optimized 2D car image classification model
owes much to the robust tooling and libraries employed in its development. Our
implementation leveraged the power and flexibility of PyTorch, a prominent
deep learning framework, to orchestrate the core components of our model
architecture. PyTorch’s intuitive interface and dynamic computation graph
facilitated seamless experimentation and efficient model development.[21]

To streamline and enhance the training process, we used the PyTorch Lightning
scaffold. This abstraction layer not only simplified the training loop
implementation but also enabled us to take advantage of Lightning’s automated
training features, such as distributed training and mixed-precision support.
This significantly expedited the model training process and enhanced its
scalability.

Configuring and organizing the myriad parameters associated with our model and
training pipeline was seamlessly achieved using Hydra. This configuration
management tool provided a structured approach to parameter tuning and
experimentation, ensuring the reproducibility of results and enabling
systematic exploration of hyperparameters.

In addition to model training and configuration management, we enriched our
implementation with a user-friendly graphical user interface (GUI) using
Gradio. This intuitive library enabled the creation of a user interface for
testing and validating the trained models. Through Gradio, stakeholders and
users can effortlessly interact with the model, gaining real-time insights
into its performance and fine-tuning its behavior.

In summary, our implementation was greatly fortified by the amalgamation of
PyTorch for deep learning, PyTorch Lightning for streamlined model training,
Hydra for organized configuration, and Gradio for intuitive GUI development.
This comprehensive toolset empowered us to not only develop a highly accurate
and robust model for 2D car image classification but also facilitated seamless
model testing, validation, and integration within the context of online car
sales optimization.

###  4.2 Data Augmentation

####  4.2.1 Data Preprocessing and Augmentation: Enhancing Model Robustness

Data augmentation plays a crucial role in bolstering the effectiveness and
generalization capabilities of models trained on limited datasets. In our
endeavor to optimize online car sales through 2D image classification, we have
extensively employed a range of data augmentation techniques to enhance the
robustness of our model.

####  4.2.2 Importance of Image Augmentation

Image augmentation serves as a potent strategy to alleviate the challenges
posed by limited training data. By artificially diversifying the dataset,
augmentation mitigates the risk of overfitting, where a model becomes
excessively tailored to the training samples. Additionally, augmentation
imparts the model with the ability to discern salient features under varied
conditions, thus enabling it to make accurate predictions on unseen real-world
data.

####  4.2.3 Augmentation Techniques Employed

  * •

Horizontal and Vertical Flip: Mirroring images along both horizontal and
vertical axes augments the dataset by providing variations of the same object
from different perspectives, thereby improving the model’s ability to
recognize objects regardless of their orientation.

  * •

Rotation: Applying rotational transformations introduces variations in object
orientation, enabling the model to learn robust features from objects viewed
at different angles.

  * •

Greyscale Conversion: Transforming images to greyscale removes color
information, challenging the model to focus solely on shape and texture,
thereby enhancing its ability to generalize across different color
representations.

  * •

Gaussian Blur: Introducing controlled blurring simulates real-world variations
in image quality, contributing to improved model resilience against noisy or
imperfect input data.

  * •

Random Crop: Extracting random subregions from images diversifies the training
set, forcing the model to learn from different object contexts and spatial
distributions.

  * •

Normalization: Scaling pixel values to a common range standardizes input
images, ensuring consistent data representation and aiding convergence during
training.

  * •

Adjusted Brightness, Contrast, and Saturation: Manipulating brightness,
contrast, and saturation levels introduces variations in lighting and color
balance, enabling the model to recognize objects under varying conditions.

Notably, we implemented a stochastic data augmentation module that transforms
any given data example randomly. In this work, we were heavily inspired by the
data augmentation procedures of SimCLR[8] and BYOL[12] and similar
foundational image representation learning papers.[29][5][7] We sequentially
apply the above mentioned augmentations according to a corresponding random
value with probability 0,5 that we sample per augmentation. This enables us to
produce a plethora of different image variants, effectively increasing the
size of our dataset by a huge margin.

####  4.2.4 Advantages of Augmentation

The implementation of image augmentation within our data preprocessing
pipeline carries a multitude of advantages that are pivotal in augmenting the
overall efficacy and adaptability of our model for 2D image classification, a
key element in optimizing online car sales. This technique, which introduces
controlled variations to the training data, serves as a potent tool in
addressing the challenges associated with limited datasets and fostering the
development of highly capable models.

Enhanced Robustness to Variability: By subjecting our model to augmented data,
we effectively simulate a wider spectrum of real-world scenarios and potential
input variations. This exposure to diverse data instances imbues the model
with an increased resilience to noise, distortions, and imperfections that
might arise in actual online car images. As a result, the model becomes more
adept at discerning and accommodating variations in lighting conditions,
object orientations, and subtle textual details, ensuring that it can make
accurate predictions even when presented with non-ideal inputs.

Mitigation of Overfitting: The risk of overfitting, a common challenge when
working with limited training data, is considerably reduced through the
incorporation of augmentation techniques. Overfitting occurs when a model
becomes overly specialized in memorizing training examples and struggles to
generalize to new data. Augmentation counteracts this by introducing a broader
range of training instances, preventing the model from fixating on specific
features present in the limited original data. This, in turn, encourages the
model to learn more abstract and transferable features that are applicable
across a wider range of instances.

Improved Feature Extraction: Image augmentation compels the model to focus on
higher-level and invariant features rather than overly specific details
present in the original training set. This transition towards more generalized
feature extraction empowers the model to differentiate between essential
characteristics of car images, such as distinguishing between different car
models based on structural elements, proportions, and prominent design
features. Consequently, the model becomes adept at capturing the intrinsic
attributes that define each car type, irrespective of the specific instance’s
visual intricacies.

Enriched Diversity in Learning: A diverse training dataset, achieved through
augmentation, propels the model’s learning experience beyond the confines of
the original data distribution. This diversity primes the model to recognize
patterns and attributes across a broader spectrum of contexts, effectively
expanding its knowledge base. As a result, the model’s predictions become more
accurate and adaptable when exposed to new and previously unseen car images, a
vital competence in the context of online car sales where variations in image
quality, background, and angles are common.

Practical Real-World Applicability: In the realm of optimizing online car
sales, the real-world applicability of the trained model is of paramount
importance. Augmentation ensures that the model is well-equipped to handle the
inherent heterogeneity of online car images, a scenario where image quality,
lighting conditions, and object orientations can significantly vary. By
mimicking these real-world challenges during training, augmentation ensures
that the model is well-prepared to seamlessly integrate into the online car
sales process, contributing to accurate and reliable classification outcomes.

In conclusion, image augmentation emerges as a pivotal technique within our
data preprocessing framework, aligning harmoniously with our overarching goal
of streamlining online car sales through refined 2D image classification. By
enhancing the model’s robustness, mitigating overfitting, promoting feature
extraction, embracing diversity, and bolstering real-world applicability,
augmentation stands as a cornerstone in our pursuit of creating a highly
effective and adaptable model for online car sales
optimization.[28][22][10][20]

###  4.3 Model Implementation

####  4.3.1 Model Selection

The PyTorch Lightning Template allowed us to easily try out different models
for training due to its separation of concerns. This modular approach
facilitated experimentation with various architectures and hyperparameters.

We aimed to select a diverse set of models that would allow us to explore how
different architectures perform on the car model classification task. We chose
the models according to these factors:

  * •

Diversity: We wanted to explore a range of architectures, including CNNs,
ViTs, and hybrid models, to understand their strengths and weaknesses in the
context of car model classification.

  * •

Efficiency: A primary consideration was the lightweight nature of the models.
As we envisioned the application of the car model identification system for a
car selling website, it’s imperative to have low inference times. The website
would likely have many users, and it is important to provide quick and
responsive service to avoid making users wait for information. Lightweight
models ensure that even with a high volume of user queries, the system remains
efficient. Moreover, we had computational constraints due to our limited
resources which already excluded certain large and complex models. One of the
indicators for inference time is Floating Point Operations (FLOPs), the number
of operations required for a single forward pass through the model.

  * •

Performance: While efficiency was important, we also wanted models that
performed well on the task, i.e. a balance between speed and accuracy (e.g.
left upper corner in Figure 1). We used the ImageNet benchmark [2] as an
indicator for performance.

We finally selected three CNNs (ResNet, EfficientNet and DenseNet), two ViTs
(MobileVit, SwinTransformer) and a hybrid model (CoaTNet). We implemented our
models using the torchvision and timm libraries, which provide a wide range of
state-of-the-art neural network architectures. The specific model versions
were ResNet50 and DenseNet161 from torchvision as well as EfficienNetV2_B2,
MobileVit_S, Swin_S3_tiny and Coat_lite_mini from timm.

####  4.3.2 Finetuning Models

Given our midsized dataset, we adopted a transfer learning approach, utilizing
pre-trained models as feature extractors and fine-tuning them on our car model
dataset. Transfer learning allows us to leverage the knowledge gained from
training on large-scale datasets, such as ImageNet, and apply it to our
specific task of car model classification, which has a smaller amount of
labeled data.

We froze all layers of the pre-trained model, except for the last layer and
the classifier. Freezing the layers means that their weights will not be
updated during training, and only the weights of the unfrozen layers will be
fine-tuned. This approach can be beneficial when working with a small dataset,
as it reduces the risk of overfitting by limiting the number of trainable
parameters. It also speeds up the training process, as fewer gradients need to
be computed.

The classifier was replaced by a Dropout Layer, followed by a Linear layer.
Dropout is a regularization technique used in neural networks to prevent
overfitting. Dropout randomly deactivates a fraction of the neurons in a layer
at each iteration, effectively ”dropping out” those neurons from the network.
The fraction of neurons to drop is specified by the dropout rate, a
hyperparameter typically set between 0.2 and 0.5. When dropout is applied, the
output of the dropped neurons is set to zero, and the remaining neurons must
adapt to the absence of those neurons. This prevents the network from relying
too heavily on any single neuron and encourages it to learn more robust and
generalized features. At inference time, dropout is turned off, and all
neurons are used for prediction. However, the weights of the neurons are
scaled down by the dropout rate to compensate for the increased number of
active neurons compared to training. This ensures that the overall magnitude
of the network’s output remains consistent between training and inference.

###  4.4  Training Infrastructure and Configuration Architecture

The architecture of our deep learning system has been constructed to
facilitate robust and efficient model training, aiming for optimal performance
outcomes. At the heart of our infrastructure lies the ”defaults” section
within our YAML configuration. This foundational element orchestrates a myriad
of training components in a hierarchical manner, spanning from the nuanced
intricacies of data ingestion to the precision-driven strategies of
hyperparameter optimization.

To achieve modularity, we have constructed distinct YAML files, each designed
to oversee specific segments such as datasets, model architectures, callback
functions, and sophisticated logging mechanisms. This approach not only
fosters clarity and manageability but also ensures that each segment functions
seamlessly within the overarching training framework.

Our tool of choice for this venture was Optuna, an open-source hyperparameter
optimization framework [4]. Central to Optuna’s efficiency is the Tree-
structured Parzen Estimator (TPE)[27]. Unlike traditional methods that either
exhaustively evaluate a fixed space (grid search) or rely on random chance
(random search), TPE utilizes Bayesian optimization principles. It forms a
probability model based on previous hyperparameter performances, dividing them
into better and worse outcomes. For new trials, TPE then selects
hyperparameters that maximize the likelihood of favorable results. This
probability-driven approach allows TPE to zone in on optimal regions of the
hyperparameter space quickly, offering a blend of efficiency and precision.
Integrating Optuna, with TPE at its core, ensured our models were trained
effectively, making the most of available computational resources.

To streamline the execution phase of model training, distinct shell scripts
have been devised for each model. The modular approach guarantees that the
unique prerequisites and configurations specific to each model are met without
any cross-interference. This strategy provides a level of granularity and
command over every individual training process. Moreover, it is worth noting
that our methodology is tactically designed to leverage the computing
capabilities of LMU.

###  4.5 Initial Training and Hyperparameter Space Exploration

During the formative stages of our research, the initiation of training for
all six models was conducted over a span of 10 epochs. Predominantly, our
primary objective during this phase was to delve deep into hyperparameter
exploration, rather than maximizing model performance per training run.

For each model, we employed Optuna to conduct 30 distinct trials. The
selection of this number was grounded in both theoretical foundations and
practical considerations. At the foremost, 30 trials furnish a sufficiently
expansive foray into the hyperparameter space, amplifying the probability of
zeroing in on a configuration that approaches optimality. Moreover, based on
historical data and empirical findings from similar research endeavors, a set
of 30 trials emerged as a sweet spot, balancing the depth and breadth of the
hyperparameter search with computational prudence.

Our Optuna setup consisted of following parameter selections:

  * •

model.optimizer.target: The choice between ’torch.optim.Adam’ and
’torch.optim.SGD’ aims to investigate the impact of different optimization
techniques on model convergence and performance. While Adam tends to adapt
learning rates for each parameter and might converge faster, SGD is often
appreciated for its generalization and has been a staple in deep learning[30].

  * •

model.net.dropout_value: The interval of 0.3 to 0.6 was chosen to test the
efficacy of dropout in preventing overfitting. By varying dropout values
within this range, we aim to identify a sweet spot where the model maintains
robustness without sacrificing training accuracy[liu2023dropout].

  * •

data.batch_size: The choices of 32, 64, and 128 cater to the diverse memory
requirements of different models. Given that larger batch sizes like 128 are
incompatible with models such as ’swintran’ and ’mobilevit’ on an 8GB GPU, and
also problematic for ’densenet’, this decision was a direct nod to ensuring
efficient GPU utilization without compromising the integrity of the training
process.

  * •

model.scheduler.patience: The integer interval from 5 to 10 gauges the number
of epochs with no improvement before adjusting the learning rate. By exploring
this range, we aim to strike a balance between allowing models to learn and
preventing prolonged stagnation during training.

  * •

model.scheduler.factor: Spanning from 0.1 to 0.5, this interval seeks the
optimal rate by which the learning rate is reduced once a plateau is detected.
It empowers the model to adapt its learning curve without making drastic
alterations that might jeopardize training stability.

  * •

model.optimizer.weight_decay: The interval from 1e-5 to 1e-3 aims to assess
the impact of regularization on preventing overfitting. The exploration of
this range aids in determining the ideal balance between maintaining model
complexity and ensuring generalization.

  * •

model.optimizer.lr: With a range from 1e-4 to 1e-2, this parameter delineates
the learning rate’s influence on training dynamics. It’s pivotal to pinpoint
the optimal learning rate to ensure swift convergence without overshooting
minima.

Our hyperparameter exploration was architected to serve a dual-fold purpose:
maximizing model efficacy and ensuring computational economy. Drawing
inspiration from both canonical research methodologies and cutting-edge
practices, our endeavor was to discern the optimizer’s influence on the
training landscape, with an ambition to elucidate any potential transformative
shifts that might guide the trajectory of our subsequent training iterations.

###  4.6 Final Training with Optimized Hyperparameters

As we progressed to the decisive phase of our research, our strategy focussed
on maximizing the capabilities of our top-performing models based on the
insights derived from our comprehensive hyperparameter exploration.
Specifically, EfficientNetV2 and Resnet50 emerged as the standout contenders
in terms of accuracy performance, making them our models of choice for the
extended training of 100 epochs.

This extension in epochs, a considerable leap from our preliminary phase, was
pursued with a clear aim: to tap into the highest performance potential of
these models. After optimizing hyperparameters in the prior phase, the
extended training session allowed each model to converge to its optimal state.

In light of our findings, it was apparent that longer training on models other
than EfficientNetV2 and Resnet50 wouldn’t be advantageous. Their relative
performance was significantly worse, so additional training on these
contenders wouldn’t yield any benefits.

The Optuna framework, having fulfilled its role in hyperparameter
optimization, was set aside during this phase. The optimal hyperparameters,
identified earlier, were directly integrated into each model’s setup. The
models were therefore set up not just on theoretical ideals but on empirical
bests.

Our approach was underpinned by two main objectives:

  * •

Performance Maximization: Beyond just the hyperparameters, our extended
training was designed to allow each model to fine-tune its internal
configurations, ensuring optimal prediction outcomes.

  * •

Operational Efficiency: Given the computational demands of training advanced
neural networks, employing proven hyperparameters reduced the risk of models
encountering suboptimal training trajectories. This ensured optimal
performance without needless resource expenditure.

This final training phase aimed to navigate the vast expanse of potential
model performance, leveraging optimized hyperparameters to ensure
EfficientNetV2 and Resnet50 operated at their apex. The specific accuracies
and losses achieved during this phase will be detailed in the Results Section.

##  5 Results

###  5.1 Initial Training with Optuna Hyperparameter Tuning

Figure 3: Results from 50 Optuna Trials for each Model

Our research commenced with a rigorous hyperparameter tuning using the Optuna
framework. Figure 3 depitcts the accuracy results for the various models from
a run of 50 trials.

The CoatNet model achieved an accuracy of 28.60%, with optimal parameters
including a dropout value of 0.304, learning rate of 0.00122, and weight decay
of 0.00057.

The DenseNet161 model posted a superior accuracy of 42.73% with a dropout
value of 0.335, learning rate of 0.000959, and weight decay of 0.00053.

Our star performers, EfficientNetV2 and Resnet50, recorded impressive
accuracies of 72.12% and 66.33% respectively. Notably, EfficientNetV2 operated
best with a dropout of 0.366, learning rate of 0.00157, and weight decay of
0.000216, while Resnet50 favored a dropout value of 0.320, an incredibly low
learning rate of 0.000147, and weight decay of 7.91e-05.

On the other end of the spectrum, the MobileViT model only reached an accuracy
of 18.38% and SwinTransformer posted a result of 28.85%.

###  5.2 Final Training and Validation with Resnet50 and EfficientNetV2

Having identified the standout models from our initial phase, we proceeded to
a more intensive training regimen with Resnet50 and EfficientNetV2,
capitalizing on the best parameters discerned from the Optuna trials.

Figure 4: Training Results EfficientNet & Resnet50

Figure 4 illustrates the training results for both models, emphasizing
accuracy and loss graphs over the span of 100 epochs. By the end of this
training phase, EfficientNetV2 reported a training accuracy of 99.79% with a
minuscule loss value of 0.00889, while Resnet50’s training metrics echoed a
similar success story with an accuracy of 99.74% and a loss of 0.01725.

Figure 5: Validation Results EfficientNet & Resnet50

Figure 5 shows the validation results for both models. EfficientNetV2 managed
a validation accuracy of 82.74% against a loss value of 0.7258. Resnet50, in
its stride, recorded a validation accuracy of 78.91% with a loss figure of
0.8385.

To further test the efficacy of our models, a separate test phase was
conducted. EfficientNetV2 achieved a compelling test accuracy of 81.97%,
outpacing Resnet50 which secured a commendable 77.81

##  6 Discussion

###  6.1 Findings

Our training yielded several insightful findings, touching upon model
performance, the substantial impact of hyperparameters, and potential
overfitting concerns:

  * •

Model Performance Differentiation: As visualized in Figure 1, there’s a
pronounced variance in the accuracy and efficiency metrics among the models.
While EfficientNetV2 and Resnet50 stood out as frontrunners with high
accuracies, other models, notably MobileViT and CoatNet, lagged considerably
behind. Such disparities highlight the intrinsic differences in the
architectures and their adaptability to our specific dataset. The
comparatively lower performance of the transformer models could be attributed
to certain inherent challenges of Vision Transformers. ViTs often require
larger and more diverse datasets to effectively capture global context through
self-attention mechanisms. Our dataset’s limited size might have hindered
their ability to learn optimal features. Moreover, the self-attention
mechanism processes all pairs of positions, making the model inherently more
resource-intensive compared to Convolutional Neural Networks (CNNs) which is
why we chose smaller versions of the architectures. Additionally, ViTs tend to
have a higher number of parameters, potentially leading to overfitting in
cases with small datasets.

  * •

Significance of Hyperparameters: Our hyperparameter search showed the
significance of choosing the correct hyperparameters, as the performances of
the trials had a large variance. The commendable uplift in performance for the
models is largely attributed to their optimized hyperparameters, underscoring
the efficacy of the Optuna framework.

  * •

Peak Performances in Final Training: The data from Figure 4 and Figure 5
demonstrates the capabilities of EfficientNetV2 and Resnet50. Both models
achieved near-perfect training accuracies, hinting at a possible overfitting
scenario. The high training accuracies, nearing 100%, juxtaposed against the
validation scores of around 80% suggest that while the models have learned the
training data exceptionally well, they might be slightly over-optimized for
it, potentially reducing their generalizability to new, unseen data.

  * •

Test Accuracies: The test accuracies provide an additional lens to gauge model
performance on unencountered data. EfficientNetV2 showed an impressive
accuracy of 81.97%, closely trailed by Resnet50 at 77.81%. These figures
validate the robustness of our trained models but also leave room for
improvement, especially when compared to the training accuracies.

In essence, our findings emphasize not just the different performances of
different neural network architectures but also spotlight the influence of
methodical hyperparameter tuning on model performance and the ever-present
challenge of ensuring models remain generalizable across diverse datasets.

###  6.2 Limitations

In the course of this research, while we aimed to maintain high standards of
scientific and technical precision, certain limitations inevitably influenced
the outcomes of our work. These limitations, largely due to time constraints
and hardware challenges, played a significant role in our research decisions
and methodologies.

  * •

GPU Limitations: Our research encountered specific challenges concerning the
GPU capacity, which posed constraints on batch sizes. For instance, the ‘128‘
batch size was infeasible for models like ’swintran’ and ’mobilevit’, owing to
GPU capacity constraints. Similarly, both ‘128‘ & ‘64‘ batch sizes proved
incompatible with ’densenet’. These limitations underscore the role of
hardware in determining the scalability and efficiency of deep learning
models.

  * •

Computational Resources: The computing resources provided by LMU were not
always sufficient to cater to the intense demands of our experiments. With
each Optuna trial ranging between 30 minutes to 1 hour, contingent upon the 10
epoch duration and the chosen hyperparameters, it became evident that a richer
resource pool would have expedited our experimentation phase.

  * •

Throttling of Resources: During the course of our experiments, we encountered
unexpected throttling of computational resources. The origins of this
throttling remain unclear - it could potentially be an artifact of cluster and
server policies. Such throttling poses challenges, especially when striving
for consistent performance benchmarks.

  * •

Server Restart Issues: A challenge that hindered our progress was the
unanticipated server restarts at 7 am. Encountering a restart during the midst
of an Optuna hyperparameter search not only disrupted the continuity of the
research but also necessitated a complete restart. Resuming an interrupted
Optuna trial without prior preparation for such eventualities is intricate,
leading to lost computational time and resources.

In summary, while our research was ambitious in its scope and intent, it was
not without its set of challenges. These limitations, both anticipated and
unexpected, underscore the nature of deep learning research, where scientific
ambition often intersects with real-world logistical and hardware constraints.
It serves as a reminder of the importance of contingency planning and
adaptability in the rapidly evolving landscape of AI research.

##  7 Conclusion

By using deep neural networks, we accomplished to accurately and efficiently
identify car models and makes from images with a validation accuracy of
81.97%. Among the diverse set of model architectures we explore, we selected
EfficientNet (V2 b2) as our final candidate for this task. It outperformed
other CNNs, ViTs and hybrid architectures in terms of accuracy, speed and
efficiency. We implemented a range of strategies to optimize our network’s
performance. We applied data augmentation to enhance the model’s robustness,
used fine-tuned pretrained models and conducted an extensive hyperparameter
search.

Our trained model can be used in the listing process on car selling platforms
to automatically fill in information retrieved from the images. For future
developments, it is conceivable to extract further information from the
images, such as color, number of doors and supplementary features to further
improve user experience on car selling websites. Moreover, other versions of
EfficientNet can be explored, coupled with varying degrees of layer freezing
to fine-tune performance even further.

While we achieved commendable results with our CNN network, we recognize that
the field of Vision Transformers holds promise. With their emergence as a
novel technology, it’s conceivable that more refined efficient models will
evolve, potentially offering stiff competition to the established CNNs.

In summary, our project underscores the capabilities of deep neural networks
in solving fine-grained image classification tasks with notable accuracy and
manageable computational demands.

## References

  * [1] Fine-grained image classification — papers with code.
  * [2] Imagenet benchmark (image classification) — papers with code.
  * [3] An overview of convolutional neural networks — papers with code.
  * [4] Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama.  Optuna: A next-generation hyperparameter optimization framework.  CoRR, abs/1907.10902, 2019.
  * [5] Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu, and Michael Auli.  data2vec: A general framework for self-supervised learning in speech, vision and language.  PREPRINT, 2022.
  * [6] Simone Bianco, Remi Cadene, Luigi Celona, and Paolo Napoletano.  Benchmark analysis of representative deep neural network architectures.  IEEE Access, 6:64270–64277, 2018.
  * [7] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze.  Deep clustering for unsupervised learning of visual features.  ECCV, 2018.
  * [8] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton.  A simple framework for contrastive learning of visual representations.  In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 1597–1607. PMLR, 2020.
  * [9] Francois Chollet.  Xception: Deep learning with depthwise separable convolutions.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
  * [10] Ekin D. Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le.  Autoaugment: Learning augmentation policies from data.  arXiv preprint arXiv: 1805.09501, 2018.
  * [11] Zihang Dai, Hanxiao Liu, Quoc V. Le, and Mingxing Tan.  Coatnet: Marrying convolution and attention for all data sizes, 2021.
  * [12] Jean-Bastien Grill, Florian Strub, Florent Altch’e, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, B. ’. Pires, Z. Guo, M. G. Azar, Bilal Piot, K. Kavukcuoglu, R. Munos, and Michal Valko.  Bootstrap your own latent: A new approach to self-supervised learning.  neurips, 2020.
  * [13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition, 2015.
  * [14] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger.  Densely connected convolutional networks, 2018.
  * [15] Forrest N. Iandola, Song Han, Matthew W. Moskewicz, Khalid Ashraf, William J. Dally, and Kurt Keutzer.  Squeezenet: Alexnet-level accuracy with 50x fewer parameters and ¡0.5mb model size, 2016.
  * [16] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei.  3d object representations for fine-grained categorization.  In 2013 IEEE International Conference on Computer Vision Workshops, pages 554–561, 2013.
  * [17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton.  Imagenet classification with deep convolutional neural networks.  In F. Pereira, C.J. Burges, L. Bottou, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems, volume 25. Curran Associates, Inc., 2012.
  * [18] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo.  Swin transformer: Hierarchical vision transformer using shifted windows, 2021.
  * [19] Sachin Mehta and Mohammad Rastegari.  Mobilevit: Light-weight, general-purpose, and mobile-friendly vision transformer, 2022.
  * [20] Agnieszka Mikołajczyk and Michał Grochowski.  Data augmentation for improving deep learning in image classification problem.  In 2018 International Interdisciplinary PhD Workshop (IIPhDW), pages 117–122, 2018.
  * [21] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zach DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala.  Pytorch: An imperative style, high-performance deep learning library.  arXiv preprint arXiv: 1912.01703, 2019.
  * [22] Luis Perez and Jason Wang.  The effectiveness of data augmentation in image classification using deep learning.  arXiv preprint arXiv: 1712.04621, 2017.
  * [23] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen.  Mobilenetv2: Inverted residuals and linear bottlenecks, 2019.
  * [24] Karen Simonyan and Andrew Zisserman.  Very deep convolutional networks for large-scale image recognition, 2015\.
  * [25] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna.  Rethinking the inception architecture for computer vision, 2015.
  * [26] Mingxing Tan and Quoc V. Le.  Efficientnet: Rethinking model scaling for convolutional neural networks, 2020.
  * [27] Shuhei Watanabe.  Tree-structured parzen estimator: Understanding its algorithm components and their roles for better empirical performance, 2023.
  * [28] Suorong Yang, Weikang Xiao, Mengcheng Zhang, Suhan Guo, Jian Zhao, and Furao Shen.  Image data augmentation for deep learning: A survey.  arXiv preprint arXiv: 2204.08610, 2022.
  * [29] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny.  Barlow twins: Self-supervised learning via redundancy reduction.  In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 12310–12320. PMLR, 2021.
  * [30] Pan Zhou, Jiashi Feng, Chao Ma, Caiming Xiong, Steven Hoi, and Weinan E.  Towards theoretically understanding why sgd generalizes better than adam in deep learning, 2021.