At the top of the Sustainable Development Goals sits one of the most important and unresolved global challenges of our modern era: to eradicate extreme poverty and reduce inequality within and among countries. Although poverty rates have decreased over the years, nearly 10% of the world's population still lives in extreme poverty, characterised by a lack of basic needs such as access to food, clean drinking water, education, and information 1 . Emerging yet inconclusive evidence suggests that COVID-19 may have put a dent in this positive trend. Estimates for 2023 indicate that poverty rates have likely returned to 2019 levels, with about 691 million people (8.6% of the world population) living in extreme poverty. The pandemic has also caused the largest rise in between-country inequality in three decades, and reducing both within-and between-country inequality is a scientific and a policy challenge. In addition, climate change is proving to be a major obstacle for impoverished households and communities to adapt and develop in a sustainable manner. While economic inequality and poverty are distinct concepts, they are closely related. High levels of economic inequality can exacerbate poverty by concentrating wealth and opportunities among a small segment of the population, leaving others with limited resources and prospects for advancement. Poverty can act as a barrier to economic mobility, as individuals born into poverty often face systemic obstacles such as inadequate access to education, healthcare, and employment opportunities. Limited economic mobility can perpetuate cycles of poverty, where individuals and possibly entire communities remain trapped in low-income circumstances across generations. Given the distribution of wealth determines access to technology, a major technological leap could push global inequality to chasmic levels 2 . Reflecting on the trajectory of economic development reveals a transition from a state characterized by extreme poverty to one marked by pervasive inequality. The empirical evidence highlights two key facts:

The alleviation of extreme poverty has proceeded at a sluggish pace in Sub-Saharan Africa, and trends indicate an uptick in poverty levels within the Middle East and North Africa regions, indicating the presence of "poverty traps" (see Appendix B for a brief review). This trap involves self-reinforcing mechanisms that keep regions, countries, and neighbourhoods in a cycle of poverty. Barrett et al. 3,4 and Adato et al. 5 provide evidence of multiple equilibrium in asset dynamics in rural Kenya, Madagascar, and South Africa. Evidence from rural China shows that living in poor areas diminishes the productivity of a farmer's investments, with inadequate geographical capital such as limited rural infrastructure potentially trapping households in poverty 6 . Previous research has observed that poverty traps often operate across multiple levels, prompting the conceptualization of multi-level or fractal poverty traps 4 . The implication of the poverty trap at multiple level for policy is significant, suggesting that cross-level interactions can reinforce or mitigate poverty traps 7,8 . Inequality appears at various spatial scales, from global to local, affecting regions, countries, cities, and neighbourhoods differently. In recent decades, while global inequalities between countries have decreased, inequalities within countries have surged. For example, China's sudden shift from extreme poverty to extreme inequality is far from being an exception, as many other countries today face similar challenges [9][10][11] . Within cities, inequality can be stark between different neighbourhoods (e.g. formal vs. informal 12,13 ) and group identities (e.g., ethnicity, religion 14 ). This is particularly important because inequalities within (vertical) and between (horizontal) local communities are the ones people feel most directly. There are many persistent horizontal inequalities in developing countries: such as northern groups in Nigeria or Ghana; Somalis in Kenya; Hutus in Rwanda and Burundi; or Muslims in India. Inequality can stem from differences in education 15,16 , access to resources 17 and technology 18 , individual risk aversion 19,20 and saving propensity 21,22 , globalization and government policies 23 . Research on economic inequality (see Appendix A for a brief review) has expanded substantially -from Kuznet's curve 24 , to the Cambridge equation 25 to more recently Piketty's r > g. Piketty 26 attributes the recent increase in wealth inequality to the rate of return to capital overtaking the economic growth rate. While there is a clear evidence of poverty traps and persistent inequality at multiple levels, the impact of cross level interactions in poverty and inequality is not very well understood. What accounts for these differences in the dynamics of horizontal and vertical inequalities and what is the right level for intervention? A central question of interest is whether inequality is shaped by inherent mechanisms or are influenced by the interplay between intrinsic disparities and frameworks such as institutions and markets. And, if it is the latter, what is the precise relationship between these foundational factors and socioeconomic policies? Understanding these mechanism can help achieve widespread prosperity and low inequality. In response to these challenges, we have developed a two-level heterogeneous agent-based model to study the linkages among individual behaviour, community structure, market imperfections on emergent inequality and poverty at individual and community levels. Individual agents are connected in a social network from which we extract communities. We construct an economy where heterogeneous agents experience uninsurable idiosyncratic shocks and smooth consumption. Agents are risk-averse and have identical preferences deriving utility from consumption and can engage in two types of productive projects: a safe but low-return and several high-risk, high-return projects. Agents within the same community are able to form self-financing groups and undertake risk-sharing, joint investment projects. Agents have an attention mechanism that allows agents to periodically update their investment portfolios according to observed realisations of project returns (see Methods section for details). In order to study the model's behaviour, we construct Monte Carlo (Sobol) samples and run several repetitions for each combination of parameters in order to capture stochastic effects 27 (see subsection Experiments in Methods for details). Then, we categorise the model runs at both the micro (agent) and meso (community) levels according to the evolution of wealth trajectories.
We find robust evidence with all experimental setups for the existence of three distinct regimes: the first is a single equilibrium poverty trap characterised by relatively low wealth inequality and wealth trajectories that all gravitate towards extreme poverty; the second is a double equilibrium poverty trap characterised by greater wealth inequality and the ability of some agents or communities to escape poverty. The application of a manifold learning-based GSA method (see Appendix C) allows us to identify critical parameter regions responsible for giving rise to each regime, and we observe important differences in the sensitivity indices of these parameters at different temporal scales as well as micro (agent), meso (community) and macro (population) scales. Intervention experiments indicate that it is not possible to extricate agents from poverty when in the single equilibrium regime, while interventions of sufficient magnitude do help to alleviate poverty to some degree for the double equilibrium regime. We find key individual (behavioural) and community (institutional) mechanisms that are important to achieve sustainable reduction in poverty and inequality. At the individual-level, behavioural characteristics like risk aversion, attention and saving propensity can lead to sub-optimal diversification and low capital accumulation. At the community-level, institutional drivers such as lack of financial inclusion, access to technology and economic segregation are key drivers of inequality and poverty traps. Our results show that targeting horizontal inequality (between-community inequality) increases the rate of successful interventions through feedback. In this section, we describe the key components of the agent-based model as well as relevant theory. Homophily, the tendency for similar agents to form social connections, has been shown to play a significant role in how social networks are organized. Indeed, most people's social networks are relatively homogeneous with respect to socioeconomic and demographic characteristics such as race and ethnicity, age, education, and household income 28 . This has significant implications for the kind of information that people have access to, as well as the behaviours that we tend to adopt. In a recent paper, Talaga and Nowak propose a Social Distance Attachment (SDA) model for randomly constructing social networks based on homophily 29 . Furthermore, they show that their model is able to reproduce many of the characteristic features of social networks, making it an appealing choice for our present purposes. First, an undirected social network consisting of N = 1225 agents is constructed, and each agent possesses some initial amount of wealth drawn from a normal distribution centered at µ = 10 with standard deviation σ = 1. An edge is added between two agents with respective wealth levels w i and w j with probability

