On the enumeration of series-parallel matroids

Nicholas Proudfoot111Supported by NSF grants DMS-1954050, DMS-2053243, and
DMS-2344861., Yuan Xu222Supported by Simons Foundation Collaboration Grant
#849676., and Benjamin Young
Department of Mathematics, University of Oregon, Eugene, OR 97403

> Abstract. By the work of Ferroni and Larson, Kazhdan–Lusztig polynomials and
> $Z$-polynomials of complete graphs have combinatorial interpretations in
> terms of quasi series-parallel matroids. We provide explicit formulas for
> the number of series-parallel matroids and the number of simple series-
> parallel matroids of a given rank and cardinality, extending results of
> Ferroni–Larson and Gao–Proudfoot–Yang–Zhang.

##  1 Introduction

Given a graph, a series extension is a graph obtained by subdividing an edge,
and a parallel extension is a graph obtained by adding a new edge parallel to
an existing one. A graph is called series-parallel if it can be constructed
from a 2-cycle by a sequence of series and parallel extensions. By convention,
a single edge and a single loop are also considered series-parallel graphs. A
matroid associated with a series-parallel graph is called a series-parallel
matroid. A series-parallel matroid is simple if and only if it comes from a
graph with no loops or parallel edges.

A (possibly empty) direct sum of series-parallel matroids is called quasi
series-parallel; this is the same as taking matroids associated with disjoint
unions of series-parallel graphs. A quasi series-parallel matroid is simple if
and only if each of its components is simple. Quasi series-parallel matroids
are characterized by the property of having no minors equal to the uniform
matroid of rank 2 on 4 elements or the matroid associated with the complete
graph $K_{4}$ [FL24, Proposition 2.1]. The rank of a quasi series-parallel
matroid is equal to the number of vertices minus the number of connected
components of the corresponding graph.

Consider the following quantities:

$\displaystyle C_{n,k}$ $\displaystyle=\text{the number of series-parallel
matroids on $[n]$ of rank $k$ }$ [OEIS, A140945] $\displaystyle E_{n,k}$
$\displaystyle=\text{the number of simple series-parallel matroids on $[n]$ of
rank $k$}$ [OEIS, A361355] $\displaystyle A_{n,k}$ $\displaystyle=\text{the
number of quasi series-parallel matroids on $[n]$ of rank $k$}$ [OEIS,
A359985] $\displaystyle S_{n,k}$ $\displaystyle=\text{the number of simple
quasi series-parallel matroids on $[n]$ of rank $k$}$ [OEIS, A361353]

######  Remark 1.1.

The letter $A$ stands for All quasi series-parallel matroids, $S$ stands for
Simple quasi series-parallel matroids, and $C$ stands for Connected quasi
series-parallel matroids, which are the same as series-parallel matroids (with
the convention that the empty matroid is not connected). The letter $E$ does
not stand for anything, but it means simple and connected. In [FL24], the
quantity $E_{2k,k+1}$ is denoted $E_{k}$.

######  Remark 1.2.

The original motivation for studying these quantities is that $A_{n,k}$
(respectively $S_{n,k}$) is equal to the coefficient of $t^{n-k}$ in the
$Z$-polynomial (respectively Kazhdan–Lusztig polynomial) of the matroid
associated with the complete graph $K_{n+1}$ [FL24, Theorem 1.1]. This is the
only known combinatorial description of these coefficients.

######  Remark 1.3.

Note that the number of series-parallel matroids on $[n]$ is not the same as
the number of series-parallel graphs with edge set $[n]$, because different
graphs can induce the same matroid. For example, there are three different
ways (up to isomorphism) to label the edges of the 4-cycle with the labels
$\\{1,2,3,4\\}$, but they all induce the uniform matroid of rank 3.

Consider the following generating functions:

$\displaystyle E(x,y)$ $\displaystyle:=$
$\displaystyle\sum_{n=1}^{\infty}\sum_{k=0}^{n}E_{n,k}\,y^{k}\frac{x^{n}}{n!},\qquad
S(x,y):=\sum_{n=0}^{\infty}\sum_{k=0}^{n}S_{n,k}\,y^{k}\frac{x^{n}}{n!}$
$\displaystyle C(x,y)$ $\displaystyle:=$
$\displaystyle\sum_{n=1}^{\infty}\sum_{k=0}^{n}C_{n,k}\,y^{k}\frac{x^{n}}{n!},\qquad
A(x,y):=\sum_{n=0}^{\infty}\sum_{k=0}^{n}A_{n,k}\,y^{k}\frac{x^{n}}{n!}.$

Note that the two generating functions on the left begin with $n=1$, while the
two on the right begin with $n=0$; this is because the empty matroid is quasi
series-parallel but not series-parallel. The combinatorial relationships
between these numbers can be expressed in terms of their generating functions.

######  Proposition 1.4.

We have the following identities:

$\displaystyle S(x,y)$ $\displaystyle=$ $\displaystyle e^{E(x,y)}$
$\displaystyle A(x,y)$ $\displaystyle=$ $\displaystyle e^{C(x,y)}$
$\displaystyle C(x,y)$ $\displaystyle=$ $\displaystyle E(e^{x}-1,y)+x$
$\displaystyle A(x,y)$ $\displaystyle=$ $\displaystyle S(e^{x}-1,y)\cdot
e^{x}$

$A$$C$$S$$E$exponentiateexponentiate$\begin{subarray}{c}\text{{\em
precompose}}\\\ \text{{\em with} $e^{x}-1$}\\\ \text{{\em and multiply}}\\\
\text{{\em by} $e^{x}$}\end{subarray}$$\begin{subarray}{c}\text{{\em
precompose}}\\\ \text{{\em with} $e^{x}-1$}\\\ \text{{\em and add}
$x$}\end{subarray}$

###### Proof.

A quasi series-parallel matroid on $[n]$ is given by a partition of $[n]$
along with a series-parallel matroid on each part, and it is simple if and
only if each component is simple. This fact, combined with [Sta24, Corollary
5.1.6], implies the first two identities. When $n\geq 2$, a series-parallel
matroid on $[n]$ is given by a partition of $[n]$ into parallel classes and a
simple series-parallel matroid on the set of parallel classes. This
observation, combined with [Sta24, Theorem 5.1.4], implies the third identity.
(The addition of $x$ comes from the matroid of rank 0 on the set $[1]$, which
is series-parallel but not simple.) Finally, a quasi series-parallel matroid
on $[n]$ is given by a set of loops, a partition of the nonloops into parallel
classes, and a simple series-parallel matroid on the set of parallel classes.
This statement implies the fourth identity by [Sta24, Proposition 5.1.1 and
Theorem 5.1.4], with the factor of $e^{x}$ corresponding to the choice of the
set of loops. ∎

We focus here on the numbers $E_{n,k}$, from which all of the others can be
computed. We know that we have $E_{n,k}=0$ when $n\geq 2k>0$ [FL24,
Proposition 2.10]. Theorem 1.5 provides formulas for $E_{2k-1,k}$ [FL24,
Corollary 2.12] and $E_{2k-2,k}$ [GPYZ, Corollary 1.6].

######  Theorem 1.5.

[FL24, GPYZ] We have

$\frac{E_{2k-1,k}}{(2k-1)!!}=(2k-1)^{k-3}\qquad\text{and}\qquad\frac{E_{2k-2,k}}{(2k-3)!!}=(2k-1)^{k-2}-(2k-2)^{k-2}+\frac{2}{3}(k-2)(2k-2)^{k-3}.$

Our goal in this note is to provide a formula for $E_{2k-r,k}$ for arbitrary
$k$ and $r$. Our formula becomes more complicated as $r$ grows. It can be used
to recover Theorem 1.5, and we also use it to provide an explicit closed
formula for the next case $E_{2k-3,k}$ (Example 1.7).

Consider the unsigned associated Stirling number of the first kind

${\left[\\!\left[\begin{matrix}n\\\
k\end{matrix}\right]\\!\right]}=(n-1){\left[\\!\left[\begin{matrix}n-2\\\
k-1\end{matrix}\right]\\!\right]}+(n-1){\left[\\!\left[\begin{matrix}n-1\\\
k\end{matrix}\right]\\!\right]},$ (1)

which counts the number of derangements of $[n]$ with $k$ cycles [Com74, page
256]. This quantity vanishes when $n<2k$, and Equation (1) implies the
following formulas when $n$ is close to $2k$:

${\left[\\!\left[\begin{matrix}2k\\\
k\end{matrix}\right]\\!\right]}=(2k-1)!!,\quad{\left[\\!\left[\begin{matrix}2k+1\\\
k\end{matrix}\right]\\!\right]}=\frac{2}{3}k\,(2k+1)!!,\quad\text{and}\quad{\left[\\!\left[\begin{matrix}2k+2\\\
k\end{matrix}\right]\\!\right]}=\frac{1}{9}(4k+5)(k+1)k\,(2k+1)!!.$

######  Theorem 1.6.

For all $0\leq r\leq k$, we have

$E_{2k-r,k}=\sum_{p=1}^{r}{\left[\\!\left[\begin{matrix}2k-p-1\\\
k-p\end{matrix}\right]\\!\right]}\sum_{i=0}^{r-p}\frac{(-1)^{i+p+1}(2k-p-i)^{k-p-1}}{i!(r-p-i)!}.$

######  Example 1.7.

When $r=1$ and $r=2$, Theorem 1.6 reproduces Theorem 1.5. When $r=3$, Theorem
1.6 tells us that

$\displaystyle\frac{E_{2k-3,k}}{(2k-3)!!}$ $\displaystyle=$
$\displaystyle\frac{1}{2}(2k-1)^{k-2}-(2k-2)^{k-2}+\frac{1}{2}(2k-3)^{k-2}$
$\displaystyle+\frac{2}{3}(k-2)\left((2k-3)^{k-3}-(2k-2)^{k-3}\right)$
$\displaystyle+\frac{1}{9}(4k-7)(k-2)(k-3)(2k-3)^{k-5}.$

######  Remark 1.8.

Let $M$ be a simple quasi series-parallel matroid of rank $k$ on the set
$[2k-r]$, and let $\\{M_{i}\\}$ be its connected components. Then $M_{i}$ is a
simple series-parallel matroid of rank $k_{i}$ on a set of cardinality
$2k_{i}-r_{i}$, and we have $\sum_{i}k_{i}=k$ and $\sum_{i}r_{i}=r$. Thus
$S_{2k-r,k}$ may be computed in terms of $E_{2j-s,j}$ for $j\leq k$ and $s\leq
r$. The precise formula can be derived from the first equation in Proposition
1.4.

We prove Theorem 1.6 using the generating functions. Ferroni and Larson
provide an expression for the generating function $C(x,y)$ in terms of the
compositional inverse of the function

$\frac{1}{y}\log(1+xy)+\log(1+x)-x,$

