Introduction

Nestedness was originally proposed to uncover biogeographic meta-community patterns of occurrence of species and patterns of interaction among species in mutualistic ecological networks in which mutually beneficial interactions occur between participants of two distinct sets1,2,3,4,5. Typically, nestedness has been used to capture the extent to which more specialist species interact with proper subsets of species that, in turn, interact with more generalist ones. In ecological mutualistic networks, the nested architecture has been shown to minimize competition between species, and therefore to enable the system to foster greater biodiversity4. In particular, because in a nested system specialist species tend to interact only with generalist species, and because the latter tend to be less vulnerable than the former, nestedness is expected to amplify the chances of survival of rare species. A recent work, however, has suggested that decreased risk of extinction is distributed heterogeneously across the nodes of ecological networks. In particular, evidence has shown that there is a negative relationship between nodes’ contributions to the nested architecture of the system and their individual survival benefits6.

Applications of nestedness beyond biological ecosystems are not new6,7,8,9,10. For instance, recent studies have suggested that the trajectories followed by the productive structures of countries and regions tend to be shaped by the underlying product space in which any two products are connected if they are exported by two or more countries11. Similarly, it has been suggested that the structure of the taxonomy network between products resulting from the export of countries is associated with countries’ potential growth and development paths12. Moreover, recent work has concentrated on the nestedness of economic systems to shed light on the economic geography of domestic and international trade13. In particular, it has been suggested that industry–location networks display a nested structure that tends to remain stable over time and can help predict the evolution of countries’ product space and industrial reconfigurations. Since the diversity of products that countries export has direct bearing on economic growth13, understanding the underlying nested structure emerging from trade can therefore help design more effective policies aimed at strengthening and sustaining countries’ economic prosperity.

Traditionally, scholars have investigated a system’s nestedness by formalizing the bipartite networks in which a node belonging to a group is assumed to be linked with another node in a different group if there is an interaction between them14,15,16,17,18,19,20. This has also been the case with most empirical studies of the international trade between countries7,8,13. Typically, in a bipartite trade network, a set of nodes represents the countries and another set includes the industries to (from) which the countries export (import)13. However, a bipartite network connecting countries to (exported or imported) products cannot account for the full extent of interactions that typically occur among countries in the international production network underpinning the global value chain.

Indeed, countries are traditionally involved in economic transactions within and across multiple industries. In addition, a large number of transactions can originate from, and terminate at, the same country, both within and across industries, thus contributing to the various production stages along which intermediary products are transformed into final ones21. A bipartite network connecting countries to products would be unable to fully represent all such transactions. It neglects the possible transactions within and across industries, and does not disentangle transactions within the same country from those occurring between different countries. Even if we considered the one-mode projections of the bipartite network19,20,22, such as the product-to-product or country-to-country networks, we would only be able to focus on one type of interaction at a time, and in any case we would be unable to assess the assembly patterns among the various production stages to which countries contribute. Moreover, even when trade networks are formalized as multiplex networks23, in which the nodes are the countries and the layers are the industries in which countries trade with one another, connections between countries would only be allowed within layers, and any involvement of countries in relationships between industries would therefore be neglected.

Transactions of goods or services between industries within and across countries are related to the production stages into which the global value chain can be articulated21. Thus, to properly evaluate the nestedness of countries with respect to production stages as well as the nestedness of production stages with respect to countries, a more comprehensive approach to trade would be needed that combines both international and domestic transactions occurring within and across the various stages of the global value chain. In this work, we take a step in this direction and investigate economic nestedness using a multi-layer representation of the worldwide production network24,25.

To build this multi-layer network, we consider the World Input-Output Database (WIOD)26, covering data on exchange of intermediate and final products and services among 43 countries and 57 different economic activities (industries) in the period from 2000 to 2014. In this multi-layer network, each economic activity is represented as a layer, and each layer is populated by the 43 countries in our data set. Connections are directed from sellers (i.e., countries selling a product or a service) to buyers (i.e., countries purchasing a product or service). A connection is established between any two countries when there is an economic transaction between them either within the same industry (intra-layer connections) or across different economic industries (cross-layer connections)26. Moreover, in this multi-layer network, a given country can exchange products or services to itself when a transaction takes place from one industry to another or within the same industry, and the same country is involved both as a seller and as a buyer.

Based on the multi-layer network, to assess nestedness we construct the buyers’ and sellers’ participation matrices in which buyers’ and sellers’ involvement in transactions within and across layers can be measured. Our findings suggest that the nested structure of these matrices is similar to the one uncovered in ecological networks1,5. Unlike other studies of nestedness based on bipartite trade networks7,13 or one-mode projections of bipartite networks8, we draw on countries’ involvement in the various stages of the global value chain, and investigate the nestedness of countries (with respect to production stages) and of production stages (with respect to countries). We show how values of country- and transaction-based nestedness vary over time, and distinguish between the cases in which suppliers or buyers are involved in the transactions. To assess the statistical significance of our findings, we compare the actual values of country- and transaction-based nestedness with the ones obtained using appropriate null multi-layer models in which links are reshuffled while the countries’ or layers’ degree distributions, respectively, are preserved. We further evaluate how individual countries and individual industries contribute to nestedness by drawing on null models in which the connections of each country or each industry, respectively, are reshuffled one at a time. We then argue in favor of the salience of our results for the study of economic stability and growth as well the system’s vulnerability to exogenous shocks. Finally, because multi-layer networks can be found across a variety of biological, technological and social systems, we discuss the implications that our proposed approach to measuring nestedness can have beyond trade, for a wide range of empirical domains.

Results

The data set

Our study draws on data from the WIOD (Release 2016) covering 28 EU countries and 15 other major countries in the world within the period from 2000 to 2014. For every year, a World Input-Output Table (WIOT) is provided in current prices, expressed in millions of US dollars (USD). Each table represents economic exchanges among the 56 economic activities (industries) in each country and their respective final demand. The final demand is represented by five separated components: the final consumption expenditure, the final consumption expenditure by non-profit organizations serving households (NPISH), the final consumption expenditure by government, the gross fixed capital formation, and the changes in inventories and valuable. For the purpose of this work, the five final demand components were combined into a unique aggregated component representative of all product consumption (i.e., individuals, non-profit organizations, and enterprises), capital formation, governmental expenditure, and changes in inventories.

