\section{%
    \@ifstar{\starchapter}{\@dblarg\nostarchapter}}
    \newcommand*\starchapter[1]{%
        \stdchapter*{#1}
        \thispagestyle{fancy}
        \markboth{\MakeUppercase{#1}}{}
    }
    \def\nostarchapter[#1]#2{%
        \stdchapter[{#1}]{#2}
        \thispagestyle{fancy}
    }
\makeatother

\setlength{\headheight}{15pt}

\newtheorem{theorem}{Theorem}[section]
\newtheorem*{theorem*}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{corollary}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{remark}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}

\begin{document}
\title{Complex structures on stratified Lie algebras}

\author{Junze Zhang%
  \thanks{Electronic address: \texttt{z5055984@ad.unsw.edu.au}}}
\affil{School of Mathematics and Statistics, University of New South Wales, Sydney}

\date{\today}
\maketitle

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\fancyhead[L]{\slshape\MakeUppercase{Complex structures on stratified Lie algebras}}
\newcommand{\underuparrow}[1]{\ensuremath{\underset{\uparrow}{#1}}}

\begin{abstract}
This paper investigates some properties of complex structures on Lie algebras. In particular, we focus on $\textit{nilpotent}$ $\textit{complex structures}$ that are characterized by a suitable $J$-invariant ascending or descending central series $\mathfrak{d}^j$ and $\mathfrak{d}_j$ respectively. In this article, we introduce a new descending series $\mathfrak{p}_j$ and use it to give proof of a new characterization of nilpotent complex structures. We examine also whether nilpotent complex structures on stratified Lie algebras preserve the strata. We find that there exists a $J$-invariant stratification on a step $2$ nilpotent Lie algebra with a complex structure.
\end{abstract}

\section{Introduction}
 \label{a}

In recent years, complex structures on nilpotent Lie algebras have been shown to be very useful for understanding some geometric and algebraic properties of nilmanifolds. In $\cite{MR1665327}$ and $\cite{MR1899353}$, Cordero, Fern{\'a}ndez, Gray and Ugarte introduced $\textit{nilpotent complex}$ $\textit{structures} $, studied $6$ dimensional nilpotent Lie algebras with nilpotent complex structures, and provided a classification. Since the ascending central series is not necessarily $J$-invariant, they introduced a $J$-invariant ascending central series to characterize nilpotent complex structures. More recently, Latorre, Ugarte and Villacampa defined the space of nilpotent complex structures on nilpotent Lie algebras and further studied complex structures on nilpotent Lie algebras with one dimensional center $\cite{MR4009385}$, $ \cite{latorre2020complex}$. They also provided a theorem describing the ascending central series of $8$ dimensional nilpotent Lie algebras with complex structures. In $\cite{gao2020maximal}$, Gao, Zhao and Zheng studied the relation between the step of a nilpotent Lie algebra and the smallest integer $j_0$ such that the $J$-invariant ascending central series stops. Furthermore, they introduced a $J$-invariant descending central series, which is another tool to characterize nilpotent complex structures. These papers use the language of differential forms to characterize nilpotent complex structures. Our proofs here in this paper are purely Lie algebraic.

Let $G$ be a Lie group and $\mathfrak{g} \cong T_eG$ be its Lie algebra, which we always assume to be real, unless otherwise stated. A linear isomorphism $J:TG \rightarrow TG$ is an $\textit{almost complex structure}$ if $J^2 = -I.$ By the Newlander--Nirenberg Theorem $\cite{MR88770},$ an almost complex structure $J$ corresponds to a left invariant complex structure on $G$ if and only if   \begin{equation}
    [J_eX,J_eY] -[X,Y] - J_e([J_eX,Y]+[X,J_eY]) = 0,   \label{eq:Niv}
\end{equation} for all $X,Y \in \mathfrak{g}.$ Since we are interested only on Lie algebras in this paper, from now on, we will write $J$ for $J_e.$ We will refer to $\eqref{eq:Niv}$ as the $\textit{Newlander--Nirenberg condition}.$

\section{Complex structures on nilpotent Lie algebras}
\label{b}

In this section, we consider some properties of the central series of nilpotent Lie algebras with complex structures $J$ and define $J$-invariant central series. We define nilpotent complex structures, and relate their properties to the dimension of the center $\mathfrak{z}$ of a nilpotent Lie algebra.

\begin{definition}
\label{acde} ($\text{See}, \text{ for instance}$, e.g., $\cite{MR1920389}$)
Let $\mathfrak{g}$ be a Lie algebra. The $\textit{descending}$ $\textit{central series}$ and $\textit{ascending}$ $\textit{central series}$ of $\mathfrak{g} $ are denoted $\mathfrak{c}_j(\mathfrak{g})$ and $\mathfrak{c}^j(\mathfrak{g})$ respectively, for all $j \geq 0 ,$ and defined inductively by \begin{eqnarray}
&  \mathfrak{c}_0(\mathfrak{g}) = \mathfrak{g},  \text{ }  \mathfrak{c}_j(\mathfrak{g}) = [\mathfrak{g},\mathfrak{c}_{j-1}(\mathfrak{g})] \label{eq:de}   ; \\
& \mathfrak{c}^0(\mathfrak{g}) = \{0\},  \text{ } \text{ }    \mathfrak{c}^j(\mathfrak{g}) = \{X \in \mathfrak{g}:[X,\mathfrak{g}] \subseteq \mathfrak{c}^{j-1}(\mathfrak{g})\}.   \label{eq:ac}
\end{eqnarray}
\end{definition}

\begin{remark}
\label{racde}
(i) Notice that $\mathfrak{c}^1(\mathfrak{g})=\mathfrak{Z}(\mathfrak{g})  $, $\mathfrak{c}_1(\mathfrak{g}) = [\mathfrak{g},\mathfrak{g}],$ and \begin{align*}
    \mathfrak{c}^{j}(\mathfrak{g})/\mathfrak{c}^{j-1}(\mathfrak{g}) = \mathfrak{Z}\left(\mathfrak{g}/ \mathfrak{c}^{j-1}(\mathfrak{g})\right) \text{ }  \text{for all } j \geq 1,
\end{align*} where $\mathfrak{Z}(\cdot)$ means the center of a Lie algebra. Furthermore, $\mathfrak{c}_j(\mathfrak{g})/\mathfrak{c}_{j+1}(\mathfrak{g})$ $\subseteq$  $\mathfrak{Z} \left(\mathfrak{n}/\right. $   $\left.\mathfrak{c}_{j+1}(\mathfrak{g})\right)$ for all $j \geq 0.$ It is clear that $\mathfrak{c}^j(\mathfrak{g})$ and $\mathfrak{c}_j(\mathfrak{g})$ are ideals of $\mathfrak{g}$ for all $j \geq 0$.

(ii) A Lie algebra $\mathfrak{g}$ is called $\textit{nilpotent of step }k $, for some $k \in \mathbb{N},$ if $\mathfrak{c}_k(\mathfrak{g}) = \{0\}$ and $\mathfrak{c}_{k-1}(\mathfrak{g}) \neq \{0\}.$ We will denote nilpotent Lie algebras by $\mathfrak{n}$ in this paper. See, e.g., $\cite[\text{Section }5.2]{MR3025417}$ or $\cite{MR1920389}.$
\end{remark}

\subsection{$J$-invariant central series and nilpotent complex structures}
 \label{b4}

Following $\cite[\text{Definition }1]{MR1665327}$, we define the $\textit{J-invariant}$ $\textit{ascending}$ $\textit{central series}$ $\mathfrak{d}^j$ for nilpotent Lie algebras and introduce $\textit{nilpotent}$ $\textit{complex}$ $\textit{structures}$ on nilpotent Lie algebras. Furthermore, we recall the definition of the $\textit{J-invariant}$ $\textit{descending}$ $\textit{central series}$ $\mathfrak{d}_j$. $\cite[\text{Defintion 2.7}]{gao2020maximal}$

\begin{definition}
\label{7}
Let $ \mathfrak{n} $ be a Lie algebra with a complex structure $J.$ Define a sequence of $J$-invariant ideals of $\mathfrak{n}$ by $\mathfrak{d}^0 = \{0\}$ and \begin{equation}
      \mathfrak{d}^j  = \{ X \in \mathfrak{n} : [X,\mathfrak{n}] \subseteq  \mathfrak{d}^{j-1} , [JX,\mathfrak{n}] \subseteq \mathfrak{d}^{j-1}  \}   \label{eq:1}
\end{equation} for all $ j \geq 1.$ We call the sequence $\mathfrak{d}^j$ the $\textit{ascending J-invariant}$ $\textit{central series}.$ The complex structure $J$ is called $\textit{nilpotent of step }j_0$ if there exists $j_0 \in \mathbb{N}$ such that $\mathfrak{d}^{j_0} = \mathfrak{n}$ and $\mathfrak{d}^{j_0-1} \subset \mathfrak{n}$.

We define inductively the $J$-$\textit{invariant}$ $ \textit{descending}$ $ \textit{central}$  $\textit{series}$ by    \begin{equation}
    \mathfrak{d}_0 = \mathfrak{n}, \text{ } \text{ } \mathfrak{d}_j = [\mathfrak{d}_{j-1},\mathfrak{n}] + J[\mathfrak{d}_{j-1},\mathfrak{n}]  \text{ } \text{ }  \label{eq:00}
\end{equation} all for $j \geq 1.$
\end{definition}

\begin{remark}
\label{r7}
(i) For the ascending $J$-invariant central series $\mathfrak{d}^j$, \begin{align*}
    \mathfrak{d}^j / \mathfrak{d}^{j-1} = \mathfrak{Z}(\mathfrak{n}/\mathfrak{d}^{j-1}) \cap J\mathfrak{Z}(\mathfrak{n}/\mathfrak{d}^{j-1}) \qquad   \text{ for all } j \geq 1 .
\end{align*}  In particular, $\mathfrak{d}^1 = \mathfrak{z} \cap J\mathfrak{z},$ which is the largest $J$-invariant subspace of $\mathfrak{z} $ and,  if $J$ is nilpotent, then $\mathfrak{d}^1 \neq \{0\}$. The nilpotency of $J$ implies that the ascending $J$-invariant central series $\mathfrak{d}^j$ of $\mathfrak{n}$ is strictly increasing until $\mathfrak{d}^{j_0} = \mathfrak{n}$. Furthermore, if $\mathfrak{n}$ is a step $k$ nilpotent Lie algebra with a nilpotent complex structure $J$ of step $j_0$, then $k \leq j_0 \leq \frac{1}{2}\dim \mathfrak{n} .$ See, e.g., $\cite{MR1665327}$ and $\cite{gao2020maximal}.$

(ii) By definition, if $\mathfrak{n}$ admits a nilpotent complex structure, then $\mathfrak{n}$ is nilpotent.

(iii) For all $j \geq 0,$ it is clear that $ \mathfrak{c}_j(\mathfrak{n}) + J  \mathfrak{c}_j(\mathfrak{n}) \subseteq \mathfrak{d}_j$;   Furthermore, $\mathfrak{d}_j \unlhd \mathfrak{n}$ and $\mathfrak{d}^j \unlhd \mathfrak{n}$ where $\unlhd$ is the notation of ideal.

(iv) Let $ \mathfrak{n} $ be a Lie algebra with a complex structure $J.$  Then $J$ preserves all terms of $ \mathfrak{c}^j(\mathfrak{n})$ if and only if $\mathfrak{d}^j =  \mathfrak{c}^j(\mathfrak{n})$ for all $j \geq 0$. $\cite[\text{Corollary }5]{MR1665327} $ Similarly, $J$ preserves all terms of $\mathfrak{c}_j(\mathfrak{n})$ if and only if $\mathfrak{d}_j = \mathfrak{c}_j(\mathfrak{n})$ for all $j.$

\end{remark}

The following lemma provides a connection between $J$-invariant ascending and descending central series.

\begin{lemma}
\label{9}
Let $\mathfrak{n}$ be a Lie algebra with a complex structure $J$. Suppose that $J$ is nilpotent of step $j_0.$

(i) Then $\mathfrak{n}/\mathfrak{d}^{j_0-1}$ is Abelian. Conversely, if there exists $j_0\in \mathbb{N}$ such that $\mathfrak{n}/\mathfrak{d}^{j_0-1}$ is Abelian, then $J$ is nilpotent of step at most $j_0.$

(ii) Then $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0 - j} $ for all $j \geq 0 $. Conversely, if there exists $j_0 \in \mathbb{N}$ such that $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0 - j} $ for all $j \geq 0,$ then $J$ is nilpotent of step at most $j_0.$
\end{lemma}

\begin{proof}
For part (i), suppose that $J$ is nilpotent of step $j_0$. By definition, $\mathfrak{d}^{j_0} = \mathfrak{n}$ and $\mathfrak{d}^{j_0-1} \subset \mathfrak{n}$. Then  \begin{align*}
    \mathfrak{Z}(\mathfrak{n}/\mathfrak{d}^{j_0-1}) \cap J\mathfrak{Z}(\mathfrak{n}/ \mathfrak{d}^{j_0-1}) = \mathfrak{n}/\mathfrak{d}^{j_0-1}.
\end{align*} It is obvious that $ \mathfrak{Z}(\mathfrak{n}/\mathfrak{d}^{j_0-1}) = \mathfrak{n}/\mathfrak{d}^{j_0-1}.$ Hence $\mathfrak{n}/\mathfrak{d}^{j_0-1}$ is Abelian.

Conversely, suppose that there exists $j_0 \in \mathbb{N}$ such that $ \mathfrak{n}/ \mathfrak{d}^{j_0-1}$ is Abelian. Then  $ \{0\} \neq \mathfrak{c}_1(\mathfrak{n}) \subseteq \mathfrak{d}^{j_0-1}$. For all $X  \in \mathfrak{n},$  \begin{align*}
    [X,\mathfrak{n}] \subseteq  \mathfrak{d}^{j_0 - 1} \text{ and }  [JX,\mathfrak{n}] \subseteq \mathfrak{d}^{j_0 -1}.
\end{align*} We deduce that $ \mathfrak{n} = \mathfrak{d}^{j_0}$ and therefore $J$ is nilpotent of step at most $j_0$.

For part (ii), assume that $J$ is nilpotent of step $j_0.$ By definition, $\mathfrak{d}_0 = \mathfrak{n} = \mathfrak{d}^{j_0}.$ Next, assume that $\mathfrak{d}_{s-1} \subseteq \mathfrak{d}^{j_0-s+1}$ for some $s \in \mathbb{N}.$ Then \begin{align*}
    \mathfrak{d}_s & = [\mathfrak{d}_{s-1},\mathfrak{n}] + J[\mathfrak{d}_{s-1},\mathfrak{n}] \\
    & \subseteq [\mathfrak{d}^{j_0 -s + 1},\mathfrak{n}] + J [\mathfrak{d}^{j_0 -s + 1},\mathfrak{n}] \\
    & \subseteq \mathfrak{d}^{j_0-s} + J\mathfrak{d}^{j_0-s}  = \mathfrak{d}^{j_0-s}.
\end{align*} Hence by induction, $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0 - j} $ for all $j \geq 0.$

Conversely, suppose that there exists $j_0 \in \mathbb{N}$ such that $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0 - j} $ for all $j \geq 0$. In particular, $  \mathfrak{d}_1 \subseteq \mathfrak{d}^{j_0 -1}.$ By definition, $\mathfrak{c}_1(\mathfrak{n}) \subseteq \mathfrak{d}_1.$ It follows that $$   [\mathfrak{n}/\mathfrak{d}^{j_0-1}, \mathfrak{n}/\mathfrak{d}^{j_0-1}] \subseteq [\mathfrak{n},\mathfrak{n}] + \mathfrak{d}^{j_0-1} = \mathfrak{c}_1(\mathfrak{n}) + \mathfrak{d}^{j_0-1} \subseteq \mathfrak{d}_1 + \mathfrak{d}^{j_0-1} \subseteq \mathfrak{d}_{j_0-1},$$ and thus $\mathfrak{n}/\mathfrak{d}^{j_0 -1}$ is Abelian. From $\text{Lemma } \ref{9}$, $J$ is nilpotent of step at most $j_0.$
\end{proof}

\begin{remark}
\label{r41}
Under the condition of Lemma $\ref{9},$ if $J$ is nilpotent of step $j_0,$ $\mathfrak{d}_{j_0-1} \subseteq \mathfrak{d}^1 \subseteq \mathfrak{z}.$ Then $\mathfrak{d}_{j_0-1}$ is Abelian. Furthermore, there exists $j_0 \in \mathbb{N}$ such that $\mathfrak{n}/\mathfrak{d}^{j_0-1}$ is Abelian if and only if $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0-j}$ for all $j \geq 0.$ This is proved by induction as in the proof of $\text{Lemma }\ref{9}$.
\end{remark}

\begin{corollary}
Let $\mathfrak{n}$ be a step $k$ nilpotent Lie algebra with a complex structure $J.$ Then $J$ is nilpotent of step $k$ if and only if $\mathfrak{d}_j \subseteq \mathfrak{d}^{k-j}$ for all $j \geq 0$.
\end{corollary}
\begin{proof}
Suppose that $J$ is nilpotent of step $k.$ By $\text{Lemma }\ref{9},$ $\mathfrak{d}_j \subseteq \mathfrak{d}^{k-j}$ for all $j \geq 0.$ Conversely, assume that $\mathfrak{d}_j \subseteq \mathfrak{d}^{k-j}$ for all $j.$ Again by Lemma $\ref{9}$, $J$ is nilpotent of step at most $k.$ Furthermore, it follows that $ \{0\} \neq \mathfrak{c}_{k-1}(\mathfrak{n}) \subseteq  \mathfrak{d}_{k-1}.$ Therefore $\mathfrak{d}_{k-1} \neq \{0\} $ and $J$ is nilpotent of step $k.$
\end{proof}

\begin{remark}
From Remark $\ref{r41},$ $J$ is nilpotent of step $k$ if and only if $\mathfrak{n}/\mathfrak{d}^{k-1}$ is Abelian.
\end{remark}

We introduce a new descending central series whose descending `rate' is slower than that of $\mathfrak{c}_j(\mathfrak{n})$ but faster than that of $\mathfrak{d}_j.$

\begin{definition}
\label{p3}
Let $J$ be a complex structure on a Lie algebra $\mathfrak{n}.$ We define the sequence $\mathfrak{p}_j$ inductively by  \begin{equation}
     \mathfrak{p}_0 = \mathfrak{n} \text{ and }     \mathfrak{p}_j =  [\mathfrak{p}_{j-1},\mathfrak{n}] + [J\mathfrak{p}_{j-1},\mathfrak{n}]  \text{ for all } j \geq 1 . \label{eq:p}
 \end{equation}
\end{definition}

\begin{remark}
 It is clear that $\mathfrak{p}_{j+1} \subseteq \mathfrak{p}_j$ for all $j \geq 0.$  Furthermore, $\mathfrak{p}_j \unlhd \mathfrak{n}$ since $[\mathfrak{p}_j,\mathfrak{n}] \subseteq \mathfrak{p}_{j+1} \subseteq \mathfrak{p}_j$ for all $j \geq 0$.
\end{remark}

\begin{lemma}
\label{p}
Let $\mathfrak{n}$ be a Lie algebra with a complex structure $J $. Then $ \mathfrak{c}_j(\mathfrak{n}) \subseteq \mathfrak{p}_j$ for all $j \geq 0$. Furthermore, $\mathfrak{p}_j \subseteq \mathfrak{d}_j $ and $ J  \mathfrak{p}_j  \subseteq   \mathfrak{d}_j $ for all $j \geq 0$.
\end{lemma}

\begin{proof}
By definition, $\mathfrak{c}_0(\mathfrak{n}) = \mathfrak{n} = \mathfrak{p}_0.$ It follows, by induction, that $ \mathfrak{c}_j(\mathfrak{n}) \subseteq \mathfrak{p}_j$ for all $j \geq 0$. Using $\eqref{eq:00},$ $[\mathfrak{d}_{j-1},\mathfrak{n}] \subseteq \mathfrak{d}_j $. By definition, $ \mathfrak{p}_0 = \mathfrak{n} = \mathfrak{d}_0$ and $J\mathfrak{p}_0 = J\mathfrak{n} = \mathfrak{n} = \mathfrak{d}_0$. Next, suppose that $\mathfrak{p}_s \subseteq \mathfrak{d}_s$ and $J\mathfrak{p}_s \subseteq \mathfrak{d}_s$ for some $s \in \mathbb{N}.$ Then by $\eqref{eq:p},$ \begin{align*}
     \mathfrak{p}_{s+1}  = [\mathfrak{p}_s,\mathfrak{n}] + [J\mathfrak{p}_s,\mathfrak{n}] \subseteq  [\mathfrak{d}_s,\mathfrak{n}] \subseteq \mathfrak{d}_{s+1} \text{ and } J\mathfrak{p}_{s+1} \subseteq J[\mathfrak{d}_s,\mathfrak{n}] \subseteq \mathfrak{d}_{s+1}
 \end{align*} By induction, $   \mathfrak{p}_j  \subseteq   \mathfrak{d}_j $ and $J\mathfrak{p}_j  \subseteq   \mathfrak{d}_j  $ for all $j \geq 0.$
\end{proof}

 \begin{remark}
 \label{rp}
(i)  Notice that $\mathfrak{p}_j/\mathfrak{p}_{j+1} \subseteq \mathfrak{Z}\left(\mathfrak{n}/\mathfrak{p}_{j+1}\right)$ for all $j \geq 0.$ Indeed, for all $P \in \mathfrak{p}_j$ and $Y \in \mathfrak{n},$ since $[P,Y] \subseteq \mathfrak{p}_{j+1},$ it is enough to deduce \begin{equation*}
    [P+ \mathfrak{p}_{j+1},Y + \mathfrak{p}_{j+1}] =[P,Y] + \mathfrak{p}_{j+1} \subseteq \mathfrak{p}_{j+1}.
\end{equation*}
Hence $\mathfrak{p}_j/\mathfrak{p}_{j+1} \subseteq \mathfrak{Z}\left(\mathfrak{n}/\mathfrak{p}_{j+1}\right)$.

(ii) By $\text{Lemma }\ref{p},$  $  \mathfrak{p}_j + J \mathfrak{p}_j \subseteq \mathfrak{d}_j$ for all $j \geq 0$. We show that $\mathfrak{p}_j + J \mathfrak{p}_j \unlhd \mathfrak{n}$ for all $j \geq 0.$ Indeed, for all $P,P' \in \mathfrak{p}_j,$ $$
    \underbrace{[P+JP',\mathfrak{n}]}_\text{$\subseteq [\mathfrak{p}_j + J \mathfrak{p}_j,\mathfrak{n}]$} \subseteq  \underbrace{[P,\mathfrak{n}]}_\text{$ \subseteq \mathfrak{p}_{j+1}$} +  \underbrace{[JP',\mathfrak{n}]}_\text{$ \subseteq \mathfrak{p}_{j+1}$} \subseteq \mathfrak{p}_{j+1} \subseteq \mathfrak{p}_{j+1} + J\mathfrak{p}_{j+1}\subseteq \mathfrak{p}_j + J\mathfrak{p}_j.$$ Hence $\mathfrak{p}_j + J \mathfrak{p}_j \unlhd \mathfrak{n}$. From part (ii), we can show that $\mathfrak{p}_j + J\mathfrak{p}_j$ is a $J$-invariant descending central series. Indeed, for all $T = P + JP' \in \mathfrak{p}_j + J \mathfrak{p}_j$ and $Y \in \mathfrak{n},$ \begin{align*}
        [T+ \mathfrak{p}_{j+1} + J\mathfrak{p}_{j+1},Y + \mathfrak{p}_{j+1} +J\mathfrak{p}_{j+1}] \subseteq [T,Y] + \mathfrak{p}_{j+1}  +J\mathfrak{p}_{j+1}\subseteq \mathfrak{p}_{j+1}  +J\mathfrak{p}_{j+1}.
    \end{align*}
 \end{remark}

 \begin{theorem}
\label{14}
Let $\mathfrak{n}$ be a Lie algebra with a complex structure $J.$ The following are equivalent:

(i)   $J$ is nilpotent of step $j_0$;

(ii) $ \mathfrak{p}_{j_0} = \{0\}$ and $ \mathfrak{p}_{j_0-1} \neq \{0\};$

(iii) $ \mathfrak{d}_{j_0} = \{0\}$ and $\mathfrak{d}_{j_0 - 1} \neq \{0\}$.
\end{theorem}

\begin{proof}
We first show that (i) and (ii) are equivalent. Assume that $J$ is nilpotent of step $j_0.$ From $\text{Lemma }\ref{9}$ part (ii), $\mathfrak{d}_{j_0-1} \subseteq \mathfrak{d}^1.$ Hence by $\text{Lemma }\ref{p},$   $$   \mathfrak{p}_{j_0}\subseteq   [\mathfrak{d}_{j_0-1},\mathfrak{n}] \subseteq  [\mathfrak{d}^1,\mathfrak{n}]= \{0\}.$$ Thus $   \mathfrak{p}_{j_0}= \{0\} $. Assume, by contradiction, that $ \mathfrak{p}_{j_0-1} = \{0\}.$ We show that $\mathfrak{p}_{j_0-j-1} + J\mathfrak{p}_{j_0-j-1} \subseteq \mathfrak{d}^j $ for all $j \geq 0 $ by induction. By definition, $  \mathfrak{p}_{j_0-1} + J \mathfrak{p}_{j_0-1} = \{0\} = \mathfrak{d}^0.$ Next, suppose that $ \mathfrak{p}_{j_0-s-1} + J   \mathfrak{p}_{j_0-s-1}\subseteq\mathfrak{d}^s $ for some $s \in \mathbb{N}.$ Then from $\text{Remark }\ref{rp}$ part (ii),  \begin{equation*}
   [\mathfrak{p}_{j_0-s-2} + J \mathfrak{p}_{j_0-s-2},\mathfrak{n}]   \subseteq \mathfrak{p}_{j_0-s-1} + J\mathfrak{p}_{j_0-s-1} \subseteq \mathfrak{d}^s.
\end{equation*} This implies, using $\eqref{eq:1},$ $  \mathfrak{p}_{j_0-s-2}  +J \mathfrak{p}_{j_0-s-2} \subseteq \mathfrak{d}^{s+1}.$ By induction, $\mathfrak{p}_{j_0-j-1} + J\mathfrak{p}_{j_0-j-1}$   $ \subseteq \mathfrak{d}^j $ for all $j \geq 0.$ In particular, let $j = j_0-1.$ Then $\mathfrak{n} \subseteq \mathfrak{d}^{j_0-1}$, which implies that $J$ is nilpotent of step $j_0-1$ by definition. This is a contradiction. Therefore $ \mathfrak{p}_{j_0-1} \neq \{0\}.$

Conversely, suppose that $ \mathfrak{p}_{j_0} = \{0\}$ and $ \mathfrak{p}_{j_0-1} \neq \{0\}$.  We show that $J$ is nilpotent of step $j_0.$ By definition, $  \mathfrak{p}_{j_0} + J \mathfrak{p}_{j_0} = \{0\} = \mathfrak{d}^0 $. It follows, by induction, that $\mathfrak{p}_{j_0-j} + J\mathfrak{p}_{j_0-j} \subseteq \mathfrak{d}^{j} $ for all $j \geq 0.$ Hence $\mathfrak{p}_{j_0-j} \subseteq \mathfrak{d}^j$. In particular, let $j =j_0-1.$ Then $$ \mathfrak{p}_1 =     [\mathfrak{n},\mathfrak{n}] \subseteq  \mathfrak{d}^{j_0-1} \Rightarrow \mathfrak{n}/\mathfrak{d}^{j_0-1} \text{ is Abelian }.$$  By $\text{Lemma }\ref{9},$ $J$ is nilpotent of step at most $j_0.$

We next show that $\mathfrak{d}^{j_0-1} \neq \mathfrak{n}$ by contradiction. Assume, by contradiction, that $ \mathfrak{n}= \mathfrak{d}^{j_0-1}.$ We show that $\mathfrak{p}_{j-1} \subseteq \mathfrak{d}^{j_0-j}$ for all $j \geq 1$ by induction. By definition, $\mathfrak{p}_0   = \mathfrak{n}= \mathfrak{d}^{j_0-1}.$  Next, suppose that $\mathfrak{p}_{s-1} \subseteq \mathfrak{d}^{j_0-s}$ for some $s \in \mathbb{N}.$ Then  \begin{align*}
    \mathfrak{p}_s & = [\mathfrak{p}_{s-1},\mathfrak{n}] +[J\mathfrak{p}_{s-1},\mathfrak{n}] \\
    & \subseteq [\mathfrak{d}^{j_0-s},\mathfrak{n}] +[J\mathfrak{d}^{j_0-s},\mathfrak{n}] \\
    & \subseteq \mathfrak{d}^{j_0-s-1}.
\end{align*} By induction, $\mathfrak{p}_{j-1} \subseteq \mathfrak{d}^{j_0-j}$ for all $j \geq 1.$ In particular, let $j = j_0.$ We deduce that $  \mathfrak{p}_{j_0-1} \subseteq \mathfrak{d}^0 = \{0\}.$ This implies that $ \mathfrak{p}_{j_0-1} = \{0\}$ which is a contradiction. Hence $\mathfrak{d}^{j_0-1} \neq \mathfrak{n}.$ By definition, $J$ is nilpotent of step $j_0.$

We now show (i) and (iii) are equivalent. Since $J$ is nilpotent of step $j_0,$ it follows, from $\text{Lemma } \ref{9}$ part (ii), that $\mathfrak{d}_j \subseteq \mathfrak{d}^{j_0 - j}$ for all $j \geq 0.$ In particular, let $j = j_0.$ By definition, $\mathfrak{d}_{j_0} = \mathfrak{d}^0 = \{0\}.$ We show that $\mathfrak{d}_{j_0-1} \neq \{0\}.$ By Lemma $\ref{p}$, $\{0\} \neq   \mathfrak{p}_{j_0-1} + J  \mathfrak{p}_{j_0-1} \subseteq \mathfrak{d}_{j_0-1}.$ Hence $\mathfrak{d}_{j_0-1} \neq \{0\}.$

 Conversely, assume that $\mathfrak{d}_{j_0} = \{0\}$ and $\mathfrak{d}_{j_0-1} \neq \{0\}$. By definition, $[\mathfrak{d}_{j_0-1},\mathfrak{n}] \subseteq \mathfrak{d}_{j_0} = \{0\}.$ Hence, $\{0\} \neq \mathfrak{d}_{j_0-1} \subseteq \mathfrak{d}^1.$ Next, assume that $\mathfrak{d}_{j_0-s} \subseteq \mathfrak{d}^s$ for some $s \in \mathbb{N}.$ Then by definition, \begin{align*}
  [\mathfrak{d}_{j_0-s-1},\mathfrak{n}] \subseteq  \mathfrak{d}_{j_0-s} \subseteq \mathfrak{d}^s.
\end{align*}  By $\eqref{eq:1},$ $\mathfrak{d}_{j_0-s-1} \subseteq \mathfrak{d}^{s+1}.$ By induction, $\mathfrak{d}_{j_0-j} \subseteq \mathfrak{d}^j$ for all $j \geq 0.$ Let $j= j_0.$ We find that $\mathfrak{d}_0 = \mathfrak{n} \subseteq \mathfrak{d}^{j_0}.$ Therefore $\mathfrak{d}^{j_0} = \mathfrak{n}$ and $J$ is nilpotent of step at most $j_0.$

We next show that $\mathfrak{d}^{j_0-1} \neq \mathfrak{n}.$ Suppose not, that is, $  \mathfrak{n} =\mathfrak{d}^{j_0-1}.$ By definition, $\mathfrak{d}_0 = \mathfrak{n} = \mathfrak{d}^{j_0-1}.$ It follows, by induction, that $\mathfrak{d}_{j-1} \subseteq \mathfrak{d}^{j_0-j}$ for all $j \geq 1$. Let $j = j_0.$ We find that $ \mathfrak{d}_{j_0-1} \subseteq \{0\}.$ This is a contradiction. Hence $\mathfrak{d}^{j_0-1} \neq \mathfrak{n} $ and $J$ is nilpotent of step $j_0.$

Finally, since (i) is equivalent to both (ii) and (iii), we conclude that (ii) and (iii) are equivalent.
\end{proof}

\begin{remark}
\label{r35}
Suppose that a Lie algebra $\mathfrak{n}$ admits a nilpotent complex structure $J$ of step $j_0.$ Then  \begin{equation}
    \mathfrak{c}_j(\mathfrak{n}) + J\mathfrak{c}_j(\mathfrak{n}) \subseteq \mathfrak{p}_j + J \mathfrak{p}_j \subseteq \mathfrak{d}_{j} \subseteq \mathfrak{d}^{j_0-j} \label{eq:ew}
\end{equation} for all $ j \geq 0$.
\end{remark}

It is shown that, in $\cite[\text{Corollary }7]{MR1665327},$ if $\mathfrak{c}_j(\mathfrak{n})$ is $J$-invariant for all $j \geq 0,$ then $J$ is nilpotent. We will provide a different approach to this.

\begin{corollary}
\label{43.9}
Let $\mathfrak{n}$ be a step $k$ nilpotent Lie algebra with a complex structure $J.$ Suppose that all $\mathfrak{c}_j(\mathfrak{n})$ are $J$-invariant. Then $\mathfrak{p}_j = \mathfrak{c}_j(\mathfrak{n})$ for all $j \geq 0.$ Furthermore, $J$ is nilpotent of step $k$.
  \end{corollary}
\begin{proof}
Since all $\mathfrak{c}_j(\mathfrak{n})$ are $J$-invariant, by definition, $\mathfrak{p}_0 = \mathfrak{n} = \mathfrak{c}_0(\mathfrak{n}).$ We have, by induction, that $ \mathfrak{p}_j = \mathfrak{c}_j(\mathfrak{n}) $ for all $j \geq 0.$ Therefore $\mathfrak{p}_k = \mathfrak{c}_k(\mathfrak{n}) = \{0\}$ and $\mathfrak{p}_{k-1} = \mathfrak{c}_{k-1}(\mathfrak{n}) \neq \{0\}$. By $\text{Theorem } \ref{14},$ $J$ is nilpotent of step $k.$
\end{proof}

\begin{corollary}
\label{uus}
Let $\mathfrak{n}$ be a step $k$ nilpotent Lie algebra with a nilpotent complex structure $J$ of step $k$. Suppose that $\mathfrak{c}_{k-1}(\mathfrak{n}) = \mathfrak{z}$. Then $\mathfrak{z}$ is $J$-invariant.
\end{corollary}

\begin{proof}
Since $J$ is nilpotent of step $k,$ by $\eqref{eq:ew}$,   \begin{equation*}
       \mathfrak{z} + J \mathfrak{z} \subseteq \mathfrak{d}_{k-1} \subseteq \mathfrak{d}^1 \subseteq \mathfrak{z}\Rightarrow [ \mathfrak{z} + J \mathfrak{z} ,\mathfrak{n}] = \{0\}.
\end{equation*}
Hence $J\mathfrak{z} = \mathfrak{z}.$
\end{proof}

\begin{corollary}
\label{42.5}
Let $\mathfrak{n}$ be a Lie algebra with a nilpotent complex structure $J$ of step $j_0$. Then for all $j \geq 1,$ $\mathfrak{d}_{j_0-j}$ is not contained in $\mathfrak{d}^{j-1}$.
\end{corollary}

\begin{proof}
Since $J$ is nilpotent of step $j_0,$ by $\text{Theorem }\ref{14},$ $\mathfrak{d}_{j_0-1} \neq \{0\} = \mathfrak{d}^0$. Hence $\mathfrak{d}_{j_0-1}$ is not contained in $\mathfrak{d}^0 .$  Next, suppose that $\mathfrak{d}_{j_0-s+1}$ is not contained in $\mathfrak{d}^{s-2}$ for some $\mathbb{N} \ni s \geq 2.$ We show that $\mathfrak{d}_{j_0-s}$ is not contained in $\mathfrak{d}^{s-1}.$ Suppose not. That is, $\mathfrak{d}_{j_0-s} \subseteq \mathfrak{d}^{s-1}.$ Then \begin{align*}
    \mathfrak{d}_{j_0-s+1}  & = [\mathfrak{d}_{j_0-s},\mathfrak{n}] + J[\mathfrak{d}_{j_0-s},\mathfrak{n}] \\
    & \subseteq [\mathfrak{d}^{s-1},\mathfrak{n}]+J[\mathfrak{d}^{s-1},\mathfrak{n}] \subseteq \mathfrak{d}^{s-2}.
\end{align*}  It follows that $\mathfrak{d}_{j_0-s+1} \subseteq \mathfrak{d}^{s-2}.$ This is a contradiction. Hence $\mathfrak{d}_{j_0-s}$ is not contained in $ \mathfrak{d}^{s-1}.$ By induction,  for all $j \geq 1,$ $\mathfrak{d}_{j_0-j}$ is not contain in $\mathfrak{d}^{j-1}$.
\end{proof}

We investigate the possible range of $\dim \mathfrak{z}$ for a Lie algebra $\mathfrak{n}$ with a nilpotent complex structure $J.$

\begin{proposition}
\label{16}
Let $\mathfrak{n}$ be a non-Abelian Lie algebra of dimension $2n$ with a nilpotent complex structure $J.$ Then $ 2 \leq  \dim \mathfrak{z}  \leq 2n-2.$
\end{proposition}

\begin{proof}
Recall that $ \mathfrak{d}^1 = \mathfrak{z} \cap J \mathfrak{z}$, which is the largest $J$-invariant subspace of $\mathfrak{z}$. Since $J$ is nilpotent, it is clear that $ \mathfrak{d}^1 \neq \{0\}.$ Furthermore, since $ \mathfrak{d}^1$ is $J$-invariant, it follows that $  2 \leq  \dim  \mathfrak{d}^1 \leq  \dim \mathfrak{z}.$ Then the lower bound of $\dim \mathfrak{z}$ is $2.$

Next, we show that the upper bound of $\dim\mathfrak{z}$ is $2n-2.$ Since $\mathfrak{n}$ is non-Abelian, it is possible to find $X,Y \in \mathfrak{n}$ such that $0 \neq [X,Y] \in \mathfrak{c}_1(\mathfrak{n}).$ Then $ \mathrm{span}  \{X,Y\}$ is $2$-dimensional and $ \mathrm{span}  \{X,Y\} \cap \mathfrak{z} = \{0\}.$ Hence $\dim \mathfrak{z} \leq 2n -2.$

In conclusion, $2 \leq  \dim \mathfrak{z} \leq 2n  - 2.$
\end{proof}

\begin{remark}
From Proposition $ \ref{16},$ we can further conclude that if $\dim \mathfrak{z} = 1,$ then the complex structure $J$ on $\mathfrak{n}$ is non-nilpotent. In particular, the Lie algebra of $n \times n$ upper triangular matrices does not admit a nilpotent complex structure.
\end{remark}

\section{Stratified Lie algebras with complex structures}

In this section we consider a special type of nilpotent Lie algebras: $\textit{stratified Lie}$ $\textit{algebra}$. Recent results on nilpotent Lie algebras with a stratification can be found in $\cite{MR4127910},\cite{MR3521656}, \cite{MR3742567}.$ We start with the definition of stratified Lie algebras.

\begin{definition}
A nilpotent Lie algebra $\mathfrak{n}$ is said to admit a $\textit{step k stratification}$ if it has a vector space decomposition of the form $\mathfrak{n}_1  \oplus \mathfrak{n}_2 \oplus \ldots \oplus \mathfrak{n}_k,$ where $\mathfrak{n}_k \neq \{0\},$ satisfying the bracket generating property $[\mathfrak{n}_1,\mathfrak{n}_k] = \{0\}$ and \begin{align*}
    [\mathfrak{n}_1 ,\mathfrak{n}_{j-1}] = \mathfrak{n}_j \qquad  \text{ for all } j \in  \{2,\ldots,k\} .
\end{align*}  A Lie algebra $\mathfrak{n}$ that admits a stratification is called a $\textit{stratified Lie algebra}.$  A complex structure $J$ on a stratified Lie algebra $\mathfrak{n}$ is said to be $\textit{strata-preserving}$ if it preserves each layer of the stratification.
\end{definition}

\begin{remark}
\label{rs}
Let $\mathfrak{n}$ be a step $k$ stratified Lie algebra. By induction, \begin{equation}
     \mathfrak{c}_j(\mathfrak{n}) =\bigoplus_{ j+1\leq l \leq k}  \mathfrak{n}_l \qquad  \text{ for all }  j \geq 0.  \label{eq:e}
\end{equation}
\end{remark}

\begin{proposition}
\label{abc}
Let $\mathfrak{n}$ be a $2n$-dimensional step $n$ nilpotent Lie algebra for some $n \in \mathbb{N}$. Suppose that $\dim  \mathfrak{c}_j(\mathfrak{n}) = 2n-2j$ for all $1 \leq j \leq n.$ Then $\mathfrak{n}$ does not admit a stratification.
\end{proposition}

\begin{proof}
Assume, by contradiction, that $\mathfrak{n}$ admits a stratification. Since, by $\eqref{eq:e}$, $ \mathfrak{c}_j(\mathfrak{n})=\bigoplus_{j+1 \leq l \leq n}$   $ \mathfrak{n}_l$  and  $\dim\mathfrak{c}_1(\mathfrak{n}) = 2n-2$, $\dim \mathfrak{n}_1 =2.$ Since $\mathfrak{n}$ is a stratified Lie algebra, $\mathfrak{n}_2 = [\mathfrak{n}_1,\mathfrak{n}_1].$ Thus $\dim \mathfrak{n}_2 = 1$ and $\dim\mathfrak{c}_2(\mathfrak{n}) = 2n-3 > 2n-4.$ This is a contradiction.
\end{proof}

\begin{proposition}
\label{3.4}
Let $\mathfrak{n}$ be a step $k$ stratified Lie algebra with a complex structure $J$ and $k \geq 2$. Suppose that $\dim \mathfrak{n}_1 =2.$ Then $J$ is not strata-preserving.
\end{proposition}
\begin{proof}
Suppose, by contradiction, that there exists a strata-preserving complex structure $J.$ Then $\dim \mathfrak{n}_j \in 2\mathbb{N}$ for all $j \geq 1.$ However, $\dim \mathfrak{n}_1= 2 $ implies that $\dim \mathfrak{n}_2 =1,$ which contradicts the assumption that $\dim \mathfrak{n}_2 \in 2 \mathbb{N}.$ Hence $\mathfrak{n}$ does not have a strata-preserving complex structure.
\end{proof}

\begin{remark}
Let $\mathfrak{n}$ be a step $3$ stratified Lie algebra with a strata-preserving complex structure. Arguing in a similar way as in Proposition $\ref{3.4}$, we conclude that $\dim \mathfrak{n} \neq 4$ or $6.$
\end{remark}

We show that there always exists a stratification on step $2$ nilpotent Lie algebra with a strata-preserving complex structure $J$.

\begin{theorem}
\label{5}
Let $\mathfrak{n}$ be a step $2$ nilpotent Lie algebra with a complex structure $J.$ Suppose that $\mathfrak{c}_1(\mathfrak{n})$ is $J$-invariant. Then $\mathfrak{n}$ admits a $J$-invariant stratification.
\end{theorem}

\begin{proof}
Define a $J$-invariant inner product $\psi$ by \begin{align*}
     \psi (X,Y) =  \phi(X,Y) + \phi(JX ,JY)  , \text{ for all } X,Y \in \mathfrak{n},
\end{align*} where $\phi$ is an inner product on $\mathfrak{n}.$ We show that there exists a stratification on $\mathfrak{n}$ such that $\mathfrak{n}_1$ and $\mathfrak{n}_2$ are $J$-invariant. Define $\mathfrak{n}_2 = [\mathfrak{n},\mathfrak{n}]$ and $ \mathfrak{n}_1   = \mathfrak{n}_2^\perp$, the orthogonal complement of $ \mathfrak{n}_2$ with respect to $\psi$. Then $\mathfrak{n}_2 = \mathfrak{c}_1(\mathfrak{n})$ is $J$-invariant and by definition $\mathfrak{n}= \mathfrak{n}_1 \oplus \mathfrak{n}_2$. Also note that $$ \mathfrak{n}_2 = [\mathfrak{n}_1\oplus \mathfrak{n}_2,\mathfrak{n}_1\oplus\mathfrak{n}_2] = [\mathfrak{n}_1,\mathfrak{n}_1].  $$ This implies that $\mathfrak{n}_1$ generates $\mathfrak{n}.$ Thus $J$ is a complex structure that preserves both $\mathfrak{n}_1$ and $\mathfrak{n}_2$.
\end{proof}

\begin{remark}
(i) Let $\mathfrak{g}$ be an arbitrary Lie algebra. A complex structure $J$ on $\mathfrak{g}$ is called $\textit{bi-invariant}$ if $J[X,Y] = [JX,Y]$ for all $X,Y \in \mathfrak{g}.$ That is, $J \circ \operatorname{ad} = \operatorname{ad} \circ J.$ A complex structure $J$ is called $\textit{Abelian}$ if $[X,Y] = [JX,JY]$ for all $X,Y \in \mathfrak{g}.$ See, e.g.,  $\cite{MR2040168}$, $\cite{MR2070596}$. Notice that $J$ preserves all terms of $\mathfrak{c}_j(\mathfrak{n})$ and $\mathfrak{c}^j(\mathfrak{n})$ if $J$ is bi-invariant, while if $J$ is Abelian, $J$ only preserves all terms of $\mathfrak{c}^j(\mathfrak{n}).$

(ii) Suppose that $\mathfrak{n}$ is a step $k$ stratified Lie algebra with a bi-invariant complex structure $J.$ From $\eqref{eq:e}$, $ \mathfrak{c}_j(\mathfrak{n}) = \bigoplus_{j+1 \leq l \leq k} \mathfrak{n}_l$, it is clear that $\dim \mathfrak{n}_j \in 2 \mathbb{N}$ for all $ j \in \{1,\ldots,k\}.$
\end{remark}

\begin{proposition}
\label{44}
Let $\mathfrak{n}$ be a step $k$ stratified Lie algebra with a strata-preserving complex structure $J.$ Then $J\mathfrak{c}_j(\mathfrak{n}) = \mathfrak{c}_j(\mathfrak{n})$ for all $j \geq 0 $ and $J$ is nilpotent of step $k$.
\end{proposition}

\begin{proof}
We first show that $J\mathfrak{c}_j(\mathfrak{n}) = \mathfrak{c}_j(\mathfrak{n})$ for all $j \geq 0.$ Recall, from $\eqref{eq:1},$ that $\mathfrak{c}_j(\mathfrak{n}) $   $= \bigoplus_{j+1 \leq l \leq k} \mathfrak{n}_l$ and hence $ J\mathfrak{c}_j(\mathfrak{n}) =\mathfrak{c}_j(\mathfrak{n}) $ for all $j \geq 0.$ By $\text{Corollary }\ref{43.9}$, $J$ is nilpotent of step $k.$
 \end{proof}

It is known that every step $2$ nilpotent Lie algebra maybe stratified (see, e.g., $\cite{MR3742567}$). We will provide another proof in Theorem $\ref{47}$, that every complex structure on a step $2$ nilpotent Lie algebra is nilpotent of step $2$ or $3$. See, e.g.,  $ \cite[\text{Theorem } 1.3]{gao2020maximal}$ and $\cite[\text{Proposition }3.3]{MR2533671}.$ In what follows, we denote by $\mathfrak{k} = \mathfrak{n}_2 \cap J\mathfrak{n}_2$ the largest $J$-invariant subspace contained in $\mathfrak{n}_2$ and we also remind the reader that $\mathfrak{d}^1 = \mathfrak{z} \cap J\mathfrak{z} $ is the largest $J$-invariant subspace contained in $\mathfrak{z}.$

\begin{theorem}
\label{47}
Let $ \mathfrak{n} = \mathfrak{n}_1 \oplus \mathfrak{n}_2$ be a step $2$ nilpotent Lie algebra with a complex structure $J$ and a $J$-invariant inner product $\psi$.

(i) Suppose that $\mathfrak{k} = \{0\}$. Then $ \mathfrak{d}_1$ is Abelian and $J$ is nilpotent of step $2.$

(ii) Suppose that $  \{0\} \neq \mathfrak{k} \subset \mathfrak{n}_2$. Then $J$ is nilpotent of step $3.$

(iii) Suppose that $\mathfrak{n}_2 = \mathfrak{k} .$ Then $J$ is strata-preserving and nilpotent of step $2.$

In conclusion, $J$ is nilpotent of either step $2$ or $3$.

\end{theorem}

\begin{proof}
We start with parts (i) and (ii) together. Suppose that $J\mathfrak{n}_2 \neq \mathfrak{n}_2.$ Then, $\mathfrak{p}_2 = [J\mathfrak{n}_2,\mathfrak{n}] \subseteq \mathfrak{n}_2.$  For all $Z_2 \in \mathfrak{n}_2,$ $X,JX \in \mathfrak{n},$ by the Newlander--Nirenberg condition, \begin{equation}
    [J\mathfrak{n}_2,\mathfrak{n}] \ni [JZ_2,JX] = J[JZ_2,X] \in J[J\mathfrak{n}_2,\mathfrak{n}]. \label{eq:iu}
\end{equation}

 This implies that $\mathfrak{p}_2$ is $J$-invariant in $\mathfrak{n}_2$. We now consider the following two possibilities.

(i) If $\mathfrak{k} = \{0\},$ then from $\eqref{eq:iu},$ we get that $\mathfrak{p}_2 = \{0\}.$ By Theorem $\ref{14},$ $J$ is nilpotent of step $2.$

(ii) If $\{0\} \neq \mathfrak{k} \subset \mathfrak{n}_2,$ since $\{0\} \neq \mathfrak{p}_2 \subseteq \mathfrak{k}$ and $J\mathfrak{p}_2 \subset \mathfrak{n}_2$, then by definition, $\mathfrak{p}_3 = \{0\}.$ By Theorem $\ref{14},$ $J$ is nilpotent of step $3.$

Finally, for part (iii), suppose that $\mathfrak{n}_2 = \mathfrak{k} .$ We find that $J$ preserves $\mathfrak{n}_2.$ By Theorem $\ref{5},$ $J$ is strata-preserving. From $\text{Corollary }\ref{44},$ $J$ is nilpotent of step $2.$

In conclusion, $J$ is either nilpotent of step $2$ or $3.$
\end{proof}

\begin{remark}
\label{r47}
(i) If $J$ is nilpotent of step $3,$ then there does not necessarily exist a $J$-invariant stratification.

(ii) We recall, from $\cite[\text{Theorem }1.3]{gao2020maximal},$ if $\mathfrak{z}$ is not $J$-invariant, then $J$ is nilpotent of step $3.$ From Theorem $\ref{47},$ we have the following table:

\begin{table}[h]
    \centering
 \begin{tabular}{ |c|c|c|c|c }
  \hline
$J$   & Strata-preserving & Non-strata-preserving \\
  \hline
$J\mathfrak{z} =\mathfrak{z}$  & $J$ nilpotent of step $2$ & $J$ nilpotent of step $2$ \\
  \hline
 $J\mathfrak{z} \neq \mathfrak{z}$ & $J$ nilpotent of step $2$ & $J$ nilpotent of step $3$ \\
  \hline
 \end{tabular}
\caption{\label{2.1}nilpotency of $J$}
\end{table}
From $\text{Table } \ref{2.1},$ if $J$ is nilpotent of step $2$, then $J$ is either strata-preserving or center-preserving. More precisely, we conclude that either $\mathfrak{k} =\mathfrak{n}_2 \cap J\mathfrak{n}_2 =\{0\}$ or $J\mathfrak{n}_2 = \mathfrak{n}_2.$ Indeed, if $\mathfrak{n}$ is step $2$ nilpotent Lie algebra with a nilpotent complex structure $J$ of step $2,$ $J$ may not be strata-preserving.
\end{remark}

Notice that an even dimensional nilpotent Lie algebra with $\dim \mathfrak{c}_1(\mathfrak{n}) = 1$ has step $2$. There does not exist a $J$-invariant stratification for dimensional reasons. Suppose that $\dim \mathfrak{c}_1(\mathfrak{n}) \geq  2.$ We have the following theorem.

\begin{theorem}
\label{49}
Let $\mathfrak{n}$ be a step $2$ stratified Lie algebra with a complex structure $J$.

(i) Suppose that $\dim \mathfrak{n}_2 =2$. Then

(a) $J$ is nilpotent of step $2;$ (b) if $\dim \mathfrak{d}^1 = 2,$ then $J\mathfrak{n}_2 = \mathfrak{n}_2$.

(ii) Suppose that $\dim \mathfrak{n}_2 = 2l$ for some $l \geq 2 \in \mathbb{N}$. Furthermore, assume that $\dim \mathfrak{d}^1 \leq 4l-2$ and $J\mathfrak{n}_2 \neq \mathfrak{n}_2$. Then $J$ is nilpotent of step $3.$
\end{theorem}

\begin{proof}
By Theorem $\ref{47},$ $J$ is nilpotent of either step $2$ or $3.$

Start with part (i). Assume that $\dim \mathfrak{n}_2 =2.$ For part (a), notice that $J$ could be either strata-preserving or not. If $J$ is strata-preserving, by Theorem $ \ref{47}$ part (iii), $J$ is nilpotent of step $2$. Otherwise, $J$ is not strata-preserving. Since $\dim \mathfrak{n}_2 =2 $, it follows that $\mathfrak{k} = \{0\}.$ Then by Theorem $ \ref{47}$ part (i), $J$ is Abelian and hence nilpotent of step $2.$

Next, for part (b), recall that $\mathfrak{d}^1 = \mathfrak{z} \cap J\mathfrak{z}$ is the largest $J$-invariant subspace of $\mathfrak{z} $. Suppose that $\mathfrak{n}_2$ is not $J$-invariant. Then $\mathfrak{k}  = \{0\}.$ From part (i), $J$ is nilpotent of step $2.$ It follows, from $\text{Theorem }\ref{14},$ that $\mathfrak{d}_2 = \{0\}$ and $\mathfrak{d}_1 \subseteq \mathfrak{d}^1.$ However, $\dim \mathfrak{d}_1 = \dim \mathfrak{n}_2 \oplus J\mathfrak{n}_2 =  4 > \dim\mathfrak{d}^1.$ This is a contradiction. Hence $J\mathfrak{n}_2 = \mathfrak{n}_2$.

We now show part (ii). Notice that $l \neq 1.$ Otherwise $\dim \mathfrak{n}_2 = \dim \mathfrak{d}^1 = 2.$ This implies that $J\mathfrak{n}_2 = \mathfrak{n}_2.$  Suppose, by contradiction, that $J$ is not nilpotent of step $3.$ Hence $J$ is nilpotent of step $2.$ Then from Remark $\ref{r47}$ part (ii),  $\mathfrak{k} = \{0\} $ and by definition, $\mathfrak{d}_1  = \mathfrak{n}_2 \oplus J\mathfrak{n}_2\subseteq \mathfrak{d}^1.$ However, $\dim \mathfrak{d}_1 = 4l >    \dim \mathfrak{d}^1.$ This is a contradiction. Hence $\mathfrak{k} \neq \{0\}.$ By Theorem $\ref{47}$ part (ii), $J$ is nilpotent of step $3.$
\end{proof}

\begin{remark}
\label{33}
We can extend the statement of part (i) into a higher step stratification as follows:

Let $\mathfrak{n}$ be a step $k$ stratified Lie algebra with a nilpotent complex structure $J$ of step $k$. Suppose that $\dim \mathfrak{n}_k = 2$ and $\dim \mathfrak{d}^1 =2 $. Then $J\mathfrak{n}_k = \mathfrak{n}_k.$
\end{remark}

\begin{corollary}
\label{36}
Let $\mathfrak{n} = \mathfrak{n}_1 \oplus \mathfrak{n}_2$ be a step $2$ stratified Lie algebra with a complex structure $J$ such that $\dim \mathfrak{n}_2 = 2.$ Then $J$ is center-preserving or strata-preserving or both. Furthermore, suppose that $2 \leq \dim \mathfrak{z} \leq 3$ or $\dim \mathfrak{z} = 4$ and $J\mathfrak{z} \neq \mathfrak{z}.$ Then there exists a $J$-invariant stratification.
\end{corollary}

\begin{proof}
By $\text{Theorem }\ref{49},$ $J$ is nilpotent of step $2$. Then by $\text{Table }\ref{2.1}$, $J\mathfrak{n}_2 = \mathfrak{n}_2$ or $J\mathfrak{z} = \mathfrak{z}$ or both if $\mathfrak{n}_2 = \mathfrak{z}$.

Furthermore, $\dim \mathfrak{d}^1 = 2$ since $2 \leq \dim \mathfrak{z} \leq 3$ or $\dim\mathfrak{z} = 4$ and $J\mathfrak{z} \neq \mathfrak{z}.$ By part (ii) of $\text{Theorem }\ref{49},$ $J\mathfrak{n}_2 = \mathfrak{n}_2$. Furthermore, by $\text{Theorem }\ref{5},$ there exists a $J$-invariant stratification.
\end{proof}

Suppose that $\mathfrak{n}$ is a $6$ dimensional step $2$ nilpotent Lie algebra with a complex structure. In $\cite[\text{Table } 1]{MR1899353},$ there is a complete classification of complex structures on these algebras. However, no information is provided on whether or not $J$ preserves the strata.

\begin{corollary}[$\cite{MR2763953,MR1899353}$]
\label{6nil}
Let $\mathfrak{n}$ be a $6$ dimensional step $2$ nilpotent Lie algebra with a complex structure $J $ such that $\dim \mathfrak{c}_1(\mathfrak{n}) =2 .$ Then $\mathfrak{n}$ admits a $J$-invariant stratification.
\end{corollary}

\begin{proof}
By Theorem $\ref{47}$ and Proposition $\ref{16}$, $J$ is nilpotent and $2 \leq \dim \mathfrak{z} \leq 4$. If $\dim \mathfrak{z}  = 4,$ $\dim \mathfrak{c}_1(\mathfrak{n}) = 1$ and $J$ is not strata-preserving due to dimensional reasons. We omit this case. Next, assume that $\dim \mathfrak{z} \leq 3.$ This is a direct consequence of Corollary $\ref{36}.$
 \end{proof}

In what follows, we focus on higher step stratified Lie algebras with complex structures.

\begin{proposition}
Let $\mathfrak{n}$ be a step $3$ stratified Lie algebra with a complex structure $J$.  Suppose that $J\mathfrak{n}_3 = \mathfrak{n}_3$. Then $J$ is nilpotent of step $3.$
\end{proposition}

 \begin{proof}
By the definition of the descending central series $\mathfrak{p}_j$ in $\eqref{eq:p},$ $\{0\} \neq \mathfrak{p}_2 = \mathfrak{n}_3 + [J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}].$ On the one hand, suppose that $[J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] = \{0\}.$ We deduce that $\mathfrak{p}_2 = \mathfrak{n}_3$ and hence $\mathfrak{p}_3 = \{0\}$ by definition. Using Theorem $\ref{14},$ $J$ is nilpotent of step $3.$ On the other hand, suppose that $ [J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] \neq \{0\}.$ Then by the Newlander--Nirenberg condition, for all $U \in \mathfrak{c}_1(\mathfrak{n})$ and $X,JX \in \mathfrak{n}$ \begin{align*}
    0 \neq \underbrace{[JU,JX] - J[JU,X]}_\text{$\in [J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] + J[J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] $} = \underbrace{[U,X]+J[U,JX]}_\text{$\in \mathfrak{n}_3$}.
\end{align*} Hence $[J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] \subseteq \mathfrak{n}_3.$ This implies that $\mathfrak{p}_2 \subseteq \mathfrak{n}_3$ and therefore $J\mathfrak{p}_2 \subseteq \mathfrak{n}_3.$ Then $\mathfrak{p}_3 = [\mathfrak{p}_2,\mathfrak{n}] + [J\mathfrak{p}_2,\mathfrak{n}] = \{0\}.$ Again by Theorem \ref{14}, $J$ is nilpotent of step $3.$
 \end{proof}

\begin{proposition}
Let $\mathfrak{n}$ be a $8$ dimensional step $3$ stratified Lie algebra with a complex structure $J$ such that $2\dim \mathfrak{n}_3 = \dim \mathfrak{c}_1(\mathfrak{n}) = 4$. Suppose that $J\mathfrak{n}_3 \neq \mathfrak{n}_3$ and $\dim \mathfrak{z} \leq 3.$ Then $J$ is nilpotent of step $4.$ Furthermore, $\mathfrak{d}_2 =  \mathfrak{n}_3 \oplus J\mathfrak{n}_3$.
\end{proposition}

\begin{proof}
Since $\mathfrak{n}_3 \subseteq \mathfrak{z},$ $\dim \mathfrak{z} \geq 2.$ By $\cite[\text{Corollary }3.12]{MR4009385},$ $J$ is nilpotent. Then using Remark $\ref{r7}$ (i), $3 \leq j_0 \leq 4$, where $j_0$ is the nilpotent step of $J.$ Suppose, by contradiction, that $J$ is nilpotent of step $3.$ It follows, from the equation $\eqref{eq:ew}$, that $\mathfrak{n}_3 + J\mathfrak{n}_3 \subseteq \mathfrak{d}_2 \subseteq \mathfrak{d}^1 \subseteq \mathfrak{z}.$ On the one hand, since $\dim \mathfrak{z} \leq  3,$ $\dim \mathfrak{d}^1 =2.$ On the other hand, since $J\mathfrak{n}_3 \neq \mathfrak{n}_3$ and $\dim \mathfrak{n}_3 = 2,$ $\mathfrak{n}_3 \cap J\mathfrak{n}_3 = \{0\}$ and therefore $ \dim \mathfrak{n}_3 \oplus J\mathfrak{n}_3 = 4 > \dim \mathfrak{d}^1.$ This is a contradiction. So $J$ is nilpotent of step $4.$

We now show that $\mathfrak{d}_2 =  \mathfrak{n}_3 \oplus J\mathfrak{n}_3$. It is sufficient to show that $\mathfrak{d}_2 \subseteq  \mathfrak{n}_3 \oplus J\mathfrak{n}_3.$ By definition, \begin{align*}
    \mathfrak{d}_2 & = [\mathfrak{d}_1,\mathfrak{n}] +J[\mathfrak{d}_1,\mathfrak{n}] \\
    & = \mathrm{span}\left\{ [T,X] + J[T',X'] : \text{ } \forall \text{ } T,T' \in \mathfrak{d}_1, \text{ } \forall \text{ } X,X' \in \mathfrak{n} \right\}.
\end{align*} For all $ T,T' \in \mathfrak{d}_1,$ we may write $T = U + JV$ and $T' = U' + JV'$ where $U,V,U',V' \in \mathfrak{c}_1(\mathfrak{n}).$ Then \begin{equation}
 0 \neq   [T,X] + J[T',X']=   \underbrace{[U,X]+J[U',X']}_\text{$ \in \mathfrak{n}_3 \oplus J\mathfrak{n}_3 $} +[JV,X]  + J[JV',X']. \label{eq:90}
\end{equation} By the Newlander--Nirenberg condition, \begin{align*}
 0\neq  \underbrace{[JV,X] + J[JV,JX]}_\text{$ \in  [J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}] + J[J\mathfrak{c}_1(\mathfrak{n}),\mathfrak{n}]$} = J[V,X]-[V,X] \in \mathfrak{n}_3 \oplus J\mathfrak{n}_3.
\end{align*} Hence $ [JV,X] + J[JV', X'] \in \mathfrak{n}_3 \oplus J\mathfrak{n}_3.$  From $\eqref{eq:90},$ $[T,X] + J[T',X'] \in \mathfrak{n}_3 \oplus J\mathfrak{n}_3.$ Hence $\mathfrak{d}_2 \subseteq  \mathfrak{n}_3 \oplus J\mathfrak{n}_3.$ In conclusion, $\mathfrak{d}_2 =  \mathfrak{n}_3 \oplus J\mathfrak{n}_3.$
\end{proof}

\section*{Acknowledgement}
The results of this paper are contained in the author's Master of Science thesis at the University of New South Wales, prepared under the the supervision of Michael. G. Cowling and Alessandro Ottazzi. I would like to give deep thanks to both of them, for guiding and sharing their views on mathematics. They also provided very useful comments and suggestions on the project.

\bibliographystyle{plain}


\section{Introduction}
In this paper, we address a very crucial problem in fashion e-commerce, namely, automated \textit{color variants identification}, i.e., identifying fashion products that match exactly in their design (or style), but only to differ in their color (Figure \ref{CV_illustration}). Our motivation to pick the use-case of color variants identification for fashion products comes from the following reasons: i) Fashion products top across all categories in online retail sales \cite{jagadeesh2014large}, ii) Most often users hesitate to buy a fashion product solely due to its color despite liking all other aspects of it. Providing more color options increases add-to-cart ratio, thereby generating more revenue, along with improved customer experience.
\begin{figure}[t]
  \centering
  \includegraphics[width=0.5\columnwidth]{CV_illustration.pdf}
  \caption{Illustration of the \textit{color variants identification} problem. The images belong to \url{www.myntra.com}.
  \label{CV_illustration}
\end{figure}
\begin{figure}[t]
  \centering
  \includegraphics[width=\columnwidth]{CV_pipeline.png}
  \caption{Proposed framework to address color variants identification in fashion e-commerce.}
  \label{CV_pipeline}
\end{figure}

At Myntra (\url{www.myntra.com}), a leading fashion e-commerce platform, we address this problem by leveraging deep visual Representation/ Embedding Learning. Our proposed framework, as shown in Figure \ref{CV_pipeline}, is generic in nature, consisting of an Embedding Learning model (Step 2), which is trained to obtain embeddings (i.e., representation of visual data in a vector space), in such a way that embeddings of color variant images are grouped together. Having obtained the embeddings, we can perform clustering (Step 3) on them to obtain the color variants (embeddings falling into the same cluster would correspond to images that are color variants). Also, as a typical Product Display Page (PDP) image in a fashion e-commerce platform usually contains multiple fashion products, we apply an object detector to localise our \textit{primary} fashion product of interest, as a preprocessing step (Step 1).

It should be noted that the \textit{main component in the pipeline is the Representation/ Embedding Learning model} in Step 2, and this is what we mainly focus in our paper. We discuss different strategies of training the Embedding Learning component. One way is to obtain manual annotations (class labels) indicating whether two product images are color variants to each other. These class labels are used to obtain triplet based constraints (details to be introduced later), consisting of an anchor, a positive and a negative (Figure \ref{CV_illustration}).

Despite performing well in practice, a key challenge in the real-world setting of fashion e-commerce is the large scale of data to be annotated, which often becomes infeasible, and tedious. \textit{Could we somehow get away with this annotation step ?}, this is what we asked ourselves. Interestingly, we noted that color variants of fashion products are in essence, manifestations of the same fashion \textit{stlye/ design} after applying color jittering, which is a widely popular image augmentation technique applied in visual Self-Supervised Learning (SSL). SSL finds image embeddings without requiring manual annotations! Thus, we go one step further, and try to answer the question of whether SSL could be employed in our use-case, for achieving comparable performance with that of a supervised model using manually labeled examples. For this, we evaluated a number of State-Of-The-Art (SOTA) SSL techniques from the recent literature, but found certain limitations in them, for our use-case. To address this, we make certain crafty modifications, and propose a novel SSL method as well.

Following are the \textbf{major contributions of the paper}:
\begin{enumerate}[noitemsep,nolistsep]
    \item A generic visual Representation Learning based framework to identify color variants among fashion products (to the best of our knowledge, studied as a research paper for the first time).
    \item A systematic study of a supervised method (with manual annotations), as well as existing SOTA SSL methods to train the embedding learning model.
    \item A novel contrastive loss based SSL method that focuses on parts of an object to identify color variants.
\end{enumerate}

\textbf{Related Work:}
The problem of visual embedding/ metric learning refers to that of obtaining vector representations/embeddings of images in a way that the embeddings of similar images are grouped together while moving away dissimilar ones. Several supervised \cite{circle_CVPR20,class_collapse_2020,gu2020symmetrical} and unsupervised \cite{dutta2020unsupervised,cao2019unsupervised,li2020unsupervised,SUML_AAAI20} approaches have been proposed in the recent literature. Contrastive learning \cite{simclr_20,moco_cvpr20,byol_20,simsiam_21}, a paradigm of visual SSL \cite{jing2020self}, groups together embeddings obtained from augmentations of the same image, without making use of manual annotations, as needed in Supervised approaches.

\section{Proposed Framework}
Our proposed framework to identify color variants, as already introduced in Figure \ref{CV_pipeline}, consists of the stages: i) Object Detection, ii) Embedding Learning and iii) Clustering. As the original input image usually consists of a human model wearing secondary fashion products as well, we perform object detection (using any off-the shelf object detector) to localise the primary fashion product of interest. The core component of our framework, i.e., the Embedding Learning model, can either be trained using a supervised method (when manual annotations are available), or a SSL method. The latter is useful when obtaining manual annotations is infeasible, at large scale.

We first discuss the supervised method, where we require a set of triplet images obtained from manually annotated examples (consisting of an anchor, positive, and negative, as shown in Figure \ref{CV_illustration}). The positive (p) is usually an image that consists of a product that is a color variant of the product contained in the anchor (a) image. The negative (n) is an image that consists of a product that is not a color variant of the products contained in the anchor and positive images. Let, the embeddings for the triplet of images be denoted as $(\Vec{x}_a, \Vec{x}_p, \Vec{x}_n)$. These triplets are used to train a supervised triplet loss based deep neural network model \cite{schroff2015facenet,veit2017conditional}, the objective of which is to bring the embeddings $\Vec{x}_a$ and $\Vec{x}_p$ closer, while moving away $\Vec{x}_n$. This is achieved by minimizing the following:
\begin{equation}
    \label{equation:tripletmarginrankingloss}
    \mathcal{L}_{triplet} = max(0, \lambda + \delta^2(\Vec{x}_a,\Vec{x}_p) - \delta^2(\Vec{x}_a,\Vec{x}_n) ),
    \end{equation}
such that $\delta^2(\Vec{x}_i,\Vec{x}_j)=\left \| \Vec{x}_i -\Vec{x}_j \right \|_2^2 $ denotes the squared Euclidean distance between the pair of examples $\Vec{x}_i$ and $\Vec{x}_j$, with $\left \| \Vec{x}_i \right \|_2^2$ being the squared $l_2$ norm of $\Vec{x}_i$, and $\lambda>0$ being a margin.

An appropriate clustering algorithm could be applied on the embeddings, such that an obtained cluster contains embeddings of images of products that are color variants to each other. However, the supervised model needs manual annotations which may be infeasible to obtain in large real-world datasets (such as those present in our platform). Thus, we explore SSL to identify color variants.

\subsection{SSL based Embedding Learning model}
\begin{figure}[t]
  \centering
  \includegraphics[width=\columnwidth]{SSL_illus.png}
  \caption{Contrastive SSL based Embedding Model.}
  \label{SSL_illus}
\end{figure}

\begin{figure}[t]
  \centering
  \includegraphics[width=0.9\columnwidth]{slice_motivation.pdf}
  \caption{Drawbacks of using random crop to form contrastive pairs in our use-case.}
  \label{slice_motivation}
\end{figure}

SSL seeks to learn visual embeddings without requiring manual annotations. Figure \ref{SSL_illus} illustrates the contrastive loss based paradigm of SSL, using the SOTA approach called MOCOv2 \cite{moco_cvpr20}. Given an image (Im 1), two augmentations (Im 1-Aug 1 and Im 1-Aug2) are obtained, which are passed through the Embedding Learning model that is maintained as two branches: The Query Encoder and the Key encoder, with parameters $\theta_q$ and $\theta_k$ respectively. It should be noted that the Key encoder is simply a copy of the Query Encoder, and is maintained as a \textit{momentum encoder} obtained using an Exponential Moving Average (EMA) of the latter. The respective embeddings obtained for Im 1-Aug 1 and Im 1-Aug2 are treated as an anchor-positive pair. But, as we do not have manual annotations, to obtain the negative embedding (for avoiding a model collapse if just anchor and positive are pulled), one simply passes augmentation (Im 2-Aug 2) of another distinct image Im 2 (from within a mini-batch) through the key encoder. Additionally, to facilitate comparison with a large pool of negatives, another practice is to store the mini-batch embeddings obtained from the key encoder, in a separate memory module stored as a queue. The final embeddings of inference images are obtained by passing through the query encoder, which is the only branch that is updated via backpropagation (and not the key branch).

Other recent SOTA methods are built in a similar fashion as MOCOv2, with minor modifications. For instance, the BYOL \cite{byol_20} method does not make use of negatives (and hence no memory queue), but uses the EMA based update/ momentum encoder. The SimSiam method \cite{simsiam_21} neither uses negatives, nor momentum encoder. All these SSL methods (MOCOv2, BYOL and SimSiam) employ random cropping in the data augmentation pipeline. However, when we already have object detection in our pipeline, the standard random crop step used in existing SSL methods may actually miss out important regions of a fashion product, which might be crucial in identifying color variants (Figure \ref{slice_motivation}).
\begin{figure}[t]
  \centering
  \includegraphics[width=\columnwidth]{PBCNet_illus.pdf}
  \caption{Illustration of our slicing based approach.}
  \label{PBCNet_illus}
\end{figure}

For this reason, we rather choose to propose a novel SSL variation that considers multiple slices/ patches (left, right, top and bottom) of the primary fashion object (after object detection), and simultaneously obtain embeddings for each of them. The final sum-pooled embedding\footnote{Rather than concatenating or averaging, we simply add them together to maintain simplicity of the model.} is then used to optimize a SSL based contrastive loss (Figure \ref{PBCNet_illus}). We make use of negative pairs in our method because we found the performance of methods that do not make use of negative pairs (eg, SimSiam \cite{simsiam_21}, BYOL \cite{byol_20}) to be sub-optimal in our use-case. We also found merits of momentum encoder and memory queue in our use-case, and thus include them in our method. Following is the Normalized Temperature-scaled cross entropy (NT-Xent) loss \cite{simclr_20} based objective of our method:
\begin{equation}
    \label{NTXent}
    \mathcal{L}_{\Vec{q}} = - \textrm{log} \frac{ \textrm{exp}( {\Vec{q}\Vec{k}_q} / \tau ) }{ \sum_{i=0}^K \textrm{exp}( {\Vec{q}\Vec{k}_i} / \tau ) }
\end{equation}
Here, $\Vec{q}=\sum_v \Vec{q}^{(v)}$, $\Vec{k}_i=\sum_v \Vec{k}_i^{(v)}, \forall i$. In (\ref{NTXent}), $\Vec{q}$ and $\Vec{k}_i$ respectively denote the \textit{final} embeddings obtained for a query and a key, which are essentially obtained by adding the embeddings obtained from across all the views, as denoted by the superscript $v$ for $\Vec{q}^{(v)}$ and $\Vec{k}_i^{(v)}$. Also, $\Vec{k}_q$ represents the positive key corresponding to a query $\Vec{q}$, $\tau$ denotes the temperature parameter, whereas $\textrm{exp}()$ and $\textrm{log}()$ respectively denote the exponential and logarithmic functions. $K$ in (\ref{NTXent}) denotes the size of the memory queue.

We call our method as \textbf{Patch-Based Contrastive Net (PBCNet)}. We conjecture that considering multiple patches i) do not leave things to chance (as in random crops), and provides a deterministic approach to obtain embeddings, ii) enables us to borrow more information (from other patches) to make a better decision on grouping a pair of similar embeddings. Our conjecture is supported not only by evidence of improved discriminative performances by the consideration of multiple fine patches of images, in literature \cite{wang2018learning}, but also by our experimental results.

\section{Experiments}
We evaluated the discussed methods on a large, challenging internal collection of images on our platform (\url{www.myntra.com}). Here, we report our results on a collection of Kurtas images. We used the exact same set to train the supervised (with labeled training data, obtained by our in-house team) and self-supervised methods (without labeled training data) for a fair comparison. For inferencing, we use 6 dataset splits (based on brand, gender, MRP), referred to as Data 1-6.
\textbf{Performance metrics used:} To evaluate the methods, we made use of the following performance metrics: i) Color Group Accuracy (\textbf{CGacc}), an internal metric with business relevance, that reflects the \textit{precision}, ii) Adjusted Random Index (\textbf{ARI}), iii) Fowlkes-Mallows Score (\textbf{FMS}), and iv) Clustering Score (\textbf{CScore}), computed as: $CScore = \frac{2.ARI.FMS}{ARI+FMS}$. While we use CGacc to compare the methods for all the datasets (\textit{Data 1-6}), the remaining metrics are reported only for \textit{Data 4-6}, where we obtain the ground-truth labels for evaluation. All the performance metrics take values in the range $[0,1]$, where a higher value indicates a better performance.

\textbf{Methods Compared}: The focus of our experiments is to evaluate the overall performance by using different embedding learning methods (while fixing the object detector and the clustering algorithm). We compare the supervised triplet loss based model, and our proposed PBCNet method, against the following SOTA SSL methods: \textbf{SimSiam} \cite{simsiam_21}, \textbf{BYOL} \cite{byol_20}, and \textbf{MOCOv2} \cite{moco_cvpr20}.

We implemented all the methods in PyTorch. For all the compared methods, we fix a ResNet34 \cite{ResNet} as a base encoder with  $224 \times 224$ image resizing, and train all the models for a fixed number of 30 epochs, for a fair comparison. The number of epochs was fixed based on observations on the supervised model, to avoid overfitting. For the purpose of object detection, we made use of YOLOv2 \cite{yolov2}, and for the task of clustering the embeddings, we made use of the Agglomerative Clustering algorithm with Ward's method for merging. In all cases, the 512-dimensional embeddings used for clustering are obtained using the avgpool layer of the trained encoder. A margin of 0.2 has been used in the triplet loss for training the supervised model.

\subsection{Systematic Study of SSL for our use-case}

\begin{table}[!t]
\centering
\resizebox{0.9\columnwidth}{!}{%
\begin{tabular}{|c|c|cc|cc|}
\hline
Dataset                 & Metric & \begin{tabular}[c]{@{}c@{}}SimSiam\_v0\\ (w/o \\ norm)\end{tabular} & SimSiam\_v0   & \begin{tabular}[c]{@{}c@{}}SimSiam\_v1\\ (w/o \\ norm)\end{tabular} & SimSiam\_v1   \\ \hline
Data 1                  & CGacc  & 0.5                                                                          & 0.5           & \textbf{1}                                                                   & 0.67          \\ \hline
Data 2                  & CGacc  & 0.5                                                                          & \textbf{0.67} & 0                                                                            & \textbf{0.25} \\ \hline
Data 3                  & CGacc  & 0                                                                            & \textbf{0.4}  & 0                                                                            & \textbf{0.33} \\ \hline
\end{tabular}%
}
\caption{Effect of Embedding Normalization.}
\label{simsiam_normalization}
\end{table}
We now perform a systematic study of the typical aspects associated with SSL, especially for our particular task of color variants identification. For this purpose, we make use of a single Table \ref{results_all}, where we provide the comparison of various SSL methods, including ours.

\textbf{Effect of Data augmentation on our task:} Firstly, for illustrating the effect of different data augmentations, we consider two variants of SimSiam (for its simplicity and strength): i) SimSiam\_v0: A version of SimSiam, where we used the entire original image as the query, and a color jittered image as the positive, and with a batch size of 12, and ii) SimSiam\_v1: SimSiam with standard SSL \cite{simclr_20} augmentations (\texttt{ColorJitter}, \texttt{RandomGrayscale}, \texttt{RandomHorizontalFlip}, \texttt{GaussianBlur} and \texttt{RandomResizedCrop}), and a batch size of 12. For all cases, the following architecture has been used for SimSiam: \texttt{Encoder}\{ ResNet34 $\rightarrow$ (avgpool) $\rightarrow$ \texttt{ProjectorMLP}(512$\rightarrow$4096$\rightarrow$123) \}$\rightarrow$\texttt{PredictorMLP}(123$\rightarrow$4096$\rightarrow$123).

From Table \ref{results_all}, we observed that considering standard augmentations with random crops leads to a better performance than that of SimSiam\_v0. Thus, for all other self-supervised baselines, i.e., BYOL and MOCOv2 we make use of standard augmentations with random crops. However, we later show that our proposed way of considering multiple patches in PBCNet leads to a better performance

\textbf{Effect of l2 normalization for our task:} Table \ref{simsiam_normalization} shows the effect of performing $l2$ normalization on the embeddings obtained using SimSiam. We found that without using any normalization, in some cases (eg, Data 2-3) there are no true color variant groups out of the detected clusters (i.e., zero precision), and hence the performance metrics become zero. Thus, for all our later experiments, we make use of $l2$ normalization on the embeddings as a de facto standard, for all the methods.
\begin{table*}[t]
\centering
\resizebox{0.7\linewidth}{!}{%
\begin{tabular}{|c|c|c|ccccc|c|}
\hline
\multicolumn{2}{|c|}{}            & {\color[HTML]{3531FF} \textbf{Supervised}}  & \multicolumn{6}{c|}{Self-Supervised}                                                    \\ \hline
Dataset                  & Metric & {\color[HTML]{3531FF} \textbf{Triplet Net}} & SimSiam\_v0 & SimSiam\_v1 & SimSiam\_v2 & BYOL  & MOCOv2       & \textbf{PBCNet (Ours)} \\ \hline
Data 1                   & CGacc  & {\color[HTML]{3531FF} \textbf{0.67}}        & 0.5         & 0.67        & 1           & 0.5   & 1            & \textbf{1}             \\ \hline
Data 2                   & CGacc  & {\color[HTML]{3531FF} \textbf{1}}           & 0.67        & 0.25        & 1           & 0.75  & \textbf{0.8} & 0.75                   \\ \hline
Data 3                   & CGacc  & {\color[HTML]{3531FF} \textbf{0.75}}        & 0.4         & 0.33        & 0           & 0.5   & 0.5          & \textbf{0.6}           \\ \hline
                         & CGacc  & {\color[HTML]{3531FF} \textbf{0.67}}        & 0.4         & 0.5         & 0.5         & 0.5   & \textbf{1}   & 0.85                   \\
                         & ARI    & {\color[HTML]{3531FF} \textbf{0.69}}        & 0.09        & 0.15        & 0.12        & 0.27  & 0.66         & \textbf{0.75}          \\
                         & FMS    & {\color[HTML]{3531FF} \textbf{0.71}}        & 0.15        & 0.22        & 0.20        & 0.30  & 0.71         & \textbf{0.76}          \\
\multirow{-4}{*}{Data 4} & CScore & {\color[HTML]{3531FF} \textbf{0.700}}       & 0.110       & 0.182       & 0.152       & 0.281 & 0.680        & \textbf{0.756}         \\ \hline
                         & CGacc  & {\color[HTML]{3531FF} \textbf{1}}           & 0           & 0.5         & 0.33        & 0.5   & 1            & \textbf{1}             \\
                         & ARI    & {\color[HTML]{3531FF} \textbf{1}}           & 0           & 0.09        & 0.28        & 0.64  & 1            & \textbf{1}             \\
                         & FMS    & {\color[HTML]{3531FF} \textbf{1}}           & 0.22        & 0.30        & 0.45        & 0.71  & 1            & \textbf{1}             \\
\multirow{-4}{*}{Data 5} & CScore & {\color[HTML]{3531FF} \textbf{1}}           & 0           & 0.135       & 0.341       & 0.674 & 1            & \textbf{1}             \\ \hline
                         & CGacc  & {\color[HTML]{3531FF} \textbf{0.83}}        & 0.5         & 0.5         & 0.8         & 0.6   & 1            & \textbf{1}             \\
                         & ARI    & {\color[HTML]{3531FF} \textbf{0.44}}        & 0.07        & 0.06        & 0.04        & 0.20  & 0.58         & \textbf{0.79}          \\
                         & FMS    & {\color[HTML]{3531FF} \textbf{0.49}}        & 0.12        & 0.17        & 0.13        & 0.24  & 0.64         & \textbf{0.80}          \\
\multirow{-4}{*}{Data 6} & CScore & {\color[HTML]{3531FF} \textbf{0.466}}       & 0.089       & 0.090       & 0.063       & 0.214 & 0.610        & \textbf{0.796}         \\ \hline
\end{tabular}%
}
\caption{Comparison of our proposed method against the supervised and state-of-the-art SSL baselines, across all the datasets.}
\label{results_all}
\end{table*}

\textbf{Effect of Batch Size and Momentum Encoding in SSL for our task:}
For studying the effect of batch size in SSL for our task, we introduce a third variant of SimSiam, i.e., SimSiam\_v2: This is essentially SimSiam\_v1 with a batch size of 128. We then consider SimSiam\_v1, SimSiam\_v2 and BYOL, where the first makes use of a batch size of 12, while the others make use of batch sizes of 128. We observed that a larger batch size usually leads to a better performance. This is observed from Table \ref{results_all}, by the higher values of performance metrics in the columns for SimSiam\_v2 and BYOL (vs SimSiam\_v1). Additionally, we noted that the momentum encoder used in BYOL causes a further boost in the performance, as observed in its superior performance as compared to SimSiam\_v2 that has the same batch size. It should be noted that except for the momentum encoder, the rest of the architecture and augmentations used in BYOL are exactly the same as in SimSiam. We observed that increasing the batch size in SimSiam does not drastically or consistently improve its performance, something which its authors also noticed \cite{simsiam_21}.

\textbf{Effect of Memory Queue in SSL for our task:}
We also inspect the effect of an extra memory module/queue being used to facilitate the comparisons with a large number of negative examples. In particular, we make use of the MOCOv2 method with the following settings: i) queue size of 5k, ii) temperature parameter of 0.05, iii) a MLP (512$\rightarrow$4096$\rightarrow$relu$\rightarrow$123) added after the avgpool layer of the ResNet34, iv) SGD for updating the query encoder, with learning rate of 0.001, momentum of 0.9, weight decay of $1e^{-6}$, and v) value of 0.999 for $m$ in the momentum update. It is observed from Table \ref{results_all}, by the columns of MOCOv2 and BYOL, that the performance of the former is superior. As BYOL does not use a memory module, but MOCOv2 does, we conclude that using a separate memory module significantly boosts the performance of SSL in our task. Motivated by our observations so far, we choose to employ both momentum encoding and memory module in our proposed PBCNet method.

\subsection{Comparison of PBCNet against the state-of-the-art}
In Table \ref{results_all}, we provide the comparison of our proposed SSL method \textbf{PBCNet} against the SSL SOTA baselines and the supervised baseline across all the datasets. It should be noted that in Table \ref{results_all}, any performance gains for a specific method is due to the intrinsic nature of the same, and not because of a particular hyperparameter setting. This is because we report the \textit{best performance for each method} after adequate tuning of the clustering distance threshold and other parameters, and not just their default hyperparameters.

Following are the configurations that we have used in our \textbf{PBCNet} method: i) memory module size of 5k, ii) temperature parameter of 0.05, iii) the FC layer after the avgpool layer of the ResNet34 was removed, iv) SGD for updating the query encoder, with learning rate of 0.001, momentum of 0.9, weight decay of $1e^{-6}$, and v) value of 0.999 for $m$ in the momentum update.

We made use of a batch size of $32 (=128/4)$ as we have to store tensors for each of the 4 slices simultaneously for each mini-batch (we used a batch size of 128 for the other methods). For data augmentation, we first apply a color distortion in the following order: i) \texttt{ColorJitter(0.8 * s, 0.8 * s, 0.8 * s, 0.2 * s)} with s=1, p=0.8, ii) \texttt{RandomGrayscale} with p=0.2, iii) \texttt{GaussianBlur((3, 3), (1.0, 2.0))} with p=0.5. After the color distortion, we apply our slicing technique. For the second image (positive/negative) we apply the same series of transformations.
\begin{figure}[t]
  \centering
  \includegraphics[width=\columnwidth]{Data4_quali.pdf}
  \caption{Qualitative comparison of color variants groups obtained using our PBCNet method (left column), MOCOv2 (middle column) and the supervised baseline (right column), on \textit{Data 4}.}
  \label{Data4_quali}
\end{figure}

From Table \ref{results_all}, it is clear that the SimSiam method despite its strong claims of not using any negative pairs, nor momentum encoder nor large batches, performs poorly as compared to our supervised method (shown in bold blue color). The BYOL method which also does not make use of negative pairs, performs better than the SimSiam method in our use case, by virtue of its momentum encoder.

Among all compared SSL baselines, it is the MOCOv2 method that performs the best. This is due to the reason of the memory queue that facilitates the comparison with a large number of negative examples. This shows that the importance of considering negative pairs still holds true, especially for challenging use-cases like the one considered in the paper. However, our proposed self-supervised method \textbf{PBCNet} clearly outperforms all the baselines. The fact that it outperforms MOCOv2 can be attributed to the patch-based slicing used, which is the only different component in our method in comparison to MOCOv2 that uses random crop. Another interesting thing that we observed is the fact that despite using much lesser batch size of 32, our method outperforms the baselines. In a way, we were able to extract and leverage more information by virtue of the slicing (by borrowing information from the other patches simultaneously), even with smaller batches.

We also noticed that the supervised baseline performs quite good in our task, even without any data augmentation pipeline as used in the SSL methods. However, by virtue of the large memory queue, and the data augmentations like color jitter, which are pretty relevant to the task of color variants identification, stronger SSL methods like MOCOv2 and PBCNet are in fact capable of achieving comparable performance against the supervised baseline. Having said that, if we do not have adequate labeled data in the first place, we cannot even use supervised learning. Hence, enabling data augmentations and slicing strategy in the supervised model has not been focused, because the necessity of our approach comes from the issue of addressing the lack of labeled data, and not to improve the performance of supervised learning (which any how is label dependent).

\textbf{Effect of Clustering:}
In Table \ref{effect_cluster}, we report the performances obtained by varying the clustering algorithm to group embeddings obtained by different SSL methods, on \textit{Data 4-6}. We picked the Agglomerative, DBSCAN and Affinity Propagation clustering techniques that do not require the number of clusters as input parameter (which is difficult to obtain in our use-case). In general, we observed that the Agglomerative clustering technique leads to a better performance in our use-case. Also, for a fixed clustering approach, using embeddings obtained by our PBCNet method usually leads to a better performance
\begin{table}[t]
\centering
\resizebox{0.8\columnwidth}{!}{%
\begin{tabular}{|c|c|cc|cc|cc|}
\hline
\multicolumn{2}{|c|}{Dataset} & \multicolumn{2}{c|}{\textbf{Data 4}} & \multicolumn{2}{c}{\textbf{Data 5}} & \multicolumn{2}{c|}{\textbf{Data 6}} \\ \hline
Method           & Clustering & \textbf{ARI}      & \textbf{FMS}     & \textbf{ARI}     & \textbf{FMS}     & \textbf{ARI}      & \textbf{FMS}     \\ \hline
\textbf{PBCNet}  & Agglo      & \textbf{0.75}     & \textbf{0.76}    & \textbf{1.00}    & \textbf{1.00}    & \textbf{0.79}     & \textbf{0.80}    \\
                 & DBSCAN     & 0.66              & 0.71             & 1.00             & 1.00             & 0.66              & 0.71             \\
                 & Affinity   & 0.30              & 0.42             & 0.22             & 0.41             & 0.24              & 0.37             \\ \hline
\textbf{MOCOv2}  & Agglo      & \textbf{0.66}     & \textbf{0.71}    & \textbf{1.00}    & \textbf{1.00}    & \textbf{0.58}     & \textbf{0.64}    \\
                 & DBSCAN     & 0.66              & 0.71             & 1.00             & 1.00             & 0.37              & 0.40             \\
                 & Affinity   & 0.20              & 0.32             & 0.04             & 0.26             & 0.25              & 0.41             \\ \hline
\textbf{BYOL}    & Agglo      & \textbf{0.27}     & \textbf{0.30}    & \textbf{0.64}    & \textbf{0.71}    & \textbf{0.20}     & \textbf{0.24}    \\
                 & DBSCAN     & 0.17              & 0.28             & 0.64             & 0.71             & 0.02              & 0.24             \\
                 & Affinity   & 0.03              & 0.14             & 0.28             & 0.45             & 0.01              & 0.11             \\ \hline
\end{tabular}%
}
\caption{Effect of the clustering technique used.}
\label{effect_cluster}
\end{table}

\begin{figure}[t]
  \centering
  \includegraphics[width=0.85\columnwidth]{PBCNet_vs_MOCOv2_quali.pdf}
  \caption{A few groups obtained on \textit{Data 2 \& 3} using MOCOv2 have false positives (shown in red box), while our PBCNet method does not yield such groups.}
  \label{PBCNet_vs_MOCOv2_quali}
\end{figure}

\begin{figure}[t]
  \centering
  \includegraphics[width=\columnwidth]{slicing_tradeoff.pdf}
  \caption{Trade off between vertical and horizontal slicing.}
  \label{slicing_tradeoff}
\end{figure}

\begin{table}[t]
\centering
\resizebox{\columnwidth}{!}{%
\begin{tabular}{|c|c|c|c|ccc|ccc|ccc|}
\hline
Dataset         & Data 1 & Data 2     & Data 3       & \multicolumn{3}{c|}{Data 4}                                                             & \multicolumn{3}{c|}{Data 5} & \multicolumn{3}{c|}{Data 6}                                   \\ \hline
Method          & CGacc  & CGacc      & CGacc        & CGacc         & ARI                                & FMS                                & CGacc     & ARI    & FMS    & CGacc & ARI                       & FMS                       \\ \hline
PBCNet-horiz    & 1      & \textbf{1} & 0.5          & 0.66          & 0.65                               & 0.67                               & 1         & 1      & 1      & 1     & \textbf{0.81}             & \textbf{0.82}             \\
PBCNet-vert     & 1      & 0.6        & 0.6          & \textbf{1} & \textbf{0.88} & \textbf{0.89} & 1         & 1      & 1      & 0.83  & 0.48 & 0.50 \\ \hline
\textbf{PBCNet} & 1      & 0.75       & \textbf{0.6} & 0.85          & 0.75                               & 0.76          & 1         & 1      & 1      & 1     & 0.79 & 0.80 \\ \hline
\end{tabular}%
}
\caption{Effect of Slicing on PBCNet}
\label{effect_slicing}
\end{table}
\textbf{Qualitative results:} Sample qualitative comparisons of color variants groups obtained on \textit{Data 4} using our PBCNet method, MOCOv2 and the supervised baseline are provided in Figure \ref{Data4_quali}. Each of the rows for a column corresponding to a method represents a detected color variants cluster for the considered method. A row has been marked with a red box if the entire cluster contains images that are not color variants to each other. A single image is marked with a red box if it is the only incorrect image, while rest of the images are color variants. We observed that our method not only detects clusters with higher precision (which MOCOv2 does as well), but it also has a higher recall, which is comparable to the supervised method. We also make use of a blue box to show a detected color group by our method which contains images that are color variants, but are difficult to be identified at a first glance, even for humans.

Additionally, Figure \ref{PBCNet_vs_MOCOv2_quali} shows a few color groups identified in the datasets \textit{Data 2 \& 3} using MOCOv2 and our PBCNet. We observed that MOCOv2 detected groups with false positives, while our PBCNet method did not. This could happen because when a random crop is obtained by MOCOv2, it need not necessarily be from a \textit{distinctive} region of an apparel that helps to identify its color variant  (eg, in Figure \ref{PBCNet_vs_MOCOv2_quali}, the bent line like pattern separating the colored and black region of the apparels of Data 2, and the diamond like shape in the apparels of Data 3). We argue that a random crop might have arrived from such a \textit{distinctive} region given that the size of the crop is made larger, etc. But that still leaves things to random chance. On the other hand, our slicing technique being deterministic in nature, \textit{guarantees} that all the regions of an object \textit{would} be captured. We would also like to mention that our slicing approach is agnostic to the fashion apparel type, i.e, the same is easily applicable for any fashion article type (Tops, Shirts, Shoes, Trousers, Track pants, Sweatshirts, etc). In fact, this is how a human identifies color variants as well, by looking at the article along both horizontal and vertical directions, to identify distinctive patterns. Even humans cannot identify an object if we restrict our vision to only a particular small crop.

\textbf{Effect of the slicing}: We also study 2 variants of our PBCNet method: i) PBCNet-horiz (computing an embedding only by considering the top and bottom slices), and ii) PBCNet-vert (computing an embedding using only the left and right slices). The results are shown in Table \ref{effect_slicing}. In \textit{Data 4}, PBCNet-vert performs better than PBCNet-horiz, and in \textit{Data 6}, PBCNet-horiz performs better than PBCNet-vert (significantly). The performance of the two versions is also illustrated in Figure \ref{slicing_tradeoff}. We observed that a single slicing do not work in all scenarios, especially for apparels.

Although the horizontal slicing is quite competitive, it may be beneficial to consider the vertical slices as well. This is observed by the drop in performance of PBCNet-horiz in \textit{Data 3-4} (vs PBCNet). This is because some garments may contain distinguishing patterns that may be better interpreted only by viewing vertically, for example, printed texts (say, \textit{adidas} written vertically), floral patterns etc. In such cases, simply considering horizontal slices may actually split/ disrupt the vertical information. It may also happen that mixing of slicing introduces some form of redundancy, as observed by the occasional drop in the performance of PBCNet when compared to PBCNet-horiz (on \textit{Data 6}) and PBCNet-vert (on \textit{Data 4}). However, on average PBCNet leads to an overall consistent and competitive performance, while avoiding drastically fluctuating improvements or failures. We suggest considering both the directions of slicing, so that they could collectively represent all necessary and distinguishing patterns, and if one slicing misses some important information, the other could compensate for it.

\section{Conclusions}
In this paper, a generic visual Representation Learning based framework to identify color variants in fashion e-commerce has been studied (to the best of our knowledge, for the first time). A systematic study of a supervised method (with manual annotations), as well as existing SOTA SSL methods to train the embedding learning component of our framework has been conducted. A novel contrastive loss based SSL method that focuses on parts of an object to identify color variants, has also been proposed

\section{Acknowledgement}
We would like to thank Dr Ravindra Babu Tallamraju for his support, feedback, and in being a source of inspiration and encouragement throughout the project.