where $y$ is regarded as a parameter (Section 4). We explicitly compute the
coefficients of this compositional inverse, which gives us a formula for the
numbers $C_{n,k}$ (Corollary 4.4). We then combine this with the third
identity in Proposition 1.4 to prove Theorem 1.6.

Acknowledgments: The authors are grateful to Luis Ferroni and Matt Larson,
whose work made this paper possible.

##  2 Two Stirling lemmas

We begin with two lemmas about Stirling numbers that we will need later in the
paper. Let $\genfrac{\\{}{\\}}{0.0pt}{}{n}{k}$ be the Stirling number of the
second kind, which counts partitions of $[n]$ into $k$ nonempty parts.

######  Lemma 2.1.

We have

$\sum_{p=0}^{\ell}(-1)^{\ell+p}\binom{m+p}{\ell+p}{\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}=\genfrac{\\{}{\\}}{0.0pt}{}{m+1}{m-\ell+1}.$

###### Proof.

Let us denote the left-hand side of the equation by $T_{m,\ell}$. We have

$\genfrac{\\{}{\\}}{0.0pt}{}{m+1}{m-\ell+1}-\genfrac{\\{}{\\}}{0.0pt}{}{m}{m-\ell}=(m-\ell+1)\genfrac{\\{}{\\}}{0.0pt}{}{m}{m-\ell+1},$

and we will show that $T_{m,\ell}$ satisfies the same recursion. Indeed, we
have

$\displaystyle T_{m,\ell}-T_{m-1,\ell}$ $\displaystyle=$
$\displaystyle\sum_{p=1}^{\ell}(-1)^{p+\ell}\left(\binom{m+p}{\ell+p}-\binom{m-1+p}{\ell+p}\right){\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}$ $\displaystyle=$
$\displaystyle\sum_{p=0}^{\ell}(-1)^{p+\ell}\binom{m+p-1}{\ell+p-1}{\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}$ $\displaystyle=$
$\displaystyle\sum_{p=0}^{\ell}(-1)^{p+\ell}\binom{m+p-1}{\ell+p-1}(\ell+p-1)\left({\left[\\!\left[\begin{matrix}\ell+p-2\\\
p-1\end{matrix}\right]\\!\right]}+{\left[\\!\left[\begin{matrix}\ell+p-1\\\
p\end{matrix}\right]\\!\right]}\right)$ $\displaystyle=$
$\displaystyle(m-\ell+1)\sum_{p=0}^{\ell}(-1)^{p+\ell}\binom{m+p-1}{\ell+p-2}\left({\left[\\!\left[\begin{matrix}\ell+p-2\\\
p-1\end{matrix}\right]\\!\right]}+{\left[\\!\left[\begin{matrix}\ell+p-1\\\
p\end{matrix}\right]\\!\right]}\right)$ $\displaystyle=$
$\displaystyle(m-\ell+1)\sum_{q=0}^{\ell-1}(-1)^{q+\ell}\left(\binom{m+q-1}{\ell+q-2}-\binom{m+q}{\ell+q-1}\right){\left[\\!\left[\begin{matrix}\ell+q-1\\\
q\end{matrix}\right]\\!\right]}$ $\displaystyle=$
$\displaystyle(m-\ell+1)\sum_{q=0}^{\ell-1}(-1)^{q+\ell-1}\binom{m+q-1}{\ell+q-1}{\left[\\!\left[\begin{matrix}\ell+q-1\\\
q\end{matrix}\right]\\!\right]}$ $\displaystyle=$
$\displaystyle(m-\ell+1)T_{m-1,\ell-1}.$

This completes the proof. ∎

######  Lemma 2.2.

We have

$\genfrac{\\{}{\\}}{0.0pt}{}{n+k}{m}=\sum_{j=0}^{k-1}\genfrac{\\{}{\\}}{0.0pt}{}{n+1}{m-j}\sum_{i=0}^{j}\frac{(-1)^{i}(m-i)^{k-1}}{i!(j-i)!}.$

###### Proof.

We have

$\displaystyle m!\genfrac{\\{}{\\}}{0.0pt}{}{n+k}{m}$ $\displaystyle=$
$\displaystyle\big{|}\\{f:[n+k]\twoheadrightarrow[m]\\}\big{|}$
$\displaystyle=$
$\displaystyle\sum_{j=1}^{k-1}\binom{m}{j}\big{|}\\{f:[n+1]\twoheadrightarrow[m-j]\\}\big{|}\cdot\big{|}\\{f:[k-1]\to[m]\mid[j]\subset\operatorname{im}(f)\\}\big{|}$
$\displaystyle=$
$\displaystyle\sum_{j=1}^{k-1}\binom{m}{j}(m-j)!\genfrac{\\{}{\\}}{0.0pt}{}{n+1}{m-j}\cdot\big{|}\\{f:[k-1]\to[m]\mid[j]\subset\operatorname{im}(f)\\}\big{|},$

and therefore

$\genfrac{\\{}{\\}}{0.0pt}{}{n+k}{m}=\sum_{j=1}^{k-1}\frac{1}{j!}\genfrac{\\{}{\\}}{0.0pt}{}{n+1}{m-j}\cdot\big{|}\\{f:[k-1]\to[m]\mid[j]\subset\operatorname{im}(f)\\}\big{|}.$

By the inclusion-exclusion principle,

$\displaystyle\big{|}\\{f:[k-1]\to[m]\mid[j]\subset\operatorname{im}(f)\\}\big{|}$
$\displaystyle=$
$\displaystyle\sum_{i=0}^{k-1}(-1)^{i}\binom{j}{i}\big{|}\\{f:[k-1]\to[m]\mid[i]\not\subset\operatorname{im}(f)\\}\big{|}$
$\displaystyle=$
$\displaystyle\sum_{i=0}^{k-1}(-1)^{i}\binom{j}{i}\big{|}\\{f:[k-1]\to[m-i]\\}\big{|}$
$\displaystyle=$
$\displaystyle\sum_{i=0}^{k-1}(-1)^{i}\binom{j}{i}(m-i)^{k-1}.$

This completes the proof. ∎

##  3 Sums of products of reciprocals

Consider the numbers

$H_{m,k}:=\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\ j_{1}\geq
1,\ldots,j_{k}\geq 1\end{subarray}}\,\frac{1}{(j_{1}+1)\cdots(j_{k}+1)}.$

######  Lemma 3.1.

We have the recursion

$nH_{n-k,k}=kH_{n-k-1,k-1}+(n-1)H_{n-k-1,k}.$

###### Proof.

We have

$\displaystyle nH_{n-k,k}$ $\displaystyle=$
$\displaystyle\frac{n!}{k!}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-k\\\
j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\,\frac{1}{(j_{1}+1)\cdots(j_{k}+1)}$ $\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-k\\\ j_{1}\geq
1,\ldots,j_{k}\geq
1\end{subarray}}\,\frac{(j_{1}+1)+\cdots+(j_{k}+1)}{(j_{1}+1)\cdots(j_{k}+1)}.$

By symmetry, we may replace the numerator in the fraction above by
$k(j_{k}+1)$, and we obtain the equation

$\displaystyle nH_{n-k,k}$ $\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-k\\\ j_{1}\geq
1,\ldots,j_{k}\geq
1\end{subarray}}\,\frac{k(j_{k}+1)}{(j_{1}+1)\cdots(j_{k}+1)}$
$\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-k\\\ j_{1}\geq
1,\ldots,j_{k}\geq 1\end{subarray}}\,\frac{k}{(j_{1}+1)\cdots(j_{k-1}+1)}$
$\displaystyle=$ $\displaystyle\sum_{j_{k}\geq
1}\;\;\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k-1}=n-k-j_{k}\\\ j_{1}\geq
1,\ldots,j_{k-1}\geq 1\end{subarray}}\,\frac{k}{(j_{1}+1)\cdots(j_{k-1}+1)}.$

Similarly, we have

$(n-1)H_{n-k-1,k}=\sum_{j_{k}\geq
1}\;\;\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k-1}=n-k-j_{k}-1\\\ j_{1}\geq
1,\ldots,j_{k-1}\geq 1\end{subarray}}\,\frac{k}{(j_{1}+1)\cdots(j_{k-1}+1)}.$

Taking the difference, we find that

$\displaystyle nH_{n-k,k}-(n-1)H_{n-k-1,k}$ $\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k-1}=n-k-1\\\ j_{1}\geq
1,\ldots,j_{k-1}\geq 1\end{subarray}}\,\frac{k}{(j_{1}+1)\cdots(j_{k-1}+1)}$
$\displaystyle=$ $\displaystyle kH_{n-k-1,k}.$

This completes the proof. ∎

######  Lemma 3.2.

We have

$H_{n-k,k}=\frac{k!}{n!}{\left[\\!\left[\begin{matrix}n\\\
k\end{matrix}\right]\\!\right]}.$

###### Proof.

The recursion in Equation (1) matches the one in Lemma 3.1. ∎

######  Lemma 3.3.

We have

$\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\ j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\,\prod_{i=1}^{k}\frac{1+y^{j_{i}}}{j_{i}+1}=\sum_{\ell=0}^{m}y^{\ell}\sum_{p=0}^{k}\binom{k}{p}H_{\ell,p}H_{m-\ell,k-p}.$

###### Proof.

We have

$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\ j_{1}\geq
1,\ldots,j_{k}\geq
1\end{subarray}}\,\prod_{i=1}^{k}\frac{1+y^{j_{i}}}{j_{i}+1}$ $\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\ j_{1}\geq
1,\ldots,j_{k}\geq
1\end{subarray}}\,\sum_{p=0}^{k}\binom{k}{p}\frac{y^{j_{1}+\cdots+j_{p}}}{(j_{1}+1)\cdots(j_{k}+1)}$
$\displaystyle=$
$\displaystyle\sum_{p=0}^{k}\binom{k}{p}\sum_{\ell=p}^{m-k+p}y^{\ell}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\
j_{1}+\cdots+j_{p}=\ell\\\ j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\,\frac{1}{(j_{1}+1)\cdots(j_{k}+1)}$ $\displaystyle=$
$\displaystyle\sum_{\ell=0}^{m}y^{\ell}\sum_{p=0}^{k}\binom{k}{p}H_{\ell,p}H_{m-\ell,k-p}.$

This completes the proof. ∎

Combining Lemmas 3.2 and 3.3 yields the following corollary, which we will use
in Section 4.

######  Corollary 3.4.

We have

$\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=m\\\ j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\,\prod_{i=1}^{k}\frac{1+y^{j_{i}}}{j_{i}+1}=\frac{k!}{(m-k)!}\sum_{\ell=0}^{m}y^{\ell}\sum_{p=0}^{k}\binom{m-k}{\ell+p}{\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}{\left[\\!\left[\begin{matrix}m-\ell+k-p\\\
k-p\end{matrix}\right]\\!\right]}.$

