# Minimum Decomposition on Maxmin Trees

Emmy Huang and Ray Tang  Lexington High School, Lexington, MA 02421
<EMAIL_ADDRESS>Massachusetts Institute of Technology, Department of
Computer Science, Cambridge, MA 02139<EMAIL_ADDRESS>
(Date: September 3, 2024)

###### Abstract.

Maxmin trees are trees that consist of nodes that are either local minimums or
maximums. Such trees were first studied by Postnikov. Later Dugan, Glennon,
Gunnells, and Steingrimsson introduced the concept of weight to these trees
and proved a bijection between maximum weight maxmin trees and permutations,
defining weights for permutations. In addition, the q-Eulerian polynomial
$E_{n}(x,q)$ is defined which relates descents and weights of permutations.
This polynomial was later proven to exhibit a stabilization phenomenon by
Agrawal et al. Extracting the formal power series $W_{d}(t)$ from the
stabilization of these coefficients, $W_{d}(t)$ was conjectured to partially
correspond to A256193. In our paper, we introduce a process called minimum
decomposition to help us better understand maxmin trees. Using minimum
decomposition, we present a new way to calculate the weight of different
maxmin trees and prove the bijection between the coefficients of $W_{d}(t)$
and A256193.

###### Key words and phrases:

Maxmin trees, q-Eulerian polynomials, permutations.

###### 2020 Mathematics Subject Classification:

Primary 05A05; Secondary 05A15, 05A30.

##  1\. Introduction

This paper studies how Maxmin Trees can be better understood through Minimum
Decomposition.

Tiered trees are trees with additional requirements on their labels. In
studying tiered trees, Dugan, Glennon, Gunnells, and Steingrímsson [2] defined
the notion of weight for tiered trees which come up in the various geometric
counting problems including the counting of certain representations of
supernova quivers and torus orbits. These trees are generalizations of maxmin
trees, which they study throughout their paper. Specifically, they prove a
bijection between weight 0 maxmin trees and permutations. They also introduce
multiple open questions about weights of permutations.

These have to do with the q-Eulerian Polynomial $E_{n}(x,q)$ defined in [2]
which extends the q-Eulerian Polynomial to include information about descents
in the permutation. As conjectured in [2] and proved in [3], the coefficients
of these polynomials converge to a fixed sequence. Thus, a power series can be
extracted, where the coefficients, as noted in [2] correspond to the numbers
in the OEIS sequence A256193. This sequence $T(n,k)$ counts the number of
partitions of $n$ with $k$ parts of the second kind.

In our paper, we study maxmin trees and offer two central results concerning
the q-Eulerian Polynomial and weights of permutations. Specifically, we prove
the bijection between the coefficients of the power series and $T(n,k)$
conjectured in [2]. We also give two new ways to find the weight of a
permutation, including one iterative approach that can be implemented with
lower complexity and another based on a new perspective to view maxmin trees.
We include implementations of these algorithms in C++ on GitHub.

Thus, our paper is formatted as follows: We first introduce the general
terminology of maxmin trees in section 2. We then consider weights of
permutations in section 3, introducing the concept of minimum decomp trees. In
section 4, we discuss the stabilization of $E_{n}(x,q)$ and use this
information along with minimum decomp trees in section 5 to prove the
bijection between $T(n,k)$ and the coefficients of $W_{d}(t)$.

##  2\. Definitions

######  Definition 2.1.

Let $S_{n}$ be the symmetric group whose elements are all permutations of
length $n$.

Then $S_{n}$ consists of $n!$ different permutations of the set
$[\\![n]\\!]={1,\ldots,n}$. For example, the elements of $S_{3}$ are $\\{1\ 2\
3,2\ 1\ 3,1\ 3\ 2,2\ 3\ 1,3\ 1\ 2,3\ 2\ 1\\}$. A permutation $\sigma\in S_{n}$
is generally denoted by $a_{1}a_{2}a_{3}\ldots a_{n}$.

######  Definition 2.2.

A tree, $T$, is a graph of $n$ nodes and $n-1$ edges with exactly $1$ path
between every pair of nodes. Let $|T|=n$.

######  Definition 2.3.

A maxmin tree, $T$, is a tree of $n$ nodes with a labeling of each node and a
well-ordering between the labels of each node. Furthermore, every node is
either greater than each of its neighbors, a local max, or less than each of
its neighbors, a local min.

######  Definition 2.4.

We define $T_{i}$ to be the subtree of $i$ in a maxmin tree, $T$, where
$T_{i}=\\{x\mid x\in T,x>=i,\forall j$ on the path between $x$ and $i$ in $T$,
$j$ is in $T_{i}$}

######  Definition 2.5.

We define des$(T)$ to be the number of local maximums in $T$.

######  Definition 2.6.

We define the weight of a maxmin tree $T$ recursively:

  1. (1)

If $T$ consists of one node, $w(T)$ = 0.

  2. (2)

Otherwise, we let $m$ be the minimal node, and $T_{1},\ldots,T_{j}$ be the
trees created by deleting $m$ from $T$. Let $u_{1},\ldots,u_{j}$ be the vertex
in $T_{1},\ldots,T_{j}$ respectively connected to $m$. Then we have:

$w(T)=\sum_{i=1}^{j}(d_{i}+w(T_{i}))$

where $d_{i}$ represents the number of vertices in $T_{i}$ that could be in
place of $u_{i}$. Specifically, it represents the number of local maxes that
are smaller than $u_{i}$. $d_{i}$ can also be referred to as the number of
descents in $T_{i}$.

######  Definition 2.7.

The weight of a permutation $\sigma\in S_{n}$ is the weight of its maximum
weight maxmin tree.

To calculate the weight of a permutation $\sigma\in S_{n}$, we construct its
maximum weight maxmin tree. It was proved in [2] that there is a bijection
between the permutations in $S_{n}$ and weight 0 maxmin trees with $n+1$
vertices. The paper describes an algorithm to construct 0 weight trees from a
permutation. Similarly, to construct a maximum weight maxmin tree from a
permutation $\sigma\in S_{n}$:

  1. (1)

We add the value $n+1$ to the end of the permutation $\tau$ to create a
permutation $\tau\in S_{n+1}$ that corresponds to a maximum weight tree.

  2. (2)

Find the minimum value 1 in the permutation $\tau$. We split the permutation
into $\tau_{l}\cdot 1\cdot\tau_{r}$.

  3. (3)

For $\tau_{l}$, we start from the left and split it into
$\tau_{1}\cdot\tau_{2}$ where the rightmost element of $\tau_{1}$ is the
global maximum of $\tau_{l}$. We continue this process recursively on
$\tau_{2}$ and so on until $\tau_{l}=\tau_{1}\cdot\tau_{2}\cdots\tau_{n}$.

  4. (4)

We are left with the sequence $\tau_{1}\cdot\tau_{2}\cdots\tau_{n}\cdot
1\cdot\tau_{r}$ where the rightmost element of each subtree is the global
maximum. These should be connected the minimum element in the permutation

  5. (5)

Repeat this process for each subtree to find the maximum weight tree.

We then use the weight formula to calculate the weight of this tree, and thus
we find the weight of a permutation.

##  3\. Weights of Maxmin Trees and Permutations

######  Theorem 3.1.

The weight of a max-weight tree of a permutation is
$w(T_{m})=\sum_{x}\text{des}(T_{x})-1+w(T_{x}))$

###### Proof.

By choosing the node with the largest label at each step, we add
des$(T_{x})-1$ to the weight at each step. ∎

######  Theorem 3.2.

For a max weight tree $T$, if $m$ is the node with the smallest label in $T$:

$w(T_{m})=\sum_{x}\text{des}(T_{x})-\lvert T_{m}\rvert+1$

where $T_{x}$ enumerates all the trees connected to $T_{m}$.

###### Proof.

We prove this with induction over the size of the tree. For size 1 trees,
there are no trees connected to the single vertex, the size is 1, and the
weight is 0, which validates the formula for the base case. Now, we assume the
formula is correct for all trees of size $n$ and less. Using the definition of
weight for a max weight tree,

$w(T_{m})=\sum_{x}\text{des}(T_{x})-1+w(T_{x}))=\sum_{x}\text{des}(T_{x})-1+w(T_{x}))$

. ∎

######  Corollary 3.3.

The weight of a permutation is the sum of the number of descents in each of
its subtrees $-\,n$.

We propose the following algorithm to find the weight of a permutation
directly from the permutation.

######  Theorem 3.4.

Let

  1. (1)

$\sigma\in S_{n}$ (Note that we append $n+1$ and $0$ in the back and $n+2$ in
the front to avoid bound errors).

  2. (2)

$i$ be a non-descent

  3. (3)

$j$ be the first index to the right of $i$ such that $\sigma_{j}<\sigma_{i}$

  4. (4)

$m$ be the index $i<m<j$ such that for every $k\neq m$,
$i<k<j,\sigma_{m}>\sigma_{k}$

  5. (5)

$M$ be the largest index $M<m$ such that for every
$M<k<m,\sigma_{M}>\sigma_{k}$

  6. (6)

$L$ be the index $L<m$ such that for every $L<k<m$, $\sigma_{k}>\sigma_{i}$
and $\sigma_{L}<\sigma_{i}$

We claim that

$[\text{max}(M,L)+1,m]$

is the subtree of $i$.

###### Proof.

We start by proving the right side bound. Say that $r$ is the right side end
of the subtree of an element $i$. We will prove that $r=m$.

  1. (1)

If $r<m$, we let $k$ be where $\sigma_{k}<\sigma_{i}$ such that $k$ creates
the split at $r$. By this, we mean that it splits the LHS into multiple trees
by taking global maxes as described in the algorithm in Definition 7. Thus, we
have $\sigma_{k}>\sigma_{j}$ since when taking $\sigma_{j}$ as in the
algorithm, we did not create a split at $r$. Therefore, if $k$ creates the
split at $r$, we must have $\sigma_{r}>\sigma_{m}$, which contradicts property
4 for $m$. Thus, $r\nless m$.

  2. (2)

If $r>m$, we have to check two cases. If $r>j$, $r$ could not reach $i$
because $j$ will create a split immediately to the right of index $m$. This is
true because there are no elements between index $m$ and $j$ since $m$ is the
global max by property 4. If $r<j$, because of property 4, we know
$\sigma_{m}>\sigma_{r}$. Assume $k$ was the non-descent that created $r$ and
$\sigma_{k}<\sigma_{i}$. Thus, when splitting the permutation for subtrees of
$r$, we would have created a split immediately to the right of index $m$.
Thus, since $r>m$, we cannot have $r$ in the subtree of $i$. Thus, $r\ngtr m$.

Combined, we get $r=m$, so $m$, as described above, is the rightmost element
of the subtree of $i$. Now, we prove the left side bound. Say that $l$ is the
left side end of the subtree of $i$. We split it into two cases.

  1. (1)

When $L<M$, we want to prove $l=m+1$. There is guaranteed to be a cut at the
right of $M$ and impossible to be a cut between $M$ and $m$, because all non-
descents with values less than $\sigma_{i}$ are either to the left of $M$, to
the right of $j$, or ”blocked by $m$”. As a result, there is a cut at $M$, and
no cut between $M$ and $m$.

  2. (2)

When $L>M$, we want to prove $l=L+1$. Again, every non-descent is either to
the left of $L$, to the right of $j$, or ”blocked by $m$”.

Thus, our theorem holds, and $[\max(M,L)+1,m]$ is the subtree of $i$. ∎

As a result, with Corollary 3.3 we can apply this algorithm to each non-
descent, find the sum of the number of descents in each range, and subtract n
to get the weight of a permutation.

We have implemented the algorithm to find the weight of permutation in Github
in C++. This code runs in $O(n^{2})$, where n is the size of the permutation;
it is the same complexity the original algorithm runs in. However, one can use
segments trees to pre-compute several of the variables, reducing the time to
$O(n\cdot log(n))$. One can find the implementation here.

###  3.1. Minimum Decomposition of Maxmin Trees

Reconsider the algorithm to create the 0-weight maxmin tree of a permutation.

######  Definition 3.5.

We define the minimum decomp tree of $\pi=\pi_{1}\cdots\pi_{L}\cdot
m\cdot\pi_{R}$, where $m$ is the minimum of $\pi$, as connecting $m$ to the
minimum in each subtree $\pi_{1},\cdots,\pi_{L},\pi_{R}$ instead of a descent.
We will view a minimum decomp tree as rooted at $m$ and denote the subtree of
a node as all the nodes below it.

######  Example 3.6.

Take the permutation
$\sigma=1\ 12\ 15\ 9\ 10\ 5\ 7\ 11\ 6\ 4\ 13\ 3\ 8\ 2\ 14\ 16\in S_{15}$ where
16 is appended to the end of the permutation as the extra node in the tree.
After splitting once, we have: $1\cdot 12\ 15\ 9\ 10\ 5\ 7\ 11\ 6\ 4\ 13\ 3\
8\ 2\ 14\ 16$ so by our definition we have 1 is connected to 2. We then find
the minimal element in the right permutation, 2, and again split the
permutation with the maximum weight tree algorithm. Thus, we get: $12\ 15\cdot
9\ 10\ 5\ 7\ 11\ 6\ 4\ 13\cdot 3\ 8\cdot 2\cdot 14\ 16$ so by our definition,
we get 2 is connected to 12, 4, 3, and 14. We continue this process, to get:

  1. (1)

12 is connected to 15

  2. (2)

4 is connected to 5, 6, and 13

  3. (3)

5 is connected to 9 and 7

  4. (4)

9 is connected to 10

  5. (5)

7 is connected to 11

  6. (6)

3 is connected to 8

  7. (7)

14 is connected to 16

A visual representation of this tree is shown below:

12381416121541357119106

Here is a C++ implementation to find the minimum decomposition tree.
All this said, the minimum decomp tree has some interesting properties that we
later use to prove a bijection between the coefficients of q-analouges of
Eulerian polynomials and a certain type of partition denoted $T(n,k)$. Note:
This will be defined later.

###  3.2. Properties of the Minimum Decomp Tree

We refer to the nodes of a minimum decomp tree that don’t have any nodes below
them as its stem. All nodes that are not leaves and the topmost node are part
of its stem.

######  Lemma 3.7.

Any valid minimum decomp tree corresponds to a unique permutation.

###### Proof.

