Next Article in Journal
When RNN Meets CNN and ViT: The Development of a Hybrid U-Net for Medical Image Segmentation
Previous Article in Journal
On a Nonlinear Proportional Fractional Integro-Differential Equation with Functional Boundary Conditions: Existence, Uniqueness, and Ulam–Hyers Stability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Modeling Phase Transitions in Starling Flocks Using Fractal Dimension of Self-Affine Functions

1
Laboratory of Intelligent Information Processing, Army Engineering University of PLA, Nanjing 210007, China
2
Department of General Education, Army Engineering University of PLA, Nanjing 210007, China
3
College of Command & Control Engineering, Army Engineering University of PLA, Nanjing 210007, China
4
National Key Laboratory on Near-Surface Detection, Beijing 100072, China
5
College of Advanced Interdisciplinary Studies, National University of Defense Technology, Nanjing 211101, China
*
Author to whom correspondence should be addressed.
Fractal Fract. 2026, 10(1), 17; https://doi.org/10.3390/fractalfract10010017
Submission received: 29 October 2025 / Revised: 18 December 2025 / Accepted: 23 December 2025 / Published: 27 December 2025

Abstract

This paper uses the theory of self-affine fractal functions to model the dynamic flight graphs of starling flocks, integrating the fractional calculus of self-affine fractal functions to quantitatively characterize the intrinsic nonlinear dynamics and memory effects within the system, employing statistical inference methods to find the fractal fit for the images. The changes in box dimensions over time could characterize the phase transition process of the starling flight flocks. By analyzing the rate of change of fractal dimensions, we identify critical points corresponding to phase transitions during collective flight behavior. During the flight of the starling flocks, a real-time phase transition process for evading attacks and effective advancement has been identified. Experimental data confirms the effectiveness of controlling the phase transition.

1. Introduction

Studying the phase transition problem of biomimetic swarms is an important research topic for solving the phase transition control of unmanned flight swarms.
Let’s first take a look at the phase transition problem of bird flight in nature.
In the natural world, meticulously coordinated group behavior is essential for the survival of certain animal species. For example, starlings gather in large flocks annually and engage in highly synchronized movements. During flight, these flocks form fascinating and dynamic patterns—sometimes resembling hearts, hourglasses, or even various animal shapes—producing spectacular and visually captivating scenes. So, what is the secret of their collective dance? What is the mechanism behind the rapid collective formation change of starlings when encountering natural enemies?
Current research on the behavioral dynamics of bird flocks predominantly focuses on individual-level interactions and coordination [1,2]. These studies mainly address aspects such as the flock morphology and the spatial distances associated with rapid fluctuations of individual birds. However, investigations into the collective behavior of bird flocks as a unified entity remain limited. Giorgio Parisi, the 2021 Nobel Laureate in Physics, in collaboration with Cavagna and others, successfully reconstructed the three-dimensional trajectories of birds, observed critical phenomena, and computed the positions of individuals within the flock at each time point. By analyzing successive video frames, they were able to derive the velocity of each bird [3]. Despite these advancements, research on the phase transition processes in starling murmurations and unmanned aerial swarms remains imprecise and underdeveloped. Christodoulidi et al. [4] investigated phase transitions in bird flocking models using the Vicsek model, demonstrating that starling flocks exhibit order-disorder transitions characterized by critical phenomena. Bountis et al. [5] further explored the collective dynamics of bird flocks, revealing that phase transitions in these systems are closely related to the emergence of long-range correlations and scale-free behavior.
In everyday life, we frequently encounter irregular and complex patterns-such as snowflakes in winter, fluctuations in stock market indices, or electrocardiogram (ECG) signals. These complex, non-smooth curves prompt the question of how best to characterize them, which is a challenge that also arises in the study of collective systems. Due to the inherent complexity of such swarms, simple functions may not suffice to capture their underlying characteristics. Therefore, this paper focuses on employing fractal functions to describe and identify the patterns and laws governing phase transitions in collective behaviors.
Phase transitions represent fundamental phenomena in statistical physics, characterized by abrupt changes in system properties. The theoretical framework for understanding phase transitions has been extensively developed through scaling theory and renormalization group methods [6]. Suzuki [7] established important connections between phase transitions and fractal geometry, demonstrating that critical phenomena exhibit self-similar structures across multiple scales. Recent advances in percolation theory have further elucidated the relationship between critical exponents and fractal dimensions [8,9], identifying multiple distinct fractal dimensions that characterize different aspects of critical behavior.
When facing unmanned clusters, due to the large number of individuals and the complex and diverse forms of motion, the data will become even more complex and diverse. It is difficult to use general methods to intuitively and effectively describe the phase transition process, and the research on the stability of phase transition is not deep enough. This requires a higher complexity of the function used to fit the data. Research has revealed that fractal geometry provides a powerful framework for characterizing abstract morphological structures [10]. The self-affine fractal function has self-fitting properties. Its function is more complex and can be applied to this situation. Additionally, previous studies have shown that the fractal dimension value [11] has a certain degree of recognizability for different things. Hence, this study proposes to explore phase transition behaviors in starling flocks through the analysis of the rate of change in the fractal dimensions of self-affine functions. The theoretical foundations of fractal geometry and its applications to complex systems have been extensively developed [12,13], providing a solid basis for our approach.
The structure of this paper is as follows: Section 2 presents the theoretical foundation, including self-affine fractal functions, dimension computation methods, and a classification of phase transitions. Section 3 describes the method for fitting images of starling flocks using self-affine fractal functions based on least squares optimization. Section 4 presents the computed fractal dimensions for different time intervals. Section 5 constructs a time-dimension dynamic model to identify critical points of phase transitions. Section 6 provides a discussion including connections to percolation theory. Finally, conclusions are presented.