##  4 Inverting a power series

The partial Bell polynomials $B_{n,k}(t_{1},\ldots,t_{n-k+1})$ are
characterized by the identity

$\exp\left(y\sum_{j=1}^{\infty}t_{j}\frac{x^{j}}{j!}\right)=\sum_{0\leq k\leq
n}B_{n,k}(t_{1},\ldots,t_{n-k+1})\,y^{k}\frac{x^{n}}{n!}.$ (2)

The following lemma gives an explicit expression for these polynomials.

######  Lemma 4.1.

We have

$B_{n,k}(t_{1},\ldots,t_{n-k+1})=\frac{n!}{k!}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n\\\
j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\frac{t_{j_{1}}}{j_{1}!}\cdots\frac{t_{j_{k}}}{j_{k}!}.$

###### Proof.

Equation (2) implies that $B_{n,k}(t_{1},\ldots,t_{n-k+1})$ is equal to the
coefficient of $x^{n}$ in the power series

$\frac{n!}{k!}\left(\sum_{j=1}^{\infty}t_{j}\frac{x^{j}}{j!}\right)^{k}.$

The lemma follows. ∎

Suppose that

$F(x)=\sum_{n=1}^{\infty}F_{n}\frac{x^{n}}{n!}\qquad\text{and}\qquad
G(x)=\sum_{n=1}^{\infty}G_{n}\frac{x^{n}}{n!}$

are power series with coefficients in some commutative $\mathbb{Q}$-algebra
$R$. Suppose further that $F_{1}\neq 0$, and let
$\hat{F_{n}}=\frac{F_{n+1}}{(n+1)F_{1}}$, so that

$\hat{F}(x):=\sum_{n=1}^{\infty}\hat{F_{n}}\frac{x^{n}}{n!}=\frac{F(x)-F_{1}x}{x}.$

The following result is a corollary of the Lagrange inversion theorem [Cha02,
Corollary 11.3].

######  Theorem 4.2.

We have $G(F(x))=x$ if and only if $G_{1}=F_{1}^{-1}$ and, for all $n>1$,

$\displaystyle G_{n}$ $\displaystyle=$
$\displaystyle\frac{1}{F_{1}^{n}}\sum_{k=1}^{n-1}n(n+1)\cdots(n+k-1)B_{n-1,k}\left(\hat{F}_{1},\ldots,\hat{F}_{n-k}\right)$
$\displaystyle=$
$\displaystyle\frac{1}{F_{1}^{n}}\sum_{k=1}^{n-1}(-1)^{k}\frac{(n+k-1)!}{k!}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-1\\\
j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\prod_{i=1}^{k}\frac{\hat{F}_{j_{i}}}{j_{i}!}.$

We now apply Theorem 4.2 to a particular power series with coefficients in the
commutative $\mathbb{Q}$-algebra $\mathbb{Q}[y]$. Let

$F(x,y)=\sum_{n=1}^{\infty}F_{n}(y)\frac{x^{n}}{n!}:=\frac{1}{y}\log(1+xy)+\log(1+x)-x.$

Explicitly, we have $F_{1}(y)=1$ and $F_{n}(y)=(-1)^{n-1}(n-1)!(1+y^{n-1})$
for all $n>1$. Let

$G(x,y)=\sum_{n=1}^{\infty}G_{n}(y)\frac{x^{n}}{n!}=\sum_{n=1}^{\infty}\sum_{k=0}^{\infty}G_{n,k}\,y^{k}\frac{x^{n}}{n!}$

be the unique power series with the property that $G(F(x,y),x)=x$.

######  Proposition 4.3.

We have

$G_{n,\ell}=G_{n,n-\ell-1}=\sum_{j=0}^{\ell}(-1)^{j+\ell}{\left[\\!\left[\begin{matrix}j+\ell\\\
j\end{matrix}\right]\\!\right]}\genfrac{\\{}{\\}}{0.0pt}{}{n+j}{j+\ell+1}.$

###### Proof.

Let

$\hat{F}_{n}(y):=\frac{F_{n+1}(y)}{(n+1)F_{1}(y)}=\frac{(-1)^{n}n!(1+y^{n})}{n+1}.$

By Theorem 4.2, we have

$\displaystyle G_{n}(y)$ $\displaystyle=$
$\displaystyle\sum_{k=1}^{n-1}(-1)^{k}\frac{(n+k-1)!}{k!}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-1\\\
j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\prod_{i=1}^{k}\frac{\hat{F}_{j_{i}}(y)}{j_{i}!}$
$\displaystyle=$
$\displaystyle\sum_{k=1}^{n-1}(-1)^{n+k-1}\frac{(n+k-1)!}{k!}\sum_{\begin{subarray}{c}j_{1}+\cdots+j_{k}=n-1\\\
j_{1}\geq 1,\ldots,j_{k}\geq
1\end{subarray}}\prod_{i=1}^{k}\frac{1+y^{j_{i}}}{j_{i}+1}.$

Note that this polynomial is clearly palindromic of degree $n-1$, which
implies that $G_{n,\ell}=G_{n,n-\ell-1}$. By Corollary 3.4, $G_{n}(y)$ is
equal to

$\sum_{\ell=0}^{n-1}y^{\ell}\
\sum_{k=1}^{n-1}(-1)^{n+k-1}\sum_{p=0}^{\ell}{\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}{\left[\\!\left[\begin{matrix}n-1-\ell+k-p\\\
k-p\end{matrix}\right]\\!\right]}\binom{n+k-1}{\ell+p}.$

Taking the coefficient of $y^{\ell}$ and reindexing with $j=k-p$, we get

$G_{n,\ell}=\sum_{j=0}^{n-\ell-1}(-1)^{n+j-\ell-1}{\left[\\!\left[\begin{matrix}n-1-\ell+j\\\
j\end{matrix}\right]\\!\right]}\sum_{p=0}^{\ell}(-1)^{\ell+p}{\left[\\!\left[\begin{matrix}\ell+p\\\
p\end{matrix}\right]\\!\right]}\binom{n-1+j+p}{\ell+p}.$

Note that the symmetry $G_{n,\ell}=G_{n,n-1-\ell}$ can be seen by exchanging
$j$ and $p$ in the summation above. By Lemma 2.1 with $m=n-1+j$, we have

$G_{n,\ell}=\sum_{j=0}^{n-\ell-1}(-1)^{n+j-\ell-1}{\left[\\!\left[\begin{matrix}n-1-\ell+j\\\
j\end{matrix}\right]\\!\right]}\genfrac{\\{}{\\}}{0.0pt}{}{n+j}{n+j-\ell}.$

Replacing $\ell$ with $n-1-\ell$ allows us to rewrite our expression as

$G_{n,\ell}=G_{n,n-1-\ell}=\sum_{j=0}^{\ell}(-1)^{j+\ell}{\left[\\!\left[\begin{matrix}j+\ell\\\
j\end{matrix}\right]\\!\right]}\genfrac{\\{}{\\}}{0.0pt}{}{n+j}{j+\ell+1}.$

This completes the proof. ∎

Proposition 4.3, along with a theorem of Ferroni and Larson, provides a
formula for $C_{n,\ell}$.

######  Corollary 4.4.

For all $n\geq 2$, we have

$C_{n,\ell}=\sum_{k=0}^{\ell-1}(-1)^{k+\ell-1}{\left[\\!\left[\begin{matrix}k+\ell-1\\\
k\end{matrix}\right]\\!\right]}\genfrac{\\{}{\\}}{0.0pt}{}{n-1+k}{k+\ell}.$

###### Proof.

Using the work of Drake [Dra08, Example 1.5.1], Ferroni and Larson [FL24,
Proposition 2.3] show that

$C(x,y)=(1+y)x+y\int G(x,y)\,dx,$

where the improper integral is taken to have no constant term. This means
that, for all $n\geq 2$, $C_{n,\ell}=G_{n-1,\ell-1}$. The Corollary then
follows from Proposition 4.3. ∎

######  Remark 4.5.

In Proposition 4.3, we gave an algebraic proof of the identity
$G_{n,\ell}=G_{n,n-1-\ell}$. We can reinterpret this identity as saying that
$C_{n+1,\ell+1}=C_{n+1,n-\ell}$, which follows from the fact that matroid
duality is a bijection from the set of series-parallel matroids on $[n+1]$ of
rank $\ell+1$ to the set of series-parallel matroids on $[n+1]$ of rank
$n-\ell$.

##  5 Proof of Theorem 1.6

This section is devoted to using Corollary 4.4 to prove Theorem 1.6.

######  Lemma 5.1.

For all $n\geq 2$, we have

$C_{n,\ell}=\sum_{m=\ell}^{n}\genfrac{\\{}{\\}}{0.0pt}{}{n}{m}E_{m,\ell}.$

###### Proof.

This can be derived from the third identity in Proposition 1.4, or one can
prove it directly using the same combinatorial reasoning employed in the proof
of Proposition 1.4. That is, a series-parallel matroid on $[n]$ is given by a
partition of $[n]$ into $m$ parallel classes for some $m$, along with a simple
series-parallel matroid on the set of parallel classes. The lemma follows. ∎

Let

$\tilde{E}_{n,\ell}:=\sum_{p=1}^{2\ell-n}{\left[\\!\left[\begin{matrix}2\ell-p-1\\\
\ell-p\end{matrix}\right]\\!\right]}\sum_{i=0}^{2\ell-
n-p}\frac{(-1)^{i+p+1}(2\ell-p-i)^{\ell-p-1}}{i!(2\ell-n-p-i)!},$

so that

$\tilde{E}_{2k-r,k}=\sum_{p=1}^{r}{\left[\\!\left[\begin{matrix}2k-p-1\\\
k-p\end{matrix}\right]\\!\right]}\sum_{i=0}^{r-p}\frac{(-1)^{i+p+1}(2k-p-i)^{k-p-1}}{i!(r-p-i)!}$

is the expression appearing on the right-hand side of the equation in the
statement of the theorem. We next prove the analogue of Lemma 5.1 for
$\tilde{E}$.

######  Lemma 5.2.

For all $n\geq 2$, we have

$C_{n,\ell}=\sum_{m=\ell}^{n}\genfrac{\\{}{\\}}{0.0pt}{}{n}{m}\tilde{E}_{m,\ell}.$

###### Proof.

By Corollary 4.4 and using Lemma 2.2, we have

$C_{n,\ell}=\sum_{k=0}^{\ell-1}(-1)^{k+\ell-1}{\left[\\!\left[\begin{matrix}k+\ell-1\\\
k\end{matrix}\right]\\!\right]}\sum_{j=0}^{k-1}\genfrac{\\{}{\\}}{0.0pt}{}{n}{k+\ell-j}\sum_{i=0}^{j}\frac{(-1)^{i}(k+\ell-i)^{k-1}}{i!(j-i)!},$

