1. Introduction
Suburbanization is a dynamic, multidimensional process driving profound social, economic, and environmental transformations, which in turn reshape the functional and spatial structure of urban areas [
1]. This process has spurred residential expansion into formerly agricultural areas at the urban fringe [
2]. This zone, often termed the rural–urban interface, constitutes a complex landscape molded by a multitude of socioeconomic forces [
3]. Therefore, suburban spaces have presented both opportunities and challenges for farmers. For instance, the emergence of a new customer base—typically urban residents—has provided farmers with new opportunities for higher-value crops. Consequently, farmers have demonstrated remarkable adaptability by adjusting their production systems to capitalize on emerging economic opportunities in the urban periphery [
4]. This rural dependency on urban areas has been emphasized by Bock [
5], who argues that urban dynamics will define rural spaces, and that rural areas will increasingly depend on their ability to meet urban needs. Suburbanization is a global phenomenon observed across diverse geographical contexts, including Latin American cities. Here, demographic explosions have led to farmers concentrating around urban peripheries seeking subsistence [
6].
Traditionally, agroecosystems have been regarded as complex ecological systems modified by humans to produce food, fiber, and other agricultural products. Their complexity stems primarily from the interaction between socioeconomic and ecological processes [
7]. Various definitions of agroecosystems exist, depending on their composition and purpose [
8]. However, a general and widely accepted definition characterizes them as systems of biological and natural resources managed by humans, primarily for food production but also for other socially valuable non-food goods and environmental services [
9]. Gliessman [
10] maintains that an agroecosystem is created when humans manipulate and alter an ecosystem to establish agricultural production. The diversity of agroecosystems exhibits complexity and stability similar to that of natural systems. Therefore, understanding this diversity—characterized by a mosaic of interconnected elements shaped by resource flows interacting with local rural cultural practices—forms the foundation for sustainable agroecosystem management [
11]. The structure and function of agroecosystems are largely determined by local context, including the interaction between ecological conditions (encompassing biological, geological, and chemical factors) and social factors such as farmers’ economic needs, cultural and spiritual values, social structure, and technology [
12]. Humans play a crucial role within agroecosystems. Consequently, to fully characterize an agroecosystem or identify potential alternative management options, any agroecosystem analysis must incorporate indicators of the economic, cultural, and social forces that shape human activities [
13].
Approximately 28% to 30% of the Earth’s land surface is occupied by agricultural land (cropland and pastures). This cultivated area extends across all continents, covering roughly 1.3 billion hectares and encompassing diverse agroecosystems—from large-scale systems to small farm plots and fragmented cultivation zones [
8]. Small agroecosystems, typically represented by smallholdings or family farms, dominate rural landscapes across the Global South while persisting in the Global North [
14].
Rural households employ heterogeneous livelihood strategies conditioned by environment-specific constraints and opportunities. Agroecological systems, market structures, and cultural contexts thus generate regionally distinct land-use configurations and farm management approaches [
15]. Significant intra-community variation exists among households due to differential resource endowments, production orientations, ethnic backgrounds, educational attainment, experiential knowledge, and managerial capacities [
16], yielding diverse natural resource governance approaches. Policy frameworks aiming to assist resource-poor farmers must therefore prioritize understanding this multi-scale variability—occurring within farms, between farm systems, and across geographic locations [
15]. In this context, capturing agroecosystem heterogeneity through farm typology analysis is crucial for designing sustainable policies and enhancing technology adoption [
17]. Particularly, understanding the variability of Andean agroecosystems—characterized by smallholder farms—is essential for accurately representing their reality.
A farm or agricultural holding constitutes the basic unit in typology analysis [
18]. Farm typologies serve as the foundation for analyzing farm performance and rural livelihoods [
19]. However, agroecosystem typologies have been employed for diverse purposes. Sarker et al. [
20] summarize several applications, including: studying greenhouse and climate-smart technology adoption, assessing food security, evaluating resource efficiency, identifying potential adopters of alternative farming methods, and classifying farm categories. These authors emphasize that typologies form the basis for developing appropriate interventions and policies. Nevertheless, farm-level typological analyses are essential for developing tailored management strategies for these agricultural production systems. Research on smallholder farmers remains notably scarce in Ecuador’s Andean highlands. Vanegas et al. [
21], in their examination of peasant agriculture in southern Ecuador’s Andes, demonstrate that understanding Andean smallholder systems requires deeper, more inclusive analytical frameworks.
The development of typologies serves as a methodological tool to understand agroecosystem complexity by providing a simplified representation of their diversity through classification into homogeneous groups based on multiple characteristic combinations [
19]. Various approaches exist for developing typologies [
22]. At a general level, however, Maton et al. [
23] distinguish two classes of farm typologies: those employing positivist methods based on statistical data analysis, and those using constructivist approaches grounded in expert knowledge. Most studies related to farm typology construction have utilized positivist methodologies [
24].
The criteria defining agroecosystem or farm types may be derived from local stakeholders’ knowledge or directly from farmer survey data [
24]. Traditional data analysis has undergone a significant transition, with automated statistical techniques largely replacing manual analysis. Currently, multivariate statistical techniques are most frequently employed for typology construction. However, typologies remain constrained by study objectives, data availability, and sample size [
19]. Regarding statistical techniques for typology development, unsupervised machine learning methods—particularly clustering approaches—are widely used. Graskemper et al. [
25] provide a synthesis of studies applying clustering techniques to develop farmer typologies across different world regions. Unlike supervised learning, unsupervised learning does not predict outcomes but rather identifies previously unrecognized patterns in data. These exploratory methods can subsequently inform predictive model development [
26].
Therefore, the present study addresses a critical gap in both the scientific and applied literature by characterizing the diversity of Andean suburban agroecosystems and identifying farm typologies that reflect distinct socioeconomic, productive, and environmental profiles. While most typology research in Ecuador has focused on rural or commercial farming systems, the suburban scale remains largely undocumented despite its growing importance for urban food security and territorial planning. This study contributes to filling that void by providing an empirical basis for understanding how suburban households organize their production, manage natural resources, and integrate into urban markets. Accordingly, this study aimed to (i) characterize production agroecosystems in suburban areas near Cuenca city in the Southern Ecuadorian Andes, and (ii) determine the principal smallholder farm typologies based on livelihood systems using an unsupervised machine learning method.
  4. Discussion
  4.1. Socioeconomic Heterogeneity and Livelihood Diversification