2. Preliminary Concepts and Related Foundations

This section aims to systematically introduce and summarize several fundamental methodologies and relevant theoretical concepts employed in the modeling of phase transitions in starling flocks.

2.1. Self-Affine Fractal Functions

2.1.1. Definition of Self-Affine Fractal Functions

We commence with an introduction to self-affine fractal functions employed in this study. Self-similar sets [14,15] represent a particular subclass of self-affine sets. Often, the graph of a self-affine set can be interpreted as the graph of an associated function, which is termed a self-affine fractal function. We begin by formalizing the definition of a self-affine set.
Notation Convention. To ensure clarity and avoid ambiguity in the mathematical formulation, we establish the following notational conventions. Throughout this paper, ( x , y ) denotes spatial coordinates in the two-dimensional plane, where x and y represent the horizontal and vertical coordinates, respectively. The variable t is reserved exclusively for time and should not be interpreted as a spatial coordinate.
We observe the starling flock at discrete time instants t i for i = 1 , 2 , , K , where K N denotes the total number of observation times (equivalently, the number of images captured). Here, i serves as the time index. At each time instant t i , we extract N N spatial coordinate points { ( x j , y j ) } j = 1 N from the corresponding image, where j = 1 , 2 , , N is the spatial point index.
The self-affine function at time t i , denoted by g i , is characterized by a set of parameters ( a i , b i , c i ) obtained through least squares fitting of the N spatial points. As time evolves from t 1 to t K , we obtain K different self-affine functions { g 1 , g 2 , , g K } with corresponding parameter sets { ( a 1 , b 1 , c 1 ) , ( a 2 , b 2 , c 2 ) , , ( a K , b K , c K ) } . Each function g i is constructed as the attractor of an iterated function system (IFS) consisting of m = 3 affine transformations, where m is a fixed constant throughout the analysis.
It is important to distinguish between the different indices used in this work: i indexes time instants ( i = 1 , 2 , , K ), while j indexes spatial points within each image ( j = 1 , 2 , , N ). The parameter m = 3 represents the fixed number of transformations in the IFS and should not be confused with either the time index or the spatial point index. In our experiments, typically N 6000 –7000 spatial points are extracted from each image, while K ranges from 10 to 20 time instants.
The physical interpretation of this framework is as follows. The starling flock’s spatial configuration evolves over time. At each observation time t i , we capture an image containing N spatial points ( x j , y j ) and fit these points using a self-affine fractal function g i with parameters ( a i , b i , c i ) . By analyzing how these parameters and the corresponding fractal dimensions change across the K time instants, we characterize the phase transition dynamics of the flock.
Definition 1 
([15]). Let { S 1 , S 2 , , S m } be a collection of affine transformations defined by the matrix representation, with m N being a fixed positive integer:
S i x y = 1 / m 0 a i c i x y + ( i 1 ) / m b i ,
where a i and b i are arbitrary constants, and the scale parameters satisfy 1 / m < c i < 1 .
Denote by p 1 = 0 , b 1 / ( 1 c 1 ) and p m = 1 , ( a m + b m ) / ( 1 c m ) the fixed points of S 1 and S m , respectively. Suppose the parameters of the matrices are chosen such that the following compatibility condition holds:
S i ( p m ) = S i + 1 ( p i ) , 1 i m 1 ,
where p i is the fixed point corresponding to the transformation S i . The line segments connecting [ S i ( p 1 ) , S i ( p m ) ] for i = 1 , 2 , , m together form a polygonal curve denoted by E 1 . For further details and notation, the reader is referred to Falconer’s monograph [15].

2.1.2. The Self-Affine Fractal Function Utilized in This Study

For the purpose of our analysis, we consider a specific class of self-affine fractal functions that can be extended to the entire real line. Let m = 3 , c 1 = c 2 = c 3 = c ( 1 / 3 , 1 ) , and define the boundary points p 0 = ( 0 , 0 ) , p 3 = ( 1 , 0 ) . Denote by g ( x ) the self-affine fractal function constructed under these conditions as described in Section 2.1.1.
The construction of g ( x ) proceeds through an iterative process. Starting from the initial line segment connecting p 0 and p 3 , we apply the affine transformations S 1 , S 2 , S 3 to generate a polygonal approximation E 1 . Repeated application of these transformations yields a sequence of polygonal curves E 1 , E 2 , , E n , that converges uniformly to the graph of g ( x ) . The resulting function g ( x ) is continuous but nowhere differentiable, exhibiting self-affine scaling properties characterized by the parameters a i , b i , and c i .
The fractal nature of g ( x ) arises from the recursive structure of the iterated function system. At each scale, the graph of g ( x ) displays similar geometric features, with the vertical scaling controlled by the parameters c i . This self-affine property makes such functions particularly suitable for modeling complex natural phenomena that exhibit scale-invariant characteristics, such as the spatial configurations of bird flocks during collective motion.
For the purpose of our analysis, we extend the self-affine fractal function to the entire real line by defining the extended function w ( x ) as follows:
w ( x ) = g ( x ) , x [ 0 , 1 ] , 0 , x ( , 0 ) ( 1 , + ) .

2.2. General Formula for the Computation of Dimension

2.2.1. Bouligand Dimensions

Let A be a nonempty bounded subset of R n , n N + , where R is the set of real numbers. Denote by N δ ( A ) the minimal number of balls of diameter δ > 0 required to cover the set A. The upper and lower Bouligand dimensions of A are defined, respectively, as
dim ¯ B A : = lim sup δ 0 + ln N δ ( A ) ln δ ,
dim ̲ B A : = lim inf δ 0 + ln N δ ( A ) ln δ .
If these two values coincide, the common value is called the Bouligand dimension of A, denoted by
dim B A : = lim δ 0 + ln N δ ( A ) ln δ .