Setting $m=k+\ell-j$, we get

$C_{n,\ell}=\sum_{m=1}^{n}\genfrac{\\{}{\\}}{0.0pt}{}{n}{m}\sum_{k=0}^{\ell-1}(-1)^{k+\ell-1}{\left[\\!\left[\begin{matrix}k+\ell-1\\\
k\end{matrix}\right]\\!\right]}\sum_{i=0}^{k+\ell-m}(-1)^{i}\frac{(k+\ell-i)^{k-1}}{i!(k+\ell-
m-i)!},$

thus it will suffice to show that

$\sum_{k=0}^{\ell-1}(-1)^{k+\ell-1}{\left[\\!\left[\begin{matrix}k+\ell-1\\\
k\end{matrix}\right]\\!\right]}\sum_{i=0}^{k+\ell-m}\frac{(-1)^{i}(k+\ell-i)^{k-1}}{i!(k+\ell-
m-i)!}$

is equal to

$\sum_{p=1}^{2\ell-m}{\left[\\!\left[\begin{matrix}2\ell-p-1\\\
\ell-p\end{matrix}\right]\\!\right]}\sum_{i=0}^{2\ell-
m-p}\frac{(-1)^{i+p+1}(2\ell-p-i)^{\ell-p-1}}{i!(2\ell-m-p-i)!}.$

This is readily seen by setting $k=\ell-p$. ∎

###### Proof of Theorem 1.6.

We need to prove that $E_{n,\ell}=\tilde{E}_{n,\ell}$ for all $n\geq\ell\geq
1$. We fix $\ell\geq 1$ and proceed by induction on $n$. If $n=\ell=1$, we can
verify the equality directly. Otherwise we have $n\geq 2$, so Equation (5.1)
and Lemma 5.2 tell us that

$\genfrac{\\{}{\\}}{0.0pt}{}{n}{\ell}E_{\ell,\ell}+\genfrac{\\{}{\\}}{0.0pt}{}{n}{\ell+1}E_{\ell+1,\ell}+\cdots+\genfrac{\\{}{\\}}{0.0pt}{}{n}{n}E_{n,\ell}=C_{n,\ell}=\genfrac{\\{}{\\}}{0.0pt}{}{n}{\ell}\tilde{E}_{\ell,\ell}+\genfrac{\\{}{\\}}{0.0pt}{}{n}{\ell+1}\tilde{E}_{\ell+1,\ell}+\cdots+\genfrac{\\{}{\\}}{0.0pt}{}{n}{n}\tilde{E}_{n,\ell}.$

By our inductive hypothesis, we can conclude that
$E_{n,\ell}=\tilde{E}_{n,\ell}$. ∎

## References

  * [Cha02] Charalambos A. Charalambides, _Enumerative combinatorics_ , CRC Press Series on Discrete Mathematics and its Applications, Chapman & Hall/CRC, Boca Raton, FL, 2002.
  * [Com74] Louis Comtet, _Advanced combinatorics_ , enlarged ed., D. Reidel Publishing Co., Dordrecht, 1974, The art of finite and infinite expansions.
  * [Dra08] Brian Drake, _An inversion theorem for labeled trees and some limits of areas under lattice paths_ , ProQuest LLC, Ann Arbor, MI, 2008, Thesis (Ph.D.)–Brandeis University.
  * [FL24] Luis Ferroni and Matt Larson, _Kazhdan-Lusztig polynomials of braid matroids_ , Comm. Amer. Math. Soc. 4 (2024), 64–79.
  * [GPYZ] Alice L.L. Gao, Nicholas Proudfoot, Arthur L.B. Yang, and Zhong-Xue Zhang, _The combinatorics behind the leading Kazhdan-Lusztig coefficients of braid matroids_ , arXiv:2311.06929.
  * [OEIS] OEIS Foundation, Inc., _The On-Line Encyclopedia of Integer Sequences_ , 2024, http://oeis.org.
  * [Sta24] Richard P. Stanley, _Enumerative combinatorics. Vol. 2_ , second ed., Cambridge Studies in Advanced Mathematics, vol. 208, Cambridge University Press, Cambridge, [2024] ©2024, With an appendix by Sergey Fomin.


# Achieving passive daytime radiative cooling via TiO2/PDMS coating

Karthik Sasihithlu,  Sreerag Sundaram,  Bhrigu Rishi Mishra, Nithin Jo
Varghese
Department of Energy Science and Engineering
Indian Institute of Technology Bombay
Mumbai – 400076. India.
Corresponding author<EMAIL_ADDRESS>
###### Abstract

The exponential growth in population and the increasing global temperature
trickles down to an explosive demand in cooling and refrigeration. The vicious
cycle of carbon footprint generation by these cooling devices can be broken by
a mechanism of passive cooling. This study outlines research undertaken with
the aim to design such materials – exhibiting high reflectance in the solar
spectrum and high emission in the atmospheric transparency window of 8–13
$\mu$m. The Monte Carlo (MC) method is used to simulate light propagation in a
composite material aiding the design of metamaterials with these specific
thermo-optical properties. A TiO2/PDMS coating is fabricated to obtain > 91 %
solar reflectivity and > 75 % emissivity in the atmospheric transparency
window. This translates to cooling the coated body by 4-9 ∘C below the ambient
under peak solar irradiation in Mumbai, India. The facile fabrication process
supplemented with the potential versatility of this coating shows promise to
attain passive daytime radiative cooling on a commercial scale.

_Keywords_ Passive daytime radiative cooling $\cdot$ Solar reflectivity
$\cdot$ Atmospheric transparency window $\cdot$ Monte Carlo $\cdot$ TiO2/PDMS
coating

##  1 Introduction

Estimates suggest that emissions from the "cooling" sector alone would exhaust
the carbon budget that targets limiting global warming to 1.5 ∘C above pre-
industrial levels. Thus, this calls for a joint and continuous action to curb
and bring about significant improvements in this technology. Currently,
approximately 3.6 billion units of cooling appliances are in use and this is
expected to reach 14 billion units by 2050. A move to the best cooling
technologies alone can reduce global cumulative emissions by 38–60 gigatonnes
of CO2e by 2030. Making cooling less polluting, therefore, becomes vital in
the race to mitigate global warming [1, 2].

A coating, inspired from the Saharan silver ant [3], mimics its
thermoregulatory process to achieve passive daytime radiative cooling (PDRC).
The desired coating should be: (a) highly reflective in the solar spectrum
(300–2500 nm) and, (b) highly emissive in the atmospheric transparency window
(8–13 $\mu$m). Theoretically, it has the potential to reduce the temperature
of a surface, passively, by 60 ∘C [4]. Several materials designed to attain
PDRC have demonstrated sub-ambient cooling by 5–7 ∘C viz. Mandal et al.’s air-
filled polymer [5], Huang and Ruan’s double-layer coating [6], and Raman et
al.’s seven layered metal/metal oxide composite [7]. More recently, a study of
a ZrO2–PDMS mixture reported having attained a surface temperature reduction
of about 10.9 ∘C under a solar irradiation of 895 W m-2 [8].

In this study, we build a model based on the Monte Carlo method that allows us
to design metamaterials with desired properties. A coating of titania (TiO2)
infused in a polymer matrix is observed to exhibit properties that help attain
PDRC. This coating is fabricated and experimentally tested to ascertain the
claims made by the computational model.

The PDMS/TiO2 composite is highly stable, hydrophobic, and biocompatible [9].
TiO2 is known to absorb in the ultraviolet regime – mainly in the UVC (100–280
nm) and UVB (280–315 nm) bands. However, incident radiation in the UVC and UVB
bands is almost completely blocked by the Earth’s ozone layer and atmosphere,
lowering chances of photo-degradation upon exposure to the environment [9].
Studies also indicate the ability of PDMS to suppress photo-degradation of
TiO2 particles even further. This has enabled the use of the PDMS–TiO2
composite for various outdoor applications making it a viable candidate for
PDRC coatings.

##  2 Computational design

The metamaterial design consists of a matrix with spherical inclusions,
analogous to extracellular fluid and the corpuscular components in a human
tissue. Numerical simulations of the designed composite material are based on
light propagation in biological tissue. The Monte Carlo method for multi-
layered tissues, designed by Wang and Jacques [10], is used to solve the
Radiative Transfer Equation. This stochastic method models steady–state photon
propagation in a material whose properties are derived from Mie theory. The
refractive index (RI) data used for calculating the material parameters is
depicted in figs. 1(a) and 1(b) [11, 12, 13]. Figure 1(d) compares the MC
result, for a uniform particle distribution, with that modelled by Peoples et
al. (fig. 1(c)) [14] – verifying the effectiveness of the MC method.
This framework is used to design a composite comprising titania (TiO2)
microspheres infused in a PDMS (polydimethylsiloxane) matrix. Simulation
results, published in our previous work [9], shows significant improvement in
performance over others reported in literature.

(a)

(b)

(c)

(d)

Figure 1: (a) and (b) Input parameters used in the model. (c) and (d)
Verification of the Monte Carlo method.

##  3 Experimental validation

###  3.1 Materials, synthesis and characterisation

PDMS (Part A, SYLGARDTM 184 Silicone Elastomer Kit, Dow) and its curing agent
(Part B) are mixed in a 10:1 ratio (by weight) and stirred. n-Hexane
(EMPLURA®, Sigma-Aldrich) is added to this mix in a 2:1 weight ratio [15]
(PDMS+curing agent : hexane) and stirred while sonicating, until a clear
solution is obtained. TiO2 powder (titanium (IV) oxide, anatase powder, -325
mesh, Sigma-Aldrich), weighed to attain a volume fraction of 10 %, is then
added and the resultant solution is sonicated for five minutes.

This was covered with a teflon sheet and allowed to rest for about 24 hours.
The solution splits into two phases due to settling of TiO2 particles, but
stirring with a clean paintbrush results in a viscous, white paint. Two coats
of this emulsion was applied onto aluminium substrates using the paintbrush.
Curing can be done at room or elevated temperatures. It takes about 48 hours
at room temperature whereas the process is complete in 60 minutes at 80 ∘C.

A field emission scanning electron microscope (Zeiss Ultra 55) was used to
image and characterise the titania powder particles. Reflectance was measured
in the ultraviolet, visible and near-infrared spectra (300–2500 nm) using
PerkinElmer Lambda 950 UV-Vis-NIR spectrometer. Absorbance of the coating in
the frequency band of 4000–400 cm-1 ($\equiv$ 2.5–25 $\mu$m) was characterised
using the Hyperion 3000 infrared microscope augmented to the Bruker Vertex 80,
FTIR spectrometer. Coating thickness was measured by Bruker DektakXT stylus
profiler.

