In this paper, the authors propose novel methodology to analyze the dynamics of large-scale online network structures caused by significant exogenous shocks (foreign policy crises and the onset of military conflicts). The article focuses on diagnosing cohesion or polarization processes. As a first step, on the basis of the existing theoretical traditions, the authors analyze mechanisms at the micro-level that may lead to consolidation or polarization. Among these, they reveal mechanisms based on changes in position and mechanisms based on changes in identity. As a second step, the authors determine the “network projection” of these mechanisms’ actions: the changes in the structures of interaction networks between individuals they lead to. At this point mathematical modeling plays a key role, allowing for specific predictions regarding network behavior, expressed in changes in observable metrics. Four network indicators are proposed: the number of communities (clusters), modularity, the number of connections, and the average degree of nodes. As a result of computational experiments, the expected dynamics of all the indicators is calculated, which is compared with the corresponding mechanisms of changes in political positions or identity. As a third step, these predictions are compared with the indicators calculated from the empirical data. For the empirical analysis the article uses messages from the Russianlanguage political and news telegram channels, corresponding in time to the start of a special military operation (February-March, 2022), and those that chronologically occur 10 months earlier or later (April, 2021, and December, 2022). The general sample of such messages contains those with hyperlinks to other channels. It is the presence of such hyperlinks is considered to be a sign of the connection and is used to build a network. For each time period, the same network parameters are measured as for the computational data. Comparison of the observed dynamics with what is predicted by the models indicates that in the case of the special military operation, one key mechanism was at work — cohesion through the expansion of in-group boundaries, based on shifting to higher-order identity categories.