2.2.2. Hausdorff Dimension

The Hausdorff dimension provides a rigorous theoretical foundation for measuring fractal complexity. For a set F R n , we first define the s-dimensional Hausdorff measure.
Given δ > 0 , let U δ ( F ) denote the collection of all δ -covers of F, where a δ -cover is a countable collection { U i } of sets satisfying diam ( U i ) δ and F i U i . The s-dimensional Hausdorff measure is defined by
H δ s ( F ) = inf { U i } U δ ( F ) i | diam ( U i ) | s ,
with the limiting value
H s ( F ) = lim δ 0 + H δ s ( F ) .
A key property is that H s ( F ) exhibits a phase transition: there exists a critical value s * such that
H s ( F ) = if s < s * , 0 if s > s * .
This critical exponent defines the Hausdorff dimension:
dim H F = inf { s 0 : H s ( F ) = 0 } .

2.3. Phase Transition Theory and Fractal Dimension Dynamics

Phase transitions are broadly classified into two categories based on the behavior of thermodynamic quantities at the transition point [6]:
First-order phase transitions are characterized by discontinuities in the first derivatives of the free energy, such as entropy and volume. These transitions involve latent heat and exhibit phase coexistence at the transition point. In the context of collective behavior, first-order transitions manifest as abrupt structural reorganizations.
Second-order (continuous) phase transitions are characterized by two main features [7]: the order parameter tends continuously to zero as the system approaches the critical point from the ordered phase, and the correlation length diverges at the critical point, which guarantees scale invariance and the emergence of fractal structures.
In our analysis of starling flocks, the rapid structural changes observed during predator evasion events exhibit characteristics consistent with first-order phase transitions, where the flock undergoes abrupt reorganization between distinct collective states. However, the scale-free correlations observed in starling flocks [3] suggest that the system may also exhibit features of critical phenomena associated with second-order transitions. A comprehensive theoretical framework integrating both perspectives represents an important direction for future investigation.
References [7,8,9] have employed various types of fractal dimensions to investigate the relationship between critical exponents and fractal dimensions in equilibrium phase transitions.
Recently, using a Riesz fractional Laplacian approach, Lima et al. [16] introduced a new fractional dimension, which they termed the Riesz fractional dimension d R , related to the Fisher exponent via η = d d R . This new fractal dimension is distinct from all previously known definitions.
Based on recent developments from Lima et al. [16], we propose the following conjecture regarding the potential connection between our fractal dimension analysis and fractional Laplacian formulations:
Conjecture 1. 
Let dim B ( t i ) denote the box dimension of the self-affine fractal function fitted to the starling flock configuration at time instant t i (where i = 1 , 2 , , K ). There exists a fractional Laplacian operator ( Δ ) α ( t i ) with order α ( t i ) = 2 dim B ( t i ) such that the collective dynamics of the flock near phase transition points can be described by a fractional diffusion equation of the form:
ρ t = D ( Δ ) α ( t i ) ρ + f ( ρ ) ,
where ρ represents the local density field of the flock at time t i , D is a diffusion coefficient, and f ( ρ ) captures nonlinear interaction effects.
This conjecture is motivated by the observation that the fractal dimension changes we detect at different time instants t i correlate with structural reorganization events in the flock. Establishing this connection rigorously would require additional theoretical development and is proposed as a direction for future research.

2.4. The Dynamical Dimension of Self-Affine Fractal Functions over Time

2.4.1. Techniques for Computing the Dimension of Self-Affine Fractal Functions

Suppose there exists a nonempty bounded open set V and an open interval ( 0 , 1 ) such that the family of mappings { S i } i = 1 m satisfy the open set condition as
i = 1 m U i ( V ) V .
Theorem 1. 
Assuming the open set condition (12) holds for similarity transformations S i [15] on R n with contraction ratios 0 < c i < 1 for 1 i m , let F be the attractor of the iterated function system I F S { S 1 , S 2 , , S m } , satisfying
F = i = 1 m U i ( F ) ,
then the Hausdorff dimension and the Bouligand dimension of F coincide and equal s, i.e.,
dim H F = dim B F = s ,
where s is the unique solution to the equation
i = 1 m c i s = 1 .
Moreover, 0 < H s ( F ) < , where H s denotes the s-dimensional Hausdorff measure.
Upon completion of fitting cluster patterns with self-affine fractal functions, we can utilize the dimension of such functions as a quantitative measure of the complexity of the cluster. Generally speaking, the more complex the overall cluster structure, the more irregular the motion of points within the cluster, and correspondingly, the higher the fractal dimension of the fitting self-affine function. Conversely, a simpler cluster structure exhibits more regular or ordered motion among points, resulting in a lower fractal dimension.
By applying fractal dimension theory, the dimension calculation formulas for self-affine functions can be extended to three-dimensional settings to compute the box-counting dimension of fitted self-affine fractal functions.
Let F = graph ( f ) denote the self-affine curve described above. Its dimension is given by
dim B F = 1 + ln ( i = 1 m c i ) ln m .

2.4.2. Definition and Interpretation of d ( dim B ( t i ) ) / d t

Based on the dimension values of self-affine functions computed at different time instants, one can construct a time-dependent function f ( t i ) = dim B ( t i ) for i = 1 , 2 , , K , where K is the total number of observation times.
Monitoring the temporal evolution of this function provides an approximate quantification of the cluster’s stability. By computing the rate of change d ( dim B ( t i ) ) / d t , we can characterize the dynamical behavior of the dimension over time.
If the dimension remains nearly constant or its variation rate is slow over a certain time interval—that is, the absolute value | v ( t i ) | is small—this indicates that the cluster maintains a relatively stable formation during that period. Conversely, if the dimension changes rapidly in a short time interval, i.e., | v ( t i ) | is large, it suggests a possible phase transition in the cluster structure. Moreover, a smaller phase transition time interval Δ t indicates that the cluster can realize such a transition more quickly.

