{'fraction_non_alphanumeric': 0.04682678116194821, 'fraction_numerical': 0.010733932644572656, 'mean_word_length': 4.332856325128792, 'pattern_counts': {'":': 1, '<': 2, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cascades in multiplex financial networks with debts of different seniority

The seniority of debt, which determines the order in which a bankrupt institution repays its debts, is an important and sometimes contentious feature of financial crises, yet its impact on system-wide stability is not well understood. We capture seniority of debt in a multiplex network, a graph of nodes connected by multiple types of edges. Here, an edge between banks denotes a debt contract of a certain level of seniority. Next we study cascading default. There exist multiple kinds of bankruptcy, indexed by the highest level of seniority at which a bank cannot repay all its debts. Self-interested banks would prefer that all their loans be made at the most senior level. However, mixing debts of different seniority levels makes the system more stable, in that it shrinks the set of network densities for which bankruptcies spread widely. We compute the optimal ratio of senior to junior debts, which we call the optimal seniority ratio, for two uncorrelated Erdos-Renyi networks. If institutions erode their buffer against insolvency, then this optimal seniority ratio rises; in other words, if default thresholds fall, then more loans should be senior. We generalize the analytical results to arbitrarily many levels of seniority and to heavy-tailed degree distributions.


I. INTRODUCTION
The global financial crisis of 2007-2009 spurred a flurry of research on financial contagion using a variety of network models [1][2][3][4][5][6][7]. In most of these models, financial institutions interact in just one way, such as making one type of loan to one another. In practice, however, banks interact in many ways, all of which can contribute to a crisis: banks issue loans of different durations and of different levels of riskiness; they trade assets with each other; and they hold assets in common. Models have only recently begun to capture more than one of these kinds of interactions [8][9][10]. Relatively unexplored is the seniority of debts, which determines the order in which bankrupt institutions repay their debts. Individual creditors pay close attention to their assets' seniority levels, but little is known about how the system-wide composition of seniority levels affects the risk of large crises.
A concurrent and mostly independent thread of literature in physics has studied multiplex networks, or graphs with multiple sets of edges (or "network layers") [11,12]. In threshold models of contagion in multiplex networks [13][14][15][16][17], when a node changes state, it influences its neighbors in all layers to change state. A common conclusion from these models is that the system's vulnerability to large cascades often cannot be understood by examining the vulnerability of any one layer to large cascades [13][14][15][16][17]. In particular, the interactions among network layers can make large cascades easier (if nodes combine influence from multiple types of neighbors in a disjunctive [13] or weighted [14] way) or more difficult * Corresponding author. kobayashi@econ.kobe-u.ac.jp (if nodes combine influence in a conjunctive way [15]).
In this paper, we combine these two strands of research to study a financial phenomena of interest: how vulnerability to cascading default depends on the seniority of debts. Financial institutions (hereafter called "banks" for simplicity) hold debt in one another; more generally, they have exposure to one another's default risk through interbank lending and/or security holding. Each debt contract has a certain level of seniority. When a bank goes into default (i.e., when a bank's liabilities exceed its assets), the bank sells its remaining assets to pay off whatever liabilities it can in decreasing order of seniority, from most senior liability to most junior liability.
In our model, there exist multiple types of bankruptcy, indexed by the highest level of seniority at which a bank cannot repay all its debts. Using a technique called the cascade condition [13,15,18,19], we study whether a small number of initial bankruptcies (of certain types) triggers a cascade of many bankruptcies.
The model has interesting tradeoffs. Self-interested banks would prefer to lend at the most senior level in order to maximize the assets they would recover in the event of its debtors defaulting. However, if all banks lend at the most senior level, then the system is especially vulnerable to large cascades of default, in the sense that cascades are likely large for a large interval of network densities. (This extreme case recovers the models in [1,2].) By contrast, the presence of debts of different seniority makes the system less vulnerable to bankruptcies spreading widely. For the case of two seniority levels (called "junior" and "senior"), our main result is to derive the "optimal" ratio of senior loans to junior loans. Here, "optimal" means that it minimizes the size of the interval of network densities for which bankruptcies likely spread widely. The optimal multiplex networks have on the order of 50% to 100% more senior loans than junior ones. As banks' leverage (i.e., assets divided by net worth) increases, this "optimal seniority ratio" increases, meaning that more loans should be senior rather than junior in order to minimize the set of network densities such that cascades are likely large. These results indicate what types of "seniority-multiplex" interbank networks are most insusceptible to large cascades of default.
The most recent scheme for financial regulation, called Basel III, emphasizes the liability structure of individual banks, but it does not take into account how seniority of debts affect systemic risk. Our results suggest that seniority of debt could be an important focus of financial regulators and of macro-prudential policies. Furthermore, this work contributes to the rapidly growing area of research on contagion in multiplex networks by introducing a model in which nodes can "activate" in more than one way, which we call "multilevel contagion".

A. Related literature
Theoretical studies of contagion in financial networks generally fall into two classes [20]. Some studies consider a particular instance of a financial network, usually a complicated and in some cases empirically measured object. Other studies consider probability distributions over financial networks.
Our study belongs to the latter class, but two papers closely related to our analysis belong to the former [21,22]. Elsinger [21] and Gourieroux et al. [22] also assume a senior-junior structure of interbank assets. Whereas they obtain a clearing payment vector for a given network (as in Eisenberg and Noe [23]), we study the cascade condition for ensembles of random networks in the same spirit as Watts [18] and followup work in physics [13-15, 19, 24-29]. The former approach can be useful to regulators faced with a real system on the verge of a crisis, whereas the latter approach offers elegant theory and indicative suggestions [20]. Although financial networks change over time, there is evidence that their statistical properties (such as degree distributions) can be somewhat stable [30].
B. Model

Multiplex network of loans of different seniority
We consider a multiplex network of N nodes and M layers. Each node represents a financial institution (or a "bank" for simplicity). Each layer is a set of directed edges (i.e., ordered pairs of nodes) that denote loans and, more generally, credit exposures between banks. The layer to which an edge belongs is the loan's seniority, and the vector of layers is sorted in increasing order of Assets (left-hand column) consist of external assets, lS = 4 many senior interbank loans, and lJ = 3 many junior interbank loans. Liabilities (right-hand column) consist of external liabilities, bS = 2 many senior interbank liabilities, and bJ = 3 many junior interbank liabilities. Net worth (a.k.a. equity or, for banks, capital) is the difference between assets and liabilities.
seniority. When a bank goes bankrupt, it repays its liabilities in decreasing order of seniority; that is, it repays its most senior liabilities first, its second-most senior liabilities second, etc. For the moment, we consider a twolayer ("duplex") network, and the M = 2 many levels of seniority are called "junior" and "senior" (labeled J and S), respectively.
The number of banks to which a bank lends funds of seniority α ∈ {J, S} (i.e., the bank's out-degree in layer α) is denoted by l α . Likewise, the number of banks from which a bank borrows funds of seniority α (i.e., the bank's in-degree in layer α) is denoted by b α . For simplicity, we assume that the sizes of loans (i.e., the notional values) are the same, so we can consider the networks as unweighted. Thus, the out-degree and the in-degree correspond to the bank's total volume of lending and borrowing, respectively.
Banks may also hold assets and issue liabilities outside the banking system. (For instance, external creditors may lend to banks in the form of demand deposits.) The balance sheet of a typical bank is illustrated in Fig. 1.

Multiple types of default
In a model with two levels of seniority of debt, there are two types of defaults (bankruptcies): junior-and seniordefaults. A bank is in junior-default if and only if its capital (a.k.a. equity or net worth; see Fig. 1) is negative, meaning that it cannot pay all of its junior debts. A bank is in senior-default if and only if its capital is so far below zero that it cannot pay its all of its senior debts nor any of its junior debts. Note that banks in senior-default are necessarily in junior-default as well.
We assume that when a bank goes into junior-default, it cannot repay any of its junior-level liabilities, and when a bank goes into senior-default, it cannot pay any of its junior liabilities nor any of its senior liabilities. Said differently, we assume that loss given default of seniority α is 100% for interbank liabilities of seniority of α and lower. This assumption departs from previous cascade models of financial contagion, such as that of Gai and Kapadia [1], in which loss given default is 100% for all interbank liabilities, no matter their seniority. Table I makes this assumption concrete: the value of a bank's debt is equal to some positive value (say, 1 unit of currency) if the bank is solvent (i.e., if its equity is nonnegative); the value of the bank's junior debt falls to zero when the bank becomes insolvent, and the value of its senior debt falls to zero when the bank's equity passes a nonpositive threshold value (derived later to be −b J ). TABLE I. Relationship between the equity of a borrower and the value of its junior debts and senior debts held by its creditors. Here, we assume that junior and senior debts are equally valuable when the borrower is solvent, so values of debts are either zero or $1. If the borrower's equity is negative but sufficiently large (≥ −bJ ), then it can pay its senior debts but none of its junior debts; the borrower is in "junior-default". For sufficiently negative equity of the borrower, the borrower cannot pay neither its junior debts nor its senior debts; the borrower is in "senior-default", and all its debts have value zero. equity status junior debt value senior debt value

Thresholds for junior-and senior-default
Initially, all banks are solvent, and a small fraction of banks are chosen to be in junior-default or in seniordefault. These initial defaults could be caused by the loss of external assets. These bank failures cause losses for their creditors, who may default as a result, which may cause one or more of their creditors to default, and so on, resulting in a cascade of default.
Consider some point in time during a cascade. For a certain bank, let m J denote the number of its juniorborrowers that have junior-defaulted, and let m S denote the number of its senior-borrowers that have seniordefaulted. This bank is in junior-default if and only if its losses m J + m S exceeds the bank's equity w, and this bank is in senior-default if and only if its losses m J + m S exceed the sum of its equity w and its junior liabilities b J .
To exploit the solution technique for threshold cascades in networks [13-15, 19, 24], we express these inequalities in terms of losses relative to total out-degree l J + l S : the bank is in default at layer α ∈ {J, S} if and only if [In Appendix A, we generalize the thresholds R α in Eq. (1) to the general case of M ≥ 1 layers.] Figure 2 illustrates a bank in junior-default and a bank in seniordefault in two ways: as losses on a balance sheet (top row) and as contagion in a multiplex network (bottom row). The dynamics of multilevel default contagion can be described as a multiplex version of the threshold model [18,25,27,31]. (Other multiplex generalizations were studied in [13][14][15].) The "response functions" for each layer are If the outputs of F J and F S are both 0, then the bank is solvent; if F J gives 1, then the bank is in junior-default; if F S gives 1, then the bank is in senior-default (and in junior-default). We note in passing that a special case of this model coincides with a special case of the "multistage complex contagion" model of Melnik et al. [29]; for details, see Appendix B.

II. MULTILEVEL CASCADES ON 2-LAYER MULTIPLEX NETWORKS OF JUNIOR AND SENIOR LOANS
This multiplex model adds a new dimension of complexity to previous threshold models [1-3, 18, 19, 27] by considering multiple levels of seniority of debt, so to understand the model we start by simplifying in two other dimensions, the distribution of networks and the distribution of thresholds.
First, each layer is modeled as an independent, locally treelike, random directed network generated by the configuration model. The sparsity and independence of the layers implies that the number of "overlapping edges" (i.e., junior and senior loans between the same pair of banks) is negligibly small for sufficiently large networks [32].
Second, following previous studies [1][2][3], we assume that every bank has the same junior-default threshold R J = w/(l J + l S ). This assumption implies that all banks have the same ratio of capital to total interbank assets. In the real world, banks' capital-to-asset ratios are not identical, of course, but they are somewhat similar [33]. It is straightforward to consider heterogeneous capital-to-asset ratios by considering heterogeneous thresholds [3,19]. , respectively, in that layer. Edges point from lender to borrower. Senior loans are dashed green arrows; junior loans are solid red arrows. In panel (a), the bank labeled A suffers losses of mJ + mS = 2 on its assets side (assets are listed on the left-hand side of the bank's balance sheet) because mJ = 1 of its (lJ = 3 many) junior debtors are in junior-default and because mS = 1 of its (lS = 4 many) senior debtors are in senior-default. These losses exceed bank A's equity (w), so bank A cannot pay off all its (bJ many) junior liabilities. Because of the assumption that loss given default at layer α is 100% for all creditors in that layer, all of A's junior creditors do not receive repayments on their loan to A, and we say that A goes into junior-default. However, bank A does not go into senior-default because it can still pay its senior liabilities (i.e., because mJ + mS ≤ w + bJ ). In panel (b), bank A suffers so many losses (mJ + mS = 5) that it cannot repay its junior creditors nor its senior creditors, so bank A goes into senior-default.