The characterization of Andean suburban agroecosystems in southern Ecuador revealed a notable heterogeneity in both the socioeconomic aspects of households and the structure and management of production systems, as well as in the destination of agricultural production. This heterogeneity successfully fulfills the first specific objective of the study, which aimed to describe the conditions of small farmers in suburban areas near the city of Cuenca. A key finding that emerged from this characterization is that, despite of its variability, agricultural activity is often an insufficient sole source of income for these households. Many farming families complement agricultural earnings with off-farm employment and remittances from relatives living abroad, a pattern that reflects both the vulnerability and adaptability of these agroecosystems. Similar livelihoods diversification strategies have been reported in other Andean territories by Toledo et al. [
40] and Haro et al. [
41], where migration and wage labor function as mechanisms to cope with unstable agricultural incomes and increasing production costs. This dependence on external income sources highlight the fragility of local agricultural economies and the urgent need for strategies that enhance the profitability and resilience of small-scale farming.
  4.2. Production Systems and Environmental Sustainability
From a production standpoint, vegetables dominate the cropping systems, which suggests a strong integration with urban markets. Nevertheless the widespread use of synthetic fertilizers and pesticides, combined with limited crop rotation, raises concern regarding the long-term environmental sustainability of these agroecosystems. This result coincides with previous studies in Andean agroecosystems that warn of the increasing pressure towards more input-intensive agriculture, even on small scales [
42,
43,
44,
45,
46]. The intensive management practices observed may compromise soil health, reduce biodiversity, and increase production risks associated with pest resistance and input price volatility. Despite the evident short-term economic benefits, such reliance on chemical inputs reflects a path dependency that is difficult to reverse without targeted interventions. Therefore, promoting ecologically based management practices, such as diversified rotations, integrated pest management, and the use of organic amendments, should be prioritized to reduce environmental pressures while maintaining productivity [
47]. Strengthening technical assistance programs, access to sustainable inputs, and farmer-to-farmer training could help transition suburban agriculture toward more sustainable and resilient production systems.
It is important to acknowledge that the results presented here capture a single temporal snapshot of suburban agroecosystems, corresponding to the period of fieldwork conducted during the second half of 2021. Consequently, seasonality variability in crop management and income composition was not fully captured. In the Andean highlands, marked climatic seasonality strongly influences crop calendars, labor allocation, and market prices, leading to fluctuations that can substantially modify farmers’ decisions through the year [
48]. Likewise, long-term processes—such as demographic changes, migration patterns, and shifts in agricultural policies—can reshape the socioeconomic conditions and sustainability trajectories of suburban households over time. Future studies should therefore incorporate longitudinal and multi-seasonal approaches that enable the identification of dynamic changes in production practices and livelihood strategies.
  4.3. Theoretical Framing of Typologies: Livelihood Strategies and Sustainability Transitions