Figure 1 shows a network representation of the aggregated economic interactions among countries in all sectors of activity in 2010. The nodes of the network in Fig. 1 represent the countries, links refer to trade, and the intensity of the color of links between countries as well as their width vary as a function of the total amount of value exchanged between the connected countries across all economic activities. Finally, each node’s size in Fig. 1 reflects the value exchanged within the corresponding country. Indeed the international production network comprises both a domestic and a strictly international trade component. Thus, to account for this, the size of each node was made proportional to the sum of the corresponding country’s internally exchanged products/services, i.e., the sum of the value of all intermediate exchanged inputs and/or consumption within the country.

Figure 1
figure 1

Network of the overall worldwide trade network in 2010. Network representation of the total amount exchanged between and within countries across all 57 economic industries in 2010. The shade of the links between countries as well as their widths are proportional to the total amount (in millions of US dollars) exchanged between the connected countries. The darker the color, the greater the amount exchanged between the countries. Each node’s size is proportional to the value exchanged and/or consumed within the corresponding country.

Notice that, while the WIOD provides the most complete publicly available representation of trade between countries and industries on a large international scale, the data set is restricted to a limited sample of countries and industries. On the other hand, while other available data sets account for more countries and industries (e.g., the United Nations COMTRADE data), they do not provide as detailed information as the WIOD on single economic transactions, and cannot therefore be used for the analysis of the global value chain. Thus, the price of using a more detailed description of trade for studying the international production network is paid in terms of a coarse-grained description of the industrial sectors and of the incompleteness of economic transactions, which in principle may affect the results.

To address the shortcomings of using bipartite networks to study nestedness, in what follows we shall propose an approach based on a multi-layer trade network in which every layer represents an economic industry (i.e., a set of products or services classified as similar given their nature and economic function), populated by the trading countries that, unlike what happens in a multiplex network, can now trade with themselves or with other countries both within and across layers. Notice that, in what follows, we shall use the terms “product” (or “service”), “economic activity”, and “industry” interchangeably to refer to a single layer of the network, which in turn may represent either a single (intermediary or final) production stage at which an economic transaction can occur or the final consumption.

The multi-layer trade network

Based on data from the WIOD, we start by constructing the multi-layer trade network reproducing the complex system of transactions within and between industries and within and between countries. To this end, we obtain a block matrix including: (i) 57 diagonal sub-matrices, each referring to transactions within one single layer (i.e., 56 sub-matrices representing the economic activities showed in Table S1 and one sub-matrix representing the sum of the five components resulting in the final demand); (ii) 3,192 off-diagonal matrices representing transactions between pairs of distinct layers. Each of the square diagonal and off-diagonal sub-matrices has 43 rows (columns) corresponding to the countries showed in Table S2.

Thus, each cell in the resulting block matrix provides the USD values of products and services exchanged within and across aggregated economic activities (industries) and within and across countries. The block matrix is very dense and visually little informative. For this reason and for illustrative purposes, Figure 2A shows a simplified matrix displaying the data provided by the WIOD on a reduced scale. The matrix in Fig. 2A shows the transactions among four countries ci concerned with three hypothetical industries αi. A cell \({a}_{{c}_{i},{c}_{j}}^{{\alpha }_{i}}\) is black if there is a transaction (i.e., the USD value exchanged is different from zero) between country i and country j within industry αi, and white if there is no such transaction (i.e., value exchanged equal to zero). Notice that transactions are not symmetric, and thus the buyers (columns) and sellers (rows) are likely to play different roles in the structural organization of the worldwide production network. Figure 2B provides a visual representation of the adjacency matrix reported in Fig. 2A. Notice that the three-layer network includes: (i) transactions between different countries within the same industry, represented by the intra-layer connections (e.g., transactions from Brazil to China in layer α1); (ii) transactions between different countries across different industries, represented by the cross-layer connections (e.g., transactions from Brazil in layer α1 to Spain in layer α2); (iii) transactions across industries involving the same country, represented by cross-layer connections departing from and point to the same node (e.g., transactions from layer α1 to layer α2 from and to the United States); and (iv) transactions within the same industry and involving the same country, represented by self-loops of length one (e.g., transactions in layer α1 from and to the United States). Notice that these self-loops are displayed as black diagonal cells in the diagonal matrices in Fig. 2A, and as arrows departing from and pointing to the same node in Fig. 2B.

Figure 2
figure 2

Schematic representation of a multi-layer trade network. (A) The adjacency matrix containing four countries ci and three hypothetical products (layers) αi. The three diagonal sub-matrices represent the connections among countries in the same layer, whereas the other off-diagonal sub-matrices represent the cross-layer connections among countries. (B) Visual representation of the corresponding multi-layer network built from the matrix. The cross-layer connections are represented by dashed lines and the intra-layer connections by solid ones. For both types of connections, the arrow represents the directionality of each economic exchange originating from a seller and pointing to a buyer. Self-loops of length one represent transactions occurring within the same country and the same layer.

We define a multi-layer network as a pair M = (G, C), where G = {Gα; α {1, …, k}} is a family of directed graphs Gα = (Xα, Eα) called layers of M, and C is the set of interconnections between nodes belonging to different layers Gα and Gβ with α ≠ β. Formally,

$$C=\{{E}_{\alpha \beta }\subseteq {X}_{\alpha }\times {X}_{\beta };\,\alpha ,\beta \in \{1,\ldots ,k\},\alpha \ne \beta \}.$$
(1)