A. Analytical approximation
Let φ J 0 and φ S 0 denote the probabilities that a node is initially in junior-default or in senior-default, where Next we adapt to this model a technique for calculating whether cascades likely spread widely, the cascade condition, introduced in [19] and generalized to other multiplex network models in [13][14][15].

Recursion equations
Consider a bank chosen uniformly at random, and let the network hang down like a tree from this root node by doing a breadth-first search along the directions of the edges. We define φ α t+1 as the probability that a node t+1 hops from the bottom of the tree is in α-default because sufficiently many of its debtors (i.e., its out-neighbors) are in default. The nodes at the bottom of the tree are initially in α-default with probability φ α 0 . To compute φ α t+1 from φ α t , we condition on whether a node located t+ 1 hops above the leaves of the tree is initially in α-default, which occurs independently with probability φ α 0 . If this node is not initially in α-default, then we condition on the number of debtors of this node that have defaulted.
For a sufficiently large graph, the fractions of nodes in junior-and senior-default at the end of the cascade are well approximated by a fixed point (φ J ∞ , φ S ∞ ) of the recursion equations for α ∈ {J, S}, where p α,borrow bα and p α,loan lα denote the in-and out-degree distributions, respectively, on layer α ∈ {J, S}. In Eq. (3), we approximated the numbers of neighbors in junior and senior default as independent Bernoulli random variables because the network layers are independent and hence the number of overlapping edges is negligibly small [32].
In short, we approximate the multiplex graph as a tree according to outgoing edges, and φ α t+1 is the probability that a bank (located t + 1 hops from the leaves of the tree) goes into α-default because of the defaults of its debtors. Note from Eq.
For convenience, we rewrite the recursions (3) as Iterating Eq. (4) to a fixed point (φ J ∞ , φ S ∞ ) gives the probabilities that the root node is in α-default (for α ∈ {J, S}) due to the defaults of its debtors. The quantities φ J ∞ and φ S ∞ are the expected fractions of banks in junior-default and senior-default, respectively, at the end of the cascade.