The pursuit of our second objective—determining farmer typologies using data mining techniques– revealed that the observed heterogeneity is not random but can meaningfully categorized into three distinct typologies. These typologies represent distinct livelihood strategies shaped by differential access to resources, market integration, and adaptation to the suburban context.
The significant heterogeneity of agroecosystems has also been highlighted in similar studies, such as the one conducted in southern Ecuador by Vanegas et al. [
21]. Our findings can be further interpreted through the lens of sustainability transition theory [
49,
50], which provides a dynamic perspective on how these different farm types interact within a broader system. In this framework: Typology 2 represents the most vulnerable group, whose practices are often marginalized by the dominant socio-economic “landscape”. Their low incomes and high vulnerability highlight systemic pressures and exclusions. Typology 1 embodies the dominant “socio-technical regime” of commercial, input-intensive agriculture that is well integrated into existing market structures but faces growing environmental sustainability challenges. Typology 3 can be viewed as an emerging “niche” characterized by practices that align more closely with sustainability principles (e.g., lower agrochemical use), potentially supported by alternative income sources like remittances. This framing moves beyond a static classification and helps identify leverage points for policy. The goal becomes not just to support each type in isolation, but to foster interactions that can empower niche innovations (Typology 3), reshape the prevailing regime (Typology 1) towards greater sustainability, and create protective buffers for the most vulnerable (Typology 2).
  4.4. Concrete Policy Implications for Differentiated Interventions