Every minimum decomp tree can biject to its 0-weight counterpart by choosing
the minimum possible descent at each node in the stem and using the algorithm
in [2]. Furthermore, it can be shown with induction that every minimum decomp
tree corresponds to a unique 0-weight tree. When the sizes of the tree are $0$
or $1$, the result is trivial. Assuming that the result is true for all trees
of size $1,\ldots,n$, we can prove the result for $n+1$. We proceed with
contradiction. Assume there exists two minimum decomp trees that correspond to
the same 0-weight permutation. The top node of these trees must be the same
and because of the inductive assumption, all the smaller trees connecting to
the top node must also be the same. Furthermore, because the top node must
connect to the minimums in all the smaller trees, we can conclude that the two
trees are isomorphic to each other. ∎

######  Lemma 3.8.

For every index i, its subtree in a max weight tree are all the nodes below it
in the minimum decomp tree.

###### Proof.

This is true by how the tree was constructed. ∎

######  Lemma 3.9.

Every leaf of a minimum decomp tree is a descent and every descent is a leaf.

###### Proof.

Every descent is a leaf because having a larger than 1 sized subtree in the
minimum decomp tree means it has a subtree in the original permutation. Every
leaf have a subtree of size 1, and therefore, is a descent. ∎

######  Corollary 3.10.

The weight of a permutation can be found by creating its minimum decomp tree,
counting the number of leaves of each non-descent’s subtree and subtracting n.

###### Proof.

This follows directly from Corollary 3.3. ∎

######  Lemma 3.11.

When one ”moves up” a leaf, i.e. the descent is attached to a node one higher
on the stem, the weight of the tree decreases by 1.

###### Proof.

One non-descent loses a leaf in its subtree while all others remain unchanged.
Thus, we just subtract one from the total weight. ∎

##  4\. The Stabilization of $E_{n}(x,q)$

When studying permutations, we often consider different permutation
statistics, one of them being the number of descents in it. Thus, we can
define a way to count these.

######  Definition 4.1.

The Eulerian polynomial is defined as:

$E_{n}(x)=\sum_{\sigma\in S_{n}}x^{\text{des}(\sigma)}$

where $\text{des}(\sigma)$ represents the number of descents in $\sigma$. The
coefficients of these polynomials are called the Eulerian numbers.

######  Example 4.2.

For example, we have $E_{4}(x)=1+11x+11x^{2}+x^{3}$.

To include information about weights of permutations, we define an extension
of the Eulerian polynomial with the addition of a variable $q$.

######  Definition 4.3.

Define the q-Eulerian polynomial as:

$E_{n}(x,q)=\sum_{\sigma\in S_{n}}x^{\text{des}(\sigma)}q^{w(\sigma)}$

where $\text{des}(\sigma)$ represents the number of descents in $\sigma$ and
$w(\sigma)$ represents the weight of $\sigma$.

######  Example 4.4.

We give some of the first few q-Eulerian polynomials below:
$E_{3}(x,q)=1+x(q+3)+x^{2}$
$E_{4}(x,q)=1+x(q^{2}+3q+7)+x^{2}(q^{2}+4q+6)+x^{3}$
$E_{5}(x,q)=1+x(q^{3}+3q^{2}+7q+15)+x^{2}(q^{4}+4q^{3}+11q^{2}+25q+25)+x^{3}(q^{3}+5q^{2}+10q+10)+x^{4}$
$E_{6}(x,q)=1+x(q^{4}+3q^{3}+7q^{2}+15q+31)+x^{2}(q^{6}+4q^{5}+11q^{4}+31q^{3}+58q^{2}+107q+90)+x^{3}(q^{6}+5q^{5}+16q^{4}+34q^{3}+76q^{2}+105q+65)+x^{4}(q^{4}+6q^{3}+15q^{2}+20q+15)+x^{5}$

Fixing an integer $k$, we consider the coefficients $x^{k}$ in $E_{n}(x,q)$.
As $n\rightarrow\infty$, the coefficients of $E_{n}(x,q)$ stabilize
111stabilize meaning converge to a fixed sequence as conjectured in [2].

######  Example 4.5.

The coefficients of $x^{3}$ from Example 5.2 seem to stabilize to

$q^{M}+4q^{M-1}+11q^{M-2}+31q^{M-3}+...$

######  Theorem 4.6.

For $k,d,m\in\mathbb{N}$ such that $m=d+k+1$ and $n\geq m$, the value of
$E_{n}[x^{d}q^{\text{maxwt}(n,d)-k}]$ is stabilized.

This was proved in [3] and we can thus extract the formal power series from
the stabilization.

######  Definition 4.7.

The power series $W_{d}(t)\in\mathbb{Z}[\\![t]\\!]$ for every $d\geq 1$ is
defined as

$W_{d}(t)=1+a_{1}t+a_{2}t^{2}+\cdots$

where the coefficients for $x^{d}$ as $n\rightarrow\infty$ stabilize to

$q^{M}+a_{1}q^{M-1}+a_{2}q^{M-2}+\cdots$

with $M=d(n-d-1)$ as the maximum weight for a permutation of length $n$ and
$d$ descents (proved in [2]).

######  Example 4.8.

The first few power series $W_{d}(t)$ are shown below:

$\displaystyle W_{1}(t)$
$\displaystyle=1+3t+7t^{2}+15t^{3}+31t^{4}+63t^{5}+\cdots$ $\displaystyle
W_{2}(t)$ $\displaystyle=1+4t+11t^{2}+31t^{3}+65t^{4}+157t^{5}+\cdots$
$\displaystyle W_{3}(t)$
$\displaystyle=1+5t+16t^{2}+41t^{3}+112t^{4}+244t^{5}+\cdots$ $\displaystyle
W_{4}(t)$ $\displaystyle=1+6t+22t^{2}+63t^{3}+155t^{4}+393t^{5}+\cdots$

The coefficients of $W_{d}(t)$ was conjectured in [2] to have a partial
correspondece to the sequence A256193 in OEIS. This correspondence is proved
in the next section.

##  5\. A Bijection between $T(n,k)$ and the Coefficients of $W_{d}(t)$

###  5.1. $T(n,k)$

######  Definition 5.1.

Define $T(n,k)$ as the number of partitions of $n$ into 2 types with exactly
$k$ parts of the second type.

######  Example 5.2.

Take $T(8,5)$ for example. We first partition 8 into at least 5 parts and
compute the number of different ways to assign 5 parts of the second sort.

  1. (1)

41111 : ${\binom{5}{5}}=1$

  2. (2)

32111 : ${\binom{5}{5}}=1$

  3. (3)

311111 : ${\binom{6}{5}}=6$

  4. (4)

22211 : ${\binom{5}{5}}=1$

  5. (5)

221111 : ${\binom{6}{5}}=6$

  6. (6)

2111111 : ${\binom{7}{5}}=21$

  7. (7)

11111111 : ${\binom{8}{5}}=56$

Adding, we get that $T(8,5)=92$.

The table below shows the first few $T(n,k)$, $n\geq 0,0\leq k\leq n$:

Table 1. Coefficients of $T(n,k)$ 1 |  |  |  |  |  |  |  |  |  |
---|---|---|---|---|---|---|---|---|---|---
1 | 1 |  |  |  |  |  |  |  |  |
2 | 3 | 1 |  |  |  |  |  |  |  |
3 | 6 | 4 | 1 |  |  |  |  |  |  |
5 | 12 | 11 | 5 | 1 |  |  |  |  |  |
7 | 20 | 24 | 16 | 6 | 1 |  |  |  |  |
11 | 35 | 49 | 41 | 22 | 7 | 1 |  |  |  |
15 | 54 | 89 | 91 | 63 | 29 | 8 | 1 |  |  |
22 | 86 | 158 | 186 | 155 | 92 | 37 | 9 | 1 |  |
30 | 128 | 262 | 351 | 342 | 247 | 129 | 46 | 10 | 1 |
42 | 192 | 428 | 635 | 700 | 590 | 376 | 175 | 56 | 11 | 1
The numbers in bold correspond to coefficients in $W_{d}(t)$.

###  5.2. Bijection to $W_{d}(t)$

We will denote node $n+1$ as a descent.

######  Theorem 5.3.

Consider all permutations of length $n$ with $d$ descents and $(n-d-1)(d-1)$
weight. These correspond to trees of $n+1$ nodes, $d+1$ descents222We consider
the added node $n+1$ a descent, and $(n-d-1)(d-1)$ weight. The number of these
permutations is equal to the ($n-d$)th coefficient in $W_{d}(t)$. We claim
there is a bijection between this coefficient and $T(n-1,d)$ when $n\geq 2d$.

Note that since the coefficients of the q-Eulerian polynomials stabilize, as
mentioned above they correspond to certain coefficients in the power series,
we only have to prove the base case for each $T(n,k)$.

To prove this theorem, we first need the following lemmas:

######  Lemma 5.4.

The maximum possible weight of a tree with $d+1$ descents and $n-d$ non-
descents is $(n-d-1)\cdot d$.

###### Proof.

Using minimum decomposition, we know the maximum weight when there are d + 1
leaves and n - d non-descents is achieved when all the leaves are below all
the non-descents i.e. the non-descents form a straight line and the leaves are
all connected to the bottom node. From Theorem 4.7, this weight is equal to:

$(n-d)(d+1)-n=nd-d^{2}-d=d(n-d-1)$

Thus, we have found the maximum possible weight of this tree. ∎

######  Lemma 5.5.

The minimum decomp trees for trees with $(n-d-1)(d-1)$ weight will always be a
stem of a straight line and all the leaves connected to various nodes on the
stem.

###### Proof.

Consider the maximum weight tree of a permutation with $d$ descents and $n-d$
non-descents. The difference between this and our desired weight is $n-d-1$.
When $2d\geq n$, we have $n-d-1\leq d-1<d+1$.

If node of the stem branch from the straight line, i.e. we have the following
structure ($x_{a}$ and $x_{b}$ are non-descents and part of the stem):

$x_{1}$$\vdots$$x_{n}$$x_{a}$$\vdots$$x_{b}$$\vdots$

the weight will be reduced by at least $d+1$ because there will be a loss of
at least $d+1$ stem-leaf pairs. As a result, it is impossible for the stem to
branch or the weight will drop too fast. ∎

Now, we can prove the earlier theorem. We will approach this by looking at the
minimum decomposition of the trees. Since the stem is a straight line and the
weight is $n-d-1$ too high, we can get all desired minimum decomp trees by
starting with the heaviest minimum decomp tree and moving the leaves up
$n-d-1$ times.

Lets approach this problem by looking at different cases for the number of
leaves connected to each stem, and for each case, the values of the stem.

######  Example 5.6.

Lets look at the case when $n=9$ and $d=5$. Since $n-d=4$, there will be 4
elements in the stem. We will also push up 3 leaves from the max weight case
as $n-d-1=3$. As a result, our stem can have structure 1 0 0 5, 0 1 1 4, or 0
0 3 4 where each number represents the number of leaves connected to each stem
node to reach the desired weight.

When we have 1 0 0 5, we have several possibilities of the nodes on the stem.
We can have:

  * •

1 2 3 4: $\binom{6}{1}$ = 6 choices since we pick which descent connects to 1

  * •

1 2 3 5: 1 choice since we need to put descent 4 on 1 and everything else on 5

  * •

1 2 4 5: 1 choice with the same reasoning as above

  * •

1 3 4 5: 1 choice

When we have 0 1 1 4, we could have:

  * •

1 2 3 4: $\binom{6}{1}$ $\binom{5}{1}$ = 30 choices since we pick which two
descents to connect to 2 and 3

  * •

1 2 3 5: $\binom{2}{1}$ $\binom{5}{1}$ = 10 choices since descent 4 connects
with either 2 and 3 and we must pick which other descent connects to the other
one of 2 and 3

  * •

1 2 3 6: $\binom{2}{1}$ = 2 choices since we pick whether descent 4 or 5
connects to 2 or 3

  * •

1 2 4 5: $\binom{5}{1}$ = 5 choices since descent 3 connects to 2 and we pick
another descent which connects to 4

  * •

1, 2, 4, 6 : 1 choice

Finally, for 0 0 3 4, we could have:

  * •

1 2 3 4: $\binom{6}{3}$ = 20 choices

  * •

1 2 3 5: $\binom{5}{2}$ = 10 choices

  * •

1 2 3 6: $\binom{4}{1}$ = 4 choices

  * •

1 2 3 7: 1 choice

Added together, we get a total of 9 + 48 + 35 = 92 which is equal to $T(8,5)$.

The values grouped by the stem-leaf values do not appear to have a pattern.
However, grouping by the elements in the stem reveals an interesting
correspondence. We will instead look at the number of trees corresponding to
each stem:

######  Example 5.7.

We group the items

  * •

1 2 3 4: 6 + 30 + 20 = 56

  * •

1 2 3 5: 1 + 10 + 10 = 21

  * •

1 2 3 6: 2 + 4 = 6

  * •

1 2 3 7: 1

  * •

1 2 4 5: 1 + 5 = 6

  * •

1 2 4 6: 1

  * •

1 3 4 5: 1

Comparing this with example 6.2, these appear to be the same numbers as the
different partition cases.

Observing from above, it seems the sum of the values in the stem of the tree
are equal, the number of trees they can correspond to are also equal.

######  Theorem 5.8.

The number of minimum decomp trees of $n+1$ nodes and $d+1$ descents
corresponding to the stem:

$x_{1}\cdot x_{2}\cdot x_{3}\cdots x_{n-d}$

and the number of ways to split the partition of $n-1$:

$x_{n-d}-(n-d-1),x_{n-d-1}-(n-d-2),\cdots,x_{2}-1,x_{1},1,1,\cdots$

where there are:

$n-1-\sum_{i=1}^{n-d}x_{i}+\sum_{i=1}^{n-d-1}i$

1’s into two types where there are $d$ parts of the second type are equal.

###### Proof.

For the listed partition, there are:

${\binom{n-1-(\sum_{i=1}^{n-d}x_{i})+(\sum_{i=1}^{n-d-1}i)+n-d}{d}}={\binom{n-1-\sum_{i=1}^{n-d}(x_{i}+i)}{d}}$

different ways to assign $d$ values of the second kind.

Now, we count the number of trees corresponding to $x_{1}\cdot x_{2}\cdot
x_{3}\cdots x_{n-d}$. Note that $x_{1}=1$ or 1 would need to be a descent so
we substitute this in for the rest of the proof.

Furthermore, there are at least $x_{2}-x_{1}-1$ nodes that are connected to
$x_{1}$, $x_{3}-x_{2}-1$ additional nodes connected to $x_{2}$ or $x_{1}$,
$x_{3}-x_{2}-1$ additional nodes that are connected to $x_{3}$, $x_{2}$, or
$x_{1}$ and so on (this is because all the values between $x_{1}$ and $x_{2}$
have to be connected to $x_{1}$, all the values between $x_{2}$ and $x_{3}$
have to be connected to $x_{2}$ or $x_{1}$, and so forth).