2.5. Image Acquisition Techniques

Step 1: Extract critical images capturing the phase transition of the starling flocks in flight to serve as the original image data.
Step 2: Utilize the GETDATA tool to collect actual effective points from the images. Establish a coordinate system using the ground level and points where complete, effective data can be obtained as the origin, and record the coordinates of these effective points.

2.6. Least Squares Method for Function Graph Fitting

Consider A x as an approximation to b . The smaller the distance between b and A x , measured by the norm b A x , the better the approximation. The general least squares problem seeks to find a vector x that minimizes b A x . The term “least squares” derives from the fact that b A x represents the square root of the sum of squared residuals [17].
Definition 2. 
For an m × n matrix A and a vector b R m , the least squares solution to the equation A x = b is a vector x ^ R n such that
b A x ^     b A x ,
for all x R n .
A key characteristic of the least squares problem is that the vector A x always lies in the column space of A, denoted Col ( A ) . Thus, we seek an x such that A x is the point in Col ( A ) closest to b . See Figure 1 for an illustration. (Note that if b Col ( A ) , then there exists an x such that A x = b , and such an x is a least squares solution).
To solve the general least squares problem for a given matrix A and vector b , we apply the Best Approximation Theorem [17] to the subspace Col ( A ) . Let
b ^ = proj Col ( A ) b ,
where b ^ lies in Col ( A ) . Hence, the equation A x ^ = b ^ is consistent, and there exists a vector x ^ R n such that
A x ^ = b ^ .
Since b ^ is the point in Col ( A ) closest to b , a vector x ^ is a least squares solution to A x = b if and only if it satisfies Equation (19). This x ^ R n represents the coefficients of b ^ constructed from the columns of A. See Figure 2 for a visualization. (If Equation (19) has free variables, it may admit multiple solutions.)
If x ^ satisfies A x ^ = b ^ , then, by the Orthogonal Decomposition Theorem [17], the projection b ^ has the property that b b ^ is orthogonal to Col ( A ) . That is, b A x ^ is orthogonal to every column of A. Let a j denote the j-th column of A. Then, a j · ( b A x ^ ) = 0 , or equivalently, a j T ( b A x ^ ) = 0 . Since each a j T is a row of A T , it follows that
A T ( b A x ^ ) = 0 .
This implies
A T b A T A x ^ = 0 ,
A T A x ^ = A T b .
Thus, every least squares solution to A x = b satisfies the matrix Equation (22), commonly referred to as the normal equations of A x = b . The solution to Equation (22) is typically denoted by x ^ .
Theorem 2. 
The set of least squares solutions to A x = b coincides with the nonempty set of solutions to the normal equations A T A x ^ = A T b .

2.7. General Method for Fitting Images with Self-Affine Functions

The general method for fitting fractal images with self-affine functions involves using the expression of a self-affine fractal function and applying the least squares method, as detailed in the following Section 3.

3. Fitting Starling Flocks Images with Self-Affine Fractal Functions

The previous section addressed the fitting of images using simple functions. In practical scenarios, such as modeling unmanned swarms, the data is significantly more complex and diverse. For instance, starling flocks exhibit large collective motion datasets and rapid phase transitions, necessitating functions with higher complexity. Self-Affine functions, by virtue of their self-similarity properties, offer the required complexity for such applications.
This section focuses on addressing the problem of characterizing instantaneous images of starling flocks using self-affine fractal functions.
Overview of the Fitting Procedure. Our approach proceeds in several stages. First, we capture K images of the starling flock at discrete time instants t 1 , t 2 , , t K . From each image at time t i , we extract N spatial coordinate points ( x j , y j ) for j = 1 , 2 , , N . At each time t i , we fit the N spatial points using a self-affine fractal function g i ( x ) by minimizing a least squares objective function F i . The fitting procedure yields a set of parameters ( a i , b i , c i ) that characterize the self-affine function g i at time t i . By repeating this process for all K time instants, we obtain K sets of parameters. The temporal evolution of these parameters and the corresponding fractal dimensions { dim B ( t 1 ) , dim B ( t 2 ) , , dim B ( t K ) } reveals the phase transition dynamics of the flock.
We emphasize that the index i in ( a i , b i , c i ) refers to the time instant t i , not to individual transformations within the IFS. Each time instant has its own set of parameters obtained by fitting the spatial data at that time.

3.1. Principles of Fitting Images with Self-Affine Fractal Functions

3.1.1. Mathematical Framework

We model the spatial distribution of starling flocks using self-affine fractal functions constructed via an iterated function system (IFS). Following the theory of Falconer [15], we define:
Function Definition. We denote by g t i the self-affine fractal function at time instant t i , where i = 1 , 2 , , K . This function characterizes the spatial configuration of the flock at time t i , with x representing the normalized horizontal coordinate and y = g t i ( x ) the corresponding vertical position.
Time Evolution. As time evolves from t 1 to t K , the spatial configuration of the flock changes, resulting in a sequence of self-affine functions:
{ g t 1 , g t 2 , , g t K } ,
each characterized by its own set of parameters:
{ ( a 1 , b 1 , c 1 ) , ( a 2 , b 2 , c 2 ) , , ( a K , b K , c K ) } .
IFS Construction. Each function g t i is constructed as the attractor of an iterated function system consisting of m = 3 affine transformations. The number m is fixed throughout the analysis and represents the complexity of the fractal structure, not a time-varying quantity.

3.1.2. Least Squares Fitting Formulation