Multiplex cascade condition
Now we obtain a simple expression that approximately captures, in the limit of network size approaching infinity, for which parameters a vanishingly small seed triggers a cascade that results in a finite fraction of banks in junioror senior-default. The first-order cascade condition is the linear instability of Eq. (4) at the origin (0, 0), which provides a sufficient condition for the numbers of juniorand senior-defaulted banks to grow. The Jacobian matrix of the right-hand side of Eq. (4) is denoted by The first-order cascade condition is that the largest eigenvalue of the Jacobian matrix, λ max (J ), exceeds 1: In Appendix C, we simplify the Jacobian matrix and show that, for this model, its largest eigenvalue equals its trace.

B. Cascade regions
Because there are two types of default, there are two types of "global cascades": the fraction φ J ∞ of nodes in junior-default is large, but the fraction φ S ∞ of nodes in senior-default could be large or small.

Cascades of junior-default (ignoring senior-default)
To start to understand these types of global cascades, consider contagion only on junior loans. The "junioronly" cascade condition is that a junior-default causes on average at least one more junior-default, or equivalently that the top-left entry of the Jacobian matrix, J JJ , exceeds 1. In Appendix C, we show that this junior-only cascade condition is the inequality The set of parameters satisfying this junior-only cascade condition (7) is shown in orange in Fig. 3(a). If the senior-layer is the empty graph (i.e., if l S = 0), then we recover standard cascade models on a singlelayer network [1-3, 18, 19, 27]. Creating more senior loans (i.e., increasing l S ) shrinks the "junior-only" cascade region. This shrinking occurs because a bank's equity w = R J (l J + l S ) increases with its number of senior loans l S [recall Eq. (1)]. Thus, as the expected number l S of senior loans per bank increases, a typical bank's buffer against junior-default (w) increases, which makes a junior-default less likely to cause other junior-defaults.