We can count the number of trees by first attaching these leaves the highest
value stem node that they can be on (i.e. $x_{2}-x_{1}-1$ to $x_{1}$,
$x_{3}-x_{2}-1$ to $x_{2}$, and so on) and moving up the leaves however many
more times to get the desired weight. It should be noted that we can move any
node up as many times as we want because it is impossible to have enough
weight to “move above 1”. Thus, the weight disparity, i.e. the difference
between the current weight and the maximum weight, is:

$1(x_{n-d}-x_{n-d-1}-1)+2(x_{n-d-1}-x_{n-d-2})+\cdots$
$+(n-d-1)(x_{2}-x_{1}-1)+(n-d)(x_{1}-1)=\sum_{i=1}^{n-d}(x_{i}-i)$

As a result, we need to decrease the weight or “move up” the leaves by

$n-d-1-\sum_{i=1}^{n-d}(x_{i})+\sum_{i=1}^{n-d}(i)$

more. We have to distribute these “move ups” amongst $d+1$ leaves, and so by
stars and bars, the total becomes:

${\binom{n-d-1-(\sum_{i=1}^{n-d}x_{i})+(\sum_{i=1}^{n-d}i+d)}{d}}={\binom{n-1-\sum_{i=1}^{n-d}(x_{i}+i)}{d}}$

Thus, the theorem is true. ∎

The above approach can be used for cases when $n>2d$. However, as $n/d$ grows
larger, the different stem structures grows increasingly complex and does not
follow the same pattern. When $n<3d$ there is still a lot we can say about the
structure of the stem (ex: there can only be 1 off-branching node), however,
larger $n/d$ values make this very difficult. One may try to find a way to
combine data of $T(n,k)$ to find further coefficients of the power series.

##  6\. Acknowledgements

We would like to thank the PROMYS program and the Clay Institute for giving us
the opportunity to work on this project. We would also like to thank our
mentors Paul Gunnells, David Fried, Hana Ephremidze, and John Sim for all
their support and encouragement throughout the process.

## References

  * [1] A. Postnikov. Intransitive trees. Journal of Combinatorial Theory, Series A, 79(2):360–366, 1997.
  * [2] W. Dugan, S. Glennon, P. E. Gunnells, and E. Steingrímsson. Tiered trees, weights, and q-eulerian numbers. Journal of Combinatorial Theory, Series A, 164:24–49, 2019.
  * [3] A. Agrawal, C. Caroline, N. Sun. On Permutation Weights and Q-Eulerian Polynomials. Annals of Combinatorics, 24(2): 363-376, 2020.


# OPEs of rank two $\mathcal{W}$-algebras

Justine Fasquel  School of Mathematics and Statistics, University of
Melbourne, Parkville, VIC 3010, Australia<EMAIL_ADDRESS>
###### Abstract.

In this short note, we provide OPEs for several affine $\mathcal{W}$-algebras
associated with Lie algebras of rank two and give some direct applications.

##  1\. Introduction

The $\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{g},f)$ is obtained from
an Hamiltonian reduction of the affine vertex algebra $V^{k}(\mathfrak{g})$
[14, 17]. Hence, both structure are closely related. However, if the
description of $V^{k}(\mathfrak{g})$ in term of strong generators and
relations (OPEs) is well-known (see for instance [15, 16]), it is no longer
the case for the $\mathcal{W}$-algebras. Indeed, the latter do not directly
come from Lie algebras and we need the formalism of vertex algebras to
describe them. The computation of OPEs is difficult in general and only few
examples were computed explicitely [6, 10, 21].

In this short note, we provide the OPEs for $\mathcal{W}$-algebras associated
with Lie algebras of rank two (i.e. $\mathfrak{sl}_{3}$, $\mathfrak{sp}_{4}$
and $G_{2}$).

The OPEs consist in a powerful tool to prove important and precise results.
For instance, they can be used to prove rationality of $\mathcal{W}$-algebras
[6, 13], compute associated varieties [12], or find isomorphisms between
vertex algebras [2, 3, 19].

The present paper is organized as follows. In Sect. 2 we recall the
construction of the $\mathcal{W}$-algebra due to Kac, Roan, Wakimoto [17].
Sect. 3 presents the OPEs of $\mathcal{W}$-algebras associated to a Lie
algebra $\mathfrak{g}$ of rank two.111Due to limited computational resources,
OPEs of $\mathcal{W}$-algebras associated with principal nilpotent elements of
$\mathfrak{sp}_{4}$ remain incomplete for the moment. We use these OPEs to
emphasize isomorphisms of $\mathcal{W}$-algebras for particular values of the
level $k$. These levels are listed in Sect. 4.

### Acknowledgments

This paper is based on the author’s Ph.D. thesis [12]. The author would like
to thank her advisors A. Moreau and T. Arakawa for suggesting the problem. She
is very grateful to D. Adamović for useful discussions on collapsing levels.
She also thanks A. Milas for the interesting feedbacks and exchanges.

The author acknowledges support from the Labex CEMPI (ANR-11-LABX-0007-01).
Her research is supported by a University of Melbourne Establishment Grant.

##  2\. Structure of affine $\mathcal{W}$-algebras

We assume the lector familiar with the formalism of vertex algebras and we
refer to [17] and [4, 12, 18] for details on the construction of
$\mathcal{W}$-algebras.

Let $\mathfrak{g}$ be a complex simple finite dimensional Lie algebra.
Consider $f$ a nilpotent element of $\mathfrak{g}$ and $k$ a complex number.
The (affine) $\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{g},f)$ is the
vertex algebra obtained as the zero-th cohomology of a complex
$\mathscr{C}(\mathfrak{g},f,k)$ constructed from the affine vertex algebra
$V^{k}(\mathfrak{g})$. It is a particular case of BRST reduction usually
referred as the Drinfeld-Sokolov reduction of $V^{k}(\mathfrak{g})$. We write

$\mathcal{W}^{k}(\mathfrak{g},f)=H_{f}^{0}(V^{k}(\mathfrak{g})).$

Its simple graded quotient is denoted by $\mathcal{W}_{k}(\mathfrak{g},f)$.
Provided that $k$ is non-critical, i.e. $k\neq-h^{\vee}$,
$\mathcal{W}^{k}(\mathfrak{g},f)$ inherits a structure of conformal vertex
algebra from those of $V^{k}(\mathfrak{g})$. Denote $L(z)$ the usual conformal
field defined in [17].

Let embed $f$ into an $\mathfrak{sl}_{2}$-triple $(e,h,f)$ given by the
Jacobson-Morosov theorem. We have

$[h,e]=2e,\qquad[h,f]=-2f,\qquad\text{and}\qquad[e,f]=h.$

The semisimple element $x_{0}:=h/2$ induces an
$\frac{1}{2}\mathbb{Z}$-gradation on $\mathfrak{g}$,

(1) $\mathfrak{g}=\bigoplus_{j\in\frac{1}{2}\mathbb{Z}}\mathfrak{g}_{j},$

where $\mathfrak{g}_{j}=\\{y\in\mathfrak{g}\mid[x_{0},y]=jy\\}$. To any
$a\in\mathfrak{g}_{-j}$, $j\in\frac{1}{2}\mathbb{Z}$, we can associate a field
$J^{a}(z)$ of $\mathscr{C}(\mathfrak{g},f,k)$. This field has conformal weight
$1+j$ with respect to $L$. The fields $\\{J^{a}\\}_{a\in\mathfrak{g}}$ play an
important role in the structure of the $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{g},f)$. Let $\mathfrak{g}^{f}$ be the centralizer
of $f$ in $\mathfrak{g}$, and set
$\mathfrak{g}^{f}_{j}:=\mathfrak{g}^{f}\cap\mathfrak{g}_{j}$ for all
$j\in\frac{1}{2}\mathbb{Z}$. By the theory of $\mathfrak{sl}_{2}$, we have

(2) $\displaystyle\mathfrak{g}^{f}=\bigoplus_{j\leqslant
0}\mathfrak{g}^{f}_{j}.$

The strong generators of the $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{g},f)$ are in one to one correspondance with the
elements of a basis of $\mathfrak{g}^{f}$ with respect to the grading (2).

######  Theorem 2.1 ([18]).

For each $a\in\mathfrak{g}^{f}_{-j}$, $j\geqslant 0$, there exists a field
$J^{\\{a\\}}(z)$ of $\mathcal{W}^{k}(\mathfrak{g},f)$ of conformal weight
$1+j$ with respect to $L$ such that $J^{\\{a\\}}(z)-J^{a}(z)$ is a linear
combination of normally order products of the fields $J^{b}(z)$, where
$b\in\mathfrak{g}_{-s}$, $0\leqslant s<j$ and their derivatives.

Let $\\{a_{i}\\}_{i\in I}$ be a basis of $\mathfrak{g}^{f}$ compatible with
the graduation (2). Then $\mathcal{W}^{k}(\mathfrak{g},f)$ is freely strongly
generated by the fields $\\{J^{\\{a_{i}\\}}\\}_{i\in I}$.

In practice, to construct $J^{\\{a\\}}(z)$ from $J^{a}(z)$, we write a linear
combination of fields as in the theorem and find coefficients so that the
field $J^{\\{a\\}}(z)$ is $d_{(0)}$-closed. When $f$ is an even nilpotent
element there exists an algorithm to construct the strong generators of the
$\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{g},f)$ (see [12, 18]). In
[18], Kac and Wakimoto give formulas to construct strong generators with
conformal weights $1$, $1/2$ and $0$, and they compute OPEs between them. This
provides in particular an explicit description of all $\mathcal{W}$-algebras
associated with minimal nilpotent elements. Indeed, if $f$ belongs to the
minimal nilpotent orbit $\mathbb{O}_{\min}$ then the grading (1) induced by
$x$ is _minimal_ :

$\mathfrak{g}=\mathfrak{g}_{-1}\oplus\mathfrak{g}_{-\frac{1}{2}}\oplus\mathfrak{g}_{0}\oplus\mathfrak{g}_{\frac{1}{2}}\oplus\mathfrak{g}_{1},$

with $\mathfrak{g}_{-1}=\mathbb{C}f$ and $\mathfrak{g}_{1}=\mathbb{C}e$.

##  3\. OPEs of $\mathcal{W}$-algebras associated with rank two Lie algebras

In this section, we present OPEs of the $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{g},f)$ where $\mathfrak{g}$ is a simple Lie algebra
of rank two and $k\neq-h^{\vee}$ is a non critical level. For simplicity, $L$
will always denote the conformal vector. In the cases we consider, we were
able to find strong generators which are all – except $L$ – _primary_ with
respect to the conformal structure induced by $L$. It means that for any
strong generator $J\neq L$ of conformal weight $\Delta$,

$L(z)J(w)\sim\frac{\Delta}{(z-w)^{2}}J(w)+\frac{1}{(z-w)}\partial J(w).$

We take these primary generators in the following. With this choice, the OPEs
involving $L$ are uniquely determined. We omit them in the computations.

###  3.1. $\mathcal{W}$-algebras associated with nilpotent elements of
$\mathfrak{sl}_{3}$

The simple Lie algebra $\mathfrak{sl}_{3}$ of type $A_{2}$ admits two non-
trivial nilpotent orbits: the principal and the minimal one.

The corresponding $\mathcal{W}$-algebras are among the first examples of
$\mathcal{W}$-algebras which have been described explicitly. They are
respectively called the Bershadsky-Polyakov vertex algebra [8, 20] and the
Zamolodchikov vertex algebra [21].

In [6], Arakawa gives an explicit description of the Bershadsky-Polyakov
vertex algebra which corresponds to the $\mathcal{W}$-algebra associated with
a minimum nilpotent element of $\mathfrak{sl}_{3}$. The $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{sl}_{3},f_{\mathrm{min}})$ is strongly generated by
the fields $J(z)$, $G^{\pm}(z)$ and $L(z)$ of conformal weights $1$,
$\frac{3}{2}$ and $2$ respectively. These fields satisfy the following
relations:

$\displaystyle J(z)J(w)$ $\displaystyle\sim\frac{(3+2k)}{(z-w)^{2}},$
$\displaystyle J(z)G^{\pm}(w)$
$\displaystyle\sim\pm\frac{1}{(z-w)}G^{\pm}(w),$ $\displaystyle
G^{\pm}(z)G^{\pm}(w)$ $\displaystyle\sim 0,$ $\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim-\frac{(1+k)(3+2k)}{(z-w)^{3}}+\frac{3(1+k)}{(z-w)^{2}}J(w)$
$\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left(-(3+k)L(w)+3:J(w)^{2}:-\frac{3(1+k)}{2}\partial
J(w)\right),$

where

$c_{k}=-\frac{(1+3k)(3+2k)}{3+k}.$

On another side, the $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{sl}_{3})$ is strongly generated by the fields
$L(z)$ and $W(z)$ of conformal weights $2$ and $4$ respectively satisfying the
OPE:

$\displaystyle W(z)W(w)$
$\displaystyle\sim\frac{w_{k}c_{k}}{3(z-w)^{6}}+\frac{2w_{k}}{(z-w)^{4}}L(w)+\frac{w_{k}}{2(z-w)^{3}}\partial
L(w)$ $\displaystyle+\frac{1}{(z-w)^{2}}$
$\displaystyle\left(\frac{2(3+k)^{2}}{3}:L(w)^{2}:-\frac{3(3+k)^{2}(2+k)^{2}}{4}\partial^{2}L(w)\right)$
$\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left(\frac{2(3+k)^{3}}{3}:L(w)\partial
L(w):-\frac{(3+k)^{2}(18+14k+3k^{2})}{18}\partial^{3}L(w)\right),$

where

$c_{k}=-\frac{2(5+3k)(9+4k)}{3+k},$

and

$w_{k}=-\frac{(3+k)^{2}(4+3k)(12+5k)}{6}.$

###  3.2. $\mathcal{W}$-algebras associated with nilpotent elements of
$\mathfrak{sp}_{4}$

There are three non-trivial nilpotent orbits in $\mathfrak{sp}_{4}$
corresponding to the principal, the subregular, the minimal nilpotent orbits.

The minimal $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{sp}_{4},f_{\mathrm{min}})$ is of type
$(1^{3},\frac{3}{2}^{2},2)$, strongly generated by the fields $J(z)$,
$F^{\pm}(z)$, $G^{\pm}(z)$ and $L(z)$. They satisfy the following OPEs:

$\displaystyle J(z)J(w)$ $\displaystyle\sim\frac{(1+2k)}{(z-w)^{2}},$
$\displaystyle J(z)F^{\pm}(w)$
$\displaystyle\sim\pm\frac{2}{(z-w)}F^{\pm}(w),$ $\displaystyle
F^{\pm}(z)F^{\pm}(w)$ $\displaystyle\sim 0,$ $\displaystyle F^{+}(z)F^{-}(w)$
$\displaystyle\sim\frac{(1+2k)}{2(z-w)^{2}}+\frac{1}{(z-w)}J(w),$
$\displaystyle J(z)G^{\pm}(w)$
$\displaystyle\sim\pm\frac{1}{(z-w)}G^{\pm}(w),$ $\displaystyle
G^{\pm}(z)F^{\pm}(w)$ $\displaystyle\sim 0,$ $\displaystyle
G^{\pm}(z)F^{\mp}(w)$ $\displaystyle\sim\frac{1}{(z-w)}G^{\mp}(w),$
$\displaystyle G^{\pm}(z)G^{\pm}(w)$
$\displaystyle\sim\pm\frac{4(2+k)}{(z-w)^{2}}F^{\pm}(w)\pm\frac{2(2+k)}{(z-w)}\partial
F^{\pm}(w),$ $\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim\frac{2(1+2k)(2+k)}{(z-w)^{3}}+\frac{2(2+k)}{(z-w)^{2}}J(w)$
$\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left(-2(3+k)L(w)+4:F^{+}(w)F^{-}(w):+:J(w)^{2}:+k\partial
J(w)\right),$

where

$c_{k}=-\frac{3(k+1)(2k+1)}{3+k}.$

The explicit description of the subregular $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})$ firstly appeared in
[13]. The $\mathcal{W}$-algebra
$\mathcal{W}^{k}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})$ is strongly generated
by the fields $J(z)$, $G^{\pm}(z)$ and $L(z)$ of conformal weights $1$, $2$
and $2$ respectively. They satisfy the OPEs:

$\displaystyle J(z)J(w)$ $\displaystyle\sim\frac{(2+k)}{(z-w)^{2}},$
$\displaystyle J(z)G^{\pm}(w)$
$\displaystyle\sim\pm\frac{1}{(z-w)}G^{\pm}(w),$ $\displaystyle
G^{\pm}(z)G^{\pm}(w)$ $\displaystyle\sim 0,$ $\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim-\frac{3(1+k)(2+k)^{2}}{(z-w)^{4}}-\frac{3(1+k)(2+k)}{(z-w)^{3}}J(w)$
$\displaystyle+\frac{1}{(z-w)^{2}}$
$\displaystyle\left((2+k)(3+k)L(w)-(3+2k):J(w)^{2}:-\frac{3(1+k)(2+k)}{2}\partial
J(w)\right)$ $\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left((3+k):L(w)J(w):+\frac{(3+k)(2+k)}{2}\partial
L(w)-:J(w)^{3}:\right.$ $\displaystyle\qquad\left.-(3+2k):J(w)\partial
J(w):-\frac{(5+4k+k^{2})}{2}\partial^{2}J(w)\right),$

where

$c_{k}=-\frac{2(9+16k+6k^{2})}{3+k}.$

The prinicipal $\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{sp}_{4})$ is
of type $(2,4)$ strongly generated by the fields $L(z)$ and $W(z)$. The field
$W(z)$ satisfy the OPE222Due to limited ressources, the computation remains
incomplete for the moment.:

$\displaystyle W(z)W(w)$
$\displaystyle\sim\frac{w_{k}c_{k}}{4(z-w)^{8}}+\frac{2w_{k}}{(z-w)^{6}}L(w)+\frac{w_{k}}{(z-w)^{5}}\partial
L(w)$
$\displaystyle+\frac{3(3+k)(3+2k)(8+3k)}{(z-w)^{4}}\bigg{(}30(17+12k+2k^{2})W(z)$
$\displaystyle+(3+k)(11+5k)(11+6k)(18+7k)(19+8k)\Big{(}-7(3+k):L(w)^{2}:$
$\displaystyle\qquad+\frac{(162+139k+30k^{2})}{2}\partial^{2}L(w)\Big{)}\bigg{)}$
$\displaystyle+\frac{1}{(z-w)^{3}}(\ldots)+\frac{1}{(z-w)^{2}}(\ldots)+\frac{1}{(z-w)}(\ldots),$

where

$c_{k}=-\frac{2(12+5k)(13+6k)}{3+k},$

and

$w_{k}=(3+k)^{2}(3+2k)(8+3k)(11+5k)(11+6k)(18+7k)(19+8k)(747+674k+150k^{2}).$

###  3.3. $\mathcal{W}$-algebras associated with nilpotent elements of $G_{2}$

Consider the Lie algebra $G_{2}$ of rank two. According to the Bala-Carter
classification, $G_{2}$ has four non-trivial nilpotent orbits: the three
canonical nilpotent orbits – $\mathbb{O}_{\min}$,
$\mathbb{O}_{\mathrm{subreg}}$, and $\mathbb{O}_{\mathrm{reg}}$ – and an
additional nilpotent orbit of dimension $8$, denoted $\tilde{A_{1}}$ [9, Chap.
8].

The $\mathcal{W}$-algebra $\mathcal{W}^{k}(G_{2},f_{\mathrm{min}})$ is of type
$(1^{3},\frac{3}{2}^{4},2)$, strongly generated by the fields $J(z)$,
$F^{\pm}(z)$, $G^{\pm}(z)$, $W^{\pm}(z)$, and $L(z)$. They satisfy the OPEs:

$\displaystyle J(z)J(w)$ $\displaystyle\sim\frac{2(5+3k)}{(z-w)^{2}},$
$\displaystyle J(z)F^{\pm}(w)$
$\displaystyle\sim\pm\frac{2}{(z-w)}F^{\pm}(w),$ $\displaystyle
J(z)G^{\pm}(w)$ $\displaystyle\sim\pm\frac{3}{(z-w)}G^{\pm}(w),$
$\displaystyle J(z)W^{\pm}(w)$
$\displaystyle\sim\pm\frac{1}{(z-w)}W^{\pm}(w),$ $\displaystyle
F^{\pm}(z)F^{\pm}(w)$ $\displaystyle\sim\,G^{\pm}(z)G^{\pm}(w)\sim
F^{\pm}(z)G^{\pm}(w)\sim 0,$ $\displaystyle F^{+}(z)F^{-}(w)$
$\displaystyle\sim\frac{(5+3k)}{(z-w)^{2}}+\frac{1}{(z-w)}J(w),$
$\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim\frac{2(4+3k)(5+3k)}{9(z-w)^{3}}+\frac{(4+3k)}{3(z-w)^{2}}J(w)$
$\displaystyle+\frac{1}{(z-w)}\left(\right.$
$\displaystyle\left.-(4+k)L(w)+\frac{2}{3}:F^{+}(w)F^{-}(w):+\frac{1}{3}:J(w)^{2}:+\frac{(2+3k)}{6}\partial
J(w)\right),$ $\displaystyle F^{\pm}(z)G^{\mp}(w)$
$\displaystyle\sim\frac{1}{(z-w)}W^{\mp}(w),$ $\displaystyle
W^{\pm}(z)W^{\pm}(w)$
$\displaystyle\sim\pm\frac{4(4+3k)}{3(z-w)^{2}}F^{\pm}(w)\pm\frac{2(4+3k)}{3(z-w)}\partial
F^{\pm}(w),$ $\displaystyle W^{+}(z)W^{-}(w)$
$\displaystyle\sim-\frac{2(4+3k)(5+3k)}{3(z-w)^{3}}-\frac{(4+3k)}{3(z-w)^{2}}J(w)$
$\displaystyle+\frac{1}{(z-w)}\left(\right.$
$\displaystyle\left.3(4+k)L(w)-\frac{10}{3}:F^{+}(w)F^{-}(w):-\frac{1}{3}:J(w)^{2}:+\frac{(2-k)}{2}\partial
J(w)\right),$ $\displaystyle F^{\pm}(z)W^{\pm}(w)$
$\displaystyle\sim\frac{3}{(z-w)}G^{\pm}(w),$ $\displaystyle
F^{\pm}(z)W^{\mp}(w)$ $\displaystyle\sim\frac{2}{(z-w)}W^{\pm}(w),$
$\displaystyle G^{\pm}(z)W^{\pm}(w)$
$\displaystyle\sim\pm\frac{2}{3(z-w)}:F^{\pm}(w)^{2}:,$ $\displaystyle
G^{\pm}(z)W^{\mp}(w)$
$\displaystyle\sim\mp\frac{2(4+3k)}{3(z-w)^{2}}F^{\pm}(w)+\frac{1}{(z-w)}\left(-\frac{2}{3}:J(w)F^{\pm}(w):\mp\frac{(2+3k)}{3}\partial
F^{\pm}(w)\right),$

where

$c_{k}=-\frac{2k(5+3k)}{4+k}.$

The $\mathcal{W}$-algebra $\mathcal{W}^{k}(G_{2},f_{\tilde{A_{1}}})$ is
strongly generated by the fields $J(z)$, $F^{\pm}(z)$, $G^{\pm}(z)$, and
$L(z)$ of conformal weights $1$, $1$, $\frac{5}{3}$ and $2$ respectively. They
satisfy the OPEs:

$\displaystyle J(z)J(w)$ $\displaystyle\sim\frac{(3+2k)}{(z-w)^{2}},$
$\displaystyle J(z)F^{\pm}(w)$
$\displaystyle\sim\pm\frac{2}{(z-w)}F^{\pm}(w),$ $\displaystyle
J(z)G^{\pm}(w)$ $\displaystyle\sim\pm\frac{1}{(z-w)}G^{\pm}(w),$
$\displaystyle F^{\pm}(z)F^{\pm}(w)$
$\displaystyle\sim\,G^{\pm}(z)F^{\pm}(w)\sim 0,$ $\displaystyle
F^{+}(z)F^{-}(w)$
$\displaystyle\sim\frac{(3+2k)}{2(z-w)^{2}}+\frac{1}{(z-w)}J(w),$
$\displaystyle F^{\pm}(z)G^{\mp}(w)$
$\displaystyle\sim\frac{1}{(z-w)}G^{\pm}(w),$ $\displaystyle
G^{\pm}(z)G^{\pm}(w)$
$\displaystyle\sim\mp\frac{2(2+k)(10+3k)(17+6k)}{(z-w)^{4}}F^{\pm}(w)\mp\frac{(2+k)(10+3k)(17+6k)}{(z-w)^{3}}\partial
F^{\pm}(w)$ $\displaystyle+\frac{1}{(z-w)^{2}}$ $\displaystyle\left(\pm
2(4+k)(16+5k):L(w)F^{\pm}(w):\mp 16(3+k):F^{+}(w)F^{\pm}(w)F^{-}(w):\right.$
$\displaystyle\mp$ $\displaystyle 4(3+k):F^{\pm}(w)J(w)^{2}:-(44\mp 48+(24\mp
16)k+3k^{2}):F^{\pm}(w)\partial J(w):$ $\displaystyle+$
$\displaystyle\left.(2+k)(10+3k):J(w)\partial F^{\pm}(w):\mp 2(3+k)(38\mp
4+20k+3k^{2})\partial^{2}F^{\pm}(w)\right)$ $\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left(\pm(4+k)(16+5k):L(w)\partial F^{\pm}(w):\mp
16(3+k):F^{+}(w)F^{-}(w)\partial F^{\pm}(w):\right.$ $\displaystyle\pm$
$\displaystyle(4+k)(16+5k):\partial L(w)F^{\pm}(w):\mp
8(3+k):F^{\pm}(w)^{2}\partial F^{\mp}(w):$ $\displaystyle\mp$ $\displaystyle
4(3+k):F^{\pm}(w)J(w)\partial J(w):\mp 2(3+k):J(w)^{2}\partial F^{\pm}(w):$
$\displaystyle+$
$\displaystyle\frac{44+24k+3k^{2}}{2}(:J(w)\partial^{2}F^{\pm}(w):-:F^{\pm}(w)\partial^{2}J(w):)$
$\displaystyle\pm$ $\displaystyle\left.4(2\mp 1)(3+k):\partial J(w)\partial
F^{\pm}(w):\mp\frac{940+736k+195k^{2}+18k^{3}}{12}\partial^{3}F^{\pm}(w)\right),$
$\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim\frac{(2+k)(3+2k)(10+3k)(17+6k)}{(z-w)^{5}}+\frac{(2+k)(10+3k)(17+6k)}{(z-w)^{4}}J(w)$
$\displaystyle+\frac{1}{(z-w)^{3}}$
$\displaystyle\left(-(4+k)(3+2k)(16+5k)L(w)+\frac{188+256k+119k^{2}+18k^{3}}{2}\partial
J(w)\right.$ $\displaystyle+$
$\displaystyle\left.(38+34k+7k^{2})(4:F^{+}(w)F^{-}(w):+:J(w)^{2}:)\right)$
$\displaystyle+\frac{1}{(z-w)^{2}}$
$\displaystyle\left(-(4+k)(16+5k):L(w)J(w):+8(3+k):F^{+}(w)F^{-}(w)J(w):\right.$
$\displaystyle+$ $\displaystyle(8+36k+11k^{2}):F^{+}(w)\partial
F^{-}(w):+(144+100k+17k^{2}):F^{-}(w)\partial F^{+}(w):$ $\displaystyle+$
$\displaystyle 2(3+k):J(w)^{3}:+(26+30k+7k^{2}):J(w)\partial J(w):$
$\displaystyle-$ $\displaystyle\left.\frac{(4+k)(3+2k)(16+5k)}{2}\partial
L(w)+(3+k)(42+20k+3k^{2})\partial^{2}J(w)\right)$
$\displaystyle+\frac{1}{(z-w)}$
$\displaystyle\left(\frac{3(4+k)^{2}}{2}:L(w)^{2}:-\frac{3(2+k)(3+k)(4+k)}{2}\partial^{2}L(w)\right.$
$\displaystyle-$ $\displaystyle\frac{(4+k)(16+5k)}{2}:\partial
L(w)J(w):-\frac{(4+k)(8+5k)}{2}:L(w)\partial J(w):$ $\displaystyle+$
$\displaystyle\frac{396+332k+90k^{2}+9k^{3}}{12}\partial^{3}J(w)-8(4+k):L(w)F^{+}(w)F^{-}(w):$
$\displaystyle-$ $\displaystyle
2(4+k):L(w)J(w)^{2}:+\frac{116+72k+15k^{2}}{2}:\partial F^{+}(w)\partial
F^{-}(w):$ $\displaystyle+$ $\displaystyle\frac{(2+k)(26+15k)}{8}:\partial
J(w)^{2}:+\frac{96+52k+9k^{2}}{4}:J(w)\partial^{2}J(w):$ $\displaystyle+$
$\displaystyle
2(27+19k+3k^{2}):F^{-}(w)\partial^{2}F^{+}(w):+(26+14k+3k^{2}):F^{+}(w)\partial^{2}F^{-}(w):$
$\displaystyle+$ $\displaystyle(7+3k):J(w)^{2}\partial
J(w):+4(5+k):J(w)F^{-}(w)\partial F^{+}(w):$ $\displaystyle+$ $\displaystyle
4(1+k):J(w)F^{+}(w)\partial F^{-}(w):+4(k-1):F^{+}(w)F^{-}(w)\partial J(w):$
$\displaystyle+$
$\displaystyle\left.8:F^{+}(w)^{2}F^{-}(w)^{2}:+4:F^{+}(w)F^{-}(w)J(w)^{2}:+\frac{1}{2}:J(w)^{4}:\right),$