where d(w i , w j ) = |w iw j |, b is the characteristic distance at which p i j = 0.5, and α is the homophily parameter 29 . In practice, we set the characteristic distance to be the average pairwise (wealth) distance between all agents divided by 15. Due to the probabilistic nature of edge creation, this algorithm may yield multiple disconnected components. If so, we ensure connectedness as follows: 1) identify the largest connected component and 2) for every other connected component, pick a random node and insert an edge between this node and whichever node inside the largest connected component is closest in wealth. Figure 1(a) provides an example of a small SDA graph including agent wealth levels to highlight the way in which edges are formed based on the property of homophily. The reader may refer to Figure 12 of Appendix D for some key distributions (e.g. number of communities, community sizes) for the SDA graphs that were generated. The formation of communities based on homophily is one of the most important characteristics of social networks. A community may be defined as a subset of nodes in a graph such that "connections between those nodes are denser than connections with the rest of the network", and community structure significantly impacts the types of interactions and dynamics that may occur in a population 30 . Concretely, agents within the same community typically interact and share information more often than with agents in different communities, which has important consequences for how a system evolves over time. Extracting a network's community structure is therefore an important problem, which we tackle by using a semisynchronous label propagation algorithm proposed by Cordasco and Gargano 31 . This approach was chosen as it relies on how information diffuses throughout a network to identify communities, is efficient, and shown to always converge to a stable labeling. Running the algorithm after graph construction step yields a set C of communities, where each element is a set of agents such that an agent cannot be in more than one community. However, we expand the notion of community membership as follows: an agent is a member of its own community as well as any community that agents it is adjacent to are part of. Figure 1(b) displays a toy example of this procedure. Node 1 belongs to the blue community and the orange community since one of its neighbours is orange. Similarly, node 2 belongs to the orange and green communities. Node 3, however, only belongs to the green community. We allow agents of the same community to undertake joint ventures by investing in risky projects, thereby forming self-financing groups similarly to work by Gonzales Martines et al 32 . Each community is assigned a risky project with two possible outcomes and probabilities summing to one and an agent can only invest in projects assigned to communities that it is a member of. A risky project is generated as follows. First, we randomly draw the probability that the project yields a loss from the uniform distribution U(ℓ, 1 -ℓ) with parameter ℓ ∈ [0.30, 0.45]. Let us call this probability P loss . The probability that the project yields a gain is then simply P gain = 1 -P loss . Finally, we must determine the actual values of the loss and gain.
The loss is drawn once per project from uniform distribution U(L lower , L upper ) and the gain from uniform distribution U(G lower , G upper ), with the following relations: L lower < L upper < 1 < G lower < G upper . Figure 2 illustrates a risky project, including branch probabilities and outcomes. Colors correspond to the result of applying the label propagation algorithm. However, as described in this section, we consider an agent to be a member of its own community as well as a member of any community that agents that it is adjacent to are part of. Hence, node 1 belongs to the blue and orange communities, node 2 belongs to the orange and green communities, and node 3 belongs only to the green community. Figure 2. Diagram of a risky community project. P loss is independently drawn once for each project, as are the random loss and gain returns in the red and green boxes, respectively. In addition to community projects, each agent has the option to invest in a safe asset with a guaranteed gain of G safe > 1. However, we still wish for projects to be attractive alternatives to the safe asset, so care is taken in choosing parameter values such that the expected return of each project is at least G safe . Lastly, a project is allowed to take place if and only if the total pooled investment towards that project is at least θ ∈ (0, 1) multiplied by the total initial wealth of agents able to contribute towards the project. If this requirement is not met, all invested funds are lost. Otherwise, the project returns the gain with probability P gain and the loss with probability P loss . Agents must decide how they wish to apportion their capital between the safe asset and whatever risky projects are available to them 33,34 . We let the portfolio of agent i be denoted P P P i , which is simply a vector of weights summing to one. Note that P P P i is at least two-dimensional since every agent can invest in the safe asset and is a member of at least one community with a corresponding project. In order to select a portfolio, agents must perform portfolio optimisation. This problem is approached using Cumulative Prospect Theory (CPT), which was developed in order to better explain how humans make decisions, particularly under uncertainty. The following theoretical overview of CPT closely parallels that of Luxenberg et al 35 . Agents are assumed to be risk-averse for gains. However, they are also risk-seeking for losses. For a given return x, the prospect theory utility function is given by

