Productive Ecosystems and the arrow of development

Economic growth is associated with the diversification of economic activities, which can be observed via the evolution of product export baskets. Exporting a new product is dependent on having, and acquiring, a specific set of capabilities, making the diversification process path-dependent. Taking an agnostic view on the identity of the capabilities, here we derive a probabilistic model for the directed dynamical process of capability accumulation and product diversification of countries. Using international trade data, we identify the set of pre-existing products, the product Ecosystem, that enables a product to be exported competitively. We construct a directed network of products, the Eco Space, where the edge weight corresponds to capability overlap. We uncover a modular structure, and show that low- and middle-income countries move from product communities dominated by small Ecosystem products to advanced (large Ecosystem) product clusters over time. Finally, we show that our network model is predictive of product appearances.

if R n,i ≤ τ 0 in t 0 and R n,i > τ 1  An absence threshold of 0 means that a country exporting any non-zero amount will not appear as absent, and, hence, countries misreporting or re-exporting goods will not be eligible for a jump.
Hence the correlation between τ 0 = 0 and any other combination of thresholds is low.
Supplementary Figure 1b shows the correlations between the Ecosystem input vectors, and Supplementary Figure 1c shows the correlations between the Ecosystem size vectors. In both correlation matrices, we observe very high correlation values close to 1. The correlations are somewhat higher for the Ecosystem input vectors. Again, τ 0 = 0 is an exception, but even in this case correlations exceed than 70%.
Checking the sensitivity of our Ecosystem matrix with regards to time is not trivial as we require data covering a significant period of time in order to build our matrix. The simplest approach would be to split the full period into two sub-periods, namely 1984-1999 and 2000-2016. But the problem with this approach is that the nature of the global export basket differs between these two time periods. For instance computers, mobile phones, etc. become important goods in the second period. Hence, the dynamics of new product transitions is expected to be very different in the two sub-periods. In order to circumvent these issues and to test the stability of the Ecosystem matrix over time, we split the sample into odd and even years. The correlation between the full Ecosystem matrix is 60%, whereas the correlation between the Ecosystem input and Ecosystem size vectors is 97% and 90%, respectively. As a second exercise to test the temporal stability of the Ecosystem matrix, we start with the Ecosystem matrix from 1984-1999 and sequentially add additional years until we reach 2016, the final year of our dataset. Since we allow multiple jumps by a country to a product, additional years have the potential to substantially alter the Ecosystem matrix. Supplementary Figure 2a shows that there is a higher correlation between close years and a relatively lower correlation as we move further away from the diagonal. The correlations are significantly higher with values close to 1 if we calculate the correlation between the Ecosystem input and Ecosystem size vectors ( Supplementary Figures 2b and 2c).
As a benchmark, we can also check similar correlations for the Product Space. Supplementary

Supplementary Note 2 Jumps by Countries and Products
We calculate the Ecosystem matrix by observing jumps by many countries and products. Which countries jump more, and are there any specific characteristics of the products that we observe many jumps for?
Supplementary Figure 4 shows the number of jumps for products and countries. In Supplementary Figure 4a we observe that most jumps occur for the products with medium export volumes. In Supplementary Figure 4b, we see that most jumps happen in countries with relatively small export size like Jordan and Lebanon. The importance of the export size is expected as the formula for RCA can be written as: The numerator, X n,i / ∑ k X k,i , is the share of country n in industry i, whereas the denominator is the share of country n in total world trade. If country n is small, its share of world trade will also be small. Hence R n,i > 1 even for relatively small values of X n,i . If we increase the presence threshold, τ 1 , however it will become more difficult for larger countries to exceed the threshold.
Finally, export volume alone is not the sole determinant of a large number of jumps. This requires dynamic exporting behaviour. In Supplementary Figure 4, we allow multiple jumps to a single product. One way to decrease the number of jumps, and limit the number if jumps from smaller countries, would be to allow a single jump per country. To do that, we only consider the first jump made by a country to a product. Supplementary Figures 5a and 5d show that, as expected, this change decreases the overall number of jumps. It does not however significantly alter the rankings of the countries and products in terms of the number of jumps.
Another way to limit the effect of countries with smaller export size is to apply a more stringent definition of a jump. In our main specification, we assume a country jumps to a product with a single year below R n,i ≤ τ 0 and another year above R n,i > τ 1 . We can make this criterion more stringent by forcing countries to be below R n,i ≤ τ 0 for at least two consecutive years and above R n,i > τ 1 for at least two consecutive years. In Supplementary Figures 5b and 5e we allow multiple jumps with this specification and show that having two-years of absence followed by two-years of presence does not significantly change the ranking of countries and products. Supplementary