where

$c_{k}=-\frac{(92+81k+18k^{2})}{4+k}.$

The $\mathcal{W}$-algebra $\mathcal{W}^{k}(G_{2},f_{\mathrm{subreg}})$ is of
type $(2^{2},3^{2})$ strongly generated by the fields $L(z)$, $G^{\pm}(z)$ and
$F(z)$. They satisfy the OPEs:

$\displaystyle G^{+}(z)F(w)$
$\displaystyle\sim\frac{2(2+k)(16+5k)}{(z-w)^{3}}G^{-}(w)+\frac{(2+k)(16+5k)}{2(z-w)^{2}}\partial
G^{-}(w)$
$\displaystyle+\frac{1}{(z-w)}\left(2:G^{+}(w)G^{-}(w):-2(4+k):L(w)G^{-}(w):\right.$
$\displaystyle\qquad\left.+2\partial
F(w)+\frac{(2+k)^{2}}{2}\partial^{2}G^{-}(w)\right),$ $\displaystyle
G^{-}(z)F(w)$
$\displaystyle\sim\frac{2(2+k)(16+5k)}{(z-w)^{3}}G^{+}(w)+\frac{(2+k)(16+5k)}{2(z-w)^{2}}\partial
G^{+}(w)$
$\displaystyle+\frac{1}{(z-w)}\left(-:G^{+}(w)^{2}:-2(4+k):L(w)G^{+}(w):\right.$
$\displaystyle\qquad\left.-:G^{-}(w)^{2}:+\frac{(2+k)^{2}}{2}\partial^{2}G^{+}(w)\right),$
$\displaystyle F(z)F(w)$
$\displaystyle\sim-\frac{(2+k)(10+3k)(16+5k)(4+k)c_{k}}{2(z-w)^{6}}$
$\displaystyle-\frac{3(2+k)(4+k)(10+3k)(16+5k)}{(z-w)^{4}}L(w)$
$\displaystyle-\frac{3(2+k)(4+k)(10+3k)(16+5k)}{2(z-w)^{3}}\partial L(w)$
$\displaystyle+\frac{1}{(z-w)^{2}}\left(-(8+3k):G^{+}(w)^{2}:+2(4+k)^{2}(10+3k):L(w)^{2}:\right.$
$\displaystyle\left.+(8+3k):G^{-}(w)^{2}:-\frac{3(2+k)(4+k)(8+3k)(10+3k)}{4}\partial^{2}L(w)\right)$
$\displaystyle+\frac{1}{(z-w)}\left(-(8+3k):G^{+}(w)\partial
G^{+}(w):+2(4+k)^{2}(10+3k):L(w)\partial L(w):\right.$
$\displaystyle\left.+(8+3k):G^{-}(w)\partial
G^{-}(w):-\frac{(2+k)(4+k)(4+3k)(10+3k)}{6}\partial^{3}L(w)\right),$
$\displaystyle G^{\pm}(z)G^{\pm}(w)$
$\displaystyle\sim\pm\frac{(10+3k)(4+k)c_{k}}{2(z-w)^{4}}+\frac{1}{(z-w)^{2}}\left(\pm
2(4+k)(10+3k)L(w)-4(3+k)G^{+}(w)\right)$
$\displaystyle+\frac{1}{(z-w)}\left(\pm(4+k)(10+3k)\partial
L(w)-2(3+k)\partial G^{+}(w)\right),$ $\displaystyle G^{+}(z)G^{-}(w)$
$\displaystyle\sim\frac{4(3+k)}{(z-w)^{2}}G^{-}(w)+\frac{1}{(z-w)}\left(-2F(w)+2(3+k)\partial
G^{-}(w)\right),$

where

$c_{k}=-\frac{4(k+2)(17+6k)}{4+k}.$

To our knowledge, OPEs of the principal $\mathcal{W}$-algebra
$\mathcal{W}^{k}(G_{2})$ were computed first in [19]. For completeness of the
paper, we recall them in this section. The $\mathcal{W}$-algebra
$\mathcal{W}^{k}(G_{2})$ is of type $(2,6)$, strongly generated by the fields
$L(z)$ and $W(z)$, and satisfies the OPE:

$\displaystyle W(z)W(w)$
$\displaystyle\sim\frac{-w_{0,k}c_{k}}{81(z-w)^{12}}+\frac{2w_{0,k}}{27(z-w)^{10}}L(w)+\frac{w_{0,k}}{27(z-w)^{9}}\partial
L(w)$ $\displaystyle+$
$\displaystyle\frac{w_{1,k}}{108(z-w)^{8}}\left(-62(k+4):L(w)^{2}:+3\left(84k^{2}+579k+1000\right)\partial^{2}L(w)\right)$
$\displaystyle+$
$\displaystyle\frac{w_{1,k}}{108(z-w)^{7}}\left(-62(k+4):L(w)\partial
L(w):+\frac{2}{3}\left(84k^{2}+579k+1000\right)\partial^{3}L(w)\right)$
$\displaystyle+$
$\displaystyle\frac{1}{(z-w)^{6}}(2w_{3,k}W(w)+w_{2,k}\Lambda^{5}(L))+\frac{1}{(z-w)^{5}}(w_{3,k}\partial
W(w)+w_{2,k}\Lambda^{4}(L))$ $\displaystyle+$
$\displaystyle\frac{1}{(z-w)^{4}}(w_{5,k}\left(\frac{10}{9}\left(588k^{2}+3929k+6504\right)\partial^{2}W(w)-\frac{1240}{3}(k+4):L(w)W(w):\right)$
$\displaystyle\quad+w_{4,k}\Lambda^{3}(L))$ $\displaystyle+$
$\displaystyle\frac{1}{(z-w)^{3}}(w_{5,k}\Omega^{2}(W,L)+w_{4,k}\Lambda^{2}(L))+\frac{1}{(z-w)^{2}}(w_{7,k}\Omega^{1}(W,L)+w_{6,k}\Lambda^{1}(L))$
$\displaystyle+$
$\displaystyle\frac{1}{(z-w)}(w_{7,k}\Omega^{0}(W,L)+w_{6,k}\Lambda^{0}(L)),$

where

$c_{k}=-\frac{2(12k+41)(7k+24)}{4+k}.$

and

$\displaystyle w_{0,k}=$ $\displaystyle
2(k+4)^{2}(2k+5)(2k+7)(3k+10)(7k+22)(7k+23)(8k+27)(9k+34)$
$\displaystyle(11k+40)(12k+37)(15k+52)(15k+53)(18k+65)(336k^{2}+2301k+3940)$
$\displaystyle(588k^{2}+3991k+6752))$ $\displaystyle w_{1,k}=$
$\displaystyle(k+4)^{2}(2k+5)(2k+7)(3k+10)(7k+22)(8k+27)(9k+34)(11k+40)$
$\displaystyle(12k+37)(15k+52)(18k+65)\left(336k^{2}+2301k+3940\right)\left(588k^{2}+3991k+6752\right)$
$\displaystyle w_{2,k}=$
$\displaystyle(k+4)^{2}(2k+5)(2k+7)(3k+10)(7k+22)(8k+27)(9k+34)(11k+40)$
$\displaystyle(12k+37)(15k+52)(18k+65)$ $\displaystyle w_{3,k}=$
$\displaystyle\frac{140}{9}(k+4)(2k+7)(3k+10)(7k+20)(12k+35)(13k+48)(24k+89)$
$\displaystyle\left(3k^{2}+24k+47\right)\left(336k^{2}+2301k+3940\right)\left(588k^{2}+3991k+6752\right)$
$\displaystyle w_{4,k}=$
$\displaystyle(k+4)^{2}(2k+5)(2k+7)(3k+10)(9k+34)(11k+40)(12k+37)$
$\displaystyle w_{5,k}=$
$\displaystyle(k+4)(2k+7)(3k+10)(7k+20)(24k+89)\left(3k^{2}+24k+47\right)$
$\displaystyle\left(336k^{2}+2301k+3940\right)\left(588k^{2}+3991k+6752\right)$
$\displaystyle w_{6,k}=$ $\displaystyle(k+4)^{2}(2k+5)(2k+7)(3k+10)(9k+34)$
$\displaystyle w_{8,k}=$
$\displaystyle(k+4)\left(3k^{2}+24k+47\right)\left(336k^{2}+2301k+3940\right)\left(588k^{2}+3991k+6752\right),$

The fields $\Lambda^{n}(L)$ only depend on $L$ while every summand in the
fields $\Omega^{n}(W,L)$ depends on $W$. We refer to [19, Appendix] for their
explicit definition.

##  4\. Isomorphisms of $\mathcal{W}$-algebras

In this section, we use the explicit description of $\mathcal{W}$-algebras
associated with Lie algebras of rank two to obtain remarkable isomorphisms of
vertex algebras (Table 1).

###  4.1. Trivial simple $\mathcal{W}$-algebras

Consider the $\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{g},f)$
associated with a nilpotent element $f\in\mathfrak{g}$. Denote
$\mathcal{I}_{k}$ its maximal ideal – which depends on the level $k$. We have
$\mathcal{W}_{k}(\mathfrak{g},f)=\mathcal{W}^{k}(\mathfrak{g},f)/\mathcal{I}_{k}$.
At non-critical level, it follows from the conformal structure of
$\mathcal{W}^{k}(\mathfrak{g},f)$ that the vertex algebra
$\mathcal{W}_{k}(\mathfrak{g},f)$ is trivial, i.e. isomorphic to
$\mathbb{C}|0\rangle$, if and only if the conformal vector generates
$\mathcal{I}_{k}$. This happens only if the central charge $c_{k}$ is zero,
but this necessary condition is not sufficient. For instance, the conformal
vector $L$ of $\mathcal{W}_{k}(\mathfrak{sp}_{4},f_{\mathrm{min}})$ does not
belong to the maximal ideal when $k=-1$ whereas $c_{-1}=0$. Indeed, according
to the OPEs described in Sect. 3.2, if $L$ were in $\mathcal{I}_{-1}$ then $J$
would be in $\mathcal{I}_{-1}$ as well as the vacuum.

Adding a supplementary condition, we obtain a complete criterion. We enjoy
this opportunity to mention that the proofs of Propositions 2.2.2 and 2.2.7 in
[12] are incomplete. We correct them in this paper. It does not impact the
results presented in the thesis.

######  Proposition 4.1.

Let $J^{(1)},\ldots,J^{(n)}$ be a set of strong generators of
$\mathcal{W}^{k}(\mathfrak{g},f)$ with conformal weights $w_{1}\ldots
w_{n}\in\mathbb{R}_{>0}$ respectively. The simple quotient
$\mathcal{W}_{k}(\mathfrak{g},f)$ is trivial if and only if for any
$1\leqslant i,j\leqslant n$ the pole of degree $w_{i}+w_{j}$ of the OPE
$J^{(j)}(z)J^{(i)}(w)$ vanishes, that is $(J^{(j)})_{w_{i}}J^{(i)}=0$.

###### Proof.

Since the $\mathcal{W}$-algebra $\mathcal{W}^{k}(\mathfrak{g},f)$ is
positively graded by the conformal vector, its simple quotient is trivial if
and only if all the strong generators are in the maximal ideal
$\mathcal{I}_{k}$. For all $1\leqslant i,j\leqslant n$, the vector
$(J^{(j)})_{w_{i}}J^{(i)}$ has conformal weight zero. Since
$\mathcal{W}^{k}(\mathfrak{g},f)$ is canonical, i.e.
$\mathcal{W}^{k}(\mathfrak{g},f)_{0}=\mathbb{C}|0\rangle$, it vanishes.

Conversely, let $1\leqslant i,j\leqslant n$. For $m>0$, $(J^{(j)})_{m}J^{(i)}$
has conformal weight $w_{i}-m$ and it is a linear combination of normally
ordered products and derivatives of strong generators $J^{(\ell)}$ of
conformal weight $w_{\ell}$ lower than $w_{i}-m<w_{i}$. In particular,
$(J^{(j)})_{w_{i}}J^{(i)}$ is a multiple of the vacuum: it exists
$c_{i,j}\in\mathbb{C}$ such that

$(J^{(j)})_{w_{i}}J^{(i)}=c_{i,j}|0\rangle.$

It follows that $J^{(i)}$ is in $\mathcal{I}_{k}$ if all strong generators
$J^{(\ell)}$ of conformal weight lower than $w_{i}$ are in $\mathcal{I}_{k}$
and if $c_{i,j}=0$ for all $1\leqslant j\leqslant n$. Note that if $J^{(i)}$
has the lowest conformal weight, $(J^{(j)})_{m}J^{(i)}=0$ for all $m\neq
w_{i}$ and so $J^{(i)}$ is in $\mathcal{I}_{k}$ if and only if
$(J^{(j)})_{w_{i}}J^{(i)}=0$.

Therefore, if $(J^{(j)})_{w_{i}}J^{(i)}=0$ for all $1\leqslant i,j\leqslant
n$, then all the strong generators are in $\mathcal{I}_{k}$ and thus
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}|0\rangle$.

∎

We obtain the following classification.

######  Corollary 4.2.

  1. (1)

Consider the Lie algebra $\mathfrak{g}=\mathfrak{sl}_{3}$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}$ if and only if

$(f,k)\in\\{(f_{\mathrm{min}},-3/2),(f_{\mathrm{reg}},-5/3),(f_{\mathrm{reg}},-9/4)\\}.$

  2. (2)

Consider the Lie algebra $\mathfrak{g}=\mathfrak{sp}_{4}$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}$ if and only if

$(f,k)\in\\{{(f_{\mathrm{min}},-1/2)},(f_{\mathrm{reg}},-13/6),(f_{\mathrm{reg}},-12/5)\\}.$

  3. (3)

Consider the Lie algebra $\mathfrak{g}=G_{2}$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}$ if and only if

