An Optimal Multi-layer Reinsurance Policy under Conditional Tail Expectation
Amir T. Payandeh Najafabadi 111Corresponding author<EMAIL_ADDRESS>Phone no. +98-21-29903011; Fax no. +98-21-22431649 & Ali Panahi Bazaz
Department of Mathematical Sciences, Shahid Beheshti University, G.C. Evin,
1983963113, Tehran, Iran.

Abstract

A usual reinsurance policy for insurance companies admits one or two layers of
the payment deductions. Under optimal criterion of minimizing the conditional
tail expectation (CTE) risk measure of the insurer’s total risk, this article
generalized an optimal stop-loss reinsurance policy to an optimal multi-layer
reinsurance policy. To achieve such optimal multi-layer reinsurance policy,
this article starts from a given optimal stop-loss reinsurance policy
$f(\cdot).$ In the first step, it cuts down an interval $[0,\infty)$ into two
intervals $[0,M_{1})$ and $[M_{1},\infty).$ By shifting the origin of
Cartesian coordinate system to $(M_{1},f(M_{1})),$ and showing that under the
$CTE$ criteria
$f(x)I_{[0,M_{1})}(x)+(f(M_{1})+f(x-M_{1}))I_{[M_{1},\infty)}(x)$ is, again,
an optimal policy. This extension procedure can be repeated to obtain an
optimal k-layer reinsurance policy. Finally, unknown parameters of the optimal
multi-layer reinsurance policy are estimated using some additional appropriate
criteria. Three simulation-based studies have been conducted to demonstrate:
(1) The practical applications of our findings and (2) How one may employ
other appropriate criteria to estimate unknown parameters of an optimal multi-
layer contract. The multi-layer reinsurance policy, similar to the original
stop-loss reinsurance policy is optimal, in a same sense. Moreover it has some
other optimal criteria which the original policy does not have. Under optimal
criterion of minimizing general translative and monotone risk measure
$\rho(\cdot)$ of either the insurer’s total risk or both the insurer’s and the
reinsurer’s total risks, this article (in its discussion) also extends a given
optimal reinsurance contract $f(\cdot)$ to a multi-layer and continuous
reinsurance policy.
_Keywords:_ Reinsurance policy; Stop-loss reinsurance; Translative and
monotone risk measures; Optimization; Conditional tail expectation (CTE);
Bayesian method.
AMS 2010 subject classifications: 97M30, 97K80, 62F15

##  1 Introduction

Designing an optimal reinsurance policy, in some sense, is one of the most
attractive aspects in actuarial science. Reinsurance is a form of an insurance
contract, that reinsurer accepts to pay a portion of an insurer’s risk by
receiving a reinsurance premium. Therefore, both reinsurance and insurance
companies try to design an optimal reinsurance policy to improve their ability
to managing their risks under a certain criteria, e.g., increasing their
surplus/wealth of company, decreasing the ruin probability, etc.

Several authors considered the problem of designing an optimal reinsurance
policy under a certain optimal criteria. Surprisingly, in the most of studies
the stop-loss reinsurance policy (or some its modification) established as an
optimal policy. For instance, Borch (1960) proved that, under the variance
retained risk optimal criteria and in the class of reinsurance policies with
an equal reinsurance premium, the stop-loss reinsurance minimizes such
variance. Under Borch (1960)’s class of reinsurance policies , Hesselager
(1990) showed that the stop-loss reinsurance is an optimal policy which
provides the smallest Lundberg’s upper bound for the ruin probability.
Optimality of the one-layer stop-loss contract under minimizes the ruin
probability criteria and several premium principles has been established by
Kaluszka (2005). Passalacqua (2007) studied impacts of multi-layer stop-loss
reinsurance contract on the valuation of risk capital (assessed under the
Solvency II framework) for credit insurance. Cai et al. (2008) showed that the
one-layer stop-loss contract is optimal whenever either both the ceded and the
retained loss functions are increasing or the retained loss function is
increasing and left-continuous. Kaluszka & Okolewski (2008) established the
one-layer stop-loss contract is an optimal contract under the maximization of
the expected utility, the stability and the survival probability of the
cedent. Tan et al. (2011) and Chi & Tan (2011) showed that under the
expectation premium principle assumption and the Conditional tail expectation
(CTE) minimization criteria the stop-loss reinsurance contract is optimal.
Porth et al. (2013) employed an empirical reinsurance model (introduced by
Weng, 2009) to show that, under the standard deviation premium principle and
consistency with market practice, a one-layer stop-loss reinsurance contract
is optimal. In a situation that both the ceded and the retained loss functions
are constrained to be increasing and under the variance premium principle
assumption, Chi (2012) showed that one-layer stop-loss reinsurance is always
optimal over both the Value-at-Risk (VaR) and the Conditional Value-at-Risk
(CVaR) criteria. Ouyang & Li (2010) constructed a multi-layer reinsurance
policy to achieve sustainable development of an agricultural insurance policy
in the sense of adverse selection and mortal hazard problems. In 2012, Dedu
generalized the stop-loss reinsurance to a multi-layer reinsurance policy. In
the first step, she considered a certain class of multi-layer reinsurance
policies with some unknown parameters. An optimal reinsurance policy, in such
class, have been obtained by estimating unknown parameters such that the VaR
and the CTE of the insurer’s total risk have been minimized. Chi (2012) showed
that under minimizes the risk-adjusted value of an insurer’s liability and the
VaR (or the CVaR) criteria the two-layer reinsurance contract is optimal under
the Dutch premium principle assumption. Cortes et al. (2013) considered a
multi-layer reinsurance contract consisting of a fixed number of layers. Then,
they determined an optimal multi-layer contract such that for a given expected
return the associated risk value is minimized. Chi & Tan (2013) established
that a one-layer stop-loss contract is always optimal over both the VaR and
the CVaR criteria and the prescribed premium principles. Cai & Weng (2014)
showed under risk margin associated with an expectile risk measure criteria a
two-layer reinsurance contract minimizes the liability of an insurer for a
general class of reinsurance premium principles. Panahi Bazaz & Payandeh
Najafabadi (2015) estimated parameters of a one-layer reinsurance policy such
that a convex combination of the CTE of both the insurer’s and reinsurer’s
random risks are minimized. Optimality of the stop-loss contract under
distortion risk measures and premiums has been established by Assa (2015).
Zhuang et al. (2016) showed that in a situation that the premium budget is not
sufficiently high enough, under the CVaR optimality criteria, the optimal
reinsurance policy will change from the stop-loss contract to a one-layer
stop-loss. Payandeh Najafabadi & Panahi Bazaz (2016) considered a co-
reinsurance contract which is a combination of several reinsurance contracts.
Using a Bayesian approach parameters of co-reinsurance contract have been
estimated.

In order to exclude the moral hazard, an appropriate reinsurance contract has
to assign increasing functions to both insurer and reinsurer portions. On the
other hand, reported claims in insurance industry have the property that
higher claim size is less frequent with more severe probability of loss.
Whereas lower claim sizes are more frequent with less severe probability of
loss. Unfortunately, the stop-loss reinsurance contract despite several well-
known properties does not consider these two important facts.

This article considers minimizing the $CTE$ risk measure of the insurer’s
total risk as an optimal criterion to design an optimal reinsurance contract.
Then, it introduces an algorithm which generalized a given optimal stop-loss
policy to a multi-layer optimal reinsurance policy. To achieve such optimal
multi-layer reinsurance policy, this article starts from a given optimal stop-
loss reinsurance policy $f(\cdot).$ In the first step, it cuts down an
interval $[0,\infty)$ into two intervals $[0,M_{1})$ and $[M_{1},\infty).$ By
shifting the origin of Cartesian coordinate system to $(M_{1},f(M_{1})),$ and
showing that under the $CTE$ criteria
$f(x)I_{[0,M_{1})}(x)+(f(M_{1})+f(x-M_{1}))I_{[M_{1},\infty)}(x)$ is, again,
an optimal policy. This extension procedure can be repeated to obtain an
optimal k-layer reinsurance policy. Finally, unknown parameters of the multi-
layer reinsurance policy are estimated using some additional appropriate
criteria. Practical application of our findings have been shown through a
simulation study. The multi-layer reinsurance policy, similar to the original
stop-loss reinsurance policy is optimal, in a same sense. Moreover, it has
some other optimal criteria which the original policy does not have. Under
optimal criterion of minimizing a general translative and monotone risk
measure $\rho(\cdot)$ of either the insurer’s total risk or both the insurer’s
and the reinsurer’s total risks, this article (in its discussion) also extends
an optimal reinsurance contract $f(\cdot)$ to an optimal multi-layer and
continuous reinsurance policy.

This article is organized as the following. Section 2 collects some elements
that play vital roles in the rest of this article. Moreover, Section 2
represents an algorithm that extends a given optimal stop-loss reinsurance
policy to an optimal multi-layer policy. Section 3 describes three simulation-
based studies illustrating the practical application of our results.
Parameters of the optimal multi-layer contract, for each simulation study,
have been estimated using an additional appropriate criteria. In Discussion
results of this article (from two different senses) extends an optimal
reinsurance contract $f(\cdot),$ under a general translative and monotone risk
measure $\rho(\cdot),$ to an optimal multi-layer and continuous reinsurance
policy.

##  2 Preliminary

Suppose continuous and nonnegative random variable $X$ stands for the
aggregate claim initially assumed by an insurer. In addition, suppose that
random claim $X$ with a cumulative distribution function $F_{X}(t)$ and a
survival function $\bar{F}_{X}(t),$ and a density function $f_{X}$ defines on
the probability space $(\Omega,\mathcal{F},P),$ where $\Omega=[0,\infty)$ and
$\mathcal{F}$ is the Borel $\sigma$-field on $\Omega.$ Now, let $X_{I}$ and
$X_{R},$ (or $X_{R}=h(X)$) respectively, stand for the insurer’s and the
reinsurer’s risk portions from random claim $X,$ such that $X=X_{I}+X_{R}$ and
$0\leq X_{I}~{}\&~{}X_{R}=h(X)\leq X.$ Under this presentation, the total risk
of the insurance company can be restated as

$\displaystyle T_{h}(X)$ $\displaystyle=$ $\displaystyle X_{I}+\pi_{h}^{X}$
(1) $\displaystyle=$ $\displaystyle X-h(X)+\pi_{h}^{X},$

where $h(\cdot)$ is a functional form of a reinsurance contract and
$\pi_{h}^{X}$ stands for a reinsurance premium.

Now, we collect some elements that play vital roles in the rest of this
article.

######  Definition 1.

Risk measure $\rho(\cdot)$ is called translative and monotone if and only if
$\rho(X+c)=\rho(X)+c$ and $\rho(X)\leq\rho(Y)$ whenever, $P(X\leq Y)=1$ and
$c\in{\mathbb{R}}.$

In the sense of above definition a wide class of risk measures, such as
coherent, spectral, distortion, Quantile-based, and Wang, are translative and
monotone risk measures, see Denuit et al. (2006) for other possible classes of
translative and monotone risk measures.

Consider the following class of reinsurance policies.

$\displaystyle\mathcal{C}$ $\displaystyle=$
$\displaystyle\left\\{h(X):~{}\hbox{both $h(X)$ and $X-h(X)$ are nondecreasing
in $X;$}\right.$ (2) $\displaystyle~{}~{}~{}~{}\left.0\leq h(X)\leq
X;~{}\hbox{and}~{}\pi_{h}^{X}=\hbox{constant}\right\\},$

where $\pi_{h}^{X}$ stands for the reinsurance premium under a reinsurance
contract $h(\cdot).$