where

There is the additional requirement that γ -> γ + > 0. Figure 3 provides a visual representation of Equation ( 2). The steeper exponential curve for losses (in red) can be interpreted as how a small decrease in wealth would decrease the utility more than an equal increase in wealth would increase utility. In other words, losses are felt more heavily than gains. Next, we define some empirical distribution of returns for n assets. We denote these returns r 1 , r 2 , . . . , r N where r j ∈ R n . That is, each r j is a vector of n realized asset returns. Now consider some portfolio p ∈ R n , such that all weights sum to one. The resulting portfolio returns would be r ⊤ 1 p, r ⊤ 2 p, . . . , r ⊤ N p where r ⊤ j p ∈ R. Now let N -denote the number of negative portfolio returns, and let N + denote the number of nonnegative portfolio returns, with N = N + + N -. After sorting all of the portfolio returns, we can write the following relations:

where ρ i denotes the i th portfolio return after sorting. In other words, p ⊤ ρ 1 is the biggest loss, and p ⊤ ρ N the biggest gain. Consider also the following weighing functions:

Using these, we define the following positive and negative decision weights:

We wish for π ′ + and π ′ -to be monotonically increasing, and thereby assign greater weight to extreme outcomes. Although this is the case for most parameter choices, some can lead to the violation of this desirable property. We can ensure that π ′ + and π ′ -are non-decreasing by substituting π ′ +, j with min (π ′ + ) for all j < argmin(π ′ + ), and substituting π ′ -, j with min (π ′ -) for all j < argmin(π ′ -). In order for π ′ + and π ′ -to each have length N instead of N + and N -respectively, we zero-pad both sequences: π + = (0 0 0 N -, π ′ + ) and π -= (0 0 0 N + , π ′ -), where 0 0 0 k denotes a zero-vector of dimension k. Let us also define the following two functions operating element-wise on some vector x:

Using these, we can finally write the CPT utility function as follows:

where R R R is the matrix of empirical asset returns and f π is the weighted-ordered-sum function, defined as

where x (i) denotes the i th smallest element of vector x and π is assumed to be a monotonically increasing probability vector, which we have ensured is the case. The CPT optimisation problem to be solved by agents is thus simply to find a portfolio P maximising the CPT utility:

which is non-convex as shown by Luxenberg et al 35 . Further, Luxenberg et al 35 show that while CPT utility can be decomposed as a difference of two functions. The first term is a convex function with concave arguments and the second term a convex function with convex arguments.
This structure allows us to derive maximum CPT utility 35 . In practice, note that we assign each agent its own CPT utility function, which is parameterised as follows: γ + is drawn from uniform distribution U(γ lower

), and finally δ -is drawn from uniform distribution U(δ lower -, δ upper -). An agent does not keep the same portfolio throughout the simulation. Initially, we generate M random returns for each risky project as well as the safe asset (though these are constant), and each agent i bases its initial portfolio P P P i,initial on this data. However, projects yield a return at each time step, and agents can use this information to update their portfolio choices. For example, an agent may decide to reduce the amount invested towards a project that keeps failing and instead redistribute these funds towards other more promising projects or even the safe asset. This is done using an attention mechanism as follows. Each agent i is initialised with an independent attention parameter a i randomly drawn from the uniform distribution U(0, 1). Then, anytime an agent updates its portfolio throughout the simulation, it computes the following weighted sum: P P P i = (1a i ) P P P i,initial + a i P P P i,observations ,