$(f,k)\in\\{{(f_{\mathrm{min}},-5/3)},(f_{\mathrm{subreg}},-17/6),(f_{\mathrm{subreg}},-2),(f_{\mathrm{reg}},-41/12),(f_{\mathrm{reg}},-24/7)\\}.$

Most of the pairs listed in the Corollary 4.2 have already been established in
[3, 7]. However, we get new isomorphisms such as the one involving
$\mathcal{W}_{-2}(G_{2},f_{\mathrm{subreg}})$. It provides a new example of
rational $\mathcal{W}$-algebra at non admissible level.

######  Corollary 4.3.

The simple $\mathcal{W}$-algebra $\mathcal{W}_{-2}(G_{2},f_{\mathrm{subreg}})$
is $C_{2}$-cofinite and rational.

The principal $\mathcal{W}$-algebras $\mathcal{W}_{k}(\mathfrak{sl}_{3})$,
$\mathcal{W}_{k}(\mathfrak{sp}_{4})$ and $\mathcal{W}_{k}(G_{2})$, and the
subregular $\mathcal{W}$-algebra $\mathcal{W}_{k}(G_{2},f_{\mathrm{subreg}})$
are one-dimensional if and only if $c_{k}=0$. More generally, we conjecture
the following:

######  Conjecture 4.4.

If $f$ is distinguished, i.e. $\mathfrak{g}^{f}_{0}=0$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}|0\rangle$ if and only if
$c_{k}=0$.

We check this conjecture in many cases. In particular, we verify in [7] that,
when $f$ is distinguished and $k$ is an admissible level which vanishes the
central charge, $\mathcal{W}_{k}(\mathfrak{g},f)\simeq\mathbb{C}|0\rangle$.

In another direction, the Corollary 4.3 gives more evidence for the following
conjecture (see [12, Chap. 6.3] for additional details). We will explore in
depth this topic in our futur works.

######  Conjecture 4.5.

The associated variety of the simple vertex algebra $L_{-2}(G_{2})$ is the
closure of the subregular nilpotent orbit of $G_{2}$:

$X_{L_{-2}(G_{2})}=\overline{\mathbb{O}}_{\mathrm{subreg}}.$

###  4.2. Simple quotients isomorphic to Virasoro vertex algebras

From now on, we consider non-trivial simple $\mathcal{W}$-algebras. In
particular, the conformal vector does not belong to the maximal ideal
$\mathcal{I}_{k}$ of $\mathcal{W}^{k}(\mathfrak{g},f)$. If the other strong
generators are in $\mathcal{I}_{k}$, then $\mathcal{W}_{k}(\mathfrak{g},f)$ is
isomorphic to the Virasoro vertex algebra $\operatorname{Vir}_{c_{k}}$ with
central charge $c_{k}$.

######  Proposition 4.6.

Let $J^{(1)},\ldots,J^{(n)}:=L$ be a set of strong generators of
$\mathcal{W}^{k}(\mathfrak{g},f)$ with conformal weights $w_{1}\ldots
w_{n}\in\mathbb{R}$ respectively. The simple quotient
$\mathcal{W}_{k}(\mathfrak{g},f)$ is isomorphic to the simple Virasoro vertex
algebra $\operatorname{Vir}_{c_{k}}$ if and only if for any $1\leqslant
i\leqslant n-1$ and $1\leqslant j\leqslant n$, $(J^{(j)})_{w_{i}}J^{(i)}=0$
and $(J^{(j)})_{w_{i}-2}J^{(i)}$ does not depend on $L$.

###### Proof.

The proof is similar to the one of Proposition 4.1. The simple quotient
$\mathcal{W}_{k}(\mathfrak{g},f)$ is isomorphic to
$\operatorname{Vir}_{c_{k}}$ if and only if it is strongly generated only by
the conformal vector $L$. Hence,
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\operatorname{Vir}_{c_{k}}$ if and only
if $J^{(1)},\ldots,J^{(n-1)}\in\mathcal{I}_{k}$ and $L\notin\mathcal{I}_{k}$.
Since $J^{(1)},\ldots,J^{{(n-1)}}\in\mathcal{I}_{k}$ , then
$(J^{(j)})_{w_{i}}J^{(i)}=0$ for all $1\leqslant i\leqslant n-1$ and
$1\leqslant j\leqslant n$. Moreover, $(J^{(j)})_{w_{i}-2}J^{(i)}$ is a linear
combination of normally ordered products and derivatives of strong generators
$J^{(\ell)}$ of conformal weight lower than $2$. There exist
$c_{i,j}\in\mathbb{C}$ and a linear combination $R_{i,j}$ of normally ordered
products and derivatives of the strong generators $J^{(\ell)}$,
$1\leqslant\ell\leqslant n-1$, such that

(3) $(J^{(j)})_{w_{i}-2}J^{(i)}=c_{i,j}L+R_{i,j}.$

Since $(J^{(j)})_{w_{i}-2}J^{(i)}$ and $R_{i,j}$ belongs to $\mathcal{I}_{k}$,
we deduce that $c_{i,j}=0$. Thus, $(J^{(j)})_{w_{i}-2}J^{(i)}$ does not depend
on $L$.

Conversely, let $1\leqslant i\leqslant n-1$ and $1\leqslant j\leqslant n$. For
$m>0$, $(J^{(j)})_{m}J^{(i)}$ is a sum of normally ordered products and
derivatives of strong generators $J^{(\ell)}$ of conformal weight lower than
$w_{i}-m<w_{i}$. In particular, $(J^{(j)})_{w_{i}}J^{(i)}$ is a multiple of
the vacuum. In addition, $L$ can appear only as a summand in the decomposition
of $(J^{(j)})_{w_{i}-2}J^{(i)}$. We have a decomposition (3). Since
$L\notin\mathcal{I}_{k}$, $J^{(i)}$ is in the maximal ideal if
$(J^{(j)})_{w_{i}}J^{(i)}=0$ and $(J^{(j)})_{w_{i}-2}J^{(i)}$ does not depend
on $L$ for all $1\leqslant j\leqslant n$. Therefore, if this condition is
satisfied for all $1\leqslant i\leqslant n-1$, then all the strong generators
except $L$ are in $\mathcal{I}_{k}$ and
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\operatorname{Vir}_{c_{k}}$. ∎

We deduce the following classification from the OPEs presented in Sect. 3.

######  Corollary 4.7.

Consider the simple Lie algebra $\mathfrak{g}$ of rank $2$.

  1. (1)

The simple $\mathcal{W}$-algebra $\mathcal{W}_{k}(\mathfrak{sl}_{3})$ is
isomorphic to $\operatorname{Vir}_{c_{k}}$ if and only if $k=-4/3$ or
$k=-12/5$.

  2. (2)

If $\mathfrak{g}=\mathfrak{sp}_{4}$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\operatorname{Vir}_{c_{k}}$ if and only
if

     * •

$f=f_{\mathrm{subreg}}$ and $k=-2$, or

     * •

$f=f_{\mathrm{reg}}$ and $k\in\\{-3/2,-8/3,-11/5,-11/6,-18/7,-19/8\\}$.

  3. (3)

If $\mathfrak{g}=G_{2}$, then
$\mathcal{W}_{k}(\mathfrak{g},f)\simeq\operatorname{Vir}_{c_{k}}$ if and only
if

     * •

$f=f_{\tilde{A_{1}}}$ and $k=-3/2$, or

     * •

$f=f_{\mathrm{subreg}}$ and $k=-10/3$, or

     * •

[19, Proposition 5.3] $f=f_{\mathrm{reg}}$ and

$k\in\\{-\tfrac{5}{2},-\tfrac{7}{2},-\tfrac{10}{3},-\tfrac{22}{7},-\tfrac{23}{7},-\tfrac{27}{8},-\tfrac{34}{9},-\tfrac{40}{11},-\tfrac{37}{12},-\tfrac{52}{15},-\tfrac{53}{15},-\tfrac{65}{18}\\}.$

The OPEs of $\mathcal{W}^{k}(G_{2},f_{\mathrm{subreg}})$ also admit
simplifications at level $k=-16/5$ (see Sect. 3.3). Indeed, the strong
generator $F$ belongs to the maximal ideal $\mathcal{I}_{-16/5}$. This induces
relations between the three other strong generators and their derivatives in
the simple $\mathcal{W}$-algebra. Using the OPEs, the authors of [19] proved
that the simple $\mathcal{W}$-algebra corresponds with the tensor product of
three copies of the Virasoro vertex algebra of central charge $-22/5$ see

$\mathcal{W}_{-16/5}(G_{2},f_{\mathrm{subreg}})\simeq(\operatorname{Vir}_{-22/5})^{\otimes
3}.$

Since $\operatorname{Vir}_{-22/5}$ is $C_{2}$-cofinite and rational [5], the
tensor product $\mathcal{W}_{-16/5}(G_{2},f_{\mathrm{subreg}})$ is also
$C_{2}$-cofinite and rational [1, 11].

###  4.3. Other isomorphisms

For several additional particular simple $\mathcal{W}$-algebras, the OPEs give
a complete or partial description of the maximal ideal. For instance, we
recover some isomorphisms from [2] and [7, Theorem 10.10]:

$\displaystyle\mathcal{W}_{-2}(\mathfrak{sp}_{4},f_{\mathrm{min}})\simeq
M(1),$
$\displaystyle\mathcal{W}_{-2}(\mathfrak{sp}_{4},f_{\mathrm{min}})\simeq
L_{-3/2}(\mathfrak{sl}_{2}),$
$\displaystyle\mathcal{W}_{-4/3}(G_{2},f_{\mathrm{min}})\simeq
L_{1}(\mathfrak{sl}_{2}),$
$\displaystyle\mathcal{W}_{-17/6}(G_{2},f_{\tilde{A}_{1}})\simeq
L_{-4/3}(\mathfrak{sl}_{2}),$

where $M(1)$ denotes the Heisenberg vertex algebra of central charge $1$ and
$L_{k}(\mathfrak{g})$ is the simple affine vertex algebra associated with
$\mathfrak{g}$ at level $k$. We are also able to determine other isomorphisms
of vertex algebras.

######  Proposition 4.8.

We have the following isomorphisms:

$\displaystyle\mathcal{W}_{-10/3}(G_{2},f_{\tilde{A_{1}}})\simeq
L_{-11/6}(\mathfrak{sl}_{2}),\qquad\mathcal{W}_{-2}(G_{2},f_{\tilde{A_{1}}})\simeq
L_{-\frac{1}{2}}(\mathfrak{sl}_{2}),$
$\displaystyle\mathcal{W}_{-1}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})\simeq
M(1).$

###### Proof.

We detail the proof of the isomorphism
$\mathcal{W}_{-1}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})\simeq M(1)$. Other
cases are similar. Using the OPEs, we check that when $k=-1$, the vector
$G^{+}$ and $G^{-}$ generate a proper ideal. Hence, they belongs to the
maximal ideal $\mathcal{W}^{-1}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})$. It
follows that $G^{+}_{(n)}G^{-}=0$ for all $n\geqslant 0$. In particular,
$G^{+}_{(1)}G^{-}=0$ gives a relation between the conformal field $L(z)$ and
the field $:J(z)^{2}:$

$L(z)=\frac{1}{2}:J(z)^{2}:.$

Thus, $L$ coincides with the conformal vector of the Heisenberg vertex algebra
generated by $J$. Since $J$ does not belong to the maximal ideal of
$\mathcal{W}^{-1}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})$, we get the
isomorphism. ∎

We summarize in Table 1 the isomorphisms of $\mathcal{W}$-algebras associated
with simple Lie algebras of rank two we mentioned in Sect. 4.

$\mathcal{W}=\mathcal{W}_{k}(\mathfrak{g},f)$ |  affine vertex |  $k$ such that | $\mathcal{V}$ |  $k$ such that
---|---|---|---|---
|  algebra $L=L_{k^{\prime}}(\mathfrak{g}^{\prime})$ | $\mathcal{W}\simeq L$ |  |  $\mathcal{W}\simeq\mathcal{V}$
$\mathcal{W}_{k}(\mathfrak{sl}_{3},f_{\mathrm{min}})$ |  $M(1)$ | $-1$ | $\mathbb{C}$ |  $-\frac{3}{2}$
$\mathcal{W}_{k}(\mathfrak{sl}_{3})$ |  $\mathbb{C}$ |  $-\frac{5}{3}$, $-\frac{9}{4}$ | $\operatorname{Vir}_{c_{k}}$ |  $-\frac{4}{3}$, $-\frac{12}{5}$
$\mathcal{W}_{k}(\mathfrak{sp}_{4},f_{\mathrm{min}})$ |  $L_{-3/2}(\mathfrak{sl}_{2})$ | $-2$ | $\mathbb{C}$ |  $-\frac{1}{2}$
$\mathcal{W}_{k}(\mathfrak{sp}_{4},f_{\mathrm{subreg}})$ |  $M(1)$ | $-1$ | $\operatorname{Vir}_{c_{k}}$ |  $-2$
$\mathcal{W}_{k}(\mathfrak{sp}_{4})$ |  $\mathbb{C}$ |  $-\frac{13}{6}$, $-\frac{12}{5}$ | $\operatorname{Vir}_{c_{k}}$ |  $-\frac{3}{2}$, $-\frac{8}{3}$, $-\frac{11}{5}$, $-\frac{11}{6}$, $-\frac{18}{7}$, $-\frac{19}{8}$
$\mathcal{W}_{k}(G_{2},f_{\mathrm{min}})$ |  $L_{1}(\mathfrak{sl}_{2})$ | $-\frac{4}{3}$ | $\mathbb{C}$ |  $-\frac{5}{3}$
$\mathcal{W}_{k}(G_{2},f_{\tilde{A_{1}}})$ |  $L_{p(k)}(\mathfrak{sl}_{2})$ with $p(k)=-\frac{92+81k+18k^{2}}{52+42k+9k^{2}}$ |  $-\frac{17}{6}$, $-\frac{10}{3}$, $-2$ | $\operatorname{Vir}_{c_{k}}$ |  $-\frac{3}{2}$
$\mathcal{W}_{k}(G_{2},f_{\mathrm{subreg}})$ |  $\mathbb{C}$ |  $-\frac{17}{6}$, $-2$ | $\operatorname{Vir}_{c_{k}}$ |  $-\frac{10}{3}$
$\mathcal{W}_{k}(G_{2})$ |  $\mathbb{C}$ |  $-\frac{41}{12}$, $-\frac{24}{7}$ | $\operatorname{Vir}_{c_{k}}$ |  $-\frac{5}{2}$, $-\frac{7}{2}$, $-\frac{10}{3}$, $-\frac{22}{7}$, $-\frac{23}{7}$, $-\frac{27}{8}$, $-\frac{34}{9}$, $-\frac{40}{11}$, $-\frac{37}{12}$, $-\frac{52}{15}$, $-\frac{53}{15}$, $-\frac{65}{18}$
Table 1. Isomorphisms for $\mathcal{W}$-algebras of rank two.