Suppose $f(\cdot)$ in class of reinsurer contracts $\mathcal{C},$ given by
(2), minimizes given translative and monotone risk measure $\rho(\cdot)$ of
the total risk of insurance company, i.e., $\displaystyle
f(X)\equiv\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\rho\left(T_{h}(X)\right).$
Now one may cut down an interval $[0,\infty)$ into two intervals $[0,M_{1})$
and $[M_{1},\infty)$ and shift the origin of Cartesian coordinate system to
$(M_{1},f(M_{1})),$ see Figure 1(a) for an illustration. Again, in the new
Cartesian coordinate system, the shifted reinsurance contract $f(\cdot)$ is an
optimal contract and, in the old Cartesian coordinate system, the reinsurance
contract
$g(x)=f(x)I_{[0,M_{1})}(x)+(f(M_{1})+f(x-M_{1}))I_{[M_{1},\infty)}(x)$ is an
appropriate contract. Since $f(\cdot)$ is an optimal contract, optimality of
$g(\cdot)$ arrives by showing that $\rho(T_{g}(X))\equiv\rho(T_{f}(X)).$
Unfortunately proof of such identity is not available for general translative
and monotone risk measures. Hopefully, Tan et al. (2011, Theorem 3.1) showed
that under the $CTE$ criteria as far as $g(\cdot)\in\mathcal{C}$ and $0\leq
g(x)\leq f^{*}(x)=\max\\{x-d_{\alpha},0\\},$ for a given $\alpha\in(0,1)$ and
all $x\geq 0,$ any contract $g(\cdot)$ is again optimal, i.e.,
$\rho(T_{g}(X))\equiv\rho(T_{f^{*}}(X)).$ Using such seminal result, we can
conclude that under the $CTE$ minimization criteria, the new contract
$g(x)=f^{*}(x)I_{[0,M_{1})}(x)+(f^{*}(M_{1})+f^{*}(x-M_{1}))I_{[M_{1},\infty)}(x)$
is optimal. Again cutting down an interval $[M_{1},\infty)$ into two intervals
$[M_{1},M_{2})$ and $[M_{2},\infty)$ and shifting the origin of Cartesian
coordinate system to $(M_{2},f^{*}(M_{2}-M_{1})),$ we can obtain new contract
$f^{*}(x)I_{[0,M_{1})}(x)+(f^{*}(M_{1})+f^{*}(x-M_{1}))I_{[M_{1},M_{2})}(x)+(f^{*}(M_{2})+f^{*}(x-M_{2}))I_{[M_{2},\infty)}(x)$
which Tan et al. (2011, Theorem 3.1) warranties its optimality. Several
implementation of the above procedure leads to an optimal multi-layer
reinsurance contract, under the $CTE$ minimization criteria. The following
algorithm provides such multi-layer contract.

######  Algorithm 1.

Suppose $X_{R}$ stands for the reinsurer’s risk portion from random claim $X.$
The following steps design a multi-layer reinsurance policy which minimizes
the $CTE$ of the insurer’s total risk.

Step 1)

A multi-layer reinsurance policy is obtained by the following iterative
algorithm:

Part 1)

For $k\geq 2;$ Cut down an interval $[M_{k},\infty)$ into two intervals
$[M_{k},M_{k+1})$ and $[M_{k+1},\infty)$ and define the reinsurer’s risk
portion by

$\displaystyle f_{k}(X)$ $\displaystyle=$ $\displaystyle
f_{k-1}(X)I_{[0,M_{k})}(X)+\left[f_{k-1}(M_{k})+f(X-M_{k})\right]I_{[M_{k},\infty)}(X),$
(3)

where $f_{0}(X)=f(X)=\max\\{X-d_{\alpha},0\\};$

Part 2)

Go to Step 2 if a given stop criteria is met, otherwise set $k=k+1$ and go to
Part (1)

Step 2)

Part 1)

The reinsurer’s risk portion under the k-layer reinsurance policy is
$X_{R}=f(X)I_{[0,M_{1})}(X)+\sum_{j=1}^{k-1}f_{j}(X)I_{[M_{j},M_{j+1})}(X)+\left[f_{k-1}(M_{k})+f(X-M_{k})\right]I_{[M_{k},\infty)}(X).$

Part 2)

Now estimate unknown parameters by some additional appropriate criteria (or
estimation methods) along the fact that the fact that
$E(\max\\{X-d_{\alpha},0\\})=E(X_{R}).$

Closeness to an appropriate criteria (such as an optimal ruin probability) can
be considered, in advance, as a stopping criteria in the above algorithm.

Algorithm (1) designs an optimal multi-layer reinsurance policy which the
insurer’s and the reinsurer’s portion of both companies are increasing
functions in the initial insurer claim $X.$ Moreover it provides a sharing
system that its higher layer works appropriately for large reported claim
size.

Application of Algorithm (1) leads to the following optimal k-layer
reinsurance policy.

$\displaystyle
X_{R}^{opt}=\left\\{{\begin{array}[]{*{20}{c}}0&{X<{d_{\alpha}}}\\\
{X-{d_{\alpha}}}&{{d_{\alpha}}\leq X<{M_{1}}}\\\
{{M_{1}}-{d_{\alpha}}}&{{M_{1}}\leq X<{M_{1}}+{d_{\alpha}}}\\\
{X-2{d_{\alpha}}}&{{M_{1}}+{d_{\alpha}}\leq X<{M_{2}}}\\\ \vdots&{}\hfil\\\
{{M_{k}}-k{d_{\alpha}}}&{{M_{k}}\leq X<{M_{k}}+{d_{\alpha}}}\\\
{X-k{d_{\alpha}}}&{{M_{k}}+{d_{\alpha}}\leq X}\end{array}}\right.$ (11)

Figure 1(b) illustrate optimal multi-layer reinsurance policy (11).

Figure 1: Part (a): Shifting the Cartesian coordinate system and finding the
optimal contract in the new Cartesian coordinate system and Part (b): Stop-
loss and an optimal and k-layer reinsurance strategies.

For the sake of simplicity, hereafter now, we set $M_{0}^{*}:=d_{\alpha},$
$M_{1}^{*}:=M_{1},$ $M_{2}^{*}:=M_{1}+d_{\alpha}$ and so on.

The cumulative distribution function for optimal k-layer reinsurance policy
(11) can be restated as

$\displaystyle{F_{X^{opt}_{R}}}(t)$ $\displaystyle=$
$\displaystyle{F_{X}}\left(t_{-}+M^{*}_{0}\right)I_{[0,M^{*}_{1}-M^{*}_{0})}(t)+{F_{X}}\left(t+M^{*}_{2}-(M^{*}_{1}-M^{*}_{0})\right)I_{[M^{*}_{1}-M^{*}_{0},(M^{*}_{3}-M^{*}_{2})+(M^{*}_{1}-M^{*}_{0}))}(t)$
$\displaystyle+{F_{X}}\left(t+M^{*}_{4}-(M^{*}_{3}-M^{*}_{2})-(M^{*}_{1}-M^{*}_{0})\right)I_{[(M^{*}_{3}-M^{*}_{2})+(M^{*}_{1}-M^{*}_{0}),(M^{*}_{5}-M^{*}_{4})+(M^{*}_{3}-M^{*}_{2})+(M^{*}_{1}-M^{*}_{0}))}(t)$
$\displaystyle+\cdots+{F_{X}}\left(t+M^{*}_{m-2}-\sum\limits_{j=1}^{k/2-2}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}-(M^{*}_{1}-M^{*}_{0})\right)I_{[\sum\limits_{j=1}^{k/2-2}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}+(M^{*}_{1}-M^{*}_{0}),\infty)}(t);$

The following provides the moment generating function for the reinsurer’s risk
portion from random claim $X,$ under optimal k-layer reinsurance policy (11).

######  Proposition 1.

Suppose $X_{R}$ stands for the reinsurer’s risk portion from random claim $X,$
under an optimal k-layer reinsurance policy which minimizes the $CTE$ of the
insurer’s total risk. Then, the moment generating function for the reinsurer’s
risk portion $X_{R}^{opt}$ under an optimal k-layer reinsurance policy.

$\displaystyle{M_{X_{R}^{opt}}}(t)=$ $\displaystyle
1-{e^{t(({M^{*}_{1}}-{M^{*}_{0}})+\sum\limits_{j=1}^{k/2-1}{({M^{*}_{2j+1}}-{M^{*}_{2j}})})}}\bar{F}_{X}({M^{*}_{k-2}})+\int_{{M^{*}_{0}}}^{{M^{*}_{1}}}{t{e^{t(X-{M^{*}_{0}})}}\bar{F}_{X}(x)dx}$
$\displaystyle+\sum\limits_{j=1}^{k/2-1}{\int_{{M^{*}_{2j}}}^{{M^{*}_{2j+1}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})+\sum\limits_{i=1}^{j-1}{({M^{*}_{2i+1}}-{M^{*}_{2i}})-{M^{*}_{2j}}})}}\bar{F}_{X}(x)dx}}$
$\displaystyle+\int_{{M^{*}_{k-2}}}^{\infty}{{e^{t(X+\sum\limits_{j=1}^{k/2-1}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{k-2}})}}dF_{X}(x)},$

where $\sum_{j=a}^{b}c_{j}=0$ whenever $b<a.$

Proof. Observe that the moment generating function of $X_{R}^{opt},$ given by
Equation (11) can be calculated as follows

$\displaystyle{M_{X_{R}^{opt}}}(t)=$
$\displaystyle\int_{0}^{{M^{*}_{0}}}{dF_{X}(x)}+\int_{{M^{*}_{0}}}^{{M^{*}_{1}}}{{e^{t(x-{M^{*}_{0}})}}dF_{X}(x)}+\cdots+\int_{{M^{*}_{m-2}}}^{\infty}{{e^{t(X+\sum\limits_{j=1}^{k/2-1}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{k-2}})}}}$

The odd terms can be evaluated directly. The following calculation represents
that how one cab evaluate other terms.