where P P P i,observations is the optimal portfolio of agent i based on the observed project returns since the start of the simulation. Hence, the higher an agent's attention, the more importance it will place on the project returns it observes during the simulation when choosing a portfolio. Portfolio update times are Poisson-distributed with parameter λ , and each agent has independently sampled update times. Furthermore, we only allow for updates to be carried out after an initial period of 5 model steps. At each time step t, each agent i must consume a portion c i,t of its current wealth w i,t . The amount consumed is determined by the saving propensity parameter β ∈ (0, 1), and is calculated as c i,t = 1β w i,t . Once capital has been consumed, the remainder is invested according to the agent's current portfolio, and the agent's wealth at the next time step is the return on investments (both safe and risky). Table 1 summarises key model parameters. Parameters that we wish to vary for sensitivity analysis have their values listed in square brackets, denoting uniform intervals. Other parameters have fixed values for all simulations. Algorithm 1 summarises the key steps of the agent-based model. All parameters are fixed except five, which are listed at the top of the algorithm as input parameter set. After initialising global attributes such as the network, communities, projects and random initial returns, we initialise individual attributes for Let R R R be the vector of project returns concatenated with

Saltelli sampling is used to generate different combinations of parameters 27 . We choose to have 1024 unique values per parameter, resulting in a total of 7168 parameter combinations. Furthermore, twenty repetitions with different random seeds are carried out for each parameter combination to account for stochastic effects. In addition to studying the resulting wealth trajectories of individuals and communities, we also examine whether a one-time capital injection can help the poorest agents escape poverty. In order to do this, we randomly select one parameter combination from the "All Poor" regime and one from the "Some Rich" regime. Then, for each one, we let our model run for 100 time steps, at which point we give 10 units of capital to the 100 poorest agents. Subsequently, we allow the model to run for an additional 100 steps and examine whether the targeted agents have managed to avoid falling into poverty. 20 repetitions are done to account for stochastic effects. Lastly, we study the model's sensitivity to parameters using a novel global sensitivity analysis method 36,37 in order to compute diffusion coordinates and sensitivity indices, shown in Figure 10 and Figure 11 of Appendix C respectively. The appendix also contains additional details regarding the method used. We identify three distinct regimes of model behaviour based on the wealth trajectories of agents across different parameter combinations and repetitions. In the first regime, which we label "All Poor", every agent in the population has a lower wealth by the end of the simulation compared to their starting wealth. This regime is characterised by extreme poverty and agents are unable to avoid or mitigate financial losses. In the second regime, the "Some Rich" regime, one or more agents have a final wealth greater than their initial wealth. Most of the time this wealth accumulation is experienced by only a small minority, thereby giving rise to significant inequality and wealth disparity. Finally, in the third "All Rich" regime every single agent has a final wealth greater than their initial wealth. We observe the following proportions of simulations landing in each regime: 12.24% (All Poor), 87.7% (Some Rich), and 0.06% (All Rich). It is worth noting that the All Poor and Some Rich regimes correspond very closely with single and double equilibrium poverty traps as studied in depth by Barrett et. al 3 . These findings show that the evolution of poverty and inequality (state space) is driven by various social, economic and financial structures (represented by the parameter space of the model) and can explain the observed transition from extreme poverty to pervasive inequality. Figure 4 illustrates the typical parameter ranges giving rise to each of the three regimes. The influential parameters were identified using a global sensitivity analysis as described in Appendix C (see Figures 10 and11). The scale of each parameter is adjusted using min-max normalization such that 0 corresponds to the minimum possible value of that parameter, and 1 corresponds to its maximum value (see Table 1 for a summary of model parameters). For each regime, the vertices along the red polygon correspond to average parameter values giving rise to that regime.
Additionally, we depict values falling within one standard deviation in blue and green. The analysis of the parameter space reveals three key insights for reducing poverty and inequality. First, parameter θ , which modulates the minimum project cost required of each community in order for a project to be carried out, appears to play a significant role in shaping model behaviour. On average, θ is close to 0.8 of its maximum value in the All Poor regime (implying that project costs are high), whereas it is only 0.45 for the Some Rich regime, and 0.2 for the All Rich regime. Clearly, reducing the cost of undertaking community projects is helpful in lowering the barrier to financial well-being and tends to increase the likelihood of agents escaping poverty. The parameter θ in our theoretical model highlights the importance of financial inclusion in poverty alleviation. We show that reducing frictions related to financial inclusion can increase the level of entrepreneurship, allowing financially constrained individuals to become entrepreneurs, and move out of poverty. At the aggregate level, these effects could ultimately boost economic activity, reduce poverty, and potentially increase income equality -as observed in previous empirical studies 38,39 . The parameter ℓ -which determines the probability of projects yielding a loss rather than a gain -does not appear to be different across regimes, while the upper uniform bound  for the magnitude of project gains, G upper , is on average significantly higher for the "All Rich" regime. This implies that increasing project returns is more favorable to agents than increasing the frequency of project success. Second, the saving propensity parameter β also plays an important role in giving rise to the different regimes. In the All Poor regime, β typically takes lower values, indicating that agents consume more and invest less towards risky projects. As pointed out by Banerjee and Duflo, a "main challenge for the poor who try to save is to find safety and a reasonable return" 40 . Indeed, in the All Poor regime, projects tend to fail more often than not, making it difficult for agents to invest their savings. However, agents in the All Rich regime tend to save more of their wealth in order to invest it towards high-return projects, which tend to be successful. This is in line with traditional perspective on micro and macroeconomic growth, which posits that increased savings, when channeled into investment, would fuel economic growth in households 41 . Several empirical studies show that higher savings rates not only directly boost investment but also indirectly increase steady-state output, as rising savings often correlate with rising income, thus stimulating further investment 42,43 . Lastly, we find that the homophily parameter α needs to take on particularly low values in order for the All Rich regime to emerge. Low homophily implies that there is little economic segregation based on wealth at the start of the simulation, thereby improving the chances of poorer agents to be included in community projects with higher investments and chance of success. By contrast, in the Some Rich regime, homophily tends to be higher, which implies more segregation and leads to greater eventual inequality. The share of high-SES friends among individuals with low SES (low homophily) -known economic connectedness -is among the strongest predictors of upward income mobility [44][45][46][47] . A recent study identified that people endowed with high levels of economic and human capital enjoy improved accessibility and networks with a high prevalence of instrumental relations 45 . There is essential inequality in the endowment of social capital, which augments economic inequality. Further, when inequality is socially embedded, traditional re-distributive policies demonstrate limited effectiveness 45 . Agent Final Wealth Colors correspond to the number of communities that an agent is part of. In this case, a lower degree seems to be indicative of higher final wealth. B: Same as sub-figure A but for the Some Rich regime. The dependence of final wealth on agent degree is less evident. C: Same as sub-figures A and B but for the All Rich regime. In this case a higher degree appears to be associated with higher final wealth. Figure 5 illustrates the relationship between the final wealth of agents in each regime and the number of projects available to the agents (the community degree). Interestingly, although all agents tend towards 13/39 10 1 10 3 10 5