At each time instant t i ( i = 1 , 2 , , K ), we observe N spatial points ( x j , y j ) with j = 1 , , N . Fitting these points using the self-affine function g t i yields the parameter set ( a i , b i , c i ) at time t i . Repeating this procedure across all K time instants produces the sequence { ( a 1 , b 1 , c 1 ) , , ( a K , b K , c K ) } . In our experiments, each image contains approximately 6000–7000 spatial points. The parameter m = 3 denotes the number of affine transformations in the IFS.
Optimization Conditions. At each time instant t i , according to the least squares principle, the optimal parameters are obtained by setting the partial derivatives of F t i with respect to each parameter to zero:
F t i a i = 0 , F t i b i = 0 , F t i c i = 0 .
Solving these equations yields the optimal parameter values ( a i , b i , c i ) at time t i . This procedure is repeated for all K time instants, resulting in K sets of parameters:
{ ( a 1 , b 1 , c 1 ) , ( a 2 , b 2 , c 2 ) , , ( a K , b K , c K ) } .
Time Evolution and Phase Transition Analysis. As the starling flock moves through time t 1 , t 2 , , t K , the spatial coordinates { ( x j , y j ) } j = 1 N change at each time instant. Consequently, the fitted parameters ( a i , b i , c i ) also change, resulting in different self-affine functions g t i and fractal dimensions dim B ( t i ) at each time instant. By analyzing the temporal evolution of these parameters and dimensions,
{ dim B ( t 1 ) , dim B ( t 2 ) , , dim B ( t K ) } ,
we can characterize the phase transition dynamics of the flock. Rapid changes in the fractal dimension indicate phase transitions, while stable dimensions suggest steady-state configurations.

3.2. Fitting Method

Assume the cluster distribution shown in Figure 3.
Following the theoretical framework established in Section 2.1, at each time instant t i (where i = 1 , 2 , , K ), the self-affine fractal function g t i is constructed using an iterated function system (IFS) consisting of m = 3 affine transformations. Each transformation S i (for i = 1 , 2 , , K ) is defined as follows:
S i x y = 1 / m 0 a i c i x y + ( i 1 ) / m b i ,
where ( x , y ) are spatial coordinates.
At a given time instant, suppose we observe N spatial coordinate points extracted from the starling flock image:
{ ( x j , y j ) } j = 1 N ,
where j = 1 , 2 , , N is the spatial point index. The objective function for least squares fitting is as follows:
F t i ( a i , b i , c i ) = j = 1 N y j g t i ( x j ; a i , b i , c i ) 2 ,
where y j represents the observed vertical coordinate of the j-th spatial point, and g t i ( x j ; a i , b i , c i ) is the value of the self-affine function evaluated at horizontal coordinate x j with parameters ( a i , b i , c i ) . The least squares method minimizes this objective function to find the optimal parameters.

3.3. Instantaneous Image Acquisition of Starling Flocks

The phase transitions observed in the collective flight of starling flocks are particularly fascinating. The dark silhouettes in the images discussed below represent the starling flocks at various temporal states. Research indicates that these large-scale “vortices” serve to confuse and deter predators. At dusk, starlings aggregate in communal roosts, reaching a state of maximal relaxation. When frightened, they collectively take flight to evade danger, a behavior strikingly similar to the survival strategies of fish schools in the ocean, reflecting a complex adaptive mechanism.
Studies suggest that the dynamic “dance” of starlings in the air is a strategy to evade predators such as hawks or falcons. When thousands of starlings take flight simultaneously, they form various shapes in the air to intimidate and repel attackers. However, solitary starlings are vulnerable, so to avoid being isolated, starlings can instantaneously synchronize their movements. If one starling alters its speed or direction, the others immediately follow.
This raises the question of when starling flocks exhibit significant phase transitions, when these transitions are minor, and whether data analysis can provide insights for modeling other unmanned swarms. In this study, we employ self-affine functions to fit the flight trajectories of starling flocks and compute the rate of change in the fractal dimension to analyze the dynamics of their collective motion.
The original images of starling flocks’ flight at various time points were acquired, as shown in Figure 4.

3.4. Image Fitting Procedure and Data Analysis

3.4.1. Coordinate Point Acquisition

Using the GETDATA tool, a coordinate system was established for images of the starling flocks’ motion, and coordinate points were collected, as shown in Figure 5.
Given the large volume of data, only one representative set of coordinates is listed here. Suppose a set of target points is identified in a specific region, denoted as ( x j , y j ) for j = 1 , 2 , , N , where N is the total number of spatial points. The coordinates of the starling flocks at time t 1 are presented in Table 1.

3.4.2. Parameters Estimation for Self-Affine Fractal Functions

Since the starling flock’s spatial configuration changes continuously at different time instants t 1 , t 2 , , t K , the spatial coordinates ( x j , y j ) for j = 1 , 2 , , N change at each time instant, leading to variations in the fitted parameters ( a i , b i , c i ) and, consequently, different self-affine functions g t i and fractal dimensions dim B ( t i ) . To fit the starling flocks’ flight trajectories at various time instants, we apply the least squares method, implemented in Python3.9, to estimate the parameters. The procedure for determining the parameters of the self-affine fractal function at each time instant t i is as follows:
Define the objective function at time t i as
F t i ( a i , b i , c i ) = j = 1 N y j g t i ( x j ; a i , b i , c i ) 2 .
Using the least squares method, we minimize the objective function by computing its partial derivative with respect to each parameter and setting it to zero:
F t i a i = 0 , F t i b i = 0 , F t i c i = 0 .
Solving these equations yields the parameters a i , b i , and c i at time instant t i , which are functions of the spatial data points ( x j , y j ) observed at that time.
For simplicity, we fix the parameter m = 3 and compute the corresponding parameter c, as shown in Table 2.

4. The Fractal Dimension of Instantaneous Images of Starling Flocks’ Flight

4.1. Principle