######  Remark 4.9.

In the Table 1, the levels appearing in the third column are called
_collapsing_ [2, 3, 7]. The simple affine vertex algebra
$L_{k^{\prime}}(\mathfrak{g}^{\prime})$ in the second column corresponds to
$L_{k^{\natural}}(\mathfrak{g}^{\natural})$ where $\mathfrak{g}^{\natural}$ is
the centralizer of the $\mathfrak{sl}_{2}$-triple $\\{f,h,e\\}$ in
$\mathfrak{g}$ and $k^{\natural}$ is defined as in [18].

## References

  * [1] Toshiyuki Abe, Geoffrey Buhl and Chongying Dong  “Rationality, Regularity, and $C_{2}$-Cofiniteness”  In _Trans. Amer. Math. Soc._ 356, 2004, pp. 3391–3402
  * [2] Dražen Adamović, Victor Kac, Pierluigi Möseneder Frajria, Paolo Papi and Ozren Perše  “Conformal Embeddings of Affine Vertex Algebras in Minimal $\mathcal{W}$-Algebras II: Decompositions”  In _Jpn. J. Math._ 12, 2017, pp. 261–315
  * [3] Dražen Adamović, Victor Kac, Pierluigi Möseneder Frajria, Paolo Papi and Ozren Perše  “Conformal Embeddings of Affine Vertex Algebras in Minimal $\mathcal{W}$-Algebras I: Structural Results”  In _J. Algebra_ 500, 2018, pp. 117–152
  * [4] Tomoyuki Arakawa  “Representation Theory of Superconformal Algebras and the Kac-Roan-Wakimoto Conjecture”  In _Duke Math. J._ 130, 2005, pp. 435–478
  * [5] Tomoyuki Arakawa  “A Remark on the $C_{2}$-Cofiniteness Condition on Vertex Algebras”  In _Math. Z._ 270, 2012, pp. 559–575
  * [6] Tomoyuki Arakawa  “Rationality of Bershadsky-Polyakov Vertex Algebras”  In _Comm. Math. Phys._ 323, 2013, pp. 627–633
  * [7] Tomoyuki Arakawa, Jethro Ekeren and Anne Moreau  “Singularities of Nilpotent Slodowy Slices and Collapsing Levels of $\mathcal{W}$-Algebras”, 2022  arXiv:2102.13462 [math.RT]
  * [8] Michael Bershadsky  “Conformal Field Theories via Hamiltonian Reduction”  In _Comm. Math. Phys._ 139, 1991, pp. 71–82
  * [9] David Collingwood and William McGovern  “Nilpotent Orbits in Semisimple Lie Algebra: An Introduction”  New York: Van Nostrand Reinhold Co., 1993
  * [10] Thomas Creutzig and Andrew Linshaw  “Cosets of the $\mathcal{W}^{k}(\mathfrak{sl}_{4},f_{subreg})$-Algebra”  In _Contemp. Math._ 711, 2018, pp. 105–117
  * [11] Chongying Dong, Geoffrey Mason and Yongchang Zhu  “Discrete Series of the Virasoro Algebra and the Moonshine Module”, Algebraic Groups and Their Generalizations: Quantum and Infinite-Dimensional Methods, 1994
  * [12] Justine Fasquel  “Geometry and New Rational $\mathcal{W}$-Algebras”, 2022
  * [13] Justine Fasquel  “Rationality of the Exceptional $\mathcal{W}$-Algebras $\mathcal{W}_{k}(\mathfrak{sp}_{4},f_{subreg})$ Associated with Subregular Nilpotent Elements of $\mathfrak{sp}_{4}$”  In _Commun. Math. Phys._ 390, 2022, pp. 33–65
  * [14] Boris Feigin and Edward Frenkel  “Quantization of the Drinfeld-Sokolov Reduction”  In _Phys. Lett. B_ 246, 1990, pp. 75–81
  * [15] Edward Frenkel and David Ben-Zvi  “Vertex Algebras and Algebraic Curves” 88, Mathematical Surveys and Monographs  Amer. Math. Soc., 2004
  * [16] Victor Kac  “Introduction to Vertex Algebras, Poisson Vertex Algebras, and Integrable Hamiltonian PDE” 19, Springer INdAM Series  Cham: Springer International Publishing, 2017
  * [17] Victor Kac, Shi-Shyr Roan and Minoru Wakimoto  “Quantum Reduction for Affine Superalgebras”  In _Comm. Math. Phys._ 241, 2003, pp. 307–342
  * [18] Victor Kac and Minoru Wakimoto  “Quantum Reduction and Representation Theory of Superconformal Algebras”  In _Adv. Math._ 185, 2004, pp. 400–458
  * [19] Antun Milas, Michael Penn and Christopher Sadowski  “$S_{3}$-Permutation Orbifolds of Virasoro Vertex Algebras”, 2022  arXiv:2209.13341
  * [20] Alexander Polyakov  “Gauge Transformations and Diffeomorphisms”  In _Int. J. Mod. Phys. A_ 5.5, 1990, pp. 833–842
  * [21] Alexandre Zamolodchikov  “Infinite Additional Symmetries in Two-Dimensional Conformal Quantum Field Theory”  In _Theor. Math. Phys._ 65.3, 1985, pp. 1205–1213


# Emotions are Subtle: Learning Sentiment Based Text Representations Using
Contrastive Learning

Ipsita Mohanty
Carnegie Mellon University
Pittsburgh, PA
USA
<EMAIL_ADDRESS>
Ankit Goyal
Carnegie Mellon University
Pittsburgh, PA
USA
<EMAIL_ADDRESS>
Alex Dotterweich
University of California
Berkeley, CA
USA
<EMAIL_ADDRESS>

###### Abstract

Contrastive learning techniques have been widely used in the field of computer
vision as a means of augmenting datasets. In this paper, we extend the use of
these contrastive learning embeddings to sentiment analysis tasks and
demonstrate that fine-tuning on these embeddings provides an improvement over
fine-tuning on BERT-based embeddings to achieve higher benchmarks on the task
of sentiment analysis when evaluated on the DynaSent dataset. We also explore
how our fine-tuned models perform on cross-domain benchmark datasets.
Additionally, we explore upsampling techniques to achieve a more balanced
class distribution to make further improvements on our benchmark tasks.

##  1 Introduction

Sentiment analysis is a conceptually challenging linguistic problem as it is
hard to extract sentiment polarity from sentences that depend on the speaker’s
context of sentiments Mäntylä et al. (2016). In one of the earlier papers on
sentiment analysis, Pang and Lee (2004) attempted to categorize positive and
negative polarity from a corpus of movie reviews mined from Rotten Tomatoes.
In this paper, they noted that movie reviews were particularly difficult to
classify when compared to product reviews – in part because, in addition to
their inherent subjectivity, words that convey negative affect are commonplace
in the horror genre and should not be taken to convey overall negative
sentiment Turney (2002). In order to classify these reviews, they used an SVM.
Similar to the objective of contrastive learning, SVM’s aim to find the
optimal hyperplane that distinguishes data points of each class from one
another. In essence, when used to determine the polarity of movie reviews, an
SVM will seek to find the boundary between the positive and negative reviews.

Contrastive learning functions in a similar way; it is a framework to
distinguish polarity by organizing data into positive and negative pairs and
pulling these positive pairs together while non-pairs are pushed apart Hadsell
et al. (2006). While contrastive learning techniques have seen great success
when applied to computer vision problems, it was only more recently that their
application has been widened to include NLP tasks such as sentiment analysis
(Rim et al., 2021; Liao, 2021; Shen et al., 2021). Contrastive learning can be
a powerful addition to learning sentence polarity when used in conjunction
with more traditional transformer-based models. This paper explores several
methods of extracting vector representations that capture the underlying
contextual and semantic features for achieving a real-world performance boost
on the supervised sentiment classification tasks.

We conduct a comprehensive evaluation by fine-tuning two traditional BERT-
based pre-trained models (Devlin et al., 2018; Liu et al., 2019) and one
supervised and unsupervised version of contrastive learning based pre-trained
models (Gao et al., 2021) on five datasets (Potts et al., 2020; Zhang et al.,
2015; Socher et al., 2013). We use the DynaSent datasets (Potts et al.,
2020)for model training and report our performance on the test dataset. We
achieve an average macro F1-score of 80.81% on DynaSent-r1 and 69.08% on
DynaSent-r2 using fine-tuning of contrastive learning-based pre-trained
models, an improvement of 1.32% on DynaSent-r1 and 3.07% on DynaSent-r2 over
BERT-based fine-tuned models. We also achieve competitive performances on
transfer tasks for cross-domain datasets. Finally, we consolidate the results
from our experiment settings, identify class imbalance issues in the dataset
and propose future work to address these challenges in evaluating sentiment
analysis using text embeddings.

##  2 Related Work

The most recent sentence embeddings work focuses on solving various
bottlenecks of state-of-the-art BERT-based models (Reimers and Gurevych, 2019;
Su et al., 2021). One of the most common approaches of extraction of BERT-
based embeddings for clustering and semantic search is to average the BERT
output layer or use the output of the first token (the [CLS] token). However,
using these practices could yield poor sentence embeddings, even worse than
averaging the GloVe embeddings (Reimers and Gurevych, 2019). The recent
research also discusses the anisotropy problem, which hinders the BERT-based
models from fully utilizing the underlying textual semantic features (Su et
al., 2021).

Much of the inspiration for this paper stems from the contrastive learning
embedding work achieved by Gao et al. (2021) which established that using
contrastive learning embeddings showed improvement over various transformer-
based sentence embeddings when applied to semantic textual similarity tasks.
The paper presents using sentence embeddings learned in this space and
comparing them to more traditional state-of-the-art embeddings such as BERT or
RoBERTa (Devlin et al., 2018; Liu et al., 2019).Contrastive learning methods
could be applied in both supervised and unsupervised machine learning
settings. These methods are widely used in computer vision applications that
rely on augmented versions of each input image; however, in natural language
processing, it is more challenging to construct text augmentations. The recent
research work on unsupervised learning approaches of contrastive learning in
the domain of natural language has shown promising results. We explore
techniques to learn sentence embedding in this space to achieve even better
results for our sentiment analysis task.

We also draw upon the importance of dropouts in the contrastive learning
architecture, as demonstrated by Wu et al. (2021). This paper suggests a
modification to the unsupervised Sim-CSE (unsup-SimCSE) method for learning
sentence embeddings. Specifically, the paper demonstrates that since unsup-
SimCSE passes sentences through a pre-trained Transformer encoder with a
dropout mask to build positive pairs, the length of each portion of the pair
will be the same for the corresponding embeddings. Through experiments, they
establish that ESimCSE outperformed unsup-SimCSE on both BERT-base, BERT-
large, RoBERTa-base, and RoBERTa-large.

##  3 Data

This paper uses the DynaSent dataset for training and validation and tests on
the DynaSent, SST-3, Yelp, and Amazon datasets (Potts et al., 2020; Zhang et
al., 2015; Socher et al., 2013) (Table 1).

| DynaSent r1 | DynaSent r2 |  SST-3 |  Yelp |  Amazon
---|---|---|---|---|---
|  Train |  Dev |  Test |  Train |  Dev |  Test |  Test |  Test |  Test
Positive |  21391 |  1200 |  1200 |  6038 |  1200 |  240 |  909 |  10423 |  110573
Negative |  14021 |  1200 |  1200 |  4579 |  1200 |  240 |  912 |  9778 |  107967
Neutral |  45076 |  1200 |  1200 |  2448 |  1200 |  240 |  389 |  4799 |  57810
Total |  80488 |  3600 |  3600 |  13065 |  3600 |  720 |  2210 |  25000 |  276350
Table 1: Datasets used for Experiments

###  3.1 DynaSent Dataset

The DynaSent dataset Potts et al. (2020) consists of 121,634 sentences with
Positive, Neutral, and Negative labels. It is an adversarial dataset that was
generated in 2 rounds. In the first round, Model 0, a RoBERTa-base model with
a three-way sentiment classifer head, was trained on a sample of sentences
from the Consumer Reviews Hu and Liu (2004), IMDB Maas et al. (2011), SST-3
(Socher et al., 2013), and Yelp and Amazon datasets Zhang et al. (2015) to
identify challenging sentences. These sentences were then human-validated and
used to generate the Round 1 dataset. A second model, Model 1, was then
trained on the Round 1 dataset and the 5 original datasets. Crowdworkers were
prompted to use the Dynabench Platform to come up with sentences that would
fool Model 1. As before, the crowdsourced dataset was human-validated to
produce the Round 2 dataset.

###  3.2 Yelp and Amazon Datasets

These datasets consist of reviews of restaurants and products collected from
Yelp and Amazon and were put together by Zhang et al. (2015). The reviews on
both Yelp and Amazon originally had labels on a five-point scale, so for the
purpose of our task, we re-mapped labels of 1 or 2 to Negative, 3 to Neutral,
and 4 or 5 to Positive.

The full Yelp dataset consists of 1,569,264 reviews from the Yelp Dataset
Challenge 2015.

The full Amazon dataset consists of 34,686,770 reviews from 6,643,669 users on
2,441,053 products collected over a period of 18 years.

###  3.3 SST-3 Dataset

The Stanford Sentiment Treebank dataset consists of 11,855 sentences collected
from movie reviews (Socher et al., 2013). In the SST-3, sentences are labeled
either Positive, Negative, or Neutral.

##  4 Models

For our model architecture (Figure 1), we use pre-trained transformer
embeddings as the embedding layer with a three-way classification head on top.
The classification head consists of two dropout layers, a hidden dense layer,
an activation layer, and finally, a linear layer with 3-dimensional output –
one for each sentiment label. We have explored various combinations of pre-
trained embeddings, hidden dense layers, activation functions, and loss
functions in our models, as described in the later sections.

Figure 1: Sentiment Classification Model Architecture

###  4.1 Pre-Trained Embeddings

We use four different pre-trained transformer embeddings, all of which are
available with the Hugging Face’s Transformers library Wolf et al. (2020). The
output embedding size of all these pre-trained embeddings is 768.

####  4.1.1 BERT base uncased

BERT base uncased embeddings are pre-trained on the English language self-
supervised using two objectives - masked language modeling (MLM) and Next
Sentence Prediction (NSP). These embeddings are case insensitive. These
embeddings were introduced in the original BERT Devlin et al. (2018) paper and
serve as baseline embeddings for our models.