Cascades of senior-default (ignoring junior-default)
In a similar way, consider contagion along senior loans only. The "senior-only" cascade condition is that a senior-default causes on average at least one more seniordefault, or equivalently that the bottom-right entry of the Jacobian matrix, J SS , exceeds 1. In Appendix C, we show that this senior-only cascade condition is The first-order cascade condition considers defaults triggered by the default of just one out-neighbor (i.e., defaults due to m J + m S = 1); thus, it captures seniordefaults of banks that lack junior debts (b J = 0), which explains the factor p J,borrow 0 in Eq. (8). We found that capturing defaults caused by two bankrupt creditors (using the second-order cascade condition) was not necessary to approximate simulations well, as shown in Appendix D.
The parameters satisfying this senior-only cascade condition (8) are shown in green in Fig. 3(a). This region shrinks with the density of junior loans l J for the same reason that the junior-only cascade region shrinks with l S .

Multiplex cascades
The blue region in Fig. 3(a) is the multiplex cascade region, the set of average out-degrees ( l J , l S ) such that the first-order cascade condition [inequality (6)] is satisfied. Note that, as pointed out in [13, page 3], we have λ max (J ) ≥ max{J JJ , J SS }. Thus, a sufficient condition for the multiplex cascade condition to hold is that at least one kind of default α ∈ {J, S} is supercritical (meaning that J αα > 1) even in the absence of the other kind of default. Thus, the blue region in Fig. 3(a) contains both the orange and green regions.
Importantly, however, the blue region contains pairs of intermediate edge densities ( l J , l S ) outside the junioronly and senior-only cascade regions. In this part of parameter space, neither junior-defaults nor senior-defaults alone suffice to cause global cascades (i.e., J JJ < 1 and J SS < 1), but a large cascade of defaults can nevertheless occur. These cascades, akin to the "multiplexityfacilitated cascades" in [13,15], result from the interaction of junior-and senior-defaults.  (6), drawn as a blue region with a thick, solid boundary] contains the junior-only and senior-only cascade conditions given by Eqs. (7) and (8) and drawn as an orange region (with a dashed boundary) and green region (with a dotted boundary), respectively. Moreover, the multiplex cascade region is asymmetric in the densities of junior and senior loans, ( lJ , lS ). The optimal seniority ratio, defined in Eq. (9), is drawn as a black line. This ratio lS / lJ ≈ 1.79 minimizes the cascade window, the the set of mean degrees satisfying the first-order cascade condition, Eq. (6). The case of equally many junior and senior loans (on average) is shown with a dashed line, which has a slightly larger cascade window. (b) The cascade window as a function of the ratio of senior loans to junior loans, lS / lJ , achieves a minimum size at ≈ 1.79.