Based on the results in Section 3, the relevant parameters ( a i , b i , c i ) of the self-affine fractal function at each time instant t i (for i = 1 , 2 , , K ) were identified. The fractal dimension dim B ( t i ) at each time instant was then calculated using Equation (16).

4.2. Data Analysis

According to the self-affine fractal function dimension formula
dim F = 1 + ln ( i = 1 m c i ) ln m ,
a large number of coordinate data points were imported via Python scripts to compute the fractal dimension dim B ( t i ) at different time instants t i . The results after fitting the images are presented in Table 3.
To visually represent the data, the fractal dimension dim B ( t i ) of the self-affine function as a function of time is illustrated in Figure 6.

5. Time-Dimension Dynamic Curve Characterizing Flight Phase Transition

5.1. Time-Dimension Dynamic Model

The stability of the cluster has been expressed by the rate of change of the fractal dimension with respect to time, defined as
v ( t i ) = d ( dim B ( t i ) ) d t ,
which allows for identification of instantaneous transition points (critical points) during the starling flocks’ flight process. The computed results are listed in Table 4.
For clarity, the curve of the fractal dimension change rate with respect to time is plotted in Figure 7 for observation and analysis:

5.2. Numerical Result Analysis

Combining images of starling flocks’ flight with the experimental results, it is observed that the fractal dimension undergoes changes at time intervals t 7 t 8 , t 23 t 24 , t 33 t 35 , and t 37 t 38 , but these changes are relatively mild and the rate of change v ( t i ) = d ( dim B ( t i ) ) / d t is small in absolute value. This indicates the flock maintains a comparatively stable formation during these intervals. The flock reacts to external disturbances by quickly adapting to a new stable formation to resist threats.
In contrast, a greater and more rapid change occurs during t 47 t 59 , where the fractal dimension changes significantly over a short time interval. Here, the cluster experiences a phase transition, shifting from a concentrated state to a dispersed state. The shorter the time interval of the phase transition, the less time the flock requires to complete it, signifying a capability of rapid adaptation.

6. Discussion

This paper investigates the phase transition process in starling flock behavior, proposing a characterization method based on the fractal dimension of self-affine functions. By employing self-affine fractal functions fitted through the least squares method, we quantitatively characterize the intrinsic nonlinear dynamics within the system. The critical points of phase transitions during starling flight are identified and analyzed through the rate of change of the fractal dimension.
Recently, Lima et al. [16] proposed the Riesz Laplacian operator and established certain relationships between fractal dimensions and critical exponents in non-integer-dimensional Ising models. In our computation of critical points for starling flock phase transitions, the data appear to suggest a similar relationship may exist. However, the precise mathematical formulation of this relationship remains an open question. There may exist some form of linear relationship between the fractal dimension dynamics and the Riesz fractional framework, but the exact nature of this connection requires further investigation. We invite researchers to explore this intriguing theoretical direction.
For starling flocks, the most intelligent state is a “tense and united” condition. This state lies precisely between order and disorder, resembling the critical point of a phase transition. Under such conditions, the flock maintains stability while ensuring effective transmission of individual information within the group. Through extensive data acquisition and experimental analysis, it is observed that the fractal dimension changes modestly during intervals t 7 t 8 , t 23 t 24 , t 33 t 35 , and t 37 t 38 with relatively slow variation rates, indicating the flock maintains a relatively stable formation during these periods. The flock’s response to external disturbances at these moments involves quickly adjusting the original formation to sustain stability against potential threats.
In contrast, a more pronounced change occurs during t 47 t 59 , where fractal dimension changes rapidly over a short duration, signifying a phase transition from a cohesive state to a dispersed state. A lower rate of fractal dimension change corresponds to a more stable formation, indicating readiness to resist predators; conversely, a larger rate implies potential phase transitions and increased instability, correlating with a relaxed state as external threats diminish. Additionally, shorter time intervals for phase transitions imply that the flock requires less time to accomplish these transitions, demonstrating rapid adaptability.
In nature, predators may approach the flock from various directions to hunt individuals or, at times, attack the entire group. This situation demands swift collective responses, reflected in the flock’s continuous dynamic changes in formation mid-flight. Such flexible adaptability exemplifies a form of collective intelligence that neither purely ordered nor disordered states can achieve. This leads to critical changes in state, manifesting as phase transitions.

Correlation with Percolation Theory Predictions

The percolation theory applied to equilibrium phase transitions has revealed important relationships between critical exponents and fractal dimensions [8,9]. In particular, five distinct fractal dimensions have been identified in percolation systems: the fractal dimension of the infinite cluster, the backbone dimension, the red bond dimension, the chemical dimension, and the spreading dimension.
An intriguing observation from our analysis is that the box dimension dim B ( t i ) obtained from the self-affine function fitting appears remarkably stable and approximates the integer dimension 2 during stable flight periods (see Table 3). This raises the question of whether this dimension can be associated with any of the fractal dimensions defined in percolation theory.
To quantify the relationship between our fractal dimension approach and structural reorganization measures, we define the following vectors:
Let W ( t ) = ( W ( t 1 ) , W ( t 2 ) , W ( t 3 ) , , W ( t n ) ) denote the vector of phase transition indicators obtained from direct observation of flock structural changes at time points t 1 , t 2 , , t n , and let D ( t ) = ( D ( t 1 ) , D ( t 2 ) , D ( t 3 ) , , D ( t n ) ) denote the vector of fractal dimension values computed by our method at the corresponding time points.
The Pearson correlation coefficient between these two vectors is computed as follows:
ρ ( W , D ) = i = 1 n P W i · P D t i W · D ,
where P W i and P D t i represent the centered values (deviations from the mean) of the respective vectors, and · denotes the Euclidean norm.
The analysis yields
ρ 0.98 ,
demonstrating a strong correlation between the two approaches. This high correlation suggests that the fractal dimension of self-affine functions captures essential features of the collective phase transition process, potentially providing a bridge between geometric characterization and the theoretical framework of percolation theory.
These promising findings warrant further investigation in our subsequent studies.