###  3.2 Results

SEM analysis of TiO2 powder particles (fig. 5) reveal that the particles
follow a normal size distribution, with the mean particle radius at 125 nm.
However, for all further simulations a uniform particle size distribution
shall be considered for reasons discussed in section A.1.

(a)

(b)

Figure 2: Spectral reflectance and absorbance of fabricated coating

Multiple batches of the paint were prepared, coated on aluminium substrates
and tested for their spectral characteristics. Reflectance measurements (fig.
2(a)) of the fabricated paint give an average solar reflectance of 91.6 %.
This high solar reflectivity translates to a significant reduction in heat
gains under direct insolation. A low intake of energy from solar irradiation
consequently lowers the roof surface temperature – which otherwise records
temperatures higher than that of ambient air. This directly reduces the
ceiling temperatures recorded, demonstrating a decrease in the need for
cooling. Similar behaviour from multiple batches of the coating, as shown in
fig. 2(a), indicates its reproducibility.

Kirchoff’s law equates a body’s emissivity to its absorptivity provided it is
in thermal equilibrium. The absorbance of the fabricated coating measured
using FTIR at ambient temperature, depicted in fig. 2(b), can thus be used to
study the coating’s emissive characteristics. The coating exhibits an
emissivity of 75.2 % in the ATW111ATW – atmospheric transparency window
$\equiv$ 8-13 $\mu$m. The prominent dips observed in this regime, around 9, 11
and 12.5 $\mu$m, are due to an increased extinction coefficient (complex part
of the refractive index) of PDMS which increases the reflectivity222Absorbance
= 1 - Reflectance, as Transmittance = 0 of the coating (see appendix B).

Lastly, experimentally obtained results and predictions of our theoretical
models are compared to validate the latter. The material system was simulated
for the following parameters: a uniform-sized distribution of particles with a
radius of 125 nm, occupying a volume fraction of 10 %, and for a coating
thickness of 270 $\mu$m. Figure 3(a) is proof of good agreement of
experimental findings with the Monte Carlo method.
A limitation posed by the use of Mie theory is that it does not account for a
highly absorbing matrix. The absorption coefficient (obtained from Mie theory)
is modified, incorporating matrix absorbance, before being input to the MC
algorithm. The simulation result for the same material configuration shows a
similar trend as observed in experiments (fig. 3(b)), successfully validating
our simulation framework.

(a)

(b)

Figure 3: Validation of theoretical models

(a)

(b)

Figure 4: Testing cooling performance under outdoor conditions

#### Cooling performance

Cubical aluminium boxes, each of dimensions 6 cm x 6 cm x 6 cm, were coated
and exposed to the outdoor environment to test for the coating’s cooling
performance. One box that was left bare acted as the control environment for
the experiment. Calibrated thermocouples were plugged into each box – through
a 0.5 cm diameter hole on the ceiling – to measure the interior space
temperature, as shown in fig. 8, and one to measure the ambient temperature.

The results from this experiment are illustrated in fig. 4. The designed
coating is capable to cool the enclosure approximately 3–9 ∘C below ambient,
during peak solar irradiation (figs. 4(b), 9(a), 9(b) and 9(c)). Studies
(referred in section 1) quote achieving sub-ambient cooling of a surface for a
particular solar irradiation. The actual reduction in temperature for an
enclosure will be lesser than that for a surface. For instance, [8] reports a
maximum temperature drop of 10.9 ∘C below ambient of a surface and a 2.1 ∘C
difference between inside and outside of their house model. In this study, we
report the difference in temperatures measured within a metallic enclosure and
the ambient. Thus, comparing cooling performance results of this study with
sub-ambient temperature reduction of a surface would not be accurate. Based on
the metric of cooling within an enclosure, our coating outperforms materials
previously reported to achieve PDRC.

Furthermore, a non-coated surface would be observed to be at a temperature
higher than the ambient which is exemplified by the bare aluminium box in fig.
4(b). Cooling appliances would thus have to cool from this higher temperature
to the lower, chosen temperature in order to attain thermal comfort. The box
with our coat sees a temperature reduction of 7–8 ∘C (fig. 9(d)) from that
seen by the non-coated, bare aluminium box. This would decrease the
temperature difference that is needed to attain thermal comfort, further
reducing the work done by cooling unit compressors. This single-layered,
PDMS/TiO2 composite coating thus holds high potential to achieve significant
reductions in the cooling demand.

##  4 Conclusions

This study has thus designed, verified and validated the Monte Carlo method to
study optical properties of a composite coating. The same was fabricated with
experiments demonstrating >91 % solar reflectivity and >75 % emissivity in the
ATW. This corresponded to the achievement of sub-ambient cooling by 4-9 ∘C
under peak solar irradiation.

More research on this combination of materials to create a composite coating
that exhibits passive cooling can further improve its thermo-optical
performance. For instance, dampening the absorption of PDMS in the NIR region
as well as reducing the reflectivity exhibited in the 8–13 $\mu$m band would
enhance the cooling performance.

A TiO2/PDMS coating can thus help reduce the cooling demand in buildings. It
also finds application as coatings over public transport such as buses,
trains, etc. This metamaterial coating has the potential to considerably
reduce emissions assisting the fight to mitigate the human ecological
footprint.

## References

  * [1] United Nations Environment Programme and International Energy Agency.  Cooling emissions and policy synthesis report: Benefits of cooling efficiency and the kigali amendment.  2020\.
  * [2] UN Environment Programme.  Climate-friendly cooling could cut years of Greenhouse Gas Emissions and save US$ trillions.  pages retrieved December 8, 2020.
  * [3] Norman Nan Shi, Cheng-Chia Tsai, Fernando Camino, Gary D. Bernard, Nanfang Yu, and Rüdiger Wehner.  Keeping cool: Enhanced optical reflection and radiative heat dissipation in Saharan silver ants.  Science, 349(6245):298–301, 2015.
  * [4] Zhen Chen, Linxiao Zhu, Aaswath Raman, and Shanhui Fan.  Radiative cooling to deep sub-freezing temperatures through a 24-h day–night cycle.  Nature Communications, 7:13729, 2016.
  * [5] Jyotirmoy Mandal, Yanke Fu, Adam C. Overvig, Mingxin Jia, Kerui Sun, Norman N. Shi, Hua Zhou, Xiangui Xiao, Nanfang Yu, and Yuan Yang.  Hierarchically porous polymer coatings for highly efficient passive daytime radiative cooling.  Science, 362(6412):315–319, 2018.
  * [6] Zhifeng Huang and Xiulin Ruan.  Nanoparticle embedded double-layer coating for daytime radiative cooling.  International Journal of Heat and Mass Transfer, 104:890–896, 2017\.
  * [7] Aaswath P. Raman, Marc Abou Anoma, Linxiao Zhu, Eden Rephaeli, and Shanhui Fan.  Passive radiative cooling below ambient air temperature under direct sunlight.  Nature, 515:540–544, 2014.
  * [8] Yubo Zhang, Xinyu Tan, Guiguang Qi, Xiongbo Yang, Die Hu, Pheobe Fyffe, and Xiaobo Chen.  Effective radiative cooling with zro2/pdms reflective coating.  Solar Energy Materials and Solar Cells, 229:111129, 2021.
  * [9] Bhrigu Rishi Mishra, Sreerag Sundaram, Nithin Jo Varghese, and Karthik Sasihithlu.  Disordered metamaterial coating for daytime passive radiative cooling.  AIP Advances, 11:105218, 2021.
  * [10] Lihong Wang and Steven Jacques.  Monte Carlo Multi-Layered.  2020\.
  * [11] Xiaoning Zhang, Jun Qiu, Junming Zhao, Xingcan Li, and Linhua Liu.  Complex refractive indices measurements of polymers in visible and near-infrared bands.  Applied Optics, 59:2337–2344, 2020.
  * [12] Xiaoning Zhang, Jun Qiu, Junming Zhao, Xingcan Li, and Linhua Liu.  Complex refractive indices measurements of polymers in infrared bands.  Journal of Quantitative Spectroscopy and Radiative Transfer, 252:107063, 2020.
  * [13] Edward D. Palik.  In Handbook of optical constants of solids, volume 3. Academic press, 1998.
  * [14] Joseph Peoples, Xiangyu Li, Yaobing Lv, Jun Qiu, Zhifeng Huang, and Xiulin Ruan.  A strategy of hierarchical particle sizes in nanoparticle composite for enhancing solar reflection.  International Journal of Heat and Mass Transfer, 131:487–494, 2019\.
  * [15] M.T.S. Tavares, A.S.F. Santos, I.M.G. Santos, M.R.S. Silva, M.R.D. Bomio, E. Longo, C.A. Paskocimas, and F.V. Motta.  TiO2/PDMS nanocomposites for use on self-cleaning surfaces.  Surface and Coatings Technology, 239:16–19, 2014.

##  Appendix A SEM images: Titania powder

Three powder samples were imaged under SEM and the images, shown in fig. 5,
were analysed to determine the particle sizes. The particles are observed to
follow a distribution of sizes and are not uniform. Assuming a normal
distribution of sizes, we estimate that the mean particle radius lies about
125 nm with a standard deviation of 15 nm.

(a)

(b)

(c)

(d)

Figure 5: SEM images of TiO2 powder particles with size measurements.

###  A.1 Parameter input to model

Mie theory only accounts for a single-sized particle distribution. In another
work from our research group, codes have been modified to introduce a (normal)
distribution of particle sizes to calculate the input parameters to the MC
method. Results for both types of distribution were fed into the Monte Carlo
simulation to give the solar reflectance as shown in fig. 6. The lack of a
substantial change of reflectance is thought to be caused by, (a) an increased
average size of a scatterer due to agglomeration of individual powder
particles, and (b) the particle sizes are insignificant compared to the
wavelength of interaction. It is expected that a deviation would be more
prominent when individual particle sizes approach dimensions of the wavelength
of light (radii about 600 nm). We thus assume a uniform size distribution of
the procured TiO2 powder with an average particle size of 250 nm for all
further simulations and analyses.

Figure 6: Simulation results for single-sized and normal distribution of
particles

##  Appendix B Coating characteristics: Solar reflectance and IR emissivity

Dips (or peaks) are observed in the experimentally obtained reflectance
spectrum but absent in simulation results. This is a consequence of absorption
by the matrix (PDMS), illustrated in fig. 7(a), which is not accounted for by
Mie theory and hence is not reflected in the simulations.

(a)

(b)

Figure 7: (a) Reduction in reflectance due to absorption by the PDMS matrix
(b) Reduced absorbance due to higher extinction coefficient of PDMS

As discussed in appendix A the type of particle size distribution does not
cause considerable change in reflectance properties. So we assume a single-
sized distribution with particle radius of 125 nm. TiO2 used during coating
synthesis amounts to a volume fraction of 10 % while the thickness of the
coating was confirmed to be 270$~{}\mu$m by experiment – employing the stylus
profiler.