The typologies identified in this study provide a valuable empirical foundation for designing differentiated policies that move beyond one-size-fits-all approaches. The following concrete, actionable recommendations are linked directly to the specific profiles of each typology:
For Typology 2 (vulnerable, low-income households): Policy should focus on poverty alleviation and risk reduction. This includes facilitating access to social safety nets, microcredit for basic inputs, and programs that promote food security and subsistence production. Training in low-cost, sustainable practices (e.g., homemade organic pesticides) and support for forming commercial alliances could help improve their market position and resilience.
For Typology 1 (commercial, input-intensive farms): Interventions should aim at “sustainable intensification”. This group would benefit from technical assistance and economic incentives for adopting integrated pest management and precision fertilization to reduce environmental externalities without sacrificing yields. Policies that strengthen their access to stable, value-added markets (e.g., through contracts or branding) and provide green subsidies for environmentally friendly technologies are key.
For Typology 3 (lower-input, remittance-supported households): This group represents a potential model for transition. Policy should aim to “empower the niche” by providing support for organic or agroecological certification, creating market linkages for sustainably produced goods, and offering training in advanced agroecological techniques like crop diversification and agroforestry, as shown by Córdova et al. [
51], such strategies can reduce dependence on off-farm activities and income. This could help solidify their environmentally friendly practices and enhance their economic viability, making them a demonstration model for others.
For all typologies, the high dependence on remittances underscores the need for policies that strengthen the autonomy and profitability of the agricultural sector itself. National initiatives of the Ecuadorian government such as the “
Plan Nacional para el Buen Vivir” and the “
Estrategia Nacional para la Soberanía Alimentaria” emphasize the dual need to improve rural livelihoods while safeguarding environmental integrity, they could be actively implemented in these suburban contexts, which often occupy an ambiguous policy space between urban and rural frameworks [
52,
53].
The patterns identified in this study are closely aligned with broader debates on agricultural policy and territorial development in Ecuador. Our findings suggest that suburban agriculture in Cuenca occupies an ambiguous policy space, where it is neither fully integrated into urban planning frameworks nor adequately supported by rural development programs. The typologies identified provide a practical diagnostic tool that can inform local governments, development agencies, and non-governmental organizations in designing evidence-based interventions.
Future research should build upon this foundation by integrating longitudinal monitoring and participatory approaches. The inclusion of time-series data or repeated surveys would help to assess the stability of the typologies identified and to determine whether households move between types in response to climatic shocks, market opportunities, or policy interventions. Such an approach would also strengthen the capacity of typology-based research to serve as an early warning tool for assessing the resilience and adaptability of suburban agroecosystems under conditions of environmental and socioeconomic uncertainty. All this work will be essential to foster transitions toward more equitable and sustainable suburban food systems in Ecuador and across the broader Andean region.
  5. Conclusions
This study characterized the heterogeneity of Andean suburban agroecosystems in southern Ecuador and identified three distinct smallholder farm typologies using an unsupervised clustering approach (PAM with Gower’s distance). The typologies reveal that suburban agriculture at the rural–urban interface is not a monolithic entity but a complex landscape where households employ diverse livelihood strategies. These range from economically vulnerable, subsistence-oriented systems to more commercially integrated and environmental conscious operations. A critical cross-cutting finding is the heavy reliance on remittances and off-farm income, underscoring both the economic vulnerability and the adaptive capacity of these agroecosystems in the face of limited agricultural profitability.
From a conceptual perspective, this research makes a significant contribution by demonstrating that farm typologies, when interpreted through frameworks like sustainability transition theory, provide a powerful lens for understanding the dynamics of agricultural systems. The identified typologies—representing vulnerable, regime, and niche profiles—offer a structured way to analyze interactions, constrains, and potential pathways for change within the suburban agricultural landscape.
From a practical and policy standpoint, the findings provide a robust, empirical basis for designing differentiated interventions. The one-size-fits-all approach is demonstrably inadequate for the diverse realities captured in this study. Instead, policymakers and local governments can use this typology to tailor support: (i) targeting economic strengthening and safety nets for vulnerable households (Typology 2); (ii) promoting sustainable intensification and market integration for commercial farmers (Typology 1), and (iii) empowering and scaling agroecological practices among the more environmentally sustainable producers (Typology 3).
The novelty of this research lies in the integration of machine learning techniques with territorial analysis in a suburban Andean context—a region where empirical typologies are scarce despite the growing importance of peri-urban agriculture for urban food security and territorial resilience.
Finally, we acknowledge the limitations of a cross-sectional design and the conversion of some quantitative variables into categorical data. Future research should employ clustering on mixed data, with continuous variables retained, to test sensitivity. Furthermore, longitudinal and multi-seasonal are needed to explore how household typologies evolve in response to environmental change and policy changes. Socializing and validating these typologies with the producers themselves will be a critical next step. Undoubtedly, this will be a task for future work, which can continue to use the findings of this study as a starting point. Such efforts are essential to advance our understanding of these dynamic agroecosystems and to support their transition toward greater sustainability, equity, and resilience in the face of rapid urbanization in the Andean region.