Author Contributions

Conceptualization, K.L. (Kunyuan Li) and X.Z.; writing—review and editing, X.Z. and K.Y.; methodology, K.Y.; mathematical inference, K.L. (Kunyuan Li) and K.Y.; resources, M.S.; data curation, K.Z.; writing—original draft preparation, K.L. (Kunyuan Li); project support, M.H.; visualization, K.L. (Kefeng Liu) and M.S.; supervision, Y.W. and M.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (NSFC), numbers 12371089, 62371469 and 62273356, and the Natural Science Foundation of Jiangsu Province(NSF), number BK20180080.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The authors would like to thank anonymous referees for their valuable comments and suggestions.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Pearce, D.; Miller, A.; Rowlands, G.; Turner, M. Role of projection in the control of bird flocks. Proc. Natl. Acad. Sci. USA 2014, 111, 10422–10426. [Google Scholar] [CrossRef] [PubMed]
  2. Mora, T.; Walczak, A.; Castello, L.; Ginelli, F.; Melillo, S.; Parisi, L.; Viale, M.; Cavagna, A.; Giardina, I. Local equilibrium in bird flocks. Nat. Phys. 2016, 12, 1153–1157. [Google Scholar] [CrossRef] [PubMed]
  3. Cavagna, A.; Cimarelli, A.; Giardina, I.; Parisi, G.; Santagati, R.; Stefanini, F.; Viale, M. Scale-free correlations in starling flocks. Proc. Natl. Acad. Sci. USA 2010, 107, 11865–11870. [Google Scholar] [CrossRef] [PubMed]
  4. Christodoulidi, H.; Van der Weele, K.; Antonopoulos, C.G.; Bountis, T. Phase transitions in models of bird flocking. In Chaos, Information Processing and Paradoxical Games: The Legacy of John S. Nicolis; Nicolis, G., Basios, V., Eds.; World Scientific: Singapore, 2014; pp. 383–398. [Google Scholar]
  5. Bountis, T.; Christodoulidi, H.; Van der Weele, K.; Antonopoulos, C.G. Collective dynamics and phase transitions in bird flocking models. Eur. Phys. J. Spec. Top. 2022, 231, 167–175. [Google Scholar]
  6. Cardy, J. Scaling and Renormalization in Statistical Physics; Cambridge University Press: Cambridge, UK, 1996; Volume 5. [Google Scholar]
  7. Suzuki, M. Phase transition and fractals. Prog. Theor. Phys. 1983, 69, 65–76. [Google Scholar] [CrossRef]
  8. Kröger, H. Fractal geometry in quantum mechanics, field theory and spin systems. Phys. Rep. 2000, 323, 81–181. [Google Scholar] [CrossRef]
  9. Coniglio, A. Fractal structure of Ising and Potts clusters: Exact results. Phys. Rev. Lett. 1989, 62, 3054–3057. [Google Scholar] [CrossRef] [PubMed]
  10. Fan, J.A.; Yeo, W.-H.; Su, Y.; Hattori, Y.; Lee, W.; Jung, S.-Y.; Zhang, Y.; Liu, Z.; Cheng, H.; Falgout, L.; et al. Fractal design concepts for stretchable electronics. Nat. Commun. 2014, 5, 3266. [Google Scholar] [CrossRef] [PubMed]
  11. Qiu, Y.; Liang, Y. Progress on fractal dimensions of the Weierstrass function and Weierstrass-type functions. Fractal Fract. 2025, 9, 143. [Google Scholar] [CrossRef]
  12. Cattani, C. Fractal and fractional. Fractal Fract. 2017, 1, 1. [Google Scholar] [CrossRef]
  13. Cattani, C.; Spigler, R. Fractional dynamics. Fractal Fract. 2018, 2, 19. [Google Scholar] [CrossRef]
  14. Zähle, U. Self-similar random measures. II-A generalization to self-affine measures. Math. Nachr. 1990, 146, 85–98. [Google Scholar] [CrossRef]
  15. Falconer, K. Fractal Geometry, 3rd ed.; John Wiley & Sons Ltd.: Chichester, UK, 2014; pp. 1–337. [Google Scholar]
  16. Lima, H.A.; Carrasco, I.S.S.; Santos, M.; Oliveira, F.A. Scaling, fractal dynamics, and critical exponents: Application in a noninteger-dimensional Ising model. Phys. Rev. E 2025, 112, 044109. [Google Scholar] [CrossRef] [PubMed]
  17. Lay, D.; Lay, S.; McDonald, J. Linear Algebra and Its Applications, 5th ed.; Pearson Education: New York, NY, USA, 2016. [Google Scholar]