The absorbance of the fabricated coating, measured using FTIR spectroscopy,
shows valley-like features for some wavelengths. On mapping the extinction
coefficient (k) of the coating matrix (fig. 7(b)), obtained from the
refractive index data, it is observed that the valleys in absorbance
correspond to the peaks in the k-values. This explains the increased
reflectance (hence, reduced absorbance) at those wavelengths.

##  Appendix C Cooling performance test

Three aluminium boxes (cubes of edge 6 cm) are placed on a sheet of mica
which, in turn, is placed over rectangular boards of polystyrene (as shown in
fig. 8), limiting the parasitic heat losses. Temperature is measured in
regular intervals using calibrated thermocouples. The thermocouples are
inserted into the boxes via a hole on the top face and glued to ensure no
contact with any face of the box. These tests were conducted on a flat root of
a seven-storey building in Mumbai, in November and December 2021.

Figure 8: Experimental Setup to measure cooling performance of coatings

This experiment was repeated on different days, for varying duration of
120–210 minutes. The reduction in temperature from ambient observed on the
respective days are illustrated in figs. 9(a), 9(b) and 9(c). The fabricated
TiO2/PDMS coating was observed to cool the coated Al enclosure by 5–9∘C below
the ambient temperature, under direct solar irradiation.

(a)

(b)

(c)

(d)

Figure 9: (a–c) Quantification of sub-ambient cooling demonstrated on
different days of the year (d) $\Delta$T with respect to non-coated Aluminium
box


# Can LLMs "Reason" in Music? An Evaluation of LLMs’ Capability of Music
Understanding and Generation

###### Abstract

Symbolic Music, akin to language, can be encoded in discrete symbols. Recent
research has extended the application of large language models (LLMs) such as
GPT-4 and Llama2 to the symbolic music domain including understanding and
generation. Yet scant research explores the details of how these LLMs perform
on advanced music understanding and conditioned generation, especially from
the multi-step reasoning perspective, which is a critical aspect in the
conditioned, editable, and interactive human-computer co-creation process.
This study conducts a thorough investigation of LLMs’ capability and
limitations in symbolic music processing. We identify that current LLMs
exhibit poor performance in song-level multi-step music reasoning, and
typically fail to leverage learned music knowledge when addressing complex
musical tasks. An analysis of LLMs’ responses highlights distinctly their pros
and cons. Our findings suggest achieving advanced musical capability is not
intrinsically obtained by LLMs, and future research should focus more on
bridging the gap between music knowledge and reasoning, to improve the co-
creation experience for musicians.

##  1 Introduction

Large language models (LLMs), such as GPT-4, harness the power of deep
learning to produce human-like text. These models, trained on vast datasets of
textual content, have notably propelled advancements in natural language
processing (NLP). They excel in complex language understanding and generation
tasks including translation, sentiment analysis, question answering, and
summarization, showcasing their reasoning capability with sophistication.

Large language models (LLMs), initially pre-trained on extensive textual
corpora, can assimilate general linguistic patterns and structures. They are
subsequently fine-tuned with domain-specific data, such as code and
mathematical symbols, to enhance the adaptation to specific tasks. This
refinement allows LLMs’ proficiency to more accurately manage domain-specific
terminology and complicated challenges like multi-step reasoning. Music
Reasoning refers to the ability to estimate the varying harmonies, keys,
rhythms, and other musical elements that are not explicitly annotated in a
piece of music and are significant for music themes, progression, and styles
[1]. The analogy between the reasoning process in music and mathematics
suggests their structural similarities. Both disciplines fundamentally rely on
patterns: music in rhythms, scales, and chord progressions, while mathematics
involves sequences, symmetries, and geometric configuration. Moreover, music
theory utilizes mathematical concepts to articulate intervals between pitches,
chord structures, and the rhythmic temporal division [2, 3], underscoring the
intrinsic reasoning nature of the musical components.

Music can be represented as sequences of symbols such as MIDI or ABC notation,
rendering it suitable for processing by LLMs, which excel in long-context
understanding and multi-step reasoning. These models are capable to dissect
and generate intricate musical patterns encompassing melodic, harmonic, and
rhythmic structures. LLMs also play a pivotal role in enhancing interactive
music generation systems, where user inputs tailor the model’s output,
enriching the composing experience. While previous studies [1, 4, 5] have
investigated LLMs in music tasks, detailed interpretations of the process
remains less explored. This paper conduct an evaluation of four LLMs, GPT-4
[6], Gemma-7B-it [7], Llama2-7B-chat [8], and Qwen-7B-chat [9], assessing
their capabilities on tasks related to symbolic music understanding and
generation:

  * •

Music Understanding: 1) Music theory exercise; 2) Motif extraction; 3) Musical
form extraction.

  * •

Music Generation: 1) Chord-conditioned music generation; 2) Melody
harmonization; 3) Musical-form-and-motif-conditioned music generation

The task of "Musical Form & Motif Conditioned Music Generation" as described
in Chatmusician [1] involves generating music that adheres to detailed
prescribed conditions like form and motif. Figure 1 illustrates this process:
The prompt’s green text specifies conditional constraints including the
musical form, motif, and some musical elements (key, time signature, etc.).
Under the prompt, the left sheet presents the human composer’s work. The right
sheets show ABC notations from different models alongside the reference. The
Gemma-7B-it model merely replicates the provided motif, adding no new
elements. Similarly, GPT-4 simply repeats the given condition. Qwen-7B-chat
and Llama-7B-chat include correct musical elements and the motif but fail to
capture the musical form "AB" and maintain the duration of a measure.

Figure 1: A comparison of different LLMs’ responses with the same instruction
of the musical-form-and-motif-conditioned task as the input. The ABC notation
contained in the response is extracted and displayed as scores the quality of
all responses is marked with diverse symbols.

The main contributions of our paper are as follows: (1) we provide multi-step
prompt engineering and explore how LLMs exhibit their reasoning capabilities
with multi-step instructions in music understanding and generation tasks. (2)
we assess four major LLMs on various symbolic music tasks, analyzing their
reasoning in ABC sequences through quantitative statistical results and
qualitative human assessment, including error analysis. The examples, hand-
crafted prompts, and codes of data preprocessing are available at github.

##  2 Related Work

In this section, we summarize related works from two perspectives. First, we
introduce previous studies on LLMs in the symbolic music domain, explaining
their performance and evaluation methods in music understanding and generation
tasks. Then, we discuss the application of LLMs in reasoning math problems and
controllable creative text generation, highlighting similarities between the
reasoning processes in music and math and the conditioned, open-ended nature
of both music and text generation.

###  2.1 LLMs in Symbolic Music Domain

This subsection reviews the application of LLMs in the symbolic music domain.
Previous studies have focused on adapting LLMs for music understanding and
generation. Chatmusician [1] uses continual pre-training and fine-tuning on
LLaMA2 to understand and generate ABC notation music, without specialized
music structures or tokenizers. SongComposer [4] collects a song pretraining
dataset including lyrics, melodies and paired lyrics-melodies, employing 10K
crafted QA pairs to enable LLMs to perform multiple music-related tasks such
as lyric-to-melody conversion and song continuation. MusicAgent [10]
integrates various music tools into a single system, though it lacks
interaction among these tools. Most approaches view music creation as a linear
process, which diverges from the multi-step approach humans use, limiting
their applicability for generating creative works. To mimic human creative
processes, ByteComposer [5] employs a four-step method to replicate the
creative workflow of human composers: conception analysis, draft Composition,
self-evaluation and modification, and human aesthetic selection. And designs
an interactive agent system consisting of expert, generator, voter, and memory
modules. What’s more, they construct supervised fine-tuning data covering
tasks of basic music theory conception, control code generation, music score
evaluation and next-step planning. Despite being a significant step towards
multi-step music creation with LLMs, it lacks a detailed discussion on the
limits of LLMs at each stage.

###  2.2 Reasoning and Controllable Generation with LLMs

"Reasoning" in NLP involves integrating various knowledge sources or contexts
to generate new assertions, events, or actions [11]. This process often breaks
complex questions into sequential steps [12]. Techniques such as Chain-of-
Thoughts (CoT) [13, 14] have shown effectiveness in addressing complex
reasoning tasks, particularly in mathematics. The Program-of-Thoughts approach
improves upon CoT by using language models to generate text and code,
enhancing math problem-solving performance [15]. Plan-and-Solve (PS)
Prompting, a zero-shot technique, outperforms zero-shot CoT significantly,
exceeds Zero-shot Program-of-Thoughts, and matches 8-shot CoT in math
reasoning [16].

While music and mathematics share similarities, it is crucial to recognize
that music is not as deterministic. In controllable music generation, despite
given chords, motifs, and forms, unpredictable elements still significantly
affect the quality of the music, similar to controllable text generation.
Zhang et al.[17], identify three types of control conditions: semantic,
structural, and lexical. Semantic controls refer to content control such as
sentiment [18, 19] or topic [20, 21], resembling style and emotion in music.
Structural control involves shaping the structure of the generated text, such
as setting a story’s framework or using data from tables or graphs as input,
similar to specifying musical forms for generation [22, 23]. Lexical controls
manage vocabulary usage, ensuring specific keywords appear, akin to using
musical chords and motifs as guidelines. LLMs are extensively applied in
diverse controllable and creative generation tasks [24, 25, 26]. These
systems’ abilities in long-context and multi-step generation under predefined
conditions are examined, though such analyses are rarely applied in the music
domain.

##  3 Methodology

###  3.1 Datasets

In this paper, we incorporate six tasks covering from music understanding to
generation. The data is collected from MusicPile and MusicBench in
ChatMusician [1]. The statistics of the dataset we use are shown in Table 1.
Each model can support the maximum length of tokens of each task.

Tasks | Numbers | Max/Avg. tokens
---|---|---
Music theory exercise | 367 | 733/103.56
Motif extraction (ME) | 2470 | 1165/194.28
Musical form extraction (MFE) | 483 | 650/187.35
Chord-conditioned generation (CCG) | 1721 | 283/94.83
Melody harmonization (MH) | 355 | 551/166.03
Musical-form-and-motif-conditioned generation (MFMC) | 4881 | 285/53.82
Table 1: Statistics of each task. The number of items and the max and average
length of tokens are provided.

###  3.2 Prompt Engineering

Before examining each LLM’s task performance, we conducted preliminary tests
to verify their understanding of the relevant musical concepts. These tests
confirmed that all models possess foundational knowledge of the six music
tasks assessed in this study.