$\displaystyle\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}}dF_{X}(x)$
$\displaystyle=$
$\displaystyle{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}(x)\left|{{}_{{M^{*}_{2}}}^{{M^{*}_{3}}}}\right.-\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}(x)dx}$
$\displaystyle=$
$\displaystyle{e^{t({M^{*}_{3}}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}({M^{*}_{3}})-{e^{t({M^{*}_{2}}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}({M^{*}_{2}})$
$\displaystyle-\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{4}})}}F_{X}(x)dx}$
$\displaystyle=$
$\displaystyle{e^{t({M^{*}_{3}}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}({M^{*}_{3}})-{e^{t({M^{*}_{1}}-{M^{*}_{0}})}}F_{X}({M^{*}_{2}})$
$\displaystyle-\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}dx}+\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}\bar{F}_{X}(x)dx}$
$\displaystyle=$
$\displaystyle{e^{t({M^{*}_{3}}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}F_{X}({M^{*}_{3}})-{e^{t({M^{*}_{1}}-{M^{*}_{0}})}}F_{X}({M^{*}_{2}})$
$\displaystyle-{e^{t({M^{*}_{3}}+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}+{e^{t({M^{*}_{1}}-{M^{*}_{0}})}}+\int_{{M^{*}_{2}}}^{{M^{*}_{3}}}{t{e^{t(x+({M^{*}_{1}}-{M^{*}_{0}})-{M^{*}_{2}})}}\bar{F}_{X}(x)dx}.$

The desired proof arrives by a straightforward calculation. $\square$

Similar to Proposition (1), one may show that under the optimal k-layer
reinsurance contract, the moment generating function for the insurer’s risk
portion, $X_{I}=X-X_{R}^{opt},$ from random claim $X,$ is

$\displaystyle{M_{X-X_{R}^{opt}}}(t)$ $\displaystyle=$
$\displaystyle\bar{F}_{X}(0)-{e^{t({M_{k-2}}-\sum\limits_{j=1}^{k/2-2}{({M_{2j+1}}-{M_{2j}})}-({M_{1}}-{M_{0}}))}}\bar{F}_{X}({M_{k-2}})+\int_{0}^{{M_{0}}}{t{e^{tx}}\bar{F}_{X}(x)dx}$
$\displaystyle+\sum\limits_{j=1}^{k/2-1}{\int_{{M_{2j-1}}}^{{M_{2j}}}{t{e^{t(x-({M_{1}}-{M_{0}})-\sum\limits_{i=1}^{j-1}{({M_{2i+1}}-{M_{2i}})})}}\bar{F}_{X}(x)dx}}$
$\displaystyle+{e^{t({M_{k-2}}-({M_{1}}-{M_{0}})-\sum\limits_{j=1}^{k/2-2}{({M_{2j+1}}-{M_{2j}})})}}\bar{F}_{X}({M_{k-2}}),$

where $\sum_{j=a}^{b}c_{j}=0$ whenever $b<a.$

Using Proposition (1) the expectation of the reinsurer’s risk portion
$X_{R}^{opt},$ under an optimal k-layer reinsurance can be evaluated as

$\displaystyle E(X_{R}^{opt})$ $\displaystyle=$
$\displaystyle{M^{*}_{0}}(F_{X}({M^{*}_{1}})-F_{X}({M^{*}_{0}}))+\int_{{M^{*}_{0}}}^{{M^{*}_{1}}}{\bar{F}_{X}(x)dx}+\sum\limits_{j=1}^{k/2-2}{\int_{2j}^{2j+1}{\bar{F}_{X}(x)dx}}$
$\displaystyle+\int_{{M^{*}_{k-2}}}^{\infty}{xdF_{X}(x)}-{M^{*}_{k-2}}(1-F_{X}({M^{*}_{k-2}})).$

The next section conducts several simulation-based studies, to show “how one
can employ some other appropriate criteria to fully determine an optimal
k-layer reinsurance contract”.

##  3 Simulation Study

This section provides four numerical examples to show how the above findings,
along with some other additional appropriate criteria , can be applied in
practice. These examples consider a given multi-layer reinsurance policies
which arrives by an extension of the optimal stop-loss reinsurance policy.
Unknown parameters of each multi-layer reinsurance policy are estimated using
an additional appropriate criteria.

Borch (1960) showed that, under the variance retained risk optimal criteria,
in class of reinsurance contracts $\mathcal{C},$ given by Equation (2), the
stop-loss reinsurance is optimal. The following shows that the proportional
reinsurance contract minimizes a convex combination of variance of the
insurer’s and the reinsurer’s risk portions from random claim $X.$

######  Proposition 2.

Suppose $X_{R}=h(X)$ and $X_{I}=X-h(X)$, respectively, stand for the
reinsurer’s and the insurer’s risk portions from random claim $X.$ Then, in
class of reinsurance contracts $\mathcal{C},$ given by Equation (2),
proportional contract $h^{*}(X)=\frac{1}{{1+\omega}}X$ minimizes the following
convex combination of variance of $X_{R}=h(X)$ and $X_{I}=X-h(X)$

${Q_{h}}=\omega Var(h(X))+(1-\omega)Var(X-h(X)),$

where $\omega\in[0,1].$

Proof. The above convex combination of two variances can be restated as

$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}{Q_{h}}$
$\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{\omega
Var(h(X)-X+X)+(1-\omega)Var(X-h(X))\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{\omega
Var(X-(X-h(x)))+(1-\omega)Var(X-h(X))\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{\omega
Var(X)+Var(X-h(X))-2\omega Cov(X,X-h(X))\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{Var(X-h(X))-2\omega
Cov(X,X-h(X))\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{E[{(X-h(X))^{2}}]-{[E(X-h(X))]^{2}}-2\omega
E[(X-h(X))X]+2\omega E[(X-h(X))]E[X]\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{E\left[{(X-h(X))^{2}}-2\omega(X-h(X))X\right]-E[(X-h(X))]\left[E[(X-h(X))]-2\omega
E(X)\right]\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{E[[(X-h(X))][(X-h(X))-2\omega
X]]-E[(X-h(X))]E[(1-2\omega)X-h(X)]\right\\}$ $\displaystyle=$
$\displaystyle\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\left\\{Cov[(X-h(X)),(1-2\omega)X-h(X)]\right\\}.$

Therefore, one may conclude that the above convex combination is minimal
whenever $(X-h(X))$ and $(1-2\omega)X-h(X)]$ are linearly dependent. Choosing
$(1-2\omega)X-h(X)=\beta_{0}+\beta_{1}(X-h(X))$ leads to
$h(X)=(1-2\omega-\beta_{1})X/(1-\beta_{1})-\beta_{0}/(1-\beta_{1}).$ The fact
that $0\leq h(X)\leq X$ implies that $\beta_{0}=0.$ Now by substituting back
$h(X)=(1-2\omega-\beta_{1})X/(1-\beta_{1})$ in the above convex combination,
we have

${Q_{I}}=[\omega\frac{{{{(1-2\omega-\beta_{1})}^{2}}}}{{{{(1-\beta_{1})}^{2}}}}+(1-\omega)\frac{{{{(2\omega)}^{2}}}}{{{{(1-\beta_{1})}^{2}}}}]Var(X).$

Minimizing this expression, with respect to $\beta_{1},$ leads to desired
result. $\square$

Proposition (2) shows that the proportional reinsurance the contract minimizes
a convex combination of variance of $X_{R}$ and $X-X_{R}.$ The following
example considers this observation as an appropriate criteria to estimate
unknown parameters of an optimal 2-layer contract.

######  Example 1.

Suppose that random claim $X$ has been distributed according to one of the
distributions given in the first column of Table 1. Moreover suppose that the
optimal multi-layer contract has 2 layers and restated as

$\displaystyle{X_{R}^{2-layer}}(X)=\left\\{\begin{array}[]{l}0\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,X<{d_{\alpha}}\\\
X-{d_{\alpha}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{d_{\alpha}}\leq
X<{M_{1}}\\\
{M_{1}}-{d_{\alpha}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{M_{1}}\leq
X<{M_{1}}+{d_{\alpha}}\\\
X-2{d_{\alpha}}\,\,\,\,\,\,\,{M_{1}}+{d_{\alpha}}\leq X<M_{2}\\\
M_{2}-2{d_{\alpha}}\,\,\,\,\,\,\,{M_{2}}\leq X<M_{2}+{d_{\alpha}}\\\
X-3{d_{\alpha}}\,\,\,\,\,\,\,{M_{2}}+{d_{\alpha}}\leq X\\\ \end{array}\right.$

For the sake of simplicity, we set $M_{1}=d_{\alpha}+d_{1}$ and
$M_{2}=2d_{\alpha}+d_{1}+d_{2}.$ Now $M_{0}$ has been estimated such that
$E(X_{R})=E(\max\\{X-d_{\alpha},0\\}).$ Other two parameters $d_{1}$ and
$d_{2}$ have been estimated such that the square distance
$\left[Q_{{X_{R}^{2-layer}}}-Q_{h^{*}}\right]^{2}$ is minimized, where $Q_{h}$
and $h^{*}$ are given in Proposition (2).

Table 1 shows estimation for unknown parameters of the above optimal 2-layer
${X_{R}^{2-layer}}.$

Table 1: Estimation for unknown parameters of the optimal 2-layer contract
under variance optimal criteria, whenever $\omega=0.2$ and $\alpha=0.1$.
Random claim distribution $d_{\alpha}$ $M_{1}$ $M_{2}$
$E(h^{SL}(X))=E(h^{2-layer}(X))$ $CTE_{h^{SL}}=CTE_{h^{2-layer}}$ $Q_{h^{*}}$
$Q_{h^{SL}}$ $Q_{h^{2-layer}}$ Exp(10) 23.0259 24.4258 48.4516 $1$ 10.423
16.667 52.948 46.1586 Exp(8) 18.4206 26.4986 45.9192 $0.4498$ 8.14 6.6707
33.8867 29.5415 Exp(4) 9.2103 13.2103 18.1928 $0.4099$ 4.0743 1.6692 8.4717
7.3853 Weibull(1,2) 1.5174 4.1396 6.657 $0.028$ 0.2865 0.0358 0.1639 0.1338
Weibull(3,2) 4.5523 12.7469 18.2992 $0.02135$ 1.2235 0.322 1.475 1.204
$Q_{h}$ and $h^{*}$ are given in Proposition (2),
$h^{SL}(X)=\max\\{X-d_{\alpha},0\\}$ and $h^{2-layer}(X)=X_{R}^{2-layer}(X).$

The last three columns of Table 1 show the convex combination of variance of
$X_{R}=h(X)$ and $X_{I}=X-h(X)$ for optimal stop-loss, optimal 2-layer and
proportional (given by Proposition, 2) contracts, respectively. As one may
observe that, under the optimal 2-layer contract such convex combination of
variances, compare to optimal stop-loss, has been improved. We conjecture that
by increasing number of layer such convex combination of variances will be
improved.

Under criteria of maximizing of the expected utility, one may either determine
an optimal reinsurance contract (see Kaluszka & Okolewski, 2008, for more
details) or estimate unknown parameters of an optimal reinsurance contract
(see Dickson, 2005 §9.2, for more details).

The following example considers criteria of maximizing of a convex combination
of the expected exponential utility of $X_{R}$ and $X-X_{R}$ as an additional
appropriate criteria to estimate unknown parameters of a 2-layer optimal
reinsurance contract.

######  Example 2.

Suppose that random claim $X$ has been distributed according to one of the
distributions given in the first column of Table 2. Moreover consider the
optimal 2-layer contract given in Example (1).

Similar to Example (1), for the sake of simplicity, we set
$M_{1}=d_{\alpha}+d_{1}$ and $M_{2}=2d_{\alpha}+d_{1}+d_{2}.$ Now $M_{0}$ has
been estimated such that $E(X_{R})=E(\max\\{X-d_{\alpha},0\\}).$ Other two
parameters $d_{1}$ and $d_{2}$ are estimated such that the following convex
combination of the expected exponential utilities of $X_{R}$ and $X-X_{R}$ has
been minimized.

$\displaystyle U_{h}=\omega
E(\exp(-\beta(h(X))))+(1-\omega)E(\exp(-\beta(X-h(X)))).$ (13)

where we set $\omega=0.2$ and $\beta_{1}=\beta_{2}=1.$

Table 2 shows estimation for unknown parameters of the optimal 2-layer
${X_{R}^{2-layer}}.$

Table 2: Estimation for unknown parameters of the optimal 2-layer contract
under minimization $U_{h}$ as an optimal criteria, whenever $\omega=0.2$ and
$\alpha=0.1$.
Random claim distribution $d_{\alpha}$ $M_{1}$ $M_{2}$
$E(h^{SL}(X))=E(h^{2-layer}(X))$ $CTE_{h^{SL}}=CTE_{h^{2-layer}}$ $U_{h^{SL}}$
$U_{h^{2-layer}}$ Exp(10) 23.0259 24.4259 48.4518 $1$ 10.423 $0.9312$ $0.9163$
Exp(8) 18.4206 31.4132 51.1488 $0.4498$ 8.14 $0.6412$ $0.5629$ Exp(4) 9.2103
13.2103 23.4037 $0.4099$ 4.0743 $0.8449$ $0.2000$ Weibull(1,2) 1.5174 4.1396
6.657 $0.028$ 0.2865 $0.5629$ $0.4593$ Weibull(3,2) 4.5523 12.7469 18.2992
$0.02135$ 1.2235 $0.3069$ $0.1465$
$Q_{h}$ and $h^{*}$ are given by Equation (13),
$h^{SL}(X)=\max\\{X-d_{\alpha},0\\}$ and $h^{2-layer}(X)=X_{R}^{2-layer}(X).$

The last two columns of Table 2 show the convex combination of expected
exponential utility of $X_{R}=h(X)$ and $X_{I}=X-h(X)$ for the optimal stop-
loss and the optimal 2-layer contracts, respectively. As one may observe,
under the optimal 2-layer contract such convex combination of utilities,
compare to optimal stop-loss contract, is improved.

The Bayesian method under name of the credibility method is well-known in
various areas of the actuarial sciences. For instance see: Whitney (1918) and
Payandeh Najafabdi et al. (2015) for its application in the experience rating
system; Bailey (1950), Payandeh Najafabdi (2010), and Payandeh Najafabdi et
al. (2012) for its application in evaluating insurance premium; Hesselager &
witting (1998) and England & Verral (2002) for its application in the IBNR
claims reserving system; and see Makov et al. (1996), Makov (2001), and
Hossack et al. (1999) for its general applications in actuarial science.

Now we employ the Bayesian estimation method as an appropriate method to
estimate unknown parameters of an optimal multi-layer reinsurance contract.

To derive any Bayes estimator for $M^{*}_{0},\cdots,M^{*}_{m-2},$ based upon
i.i.d. random claim $X^{(1)},\cdots,X^{(n)}.$ One has to consider initial
values for $M^{*}_{0},\cdots,M^{*}_{m-2}.$ Then, using such initial values,
he/she can define i.i.d reinsurer’s random claim
$X^{(1)}_{R},\cdots,X^{(n)}_{R}.$ Now, using information given by
$X^{(1)}_{R},\cdots,X^{(n)}_{R}$ accompanied with prior information on
parameters $M^{*}_{0},\cdots,M^{*}_{m-2}$ and other unknown parameters, the
Bayes estimator for parameters $M^{*}_{0},\cdots,M^{*}_{m-2},$ say
$\hat{M}^{*}_{0},\cdots,\hat{M}^{*}_{m-2}$, under an appropriate loss function
can be obtained. Certainly, such Bayes estimator may be, iteratively, improved
by using $\hat{M}^{*}_{0},\cdots,\hat{M}^{*}_{m-2}$ as a new initial estimator
for $M^{*}_{0},\cdots,M^{*}_{m-2}.$ And determining
$X^{(1)}_{R},\cdots,X^{(n)}_{R},$ and finally reevaluating the Bayes estimator
$\hat{M}^{*}_{0},\cdots,\hat{M}^{*}_{m-2},$ again.

Suppose $X^{(1)},\cdots,X^{(n)},$ given parameter $\theta,$ are i.i.d. random
claims with a common density function $f_{X}$ and a distribution function
$F_{X}.$ Moreover, suppose that $m^{*}_{0},\cdots,m^{*}_{k-2}$ stand for the
initial values for $M^{*}_{0},\cdots,M^{*}_{k-2}$. Using a straightforward
calculation, the density function for random variable $X_{R}^{(i)},$ for
$i=1,\cdots,n,$ given parameters
$\Theta:=(\theta,M^{*}_{0},\cdots,M^{*}_{k-2})$ at observed value $y^{(i)},$
is equal to

$\displaystyle{g_{{X_{R}^{(i)}}|\Theta}}({y^{(i)}})$ $\displaystyle=$
$\displaystyle\left({F_{X}}(M^{*}_{0})-{F_{X}}(0)\right)I_{\\{0\\}}(y^{(i)})+{f_{X}}(y^{(i)}+M^{*}_{0})I_{(0,M^{*}_{1}-M^{*}_{0})}(y^{(i)})$
$\displaystyle+\left({F_{X}}(M^{*}_{2})-{F_{X}}(M^{*}_{1})\right)I_{\\{M^{*}_{1}-M^{*}_{0}\\}}(y^{(i)})$
$\displaystyle+f_{X}(y^{(i)}+M^{*}_{2}-(M^{*}_{1}-M^{*}_{0}))I_{(M^{*}_{1}-M^{*}_{0},M^{*}_{3}-M^{*}_{2}+M^{*}_{1}-M^{*}_{0})}(y^{(i)})$
$\displaystyle+\left({F_{X}}(M^{*}_{4})-{F_{X}}(M^{*}_{3})\right)I_{\\{M^{*}_{3}-M^{*}_{2}+M^{*}_{1}-M^{*}_{0}\\}}(y^{(i)})+\cdots$
$\displaystyle+{f_{X}}\left({y^{(i)}}+M^{*}_{k-2}-\sum\limits_{j=1}^{k/2-2}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}-(M^{*}_{1}-M^{*}_{0})\right)I_{(\sum\limits_{j=1}^{k/2-2}{({M^{*}_{2j+1}}-{M^{*}_{2j}})}+(M^{*}_{1}-M^{*}_{0}),\infty)}(y^{(i)})$

Using the fact that random variables $X^{(1)}_{R},\cdots,X^{(n)}_{R}$ are
i.i.d. Therefore, the joint density function for
$X^{(1)}_{R},\cdots,X^{(n)}_{R},$ given parameters
$\Theta:=(\theta,M^{*}_{0},\cdots,M^{*}_{k-2})$ can be restated as

$\displaystyle
f_{X^{(1)}_{R},\cdots,X^{(n)}_{R}}(y^{(1)},\cdots,y^{(n)}|\Theta)$
$\displaystyle=$
$\displaystyle{[{F_{X}}(M^{*}_{0})-{F_{X}}(0)]^{n_{0}}}\prod\limits_{i=1}^{{n_{1}}}{{f_{X}}(y^{(i)}+M^{*}_{0})}{[{F_{X}}(M^{*}_{2})-{F_{X}}(M^{*}_{1})]^{{n_{2}}}}\cdots$
$\displaystyle\times\prod\limits_{i={n_{0}}+\cdots{n_{(k-2)}}}^{n}{{f_{X}}\left({y^{(i)}}+M^{*}_{k-2}-\sum\limits_{i=1}^{k/2-2}{({M^{*}_{2i+1}}-{M^{*}_{2i}})}-(M^{*}_{1}-M^{*}_{0})\right)},$

where $n_{0}:=\\#(y^{(i)}=0),$ $n_{1}:=\\#(0<y^{(i)}<(M^{*}_{1}-M^{*}_{0})),$
$n_{2}:=\\#(y^{(i)}=(M^{*}_{1}-M^{*}_{0})),\cdots,n_{k-2}:=\\#(\sum\limits_{i=1}^{k/2-2}{({M^{*}_{2i+1}}-{M^{*}_{2i}})}<y^{(i)})$.

Assuming $\pi{(\theta,M^{*}_{0},...,M^{*}_{k-2})}$ is the prior distribution
for vector ${(\theta,M^{*}_{0},\cdots,M^{*}_{m-2})}$, joint posterior
distribution for vector $\Theta:=(\theta,M^{*}_{0},\cdots,M^{*}_{k-2})$ is

$\displaystyle\pi(\theta,M^{*}_{0},\cdots,M^{*}_{m-2}|y^{(1)},\cdots,y^{(n)})=$
$\displaystyle\frac{f_{X^{(1)}_{R},\cdots,X^{(n)}_{R}}(y^{(1)},\cdots,y^{(n)}|\theta,M^{*}_{0},\cdots,M^{*}_{k-2})\pi(\theta,M^{*}_{0},\cdots,M^{*}_{k-2})}{\int_{\mathcal{M^{*}}_{k-2}}\cdots\int_{\Theta}f_{X^{(1)}_{R},\cdots,X^{(n)}_{R}}(y^{(1)},\cdots,y^{(n)}|\theta,M^{*}_{0},\cdots,M^{*}_{(}k-2))\pi(\theta,M^{*}_{0},\cdots,M^{*}_{k-2})d\theta
dM^{*}_{0},\cdots,dM^{*}_{k-2}}.$

Using the above joint posterior distribution, the Bayes estimator for each
$M^{*}_{0},...,M^{*}_{k-2}$ under the square error loss function, is

$\displaystyle{\hat{M}^{*}}_{i}$ $\displaystyle=$
$\displaystyle\int_{\mathcal{M^{*}}_{k-2}}\cdots\int_{\Theta}M^{*}_{i}~{}\pi(\theta,M^{*}_{0},\cdots,M^{*}_{k-2}|y^{(1)},\cdots,y^{(n)})d\theta
dM^{*}_{0}\cdots dM^{*}_{k-2},$ (14)

for $i=0,\cdots,k-2.$

Now as an application of the above findings, we consider the following
example.

######  Example 3.

Suppose that random claim $X$ has been distributed according to one of the
distributions given in the first column of Table 3. Moreover, suppose that the
optimal multi-layer contract has 1 layer and restated as

$\displaystyle{X_{R}^{1-layer}}=\left\\{\begin{array}[]{l}0\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,X<{M_{0}}\\\
X-{M_{0}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{M_{0}}\leq
X<{M_{1}}\\\
{M_{1}}-{M_{0}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{M_{1}}\leq
X<{M_{2}}\\\
X+({M_{1}}-{M_{0}})-{M_{2}}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{M_{2}}\leq
X\end{array}\right..$

For the sake of simplicity, we set $d_{0}=M_{0},$ $d_{1}=M_{1}-M_{0},$ and
$d_{2}=M_{2}-M_{1}.$ Now, suppose that the prior distributions of the unknown
parameters $d_{0},$ $d_{1},$ and $d_{2}$ are independent and given in the
second, third, and fourth columns of Table 3, respectively.

To construct a Bayes estimator for unknown parameters, we employed
$d_{0}=0.20,$ $d_{1}=0.15,$ and $d_{2}=0.02$ as initial values.

Table 3: Mean (standard deviation) of Bayes estimator for$d_{0}$, $d_{1}$ and
$d_{2}$ based upon 100 sample size and 100 iterations, whenever $\alpha=0.1$.
Claim Distribution Prior distribution Prior distribution Prior distribution
Mean (variance) Mean (variance) Mean (variance) $E(h^{SL}(X))=$
$CTE_{h^{SL}}=$ for $d_{0}$ for $d_{1}$ for $d_{2}$ of estimated $d_{0}$ of
estimated $d_{1}$ of estimated $d_{2}$ $E(h^{1-layer}(X))$ $h^{SL}(X)$
$CTE_{h^{1-layer}}$ EXP(1) EXP(1) EXP(1) EXP(1) 0.0599 0.4474 0.0643 0.1
$(X-2.3026)_{+}$ 1.01 (4.795$\times 10^{-16}$) (4.439$\times 10^{-14}$)
(8.458$\times 10^{-7}$) EXP(4) Gamma(2,3) Gamma(3,2) Gamma(2,2) 0.0526 0.6575
0.0638 0.4 $(X-9.2103)_{+}$ 4.0743 (3.823$\times 10^{-18}$) (9.003$\times
10^{-13}$) (1.093$\times 10^{-5}$) Weibull(1,2) Gamma(2,2) Gamma(3,2)
Gamma(2,3) 0.0746 0.6575 0.0798 $0.028249$ $(X-1.5174)_{+}$ 0.2865
(1.661$\times 10^{-17}$) (4.393$\times 10^{-15}$) (3.542$\times 10^{-6}$)
$h^{SL}(X)=\max\\{X-d_{\alpha},0\\}$ and $h^{1-layer}(X)=X_{R}^{1-layer}(X).$

The three last columns of Table 3 represent the mean and the standard
deviation, respectively, of the Bayes estimator for $d_{0}$, $d_{1}$ and
$d_{2}$, which generates 100 random numbers from a given distribution. This
estimators were derived using Equation (14) when the mean of 100 iterations of
the Bayes estimator for $d_{0}$, $d_{1}$ and $d_{2}$ was used as an estimator
for $d_{0}$, $d_{1}$ and $d_{2}.$

The small variance of these estimators shows that the estimation method is an
appropriate method to use with the different samples.

##  4 Conclusion and suggestions

This article generalizes the stop-loss reinsurance policy to a new continuous
multi-layer reinsurance policy which minimizes the conditional tail
expectation (CTE) risk measure of the insurer’s total risk. Unknown parameters
of the new optimal multi-layer reinsurance policy can be estimated using other
additional appropriate criteria. Therefore, the new multi-layer reinsurance
policy not only similar to the original stop-loss reinsurance policy is
optimal, in a same sense, but also it has some other appropriate criteria
which the original stop-loss policy does not have. Estimation method of this
article can be generalized to the other appropriate criteria such as the ruin
probability (Fang & Qu, 2014), percentile matching estimating method (Teugels
& Sundt, 2004), etc.

The following two propositions are generalized result of this article under
the general translative and monotone risk measure $\rho(\cdot)$.

The following suppose that under minimization criteria of a translative and
monotone risk measure $\rho(\cdot)$ of the insurer’s total risk reinsurance
contract $f(\cdot)$ is optimal. Then, it provides a multi-layer reinsurance
contract which its corresponding risk measure coincides with the insurer’s
total risk under contract $f(\cdot),$ see Figure 2(a) for an illustration.

######  Proposition 3.

Suppose $\rho(\cdot)$ is a translative and monotone risk measure. Moreover,
suppose that $f(\cdot)$ in the class of reinsurance strategies $\mathcal{C}$
minimizes risk measure of the total risk of insurance company. Then,
reinsurance $g(\cdot)$ also minimizes the risk measure of total risk of
insurance company.

$\displaystyle g(X)$ $\displaystyle=$ $\displaystyle
f(X)I_{[0,M_{1})}(X)+(X-M_{1}+f(M_{1}))I_{[M_{1},M_{2})}(X)+f(M_{2}^{*})I_{[M_{2},M_{2}^{*})}(X)$
$\displaystyle+(X-M_{2}^{*}+f(M_{2}^{*}))I_{[M_{2}^{*},M_{3})}(X)+\cdots+(X-M_{k}^{*}+f(M_{k}^{*}))I_{[M_{k}^{*},\infty)}(X),$

where $M_{1},M_{2},\cdots,M_{k}$ are unknown parameters of the new optimal
reinsurance and $M_{1}^{*},M_{2}^{*},\cdots,M_{k}^{*}$ have to be evaluated
using equation $f(M_{2}^{*})=M_{2}-M_{1}+f(M_{1})$ and
$f(M_{i}^{*})=M_{i}-M_{i-1}^{*}+f(M_{i-1}^{*})$ for $i=3,\cdots,k.$

Proof. Since $\rho(\cdot)$ is a translative risk measure, one may write that

$\displaystyle\rho(X-g(X)+\pi_{g}^{X})$ $\displaystyle=$
$\displaystyle\rho(X-g(X))+\pi_{g}^{X}$ $\displaystyle=$
$\displaystyle\rho\left[(X-f(X))I_{[0,M_{1})}(X)+(M_{1}-f(M_{1}))I_{[M_{1},M_{2})}(X)\right.$
$\displaystyle~{}~{}~{}~{}\left.+(X-f(M_{2}^{*})I_{[M_{2},M_{2}^{*})}(X))+(M_{2}^{*}-f(M_{2}^{*}))I_{[M_{2}^{*},M_{3})}(X)\right.$
$\displaystyle~{}~{}~{}~{}\left.+(X-f(M_{3}^{*}))I_{[M_{3},M_{3}^{*})}+\cdots+(M_{k}^{*}-f(M_{k}^{*}))I_{[M_{k}^{*},\infty)}(X)\right]+\pi_{g}^{X}$
$\displaystyle\leq$ $\displaystyle\rho(X-f(X))+\pi_{g}^{X}$ $\displaystyle=$
$\displaystyle\rho(X-f(X)+\pi_{g}^{X})$ $\displaystyle=$
$\displaystyle\rho(X-f(X)+\pi_{f}^{X}).$

The above inequality arrives from the fact that $\rho(\cdot)$ is a monotone
risk measure and $X-g(X)\leq X-f(X)$ with probability 1\. Now using the fact
that
$\rho(X-f(X))=\mathop{\min}\limits_{h\in\mathcal{C}}\rho(X-h(X)+\pi_{h}^{X})$
we conclude that the above inequality has to be changed to an equality.
$\square$

Now we provide an optimal multi-layer reinsurance contract, for a situation
that the optimal reinsurance $f(\cdot)$ arrives by minimizing a convex
combination of two translative and monotone risk measures $\rho_{1}(\cdot)$
and $\rho_{2}(\cdot)$ of the insurer’s total risk, $X_{R}=h(X),$ and the
reinsurer’s total risk $X_{I}=X-h(X),$ i.e.,
$f(X)=\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\\{\omega\rho_{1}(X-h(X)+\pi_{h}^{X})+(1-\omega)\rho_{2}(h(X)-\pi_{h}^{X})\\},$
where $\omega\in[0,1],$ see Figure 2(b) for an illustration.

As an example for such optimal reinsurance $f(\cdot),$ under such the convex
combination of two distortion risk measures, see Assa (2015).

######  Proposition 4.

Suppose $\rho_{1}(\cdot)$ and $\rho_{2}(\cdot)$ are two translative and
monotone risk measures. Moreover, suppose that $f(\cdot)$ in class of
reinsurance strategies $\mathcal{C}$ minimizes a convex combination of two
risk measures $\rho_{1}(\cdot)$ and $\rho_{2}(\cdot),$ i.e.,
$f(X)=\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\\{\omega\rho_{1}(X-h(X)+\pi_{h}^{X})+(1-\omega)\rho_{2}(h(X)-\pi_{h}^{X})\\},$
where $\omega\in[0,1].$ Then, for
$\omega^{*}\in(0,a_{\min}/(a_{\min}+a_{\max})),$ the following k-layer
reinsurance $g(\cdot)$ also minimizes such the convex combination of two risk
measures $\rho_{1}(\cdot)$ and $\rho_{2}(\cdot)$.

$\displaystyle g(X)$ $\displaystyle=$ $\displaystyle
f(X)I_{[0,M_{1})}(X)+(X-M_{1}+f(M_{1}))I_{[M_{1},M_{2})}(X)+f(M_{2}^{*})I_{[M_{2},M_{3})}(X)$
$\displaystyle+(X-M_{3}+f(M_{2}^{*}))I_{[M_{3},M_{4})}(X)+\cdots+f(X)I_{[M_{2k+1}^{*},\infty)}(X),$

where $M_{1},M_{2},\cdots,M_{k}$ are unknown parameters of the new optimal
reinsurance and $M_{1}^{*},M_{2}^{*},\cdots,M_{k}^{*}$ have to be evaluated
using equation $f(M_{2}^{*})=M_{2}-M_{2}+f(M_{1}),$
$f(M_{2j-1}^{*})=M_{2j-1}^{*}-M_{2j-1}+f(M_{2(j-1)}^{*}),$
$f(M^{*}_{2j})=f(M^{*}_{2(j-1)})+M_{2j}-M_{2j-1},$ for $j=2,\cdots,k,$
$a_{\min}:=\operatornamewithlimits{min}_{x\in A}\\{|2f(x)-x|\\},$
$a_{\max}:=\operatornamewithlimits{max}_{x\in A}\\{|2f(x)-x|\\}$ and
$A:=[M^{1},M^{*}_{2})\cup_{j=2}^{k}[M^{*}_{2j-1},M^{*}_{2j}].$

Proof. Set $\pi_{g}^{*}:=\omega^{*}\pi_{g}^{X}-(1-\omega^{*})\pi_{g}^{X}.$
Since $\rho_{1}(\cdot)$ and $\rho_{2}(\cdot)$ are a translative risk measures,
one may write that

$\displaystyle\omega^{*}\rho_{1}(X-g(X)+\pi_{g}^{X})+(1-\omega^{*})\rho_{2}(g(X)-\pi_{g}^{X})$
$\displaystyle=$
$\displaystyle\pi_{g}^{*}+\omega^{*}\rho_{1}(X-g(X))+(1-\omega^{*})\rho_{2}(g(X)$
$\displaystyle\leq$
$\displaystyle\pi_{g}^{*}+\omega^{*}\rho_{1}\left[(X-f(X))I_{[0,M_{1})}(X)+f(X)I_{[M_{1},M_{2}^{*})}(X)\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\left.+(X-f(X))I_{[M_{2}^{*},M_{3}^{*})}(X)+\cdots+(X-f(X))I_{[M_{2k+1}^{*},\infty)}(X)\right]$
$\displaystyle+(1-\omega^{*})\rho_{2}\left[f(X)I_{[0,M_{1})}(X)+(X-f(X))I_{[M_{1},M_{2}^{*})}(X)\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\left.+f(X)I_{[M_{2}^{*},M_{3}^{*})}(X)+\cdots+f(X)I_{[M_{2k+1}^{*},\infty)}(X)\right]$
$\displaystyle=$
$\displaystyle\pi_{g}^{*}+\omega^{*}\rho_{1}\left[(X-f(X))I_{[0,\infty)}(X)+(2f(X)-X)I_{[M^{1},M^{*}_{2})}(X))\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\left.+(2f(X)-X)\sum_{j=2}^{k}I_{[M^{*}_{2j-1},M^{*}_{2j})}(X))\right.]$
$\displaystyle+(1-\omega^{*})\rho_{2}\left[f(X)I_{[0,\infty)}(X)+(X-2f(X))I_{[M^{1},M^{*}_{2})}(X))\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\left.+(X-2f(X))\sum_{j=2}^{k}I_{[M^{*}_{2j-1},M^{*}_{2j})}(X))\right.]$
$\displaystyle\leq$
$\displaystyle\pi_{g}^{*}+\omega^{*}\rho_{1}\left[(X-f(X))I_{[0,\infty)}(X)\right]+(1-\omega^{*})\rho_{2}\left[f(X)\right]$
$\displaystyle+\omega^{*}ka_{\max}-(1-\omega^{*})ka_{\min}$
$\displaystyle\leq$
$\displaystyle\pi_{g}^{*}+\omega^{*}\rho_{1}\left[(X-f(X))I_{[0,\infty)}(X)\right]+(1-\omega^{*})\rho_{2}\left[f(X)\right]$
$\displaystyle=$
$\displaystyle\omega^{*}\rho_{1}(X-f(X)+\pi_{g}^{X})+(1-\omega^{*})\rho_{2}(f(X)-\pi_{g}^{X})$
$\displaystyle=$
$\displaystyle\omega^{*}\rho_{1}(X-f(X)+\pi_{f}^{X})+(1-\omega^{*})\rho_{2}(f(X)-\pi_{f}^{X}).$

The last inequality arrives from the fact that
$\omega^{*}\in[0,a_{\min}/(a_{\min}+a_{\max}).$ Now using the fact that
$\omega^{*}\rho_{1}(X-f(X)+\pi_{f}^{X})+(1-\omega^{*})\rho_{2}(f(X)-\pi_{f}^{X})=\mathop{\min}\limits_{h\in\mathcal{C}}\left\\{\omega^{*}\rho_{1}(X-h(X)+\pi_{h}^{X})+(1-\omega^{*})\rho_{2}(h(X)-\pi_{h}^{X})\right\\},$
we conclude that the k-layer reinsurance $g(\cdot)$ also minimizes such the
convex combination. $\square$

Figure 2: Part (a): The optimal multi-layer reinsurance contract, given by
Proposition (3) whenever
$f(X)=\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\\{\rho(X-h(X)+\pi_{h}^{X})\\}$
and Part (b): The optimal multi-layer reinsurance contract, given by
Proposition (4), whenever
$f(X)=\operatornamewithlimits{argmin}_{h\in\mathcal{C}}\\{\omega\rho_{1}(X-h(X)+\pi_{h}^{X})+(1-\omega)\rho_{2}(h(X)-\pi_{h}^{X})\\}$
and $\omega\in[0,1].$

##  5 Acknowledgements

The second author also would like thanks support of the Central Insurance of
the Islamic Republic of Iran.

## References

  * [1] Assa, H. (2015). On Optimal Reinsurance Policy with Distortion Risk Measures and Premiums. Insurance: Mathematics and Economics, 61, 70–75.
  * [2] Bailey, A.L. (1950). Credibility Procedures Laplace’s Generalization of Bayes’ Rule and the Combination of Collateral Knowledge with Observed Data. Proceedings of the Casualty Actuarial Society 37, 7–23.
  * [3] Borch, K. (1960). An Attempt to Determine the Optimum Amount of Stop-Loss Reinsurance. in Transactions of the 16th International Congress of Actuaries, 597–610.
  * [4] Chi, Y. (2012). Reinsurance Arrangements Minimizing the Risk-Adjusted Value of an Insurer’s Liability. Astin Bulletin, 42(02), 529–557.
  * [5] Chi, Y. (2012). Optimal reinsurance under variance related premium principles. Insurance: Mathematics and Economics, 51(2), 310–321.
  * [6] Cai, J., Fang, Y., Li, Z., & Willmot, G. E. (2013). Optimal Reciprocal Reinsurance Treaties under the Joint Survival Probability and the Joint Profitable Probability. Journal of Risk and Insurance, 80, 145–168.
  * [7] Chi, Y., & Tan, K. S. (2011). Optimal Reinsurance under VaR and CVaR Risk Measures: a Simplified Approach. ASTIN Bulletin, 41, 487–509.
  * [8] Cai, J., Tan, K. S., Weng, C., & Zhang, Y. (2008). Optimal Reinsurance under VaR and CTE Risk Measures. Insurance: Mathematics and Economics, 43, 185–196.
  * [9] Chi, Y., & Tan, K. S. (2013). Optimal reinsurance with general premium principles. Insurance: Mathematics and Economics, 52(2), 180–189.
  * [10] Cai, J., & Weng, C. (2014). Optimal reinsurance with Expectile. Scandinavian Actuarial Journal, 1–22.
  * [11] Cortes, O. A. C., Rau-Chaplin, A., Wilson, D., Cook, I., & Gaiser-Porter, J. (2013). Efficient optimization of reinsurance contracts using discretized PBIL. Data Analytics: The Second International Conference on Data Analytics. Porto, Portuga
  * [12] Dedu, S. (2012). Optimization of some Risk Measures in Stop-Loss Reinsurance with Multiple Retention Levels. Mathematical Reports, 14, 131–139.
  * [13] Denuit, M., Dhaene, J., Goovaerts, M., & Kaas, R. (2006). Actuarial Theory for Dependent Risks: Measures, Orders and Models. John Wiley & Sons.
  * [14] Dickson, D. C. (2005). Insurance risk and ruin. Cambridge University Press, New York.
  * [15] Fang, Y., & Qu, Z. (2014). Optimal Combination of Quota-Share and Stop-Loss Reinsurance Treaties under the Joint Survival Probability. IMA Journal of Management Mathematics, 25, 89–103.
  * [16] England, P. & Verrall, R. (2002). Stochastic Claims Reserving in General Insurance (with discussion). British Actuarial Journal. 8, 443–544.
  * [17] Hesselager, O. (1990). Some Results on Optimal Reinsurance in Terms of the Adjustment Coefficient. Scandinavian Actuarial Journal. 1990, 80–95.
  * [18] Hesselager, O. & Witting, T. (1988). A Credibility Model with Random Fluctuations in Delay Probabilities for the Prediction of IBNR Claims. ASTIN Bulletin, 18, 79–90.
  * [19] Hossack, I.B., Pollard, J.H. & Zenwirth, B. (1999). Introductory Statistics with Applications in General Insurance, 2nd Edition, University Press, Cambridge.
  * [20] Kaluszka, M. (2005). Truncated stop loss as optimal reinsurance agreement in one-period models. Astin Bulletin, 35(02), 337–349.
  * [21] Kaluszka, M., & Okolewski, A. (2008). An extension of Arrow’s result on optimal reinsurance contract. Journal of Risk and Insurance, 75(2), 275–288.
  * [22] Makov, U. E. (2001). Principal Applications of Bayesian Methods in Actuarial Science: a Perspective. North American Actuarial Journal 5, 53–73.
  * [23] Makov, U. E., Smith, A.F.M. & Liu, Y.H. (1996). Bayesian Methods in Actuarial Science. The Statistician, 45, 503–515.
  * [24] Ouyang, Y. X., & Li, Z. Y. (2010). Adverse selection, systematic risks and sustainable development of Policy Agricultural Insurance. Insurance Studies, 4, 1–9.
  * [25] Panahi Bazaz, A. & Payandeh Najafabadi, A. T. (2015). An Optimal Reinsurance Contract from Insurer’s and Reinsurer’s Viewpoints. Applications & Applied Mathematics, 10(2), 970–982.
  * [26] Passalacqua, L. (2007). Measuring effects of excess-of-loss reinsurance on credit insurance risk capital. Giornale delł’Istituto Italiano degli Attuari, LXX, 81-102.
  * [27] Payandeh Najafabadi, A. T. (2010). A New Approach to the Credibility Formula. Insurance: Mathematics and Economics, 46, 334–338.
  * [28] Payandeh Najafabadi, A. T., Hatami, H., & Omidi Najafabadi, M. (2012). A Maximum Entropy Approach to the Linear Credibility Formula. Insurance: Mathematics and Economics, 51, 216–221.
  * [29] Payandeh Najafabadi, A. T., & Qazvini, M. (2015). A GLM Approach to Estimating Copula Models. Communications in Statistics-Simulation and Computation, 44(6), 1641–1656.
  * [30] Payandeh Najafabadi, A. T. & Panahi Bazaz, A. P. (2016). An optimal co-reinsurance strategy. Insurance: Mathematics and Economics, 69, 149–155.
  * [31] Porth, L., Seng Tan, K., & Weng, C. (2013). Optimal reinsurance analysis from a crop insurer’s perspective. Agricultural Finance Review, 73(2), 310–328.
  * [32] Tan, K. S. & Weng, C., (2012). Enhancing Insurer Value using Reinsurance and Value-at-Risk Criterion. The Geneva Risk and Insurance Review, 37, 109–140.
  * [33] Tan, K. S., Weng, C., & Zhang, Y. (2011). Optimality of General Reinsurance Contracts under CTE Risk Measure. Insurance: Mathematics and Economics, 49, 175–187.
  * [34] Teugels, J. L., & Sundt, B. (2004). Encyclopedia of Actuarial Science. Vol. 1. Wiley, New York.
  * [35] Weng, C. (2009), Optimal reinsurance designs: from an insurer’s perspective. PhD thesis, University of Waterloo, Waterloo, Canada.
  * [36] Whitney, A. W. (1918). The Theory of Experience Rating. Proceedings of the Casualty Actuarial Society 4, 274–292.
  * [37] Zhuang, S. C., Weng, C., Tan, K. S., & Assa, H. (2016). Marginal Indemnification Function formulation for optimal reinsurance. Insurance: Mathematics and Economics, 67, 65–76.


# Compose & Embellish: Well-Structured Piano Performance Generation via A Two-
Stage Approach

###### Abstract

Even with strong sequence models like Transformers, generating expressive
piano performances with long-range musical structures remains challenging.
Meanwhile, methods to compose well-structured melodies or lead sheets (melody
$+$ chords), i.e., simpler forms of music, gained more success. Observing the
above, we devise a two-stage Transformer-based framework that Composes a lead
sheet first, and then Embellishes it with accompaniment and expressive
touches. Such a factorization also enables pretraining on non-piano data. Our
objective and subjective experiments show that Compose & Embellish shrinks the
gap in structureness between a current state of the art and real performances
by half, and improves other musical aspects such as richness and coherence as
well.

Index Terms—  symbolic music generation, Transformers, autoregressive models,
seq2seq models, pretraining

##  1 Introduction

Recent years have witnessed a multitude of research works on leveraging
Transformers [1] for symbolic music generation. Generating piano performances
emerged as a quintessential arena for such studies, for the rich musical
content and texture piano playing can entail without having to deal with the
complicated orchestration of instruments. Thanks to Transformers’ outstanding
capability of modeling long sequences containing complex inter-token
relations, generating several minutes-long expressive piano music end-to-end
has been made possible [2, 3, 4]. Though these works all claimed to have
improved upon their predecessors in creating repetitive structures, a central
element of music, it has been repeatedly shown that they fail to come up with
overarching repetitions and musical development that hold a piece together [5,
6, 7]. On the other hand, a line of research that tackles simpler forms of
music, e.g., melodies or lead sheets (melody $+$ chords) has seen promising
results in composing well-structured pieces [8, 9, 10]. A reasonable
conjecture then follows: Could it be too demanding for a monolithic model to
generate virtuosic performances end-to-end, as it has to process local nuances
in texture or emotions, and the high-level musical flow, all at once?

Therefore, in this paper, we split piano performance generation into two
stages, and propose the Compose & Embellish framework that rests on performant
prior works [4, 5]. The Compose step writes the lead sheet that sets the
overall structure of a song, while the Embellish step conditions on the lead
sheet, and adds expressivity to it through accompaniment, dynamics, and
timing. Through experiments, we strive to answer the following research
questions:

  * •

RQ #1: Can the two-stage framework compose better-structured piano
performances than an end-to-end model, without adversely impacting diversity
of musical content?

  * •

RQ #2: Does being able to pretrain the Compose step with larger amounts of
non-piano data bring performance gains?

  * •

RQ #3: How well does the Embellish step follow the structure of music
generated by the Compose step?

Fig. 1 offers a glimpse of our improvement over a state of the art [4]. We
plan to open source our implementation and trained model weights upon paper
publication. Readers are encouraged to listen to samples generated by our
framework.111Generated samples: https://bit.ly/comp_embel.

Fig. 1: Fitness scape plots [11] of pieces randomly drawn from generations by
Compose & Embellish, by CP Transformer [4], and from real data. Darker colors
towards top of the triangle indicate more significant long-range repetitive
structures. Fig. 2: System overview of Compose & Embellish.

##  2 Related Work

For expressive piano performances, [2] and [3] showed respectively that
relative positional encoding and beat-based music representation enhance
generation quality. [4] designed a more compact representation and utilized
memory-efficient attention to fit entire performances into a Transformer. [6]
directly addressed musical structure with a multi-granular Transformer, but
weakened expressivity by abstracting timing and dynamics away. Bar-level
blueprints [12] and musical themes [13] may help to maintain long-range
structure, but neither of these systems are capable of unconditioned
generation.

On composing melodies or lead sheets, researchers used note-level repeat
detection and modeling [8], phrase tokens [5], hierarchical generative
pipeline [9], and bar-level similarity relations [10] to induce repetitive
structures. Out of these, [5] is the most straightforward one that avoids
potential error propagation between multiple components, and is hence adopted
by our framework.

##  3 Method

###  3.1 Input Sequences

We represent a polyphonic musical piece or performance with a sequence of
tokens $X$. To encode the expressiveness of a performance, besides chord
progression and onset time/pitch/duration of notes, $X$ also contains the
velocity (i.e., loudness) of each note, as well as beat-level tempo changes.
Any existing method that extracts the monophonic melody line (e.g., the
skyline algorithm [14]) may then be applied to $X$. Using the chord
progression in $X$ and the extracted melody, we additionally leverage a
structure analysis algorithm [15] based on edit similarity and A∗ search to
capture repetitive phrases (in a form like A1B1A2…) of the piece. The melody,
chords, and structure information would constitute a lead sheet of the piece,
denoted by $M$. Typically, $M$ is much shorter for having less notes, and the
expressive aspects being discarded. For both $X$ and $M$, there exists a
mapping $\mathrm{bar}(t)$ that gives the index of the bar the $t^{\text{th}}$
token belongs to. With the mappings, we may segment $X$ and $M$ into
$\\{X^{(1)},\dots,X^{(B)}\\}$ and $\\{M^{(1)},\dots,M^{(B)}\\}$, where $B$ is
the piece’s number of bars. The segmented sequences will be used in our model.

###  3.2 Data Representation

Our token vocabulary is designed based on Revamped MIDI-derived Events (REMI)
[3]. In a full performance $X$, a [Bar] token appears whenever a new musical
bar begins. [SubBeat_*] token indicate timepoints within a bar, in 16th note
() resolution. Each note is represented by three tokens: [Pitch_*] (A0 to C8),
[Duration_*] ( to ), and [Velocity_*] (32 levels). Moreover, [Tempo_*]
(32$\sim$224 bpm) tokens set the pace, and [Chord_*] tokens (12 roots $\times$
11 qualities) provide harmonic context. The two above may appear as frequently
as every beat. For lead sheets $M$, we take the mean tempo, and place only one
[Tempo_*] token at the very beginning. We also omit [Velocity_*] of each note.
To add structure information to $M$, we refer to [5]: At a phrase’s starting
bar, we put [Phrase_*] (8 possible letters) and [RepStart_*]
(1${}^{\text{st}}$ to 16${}^{\text{th}}$ repetition) right after [Bar]. At the
phrase’s ending, [Phrase_*] and [RepEnd_*] close that bar. An [EOS] token ends
the entire lead sheet. Other tokens types are the same as in $X$. By our
construction, the vocabulary size for both $X$ and $M$ is about 370.

###  3.3 Models and Objectives

Fig. 2 is a birds-eye view of our Compose & Embellish framework. It is made up
of two generative models: the lead sheet model (Compose) $p(M)$, and the
performance model (Embellish) $p(X|M)$. While being trained independently, the
two models work in tandem during inference. For the lead sheet model, we
simply factorize $p(M)$ into $\sum_{t}p(m_{t}\,|\,M_{<t})$. It can complete a
lead sheet autoregressively given a start token, i.e., [Tempo_*].

For $p(X|M)$, we follow the conditioned generation case in CP Transformer [4],
and interleave one-bar segments from $M$ and $X$ as
$\\{M^{(1)},X^{(1)},M^{(2)},X^{(2)},\dots\\}$. This way, when generating the
performance for a bar, the completed lead sheet of that bar is always the
closest piece of context the model may refer to, thereby encouraging it to
stay faithful to $M$. Mathematically, $p(X|M)$ can be factorized as
$\sum_{t}p(x_{t}\,|\,X_{<t};\,M^{(\leq\mathrm{bar}(t))})$. For the model to
distinguish interleaved segments, we place [Track_$M$] and [Track_$X$] in
front of each $M^{(\cdot)}$ and $X^{(\cdot)}$ respectively. At inference time,
we would move on to the next bar whenever [Track_$M$] is generated. Both
models minimize the negative log-likelihood ($-\log p(\cdot)$) of the
sequences. One can use any type of sequence decoder for both models. Due to
the long sequence length (mostly $>$1k) of our data, our choice is
Transformers with a causal attention mask.

Since the models are trained separately, we may pretrain the lead sheet model
on a larger amount of data ($\mathcal{D}_{\mathrm{p}}$ in Fig. 2) extracted
from, e.g., various multitrack pieces. These pieces, though not played only by
the piano, or at all, still likely feature a well-structured melody that is
either sung or played by another instrument. Then, we just need to finetune it
on the piano performance dataset that $p(X|M)$ is trained on
($\mathcal{D}_{\mathrm{f}}$) to align their domain.

##  4 Experiments

###  4.1 Datasets and Preprocessing

We adopt the full Lakh MIDI Dataset (LMD-full) [16] as the pretraining dataset
($\mathcal{D}_{\mathrm{p}}$) for our lead sheet model. The LMD-full contains
over 100k multitrack MIDIs with various instrument combinations in each of
them. The dataset for finetuning our leadsheet model and training our
performance model ($\mathcal{D}_{\mathrm{f}}$) is Pop1K7 compiled in [4]. It
features about 1,700 transcribed piano performances of Western, Japanese, and
Korean pop songs.

We use different algorithms to extract melodies from
$\mathcal{D}_{\mathrm{p}}$ and $\mathcal{D}_{\mathrm{f}}$. For
$\mathcal{D}_{\mathrm{p}}$, we leverage the open-source
code222https://github.com/gulnazaki/lyrics-melody from [17], which searches
for the instrument track whose note onset times align best with those of the
song’s lyrics, and regards that track as the melody.333Songs without lyrics
annotations are not considered. For $\mathcal{D}_{\mathrm{f}}$, we employ the
skyline algorithm [14], which keeps only the highest-pitched note from each
set of simultaneous onsets. This simple heuristic has been shown to have a
nearly 80% accuracy on identifying pop songs’ melodies [18]. We then perform
structure analysis [15] on the extracted melodies and discard songs with
phrases spanning $>$32 bars. The statistics of the processed datasets are
displayed in Table 1. CP representation [4] for $\mathcal{D}_{\mathrm{f}}$ is
made for baselining purpose. 10% of each dataset is reserved for validation.

Table 1: Summary of datasets used in our experiments. The numbers in the last three columns are averages across a dataset. | Repr. |  # songs |  # bars / song |  # bars / phrase |  # tokens / song
---|---|---|---|---|---
|  |  |  |
LMD-full ($\mathcal{D}_{\mathrm{p}}$) | $M$ |  14,934 |  89.6 |  8.64 |  1,356
Pop1K7 ($\mathcal{D}_{\mathrm{f}}$) | $M$ |  1,591 |  104.5 |  8.74 |  1,841
$X$ |  |  |  |  5,379
CP |  |  |  |  2,081
Table 2: Objective evaluation results. (All metrics are the closer to real data, the better. Stdevs follow $\pm$.) |  Structureness (in %) | Melody-line Diversity | Quality
---|---|---|---
| $\mathcal{SI}_{\text{short}}$ | $\mathcal{SI}_{\text{mid}}$ | $\mathcal{SI}_{\text{long}}$ | $\mathcal{DN}_{\text{short}}$ | $\mathcal{DN}_{\text{mid}}$ | $\mathcal{DN}_{\text{long}}$ | $\mathcal{H}_{1}$ | $\mathcal{H}_{4}$ |  $\mathcal{GS}$ (%)
Naive repeats (1-bar) |  83.6$\,\pm$8.6 |  88.3$\,\pm$5.4 |  75.7$\,\pm$11 |  01.2$\,\pm$0.6 |  01.2$\,\pm$0.6 |  01.3$\,\pm$0.6 |  1.95$\,\pm$.40 |  1.95$\,\pm$.40 |  100$\,\>\pm$0.0
Naive repeats (1-phrase) |  75.5$\,\pm$15 |  86.2$\,\pm$6.8 |  73.9$\,\pm$11 |  08.2$\,\pm$4.8 |  10.0$\,\pm$5.8 |  10.8$\,\pm$6.5 |  1.96$\,\pm$.27 |  2.52$\,\pm$.22 |  83.1$\,\pm$8.8
CP Transformer [4] |  32.5$\,\pm$3.3 |  29.9$\,\pm$4.4 |  17.9$\,\pm$6.3 |  82.0$\,\pm$8.9 |  99.6$\,\pm$0.7 |  100$\,\>\pm$0.0 |  1.73$\,\pm$.20 |  2.45$\,\pm$.11 |  82.6$\,\pm$9.3
Compose & Embellish |  36.8$\,\pm$6.7 |  35.1$\,\pm$7.7 |  25.8$\,\pm$12 |  49.7$\,\pm$19 |  69.9$\,\pm$20 |  81.6$\,\pm$17 |  1.99$\,\pm$.17 |  2.54$\,\pm$.17 |  81.0$\,\pm$8.4
w/o struct |  36.8$\,\pm$6.8 |  34.2$\,\pm$9.2 |  23.8$\,\pm$11 |  48.0$\,\pm$17 |  68.7$\,\pm$17 |  82.7$\,\pm$14 |  1.99$\,\pm$.19 |  2.57$\,\pm$.15 |  82.1$\,\pm$8.5
w/o pretrain |  36.6$\,\pm$7.5 |  33.1$\,\pm$8.8 |  19.6$\,\pm$10 |  53.2$\,\pm$19 |  74.9$\,\pm$18 |  87.9$\,\pm$14 |  1.97$\,\pm$.22 |  2.49$\,\pm$.19 |  81.7$\,\pm$9.6
w/o struct & pretrain |  36.3$\,\pm$6.0 |  34.1$\,\pm$6.7 |  23.0$\,\pm$8.4 |  52.5$\,\pm$18 |  76.1$\,\pm$16 |  89.0$\,\pm$11 |  2.00$\,\pm$.22 |  2.57$\,\pm$.18 |  82.7$\,\pm$8.7
Real data |  43.8$\,\pm$7.1 |  43.1$\,\pm$8.4 |  34.8$\,\pm$12 |  50.0$\,\pm$14 |  74.1$\,\pm$14 |  88.3$\,\pm$11 |  1.96$\,\pm$.22 |  2.53$\,\pm$.15 |  75.5$\,\pm$8.5

###  4.2 Model Implementation Details

Our lead sheet model $p(M)$ is parameterized by a 12-layer Transformer [1]
(512 hidden state dim., 8 attention heads, 41 million trainable parameters)
with relative positional encoding proposed in [19]. With a batch size of 2, we
can set maximum sequence length to 2,400 (longer than 98% & 90% of songs in
$\mathcal{D}_{\mathrm{p}}$ & $\mathcal{D}_{\mathrm{f}}$, respectively) on an
RTX3090-Ti GPU with 24G memory. We use Adam optimizer with 200 steps of
learning rate warmup to a peak of 1e$-$4, followed by 500k steps of cosine
decay. We keep a checkpoint after each epoch, finding that checkpoints with
around 0.4 training NLL produces outputs of the best perceived quality.
Pretraining on $\mathcal{D}_{\mathrm{p}}$ requires over 5 days, while
finetuning on $\mathcal{D}_{\mathrm{f}}$ takes less than half a day.

The performance model $p(X|M)$ is a 12-layer linear Transformer with Performer
[20] attention approximation. In each epoch, a random 3,072 token-long crop of
interleaved $M$ and $X$ segments (see Sec. 3.3 for explanation) of each song
is fed to the model in a batch size of 4. This sequence length corresponds to
roughly 40 bars of performance. While its possible to feed full performances
using batch size$=$1, we observe that the increased attention overhead and
reduced batch size would render the training slow and unstable. Training the
performance model takes around 3 days.444Model hyperparameters, hardware,
optimizer settings, and checkpoint selection are the same as those for the
lead sheet model.

Nucleus sampling [21] with temperatured softmax is employed during inference.
We discover that the temperature $\tau$ and probability mass truncation point
$p$ greatly affect the intra-sequence repetitiveness and diversity of
generated lead sheets. Thus, we follow [22] and search within
$\tau=\\{1.2,1.3,1.4\\}$ and $p=\\{.95,.97,.98,.99\\}$ to find a combination
with which our lead sheet model generates outputs with the closest mean
perplexity (measured by the model itself) to that of validation real data.
Finally, $\tau=1.2$ and $p=.97$ are chosen. The effects of these two
hyperparameters on the performance model are, however, more subtle. We pick
$\tau=1.1$ and $p=.99$ for they lead to the most pleasant sounding
performances to our ears.

###  4.3 Baselines and Ablations

We select Compound Word (CP) Transformer [4] as our baseline, for it
represents the state of the art end-to-end model for unconditional expressive
piano performance generation that has access to the full context of previously
generated tokens, due to its low memory footprint. However, this advantage
does not lead to well-structured generations, as pointed out by [10]. For our
Compose & Embellish framework, to examine whether (1) pretraining on
$\mathcal{D}_{\mathrm{p}}$, and (2) adding structure (phrase) tokens
contribute to its success, we put to test three ablated versions without
either, or both, of them.555Sampling hyperparameters ($\tau$ & $p$) for the
ablated models are chosen in the same way as described in Sec. 4.2.

Additionally, we sample single-bar, and single-phrase, excerpts from the real
data and repeat such excerpts to the song’s length (in bars), to see how naive
repetitions would compare to the models.

Table 3: Difference in structureness indicator scores between lead sheets and full performances. | Lead sheet | Performance | $\Delta$
---|---|---|---
|  $\mathcal{SI}_{\text{mid}}$ |  $\mathcal{SI}_{\text{long}}$ |  $\mathcal{SI}_{\text{mid}}$ |  $\mathcal{SI}_{\text{long}}$ |  $\mathcal{SI}_{\text{mid}}$ |  $\mathcal{SI}_{\text{long}}$
C&E |  42.9 |  36.6 |  35.1 |  25.8 |  0$-$7.8 |  $-$10.8
w/o struct |  44.4 |  36.5 |  34.2 |  23.8 |  $-$10.2 |  $-$12.7
w/o pretrain |  41.1 |  28.9 |  33.1 |  19.6 |  0$-$8.0 |  0$-$9.3
w/o both |  41.3 |  31.3 |  34.1 |  23.0 |  0$-$7.2 |  0$-$8.3
Real data |  43.6 |  36.6 |  43.1 |  34.8 |  0$-$0.5 |  0$-$1.8
Table 4: User study results. (Ch: Coherence, Cr: Correctness, S: Structureness, R: Richness, O: Overall. Stdevs follow $\pm$.) |  Ch |  Cr |  S |  R |  O
---|---|---|---|---|---
CPT [4] |  2.38$\pm$0.9 |  2.49$\pm$0.9 |  2.33$\pm$0.9 |  2.64$\pm$0.9 |  2.33$\pm$0.9
C&E (ours) |  3.53$\pm$0.9 |  3.11$\pm$1.0 |  3.36$\pm$1.2 |  3.29$\pm$1.0 |  3.18$\pm$0.9
Real data |  4.42$\pm$0.7 |  4.13$\pm$0.8 |  4.44$\pm$0.8 |  4.24$\pm$0.8 |  4.40$\pm$0.7

###  4.4 Objective Evaluation

We utilize a set of metrics that can be computed on a song’s notes, or its
synthesized audio, to evaluate the intra-song structureness, diversity, and
general quality of the generated music.

  * •

Structureness Indicators ($\mathcal{SI}$): proposed first by [5], this metric
takes the maximum value from a specific timescale range (e.g., all 10$\sim$20
seconds long segments) of the fitness scape plot [11] (see Fig. 1 for
examples) computed on the audio of a song. This value represents the extent to
which the most salient repetitive segment in that timescale range is repeated
throughout the entire song. We set the timescale ranges to 4$\sim$12,
12$\sim$32, and over 32 seconds to capture the short-, medium-, and long-term
structureness (denoted as $\mathcal{SI}_{\text{short}}$,
$\mathcal{SI}_{\text{mid}}$, and $\mathcal{SI}_{\text{long}}$) respectively.

  * •

Percentage of Distinct Pitch N-grams in Melody ($\mathcal{DN}$): following the
popular dist-n [23] metric used in natural language generation to evaluate the
diversity of generated content, we compute the percentage of distinct n-grams
in the pitch sequence of the skyline extracted from each full
performance.666not directly on melody lines composed by our lead sheet model.
We regard 3$\sim$5, 6$\sim$10, and 11$\sim$20 contiguous notes as short,
medium, and long excerpts, and compute $\mathcal{DN}_{\text{short}}$,
$\mathcal{DN}_{\text{mid}}$, and $\mathcal{DN}_{\text{long}}$ accordingly.

  * •

Pitch Class Histogram Entropy ($\mathcal{H}_{1}$, $\mathcal{H}_{4}$): proposed
in [5] to see if a model uses primarily a few pitch classes (i.e., C, C#,…, B,
B, 12 in total), or more, and more evenly, of them, hence leading to a higher
harmonic diversity. The subscripts denote whether histograms are accumulated
over 1-, or 4-bar segments.

  * •

Grooving Similarity ($\mathcal{GS}$): used also in [5]. It calculates the
pairwise similarity of each bar’s groove vector $\bm{g}$ (binary, indicating
which sub-beats have note onsets) as
$1-\mathrm{HammDist}(\bm{g}_{a},\bm{g}_{b})$. All bar pairs $(a,b)$ are
involved, not just adjacent ones. Higher $\mathcal{GS}$ suggests more
consistent rhythm patterns across the song.

We generate 100 songs with each model to compute the metrics. Due to high
computation cost of fitness scape plots, we only sample 200 songs from real
data ($\mathcal{D}_{\mathrm{f}}$) for comparison.

###  4.5 User Study

We recruit 15 subjects who are willing to spend around half an hour to take
part in our listening test. Each test taker is given three independent sets of
music. There are three piano performances (full song, about 3$\sim$5 minutes
long each) in each set, composed respectively by (1) a human composer, (2)
Compose & Embellish, and (3) CP Transformer. To facilitate comparison, the
three performances in a set share the same 8-bar prompt drawn from our
validation split. Test takers are asked to rate each performance on the
5-point Likert scale, on the following aspects:

  * •

Coherence (Ch): Does the music follow the prompt well, and unfold smoothly
throughout the piece?

  * •

Correctness (Cr): Is the music free of inharmonious notes, and unnatural
rhythms and phrasing?

  * •

Structureness (S): Are recurring motifs / phrases / sections, and reasonable
musical development present?

  * •

Richness (R): Is the music intriguing and full of variations within?

  * •

Overall (O): Subjectively, how much do you like the music?

##  5 Results and Discussion

We run the metrics described in Sec. 4.4 on all our model variants and
baselines. The results are shown in Table 2. First and foremost, we compare CP
Transformer (abbr. as CPT henceforth) to the full Compose & Embellish (C&E).
On $\mathcal{SI}$ metrics, C&E sits right in the middle of CPT and real data,
with its advantage over CPT increasing as the timescale goes up. Although CPT
scores high on $\mathcal{DN}$’s, we should keep in mind that it is not trained
to take extra care of the melody, and hence likely does not know some melodic
content should be repeated. On the other hand, $\mathcal{DN}$ scores of C&E
are close to those of real data, and a lot better than the two excessively
repetitive baselines. An affirmative answer to our RQ #1 may be given: C&E
composes better-structured piano performances without sacrificing musical
diversity within a piece. Worthwhile to note is that, despite the high
$\mathcal{DN}$’s, CPT gets considerably lower
$\mathcal{H}_{1},\mathcal{H}_{4}$, and slightly higher $\mathcal{GS}$ (vs. C&E
and real data), suggesting that its music may actually sound blander
harmonically and rhythmically.

Next, we pay attention to the full vs. ablated versions of Compose &
Embellish. From Table 2, we may observe that variants not pretrained on
$\mathcal{D}_{\mathrm{p}}$ suffer losses on $\mathcal{SI}_{\text{mid}}$ and
$\mathcal{SI}_{\text{long}}$. Somewhat to our surprise is that w/o pretrain
performs worse than w/o struct & pretrain. A possible explanation is that the
introduction of structure-related tokens renders a larger amount training data
necessary, as the concept of long-range repetition those tokens carry is less
explicit than direct interactions between notes. Whether this reasoning holds,
however, warrants further study. Despite worse longer-range $\mathcal{SI}$
scores, we discover that the two w/o pretraining variants are, contrarily,
more prone to _over-repetition_ (which we arbitrarily define as: one bar of
melody being exactly and consecutively repeated over 6 times, or two
neighboring bars of melody repeated over 4 times)—5.5% of these two variants’
generations suffer from it, while only 2.5% of pieces by pretrained variants,
and 0.5% of real data do. We may now answer another yes to our RQ #2:
pretraining the lead sheet model helps with not only the structureness, but
also the quality consistency, of the generated music.

Table 3 displays how much longer-range structureness slip after we feed the
lead sheets to our performance model. The performance model is not able to
match the structureness of real performances, no matter whose lead sheets it
conditions on, while our best lead sheet model already performs similarly with
the real data. (The pretrained C&E variants’ lead sheet $\mathcal{SI}$’s
reaffirm our answer to RQ #2.) Lead sheets by the w/o struct variant cause
particularly large $\Delta$’s ($p<.05$ compared to the full version). To get a
better sense our performance model’s issues, we check the _melody matchness_
[4] it achieves (i.e., the percentage of notes in a melody that a performance
model copies and pastes into the performance; ideally 100%)—it gets $>$98% on
lead sheets by all four variants. Hence, a reasonable response to our RQ #3
would be: The performance model follows the melody faithfully, but some
aspects of repetitive structures come inherently with the performance, which
cannot be captured even with effective melody conditioning.

The mean opinion scores (MOS) obtained from our user study is listed in Table
4. As expected, C&E holds significant advantage over CPT on all five aspects
($p<.01$ on 45 sets of comparisons). Coherence (Ch) and structureness (S) are
what our model does particularly well, gaining $>$1 points over CPT. This
indicates that explicit modeling of lead sheets helps C&E better glue
generated music into one piece, as well as reuse and develop musical content.
Nonetheless, the scores also corroborate ($p<.01$) that, by every criterion,
our model still has a long way to go to rival real performances.

##  6 Conclusion

In this paper, we have introduced a two-stage framework, Compose & Embellish,
to generate piano performances with lead sheets as the intermediate output.
Promising prior art [4, 5] were chosen and integrated to form our model
backbone. We showed via objective and subjective study that our framework
composes better-structured and higher-quality piano performances compared to
an end-to-end model. Furthermore, pretraining the 1${}^{\text{st}}$-stage
(i.e., lead sheet) model with extra data contributed to a sizable performance
gain. Future endeavors may focus on redesigning the performance model to
further close the gap between generated and real performances.

## References

  * [1] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin,  “Attention is all you need,”  in Proc. NeurIPS, 2017.
  * [2] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam Shazeer, Andrew M. Dai, Matthew D. Hoffman, Monica Dinculescu, and Douglas Eck,  “Music Transformer: Generating music with long-term structure,”  in Proc. ICLR, 2019.
  * [3] Yu-Siang Huang and Yi-Hsuan Yang,  “Pop Music Transformer: Generating music with rhythm and harmony,”  in Proc. ACM Multimedia, 2020.
  * [4] Wen-Yi Hsiao, Jen-Yu Liu, Yin-Cheng Yeh, and Yi-Hsuan Yang,  “Compound Word Transformer: Learning to compose full-song music over dynamic directed hypergraphs,”  in Proc. AAAI, 2021.
  * [5] Shih-Lun Wu and Yi-Hsuan Yang,  “The Jazz Transformer on the front line: Exploring the shortcomings of AI-composed music through quantitative measures,”  in Proc. ISMIR, 2020.
  * [6] Xueyao Zhang, Jinchao Zhang, Yao Qiu, Li Wang, and Jie Zhou,  “Structure-enhanced pop music generation via harmony-aware learning,”  in Proc. ACM Multimedia, 2021.
  * [7] Shuqi Dai, Huiran Yu, and Roger B Dannenberg,  “What is missing in deep music generation? a study of repetition and structure in popular music,”  in Proc. ISMIR, 2022.
  * [8] Gabriele Medeot, Srikanth Cherla, Katerina Kosta, Matt McVicar, Samer Abdallah, Marco Selvi, Ed Newton-Rex, and Kevin Webster,  “StructureNet: Inducing structure in generated melodies,”  in Proc. ISMIR, 2018.
  * [9] Shuqi Dai, Zeyu Jin, Celso Gomes, and Roger B Dannenberg,  “Controllable deep melody generation via hierarchical music structure representation,”  in Proc. ISMIR, 2021.
  * [10] Yi Zou, Pei Zou, Yi Zhao, Kaixiang Zhang, Ran Zhang, and Xiaorui Wang,  “Melons: generating melody with long-term structure using transformers and structure graph,”  in Proc. ICASSP, 2022.
  * [11] Meinard Müller and Nanzhu Jiang,  “A scape plot representation for visualizing repetitive structures of music recordings.,”  in Proc. ISMIR, 2012.
  * [12] Shih-Lun Wu and Yi-Hsuan Yang,  “MuseMorphose: Full-song and fine-grained music style transfer with one Transformer VAE,”  arXiv preprint arXiv:2105.04090, 2021.
  * [13] Yi-Jen Shih, Shih-Lun Wu, Frank Zalkow, Meinard Muller, and Yi-Hsuan Yang,  “Theme Transformer: Symbolic music generation with theme-conditioned Transformer,”  IEEE Transactions on Multimedia,  accepted for publication.
  * [14] Alexandra L Uitdenbogerd and Justin Zobel,  “Manipulation of music for melody matching,”  in Proc. ACM Multimedia, 1998.
  * [15] Shuqi Dai, Huan Zhang, and Roger B Dannenberg,  “Automatic analysis and influence of hierarchical structure on melody, rhythm and harmony in popular music,”  in Proc. Joint Conf. AI Music Creativity, 2020.
  * [16] Colin Raffel,  Learning-Based Methods for Comparing Sequences, with Applications to Audio-to-MIDI Alignment and Matching,  Ph.D. thesis, Columbia University, 2016.
  * [17] Thomas Melistas, Theodoros Giannakopoulos, and Georgios Paraskevopoulos,  “Lyrics and vocal melody generation conditioned on accompaniment,”  in Proc. Workshop on NLP for Music and Spoken Audio (NLP4MusA), 2021\.
  * [18] Yi-Hui Chou, I-Chun Chen, Chin-Jui Chang, Joann Ching, and Yi-Hsuan Yang,  “MidiBERT-piano: large-scale pre-training for symbolic music understanding,”  arXiv preprint arXiv:2107.05223, 2021.
  * [19] Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G Carbonell, Quoc Le, and Ruslan Salakhutdinov,  “Transformer-XL: Attentive language models beyond a fixed-length context,”  in Proc. ACL, 2019.
  * [20] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, David Belanger, Lucy J Colwell, and Adrian Weller,  “Rethinking attention with Performers,”  in Proc. ICLR, 2021.
  * [21] Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi,  “The curious case of neural text degeneration,”  in Proc. ICLR, 2019.
  * [22] Zihao Fu, Wai Lam, Anthony Man-Cho So, and Bei Shi,  “A theoretical analysis of the repetition problem in text generation,”  in Proc. AAAI, 2021.
  * [23] Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan,  “A diversity-promoting objective function for neural conversation models,”  in Proc. NAACL, 2016.