Figure 1. Illustration of the least squares problem: The variables x , b R n , where A x represents the linear equation, and A x = b is the equation to be solved.
Figure 1. Illustration of the least squares problem: The variables x , b R n , where A x represents the linear equation, and A x = b is the equation to be solved.
Fractalfract 10 00017 g001
Figure 2. The Least Squares Solution x ^ in R n .
Figure 2. The Least Squares Solution x ^ in R n .
Fractalfract 10 00017 g002
Figure 3. Cluster Distribution of the Starling Flocks at a Specific Time Instant.
Figure 3. Cluster Distribution of the Starling Flocks at a Specific Time Instant.
Fractalfract 10 00017 g003
Figure 4. Key Flight Moments of the Starling Flocks. Source: “Marvelous Animal Families”-CCTV-10, Haokan Video https://haokan.baidu.com/v?vid=9698349435095999433 (a) Moment of Starling Gathering. (b) Moment of Predator Invasion. (c) Moment of Predator Departure. Note: Due to the large number of video frames captured in the experiment, only images from key temporal nodes are presented here.
Figure 4. Key Flight Moments of the Starling Flocks. Source: “Marvelous Animal Families”-CCTV-10, Haokan Video https://haokan.baidu.com/v?vid=9698349435095999433 (a) Moment of Starling Gathering. (b) Moment of Predator Invasion. (c) Moment of Predator Departure. Note: Due to the large number of video frames captured in the experiment, only images from key temporal nodes are presented here.
Fractalfract 10 00017 g004
Figure 5. Coordinates Taken at Various Flight Moments of the Starling Flocks. (a) Coordinates Taken During the Starling Flocks’ Gathering Moment. (b) Coordinates Taken During Predator Invasion Moment. (c) Coordinates Taken During Formation Change Moment Of Starling Flock.
Figure 5. Coordinates Taken at Various Flight Moments of the Starling Flocks. (a) Coordinates Taken During the Starling Flocks’ Gathering Moment. (b) Coordinates Taken During Predator Invasion Moment. (c) Coordinates Taken During Formation Change Moment Of Starling Flock.
Fractalfract 10 00017 g005
Figure 6. Experimental Results: Fractal Dimensions dim B ( t i ) of Self-Affine Functions over Time Instants t 1 , t 2 , , t K .
Figure 6. Experimental Results: Fractal Dimensions dim B ( t i ) of Self-Affine Functions over Time Instants t 1 , t 2 , , t K .
Fractalfract 10 00017 g006
Figure 7. Experimental Results: Rate of Change v ( t i ) of Fractal Dimensions dim B ( t i ) across Time Instants.
Figure 7. Experimental Results: Rate of Change v ( t i ) of Fractal Dimensions dim B ( t i ) across Time Instants.
Fractalfract 10 00017 g007
Table 1. Coordinates of Starling Flocks at Time t 1 .
Table 1. Coordinates of Starling Flocks at Time t 1 .
Coordinatesxy
1459.88889408.33333
2460.55556408.77778
3461.33333408.77778
4462.00000408.55556
5464.11111535.22222
6707531.00000464.00000
6708532.00000463.00000
6709519.00000453.00000
6710564.00000454.00000
Table 2. Parameter c that Meets the Conditions.
Table 2. Parameter c that Meets the Conditions.
c 1 c 2 c 3
t 1 0.9989230.9985290.999227
t 2 0.9988260.9988600.999062
t 3 0.9981200.9989790.999133
t 4 0.9975700.9990230.999170
t 5 0.9967160.9990700.999014
t 57 0.9931840.9929270.996995
t 58 0.9933350.9759800.996018
t 59 0.9964070.6363590.996922
t 60 0.9961750.9888850.997472
Table 3. Fractal Dimensions dim B ( t i ) of Self-Affine Functions at Different Time Instants.
Table 3. Fractal Dimensions dim B ( t i ) of Self-Affine Functions at Different Time Instants.
dim B ( t i ) dim B ( t i )
t 1 1.998992
t 2 1.999013 t 52 1.986930
t 3 1.998856 t 53 1.931571
t 4 1.998713 t 54 1.966410
t 5 1.998421 t 55 1.861206
t 6 1.998029 t 56 1.989833
t 7 1.994982 t 57 1.994859
t 8 1.997989 t 58 1.98942
t 9 1.993664 t 59 1.880079
t 10 1.989494 t 60 1.994685
Table 4. Temporal Variation of the Fractal Dimensions dim B ( t i ) of Self-Affine Functions.
Table 4. Temporal Variation of the Fractal Dimensions dim B ( t i ) of Self-Affine Functions.
Δ dim B ( t i ) Δ dim B ( t i )
t 2 t 1 0.000104
t 3 t 2 −0.00157 t 52 t 51 0.006488
t 4 t 3 −0.0002 t 53 t 52 −0.2768
t 5 t 4 −0.00146 t 54 t 53 0.348388
t 6 t 5 −0.00392 t 55 t 54 −1.05203
t 7 t 6 −0.03047 t 56 t 55 0.214378
t 8 t 7 0.030069 t 57 t 56 0.025132
t 9 t 8 −0.04325 t 58 t 57 −0.05439
t 10 t 9 −0.0417 t 59 t 58 −0.54671
t 11 t 10 0.00893 t 60 t 59 0.229212
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, K.; Zhang, X.; Yao, K.; Zhang, K.; Sun, M.; He, M.; Liu, K.; Wang, Y. Modeling Phase Transitions in Starling Flocks Using Fractal Dimension of Self-Affine Functions. Fractal Fract. 2026, 10, 17. https://doi.org/10.3390/fractalfract10010017

AMA Style

Li K, Zhang X, Yao K, Zhang K, Sun M, He M, Liu K, Wang Y. Modeling Phase Transitions in Starling Flocks Using Fractal Dimension of Self-Affine Functions. Fractal and Fractional. 2026; 10(1):17. https://doi.org/10.3390/fractalfract10010017

Chicago/Turabian Style

Li, Kunyuan, Xiongwei Zhang, Kui Yao, Kai Zhang, Meng Sun, Ming He, Kefeng Liu, and Yangjun Wang. 2026. "Modeling Phase Transitions in Starling Flocks Using Fractal Dimension of Self-Affine Functions" Fractal and Fractional 10, no. 1: 17. https://doi.org/10.3390/fractalfract10010017

APA Style

Li, K., Zhang, X., Yao, K., Zhang, K., Sun, M., He, M., Liu, K., & Wang, Y. (2026). Modeling Phase Transitions in Starling Flocks Using Fractal Dimension of Self-Affine Functions. Fractal and Fractional, 10(1), 17. https://doi.org/10.3390/fractalfract10010017

Article Metrics

Back to TopTop