We employed two prompt modes in our experiments of all tasks, Default and
Chain-of-Thoughts (CoT). Default mode means forcing the model to respond
without any analysis. Additionally, for music theory exercises, to make the
model better understand the questions and options, and return the answer in a
unified format, we also include the In-Context-Learning (ICL) mode by adding
some question-answer pairs as examples shown to the models in the prompt.
Taking the task of music theory exercises understanding as an example, three
modes of prompts as the prefix of inputs followed by each item in the datasets
are shown in Figure 2. Different from the music theory exercise, we
specifically design prompts to support a multi-round chat conversation with
LLMs for the generation tasks. Figure 3 shows an example of a four-round
prompt set of chord-conditioned generation. We invite graduates who majored in
music composition to write down their multi-step thoughts when completing the
generation tasks involved in this paper. We summarize the common steps of all
answers, adapt them to the prompt set, and make sure LLMs can understand or at
least intend to follow the instructions. An example of GPT-4’s response to the
instruction in Figure 3 is shown on the
website111https://github.com/SylviaZiyaZhou/LLMs_music_reasoning/blob/main/
CoT_music_generation_GPT4_response.pdf.

Figure 2: A prompt example of the music theory exercise in different modes.
Figure 3: A prompt example of the chord-conditioned generation in different
modes.

###  3.3 Pre-processing Responses

The responses of models are supposed to have correct ABC notations, but it may
have certain syntax or formatting issues, and some outputs may even contain a
large amount of natural language. We select the main features of ABC notation
including field names and bar line symbols to help us extract the ABC
sequence. If the extracted ABC sequence can be rendered into MIDI files using
Music21222https://web.mit.edu/music21 successfully and can be later rendering
into audio file using midi2audio333https://pypi.org/project/midi2audio, we
consider it capable of producing valid ABC notation.

###  3.4 Multi-step Reasoning Analysis

In order to compare each model’s reasoning capability on both understanding
and generation tasks, we first conduct a subjective assessment to evaluate how
different models’ reasoning processes influence their performances.
Participants are all familiar with basic music theory and can understand each
task as well as the ABC notation. Secondly, based on the results of the
subjective assessment, we further perform an error analysis in detail to show
the intermediate answers during the reasoning process of each model.

####  3.4.1 Human Assessment Pipeline

In this section, we will provide a detailed description of our subjective
experiments on four popular and open-source LLMs, including Gemma-7B-it,
Llama2-7B-Chat, GPT-4, and Qwen-7B-chat. We ask the participants to evaluate
to what extent the model understands the instructions and correctly answer the
questions in the understanding tasks, and to what extent the responses contain
the conditions and make creative works in the generation tasks. Specifically,
the questions in the human assessment are as follows:

  * •

For both understanding and generation tasks: 1) To what extent does the model
understand and follow the instructions?

  * •

Specifically for the understanding tasks: 1) To what extent does the model
correctly answer the question? 2) To what extent does the model reason like
human beings?

  * •

Specifically for the generation tasks: 1) AB test: please choose the better
one between a pair of music excerpts by considering their "Musicality"; 2) To
what extent does the model contain the conditions?

Except for the AB test in the generation task, each question should be rated
in a scoring range from 0 to 10 points. We invited music experts who are
familiar with ABC notations as the participants in the human assessment,
ensuring that each item was evaluated by at least two experts.

##  4 Evaluation Results

In this section, we provide the evaluation results based on the methodology we
discussed in the last section. The quantitative results include the correctly
parsing rate of ABC notation in the generation tasks, and the accuracy of
music theory exercises. The qualitative results include the statistical
analysis of human assessment and the detailed error analysis. Due to space
limitation, we provide the examples at github and the online links of the
corresponding files will be attached in the illustration.

###  4.1 Quantitative Results

Figure 4 shows the success rate of rendering valid audio from each LLM’s
responses under different generation tasks. The pre-processing methodology is
introduced in Section 3.3. Except for GPT-4, the other three models all have
an audio generation rate of less than 50%, finding it difficult to generate
the correct ABC notation format to be converted into audio.

Table 2 displays the accuracy of the music theory exercises in three modes.
The reason why some models have an accuracy rate below 25% in multiple-choice
questions with four options is that most of their responses seek additional
information about the questions rather than answering them. Gemma-7B-it has a
comparable performance with GPT-4 in the Reason. subset in the Default mode
even with a much smaller model size. However, CoT and ICL modes, which
significantly improve the GPT-4’s performance, show very limited effect or
even deficiency in other models. This may inspire us to reconsider the
utilization of classical CoT and ICL approaches in solving music tasks.

---
Figure 4: The success rate of rendering audio from each LLM’s responses in the music generation tasks. Model (and Mode) |  Know. (%) |  Reas. (%)
---|---|---
GPT-4 (Default) | 58.2 | 25.6
GPT-4 (CoT) | 68.4 | 36.7
GPT-4 (ICL) | 69.9 | 34.9
Llama2-7B-chat (Default) | 11.9 | 10.2
Llama2-7B-chat (CoT) | 29.8 | 16.3
Llama2-7B-chat (ICL) | 10.4 | 15.3
Gemma-7B-it (Default) | 45.7 | 31.6
Gemma-7B-it (CoT) | 36.1 | 17.3
Gemma-7B-it (ICL) | 33.1 | 31.6
Qwen-7B-chat (Default) | 42.0 | 17.4
Qwen-7B-chat (CoT) | 40.2 | 22.4
Qwen-7B-chat (ICL) | 35.7 | 24.5
Table 2: Accuracy of the music theory exercises of each model. All three modes of results are provided. Know. means the music knowledge part and Reas. means the music reasoning part. They are two subsets of which the former tests the models’ memory of basic music concepts and the latter needs further reasoning and calculation to be completed. GPT-4’s results come from [1]. Type | Model | Inst. Fl. | Correct. | Reason.
---|---|---|---|---
$\mu$ | $\sigma$ | $\mu$ | $\sigma$ | $\mu$ | $\sigma$
ME | GPT-4 | 10.0 | 0.0 | 6.5 | 2.6 | 7.8 | 1.3
Gemma | 8.2 | 2.1 | 5.1 | 2.8 | 7.4 | 3.2
Llama2 | 7.8 | 1.9 | 4.7 | 2.8 | 4.7 | 2.4
Qwen | 7.6 | 0.7 | 3.8 | 1.5 | 2.1 | 1.3
MFE | GPT-4 | 10.0 | 0.0 | 5.0 | 2.5 | 5.6 | 2.0
Gemma | 3.5 | 3.6 | 2.1 | 2.2 | 2.9 | 2.1
Llama2 | 5.4 | 1.8 | 3.2 | 2.8 | 4.3 | 2.3
Qwen | 2.6 | 1.5 | 2.3 | 1.9 | 3.3 | 2.0
Table 3: The human assessment results of different LLMs on the understanding task. Inst. Fl., Correct. and Reason. respectively indicate to what extent the model follows the instructions, correctly answers the questions, and reasons like humans. $\mu$ and $\sigma$ respectively denote the average scores and the standard variance. Type | Model | Inst. Fl. | Condi.
---|---|---|---
$\mu$ | $\sigma$ | $\mu$ | $\sigma$
MFMC | GPT-4 | 5.7 | 1.4 | 6.3 | 1.5
Gemma | 4.0 | 1.8 | 4.6 | 2.2
Llama2 | 4.3 | 1.6 | 4.3 | 2.3
Qwen | 4.9 | 2.1 | 2.9 | 2.2
MH | GPT-4 | 6.5 | 3.5 | 5.5 | 2.5
Gemma | 3.0 | 1.0 | 4.5 | 2.5
CCG | GPT-4 | 5.2 | 3.3 | 5.8 | 3.8
Gemma | 1.6 | 1.0 | 1.3 | 0.8
Table 4: The human assessment results of different LLMs on the generation
task. Condi. indicates to what extent the model contains the condition given
in the instructions and ABC format.

###  4.2 Qualitative Results

For human assessment, Table 3 shows LLMs on ME and MFE tasks under the CoT
mode. We randomly sampled 40 examples of each task. In the instruction
following question, GPT-4 demonstrates very good results, while other LLMs
more or less can accomplish the tasks, indicating a certain level of
capability. However, when it comes to the correctness, even GPT-4 finds it
challenging to provide satisfactory answers to the prompts. When testing the
logical reasoning of LLMs, the average scores indicate that all LLMs encounter
difficulties in applying logical reasoning when answering questions step by
step, leading to fundamental errors in music theory or illogical conclusions.
This highlights the LLMs’ limitation of involving music background knowledge.

Table 4 presents the results of human assessment we conducted on generative
tasks. In addition to the results shown in the table, we also conducted an AB
test based on Musicality. We find that the GPT-4 and Gemma-7B-it achieve
comparable results in MFMCG task, while in other tasks GPT-4 always wins. This
means Gemma-7B-it has a potential in creating high-quality symbolic music with
limited model size.

As depicted in Figure 4, on MH and CCG tasks, Qwen-7B-chat and Llama2-7B-chat
struggled to effectively output correct ABC sequences to be rendered into
audios. Therefore, for MH and CCG tasks, we only include the AB test results
for GPT-4 and Gemma-7B-it. Despite GPT-4 achieving relatively better scores in
generative tasks, it still falls far away from humans’ expectations.
Interestingly, beyond the data, LLMs’ generative results occasionally exhibit
instances of copying motifs provided in the prompt, as well as displaying
unstructured harmonic repetitions or completely off-key notes. We believe that
although LLMs can adhere to the ABC format condition provided in the prompt,
their lack of musical information and knowledge makes it challenging to
understand the high-level information within the condition, resulting in less
satisfactory generated outcomes.

In terms of the results from subjective experiments, we identified a common
issue prevalent in LLMs. Firstly, LLMs, apart from GPT-4, struggle to generate
data in the correct ABC format with high probability, despite being able to
provide a perfect answer when asked what ABC notation is. This phenomenon led
us to speculate that while LLMs are trained extensively and comprehensively,
LLMs can hardly understand all the information they have been exposed to and
utilize them in different scenarios. Besides, LLMs can generate music in a
seemingly appropriate ABC format in generative tasks, but what appears to be a
correctly-formatted response is merely copying the prompt without grasping the
semantic and structural information in the given condition.

####  4.2.1 Multi-step Reasoning Analysis

To better illustrate each model’s reasoning capability when it is used to
complete the music theory exercises, we provide an example of a question in
the music theory exercises subset and step-by-step responses of the four
models444https://github.com/SylviaZiyaZhou/LLMs_music_reasoning/blob/
main/CoT_music_theory_exercise_all_LLMs.pdf. The question is about recognizing
the interval property of an ABC sequence referring to a compound in a music
sheet. From the responses, we can see that GPT-4 is the only model which can
actually perform the calculation but still unable to understand the musical
notes in the ABC notation. In the GPT-4’s responses in the CoT mode, "4",
which is mistaken as "a fourth apart", should be a note duration. Accordingly,
this mistake influences the whole reasoning process of the calculation of
intervals. The response of Llama2-7B-chat also shows its incapability of
involving correct music knowledge understanding of notes intervals in the
reasoning process. What’s more, Qwen-7B-chat even accidentally contains
Chinese in the English text and Gemma-7B-it failed to recognize musical notes
in the ABC sequence (see in the supplementary materials), although they can
return the correct answer if they are merely asked about "the definition of
note intervals".