####  4.1.2 RoBERTa base

RoBERTa Liu et al. (2019) base embeddings are also pre-trained on the English
language in a self-supervised fashion. Unlike BERT, these embeddings were
trained on the MLM objective only. These embeddings have shown increased
performance over the original BERT embeddings. Like BERT, these embeddings are
case insensitive.

####  4.1.3 Sim-CSE RoBERTa base supervised

Sim-CSE RoBERTa base supervised (Gao et al., 2021) embeddings are pre-trained
on various natural language inference (NLI) datasets using RoBERTa base
parameters in a contrastive learning fashion. The supervised training approach
incorporates annotated pairs from natural language inference datasets into the
contrastive learning framework by using ”entailment” pairs as positives and
”contradiction” pairs as hard negatives.

####  4.1.4 Sim-CSE RoBERTa base unsupervised

Sim-CSE RoBERTa base unsupervised (Gao et al., 2021) embeddings are pre-
trained on the Wikipedia corpus using RoBERTa base parameters in a contrastive
learning fashion. The unsupervised training approach takes an input sentence
and predicts itself in a contrastive objective, with only standard dropout
used as noise. As per the original paper, this method works surprisingly well
and performs on par with previously supervised counterparts.

Both Sim-CSE RoBERTa base supervised and unsupervised embeddings have shown
improvement over various NLP tasks and form the basis of our hypothesis set in
this paper.

###  4.2 Classification Head

We experimented with three different dense layers for the classification head
- Linear, BiGRU, and BiLSTM (Table 2).

Dense Layer | Linear Layer
---|---
Type | In | Out | In | Out
Linear | 768 | 768 | 768 | 3
BiGRU | 768 | 256 | 512 | 3
BiLSTM | 768 | 256 | 512 | 3
Table 2: Classification Head Configurations

For dropout layers, the drop probability value is set to 0.1 for all the
models. For our activation layer, Tanh and ReLU activation functions are used
for Linear and, BiGRU and BiLSTM, respectively.

###  4.3 Loss Functions

In our experiments, we have used Cross-Entropy and Focal loss functions.

####  4.3.1 Cross-Entropy Loss

Cross-entropy loss is also known as logarithmic loss, logistic loss, or log
loss. Each predicted class probability is compared to the actual class desired
output, 0 or 1. A score/loss is calculated that penalizes the probability
based on how far it is from the actual expected value. The penalty is
logarithmic, yielding a large score for large differences close to 1 and a
small score for small differences tending towards 0. The aim is to minimize
the loss, i.e., the smaller the loss, the better the model. A perfect model
has a cross-entropy loss of 0.

$CrossEntropy(p_{t})=-log(p_{t})$

####  4.3.2 Focal Loss

Given the nature of imbalance in classes during training, we used the Focal
Loss function Lin et al. (2018). Focal loss is an improvement over cross
entropy loss to address imbalance issue. It applies a modulating term to the
cross-entropy loss to focus learning on hard negative examples. It is a
dynamically scaled cross-entropy loss, where the scaling factor decays to zero
as confidence in the correct class increases. The idea is that the scaling
factor will automatically down-weight the contribution of easy examples during
training and rapidly focus the model on hard examples. Focal loss adds a
factor to the standard cross-entropy criterion with a tunable focusing
parameter.

$FocalLoss(p_{t})=-(1-p_{t})^{\gamma}log(p_{t}),\gamma\geq 0$

##  5 Experiments

We trained our model with 93547 train samples and performed hyperparameter
tuning on 4320 dev samples (Figure 2) from combined DynaSent-r1 and
DynaSent-r2 datasets. However, we noticed a class imbalance between positive,
negative, and neutral labeled samples.

Figure 2: Sample Distribution in Train (left) and Test (right) Datasets

The best experiment result had a macro F1-score of 81.43% with an accuracy of
81.5% when evaluated on DynaSent-r1. This result was achieved using a Linear
Classifier head model on a fine-tuned unsupervised SimCSE RoBERTa base pre-
trained model with Cross-Entropy Loss. For DynaSent-r2, the best result had a
macro F1-score of 70.46% and accuracy of 70.56%, which was achieved by fine-
tuning on an unsupervised SimCSE RoBERTa base pre-trained model with a Linear
Classification head and a Focal Loss of gamma value 3. We achieved an average
macro F1-score of 80.81% on DynaSent-r1 and 69.08% on DynaSent-r2 using fine-
tuning of contrastive learning-based pre-trained models, an improvement of
1.32% on DynaSent-r1 and 3.07% on DynaSent-r2 over BERT-based fine-tuned
models (Figures 3, 4).

We also achieved competitive results for our transfer learning evaluations on
cross-domain datasets (Appendix Figure 5). The best experiment result had a
macro F1-score of 63.3% with an accuracy of 70% when evaluated on SST3.This
result was achieved using a BiLSTM Classifier head model on a fine-tuned
unsupervised SimCSE RoBERTa base pre-trained model with Focal Loss.For the
Amazon dataset, the best result had a macro F1-score of 52.53%, which was
achieved by fine-tuning on a supervised SimCSE RoBERTa base pre-trained model
with Focal Loss. For the Amazon dataset, the best result had a macro F1-score
of 52.53% and accuracy of 54.33%, which

Figure 3: Experiment Results for DynaSent Datasets.

Figure 4: Best Results for DynaSent Datasets

was achieved by fine-tuning on a supervised SimCSE RoBERTa base pre-trained
model with a BiLSTM Classification with Cross-Entropy Loss.However, for the
Yelp dataset, the traditional BERT-based models outperformed the contrastive
learning-based ones.

For our experiments, we performed hyperparameter tuning across activation
functions, dropouts, loss functions, and hidden sizes for various
classification heads (Table 3). Our experiments concluded that Tanh activation
performs better with a Linear classification head and ReLU with BiGRU and
BiLSTM classification heads. The max length was set to 64 for all test sets
evaluation. However, increasing the max length to 256 from 64 increased the
accuracy by around 6% for the Yelp dataset.

We limited our experiments to use two BERT-based pre-trained embeddings (e.g.,
bert-base- uncased and roberta-base) and observed that fine-tuning performed
on contrastive learning-based embeddings (e.g., supervised unsupervised
simcse-roberta-base) consistently outperformed its traditional counterparts.

Hyper-Params | Values
---|---
Dropout | 0.1
Activation | Tanh, ReLU
Focal Loss-gamma | 3
Focal Loss-reduction | mean
Max-Length | 64
Batch-Size | 32
Optimizer | AdamW
Learning Rate | 1e-5
Weight Decay | 0.01
Epochs | 4
Table 3: Hyper-parameters Tuned for Experiments. (Activation) Tanh for Linear
Classification Head and ReLU for BiGRU and BiLSTM Classification Heads.
(Optimizer) PyTorch 1.10 implementation of AdamW

##  6 Analysis

Based on our experiments, we observed that contrastive learning-based models
significantly outperformed the traditional BERT-based models. The performance
boost over the traditional BERT-based pre-trained model is because of the key
properties of contrastive loss used in the pre-trained contrastive models,
which optimizes on the alignment of features from positive pairs, and
uniformity of induced distribution of the normalized features. Also, instead
of using direct text representations from pre-trained models, we focused on
fine-tuning models with additional neural network layers to derive sentiment-
based text embeddings for our task evaluation. We also observed that using
this approach, we were able to classify better the sentiments for movies
reviews, particularly the horror movie reviews, containing more negative words
but not necessarily conveying a negative sentiment.

We also observed that the best model trained on the DynaSent-r1 and
DynaSent-r2 datasets did not perform as expected when evaluated on cross-
domain test datasets, particularly on the restaurant reviews for the Yelp
dataset. Also, the decrease in performance was especially true for the Neutral
classes across all cross-domain datasets. The original DynaSent paper Potts et
al. (2020) described the Neutral class as being tricky to evaluate for a few
different reasons, so, unsurprisingly, the performance for this class would be
diminished. Although we used Focal Loss in our experiments to implicitly
address the class imbalance issues, we need to address this issue explicitly,
and the following section lists a few approaches.

###  6.1 Future Work

Particularly for the SST-3, Amazon, and Yelp datasets, the number of samples
per class is largely imbalanced. In addition to being an underrepresented
class, a three-star review could convey vastly differing semantic meanings
Potts et al. (2020). For the Amazon and Yelp datasets, it could indicate
ambivalence or mixed-sentiment towards the product or place that was being
reviewed; for SST-3, it could simply indicate that the reviewer was unsure of
the author’s underlying sentiment. In either case, the performance of our
model on the underrepresented Neutral class when evaluating on these datasets
is not as optimal. In order to rectify this, we explored using upsampling
techniques to generate more examples of the Neutral class so that we could
train on this aggrandize dataset.

One upsampling technique of interest was presented by Scott and Plested
(2019). In this paper, Scott and Plested (2019) merges generative adversarial
networks (GANs) Goodfellow et al. (2014) with Synthetic Minority Oversampling
Technique (SMOTE) Chawla et al. (2002), a statistical technique that in its
raw form doesn’t map well to text data. Using the GAN-SMOTE architecture, they
were able to generate convincing synthetic examples of their one-hot encoded
dataset and improve the accuracy of their experiment benchmark.

While the GAN-SMOTE architecture was interesting, another, simpler method of
upsampling was explored as part of this paper using the Fill Mask Pipeline
offered through HuggingFace’s Transformers library Wolf et al. (2020).
Specifically, we experimented with using the Fill Mask model to generate
synthetic sentences. Fill Mask works by replacing a word in the input sentence
with a semantically similar one. After training on a subset of these upsampled
Neutral sentences though, it became apparent that the model was overfitting as
the training and validation accuracy scores were vastly different. Additional
work to correct this issue can be done in a future iteration of this project.

##  7 Conclusion

In this work, we propose a contrastive learning-based fine-tuning approach,
which outperforms state-of-the-art BERT-based text embeddings for our
sentiment analysis task. We fine-tune on both the unsupervised pre-trained
model, which predicts input sentiments with dropout as noise for data
augmentation, and the supervised pre-trained model, which originally uses NLI
datasets for pre-training. Through our experiments, we extracted superior
sentiment-based text embeddings learned in a contrastive learning space to
achieve better results when evaluating on DynaSent datasets. Additionally, we
analyze the test results for sentiments classification using transfer learning
on cross-domain datasets. We also propose our future work to address class
imbalance issues, which will help improve upon the benchmark results.

##  8 Acknowledgement

The authors would like to thank Dr. Christopher Potts, Professor, and Chair of
Linguistics, and, Professor of Department of Computer Science, Stanford
University, California, USA, for all his support and guidance.

## References

  * Chawla et al. (2002) N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer. 2002.  Smote: Synthetic minority over-sampling technique.  _Journal of Artificial Intelligence Research_ , 16:321–357.
  * Devlin et al. (2018) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018.  BERT: pre-training of deep bidirectional transformers for language understanding.  _CoRR_ , abs/1810.04805.
  * Gao et al. (2021) Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021.  Simcse: Simple contrastive learning of sentence embeddings.  _CoRR_ , abs/2104.08821.
  * Goodfellow et al. (2014) Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014.  Generative adversarial networks.
  * Hadsell et al. (2006) R. Hadsell, S. Chopra, and Y. LeCun. 2006.  Dimensionality reduction by learning an invariant mapping.  In _2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06)_ , volume 2, pages 1735–1742.
  * Hu and Liu (2004) Minqing Hu and Bing Liu. 2004.  Mining and summarizing customer reviews.  pages 168–177.
  * Liao (2021) Danqi Liao. 2021.  Sentence embeddings using supervised contrastive learning.
  * Lin et al. (2018) Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. 2018.  Focal loss for dense object detection.
  * Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Roberta: A robustly optimized BERT pretraining approach.  _CoRR_ , abs/1907.11692.
  * Maas et al. (2011) Andrew Maas, Raymond Daly, Peter Pham, Dan Huang, Andrew Ng, and Christopher Potts. 2011.  Learning word vectors for sentiment analysis.  pages 142–150.
  * Mäntylä et al. (2016) Mika Viking Mäntylä, Daniel Graziotin, and Miikka Kuutila. 2016.  The evolution of sentiment analysis - A review of research topics, venues, and top cited papers.  _CoRR_ , abs/1612.01556.
  * Pang and Lee (2004) Bo Pang and Lillian Lee. 2004.  A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts.  _CoRR_ , cs.CL/0409058.
  * Potts et al. (2020) Christopher Potts, Zhengxuan Wu, Atticus Geiger, and Douwe Kiela. 2020.  Dynasent: A dynamic benchmark for sentiment analysis.  _CoRR_ , abs/2012.15349.
  * Reimers and Gurevych (2019) Nils Reimers and Iryna Gurevych. 2019.  Sentence-bert: Sentence embeddings using siamese bert-networks.  _CoRR_ , abs/1908.10084.
  * Rim et al. (2021) Daniela N. Rim, DongNyeong Heo, and Heeyoul Choi. 2021.  Adversarial training with contrastive learning in nlp.
  * Scott and Plested (2019) Mitchell Scott and J. Plested. 2019.  Gan-smote: A generative adversarial network approach to synthetic minority oversampling.  _Aust. J. Intell. Inf. Process. Syst._ , 15:29–35.
  * Shen et al. (2021) Aili Shen, Xudong Han, Trevor Cohn, Timothy Baldwin, and Lea Frermann. 2021.  Contrastive learning for fair representations.
  * Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013.  Recursive deep models for semantic compositionality over a sentiment treebank.  In _Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing_ , pages 1631–1642, Seattle, Washington, USA. Association for Computational Linguistics.
  * Su et al. (2021) Jianlin Su, Jiarun Cao, Weijie Liu, and Yangyiwen Ou. 2021.  Whitening sentence representations for better semantics and faster retrieval.  _CoRR_ , abs/2103.15316.
  * Turney (2002) Peter D. Turney. 2002.  Thumbs up or thumbs down? semantic orientation applied to unsupervised classification of reviews.  _CoRR_ , cs.LG/0212032.
  * Wolf et al. (2020) Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020.  Huggingface’s transformers: State-of-the-art natural language processing.
  * Wu et al. (2021) Xing Wu, Chaochen Gao, Liangjun Zang, Jizhong Han, Zhongyuan Wang, and Songlin Hu. 2021.  Esimcse: Enhanced sample building method for contrastive learning of unsupervised sentence embedding.
  * Zhang et al. (2015) Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015.  Character-level convolutional networks for text classification.  _CoRR_ , abs/1509.01626.

##  Appendix A Appendix

Figure 5: Experiment Results for Other Datasets.