C. Optimal seniority ratio
Note that the multiplex cascade region, show in blue in Fig. 3(a), is not symmetric with respect to the average out-degrees in the two layers, l J and l S . This asymmetry of the cascade region results from the asymmetric role that junior and senior loans play in the response function [Eq. (1)]. Given this asymmetry, what ratio of junior and senior loans is optimal in some sense?
Suppose that the average total degree l J + l S is kept constant and that we tune the fraction of loans that are senior. For some loan densities l J + l S , the multiplex cascade condition (6) holds no matter the fraction of senior loans. For example, the line segment {( l J , l S ) : 4 = l J + l S } is contained within the multiplex cascade region in Fig. 3(a), so defaults spread widely no matter the composition of seniority levels. In other cases, such as the line segment of mean degrees satisfying 7 = l J + l S in Fig. 3(a), the cascade condition (6) holds if and only if the fraction of senior loans is very large or moderately small. In cases like this one, having an intermediate fraction of senior debts prevents defaults from spreading widely. Now suppose that we can set the ratio l S / l J of the average numbers of senior and junior loans per bank, but the total density of loans l S + l S can vary. For instance, the number of loans may increase during an economic boom and decrease during a recession, yet the fraction of loans that are senior does not change. Thus, we are considering rays through the origin in Fig. 3(a).
For "seniority ratios" σ ≥ 0, define the cascade window to be the set of average degrees ( l S , l J ) such that l S / l J = σ and such that the first-order cascade condition (6) holds. Figure 3(b) shows this cascade window as a function of the seniority ratio l S / l J . Note that the size of the cascade window is minimized at a unique value of l S / l J , which is approximately 1.79 in Fig. 3. We define the optimal seniority ratio to be this minimizer, or more precisely If this optimal seniority ratio is greater than one (as in Fig. 3), then senior debts should be issued more than junior debts (on average) for the sake of minimizing the size of the set of network densities such that bankruptcies spread widely. That is, if a financial network keeps approximately the same ratio of senior to junior loans but changes the total number of loans (say, over the course of a business cycle), then there should be more senior loans than junior loans in order to minimize the risk of a large cascade of defaults. Intuitively, senior loans are stabilizing because they are less significant early in a cascade: a node in junior-default causes losses (of assets) for its in-neighbors in the junior layer only. Thus, changing some loans from junior to senior makes large cascades less likely, and hence it shrinks the cascade window. However, not all loans should be senior, because that case is identical to all loans being junior, which has a dangerously large cascade window [look at the horizontal and vertical axes of Fig. 3(a)]. In between those extremes lies an optimal ratio of senior to junior loans. That optimal ratio exceeds one [the dashed black 45-degree line in Fig. 3(a)] because senior loans are less contagious, in the sense that nodes in junior-default can still repay their senior debts.
In Fig. 6 of Appendix D, we show that the three types of cascade regions shown in Fig. 3(a) (junior-only, senioronly, and multiplex) closely agree with the fixed point of the recursion equations (4) and with numerical simulations of the model. These comparisons also show that within the multiplex cascade region many nodes end up in junior-default, but many nodes are in senior-default only when senior loans greatly outnumber junior loans. In practice, the number of defaults of any type is of primary concern, so our definition of the optimal seniority ratio in Eq. (9) ignores types of defaults.