The elements of C are called “cross–layer connections”, and the elements of each Eα are called “intra–layer connections”. On the one hand, given a layer Gα corresponding to one of the 56 economic industries or the final demand, the Nα = 43 nodes corresponding to the countries are denoted by \({X}_{\alpha }=\{{c}_{1}^{\alpha },\ldots ,{c}_{{N}_{\alpha }}^{\alpha }\}\), and the intra-layer adjacency matrix of each layer Gα will be denoted by \({A}^{[\alpha ]}=({a}_{ij}^{\alpha })\), where:

$${a}_{ij}^{\alpha }=\{\begin{array}{ll}1 & {\rm{if}}\,({c}_{i}^{\alpha },{c}_{j}^{\alpha })\in {E}_{\alpha }\\ 0 & {\rm{otherwise}},\end{array}$$
(2)

for 1 ≤ i, j ≤ Nα and 1 ≤ α ≤ k. An intra-layer connection is established from node i to node j in layer α if there is at least one economic exchange from country ci to country cj in the same layer α. Notice that \({a}_{ii}^{\alpha }=1\) would refer to transactions occurring within the same country ci and the same layer α. On the other hand, the cross–layer adjacency matrix corresponding to Eαβ is the matrix \({A}^{[\alpha ,\beta ]}=({a}_{ij}^{\alpha \beta })\) given by:

$${a}_{ij}^{\alpha \beta }=\{\begin{array}{ll}1 & {\rm{if}}\,({c}_{i}^{\alpha },{c}_{j}^{\beta })\in {E}_{\alpha \beta }\\ 0 & {\rm{otherwise}}.\end{array}$$
(3)

A cross-layer connection is established from node i in layer α to node j in layer β when there is at least one economic exchange from country ci in layer α to country cj in layer β. Once again, \({a}_{ii}^{\alpha \beta }=1\) would imply that a transaction occurs within the same country ci from layer α to layer β.

Nestedness of countries and products

In economic systems, nestedness is akin to maximal possible diversification subject to the constraints of international competition. For instance, in the simplified case of international trade between countries with no domestic intra- and inter-layer exchange, an economic system can be regarded as nested when a number of countries export (import) a proper subset of the products exported (imported) by other countries, which in turn export (import) a (larger) proper subset of the products exported (imported) by other countries, and so forth (see Figure 3). Countries can, therefore, be hierarchically organized into progressively richer levels such that as countries move from an inner to an outer level they are involved in the trade of more products. Notice that, unlike the simplified case of international trade in this example, our multi-layer perspective enables us to capture the intricacies of both domestic and international trade as well as countries’ involvement in multiple stages of the global value chain.

Figure 3
figure 3

Nestedness of country-product connections. (A) Matrix representation of the connections between countries and exported products ordered by degree centrality. (B) Bipartite network of country-product connections. Countries are hierarchically organized starting from the one (c1) that exports products that all other countries export. Notice that such bipartite network representation does not distinguish between transactions occurring within the same country and transactions involving different countries. This network representation is also unable to distinguish between transactions across different industries and transactions within the same industry, and therefore does not capture the full organization of the global value chain.

Moreover, a nested structure of the bipartite country-product network would imply that countries in outer levels (e.g., country c4 in Fig. 3) are less similar to countries in inner levels (e.g., country c1 in Fig. 3) with respect to the products traded than vice versa27. As a result, the countries belonging to the core of the system are those associated with the largest degree of similarity to all other countries with respect to the products exported (imported). Yet, while the countries in the core of the system are connected to fewer products than the countries in outer levels, the former do not necessarily concentrate their exports (imports) on any of the products they trade. Indeed their export (import) profile may be characterized by a homogeneous distribution of trade across a (relatively small) number of products. On the other hand, the countries in the outermost level are those with the most diverse trade profile in the system. That is, they are connected to all products traded in the system, and among these products there is at least one of which they are the sole traders. However, while these countries in the outermost level are connected to more products than the countries in inner levels, they do not necessarily spread their efforts uniformly across products. Indeed, among the many products they trade, they may well concentrate most of their economic transactions on a select minority of them.

The idea of hierarchically organizing the elements of an economic system into progressively richer subsets can also be applied to (imported or exported) products. In particular, the core products of a system are the smallest number of products imported (exported) by the largest number of countries. In turn, the core products represent a proper subset of the products imported (exported) by other countries, and so forth up to the final set of products imported (exported) by the countries in the outermost level. As products move from an inner to an outer level, they are traded by fewer countries and only in larger combinations with other products. At one extreme, an economy may be organized in such a way that all products except one are traded by all countries, while the remaining product is traded only by one country. In this case, the only product controlled by one country occupies the outer level, while all others belong to the core (most nested part) of the system.

Core products, being the ones with the highest country-level substitutability, are likely to be based on the most widespread know-how, technologies, and competences. Less nested and more “peripheral” products, on the other hand, are likely to be more country-specific and characterized by lower degrees of country-level substitutability. It may be speculated that, if low degrees of product nestedness may secure high returns to the producing countries, it may also prompt a large degree of market instability should an external shock affect the few countries that are the sole suppliers of the product.

Nestedness in the multi-layer network

We now extend the notion of nestedness so far discussed in connection with a bipartite network to account for the complexity of a multi-layer network in which transactions can be both domestic and international and can originate from, and point to, different industries within different countries. More specifically, unlike the simplified case of the bipartite country-product network, in a multi-layer trade network a given country is not simply connected to products but, more properly, it buys or sells products within specific transactions that take place from an industry to another or even within the same industry. Moreover, these transactions may have different countries as suppliers and buyers, or they may even occur within the same countries. The multi-layer perspective, therefore, enables us to shift focus from products (industries) to transactions, and to draw on these transactions to evaluate the nestedness of both countries and production stages within the global value chain. For instance, the core suppliers can be defined as the largest set of countries involved as sellers in the smallest number of production stages in which all other countries are involved as suppliers. By contrast, the supplier in the outermost level would be the one involved as a seller in at least one production stage in which no other country is involved. Similarly, we can assess the nestedness of production stages in the global value chain, and measure the degree to which country-poor production stages are proper subsets of country-rich ones.

Before we can compute nestedness using the WIOD, we need to build a matrix, called the participation matrix, in which rows are the countries and columns are all possible ordered combinations of any two layers (i.e., production stages or economic transactions between or within industries). This means that, for every year, we have a participation matrix with 43 rows and 57 × 57 = 3,249 columns. Moreover, in each layer, we can distinguish between buying countries, i.e., countries with incoming links, and selling countries, i.e., countries with outgoing links. Thus, for every year we built two matrices – the buyers’ and the sellers’ participation matrices – where a generic element, \({B}_{{c}_{i},\alpha \beta }\) or \({S}_{{c}_{i},\alpha \beta }\), is equal to 1 if there is a link, respectively, ending at or starting from country ci in layer α and starting from or ending at layer β, and zero otherwise. Figure 4A,B shows the buyers’ and sellers’ participation matrices, respectively, in which the black color refers to a value of 1 in the corresponding matrix, while the white color refers to zero.

Figure 4
figure 4

Nested organization of buyers’ and sellers’ participation matrices. Buyers’ (A) and sellers’ (B) participation matrices in 2010. A generic element Bc,αβ (Sc,αβ) of the matrix is equal to 1 (black square) if there is a link ending (starting) at (from) country ci in layer α and starting (ending) from (at) layer β, and is equal to zero otherwise (white square). In a perfectly nested matrix, the black cells should fill in the upper triangular portion of the matrix (above the secondary diagonal) and the white cells should lie in the lower one (below the secondary diagonal). (C,D) Nestedness calculated over the years from 2000 to 2014 for buyers’ (C) and sellers’ (D) participation matrices.

Drawing on the buyers’ and sellers’ participation matrices, we computed the nestedness of the multi-layer network. To this end, first we reordered the columns and rows by decreasing degree centrality, i.e., respectively, the number of countries participating in transactions, and the number of transactions in which countries are involved17,28. We then computed nestedness by using the measure proposed by Almeida-Neto et al.2, referred to as NODF and here denoted by N. More specifically, this measure N is based on two properties: decreasing fill (DF) and paired overlap (PO). Let us suppose that the above defined participation matrices have m rows and n columns and consider a pair of rows (i, j) such that i < j and a pair of columns (k, l) with k < l. Let MT be the marginal total (i.e., the sum of ones) of any column or row. For any pair (i, j) of rows, DFij is defined as equal to 100 if MTj < MTi and zero otherwise. Similarly, for any pair of columns (k, l), DFkl is equal to 100 if MTl < MTk and zero otherwise.

The paired overlap can be computed as follows. For any pair of columns (k, l) such that k < l, POkl is the percentage of ones in column l that are located at the same row positions as the ones in column k. Similarly, for any two rows (i, j) such that i < j, POij is the percentage of ones in row j that are located at the same column positions as the ones in row i. Formally, given any left-to-right column pair and any up-to-down row pair, the degree of paired nestedness (Npaired) is defined as

$${N}_{paired}=\{\begin{array}{ll}0 & {\rm{if}}\,D{F}_{paired}=0;\\ PO & {\rm{if}}\,D{F}_{paired}=100.\end{array}$$
(4)

The measure of row (column) nestedness Nrow (Ncol) is calculated by averaging all values of paired row (column) nestedness. Notice that the total number of values of row and column paired nestedness for a matrix with n rows and m columns is n(n − 1)/2 and m(m − 1)/2, respectively. Thus, we define the nestedness of the whole matrix as

$$N=\frac{\sum \,{N}_{paired}}{\frac{n(n-1)}{2}+\frac{m(m-1)}{2}}.$$
(5)

So conceived of, the values of nestedness range between 0 and 100.

In our case, the total nestedness among rows is a measure of nestedness of countries with respect to production stages (i.e., economic transactions here defined as combinations of products or industries). It refers to the degree to which a subset of countries are involved in transactions between industries that are a proper subset of the more diverse transactions in which other countries are involved, and so forth. That is, the countries controlling country-poor stages of production (or transactions) constitute proper subsets of the countries involved in country-rich stages of production. Thus, in a perfectly (country-based) nested economic system, the core country would be the one involved in the smallest set of transactions within the international production network in which all other countries are involved. The most peripheral country lying in the outermost level, by contrast, would be the one involved in all transactions in which all other countries are involved and in at least one transaction in which no other country is involved. Notice that to have a perfectly (country-based) nested economic system, no pair of countries can be involved in the same (number of) production stages; yet, any pair of countries may differ by more than one associated production stage.

On the other hand, nestedness among columns quantifies the nestedness of stages of production or economic transactions with respect to countries. This refers to the degree to which a number of stages of production involve countries that constitute a proper subset of the countries involved in other production stages, and so forth up to the stage at which all countries are involved. Similarly, in a perfectly (transaction-based) nested system, the core production stage would be the one in which all countries are involved, while the most peripheral transaction lying in the outermost level would be the one controlled only by one country. Once again, to have a perfectly (transaction-based) nested system, no pair of production stages or transactions can be controlled by the same (number of) countries; yet, any two transactions may differ by more than one involved country.

Finally, the matrix nestedness is a measure of the nestedness of the whole multi-layer trade network in a given year. It thus combines country-based and transaction-based nestedness. In this sense, a perfectly nested economic system would be both perfectly country-based and transaction-based nested. Thus, no pair of countries can be involved in the same (number of) production stages, and no pair of production stages can be controlled by the same (number of) countries. In addition, any two adjacent rows (countries) may differ only by one production stage, and any two adjacent columns (production stages) may differ by only one country.

In our multi-layer network, each country can be the buyer or the supplier in each production stage, and therefore the measures of nestedness outlined above can be computed both for buying and for selling countries, in each year. Buyers’ country-based nestedness refers to the degree to which the countries that act as buyers (of intermediary or final products) in buyer-poor stages of production constitute proper subsets of the countries that act as buyers in buyer-rich stages of production. Similarly, sellers’ country-based nestedness refers to the degree to which the countries that act as suppliers in seller-poor stages of production constitute proper subsets of the countries acting as suppliers in seller-rich production stages. Finally, transaction-based nestedness from the buyers’ (sellers’) perspective refers to the degree to which stages of production in which few buyers (suppliers) are involved constitute proper subsets of the production stages in which more buyers (suppliers) are involved.

Figure 4 shows the evolution over time of both country-based and transaction-based nestedness from the perspective of both buyers (Fig. 4C) and sellers (Fig. 4D). Results suggest that, while sellers’ country-based nestedness remained constant over the years, buyers’ country-based nestedness fluctuated between 2003 and 2011. Moreover, sellers’ nestedness remained higher than buyers’ nestedness constantly over the years. In particular, sellers’ country-based nestedness was remarkably higher than buyers’ country-based nestedness, thus suggesting a more structured organization of countries’ involvement in production stages in which countries acted as sellers of intermediate and final products than in stages where countries acted as buyers. Finally, it is worth noting that the ordering between country-based nestedness and transaction-based nestedness varies depending on the role of countries as buyers or sellers. When countries participated in transactions as buyers, the nestedness of production stages with respect to countries was larger than the nestedness of countries with respect to production stages. Vice versa when countries acted as sellers. The structural organization of countries and productions stages was therefore affected by the nature of the economic transaction.

It is worth noting that even matrices with random entries and optimally reordered rows and columns can exhibit some degree of nestedness28. This is especially the case of matrices populated by a large number of ones, since density amplifies the probability of overlapping rows/columns. It is therefore essential to assess whether the values of nestedness computed with the real data statistically significantly differ from the ones that could be obtained using matrices with random entries. To this end, an appropriate null model for the multi-layer network is needed, on which nestedness can be calculated.

A full randomization of the matrix would not represent an appropriate null model, because it would completely destroy the countries’ degree distribution in the multi-layer network as well as the degrees of countries in each layer. Besides, the number of connections between pairs of layers would not remain unchanged. On the one hand, an appropriate null model for country-based nestedness would preserve the degree of each country in each layer and across the whole network. On the other, an appropriate null model for transaction-based nestedness would preserve the number of connections linking each pair of layers, i.e., the number of connections linking each layer to itself and to other layers.

Here, we propose two null models that satisfy the above requirements. Figure S1 shows a simple example of how the two null models were constructed for testing sellers’ country- and transaction-based nestedness. Following Saavedra et al.6, the first null model (Model I) aims to provide a benchmark for assessing the statistical significance of country-based nestedness. For each country ci and each layer α, Model I keeps unchanged the number of connections pointing to (for buyers) or departing from (for sellers) country ci in layer α, but randomly reshuffles the layers from (at) which these connections originate (terminate). That is, a given country ci in layer α will remain involved in the same number of transactions pointing to (departing from) α, but these transactions will originate from (terminate at) randomly chosen layers among the 57 ones (i.e., layer α itself and the remaining others). In terms of the participation matrix, this is equivalent to reshuffling the ones in each row by blocks of columns that share the same importing (exporting) layer. By replicating this procedure for every row, the resulting matrix preserves the global degree of each node as well as the degree of each node in each layer (i.e., the number of links arriving at (departing from) each node in each layer). In summary, Model I reshuffles both inter-layer and intra-layer connections while preserving the countries’ degree distribution in each layer and across the whole multi-layer network.

The second null model (Model II) aims to provide a benchmark for assessing the statistical significance of transaction-based nestedness. To this end, Model II randomly assigns countries to production stages, while maintaining the same (number of) connections between pairs of layers (including connections of each layer with itself) and the same countries’ degree distributions within each layer as in the real multi-layer network (i.e., it preserves the in-degree distributions for buyers and the out-degree distributions for sellers in each layer, but not across the whole network). To construct such model, for each layer α, we kept the connections linking α to itself and to all other layers, but reshuffled the countries at (from) which these connections terminated (originated). That is, the connections to (from) layer α were randomly assigned to countries. In terms of the participation matrix, this is equivalent to swapping rows by blocks of columns defined by the same layer at (from) which connections terminate (depart). For instance, given layer α, a block of columns, Bα or Sα for buyers or sellers, respectively, is defined by all pairs of layers exporting to (buyers) or importing from (sellers) layer α (i.e., {αα, αβ, …, αω}). Given any two rows associated with countries ci and cj, random assignment of countries to transactions would then be obtained by swapping the entire entries of row ci with the entries of row cj within block Bα or Sα (i.e., by reassigning to another country the whole set of participations of a given country in transactions in a given block of columns). In summary, Model II randomly reassigns countries to blocks of transactions while preserving the countries’ in- or out-degree distribution in each layer (i.e., the distribution of connections arriving at, or departing from, countries in each layer) and the layers’ degree distribution (i.e., the distribution of connections between pairs of layers).

Drawing on the above null models, we generated an ensemble of matrices, both for buyers and for sellers, to evaluate whether nestedness measured using the real data is statistically significantly different from the values one would expect by chance (see methods). Figure S2 shows the evolution of country-, transaction-based and total nestedness compared with the values obtained using the appropriate null models. In all cases, nestedness computed in the null models is smaller than nestedness found in the real data (at the 5% significance level). Notice that even in the case of sellers, country-based nestedness appears very close to, and yet remains statistically significantly different from, the values one would expect by chance on a comparable multi-layer network with the same countries’ degree distributions within each layer and globally as in the real network.

To further explore the evolution of nestedness, we computed the growth rate of nestedness defined as

$$G(t+{\rm{\Delta }}t)=\frac{N(t+{\rm{\Delta }}t)-N(t)}{N(t)},$$
(6)

where N(t) is nestedness in a given year t and Δt = 1. Figure S3A shows the evolution over time of the growth rate of nestedness for buyers. We can observe an oscillatory behavior with a 2-year period, as well as a remarkable increase in 2005 and a decline in 2008. On the other hand, the growth rate of nestedness for sellers (Figure S3B) displays a less clear oscillatory trend, with only small deviations from zero (Fig. S3B).

Next, we investigated whether variations in nestedness are associated with economic downturns and, more generally, with the global economic performance of countries. There is a growing body of evidence suggesting that countries’ involvement in global value chains is associated with their economic growth and productivity29,30. Here we relied on our measures of nestedness to capture countries’ participation in the international production network. We used data from the World Bank31, and computed the sum of the Gross Domestic Product (GDP) in USD at constant price (2010) of all countries included in our data set. We then examined the relationship between aggregated GDP and the nestedness of the worldwide trade multi-layer network over time. Figure S3C shows the buyers’ total nestedness as well as country-based and transaction-based nestedness as a function of the GDP. Figure S3D, on the other hand, shows the sellers’ total, country-based and transaction-based nestedness as a function of GDP. To quantify the association between nestedness N(t) and total GDP, we evaluated the Pearson correlation coefficient, ρ, and its 95% confidence intervals (CI) using bootstrapping32 (see Table 1). Findings suggest that, except for buyers’ transaction-based and total nestedness, there is a statistically significant and negative relationship between nestedness and GDP.

Table 1 OLS estimates from regression models and Pearson correlation coefficients.

More formally, a simple linear regression model of the relationship between nestedness and GDP in year t, N(t) and GDP(t) respectively, can be written as

$$N(t)=\gamma +\beta \,{\mathrm{log}}_{10}\,{\rm{GDP}}(t)+\varepsilon (t),$$
(7)

where ε(t) is the residual error term for year t (assumed to be independent of the residuals for other years), and the parameters γ (the intercept) and β (the regression coefficient) can be estimated through ordinary least-squares (OLS) estimation. The estimated parameters and corresponding standard errors, p–values, coefficients of determination R2, and Pearson correlation coefficients ρ for sellers’ and buyers’ country-based nestedness (Nc), transaction-based nestedness (Nt) and total nestedness (Ntotal) are shown in Table 1. The estimated curves are displayed in Fig. S3.

Overall, these findings suggest that, as GDP increases, nestedness is expected to decline, and vice versa. It may be speculated that the observed negative association between nestedness and GDP is a reflection of the disorder induced in the system by the countries’ freedom and ability to tap more economic opportunities and achieve a better allocation of resources. In this sense, higher economic prosperity can be achieved at the expense of an ordered organization of the production system. By contrast, results seem to suggest that a decline in economic prosperity might be associated with more restraints on transactions and stronger constraints on countries’ involvement in production stages, thus yielding improvements in global nestedness. While these are simply broad-brush conjectures on associations between economic and structural variables, any attempt to explain any (causal) relationship between nestedness and GDP would clearly require further scrutiny and empirical investigation.

Contribution of countries and industries to nestedness

To investigate the contribution of individual countries and industries to nestedness, here we propose to evaluate the nestedness that would result from the reshuffling of the connections involving each country and each industry individually (see methods section). The general idea is that each country and each industry can be associated with an induced variation in country- and transaction-based nestedness respectively, which in turn can be regarded as reflecting the salience of the country or industry to nestedness6. Indeed this approach would enable us to assess the effects of potential external shocks, such as an unexpected variation in a buyer’s or seller’s involvement in production stages (here simulated through the reshuffling of the buyer’s or seller’s connections at the global level), or the unexpected variation in supply or demand of a specific product (here simulated through the reshuffling of connections originating from or terminating at the corresponding layer). In this sense, the effects caused by such reshuffling on global nestedness would shed light on the influence of countries and products/industries on the global structural organization of the worldwide production multi-layer network.

We define the contributions of country ci and layer α to country- and transaction-based nestedness as the Z–scores calculated, respectively, over an ensemble of multi-layer networks in which the connections involving country ci and layer α are randomly reshuffled. Formally, we have

$${Z}_{{c}_{i}}=({N}_{c}-\langle {N}_{{c}_{i}}\rangle )/\sigma $$
(8)

and

$${Z}_{\alpha }=({N}_{t}-\langle {N}_{\alpha }\rangle )/\sigma ,$$
(9)

where Nc and Nt are the values of country- and transaction-based nestedness, respectively, calculated on the original data, \(\langle {N}_{{c}_{i}}\rangle \) and 〈Nα〉 are the average values of country- and transaction-based nestedness calculated over the ensembles of the matrices resulting from the reshuffling of country ci’s and layer α’s connections respectively, and σ is the standard deviation of nestedness across these ensembles. Thus, a positive (negative) value of \({Z}_{{c}_{i}}\) would imply a decline (increase) in country-based nestedness resulting from the reshuffling of the connections of country ci or, alternatively, a positive (negative) contribution of ci to country-based nestedness. Similarly, a positive (negative) value of Zα implies a negative (positive) effect on transaction-based nestedness resulting from the reshuffling of connections of layer α or, alternatively, a positive (negative) contribution of layer α to transaction-based nestedness.

First, we assessed the contributions of buyers and sellers to country-based nestedness over all years in our data set. Figure 5A shows the influence of individual buyers on country-based nestedness in 2000 and 2014. Findings suggest that an external shock affecting buyers is likely to cause a negative impact on nestedness in both years, i.e., \({Z}_{{c}_{i}}(t) > 0\). In addition, we computed the value of \({Z}_{{c}_{i}}(t)\) for each buyer ci in each year t. Figure 5B shows the evolution of \({Z}_{{c}_{i}}(t)\) over time. Figure 5A suggests that Korea Republic, United States, and Belgium are among the importing countries that most contributed to country-based nestedness. Over the whole observation period, these countries are also among those associated with the largest variability in contribution to country-based nestedness (i.e., with the largest standard deviation \(\sigma [{Z}_{{c}_{i}}(t)]\)). For instance, while Korea Republic is always ranked as one of the suppliers with the largest positive influence on nestedness (Fig. 5A), it is also the country whose contribution is characterized by the largest variability over time.

Figure 5
figure 5

Contribution of buyers and sellers to country-based nestedness. (A) The bars represent the values of \({Z}_{{c}_{i}}\) for each buyer in 2000 (hollow bar) and 2014 (purple bar). The countries are ranked by the corresponding values of \({Z}_{{c}_{i}}\) in 2014 in an increasing order. All buyers contribute positively to country-based nestedness in both years (i.e., \({Z}_{{c}_{i}}(t) > 0\)). (B) Evolution of \({Z}_{{c}_{i}}(t)\) over the years for buyers. The countries highlighted are the ones associated with the largest variability in contribution to country-based nestedness, i.e., with the largest standard deviation of influence, \(\sigma [{Z}_{{c}_{i}}(t)]\), during the observation period. (C) Similarly, the bars represent the values of \({Z}_{{c}_{i}}\) for each seller in 2000 (hollow bar) and 2014 (blue bar). The countries are ranked by the corresponding values of \({Z}_{{c}_{i}}\) in 2014 in an increasing order. All sellers have a positive effect on country-based nestedness (i.e., \({Z}_{{c}_{i}}(t) > 0\)). (D) Evolution of \({Z}_{{c}_{i}}(t)\) over the years for sellers. The countries highlighted are the sellers associated with the largest variability in contribution to country-based nestedness, i.e., with the largest standard deviation of influence, \(\sigma [{Z}_{{c}_{i}}(t)]\), during the observation period.

In the case of sellers, Figure 5C suggests that Luxembourg, Hungary, and Sweden are the exporters characterized by the largest contributions to country-based nestedness in 2014. However, the same ranking was not observed in 2000, unlike the case of buyers that instead almost preserved their ranking in both years. Moreover, it is worth noting that the most influential sellers, ranked as top contributors to country-based nestedness, are not among the exporters that experienced the largest variability in such contribution over the years. Figure 5D shows that Italy, United States, and Romania are the exporting countries associated with the largest standard deviation of \({Z}_{{c}_{i}}(t)\) (i.e., \(\sigma [{Z}_{{c}_{i}}(t)]\)), thus suggesting different production trajectories for buyers and sellers.

To evaluate the contribution of individual economic activities to transaction-based nestedness in the worldwide production network, we followed a similar procedure to the one used for investigating the contributions of countries to country-based nestedness. In this case, we calculated the values of Zα by randomly allocating to countries the connections departing from (sellers) or arriving at (buyers) each layer at a time (see methods). Figure 6A shows the effect of individual layers on the buyers’ transaction-based nestedness in 2000 and 2014. Results suggest that the economic industries that have the largest influence on the buyers’ transaction-based nestedness are the ones related to: sewerage; waste collection, treatment and disposal activities; materials recovery; remediation activities and other waste management services (E37-E39); manufacture of fabricated metal products, except machinery and equipment (C25); and publishing activities (J58). Notice that real estate activities (L68) have the largest negative influence on nestedness in both years.

Figure 6
figure 6

Contribution of industries to buyers’ and sellers’ transaction-based nestedness. (A) The bars represent the values of Zα for each layer α in 2000 (hollow) and 2014 (purple). The layers are ranked by the corresponding values of Zα in 2014 in an increasing order. Almost half of the layers have a positive influence on buyers’ transaction-based nestedness, (i.e., Zα(t) > 0), while several layers have no influence and a minority are characterized by a negative influence. (B) Evolution of Zα(t) over the years for buyers. The layers highlighted are the industries associated with the largest variability in contribution to buyers’ transaction-based nestedness, i.e., with the largest standard deviation of influence, σ[Zα(t)], during the observation period. (C) All layers have a positive effect on the sellers’ transaction-based nestedness (i.e., Zα(t) > 0) both in 2000 (hollow bar) and 2014 (blue bar). (D) Evolution of Zα(t) over the years for sellers. The layers highlighted are the industries associated with the largest variability in contribution to sellers’ transaction-based nestedness, i.e., with the largest standard deviation of influence, σ[Zα(t)], during the observation period.

Just as with the contributions of countries, we measured Zα(t) for each layer α in each year t, and uncovered the layers with the largest variability in contribution to buyers’ transaction-based nestedness over time, i.e., the layers with the greatest standard deviation σ[Zα(t)]. Figure 6B shows that the production sectors with the largest positive and negative contributions to nestedness are also among the ones with the greatest variability in contribution to nestedness over the years.

Finally, we investigated the contributions of individual layers to sellers’ transaction-based nestedness. Figure 6C shows the extent to which the reshuffling of connections involving each industry at a time affects the sellers’ transaction-based nestedness. In this case, all layers have a positive effect on transaction-based nestedness (i.e., Zα(t) > 0). Figure 6D also suggests that the production sectors associated with the largest contributions to sellers’ nestedness are among the ones associated with the greatest variability in such contribution over the years (e.g., manufacture of textiles, wearing apparel and leather products (C13–C15) and accommodation and food service activities (I)).

Discussion

In this work, we argued that the bipartite network of connections between countries and industries cannot fully capture the economic interactions among countries underpinning the worldwide production network and the global value chain. In this study, we proposed to formalize the interactions between countries and between industries by constructing a multi-layer exchange network in which each layer represents an industry and the nodes represent the trading countries. In this network, countries can be connected within and across layers, and the same country can be involved in multiple stages of the global value chain as well as in transactions within the same industry. Thus, the network includes intra- and inter-layer connections that may depart from and point to any country (i.e., inter-layer connections from and to the same country and self-loops of length one are allowed). Based on the multi-layer network, we built two participation matrices, one for buyers and the other for sellers, in which rows are the (buying or selling) countries and columns are all possible ordered combinations of any two layers. We then used these matrices to compute both country-based and transaction-based nestedness, each from the perspective of buyers and sellers.

We showed that, as typically occurs within ecological networks, the structural organization of the participation matrices of buyers and sellers displays a nested signature. Such nested structure is significantly statistically different from the structure one would expect in a multi-layer null model in which connections are randomly reshuffled while the countries’ or layers’ degree distributions are kept unaltered. Our results suggested that, while sellers’ nestedness remained constant over the years, buyers’ country-based nestedness fluctuated between 2003 and 2011. We also uncovered associations between nestedness and GDP, and found that, except for buyers’ transaction-based nestedness, an increase in GDP is associated with a decline in nestedness.

Moreover, we investigated the contributions of individual countries and individual economic industries to country- and transaction-based nestedness, respectively, by reshuffling the connections of one country or one layer at a time, and by comparing the resulting nestedness with the original one. To this end, we computed Z–scores over an ensemble of multi-layer networks, both for buyers and sellers. Results indicated that, while all countries exerted a positive contribution to buyers’ country-based nestedness, a minority of countries played no significant role in sustaining nestedness. These are the countries whose reshuffled connections did not induce any change in nestedness and therefore whose Z–scores did not differ from zero. We further explored variations over time of countries’ contributions to country-based nestedness, and found that the top-ranked contributors tend to be precisely the suppliers associated with the largest variation of such contributions over the years. It is worth noting that, among the top contributors (both buyers and sellers), there are also relatively smaller, developing and emerging countries (e.g., Luxembourg, Korea Republic, and the Czech Republic among the buyers, and Luxembourg and Hungary among the sellers) as well as larger and more advanced countries (e.g., the United States and Belgium among the buyers and Japan and Germany among the sellers). Similarly, among the countries that contributed least to nestedness are not only smaller East European countries (e.g., Croatia among the buyers and Estonia and Czech Republic among the sellers) and developing countries (e.g., India among the buyers), but also large advanced countries (e.g., Japan among the buyers and the United Kingdom and Belgium among the sellers). These findings might therefore suggest that a country’s contribution to nestedness is not necessarily correlated with its economic size. Results also indicated that, while all industries had a positive effect on the sellers’ transaction-based nestedness, a number of them (e.g., mining and quarrying (B) and human health and social work activities (Q)) played no role in sustaining the buyers’ transaction-based nested organization of the international production multi-layer network.

We believe that our multi-layer network perspective can shed a new light on the structural foundations and dynamics of competition between countries and industries in the global value chain, on the global system’s vulnerability to exogenous shocks, on the contribution that each component of the system can make to global nestedness, and ultimately on the role that nestedness can play in enhancing or inhibiting economic growth over time. Because a variety of empirical domains, from biological to technological and social ones, can be characterized as complex networks in which relationships have a multi-layer representation, our approach also has important implications beyond international trade, and can help gain a better understanding of the structural organization, stability, and growth mechanisms of a number of different systems.

Methods

The data set

We used data from the WIOD, which is connected to a project funded by the European Commission as part of the 7th Framework Programme with the aim of developing new databases, accounting frameworks and models to increase our understanding of the dynamic interrelatedness of countries and industries. The core of the database is a set of harmonized supply and use tables, as well as data on international trade in goods and services. These two sets of data have been integrated into sets of inter-country (world) input-output tables. For further information, please refer to Data Description in the “Supplementary Information” section.

Reordering of columns and rows

To calculate nestedness, the rows (countries) of the participation matrix were sorted in decreasing order based on the number of transactions (i.e., pairs of layers) in which countries were involved. Similarly, the columns of the participation matrix were sorted in decreasing order by number of countries that shared involvement in transactions.

Null models

To test the hypothesis that countries and stages of production have a nested organization in the multi-layer network, we assessed whether the value of nestedness measured using our data is statistically significantly different from the value one would obtain by random expectation. To this end, we drew on, and extended, the ideas proposed by Saavedra et al.6, and constructed appropriate null models (I and II) for the multi-layer network. We also used these models to assess the influence of individual countries and individual industries upon country- and transaction-based nestedness, respectively. All the results were obtained based on an ensemble of 1,000 realizations of the null models. We assumed as statistically significant (at the 5% level) all observed values of country-based, transaction-based, and total nestedness that lie outside the 95% confidence interval of nestedness obtained using the corresponding null models over 1,000 replicates.

Null model I

To test the statistical significance of country-based nestedness, we followed the approach proposed in Saavedra et al.6 and constructed Model I. In particular, we randomized the rows of the participation matrix by blocks of columns defined by the common importing (for buyers) or exporting (for sellers) layer, while keeping unchanged the number of ones in each row (i.e., the countries’ degree distribution across the whole multi-layer network) and also preserving the degree of each node in each layer (i.e., the intra-layer countries’ degree distribution). For example, if node ci has two links pointing to (departing from) layer α and one departing from (pointing to) layer β and the other from (to) layer γ, in Model I node ci would still have two links pointing to (departing from) layer α but the origin (destination) of these links would be randomly reassigned to any other layer among all available ones (i.e., including layer α itself). Thus, for each country (buyer or seller) Model I preserves the total number of links ending at (buyers) or departing from (sellers) layer α. As a result of this constraint, the total number of links of each node across the whole network is also preserved. We used the same model to investigate the influence of individual countries on country-based nestedness. That is, for each country ci we randomized (subject to the above constraints) the corresponding row in the participation matrix, and then computed the Z–score over the ensemble produced by the realizations of the model.

Null model II

To test the statistical significance of transaction-based nestedness, we followed an approach similar to the one outlined above and constructed Model II. In particular, we randomized the rows of the participation matrix by blocks of columns defined by the common importing (for buyers) or exporting (for sellers) layer, while preserving not only the countries’ (in- or out-) degree distribution in each layer of the multi-layer network (i.e., the intra-layer in- or out-degree distribution), but also the layers’ degree distribution (i.e., the number of connections from one layer to another and/or to itself did not change). This is equivalent to swapping the connections of country ci pointing to (originating from) layer α with the connections of another country cj pointing to (originating from) the same layer α. We also used Model II to investigate the impact of individual industries to transaction-based nestedness. To this end, for each individual layer α, we randomized (subject to the above constraints) the corresponding block of columns (i.e., all columns in which layer α is the destination or origin of connections) in the participation matrix, and then computed the Z–score over the ensemble produced by the realizations of the model.