Supplementary Note 3 Robustness Checks for the Regression Results
First, a step-by-step explanation of how we build the Ecosystem density is provided. Suppose we want to estimate the likelihood that country n will jump to product i, which country n is not currently manufacturing.
1. The country capability endowment vector c n and product capability requirement vector p i are unknown. The likelihood of the jump is determined by the difference p i − c n T · p i , where T denotes the transpose. We will drop the transpose sign for decluttering the notation.
2. From the predicted Ecosystem matrix,Ê, we have an estimate for the overlap between any product with product i, andÊ i,. ≡ ( p 1 i , p 2 i , . . . , p N i ) represents this overlap. For instance, p 1 i estimates the capability overlap between product 1 and product i. Each of these values is smaller than p i , i.e., ∀j ∈ 1, . . . , N p j i ≤ p i .
3. We wish to estimate p i using our set of overlaps. If we assume a uniform distribution, then the maximum of ( p 1 i , p 2 i , . . . , p N i ) would be the maximum likelihood estimate up to a constant. 4. For c n · p i term, we consider only the overlap between product i and products present in country n. Similar to the argument above, the maximum of the set { p j i } for all products j produced in country n is our estimate of c n · p i up to a constant. 5. In order to smooth our estimates, we use the average of the top k values, rather than selecting a single maximum value in the previous two points. Selecting 'nearest neighbours' has been a common practice especially in the machine learning literature. Dude et al. 1 gives √ N as a rule of thumb in their book titled 'Pattern classification'. In our case, we have 756 products and √ 756 ≈ 27, which is close to the number we currently use of k = 25. In Section C.3, we analyze the robustness of our results to this parameter choice.

Supplementary Note 3.1 Distribution of Ecosystem Density and Product Space Density
The Ecosystem density measure is the key independent variable that we test in our regressions in Table 2. Does this measure vary systematically across countries?
In   MRT  GIN  MOZ  NGA  COG  AGO  PNG  AZE  LBY  YEM  MNG  CIV  VEN  TJK  IRN  DZA  GAB  MWI  LAO  ZMB  NIC  TKM  BGD  CMR  BOL  ZWE  ETH  KAZ  ECU  MLI  TZA  GHA  KHM  PAK  PRY  PER  UGA  HND  QAT  TTO  UZB  KGZ  SEN  CUB  AUS  MDG  OMN  LKA  ALB  KWT  MAR  GEO  NAM  JAM  KEN  GTM  CHL  SYR  EGY  IDN  SAU  DOM  VNM  BWA  MKD  ARG  MUS  SLV  COL  ZAF  MDA  IND  URY  GRC  CRI  NZL  ARE  BRA  TUN  RUS  JOR  LBN  PHL  TUR  UKR  BIH  BGR  SRB  CAN  LVA  PRT  NOR  EST  LTU  PAN  ROU  HRV  MYS  CHN  THA  BLR  ESP  NLD  POL  MEX  ISR  BEL  DNK  ITA  IRL  FRA  SVK  SVN  USA  HUN  GBR  FIN  CZE  KOR  SWE  SGP  AUT  DEU  CHE MOZ  NGA  COG  AGO  PNG  AZE  LBY  YEM  MNG  CIV  VEN  TJK  IRN  DZA  GAB  MWI  LAO  ZMB  NIC  TKM  BGD  CMR  BOL  ZWE  ETH  KAZ  ECU  MLI  TZA  GHA  KHM  PAK  PRY  PER  UGA  HND  QAT  TTO  UZB  KGZ  SEN  CUB  AUS  MDG  OMN  LKA  ALB  KWT  MAR  GEO  NAM  JAM  KEN  GTM  CHL  SYR  EGY  IDN  SAU  DOM  VNM  BWA  MKD  ARG  MUS  SLV  COL  ZAF  MDA  IND  URY  GRC  CRI  NZL  ARE  BRA  TUN  RUS  JOR  LBN  PHL  TUR  UKR  BIH  BGR  SRB  CAN  LVA  PRT  NOR  EST  LTU  PAN  ROU  HRV  MYS  CHN  THA  BLR  ESP  NLD  POL  MEX  ISR  BEL  DNK  ITA  IRL  FRA  SVK  SVN  USA  HUN  GBR  FIN  CZE  KOR  SWE  SGP  AUT  DEU  CHE