Agent Final Wealth poverty, it seems favourable in the All Poor regime to be part of fewer communities (and thus investment projects). This can be seen from the tails of the black, red, and blue distributions extending further to the right as community degree decreases respectively. This story is completely flipped in the All Rich regime, where a higher community degree appears to lead to a higher final wealth. Given that projects on average are successful more often in the All Rich regime, it indeed makes sense for an agent to diversify their investments. By contrast, because projects fail more often than not in the All Poor regime (for instance due to higher θ values), agents tend to invest in fewer projects, thereby taking fewer risks and maintaining a larger investment towards the safe asset. This pattern of behavior is in fact supported by a growing body of literature. For instance, experimental work by Yesuf and Bluffstone with poor households in Ethiopia reveals a high degree of risk aversion and risk-averting behavior with "perhaps significant implications for long-term poverty" 48 . Indeed, farmers are often prone to sub-optimal decision making due to being less willing to undertake projects with high expected returns, which results from near constant exposure to risk factors in their daily work 49 . Figure 6 displays the aggregated final agent wealth distributions for each regime, as well as corresponding Gini indices (calculated at the end of each simulation at the population level).
While agent wealth levels quickly taper off in the All Poor distribution, both of the Some Rich and All Rich distributions have a tail of very rich agents at the far right. Moreover, the All Rich distribution does not have any data points at or near zero since agents have all attained a higher wealth level than their starting point. The Gini coefficient distributions depict a striking transition. In the All Poor and All Rich regimes, Gini coefficients are typically very low (with a few exceptions in the All Poor regime), signifying that inequality is relatively low with all agents being either poor or rich as the regime names indicate. However, the intermediate Some Rich regime is characterised by high levels of inequality, with Gini coefficients generally taking on values greater than 0.8. Further details on the relationship between total population wealth and the Gini index for the Some Rich regime may be found in Figure 14 of Appendix F. The reader may also refer to Figure 13 of Appendix E to study the distributions of project returns by regime. Overall, the transition from extreme poverty to extreme inequality found here is reminiscent of the global historical trend presented in the Introduction, wherein we argue that many nations have succeeded in reducing poverty over the last decades at the cost of increased inequality. In order to isolate and examine the effect of individual differences (attention and CPT utility parameters) between agents, we group agents according to the set of projects that they have access to. For instance, one group of agents could consist of those who have access to community projects 2 and 3, and another group of agents could contain those who have access to community projects 2, 3, and 5. These would be distinct groups even though all agents in the second group have access to all projects accessible to agents in the first group. Let us first pay attention to the top row of Figure 7, where we highlight the impact of agent attention on the magnitude of economic shocks (defined as decreases in wealth between subsequent time steps) for agents with access to community projects 9 and 12 in a given simulation. The leftmost figure reveals a positive correlation between attention and the magnitude of economic shocks that agents experiencehigher attention translates to experiencing more significant shocks. In order to explain this outcome, we want to better understand how projects 9 and 12 are performing over the course of the simulation. The middle figure reveals that project 9 fails consistently for the first 25 steps or so. Agents with high attention will notice this and invest more capital towards project 12 when updating their portfolio. On the other hand, agents with lower attention will ignore these empirical returns and favor their initial portfolio. The rightmost figure demonstrates this clearly, where we notice that lower attention results in investing a larger proportion of capital towards project 9 by the end of the simulation. This investment, although initially dubious, ends up benefiting agents with low attention since they tend to have more diversified portfolio and are thus able to better absorb economic shocks compared to agents with high attention. Impact of agent attention on the median shock size experienced for agents with access to the same two community projects (numbered 9 and 12). Agents with higher attention experienced economic shocks of greater magnitude. B: Returns of community projects 9 and 12. C: Impact of agent attention on the proportion invested in community project 9 by the end of the simulation. D: Impact of γ + CPT utility parameter on agent final wealth for agents with access to the same two community projects (number 0 and 6). E: Returns of community projects 0 and 6. F: Impact of γ + CPT utility parameter on the proportion invested into the safe asset by the end of the simulation. Now let us take a look at the second row of Figure 7 for an example of how CPT utility parameter γ + can impact the final wealth of agents with access to projects 0 and 6. The leftmost figure shows a steep transition where agents with γ + < 15 are extremely rich by the end of the simulation whereas agents with a value for this parameter greater than 15 converge towards a state of poverty. The central figure shows that both projects 0 and 6 yield nonzero returns throughout the entire simulation. In fact, these empirical returns agree very closely with what we would expect, unlike the previous example where project 9 failed for numerous subsequent steps. Therefore, in this scenario, attention plays a rather insignificant role when agents update their portfolios. The difference in final wealth is instead attributable to γ + , and we can observe from the rightmost figure that a lower γ + value translates to a higher proportion of wealth being invested in the safe asset. In other words, for this particular group of agents, it is more beneficial to take less risk by investing in the safe asset, presumably due to the risky and volatile nature of the project returns. Although not represented in this rightmost figure, we may even expect that too little risk taking could end up being harmful (for instance if the safe investment proportion was as high as > 0.70), since agents would not end up benefiting from the high returns of the projects as much. To conclude this section, we remark that examples such as the ones of Figure 7 abound throughout the many simulations that were carried out. We have restricted the present analysis in order to showcase the complex and rich behaviour that can be observed using our model as a result of heterogeneity in the agent population. Importantly, whether attention and γ + are related to economic shocks or final wealth depends on numerous factors, such as which group of agents is considered, but also which model parameters and regimes are being examined.
This outcome highlights the importance of considering traps at multiple levels, since behavior can vary so drastically between different groups or communities of agents even when they are part of the same larger population. Two key insights emerge from our analysis. First, a crucial link may also be established between the attention mechanism in our model and the notion of "information poverty" in the literature, which is a situation wherein individuals or communities do not have the necessary skills or knowledge to obtain information, as well as interpret and apply it correctly to a particular problem 50 . Agents with higher attention pay greater attention to empirical observations, implying that they have better access to information. Similarly in real world settings, individuals or communities with greater access to sources of information such as education or the internet are less likely to experience information scarcity, thereby empowering them to make more informed decisions and respond appropriately to different scenarios that may arise. While this analogy is not perfect, it does underscore the importance of what information agents have access to, and crucially, what they decide to do with it -even minor differences in information access and information use can lead to drastically different outcomes for different agents. Second, we show that sub-optimal diversification due to information acquisition, particularly in the context of investments or economic activities, can indeed have an impact on poverty. Sub-optimal diversification can lead to higher income volatility 51,52 . For instance, if a household relies solely on one unstable source of income, such as seasonal agricultural work, they may face periods of scarcity when that income dries up 53 . This can push them into poverty or exacerbate their existing poverty. In times of economic downturns, natural disasters, or other crises, families with sub-optimal diversification may lack resilience to bounce back, potentially slipping into poverty or facing prolonged periods of financial hardship 54 . At the community level a lack of diversification can can lead to widespread unemployment and poverty, if, for example a community heavily relies on a single industry that faces a downturn or technological disruption. Figure 8 displays a sample of three out of twenty interventions that were carried out for a choice of parameters corresponding to the All Poor (top row) and Some Rich (bottom row) regimes. At t = 100, the poorest 100 agents were identified and received a wealth injection of 10 units, after which the model was allowed to run for another 100 time steps. The trajectories displayed below are those corresponding to this subset of agents. For the All Poor regime, we find that in all 20 repetitions of our experiments, the targeted agents all fall back into poverty with final wealth approaching zero (< 10 -8 ) by t = 200. This seems to imply that interventions that do not change the underlying landscape of factors (in this case the parameter space) contributing to poverty will not favour impoverished agents in the long term. By contrast, for the Some Rich regime, we find that approximately 32% of targeted agents manage to escape poverty by t = 200, with a standard deviation of 13%. Note that here we define the poverty line as being set by the wealth of the wealthiest agent among the 100 poorest agents at the end of the experiment. This outcome implies that when the underlying parameter space is conducive to upward mobility, a capital injection can prove to be somewhat successful at helping agents to escape from poverty. The efficacy of capital injection, or cash transfers, as a means of combating poverty remains a controversial topic even today. A recent article by Miao and Li examining the impact of cash transfers towards rural households in China casts doubt on whether this form of intervention necessarily guarantees positive long-term effects 55 . Although the cash transfers enabled poor rural residents to spend more on healthcare, they also led to a decrease in labor supply and no change in education spending, despite education being a significant factor in long-term poverty mitigation. Our results offer a similar point of view, especially for the All Poor regime, in the sense that cash transfers run the risk of only providing short-term relief with no concrete long-term outcomes as a result of not addressing underlying structural and systemic issues. Similarly to our definition of regimes for individual wealth trajectories, we may also define regimes at the community level as follows. In the "All Poor" regime, each community's final total wealth is less than its total initial wealth. Meanwhile, in the "Some Rich" regime some communities have final total wealth greater than total initial wealth and all communities have higher final total wealth in the "All Rich" regime. inequality is estimated to be increasing for the first time in a generation. Emerging evidence even shows that within countries inequality may also have worsened. The key question is -are we stuck between extreme poverty and extreme inequality? Why is progress so vulnerable to shocks? An examination of the parameter space reveals that our model captures three extreme regimes: one characterized by poverty and the other prosperity. Both regimes have low inequality. An interesting third regime emerges where some agents are trapped in poverty while others can escape poverty and accumulate wealth. An analysis of the Gini coefficient of simulations in this regime shows that inequality is negatively correlated with economic development (see Figure 14 in Appendix F) a fact well established in empirical literature 56 . A high inequality inhibits social mobility perpetuated through increased segregation in social connections, high cost to access financial services, sub-optimal diversification and low returns to investment. Further, while there are clear pathways in the parameter space to move from the "All Poor" regime to "All Rich" via the "Some Rich" regime, our model indicates two key challenges. First, progress in poverty reduction is vulnerable to shocks due to the presence of critical transitions -where a small change in parameter space can lead to regime-shifts.
Many poverty reduction programs rely on sustained economic growth and stability of the parameter space. Economic shocks, such as recessions, currency devaluations, or commodity price fluctuations, can disrupt growth trajectories and undermine the gains made in poverty alleviation. Lack of savings, access to credit, or insurance can magnify the impact of such shocks, leading to deeper and more prolonged periods of poverty. In an interconnected world, shocks in one part of the world can quickly ripple through to other regions. We show that in a multi-dimensional parameter space there are multiple pathways through which shocks can cause regime shifts in the economic landscape. Second, in unequal societies, powerful individuals or groups may engage in rent-seeking behaviour, using their influence to capture economic rents or extract resources from the rest of society without creating corresponding value. This can exacerbate inequality by diverting resources away from productive uses and concentrating wealth in the hands of a few. The intersection of inequality and political economy is a rich area of study that examines how economic policies, institutions, and power dynamics shape and perpetuate unequal distributions of resources, opportunities, and outcomes within societies. While we do not model such a feedback explicitly, the analysis of the homophily parameter in our model is an excellent proxy for the political economy and validates this finding. Finally, horizontal inequalities (see Figure 16 in Appendix H) refer to disparities among distinct identity groups and communities, such as racial divides between blacks and whites, gender disparities between women and men, religious differences like Muslims and Hindus, or ethnic tensions like Hutus and Tutsis, among various other examples. These inequalities are inherently unjust and often endure over time. Our results indicate that Horizontal inequality is significantly higher than vertical inequality. This demonstrates that an individuals position in the distribution is mainly determined by the the community (group) they belong. Deprived groups face formidable obstacles, including limited financial resources for investing in assets and education for their children, as well as restricted access to loans. Additionally, social networks typically remain segregated within these groups, resulting in fewer beneficial connections for individuals from disadvantaged backgrounds seeking access to quality education or employment opportunities 14 . The Sustainable Development Goals (SDGs) acknowledge the imperative of addressing inequalities not only at the individual level but also among different identity groups. As discussed next, addressing these vulnerabilities requires a multi-dimensional approach that includes building resilience at individual, community, and institutional levels, implementing adaptive policies, and fostering sustainable development strategies that are less susceptible to external shocks. What types of poverty alleviation interventions are possible, and how do they depend on the different pathways of inequality and poverty found at different societal scales? In recent work, Lade et al. 57 , using a resilience-thinking lens, describe three different types of interventions that assume the existence of a barrier to escaping poverty. The first type of interventions involve capital inputs to the poor state in order to "push it" over existing barriers, for example cash transfers or increased agricultural inputs. Although effective in some cases, it is important to note that such interventions do not lead to a corresponding systemic change and therefore may not yield substantial long-term benefits. Our intervention experiments on artificial societies in the single equilibrium (All Poor) poverty trap regime appear to replicate this particular phenomenon: mere capital injection did nothing to address the fact that undertaking projects remained too costly and that agents were consuming too much. Furthermore, as shown in our results on the impact of heterogeneity in the agent population (in the form of attention, and utility parameters), additional factors such as access to information and education can be crucially important in improving an individual's chances of escaping poverty. Further, money transfer programs, can sometimes encounter moral hazard issues. Moral hazard refers to the risk that individuals or organizations might change their behavior in response to the assurance of financial assistance, leading to unintended consequences. The second type of intervention consists of lowering the barrier by changing the parameters that otherwise serve as key mechanisms in inducing and reinforcing poverty. Although reducing the risk aversion of individuals and communities such that they undertake riskier ventures is technically possible in our modelling framework, in practice, this may not be the case. Individuals may not be willing to accept higher levels of risk when already facing the obstacles of extreme poverty or the near prospect of them. By contrast, we find that improving financial inclusion and access to markets or facilitating the adoption of climate-smart farming practices could realistically help lower difficulties associated with escaping the poverty cycle at the individual and community levels. Further, we show that promoting diversity can also lead to lowering the barrier. Homophily can reinforce existing inequalities by perpetuating patterns of advantage and disadvantage within social networks. For example, individuals from privileged backgrounds may have greater access to social networks with valuable connections and opportunities, while those from marginalized or disadvantaged backgrounds may face barriers to entry or exclusion from such networks. As a result, inequalities in access to resources, opportunities, and social capital can become entrenched and perpetuated across generations. Overall, diversity and access to technology empowers individuals, strengthens communities, and fosters inclusive and sustainable development. By leveraging technology effectively, policymakers, businesses, and civil society organizations can advance efforts to reduce poverty and inequality and build a more equitable and prosperous future for all. Lastly, the third type of interventions involves major systemic transformations that bring about fundamentally different poverty and inequality landscapes. An example of such an intervention would be to provide novel developmental pathways to communities while still adhering to key tenets of social and environmental justice 57 . One of the key findings of our model is the emergence of sub-optimal diversification. Addressing sub-optimal diversification often involves systemic transformation and broader strategies aimed at innovations (e.g. innovative agricultural practices), improving access to education and skills training (e.g. new challenge based learning), fostering entrepreneurship (e.g.
micro loans, savings groups), and building resilience to external shocks. These measures can help break the cycle of poverty and create more sustainable livelihoods. Although this type of intervention is arguably the most challenging to implement, it has the potential to yield the greatest benefit since it encourages a reconfiguration of the relationships between agents, their environment, and economic practices which all contribute to persistent poverty if not appropriately addressed. For example, negative consequences could quickly arise from asset input into a community with prevalent gender inequality. While such an intervention could appear successful in terms of aggregate asset ownership, gender inequalities may intensify if women's corresponding access is not ensured in a culturally-sensitive manner 58 . Further, we find that the complex and multi-level nature of poverty traps makes it especially difficult to generalise findings across different contexts: a one-size-fits-all policy or intervention simply does not exist. In a recent paper, Radosavljevic et al. discuss the existence of fractal poverty traps wherein "multiple lowlevel equilibria exist on different levels at the same time and self-reinforce through cross-level feedbacks" 7 . These cross-level dynamics are particularly crucial to understand because interventions at the household level, for instance, could have unforeseen and damaging consequences at the community level. This concern points to the importance of integrating information from multiple levels to better understand and quantify how multi-level interactions contribute to poverty trap mechanisms. The metric we employ to define and track progress across levels is also of critical importance. For instance, although shown to be a poor indicator of quality of life, the gross domestic product remains one of the most commonly-used metrics to compare national economies. Integrating alternative indicators such as the Multidimensional Poverty Index 59 or the Green Growth Index, for instance, could provide a more comprehensive overview of how countries, cities, and communities are performing in terms of poverty reduction and sustainable development targets. Moreover, simply looking at the global Gini coefficient for income per capita disguises the glaring inequalities that we have argued still exist at regional and country levels. It is easy to show that a unimodal income distribution, such as the one we see today at the global level, can be constructed by summing many bimodal distributions exhibiting inequality (see Appendix G, Figure 15). N upperGenerate M initial project returns for i = 1, . . . , N do Assign CPT Utility Assign attention parameter a i ∼ U(0, 1) Generate set T i of portfolio update times Compute initial portfolio P P P i = P P P i,initial for t = 1, . . . , K do for i = 1, . . . , N do if t ≥ 5 and t ∈ T i then Compute P P P i,observations Perform portfolio update using Equation (5) Agent chooses consumption amount c i,t using β Agent contributes remainder of wealth towards projects and safe asset according to their portfolio for each project do if investment ≥ minimum required investment then Project return = loss with probability ℓ, or gain with probability 1 -ℓ else Project return = 0

N upper