Algorithm 1 Mean Field Interaction Algorithm for the kinetic equation (12). |
1: Given 2: for 3: for 4: sample 5: compute 6: compute the data change 7: end for 8: end for |
We consider mean-field models for data–clustering problems starting from a generalization of the bounded confidence model for opinion dynamics. The microscopic model includes information on the position as well as on additional features of the particles in order to develop specific clustering effects. The corresponding mean–field limit is derived and properties of the model are investigated analytically. In particular, the mean–field formulation allows the use of a random subsets algorithm for efficient computations of the clusters. Applications to shape detection and image segmentation on standard test images are presented and discussed.
Citation: Michael Herty, Lorenzo Pareschi, Giuseppe Visconti. Mean field models for large data–clustering problems[J]. Networks and Heterogeneous Media, 2020, 15(3): 463-487. doi: 10.3934/nhm.2020027
[1] | Michael Herty, Lorenzo Pareschi, Giuseppe Visconti . Mean field models for large data–clustering problems. Networks and Heterogeneous Media, 2020, 15(3): 463-487. doi: 10.3934/nhm.2020027 |
[2] | Sabrina Bonandin, Mattia Zanella . Effects of heterogeneous opinion interactions in many-agent systems for epidemic dynamics. Networks and Heterogeneous Media, 2024, 19(1): 235-261. doi: 10.3934/nhm.2024011 |
[3] | Michael Herty, Lorenzo Pareschi, Sonja Steffensen . Mean--field control and Riccati equations. Networks and Heterogeneous Media, 2015, 10(3): 699-715. doi: 10.3934/nhm.2015.10.699 |
[4] | Ciro D'Apice, Peter Kogut, Rosanna Manzo . On generalized active contour model in the anisotropic BV space and its application to satellite remote sensing of agricultural territory. Networks and Heterogeneous Media, 2025, 20(1): 113-142. doi: 10.3934/nhm.2025008 |
[5] | Fabio Camilli, Italo Capuzzo Dolcetta, Maurizio Falcone . Preface. Networks and Heterogeneous Media, 2012, 7(2): i-ii. doi: 10.3934/nhm.2012.7.2i |
[6] | András Bátkai, Istvan Z. Kiss, Eszter Sikolya, Péter L. Simon . Differential equation approximations of stochastic network processes: An operator semigroup approach. Networks and Heterogeneous Media, 2012, 7(1): 43-58. doi: 10.3934/nhm.2012.7.43 |
[7] | Nastassia Pouradier Duteil . Mean-field limit of collective dynamics with time-varying weights. Networks and Heterogeneous Media, 2022, 17(2): 129-161. doi: 10.3934/nhm.2022001 |
[8] | Seung-Yeal Ha, Jeongho Kim, Jinyeong Park, Xiongtao Zhang . Uniform stability and mean-field limit for the augmented Kuramoto model. Networks and Heterogeneous Media, 2018, 13(2): 297-322. doi: 10.3934/nhm.2018013 |
[9] | Sergei Yu. Pilyugin, M. C. Campi . Opinion formation in voting processes under bounded confidence. Networks and Heterogeneous Media, 2019, 14(3): 617-632. doi: 10.3934/nhm.2019024 |
[10] | Diogo A. Gomes, Gabriel E. Pires, Héctor Sánchez-Morgado . A-priori estimates for stationary mean-field games. Networks and Heterogeneous Media, 2012, 7(2): 303-314. doi: 10.3934/nhm.2012.7.303 |
We consider mean-field models for data–clustering problems starting from a generalization of the bounded confidence model for opinion dynamics. The microscopic model includes information on the position as well as on additional features of the particles in order to develop specific clustering effects. The corresponding mean–field limit is derived and properties of the model are investigated analytically. In particular, the mean–field formulation allows the use of a random subsets algorithm for efficient computations of the clusters. Applications to shape detection and image segmentation on standard test images are presented and discussed.
Particle and kinetic models for consensus and cluster formation appeared in recent literature for self–organized socio–economic dynamical systems as opinion formation, flocking of birds or fish, elections and referendums under influence of mass media, etc. See e.g. [5,11,18,19,20,23,25,34,16], the review articles [35,4,1] and the book [40]. A related research direction is based on using the consensus features of these models in an artificial way to solve problems of optimization or segmentation of data in large dimensions [28,41,15,29].
In this paper, we aim at formulating suitable models on the microscopic (or particle) level as well as on the mean–field (or kinetic) level to describe the partition of a large set of data in clusters. This problem is also known as data clustering problem and it is widely studied in many applications like pattern recognition, shape detection and image segmentation problems. The proposed methods do not need to have fixed a–priori number of clusters and clusters are characterized by small in–group and large out–group distances.
Since we are interested in modes characterizing distance and qualitative features without additional physical or socio–economical modeling background the proposed model will generalize the Hegselmann–Krause (HK) opinion dynamics model [25]. Originally, the HK model was proposed in a microscopic setting, in one–dimensional spatial and time discrete framework. Several extensions exist, in the sequel we will briefly review the basic model before discussing its extension towards the image clustering problems.
To this aim, let us consider a group of
ddtxi(t)=n∑j=1Aij(t,ϵ)(xj(t)−xi(t)),i=1,…,n | (1) |
where
Aij(t,ϵ):={1σi,if j∈Ni(t,ϵ)0,otherwise | (2) |
with
Ni(t,ϵ):={j∈{1,…,n}:|xi(t)−xj(t)|≤ϵ},i=1,…,n | (3) |
defining the neighborhood of the
σi:={|Ni(t,ϵ)|,n | (4) |
the type of interactions. Precisely, when
Several works have been proposed in the literature which analyze the properties of the HK model. For instance, for the analysis in the time discrete setting we refer to [27]. In [7] it is proven that, during the evolution of the system (1), the order of the states is preserved. Thanks to the definition of the interaction kernel (2)–(4), if
Aij(t,ϵ)≠0 for all i,j∈C(t),Aij(t,ϵ)=0 whenever i∈C(t),j∉C(t). |
In [7,22,30] the stability of the dynamical model is investigated. In particular, the fact that the system converges to a steady profile in finite time is proved in [7]. For further results on the one–dimensional local and symmetric model we refer also to [8]. We point out that also behavior of cluster formation in the transient is of interest in the mathematical literature [21].
In [36,10], the one-dimensional Hegselmann–Krause is generalized to the case of a multi–dimensional data–set. Subsequently, the multi–dimensional HK model has been used as a technique to cluster a big amount of data into a small number of subsets with some common features [38] and to compare its performance with the
Here, we introduce a generalization of the multi–dimensional formulation of the HK model to solve data clustering problems. This amounts to take into account clustering with respect to different features. We deal with data having both time dependent and static features. The latter describe intrinsic properties of a datum, such as the measure of a trustworthy information or the color intensity of pixels in images. We derive the corresponding mean–field limit and investigate analytically the properties of the model. In particular, following [2] the mean–field formulation allows the use of a random subset algorithm for efficient computations of the clusters.
The rest of the manuscript is organized as follows. The microscopic model is introduced at the beginning of Section 2 and briefly discussed in Section 2.1. The proposed model is still a microscopic model and we describe the case of large data using a mean–field equation in Section 3. Analytical properties of the kinetic equation, such as a–priori estimation on the evolution of the moments and characterization of the limit distribution, are discussed in Section 3.1. Numerical evidence of the theoretical results is provided in Section 4.1. Further, we propose applications on detection and compression of data, such as shape detection, in Section 4.2, and image segmentation, in Section 4.3. We finally conclude with some remarks and future research directions in Section 5.
Each particle
As in the HK model we define the neighborhood of the particles by
Ni(t,ϵ1,ϵ2):={j∈{1,…,n}:‖xi(t)−xj(t)‖Rd1≤ϵ1,‖ci−cj‖Rd2≤ϵ2}, | (5) |
for
Aij(t,ϵ1,ϵ2):={1σi,if j∈Ni(t,ϵ1,ϵ2)0,otherwise | (6) |
with
ci,k(t)=ci,k(0),i=1,…,n,k=1,…,d2, | (7) |
ddtxi,k(t)=n∑j=1Aij(t,ϵ1,ϵ2)(xj,k(t)−xi,k(t)),i=1,…,n,k=1,…,d1 | (8) |
and initial condition
Existence and convergence of solutions to system (8) can be established by using same techniques as in [8] where the original HK in the one–dimensional case was analyzed. In fact, system (7)- (8) belongs to the same class of state-switched systems.
In the case of symmetric interactions we can recover from the previous model similar results on the moment behavior as presented for the HK model in [8,26]. We only record the results here since the proofs are slight variations of existing results (see for example [8]).
Define the moments
m1(t):=n∑i=1xi(t),m2(t):=n∑i=1xi(t)⊗xi(t), | (9) |
then the following result holds true.
Lemma 2.1. Let
m1(t)=m1(0),ddt(m2(t))kk≤0,k=1,…,d1. |
Corollary 1. Let
ddt(m2(t))kℓ=2n(m1(0))k(m1(0))ℓ−2(m2(t))kℓ,limt→∞(m2(t))kℓ=(m1(0))k(m1(0))ℓn. |
Later, we will show that similar results hold for the continuous model. Some remarks on further properties concerning the particle model (8) are in order.
Remark 1. ● Formation of clusters in the large time behavior is extensively investigated in the review article [35] for general systems of the form (8). However, number of clusters cannot be a–priori predicted starting from a given initial configuration.
● In the non–symmetric case, conservation of the first moment does not hold true. Also, in general, it is not possible to show the decay of the second moment although clustering still appears, see [35].
● Extensions of the model to take into account non static features are obtained by including an interaction term on the right hand side of (7). The determination of such interaction term, however, would be rather problem dependent and in this paper we will not explore further this direction.
In the case of many particles we derive the formal mean–field equation. Let
fn(t,x,c):=1nn∑i=1δ(x−xi(t))δ(c−ci(t)). |
Let us consider a test function
ddt⟨fn(t),φ⟩=1nn∑i=1ddtφ(xi(t),ci(t))=1nn∑i=11σi∑j∈Ni(t,ϵ1,ϵ2)∇xφ(xi(t),ci(t))⋅(xj(t)−xi(t))=⟨fn(t),1nσ(t,x,c)n∑j=1χϵ1(‖xj(t)−x‖)χϵ2(‖cj(t)−c‖)(xj(t)−x)⋅∇xφ⟩ |
where we defined
χϵ(x)={1,x≤ϵ0,else |
and we used the fact that equation (8) can be re-written as
ddtxi(t)=1nσ(t,xi(t),ci(t))n∑j=1χϵ1(‖xj(t)−xi(t)‖)χϵ2(‖cj(t)−ci(t)‖)(xj(t)−xi(t)), |
with
σ(t,xi(t),ci(t))=1nn∑j=1χϵ1(‖xj(t)−xi(t)‖)χϵ2(‖cj(t)−ci(t)‖). |
We can easily compute
σ(t,x,c)=1nn∑j=1χϵ1(‖xj(t)−x‖)χϵ2(‖cj(t)−c‖)=⟨χϵ1(‖y−x‖)χϵ2(‖z−c‖),δ(y−xj(t))δ(z−cj(t))⟩∫Ωχϵ1(‖y−x‖)χϵ2(‖z−c‖)fn(t,y,z)dzdy, |
and similarly
1nσ(t,x,c)n∑j=1χϵ1(‖xj(t)−x‖)χϵ2(‖cj(t)−c‖)(xj(t)−x)=1σ(t,x,c)∫Ωχϵ1(‖y−x‖)χϵ2(‖z−c‖)(y−x)fn(t,y,z)dzdy. |
Collecting these formal computations, after integration by part in
ddt⟨fn,φ⟩+⟨∇x⋅(fn(t,x,c)∫Ωχϵ1(‖y−x‖)χϵ2(‖z−c‖)σ(t,x,c)(y−x)fn(t,y,z)dzdy),φ⟩=0. |
If we now define a kernel
Aϵ1,ϵ2(t,x,c,y,z)=χϵ1(‖y−x‖)χϵ2(‖z−c‖)σ(t,x,c), | (10) |
and
Vϵ1,ϵ2(t,x,c)=∫ΩAϵ1,ϵ2(t,x,c,y,z)(y−x)f(t,y,z)dzdy | (11) |
in the limit
∂tf(t,x,c)+∇x⋅(Vϵ1,ϵ2(t,x,c)f(t,x,c))=0. | (12) |
Rigorous analytical results on convergence in the case of
We briefly discuss the relation to similar kinetic models.
In [9] the analysis of a homogeneous kinetic model for opinion dynamics under bounded confidence is studied. Therein, the model is derived by using a Boltzmann–like approach with instantaneous binary interactions describing compromise. An analogous derivation of the kinetic equation (12) is also possible using a binary interaction model based on an explicit Euler discretization of the underlying particle dynamics (8) with
In [9] the authors prove the weak convergence of the solution to a convex combination of Dirac delta functions. In [13] a similar asymptotic distribution is found for the mean–field limit of the classical Hegselmann–Krause model.
A further symmetric clustering model with weighted interactions with respect a fixed number of closest neighbors and corresponding mean–field limit has been introduced in [3]. Moments and long–time behavior could also be studied therein. Finally, models for other applications are also able to cluster information e.g. in traffic flow modeling [42] where the physical acceleration has the role of the bounded confidence.
As preliminary remark we observe that the marginal distribution
As in the discrete case we define the
⟨xα⟩(t)=∫Ωxαf(t,x,c)dxdc,|α|=p∈N, αi∈N. |
Here, we used the following multi–index notation
uk(t)=⟨xα⟩(t),|α|=1, αi=δik, i=1,…,d1 |
Ekj(t)=⟨xα⟩(t),|α|=2, αi=δik+δij, i=1,…,d1, |
the first moment and the second moment, respectively. Then, for a symmetric kernel
Lemma 3.1. Let
ddtuk(t)=0,ddtEkk(t)≤0,|Ekj(t)|≤12(Ekk+Ejj)(0) |
for each
Proof. For each fixed
ddtuk(t)=−∫Ωxk∇x⋅(Vϵ1,ϵ2(t,x,c)f(t,x,c))dxdc=∫Ω∫Ωχϵ1(‖y−x‖)χϵ2(‖z−c‖)(yk−xk)f(t,y,z)f(t,x,c)dydzdxdc=0. |
The last term vanishes due to anti–symmetry of the integrand by the interchange of variables
ddtEk(t)=−∫Ωx2k∇x⋅(Vϵ1,ϵ2(t,x,c)f(t,x,c))dxdc=−∫Ω∫Ωχϵ1(‖y−x‖)χϵ2(‖z−c‖)(yk−xk)2f(t,y,z)f(t,x,c)dydzdxdc≤0. |
Hence, we obtain
0≤|Ekj(t)|≤∫Ω|xkxj|f(t,x,c)dxdc≤12(Ekk+Ejj)(t)≤12(Ekk+Ejj)(0). |
Instead, in the case of global interactions and for a general kernel
Corollary 2. Assume that
uk(t)=uk(0), ∀t≥0andEkj(t)t→∞→uk(0)uj(0). |
Proof. Multiplying (12) by
ddt⟨xα⟩(t)=−p⟨xα⟩(t)+d1∑ℓ=1αℓuℓ(t)⟨xα(ℓ)⟩(t) |
where
ddtuk(t)=−uk(t)+uk(t)=0,k=1,…,d1. |
For
ddtEkj(t)=−2Ekj(t)+2uk(t)uj(t)=−2Ekj(t)+2uk(0)uj(0),k,j=1,…,d1 |
and therefore
Ekj(t)=Ekj(0)e−2t+uk(0)uj(0)(1−e−2t)t→∞→uk(0)uj(0),k,j=1,…,d1. |
Observe that, compared to the local interaction case analyzed in Theorem 3.1 where in general the energy decay property of all second order moments is not guaranteed, in global interactions also the mixed second order moments decay in time. In other words, while in the local interaction model only variances go to zero, in the global interaction model both variances and covariances go to zero in the large time behavior.
Lemma 3.1 and Corollary 2 suggest that for
Lemma 3.2. Let
f∞(x,c)=n1∑k=1fkδ(x−xk)n2(k)∑ℓ=1δ(c−ckℓ) | (13) |
with
Proof. Let us assume that at least one of
∫Ωφ(x,c)∇x⋅(Vϵ1,ϵ2(t,x,c)f∞(x,c))dxdc=0. |
We obtain
∫Ωφ(x,c)∇x⋅(Vϵ1,ϵ2(t,x,c)f∞(x,c))dxdc=−n1∑k=1fkn2(k)∑ℓ=1V(t,xk,ckℓ;ϵ1,ϵ2)⋅∇xφ(x,c)|x=xk=−n1∑k=1f2kn2(k)∑ℓ=1(xk−xk)σ(xk,ckℓ)⋅∇xφ(x)|x=xk=0. |
Conversely, assume that
∫Ωφ(x,c)∇x⋅(Vϵ1,ϵ2(t,x,c)f∞(x,c))dxdc=−fkfi(xk−xi)σ(xk,ckℓ)⋅∇xφ(x,c)|x=xk−fifk(xi−xk)σ(xi,cij)⋅∇xφ(x,c)|x=xi≠0 |
which contradicts the hypothesis.
Lemma 3.3. Assume that
f∞(x,c)=δ(x−ˉx)˜fc(0,c)=d1∏k=1δ(xk−ˉxk)˜fc(0,c) |
with
Proof. Substituting the expression of
Vϵ1,ϵ2(t,x,c)=∫Ωyf(t,y,z)dzdy−x=∫Ωyf0(y,z)dzdy−x |
we obtain
∫Ωφ(x,c)∇x⋅(Vϵ1,ϵ2(t,x,c)f∞(x,c))dxdc=∫Ω2˜f(c)(ˉx−∫Ωyf0(y,z)dzdy)⋅∇xφ(x,c)|x=ˉxdc |
which is zero if
Remark 2. As direct consequence of Theorem 3.2 and Theorem 3.3 we have that taking
Remark 3. In Theorem 3.2 the number of clusters
The theoretical results on the asymptotic behavior of the mean–field equation (12) introduced in the previous section are here also numerically investigated. Moreover, we show the efficiency of the model as technique to solve realistic data–clustering problems and to this end we focus on applications to the field of shape detection and image segmentation.
In order to efficiently solve the kinetic model (12) we employ the Mean Field Interaction Algorithm introduced in [2] which is based on random subset evaluation of the kernel term
Algorithm 1 Mean Field Interaction Algorithm for the kinetic equation (12). |
1: Given 2: for 3: for 4: sample 5: compute 6: compute the data change 7: end for 8: end for |
We use the Mean Field Interaction Algorithm to numerically investigate the properties of the kinetic model proved in the previous section. We analyze two typical situations which lead to the two applications we show later in this section.
First, we consider an initial distribution being the uniform distribution with respect to
One–dimension. The numerical steady–states of the mean–field equation (12) are first computed for the one–dimensional case and compared to the steady–states of the microscopic model (8). Observe that, under the assumption of an initial constant distribution along
In Figure 1 we show the steady–state provided by the mean–field kinetic model (12) for the one–dimensional initial uniform distribution on
Trend to the steady–state of the one–dimensional Hegselmann–Krause model (1) with
As observed in Figure 2, for both values of the bounded confidence level, we have conservation of the first moment and energy dissipation in time. Although we are using a non–symmetric model, the first moment is preserved during the time evolution, with deviation of order
In Figure 3 we show some results of a simple analysis of Algorithm 1 with respect to the values of
Two–dimensions. We also show one example of the numerical steady–states of the mean–field equation (12) in the two–dimensional case. Again we employ Algorithm 1. Figure 4 shows the steady–state for the particle density and the kinetic density at time
Next, we consider a non–constant initial distribution along the variable
f0(x,c)=χ[0,1](x)1√2πσ2exp(−(c−μ)22σ2), |
with mean
Top row: particles and kinetic density at initial time (left plot) and at equilibrium (right plot). Bottom row: at left, analysis of the distances between clusters in
In this experiment, we expect that the behavior at equilibrium is influenced also by the interactions with respect to the static feature variable due to the corresponding characteristic function in the kernel (10). In Figure 6 we show the results provided by using
In Figure 7 we show the behavior at equilibrium by considering two different pairs of confidence levels. In the left plot,
The property of the equation (12), analytically studied in Section 3.1 and numerically investigated in Section 4.1, of having quantized steady–states makes the model suitable for solving data clustering problems. In particular, in this section we use the kinetic model as technique for shape detection.
Shape detection can be considered as a branch of pattern recognition problems that focuses on the discovering of previously unknown patterns in a big set of data. Machine learning and many clustering algorithms have already been applied to this class of problems, such as the
More specifically, in this section we apply the models introduced in Section 2 to the example of a character recognition. We consider a letter "A" which is composed by
˜xi=xi+αθi,α>0,θi∼U(−1,1) or θi∼N(0,1) |
which define the noisy pattern. Here, the value
The goal of this example is to cluster the noisy data into a set of points which give information on the shape of the exact pattern to be detected. This can be considered also as a dimensionality reduction problem which could help other algorithms to recognize the unknown pattern efficiently by using information on the position of the clusters. Here the efficiency of the results is studied by means of the following measure:
E(ϵ1,ϵ2,α)=1˜n˜n∑k=1minx∈L‖Ck−x‖2 |
where
In the following, all the results are given for an initial set of
In Table 1 and Table 2 we show a sensitivity study of the error
Number of clusters and errors depending on the bounded confidence value and the percentage of the noise when uniformly distributed
.0.03 | 1.25e-02 | 30 | 0.03 | 3.47e-02 | 51 | 0.06 | 2.64e-02 | 11 |
0.04 | 4.10e-03 | 16 | 0.05 | 1.21e-02 | 14 | 0.07 | 1.48e-02 | 8 |
0.05 | 4.00e-03 | 12 | 0.07 | 7.70e-03 | 8 | 0.08 | 1.12e-02 | 8 |
0.06 | 4.60e-03 | 9 | 0.09 | 7.90e-03 | 8 | 0.09 | 1.63e-02 | 5 |
0.07 | 5.40e-03 | 8 | 0.11 | 1.66e-02 | 3 | 0.10 | 1.63e-02 | 5 |
Number of clusters and errors depending on the bounded confidence value and the percentage of the noise when normally distributed
.0.05 | 4.44e-02 | 23 | 0.05 | 4.73e-02 | 24 | 0.05 | 6.37e-02 | 30 |
0.06 | 1.36e-02 | 11 | 0.06 | 2.62e-02 | 13 | 0.06 | 4.16e-02 | 16 |
0.065 | 6.40e-03 | 9 | 0.065 | 1.63e-02 | 11 | 0.07 | 2.12e-02 | 9 |
0.07 | 6.70e-03 | 7 | 0.0675 | 7.40e-03 | 10 | 0.075 | 9.70e-03 | 7 |
0.08 | 8.50e-03 | 7 | 0.07 | 8.00e-03 | 9 | 0.08 | 9.20e-03 | 7 |
0.09 | 1.00e-02 | 6 | 0.08 | 9.80e-03 | 7 | 0.085 | 1.10e-02 | 5 |
In Figure 8 and Figure 9 some of this cases are shown. Precisely, for the uniformly distributed initial noisy data, Figure 8, we consider the largest value of the percentage of noise
Similar considerations hold for Figure 9 where we show the noisy initial data obtained with
We point out that the goal of this application is to provide a preliminary step for shape feature extraction. This technique should be coupled with a further algorithm which is able to select the correct letter from a given alphabet. The dimensionality reduction provided by the data clustering approach allows to efficiently employ the subsequent recognition analysis.
Remark 4 (Shape detection with non–constant static feature). In the previous examples the static features is taken constant for all the data. In the non–constant case, one could think of this feature as an additional initial given input which measures the quality of the information of each single point and that can be modeled by the distance to its exact value in
We now turn to the second application of the data clustering model 12 which is the segmentation of gray scale images. Image segmentation is widely used in medical and astronomical image processing, face recognition, etc. In fact, this technique allows to partition an image in sets of significant regions of pixels sharing same characteristics such as closeness and similar intensity of color. As in shape detection, the aim of such approach is to modify the description of an image into a structure which easier to be analyzed for subsequent computer vision algorithms.
Several mathematical techniques have been applied to image segmentation. For instance we mention level set methods [39,43] methods based on the Kuramoto model [29,37] and supervised convolution neural networks [17,46]. A more complicated procedure to segmentation of images is the clustering approach and we refer e.g. to the
Here, we study the efficiency of the kinetic model (12) to solve image segmentation problems and therefore we still relies on the clustering technique. Thanks to the model introduced in this paper, segmentation can be performed by using two levels of clustering in order to determine regions of pixels with similar characteristics. More precisely, we cluster based on the Euclidean distance and the distance of the gray intensity between pixels. Taking into account spatial coordinates is needed in order to avoid the problem of selecting homogeneous regions of pixels which are however distinct in the original image. The clustering with respect the intensity of the gray colors is performed by using the static feature variable
The application of (12) works as described in the following. Number of pixels is the number of particles which are assumed to be equally spaced samples. The intensity of the gray color of each pixel is computed at initial time and defines the one–dimensional static feature
In Figure 10 we first apply the segmentation to a benchmark test in order to show how the model works on a simple test. We initialize an gray scale image with
We now apply the segmentation process to real images taken from different data–sets. In Figure 11 we consider an image of
Image segmentation of
The second image in Figure 12 is also characterized by two backgrounds: the sky which is very homogeneous and the field which is less homogeneous. The goal of the segmentation process would be to identify the two cows, separating them from the background. We report the results obtained with
Image segmentation of
In the case of Figure 13 the confidence level
Image segmentation of
In Figure 14 we employ the kinetic model for clustering to segmentation of a real image taken by [32]. The true image is
Image segmentation of
Finally, in Figure 15 we present an additional experiment aimed to provide a comparison between our segmentation process and the one published in [29] based on the Kuramoto model. The image is selected from the data–set [32]. Right panel of Figure 15 has to be compared with Figure (7c) in [29] and, in particular, we observe that our result is able to detect better some structures of the image that are lost by using the Kuramoto model.
Image segmentation of
In this paper we have proposed a new method for clustering of large data which is based on a suitable generalization of the Hegselmann-Krause opinion dynamics model. The extension accounts for clustering with respect to two different sets of features of each single datum: one set describes time dependent characteristics, the other one represents static characteristics.
The mean–field limit of the particle model has been formally derived and the resulting kinetic equation allows for the study of mathematical properties. Time evolution of moments and asymptotic behavior of kinetic equation have been analytically characterized. Moreover, the derivation of the mean–field model allows for reduction of computational complexity thanks to a suitable random subset Monte Carlo algorithm.
Several applications to digital imaging have been proposed. In particular, we have focused on application to shape detection and image segmentation, showing the efficiency of the model to provide satisfying results. Finally, we emphasize that the present model has to be intended as a starting point towards more realistic applications, for example based on the use of non static features combined with suitable machine learning approaches.
This work was supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy – EXC-2023 Internet of Production – 390621612.
Lorenzo Pareschi and Giuseppe Visconti acknowledge the support of the "National Group for Scientific Computation (GNCS-INDAM)", project "Numerical approximation of hyperbolic problems and applications".
1. | Alessandro Benfenati, Giacomo Borghi, Lorenzo Pareschi, Binary Interaction Methods for High Dimensional Global Optimization and Machine Learning, 2022, 86, 0095-4616, 10.1007/s00245-022-09836-5 | |
2. | Christian Fiedler, Michael Herty, Michael Rom, Chiara Segala, Sebastian Trimpe, Reproducing kernel Hilbert spaces in the mean field limit, 2023, 0, 1937-5093, 0, 10.3934/krm.2023010 | |
3. | Christian Fiedler, Michael Herty, Chiara Segala, Sebastian Trimpe, Recent kernel methods for interacting particle systems: first numerical results, 2024, 0956-7925, 1, 10.1017/S0956792524000706 | |
4. | Lorenzo Pareschi, Mattia Zanella, Reduced Variance Random Batch Methods for Nonlocal PDEs, 2024, 191, 0167-8019, 10.1007/s10440-024-00656-z | |
5. | Raffaella Fiamma Cabini, Anna Pichiecchio, Alessandro Lascialfari, Silvia Figini, Mattia Zanella, A kinetic approach to consensus-based segmentation of biomedical images, 2024, 0, 1937-5093, 0, 10.3934/krm.2024017 | |
6. | Raffaella Fiamma Cabini, Horacio Tettamanti, Mattia Zanella, Understanding the Impact of Evaluation Metrics in Kinetic Models for Consensus-Based Segmentation, 2025, 27, 1099-4300, 149, 10.3390/e27020149 |
Algorithm 1 Mean Field Interaction Algorithm for the kinetic equation (12). |
1: Given 2: for 3: for 4: sample 5: compute 6: compute the data change 7: end for 8: end for |
Number of clusters and errors depending on the bounded confidence value and the percentage of the noise when uniformly distributed
.0.03 | 1.25e-02 | 30 | 0.03 | 3.47e-02 | 51 | 0.06 | 2.64e-02 | 11 |
0.04 | 4.10e-03 | 16 | 0.05 | 1.21e-02 | 14 | 0.07 | 1.48e-02 | 8 |
0.05 | 4.00e-03 | 12 | 0.07 | 7.70e-03 | 8 | 0.08 | 1.12e-02 | 8 |
0.06 | 4.60e-03 | 9 | 0.09 | 7.90e-03 | 8 | 0.09 | 1.63e-02 | 5 |
0.07 | 5.40e-03 | 8 | 0.11 | 1.66e-02 | 3 | 0.10 | 1.63e-02 | 5 |
Number of clusters and errors depending on the bounded confidence value and the percentage of the noise when normally distributed
.0.05 | 4.44e-02 | 23 | 0.05 | 4.73e-02 | 24 | 0.05 | 6.37e-02 | 30 |
0.06 | 1.36e-02 | 11 | 0.06 | 2.62e-02 | 13 | 0.06 | 4.16e-02 | 16 |
0.065 | 6.40e-03 | 9 | 0.065 | 1.63e-02 | 11 | 0.07 | 2.12e-02 | 9 |
0.07 | 6.70e-03 | 7 | 0.0675 | 7.40e-03 | 10 | 0.075 | 9.70e-03 | 7 |
0.08 | 8.50e-03 | 7 | 0.07 | 8.00e-03 | 9 | 0.08 | 9.20e-03 | 7 |
0.09 | 1.00e-02 | 6 | 0.08 | 9.80e-03 | 7 | 0.085 | 1.10e-02 | 5 |
Algorithm 1 Mean Field Interaction Algorithm for the kinetic equation (12). |
1: Given 2: for 3: for 4: sample 5: compute 6: compute the data change 7: end for 8: end for |
0.03 | 1.25e-02 | 30 | 0.03 | 3.47e-02 | 51 | 0.06 | 2.64e-02 | 11 |
0.04 | 4.10e-03 | 16 | 0.05 | 1.21e-02 | 14 | 0.07 | 1.48e-02 | 8 |
0.05 | 4.00e-03 | 12 | 0.07 | 7.70e-03 | 8 | 0.08 | 1.12e-02 | 8 |
0.06 | 4.60e-03 | 9 | 0.09 | 7.90e-03 | 8 | 0.09 | 1.63e-02 | 5 |
0.07 | 5.40e-03 | 8 | 0.11 | 1.66e-02 | 3 | 0.10 | 1.63e-02 | 5 |
0.05 | 4.44e-02 | 23 | 0.05 | 4.73e-02 | 24 | 0.05 | 6.37e-02 | 30 |
0.06 | 1.36e-02 | 11 | 0.06 | 2.62e-02 | 13 | 0.06 | 4.16e-02 | 16 |
0.065 | 6.40e-03 | 9 | 0.065 | 1.63e-02 | 11 | 0.07 | 2.12e-02 | 9 |
0.07 | 6.70e-03 | 7 | 0.0675 | 7.40e-03 | 10 | 0.075 | 9.70e-03 | 7 |
0.08 | 8.50e-03 | 7 | 0.07 | 8.00e-03 | 9 | 0.08 | 9.20e-03 | 7 |
0.09 | 1.00e-02 | 6 | 0.08 | 9.80e-03 | 7 | 0.085 | 1.10e-02 | 5 |
Trend to the steady–state of the one–dimensional Hegselmann–Krause model (1) with
Evolution in time of the first moment (left) and of the second moment (right) for the two values of the bounded confidence level
Left: trend to the steady–state of the mean–field model (12) computed with Algorithm 1 with
Particle solution (left plots) with
Evolution in time of the two–dimensional first moments (left) and second moments (right) for the bounded confidence level
Top row: particles and kinetic density at initial time (left plot) and at equilibrium (right plot). Bottom row: at left, analysis of the distances between clusters in
Particle and kinetic density at equilibrium with confidence levels
Shape detection of the letter "A" initialized with
Shape detection of the letter "A" initialized with
Left panel: initial image of
Image segmentation of
Image segmentation of
Image segmentation of
Image segmentation of
Image segmentation of