Besides, the responses of generation tasks such as MFMC generation also have
similar problems. In the CoT mode, we find all LLMs except GPT-4, are hard to
follow the multi-step instructions and output music in a correct ABC format,
so we only provide a GPT-4 response respectively in the raw
text555https://github.com/SylviaZiyaZhou/LLMs_music_reasoning/blob
/main/CoT_music_generation_GPT4_response.pdf and music
sheet666https://github.com/SylviaZiyaZhou/LLMs_music_reasoning/blob
/main/Music_Sheet_of_music_generation_GPT4_response.pdf form given the prompt
in Figure 3. Although GPT-4 can well understand the instructions in every
step, it generates repetitive and simple rhythm without enough progression and
variation, compared to the human composer’s work in Figure 5.

Figure 5: Human composer’s work for the chord-conditioned generation task.

##  5 Conclusion and Discussion

In conclusion, our experimental analysis highlights current LLMs’ limitations
in the realm of music understanding and generation, particularly from the
perspective of song-level multi-step reasoning. These findings are crucial as
they underline the challenges LLMs face when tasked with generating coherent
and contextually rich musical compositions, which often require both complex
sequential processing and creative fineness. From the human assessment results
and the error analysis, we find that all these models failed to inject correct
music theory and knowledge in the music understanding, reasoning and
generation process. This knowledge generalization gap is analogous to the
reversal curse problem illustrated in [27] where LLMs trained on “A is B” fail
to learn “B is A”. Without making sure the fundamental concepts are correctly
mentioned in the generated responses, it is hard to alleviate the LLMs’
hallucination and guarantee the responses’ quality. Therefore, it is
significant to implement the knowledge augmentation module in the Supervised
Fine-Tuning (SFT) stage to ensure the LLMs can reason based on correct music
knowledge by curating more SFT data with enough knowledge-based contexts and
practical reasoning processes.

Specifically, several insights for the multi-step SFT dataset construction can
be concluded from the process where professional musicians are asked to create
music following the instructions. Firstly, more expert knowledge should be
involved in the dataset construction to guarantee its quality. For example, in
the chord-conditioned generation task in Chatmusician’s dataset, the bass note
sequence of the given chords does not conform to the musicians’ expectation of
the progression generally. Secondly, some conditions in the old one-step form
are too lengthy and informative with limitations that the human composers feel
difficult to follow. For example, when they are given an "AB" structure with
two different motives in the MFMC task, all of them find hard to integrate two
segments with different motives into a complete piece of music in an "AB"
form. Therefore, it might not be reasonable to ask the LLMs to output a
completely and well composed music in a one-step approach.

What’s more, although four models are all claimed to be able to handle the
input size from 4K to 8K tokens, which is much longer than the instructions in
the dataset we used, they do not show their long-context processing advantages
in the symbolic music domain. Our experimental results show that the widely-
used CoT and ICL approaches are not always effective in improving the model’s
performance. In this way, more step-by-step learning strategies should be
specifically developed for instruction-based symbolic music tasks by focusing
on correctly answering music theory exercises, explicitly extracting motifs
and implicitly extracting musical forms, and consistently following the
conditions in the instructions.

##  6 Acknowledgement

The research was supported by Early Career Scheme (ECS-HKUST22201322), Theme-
based Research Scheme (T45-205/21-N) from Hong Kong RGC, NSFC (No. 62206234),
and Generative AI Research and Development Centre from InnoHK. Yinghao Ma is a
research student at the UKRI Centre for Doctoral Training in Artificial
Intelligence and Music, supported by UK Research and Innovation [grant number
EP/S022694/1].

We would like to express our sincere gratitude to Jia Ding and Xiaoduan Li,
professional musicians who majored in music composition at Central
Conservatory of Music, for their valuable contributions and suggestions
throughout the multi-step prompt engineering in conditioned generation tasks.

## References

  * [1] R. Yuan, H. Lin, Y. Wang, Z. Tian, S. Wu, T. Shen, G. Zhang, Y. Wu, C. Liu, Z. Zhou, Z. Ma, L. Xue, Z. Wang, Q. Liu, T. Zheng, Y. Li, Y. Ma, Y. Liang, X. Chi, R. Liu, Z. Wang, P. Li, J. Wu, C. Lin, Q. Liu, T. Jiang, W. Huang, W. Chen, E. Benetos, J. Fu, G. Xia, R. Dannenberg, W. Xue, S. Kang, and Y. Guo, “ChatMusician: Understanding and Generating Music Intrinsically with LLM,” Feb. 2024, arXiv:2402.16153 [cs, eess]. [Online]. Available: http://arxiv.org/abs/2402.16153
  * [2] T. H. Garland and C. V. Kahn, _Math and Music: Harmonious Connections._ ERIC, 1995.
  * [3] D. Wright, _Mathematics and music_. American Mathematical Soc., 2009, vol. 28.
  * [4] S. Ding, Z. Liu, X. Dong, P. Zhang, R. Qian, C. He, D. Lin, and J. Wang, “Songcomposer: A large language model for lyric and melody composition in song generation,” _arXiv preprint arXiv:2402.17645_ , 2024.
  * [5] X. Liang, X. Du, J. Lin, P. Zou, Y. Wan, and B. Zhu, “ByteComposer: a Human-like Melody Composition Method based on Language Model Agent,” Mar. 2024, arXiv:2402.17785 [cs, eess]. [Online]. Available: http://arxiv.org/abs/2402.17785
  * [6] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat _et al._ , “Gpt-4 technical report,” _arXiv preprint arXiv:2303.08774_ , 2023.
  * [7] G. Team, T. Mesnard, C. Hardin, R. Dadashi, S. Bhupatiraju, S. Pathak, L. Sifre, M. Rivière, M. S. Kale, J. Love _et al._ , “Gemma: Open models based on gemini research and technology,” _arXiv preprint arXiv:2403.08295_ , 2024.
  * [8] H. Touvron, L. Martin, K. Stone, P. Albert, A. Almahairi, Y. Babaei, N. Bashlykov, S. Batra, P. Bhargava, S. Bhosale _et al._ , “Llama 2: Open foundation and fine-tuned chat models,” _arXiv preprint arXiv:2307.09288_ , 2023.
  * [9] J. Bai, S. Bai, Y. Chu, Z. Cui, K. Dang, X. Deng, Y. Fan, W. Ge, Y. Han, F. Huang _et al._ , “Qwen technical report,” _arXiv preprint arXiv:2309.16609_ , 2023.
  * [10] D. Yu, K. Song, P. Lu, T. He, X. Tan, W. Ye, S. Zhang, and J. Bian, “Musicagent: An ai agent for music understanding and generation with large language models,” _arXiv preprint arXiv:2310.11954_ , 2023.
  * [11] F. Yu, H. Zhang, and B. Wang, “Nature language reasoning, a survey,” _arXiv preprint arXiv:2303.14725_ , 2023.
  * [12] S. Hao, Y. Gu, H. Ma, J. J. Hong, Z. Wang, D. Z. Wang, and Z. Hu, “Reasoning with language model is planning with world model,” _arXiv preprint arXiv:2305.14992_ , 2023.
  * [13] J. Wei, X. Wang, D. Schuurmans, M. Bosma, F. Xia, E. Chi, Q. V. Le, D. Zhou _et al._ , “Chain-of-thought prompting elicits reasoning in large language models,” _Advances in neural information processing systems_ , vol. 35, pp. 24 824–24 837, 2022.
  * [14] T. Kojima, S. S. Gu, M. Reid, Y. Matsuo, and Y. Iwasawa, “Large language models are zero-shot reasoners,” _Advances in neural information processing systems_ , vol. 35, pp. 22 199–22 213, 2022.
  * [15] W. Chen, X. Ma, X. Wang, and W. W. Cohen, “Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks,” _arXiv preprint arXiv:2211.12588_ , 2022.
  * [16] L. Wang, W. Xu, Y. Lan, Z. Hu, Y. Lan, R. K.-W. Lee, and E.-P. Lim, “Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models,” _arXiv preprint arXiv:2305.04091_ , 2023.
  * [17] H. Zhang, H. Song, S. Li, M. Zhou, and D. Song, “A survey of controllable text generation using transformer-based pre-trained language models,” _ACM Computing Surveys_ , vol. 56, no. 3, pp. 1–37, 2023.
  * [18] H. Chen, X. Yi, M. Sun, W. Li, C. Yang, and Z. Guo, “Sentiment-controllable chinese poetry generation.” in _IJCAI_ , 2019, pp. 4925–4931.
  * [19] S. Dathathri, A. Madotto, J. Lan, J. Hung, E. Frank, P. Molino, J. Yosinski, and R. Liu, “Plug and play language models: A simple approach to controlled text generation,” _arXiv preprint arXiv:1912.02164_ , 2019.
  * [20] M. Khalifa, H. Elsahar, and M. Dymetman, “A distributional approach to controlled text generation,” _arXiv preprint arXiv:2012.11635_ , 2020.
  * [21] H. Tang, M. Li, and B. Jin, “A topic augmented text generation model: Joint learning of semantics and structural features,” in _Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP)_ , 2019, pp. 5090–5099.
  * [22] R. Puduppully, L. Dong, and M. Lapata, “Data-to-text generation with content selection and planning,” in _Proceedings of the AAAI conference on artificial intelligence_ , vol. 33, no. 01, 2019, pp. 6908–6915.
  * [23] L. F. Ribeiro, M. Schmitt, H. Schütze, and I. Gurevych, “Investigating pretrained language models for graph-to-text generation,” _arXiv preprint arXiv:2007.08426_ , 2020.
  * [24] N. Simon and C. Muise, “Tattletale: storytelling with planning and large language models,” in _ICAPS Workshop on Scheduling and Planning Applications_ , 2022.
  * [25] K. Xie and M. Riedl, “Creating suspenseful stories: Iterative planning with large language models,” _arXiv preprint arXiv:2402.17119_ , 2024.
  * [26] Z. Zhang, M. Rayhan, T. Herda, M. Goisauf, and P. Abrahamsson, “Llm-based agents for automating the enhancement of user story quality: An early report,” _arXiv preprint arXiv:2403.09442_ , 2024.
  * [27] L. Berglund, M. Tong, M. Kaufmann, M. Balesni, A. C. Stickland, T. Korbak, and O. Evans, “The reversal curse: Llms trained on "a is b" fail to learn "b is a",” 2024.