Collective behavior, such as massive adoption of new technologies or their quitting (also called ”churn” in business), is a complex social contagion phenomenon . Individuals are influenced both by media and by their social ties in their decision-making. This feature was first modeled in the 1960s with the Bass model of innovation diffusion . This model distinguishes between exogenous and peers’ influence and reproduces the observation that few early adopters are followed by a much larger number of early and late majority adopters, and finally, by few laggards .The differential equations of the Bass model have been extensively used to describe the diffusion process and forecast market size of new products and the peaks of their adoption .
Only in the past two decades, the importance of the social network structure has become increasingly clear in the mechanism of peers’ influence . In spreading phenomena, individuals perform a certain action only when a sufficiently large fraction of their network contacts have performed it before [6, 7, 8, 9, 10]. Complex contagion models, in which adoption depends on the ratio of the adopting neighbors [1, 11], have been efficiently applied to characterize the diffusion of online behavior  and online innovations [13, 14]. In order to incorporate the role of social networks in technology adoption, the Bass model has been implemented through an agent-based model (ABM) version . This approach is similar to other network diffusion approaches regarding the increasing pressure on the individual to adopt as network neighbors adopt; however, spontaneous adoption is also possible in the Bass ABM . The structure of social networks in diffusion, such as community or neighborhood structure of egos, are still topics of interest [17, 18]. Nevertheless, understanding how physical geography affects social contagion dynamics is still lacking .
Early work on spatial diffusion has highlighted that adoption rate grows fast in large towns and in physical proximity to initial locations of adoption [19, 20]. It is argued that spatial diffusion resembles geolocated routing through social networks . Social contagion – similar to geolocated routing  – occurs initially between two large settlements located at long distances and then becomes more locally concentrated reaching smaller towns and short distance paths. This dynamic is measured for the first time in this work by studying ten years of a large scale OSN.
We analyze the adaption dynamics of iWiW, a social media platform that used to be popular in Hungary, over its full life cycle (2002-2012). This allows us to systematically measure spatial diffusion and discover the relevant empirical features of the contagion dynamics. We also explore the opposite spatial process of quitting, or churning the product [22, 23, 24, 25, 26]. When quitting becomes collective, the life-cycle of the product or technology ends [24, 25]. Recent studies have shown that both adopting and quitting the technology follow similar diffusion mechanisms [27, 22, 26]. However, geographical characteristics of churning are still unknown. It can be presumed that users switch to new products and move on from the old ones in large cities early as that is where competing products are launched .
We find empirical evidence that diffusion and churn start across distant big cities and become more local over time as adoption and quitting reach small towns in different time scales. Considering towns as isolated systems, the Bass model describes adoption dynamics, while the gradual increase of churn is exponential. To study the spatial characteristics of complex contagion, we develop a Bass ABM of new technology’s adoption preserving the community structure and geographical features of connections within and across towns. This allows us to measure the influence of spatial interaction and similarity of peers in terms of adoption tendency in towns on local diffusion dynamics. The number of adopters over the phases of the product life-cycle scales with the population of the town as a power law. Moreover, in the early stages of the life-cycle, complex contagion is likely to occur across distant peers. Unfolding these aforementioned empirical features, we were able to capture the limitations of the standard model of complex contagion in predicting adoption at local scales and to describe key elements of diffusion in geographical space through the contact of local and distant peers.
The social platform analyzed in this work is iWiW, which was a Hungarian online social network (OSN) established in early 2002. The number of users was limited in the first three years but started to grow rapidly after a system upgrade in 2005 in which new functions were introduced (e.g. picture uploads, public lists of friends, etc.). iWiW was purchased by Hungarian Telecom in 2006 and became the most visited website in the country by mid-2000s. Facebook entered the country in 2008, and outnumbered iWiW daily visits in 2010, which was followed by an accelerated churn. Finally, the servers of iWiW were closed in 2014. In sum, more than 3 million users (around 30% of the country population) created a profile on iWiW over its life-cycle and reported more than 300 million friendship ties on the website. Until 2012, to open a profile, new users needed an invitation from registered members. Our dataset covers the period starting from the very first adopters (June 2002) until its late days (December 2012). Additionally, it contains home location of the individuals, their social media ties, invitation ties, and their dates of registration and last login for each user. The two last variables are used in this work to identify the date of adoption and churn. Spatial diffusion and churn of iWiW have been visualized in Movie S1.
In previous studies, the data has demonstrated that the gravity law applies to spatial structure of social ties , adoption rates correlate positively both with town size and with physical proximity of the original location , users central in the network churn the service after the users who are on the periphery of the network , and the cascade of churn follows a threshold rule . The geographical aspects of diffusion and churn processes at the country scale have not been explored in spite the data being particularly well suited for their study.
In the first step of the analysis, we empirically investigated the spatial diffusion and churn over the OSN life-cycle (Figure 1). We categorized the users based on their adoption time for which we applied the rule proposed by Rogers that divides adopters as follows: (I.) Innovators: first 2.5%, (II.) Early adopters: next 13.5%, (III.) Early Majority: following 34%, (IV.) Late Majority: next 34%, and (V.) Laggards: last 16%. The adoption initially occurred at long distances: the innovation spout from Budapest, after three years with few adopters, reaching the most populated towns first (see Fig. S1). Following this, diffusion became less monocentric and other towns also emerged as spreaders (Figure 1, part A). The probability of innovation spreading to distant locations decreased over time (Fig. S2), indicating that diffusion became more local. Spatial patterns of churn were similar to adoption but its runoff occurred within a shorter timespan. It began in the middle of the life-cycle (coinciding with Facebook’s launch to the country) and accelerated further after the international competitor gained dominance over the Hungarian market (Fig. 1, part B).
To explore the statistical characteristics of adoption and churn, we fit the two respective cumulative distribution functions (CDF) as shown in Figure1 and Figure3B. The Bass CDF curve  is defined as , with the number of new adopters at time t (months), pa innovation or advertisement parameter of adoption (independent from the number of previous adopters), and qa imitation parameter (dependent on the number of previous adopters). This nonlinear differential equation can be solved by:
with size of adopting population. Eq. 1 described the CDF empirical values with sum of squared distance from the mean SS= 0.000245 and empirical values qa = 0.108; pa= 0.00016. This approach overestimated the adoption rate at the time when Facebook entered the country after 2008 (Fig. S3).
Meanwhile, an exponential growth function explains the dynamics of churn and is defined as:
where x0 is the churn rate at time 0 and qch is the parameter of cumulative churn. Estimated parameter values are: qch = 0.069; x0= 3.47e-5; and the fit of the model has SS= 0.002277 (Fig. S3). We repeated these estimations of the diffusion parameters for every geographic settlement (called towns henceforth) and consequently estimated and .
The towns’ differences in terms of adoption peak  indicate the local deviations from the global diffusion dynamics. No spatial autocorrelation of early peaks was observed; the comparison of the maps, as depicted in Figures 2A and 2B, revealed that adoption peaks early in large towns. The Bass model estimation of the adoption curve characteristic for every town is:
and is positively correlated with the empirical peaks in Figure 2D.
If either of these parameters and are fixed, adoption becomes faster as the other increases (Figure 2E). Furthermore, towns diverge from Eq. 3 for peak times in months 50-60, corresponding to low and larger . This suggests that the innovation term in the Bass model is lower and the process is driven by imitation in towns where diffusion happens at the primitive stage. The spatial clustering of larger around large towns suggests that advertisement not only has influence on adoption in large towns but also in their surroundings (Figure 2C).
The coefficient of imitation varies across towns; however, as seen in Figure 2F, the rate of exponential growth in churn is stable across towns. Figure 2G illustrates that churn starts early in towns that adopted early as well. This indicates that churn, similar to adoption, originates in larger towns. Further, empirical features such as the number of established ties in different adoption phases as function of distance from the innovation origin, the scaling exponents of churn rate as a function of towns population, and the local peer effects of churn have been depicted in Figs. S4-S7. These findings confirm that, similar to the adoption diffusion, churn also follows spatial patterns.
We further investigated the spreading of adoption on a social network embedded in geographical space connecting towns and also individuals within these towns via the ABM version of the Bass model. We used the social network observed in the data set by keeping the network topology fixed at the last time stamp without removing the churners. The ABM is tested on a 10% random sample of the original data (300K users) by keeping spatial distribution and the network structure stratified by towns and network communities, which were detected from the global network using the Louvain method .
In the ABM, each agent has a set of neighbors taken from the network structure (Figure 3A) and is characterized by a status that can be susceptible for adoption or infected (already adopted). Once an agent reaches the status , it cannot switch back to . To reflect reality, the users that adopted in the first month in the real data were set as infected in . The process of adoption is defined as:
is a random number picked from a uniform distribution for every agenteach . denotes adoption probability exogenous to the network and is adoption probability endogenous to the network. In order to focus on the role of network structure in diffusion, and are kept homogeneous for all in the network. Consequently, the process is driven by the neighborhood effect defined as:
where is the number of infected neighbors and is the number of susceptible neighbors at .
This definition of the process implies that users are assumed to be identically influenced by advertisements and other external factors and are equally sensitive to the influence from their social ties that are captured by the fraction of infected neighbors . The decision regarding adoption of innovation or postponing this action is an individual choice. This model belongs to the complex contagion class [1, 12] because adoption over time is controlled by the fraction of infected neighbors [9, 13], as the fraction of infected neighbors increases, the agent becomes more likely to adopt the innovation.
The values of and were estimated using Eq. 1 on the ABM sample, which provided an effective first fit of the ABM parameters . We made ABM realizations with time-steps that reflect the months taken from the real data. In Figure 3B, the ABM results (orange line) are close to the estimates of the diffusion equation (DE), and slightly closer to the empirical data than the DE.
Further, at the town level, the predicted month of adoption peak in the ABM matches the observed month of adoption peak in the data with 95% confidence interval [-5.84; -4.77]; indicating that the ABM predicts adoption peaks early in most towns (Figure3C). In order to analyze the role of network structure in adoption dynamics, we correlated the town-level prediction failures with several town-level network properties (Figure 3D): density, the fraction of observed connections among all possible connections in the town’s social network; transitivity, the fraction of observed triangles among all possible triangles in the town’s social network; number of network communities, in a town’s social network detected by Louvain algorithm; average path length, the distance of nodes within the town’s social network; modularity, the density of social links between network communities; and assortativity, the index of similarity of peers in terms of adoption time .
Density and transitivity are claimed to facilitate diffusion . In fact, the ABM predicted the peak of adoption early in the towns where networks were relatively dense and transitivity was relatively high (Figure 3
D). On the contrary, relatively large network modularity in the town delays simulated adoption peak. We found the strongest positive correlation between prediction failure and assortative mixing of adoption time. Particularly, we classified each user into the adopter categories stated by Rogers and calculated Newman’s assortativity r  for every town. This indicator takes the value of 0 when there is no assortative mixing by adopter types and a positive value when links between identical adopter types are more frequent than links between different adopter types. Assortative mixing at the country level has been illustrated in Fig.S8.
The positive correlation between assortative mixing and prediction failure weighted by town population (described in the Methods section) has been illustrated in Figure3E. The ABM predicted adoption earlier in the majority of small towns, where no assortative mixing was found. On the contrary, the ABM predicted adoption late in large towns, where Innovators and Early Adopters were only loosely connected to Early- and Late Majority and Laggards. These findings confirm that assortativity in terms of the adoption probability influences diffusion [9, 32], which makes the spatial prediction problem difficult to solve.
To further investigate assortative mixing in spatial diffusion, the Bass ABM results were compared with the empirical data according to three key aspects: adoption time, ties similarity, and geographical space. Figure 4A contrasts an average ABM realization with empirical data in terms of the average difference between adoption time between each ego and the time of adoption of his/her network neighbors. Figure 4B demonstrates the similarity of peers in each town using the Newman r index of assortative mixing . The ABM differs from the empirical data in determining how fast individuals follow their connections; the empirical data has a significantly stronger assortativity than the ABM. These observations confirm that assortative mixing in terms of adoption tendency is an important feature of spatial diffusion of innovation.
Turning to the geographical analysis, Figure 4C compares the distance of influential peers, measured as the probability that Innovators and Early Adopters  have social connections at distance [36, 29, 37, 38, 39] in the ABM versus in the empirical data. The finding stating that ties of Early Adopters and Innovators have longer distance in reality than in the ABM confirms that innovation spreads with high propensity to distant locations during the early phases of the life-cycle .
In order to gain knowledge of the presence of different adopters in different geographies, their number was compared with the town population in Figure 4D and the coefficient of the linear regression in towns with a population greater than was measured . An empirical super linear scaling in the Early Adopters and Innovators phase was observed that was not captured by the ABM. This result indicates strong urban concentration of diffusion during the early phases of the life-cycle . Fundamentally, assortativity requires labeling adopter types in the ABM, which could be possible only a-posteriori of the diffusion dynamics. Introducing this scaling law in the spatial ABM as a function of town population offers new opportunities for an improved modeling framework.
Taken together, we studied spatial diffusion over the life-cycle of an online product on a country-wide scale. The empirical features that were missing from the mainstream Bass-agent-based model of complex contagion were explored. In fact, assortative mixing and peer influence are larger in the empirical data than in the ABM. Additionally, contagion in the early stages of the product life-cycle occurs mostly between distant locations with larger populations, where the opposite process, or churn, also occurs earlier.
We further demonstrate a super linear relation of Innovators and Early Adopters as a function of the town population. This highlights the importance of urban settlements in the adoption of innovations. By combining complex diffusion with empirical scaling from urban science, we proposed a modeling framework that corresponds with the early notion of Haegerstrand . Adoption peaks initially in large towns and then diffuses to smaller settlements.
Nonlinear least-square regression with the Gauss-Newton algorithm was applied to estimate the parameters in Equations 1 and 2. In order to identify the bounds of parameters search in the ABM, this method needs starting points to be determined, which were pa = 0.007 and qa = 0.09 for Equation 1 and xch = 10-6 and qch = 0.08, for Equation 2.
Identical estimations were applied in a loop of towns, in which the Levenberg-Marquardt algorithm  was used with maximum 500 iterations. This estimation method was applied because the parameter values differ across towns, and therefore town-level solutions may be very far from the starting values set for the country-scale estimation. Initial values were set to = 7*10-5 and = 0.1 in Equation 1 and and in Equation 2.
To test how assortative mixing influences the spatial prediction of the diffusion ABM in Figure 3D, we estimated the prediction failure with Newman’s r
with ordinary least square estimator and used the number of OSN users in the town as weights in the regression.
To characterize urban scaling of adoption and churn in Figure4 and Fig.S5, we applied the ordinary least square method to estimate the formula , where y(t) denotes the accumulated number of adopters and churners over time period t, and x is the population in the town.
Data tenure was controlled by a non-disclosure agreement between the data owner and this research group. The access for the same can be requested by email to the corresponding author.
Balazs Lengyel acknowledges financial support from the Rosztoczy Foundation, the Eotvos Fellowship of the Hungarian State, and from the National Research, Development and Innovation Office (KH130502). Riccardo Di Clemente as Newton International Fellow of the Royal Society acknowledges the support of The Royal Society, The British Academy, and the Academy of Medical Sciences (Newton International Fellowship, NF170505).
Author contributions statement
B.L. and M.G. designed the research, B.L. and R.D.C. conceived the experiments, B.L., R.D.C., J.K and M.G. analyzed the results. All authors wrote and reviewed the manuscript.
-  Centola, D. & Macy, M. Complex contagions and the weakness of long ties. American journal of Sociology 113, 702–734 (2007).
-  Bass, F. M. A new product growth for model consumer durables. Management science 15, 215–227 (1969).
-  Rogers, E. M. Diffusion of innovations (Simon and Schuster, 2010).
-  Mahajan, V., Muller, E. & Bass, F. M. New product diffusion models in marketing: A review and directions for research. In Diffusion of technologies and social behavior, 125–177 (Springer, 1991).
-  Centola, D. How Behavior Spreads: The Science of Complex Contagions, vol. 3 (Princeton University Press, 2018).
-  Schelling, T. C. Micromotives and Macrobehavior (WW Norton, 1978).
-  Granovetter, M. Threshold models of collective behavior. American journal of sociology 83, 1420–1443 (1978).
-  Valente, T. W. Social network thresholds in the diffusion of innovations. Social networks 18, 69–89 (1996).
-  Watts, D. J. A simple model of global cascades on random networks. Proceedings of the National Academy of Sciences 99, 5766–5771 (2002).
-  Banerjee, A., Chandrasekhar, A. G., Duflo, E. & Jackson, M. O. The diffusion of microfinance. Science 341, 1236498 (2013).
-  Pastor-Satorras, R., Castellano, C., Van Mieghem, P. & Vespignani, A. Epidemic processes in complex networks. Reviews of modern physics 87, 925 (2015).
-  Centola, D. The spread of behavior in an online social network experiment. science 329, 1194–1197 (2010).
-  Karsai, M., Iñiguez, G., Kikas, R., Kaski, K. & Kertész, J. Local cascades induced global contagion: How heterogeneous thresholds, exogenous effects, and unconcerned behaviour govern online adoption spreading. Scientific reports 6 (2016).
-  Katona, Z., Zubcsek, P. P. & Sarvary, M. Network effects and personal influences: The diffusion of an online social network. Journal of marketing research 48, 425–443 (2011).
-  Rand, W. & Rust, R. T. Agent-based modeling in marketing: Guidelines for rigor. International Journal of Research in Marketing 28, 181–193 (2011).
-  Watts, D. J. & Dodds, P. S. Influentials, networks, and public opinion formation. Journal of consumer research 34, 441–458 (2007).
-  Ugander, J., Backstrom, L., Marlow, C. & Kleinberg, J. Structural diversity in social contagion. Proceedings of the National Academy of Sciences 109, 5962–5966 (2012).
-  Aral, S. & Nicolaides, C. Exercise contagion in a global social network. Nature Communications 8 (2017).
-  Griliches, Z. Hybrid corn: An exploration in the economics of technological change. Econometrica, Journal of the Econometric Society 501–522 (1957).
-  Hagerstrand, T. et al. Innovation diffusion as a spatial process. Innovation diffusion as a spatial process. (1968).
-  Leskovec, J. & Horvitz, E. Geospatial structure of a planetary-scale social network. IEEE Transactions on Computational Social Systems 1, 156–163 (2014).
-  Garcia, D., Mavrodiev, P. & Schweitzer, F. Social resilience in online communities: The autopsy of friendster. In Proceedings of the first ACM conference on Online social networks, 39–50 (ACM, 2013).
-  Ribeiro, B. Modeling and predicting the growth and death of membership-based websites. In Proceedings of the 23rd international conference on World Wide Web, 653–664 (ACM, 2014).
-  Kairam, S. R., Wang, D. J. & Leskovec, J. The life and death of online groups: Predicting group growth and longevity. In Proceedings of the fifth ACM international conference on Web search and data mining, 673–682 (ACM, 2012).
-  Kloumann, I., Adamic, L., Kleinberg, J. & Wu, S. The lifecycles of apps in a social ecosystem. In Proceedings of the 24th International Conference on World Wide Web, 581–591 (International World Wide Web Conferences Steering Committee, 2015).
-  Török, J. & Kertész, J. Cascading collapse of online social networks. Scientific Reports 7, 16743 (2017).
-  Dasgupta, K. et al. Social ties and their relevance to churn in mobile telecom networks. In Proceedings of the 11th international conference on Extending database technology: Advances in database technology, 668–677 (ACM, 2008).
-  Audretsch, D. B. & Feldman, M. P. R&d spillovers and the geography of innovation and production. The American economic review 86, 630–640 (1996).
-  Lengyel, B., Varga, A., Ságvári, B., Jakobi, Á. & Kertész, J. Geographies of an online social network. PloS one 10, e0137248 (2015).
-  Lengyel, B. & Jakobi, Á. Online social networks, location, and the dual effect of distance from the centre. Tijdschrift voor economische en sociale geografie 107, 298–315 (2016).
-  Lőrincz, L., Koltai, J., Győr, A. F. & Takács, K. Collapse of an online social network: Burning social capital to create it? Social Networks 57, 43–53 (2019).
-  Toole, J. L., Cha, M. & González, M. C. Modeling the adoption of innovations in the presence of geographic and media influences. PloS one 7, e29528 (2012).
-  Blondel, V. D., Guillaume, J.-L., Lambiotte, R. & Lefebvre, E. Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment 2008, P10008 (2008).
-  Xiao, Y., Han, J. T., Li, Z. & Wang, Z. A fast method for agent-based model fitting of aggregate-level diffusion data. Tech. Rep., SSRN (2017).
-  Newman, M. E. Mixing patterns in networks. Physical Review E 67, 026126 (2003).
-  Liben-Nowell, D., Novak, J., Kumar, R., Raghavan, P. & Tomkins, A. Geographic routing in social networks. Proceedings of the National Academy of Sciences of the United States of America 102, 11623–11628 (2005).
-  Scellato, S., Mascolo, C., Musolesi, M. & Latora, V. Distance matters: Geo-social metrics for online social networks. In WOSN (2010).
-  Onnela, J.-P., Arbesman, S., González, M. C., Barabási, A.-L. & Christakis, N. A. Geographic constraints on social network groups. PLoS one 6, e16939 (2011).
-  Wang, P., González, M. C., Hidalgo, C. A. & Barabási, A.-L. Understanding the spreading patterns of mobile phone viruses. Science 324, 1071–1076 (2009).
-  Bettencourt, L. M., Lobo, J., Helbing, D., Kühnert, C. & West, G. B. Growth, innovation, scaling, and the pace of life in cities. Proceedings of the national academy of sciences 104, 7301–7306 (2007).
-  Moré, J. J. The levenberg-marquardt algorithm: implementation and theory. In Numerical analysis, 105–116 (Springer, 1978).
Video on spatial diffusion and churn of iWiW. Nodes denote towns and links represent invitations sent across towns between 2002 and 2012 on a monthly basis. The size of nodes illustrate the number of users who registered in the town by the given month and the color depict the share of those registered users who still logged in. Adoption started in Budapest (the capital) and was followed first in its surroundings and other major regional subcenters. The vast majority of invitations has been sent from Budapest in the initial phase of diffusion and subcenters started to transmit spreading when diffusion speeded up in the middle of the life-cycle. A decisive fraction of users logged in to the website even after Facebook antered the country in 2008. Collective churn started in 2010 and the rate of active users dropped quickly in most of the towns. Exceptions are small villages in the countryside, where people have difficulties to adopt new waves of social media innovation., For a video on spatial diffusion and churn, go to https://vimeo.com/251494015