Supplementary Note 3.2 Area Under the Curve (AUC) Measure
In Table 2, we assess whether the Ecosystem Density measure is predictive of jumps. At time t 0 = 2010, all countries that do not make a product or have RCA less than t 0 = 0.1 in a product are in our sample set. Some of the products will appear in the future but some will not.
In order to investigate the discriminatory power of the Ecosystem Density, we build a Receiver Operating Characteristic (ROC) curve. ROC curves have the TPR (true positive rate = true positives/positives) on the Y axis and the FPR (false positive rate = false positives/negatives) on the X axis. A ROC curve highlights the relative tradeoffs between costs (false positives) and benefits (true positives) of a classifier. Suppose we set a threshold for the Ecosystem Density and predict that any country-product pair above that value will be positive and below that will be negative.
From this we can calculate the TPR and FPR. By moving the threshold from the minimum value to maximum value of the Ecosystem Density, we can build a ROC curve. An important feature of a ROC curve is that the area under it is equivalent to the probability that the classifier ranks a randomly chosen positive instance higher than a randomly chosen negative instance. 3 The Area Under the Curve (AUC) measure is best used for comparing multiple methods for their discrimination power. If where P denotes the number of positives and N denotes the number of negatives.

Supplementary Note 3.3 Sensitivity of explanatory power to Ecosystem construction period
Absence and presence thresholds related to jumps are also important for the regression analysis. In Supplementary Figure 8,   In Supplementary Figure 9, we repeat the same exercise, but instead of AUC metric, we use the pseudo-R 2 values to compare the predictive power of Ecosystem density and the Product Space density. Pseudo-R 2 captures the contribution of the variable of interest to the explanatory power in the probit regressions. As expected, the overall patterns are quite similar with Supplementary   Figure 8. Here, we observe 4 to 5 times increase in explanatory power with Ecosystem density (except when the absence threshold is 0, for which we see close to 2.5 times increase).

Supplementary Note 3.4 Sensitivity of Results to the Neighbourhood Size
In our main specification, we choose the top 25 product overlaps to estimate the capability gap in our density measure. This is in order to minimize the effects of errors in the export data: if we choose very few products, noise might affect our results. On the other hand, if we choose many products, then our estimate of the capability overlap would include products with relatively low overlap with our product of interest.
In Supplementary Figure 10, we re-run our main specification while varying parameter k, the number of products selected in our overlap estimates. In line with our expectations, including a very low or high number of neighbours decreases our predictive power. Within the range of 20 to 60 products, we have relatively stable predictive power.