D. Effect of varying the thresholds (ratio of equity to interbank assets)
How does the cascade region (and its optimal seniority ratio) change as the banks' threshold R J changes? Here we keep the assumption that banks all have the same junior-default threshold R J , but we vary R J . If banks have a smaller capital ratio R J , then default becomes more likely, so the multiplex cascade region grows, as shown in Fig. 4(a). Conversely, as R J increases, the cascade region shrinks, and it can even splinter into two regions [see the purple regions for R J = 0.25 in Fig. 4(a)]. In cases like this one with two disjoint cascade regions, the optimal ratio defined in Eq. (9) does not exist because the set {x ≥ 0 : λ max (J )| l J =x, l S =σx ≥ 1} is empty for some σ. [A sensible definition for the optimal seniority ratio could be the slope that maximizes the distance from (1) the ray through the origin with that slope to (2) the two cascade regions.] The asymmetry between junior and senior loans also changes with the junior-default threshold R J . In particular, the optimal seniority ratio increases as R J decreases, as shown in Fig. 4(b). In other words, to reduce systemic risk, banks should increase the fraction of debts that are senior as their leverage becomes higher.   (6)] enlarges, and (b) the optimal ratio of senior to junior loans increases. The first-order cascade condition (6) considers defaults that occur due to one defaulted neighbor (for details, see Appendix C). Thus, when RJ falls below the inverse of an integer, 1/k, nodes with total degree k and with one defaulted neighbor will junior-default, so the cascade region changes at RJ = 1/k, and hence the optimal ratio jumps up at RJ = 1/k. els in increasing order of seniority, and let R 1 denote the threshold for default at the most junior layer. The response function for default at level i, derived in Appendix A, is By convention, sums of the form 0 k=1 are zero.