Supplementary Note 3.5 Sensitivity to Country and Product Groups
In order to further investigate the sensitivity of our regression results, here we re-run our prediction analysis splitting our sample by a range of country and product characteristics. Table 1 we show the results for various subsets of countries. In Columns 1 and 2, we split countries by income level into high-income (per capita GDP above or equal to median per capita GDP) and low-income (per capita GDP below median per capita GDP). The difference in the coefficient of Ecosystem density between the high-and low-income samples is not statistically different. As expected, there are more opportunities to jump for lowincome countries (higher number of observations) and there are more realized jumps. However the AUC is higher for high-income countries, implying that these countries take better advantage of the adjacent opportunities as captured by their densities. (1) (2) In Columns 3 and 4, we divide countries by complexity level into high-complexity (ECI above or equal to 0) and low-complexity (ECI below 0). Low-complexity countries are more likely to jump into new products, but the Ecosystem density coefficient is higher for high-complexity countries. AUC levels are quite similar for both the high-and low-complexity samples, indicating that ECI is capturing more about the sophistication of a country's capability base than its income. ECI and per capita GDP are highly correlated, but there are significant outliers, mostly natural resource rich countries. Hence, the difference between the first two columns and the next two columns can be attributed to these countries.

First, in Supplementary
In Columns 5 and 6, countries are split based on export levels, into high-export (export levels above or equal to median) and low-export (export levels below median). As discussed previously, as the export size of countries increases, it becomes more difficult to satisfy the RCA-based criteria for a jump. As a result, the AUC, as well as the coefficient of the Ecosystem density variable, is lower for high export countries.
We then conduct a similar analysis for different product categories, as shown in Supplementary Table 2. First, we want to address the issue that the predictive power of our results might stem from the classification system. To give an example, let's take two products, namely men's shirts and women's shirts, which are classified separately. If our methodology relies on information from men's shirts to predict a jump to women's shirts, then in another classification system it would not work. In other words, this would imply that our methodology captures some artifacts of the classification system. Although our strict enforcement of precedence between products while defining the Ecosystem matrix might dampen this issue, we wish to formally test this effect.
(1) In order to do this, we construct a version of the Ecosystem in which we do not allow any product with the same three-digit (two-digit) code to be included. Returning to our example, we would not use information from men's shirts to predict the appearance of women's shirts. In Column 1 (three-digit) and 2 (two-digit), the Ecosystem density coefficient is statistically similar to the original case reported in Table 2 in the main text, albeit with slightly lower AUCs.
Since our model describes the diversification of countries in terms of capability accumulation, we expect it to better predict the appearance of manufacturing products compared to natural resource or agricultural products. This is because the latter products tend to be present in countries mostly due to geographical or climate attributes. To test this, we split our sample into manufacturing products (including manufactures, chemicals, textiles, machinery and transport equipment) and non-manufacturing products (including agricultural raw materials, food, fuel, ores and metals) using a classification provided by the World Bank (http://wits.worldbank.org/data/public/ CountryProfile-ProductMetadataforSITCRev2.xlsx). In Columns 3 (manufacturing) and 4 (nonmanufacturing), we observe that the Ecosystem density is a significant predictor in both cases with a similar magnitude. However the AUC in manufacturing products is much higher compared to non-manufactured products.
In Columns 5 and 6, we split the products into high complexity (PCI above or equal to 0) and low complexity (PCI below 0) samples. We observe a significantly higher coefficient for the Ecosystem density variable for low complexity products, but the AUC is higher for highcomplexity products.
In Columns 7 and 8, we split products into high ubiquity (ubiquity above or equal to median) and low ubiquity (ubiquity below median). Although the coefficients of the Ecosystem density variable are significantly different between two columns, the predictive power is similar as shown by the AUC.
Finally, in Columns 9 and 10, we split the sample into high export volume (export levels above or equal to median) and low volume (export levels below median). The coefficient for the Ecosystem density is lower for high export volume products, but the AUCs are similar in both cases. As in the case of countries described above, as the export volume of products increases, it becomes more difficult to satisfy the RCA-based criteria for a jump.
In the construction of the Ecosystem matrix we allow countries to have multiple jumps to a single product in non-overlapping time periods. This could affect our results if there are countries with frequently repeated jumps to a wide variety of products. In Supplementary  Table 3: Allowing single jump per country-product instead of same country jumping on and off to same product multiple times.
We can also change the definition of jumps to be more stringent by requiring countries to be at least two consecutive years below the absence threshold and at least two consecutive years above the presence threshold. Supplementary Table 4 shows the results if we allow multiple jumps and Supplementary Table 5 shows the results if we allow single jumps with this more stringent definition. In both tables, the results do not change significantly compared to our main specification. (1)

Supplementary Note 3.7 Using different time periods to build the Ecosystem
Structural transformation is slow and countries need time to build their capabilities to jump into new products. On the other hand, the capability requirements of products might slowly change with the introduction of new technologies and production techniques. Therefore, we expect that the Ecosystem matrix will be optimally predictive for medium range time horizons. In addition, the longer the data period used to build the Ecosystem matrix, the more jumps we observe and, hence, the better we expect the predictive power to be.
To test these hypotheses, we build different Ecosystem matrices by systematically varying the initial and final years of the trade data used. We require at least 10 years of data to build the Ecosystem matrices; hence, our initial years range from 1984 to 1999 and final years go from 1994 to 2009. In total we build 136 different Ecosystems and test their ability to predict jumps occurred between 2010 and 2016.
Supplementary Figure 11 shows AUC values for Ecosystem matrices constructed for different time horizons. As expected, almost all the periods ending close to our test period (i.e., 2010-2016) perform better. Even with periods ending in 2000, we have predictive power higher than 0.65.
With the Product Space, this level of predictive power is never achieved no matter which year is used. As the final year of the time horizon to build the Ecosystem density or the Product Space density becomes further away from the test period, the predictive power declines. But even from the Ecosystem density built using transitions from 1984-1994, we achieve a comparable level of predictive power with respect to the best performing Product Space densities.

Supplementary Note 3.8 Using Revealed per-Capita Comparative Advantage (RpCA) instead of RCA
In our main specification, we use Balassa's Revealed Comparative Advantage 6 measure to determine whether a product is absent/present in a country. We can modify this measure to test our results' robustness. In particular, we can use a different measure to capture the intensity with which a country exports each product by computing its Revealed per-Capita Comparative Advantage (RpCA), which is a variant of RCA adjusting for population. The RpCA that a country has in a product is defined as the ratio between the share of total exports that the product represents in the country's export basket and its share of the global population. Congruently, we can also think of RpCA as the per capita export of the country in the product divided by the total per capita export in the world. A product is over-represented in a country's export basket if its RpCA is above a threshold.
Formally, if X n,i is equal to the export value of country n in product i and pop n is the population of country n, then the RpCA of country n in product i is defined as: In order to estimate the presence (M) and jump (J) matrices, we can measure product presences and appearances via international export competitiveness captured by RpCA.
An appearance of product i in country n is defined as: Here, we use thresholds τ 0 = 0.05 and τ 1 = 0.25.
(1) RpCA. Appearances are also defined using RpCA. The results show that the Ecosystem based density is a better predictor of future product appearances relative to the Product Space.

Supplementary Note 4 Community Detection Algorithm
We use the community detection algorithm of Delvenne et al. 7 to investigate the two-digit reduced network and find that the network exhibits a modular structure composed of a number of welldefined communities. These communities are composed of groups of products that share similar capabilities, and are detected via an algorithm based on random walker dynamics. In essence, if we let a walker jump from node to node on a network with probability proportional to edge weight, eventually the walker will become trapped in 'regions' of the network exhibiting high internal connectivity, which correspond to node communities. The 'longer' the walker jumps, the larger the communities (s)he finds. Hence, a 'time' parameter enables us to control the scale at which communities are uncovered.
In practice, this algorithm works via optimisation of a stability function. In order to find the network partition that optimises this function, a greedy algorithm (the Louvain algorithm) is used.
This algorithm is stochastic in the sense that it does not return an identical optimal partition on each run. We run this algorithm a large number of times and, to test the variation of these partitions, an information theoretic measure of overlap between each pair of partitions is calculated.
The 'variation of information' measure is obtained by taking the average across all pairs. Hence, if the algorithm finds a large number of very similar optimal partitions, the variation of information will be low.
We ran this community detection algorithm on the directed network at two-digit level in Matlab with following parameters: L = 10, 000 (i.e., number of optimisations of the Louvain algorithm to be done at each Markov time), M = 1, 000 (the top M partitions among the L given at each Markov time by the L Louvain optimisations will be used to compute the variation of information), enforcing the calculation of the full stability and teleportation probability of 0.
Supplementary Figure 13 shows the output of the stability algorithm. The left panel shows the number of communities and as the right panel shows the variation of information. We observe a low variation of information for all Markov times below time 14, indicating stable partitions for this time parameter range. We selected the community corresponding to Markov Time 8 which has 5 distinctive communities and two singleton products. We merge these singleton products into the five communities based on their similarity to community members.

Supplementary Note 5 Country Presences in Communities
In the main text, we show countries colored by the community in which they have the greatest share of products present. But not all communities have the same size: Community 1 has 98 products, 2 has 111 products, 3 has 179 products, 4 has 91 products and 5 has 272 products in it. How can we normalise for the community size, and how can we tell whether a country has significant presence in a community?
Here, we use the logic behind RCA for matching countries to the communities, which can also be thought of as the likelihood ratio. Formally, we can calculate the likelihood ratio as the share of products present in a country belonging to a community divided by the share of total products in that community. Let P nc show the number of products present in country n that belong to community c. Let, P c denote the number of products in community c. Hence, we can write the Likelihood ratio (LR) as: LR nc = P nc / ∑ c P nc P c / ∑ c P c An LR nc > 1 implies that the country n has more products in community c than expected.
Supplementary Figure 14a shows countries that have a higher number of products than their expected share in Community 1, which consists of sectors like furniture, building materials, manufactures of metals and nonmetal minerals, misc edible and live animals. In addition to European and North American countries, China, Japan, India, Malaysia, South Africa, Egypt, Turkey, UA, Brazil and Colombia have a significant presence in this community.
Supplementary Figure 14b shows countries that have a higher number of products than their expected share in Community 2, which consists of sectors mostly associated with natural resources. The distribution of countries also follow the natural resource wealth of countries.
Supplementary Figure 14c shows countries that have a higher number of products than their expected share in Community 3, which consists of sectors like machinery, medicine and pharmaceuticals, electronics and office machinery. These are sophisticated products and countries that have an over-abundance in this community are in North America, Europe and East Asia.
Supplementary Figure 14d shows countries that have a higher number of products than their expected share in Community 4, which consists of sectors like transport equipment, paper related, general industrial machinery and meat preparation. The pattern of countries that are over abundant in this community is very similar to community 1 with Egypt, Tunisia and UAE dropping out, but Indonesia and New Zealand joining.
Supplementary Figure 14e shows countries that have a higher number of products than their expected share in Community 5, which consists of mostly primary sectors. These are mostly developing countries with notable additions like Eastern European countries, Spain and Australia.
Interestingly, most East Asian countries like China are not over-represented in this community.
Finally, Supplementary Figure 14f shows countries coloured by the community in which they have the highest likelihood ratio (LR  Figure 14: Over-represented communities by country. Over-representation is determined by the likelihood ratio of observing products within a community in a country.

Supplementary Note 6 Additional Figures
Supplementary Figure 15 replicates a number of sub-plots in Figures 1 and 3 of the main text. Here our Ecosystem size and input vectors are computed using the weighted Ecosystem entries rather than binary counting of non-zero entries. We observe relationships between the Ecosystem size and input with product ubiquity and Product Complexity Index 8 consistent with those shown in the main text.