A. First-order cascade condition
The cascade condition, a straightforward generalization of the one for M = 2 layers in Sec. II A 2, is that the Jacobian matrix J M ∈ R M ×M has largest eigenvalue exceeding one. The (i, j) entry of J M is Therefore, we can analytically express λ max (J M ) by using the degree distributions and the threshold value R 1 on the most junior layer. This expression immediately gives the first-order cascade condition, trJ M > 1.

B. Distinguishing more seniority levels reduces risk of large cascades of default
If we realize that not all loans have the same seniority level, how does vulnerability to large cascades change? For simplicity, we consider "splitting" an Erdős-Rényi random graph into M independent, identically distributed layers (as in [13]). That is, we compare a singlelayer Erdős-Rényi random graph with mean out-degree z to a multiplex Erdős-Rényi random graph with mean out-degree z/M in each of the M layers.
The Jacobian matrix J M -ER for an M -layer directed Erdős-Rényi random graph with edge density l i in each layer i ∈ {1, 2, . . . , M } is, from Eq. (11), where the incomplete gamma function Γ (x, y) ≡ ∞ y u x−1 e −u du and the gamma function Γ(x) ≡ Γ(x, 0). Figure 5 shows the resulting cascade region (i.e., the parameters satisfying trJ M -ER > 1) for M ∈ {1, 2, 3, 4} many Erdős-Rényi layers that each have mean out-degree l i = z/M . Here, the parameters are the threshold R 1 for default at the most junior level (horizontal axis) and the mean total out-degree z (vertical axis).  Fig. 5 that the cascade region shrinks with the number M of seniority levels, meaning that the system is less vulnerable to large cascades of default. (By contrast, in the model in [13], the cascade region grows with M .) For some capital-to-interbank-asset ratios R 1 , the cascade region is even eliminated as M grows (e.g.,

Notice in
The reason the cascade region shrinks with M is that making a loan more senior makes it less significant early in a cascade. For instance, if M = 1, then a defaulted node reduces the assets of all of its in-neighbors, whereas if M > 1, then only the in-neighbors in layer 1 lose an asset, so less contagion occurs. The decline in importance of more senior layers is captured by the multiplicative factor i−1 k=1 p k,borrow 0 in Eq. (11c) and by the exponential factor in Eq. (13). In short, distinguishing more types of seniority makes more interbank debts insignificant (early in a crisis); hence a systemic crisis is less likely.
This result hinges on the assumption that banks' buffers against insolvency R 1 remain constant as the number of seniority levels (M ) grows. It is possible that if there were more seniority levels, then banks would erode their buffers against insolvency, R 1 , thereby pushing the system back toward the cascade region, where bankruptcies likely spread widely.

IV. CONCLUSION AND DISCUSSION
We model seniority of debt using a multiplex network, and we study the likelihood of bankruptcy spreading widely using a generalized cascade condition. The model has interesting tradeoffs. Whereas self-interested banks would prefer to make their loans at the most senior level, a mixture of junior and senior debts optimally reduces systemic risk, in that it minimizes the set of network densities such that cascades are likely large. For two types of seniority, we show that the optimal multiplex networks have on the order of 50% to 100% more senior debts than junior debts. Such disparity between individual interests and system-wide stability is the "regulator's dilemma" [34].
The seniority of debt is just one dimension of multiplexity in financial networks. Other dimensions of debt include the maturity of loans and whether loans are collateralized [8,9]. Furthermore, other important interactions include the trade of financial assets [35] and common exposures (i.e., multiple institutions holding the same financial assets) [9,36]. We hope our multiplex model will stimulate further research on these many types of multiplexity in financial markets. Here, we focus on cascades in the interbank network; for this purpose, we do not need to distinguish between default at the most senior level (M ) from complete default because both have the same effect on the banks that had lent to the defaulted bank.
Rearranging the strict inequality in Eq. (A1) and dividing by the total lending M α=1 l α > 0 gives the response function in Eq. (10).
Appendix B: Relationship with "multistage complex contagion" Our model is related to the "multistage complex contagion" model of Melnik et al. [29]. In their model, nodes exist in one of three states: inactive, active, and hyper-active. Their hyper-active nodes are active nodes with greater influence on their neighbors. To see the commonality between the models, consider our model with every node having the same junior threshold R J and with the multiplex network consisting of two identical layers (i.e., all the multiplex edges are "fully overlapped" [17,32]). Then every neighbor in junior-default (respectively, in senior-default) contributes m J + m S = 1 (respectively, m J + m S = 2) in the numerator of the response function. Thus, this model is equivalent to a special case of the model in [29] in which (1) the "bonus influence parameter" β (which captures the extra influence of hyper-active nodes) takes the value 1; (2) the network is a directed single-layer graph; and (3) the thresholds for activation and hyper-activation are R J and R J + b J /(l J + l S ) = R J + b J /(2l J ), respectively. To model real financial systems, however, edges should be only partially overlapped, as in the percolation models studied in [17,32]. Extending our multilevel contagion model to such a partially overlapped case is an important avenue for future research.
Appendix C: Derivation of the first-order cascade condition Now we obtain a simple expression that approximately captures for which parameters a vanishingly small seed leads to a cascade that results in a finite fraction of banks in junior-or senior-default. Note that if the threshold R J > 0, then (0, 0) is a fixed point of the recursion (4) [because B k m (0) ≡ 1 m=0 and F α ( l, b, 0) ≡ 0 provided that R J > 0]. The first-order cascade condition is the linear instability of Eq. (4) at this fixed point at the origin (φ J t , φ S t ) = (0, 0) in the double limit φ J 0 → 0 and φ S 0 → 0. This linear instability provides a sufficient condition for the numbers of junior-and senior-defaulted banks to grow (at least initially). The Jacobian matrix of the right-hand side of Eq. (4) is (C4) Note that det J = 0. Thus, from Eq. (6), the largest eigenvalue of the Jacobian is λ max (J ) = trJ = J JJ + J SS . It should be pointed out that this equality, λ max (J ) = trJ , does not necessarily hold true in other variants of multiplex contagion models. For example, in multiplex models with (independent) undirected networks and/or an exogenous senior-default threshold R S , one would generally have λ max (J ) = trJ . A more detailed explanation is given in Appendix E. . The junior-default threshold of every node is RJ = 0.18 (as in Fig. 3). The axes are the edge densities lJ and lS (i.e, the average numbers of junior and senior loans per bank). The solid blue, dashed orange, and dot-dashed green lines surround the multiplex, junior-only, and senior-only cascade regions [i.e., the sets of values of ( lJ , lS ) that satisfy the inequalities (6), (7), and (8), respectively]. In panels (a) and (b), the grayscale in the background shows the fixed points φ J ∞ and φ S ∞ of the recursion (4), begun from the initial condition φ J 0 = φ S 0 = 5 × 10 −4 . In panels (c) and (d), the grayscale in the background shows the fraction of nodes in junior-and senior-default, respectively, in numerical simulations with 10 4 nodes and 5 banks initially in senior-default, averaged over 75 simulations. In the upper-left part of all four panels, where most loans are senior, the fractions of nodes (φ J ∞ , φ S ∞ ) in junior-and senior-default at the end of the cascade are both ≈ 1. By contrast, in the lower-right part, where most loans are junior, the fraction φ J ∞ of nodes in junior-default is large [φ J ∞ ≈ 1; panels (a) and (c)], whereas the fraction φ S ∞ of nodes in senior-default is ≈ 0.4 [see the light-gray region surrounded by the dashed orange line in panels (b) and (d)].