Mapping images into ordinal networks
MMapping images into ordinal networks
Arthur A. B. Pessa ∗ and Haroldo V. Ribeiro † Departamento de F´ısica, Universidade Estadual de Maring´a – Maring´a, PR 87020-900, Brazil (Dated: July 8, 2020)An increasing abstraction has marked some recent investigations in network science. Examplesinclude the development of algorithms that map time series data into networks whose vertices andedges can have different interpretations, beyond the classical idea of parts and interactions of acomplex system. These approaches have proven useful for dealing with the growing complexity andvolume of diverse data sets. However, the use of such algorithms is mostly limited to one-dimensiondata, and there has been little effort towards extending these methods to higher-dimensional datasuch as images. Here we propose a generalization for the ordinal network algorithm for mappingimages into networks. We investigate the emergence of connectivity constraints inherited from thesymbolization process used for defining the network nodes and links, which in turn allows us toderive the exact structure of ordinal networks obtained from random images. We illustrate the useof this new algorithm in a series of applications involving randomization of periodic ornaments,images generated by two-dimensional fractional Brownian motion and the Ising model, and a dataset of natural textures. These examples show that measures obtained from ordinal networks suchas average shortest path and global node entropy extract important image properties related toroughness and symmetry.
I. INTRODUCTION
In the last two decades, network science has establisheditself as a vibrant and successful field of research [1].The fact that diverse complex systems are accurately de-scribed as sets of vertices and edges [2, 3] combined withadvancements in data acquisition and processing have ledto the widespread application of networks to an immensevariety of systems from biological, sociological and tech-nological origins. In addition to these more establishedworks, recent developments in network science have orig-inated new and more abstract forms to define complexnetworks. Vertices and edges of these more abstract net-works usually do not represent constituents and interac-tions of a system; instead, algorithms mapping objectsinto networks ascribe different meanings to these basicnetwork components [4, 5].Algorithms designed to map time series into networksare a particularly important class of such networks [5]which have been used to characterize time series ofchaotic and stochastic nature obtained from simulationsand experimental data. These approaches are collectivelyknown as time series networks and the most prominentexamples include visibility graphs [6], recurrence net-works [7] and ordinal networks [8]. Visibility graphs andits variants [6, 9–12] map each time series observationinto a network vertex, and any two vertices are connectedif their respective values in the time series satisfy a vis-ibility condition [6]. Recurrence networks, on its turn,are a reinterpretation of recurrence plots [13], a graphictool developed in the context of nonlinear time seriesanalysis [14, 15]. Vertices of recurrence networks repre-sent a set of states obtained from small segments of time ∗ arthur [email protected] † hvr@dfi.uem.br series, and edges connect vertices (pairs of states) thatare similar according to a distance metric [7]. Ordinalnetworks were proposed more recently but also originatefrom the study of nonlinear time series, specifically froma successful symbolization approach due to Bandt andShiha [16] and Bandt and Pompe [17]. Nodes of ordi-nal networks represent ordering patterns (or permutationsymbols) associated with time series slices, and links aredrawn based on the succession of these symbols in thetime series [8, 18–20].While the use of algorithms mapping time series intonetworks is increasingly gaining popularity among thescientific community (see Zou et al. [5] for a recent re-view), few efforts have been dedicated to extending theseideas to higher-dimensional data such as images. No-table exceptions include the works of Xiao et al. [21] onthe degree distributions of row-column visibility graphsobtained from fractal landscapes, and Lacasa and Iaco-vacci [22, 23] that analyzed visibility networks mappedfrom bidimensional random and chaotic data and tackledproblems of image processing and classification. As pro-cesses for extracting meaningful information from imagesare ubiquitous across science, extending and proposingapproaches for mapping images into complex networkshave great potential to contribute with new image quan-tifiers derived from well-established network metrics.Here we present an extension of the ordinal networkframework allowing the representation of images as com-plex networks. We describe intrinsic connectivity con-straints of ordinal networks inherited from the symbol-ization process and determine the exact form of ordi-nal networks mapped from completely noisy images. Bymapping images obtained from periodic ornaments, two-dimensional fractional Brownian motion, and the Isingmodel into ordinal networks, we illustrate the use of thisnew approach to identify and describe these systems withnetwork-related metrics. We further apply our method a r X i v : . [ phy s i c s . s o c - ph ] J u l to characterize a data set of real-world images, where weshow that ordinal networks are capable of distinguishingdifferent types of textures and identifying image symme-tries.The rest of this paper is organized as follows. In Sec-tion II, we briefly revisit the ordinal network frameworkbefore generalizing it to two-dimensional data. Next,we investigate connectivity properties of ordinal net-works (Section III A), the exact form of ordinal net-works obtained from random data (Section III B), andnoisy-periodic ornaments (Section III C). Applicationsinvolving fractal and Ising surfaces are presented in Sec-tions III D and III E, and real-world images (Brodatztextures) are investigated in Section III F. Finally, Sec-tion IV concludes our work. II. METHODS
The representation of time series as ordinal networkshas direct relations to permutation entropy, a successfultime series complexity measure [17]. Specifically, ordinalnetworks use the same approach introduced by Bandtand Shiha [16] and Bandt and Pompe [17] to partition atime series in small segments and associate a permutationsymbol (or an ordinal pattern) with each part accordingto the relative amplitude of the time series values [19].Our extension of the ordinal network algorithm for two-dimensional data is inspired by a generalization of permu-tation entropy to image data proposed in Ref. [24] thatproved useful for investigating liquid crystals [25, 26] andart paintings [27].By following Ref. [24], we start by considering a two-dimensional array { y ji } j = ,...,N y i = ,...,N x of size N x × N y , where theelements y ji may represent pixels of an image. Next, wedivide this array into sliding partitions of size d x by d y defined as w ts = ⎛⎜⎜⎜⎜⎜⎝ y ts y t + s . . . y t +( d y − ) s y ts + y t + s + . . . y t +( d y − ) s + ⋮ ⋮ ⋱ ⋮ y ts +( d x − ) y t + s +( d x − ) . . . y t +( d y − ) s +( d x − ) ⎞⎟⎟⎟⎟⎟⎠ , (1)where the indices s = , . . . , n x and t = , . . . , n y , with n x = N x − d x + n y = N y − d y +
1, cover all n x n y possible sliding partitions. The values of d x and d y arethe two parameters of the approach and represent thehorizontal and vertical embedding dimensions [24]. Wethen flatten these two-dimensional partitions line by lineas w ts = ( y ts , y t + s , . . . , y t +( d y − ) s ,y ts + , y t + s + , . . . , y t +( d y − ) s + , . . . ,y ts +( d x − ) , y t + s +( d x − ) , . . . , y t +( d y − ) s +( d x − ) ) , (2)to investigate the ordering of its elements. Because thisprocedure does not depend on the partition location (that is, s and t ), we can simplify the notation and rewrite theflattened partition as w = ( ˜ y , ˜ y , . . . , ˜ y d x d y − , ˜ y d x d y − ) , (3)where ˜ y = y ts , ˜ y = y t + s , and so on.Under this notation, the symbolization pro-cedure consists in evaluating the permutationΠ = ( r , r , . . . , r d x d y − , r d x d y − ) of the index numbers ( , , . . . , d x d y − , d x d y − ) that sorts the elements of theflattened partition in ascending order, that is, the indexnumbers resulting in ˜ y r ≤ ˜ y r ≤ ⋅ ⋅ ⋅ ≤ ˜ y r dxdy − ≤ ˜ y r dxdy − .In case of draws, we maintain the occurrence order ofthe elements in w , that is, r j − < r j if ˜ y r j − = ˜ y r j for j = , . . . , d x d y − d x = d y = w = ( ) . The corresponding flattened array is w = ( , , , ) , and so ˜ y = , ˜ y = , ˜ y = y = y ≤ ˜ y ≤ ˜ y ≤ ˜ y , the permutation Π = ( , , , ) is the one that sorts the elements of the partition w .After carrying out the symbolization procedure overthe entire data array, we construct another array { π ts } t = ,...,n y s = ,...,n x containing the permutation symbols asso-ciated with each sliding partition w ts . By using this newarray, we can calculate the relative frequency ρ i ( Π i ) ofeach possible permutation Π i defined as ρ i ( Π i ) = number of partitions of type Π i in { π ts } n x n y , (4)where i = , . . . , ( d x d y ) ! and ( d x d y ) ! is the total number ofpossible permutations that can occur in the original dataarray. Having these relative frequencies, we construct theprobability distribution P = { ρ i ( Π i )} i = ,..., ( d x d y ) ! of ordi-nal patterns and estimate the two-dimensional version ofthe permutation entropy [24] H = − ( d x d y ) ! ∑ i = ρ i ( Π i ) log ρ i ( Π i ) , (5)where log ( . . . ) stands for the base-2 logarithm. It isworth noticing that the embedding dimensions d x and d y must satisfy the condition ( d x d y ) ! ≪ N x N y in order toobtain a reliable estimate of the probability distribution P = { ρ i ( Π i )} i = ,..., ( d x d y ) ! [17, 24]. It is worth mentioningthat this generalized version of the permutation entropyrecovers the one-dimensional case (time series data or N y =
1) by setting d y = d x .To generalize the concept of ordinal networks to two-dimensional data, we use the symbolic array { π ts } t = ,...,n y s = ,...,n x obtained from the previous discussion. As in the one-dimensional case, we consider each unique permutationsymbol Π i [ i = , . . . , ( d x d y ) !] occurring in { π ts } as a nodeof the corresponding ordinal network. Next, we draw di-rected edges between these nodes according to the first-neighbor transitions occurring in { π ts } t = ,...,n y s = ,...,n x , that is, wedirectly-connect the permutation symbols involved in allhorizontal and vertical successions among ordinal pat-terns in the symbolic array ( π ts → π t + s and π ts → π js + ,with s = , . . . , n x − t = , . . . , n y − i and Π j is weighted by the total number of occurrences of thisparticular transition in the symbolic array. Thus, we canwrite the elements of the weighted-adjacency matrix rep-resenting the ordinal network as p i,j = total of transitions Π i → Π j in { π ts } t = ,...,n y s = ,...,n x n x n y − n x − n y , (6)where i, j = , . . . , ( d x d y ) ! and the denominator repre-sents the total number of horizontal and vertical permu-tation successions in { π ts } t = ,...,n y s = ,...,n x . Figure 1 illustratesthe procedure for creating an ordinal network from a sim-ple two-dimensional array of size N x = N y = i (associated with a permutation Π i ), the localnode entropy [19, 30] is defined for this vertex as h i = − ∑ j ∈O i p ′ i,j log p ′ i,j , (7)where p ′ i,j = p i,j / ∑ k ∈O i p i,k represents the renormalizedtransition probability of transitioning from node i to node j (associated with the permutation Π j ), and O i is theoutgoing neighborhood of node i (set of all edges leavingnode i ). The local node entropy h i quantifies the degreeof determinism related to permutation transitions at thenode level. We have h i = i , whereas h i is maximum ifall edges leaving i have the same weight (equiprobablecase). At the network level, we can define the globalnode entropy as H GN = ( d x d y ) ! ∑ i = p ′ i h i , (8)where p ′ i = ∑ j ∈I i p j,i corresponds to the probability oftransitioning to node i from its incoming neighborhood I i (in-strength of node i ). If the original data array is largeenough [ ( d x d y ) ! ≫ N x N y ], p ′ i converges to the probabilityof occurrence of permutation π i , and H GN corresponds toa weighted average of local node determinism throughoutthe network. III. RESULTSA. Connectivity constraints
Having described our extension of the ordinal networkalgorithm for two-dimensional data, we start by investi-gating how properties of the symbolic array of permu-tations affect the connectivity of the resulting network. Similarly to what has been found for time series [19], or-dinal networks mapped from two-dimensional arrays alsopresent restrictions that prohibit the existence of severaledges among permutation symbols. These constraints re-sult from the symbolization approach and the procedureused to partition the array of data; they emerge evenwhen data is completely random.To better illustrate this finding, we consider a data ar-ray { y ji } j = ,...,N y i = ,...,N x and embedding dimensions d x = d y =
2. Let us now suppose that the first partition matrix w = ( y y y y ) is characterized by the permutation π =( , , , ) and that the next horizontally-adjacent parti-tion is w = ( y y y y ) . We note that both partitions sharethe array elements y and y . Thus, because w is de-scribed by π = ( , , , ) (that is, y < y < y < y ), thepermutation π associated with w must respect the in-equality y < y imposed by π . Out of the ( d x , d y ) ! = π to one among 12 permutations in which the indexnumber 0 (corresponding to the position of y in w )precedes the number 2 (corresponding to the positionof y ). Vertically-adjacent partitions also present simi-lar constraints. For instance, w = ( y y y y ) shares thearray elements y and y with w , and the index num-ber 0 (position of y in w ) has to precede the ordinalnumber 1 (index number of y in w ) in π because ofthe inequality y < y expressed by π . Thus, π is alsoconstrained by π to be one among 12 ordinal patterns.These restrictions hold independently of the particularpermutation corresponding to π , and for each permuta-tion, there are only 12 others that can immediately followit (horizontally or vertically) when d x = d y = d x and d y . However, it is important to notice that thenumber of constraints in successions among permutationsincreases as adjacent partitions share a larger number ofarray elements. For instance, horizontally-adjacent parti-tions share two array elements while vertically-adjacentpartitions share three array elements when d x = d y =
2. For these embedding dimensions, out of all ( × ) ! =
720 possible permutations, once the permuta-tion π ts is set, there are only 30 allowed ordinal patternsfor its horizontal-neighbor permutation π t + s and 120 al-lowed ordinal patterns for its vertically-adjacent permu-tation π ts + .Once we know the set of allowed horizontal and verticalneighbors for a given permutation, the maximum numberof outgoing edges in the vertex associated with this par-ticular permutation is the intersection of these two sets.Interestingly, we have found that the maximum numberof outgoing edges depends on the ordinal pattern itself.For instance, the ordinal pattern Π = ( , , , ) can haveat most 16 outgoing edges while Π = ( , , , ) can have Array of data Symbolization process
Datapartitions Ordinalpatterns
Symbolic array
HorizontaltransitionsVerticaltransitions
Symbolic transitions (a)(d) (b) (c)
Ordinal network (e)
Flattening
Sorting
FIG. 1. Mapping two-dimensional data into ordinal networks. (a) A small illustrative array of data { y ji } j = ,...,N y i = ,...,N x of size N x = N y =
4. (b) Illustration of the symbolization process applied to the data with embedding dimensions d x = d y =
2. Thisprocess essentially consists in evaluating the ordering of the values within each data partition. (c) Array with the symbolicsequences (or permutation patterns) { π ts } t = ,...,n y s = ,...,n x ( n x = n y =
2) obtained from the original data. (d) All first-neighbortransitions (or vertical and horizontal successions) among ordinal patterns occurring in the symbolic array. (e) Representationof data array as an ordinal network. In this example, all permutation successions occur only once and so the network edgeshave all the same weight. Self-loops [as in the permutation Π = ( , , , ) ] emerge whenever a permutation pattern is adjacentto itself in the symbolic array. up to 20 outgoing connections in an ordinal network.By investigating the maximum number of allowededges for every permutation node, we can find the maxi-mum number of edges for the whole ordinal network. Forembedding dimensions d x = d y =
2, we find that the or-dinal network resulting from an arbitrary data array canhave up to 24 vertices linked by 416 edges. As in the one-dimensional case [19], the number of nodes and edges inordinal networks increases dramatically with the embed-ding dimensions. For instance, an ordinal network canbe formed by 720 nodes and 104 ,
184 edges when d x = d y =
2. This imposes important limitations in theinvestigation of small data samples since the condition ( d x d y ) ! ≪ N x N y is required to have a reliable estimatefor the transition probabilities (edge weights). Most em-pirical investigations are therefore limited to values ofembedding dimensions equal to two or three. B. Random ordinal networks
The constraints discussed in the previous section al-ready indicate that ordinal networks emerging from com-pletely random arrays are not random graphs. As it hasbeen recently uncovered for time series [19], ordinal net-works resulting from random data (called random ordi- nal networks) have a non-trivial network structure. Wenow investigate how these findings generalize for two-dimensional random data. To do so, we consider an arrayof data { y ji } j = ,...,N y i = ,...,N x sampled from a continuous probabil-ity distribution and embedding dimensions d x = d y = w = ( y y y y ) and w = ( y y y y ) , and suppose that y < y < y < y , that is, π = ( , , , ) . To determinethe transition probabilities (edge weights as defined inEq. 6) from π to other permutations, we need to findall possible permutations which can be associated to π by evaluating the inequalities involving the values in w and w .We can start by analyzing all possible amplitude rela-tions between y and the already established condition y < y < y < y to find: i ) y < y < y < y < y ; ii ) y < y < y < y < y ; iii ) y < y < y < y < y ; iv ) y < y < y < y < y ; v ) y < y < y < y < y . (9)Next, we include y and analyze each possible amplituderelation for all the previous five conditions. This proce-dure leads to a total of 30 possible amplitude relationsbetween the six elements contained in partitions w and w : i ) y < y < y < y < y < y ; ii ) y < y < y < y < y < y ; ⋮ vii ) y < y < y < y < y < y ; ⋮ xxx ) y < y < y < y < y < y . (10)By examining the relative positions of y , y , y , and y (which constitute w ) in each of the former 30 inequal-ities, we can ultimately assign an allowed permutationpattern Π to π : i) Π = ( , , , ) ; ii) Π = ( , , , ) ; . . . ; vii) Π = ( , , , ) ; . . . ; xxx) Π = ( , , , ) . As we havepreviously discussed, there are only 12 unique permuta-tions that can horizontally follow π , meaning that somepermutations associated with the previous 30 inequalitiesappear more than once. These different frequencies of oc-currence will end-up implying the existence of differentedge weights in random ordinal networks.By repeating the same procedure for w = ( y y y y ) and w = ( y y y y ) , we find another set of 30 inequalities andtheir corresponding permutations. Thus, from the analy-sis of amplitude relations between data values in w andits neighbors w and w , we find a total of 60 inequalitiescorresponding to 60 non-unique permutations. Becauseamplitude relations in all these inequalities involve ran-dom data, all these 60 inequalities are equiprobable [19],and we can count the number of unique permutations(stemming from π ) to define their relative frequencies.Finally, we normalize these transition probabilities from π to all allowed permutations (edge weights Eq. 6) atthe node level by dividing the frequency of occurrence ofeach unique permutation by the total number of possibleinequalities involving the elements of w and its neigh-bors w and w (60 in case d x = d y = /( d x d y ) !. This last step isnecessary so that the out-strength of permutation π re-flects the fact that all different permutations occur withequal probability in random data [17, 24].We have automatized the former procedure to explic-itly consider each possible ordinal pattern in w [thatis, π = ( , , , ) , ( , , , ) , ( , , , ) , and so on] andthus estimate the edge weights for all allowed transitionsin an ordinal network mapped from a large sample of ran-dom data. This approach allows us to completely specifya random ordinal network for arbitrary embedding di-mensions ( d x and d y ) and estimate all its relevant net-work metrics (including the global node entropy definedin Eq. 8). C. Ordinal networks of noisy-periodic ornaments
An interesting application to observe the emergenceof random ordinal networks is the randomization pro-cess of a geometric ornament [25]. Figure 2(a) illustratesthis procedure, where the probability of randomly shuf-fling pixels values p controls the transition from a peri-odic image ( p =
0) to a random one ( p = × d x = d y =
2, as shown inFig. 2(b). The visual aspect of these ordinal networksalludes to the visual features of the noisy-periodic or-naments. For small values of p , we observe that theordinal networks are marked by intense connections be-tween nodes ( , , , ) and ( , , , ) as well as between ( , , , ) and ( , , , ) , and by auto-loops in these fournodes, which in turn reflect the diagonal stripes in theimages. As the values of p increases, the strength of theseconnections fade out and give rise to a more uniform dis-tribution of edge weights.To systematically investigate these noisy-periodic or-naments, we generate an ensemble containing 100 orna-ment samples of size 250 ×
250 for each randomizationprobability p ∈ { . , . , . , . . . , . } and transformthem into ordinal networks using embedding parameters d x = d y =
2. From these networks, we estimate the aver-age value of the Gini index of edge weights G , the globalnode entropy H GN , and the average weighted shortestpath ⟨ l ⟩ , as shown in Figs. 2(c)-(e). In addition, wealso estimate the values of these three network proper-ties from the exact form of the random ordinal networks[dashed lines in Figs. 2(c)-(e) presented in Sec. III B].As expected, we observe that the three measures ap-proach the exact values for random networks with the in-crease of p . It is interesting to notice that the global nodeentropy H GN surpasses the exact random value around p ≈ . ⟨ l ⟩ appears to converge to a value slightlylower than the expected from the exact form of the ran-dom ordinal network. This apparent discrepancy occursbecause the relatively small size of the images prevents amore accurate estimation of all permutation transitions;however, this difference between the values of ⟨ l ⟩ for p = D. Ordinal networks of fractional Brownianlandscapes
In another application, we investigate ordinal networksmapped from two-dimensional fractional Brownian mo-tion [31]. This class of stochastic processes models natu-ral landscapes and is characterized by the Hurst exponent h ∈ ( , ) that controls the surface roughness. Surfaces random ordinal network (d) random ordinal network (e) random ordinal network p = 0 p = 0.25 p = 0.50 p = 0.75 p = 1.00 p = 0 p = 0.25 p = 0.50 p = 0.75 p = 1.00 (a)(b)(c) FIG. 2. Emergence of random ordinal networks in noisy-periodic ornaments. (a) Visualizations of geometric ornament imagesfor different randomization probabilities p (shown below images). (b) Ordinal networks with d x = d y = G , (d) global node entropy H GN , and (e) averageweighted shortest paths ⟨ l ⟩ on the randomization probability p . In the last three panels, the continuous lines show the averagevalues of the network measures and the shaded regions indicate one standard deviation band estimated from an ensemble of100 ornament samples of size 250 ×
250 for each value of p . The black dashed lines indicate the exact values of the networkmeasures for random ordinal networks. generated with small values of h ( h →
0) are rough whilelarge values of h ( h →
1) produce smooth landscapes.Cross sections of fractional Brownian landscapes with h = / h .We generate an ensemble containing 100 fractionalBrownian landscapes of size 256 ×
256 for each value of h ∈ { . , . , . , . . . , . } (with the turning bandsmethod), and map each sample into an ordinal networkwith embedding dimensions d x = d y =
2. Figure 3(b)presents visualizations of the ordinal networks mappedfrom the sample images of Fig. 3(a). We observe thatchanges in surface roughness affect the connectivity pat-terns of the resulting networks. Rougher surfaces pro-duce ordinal networks with a more even distribution of edge weights which visually resemble random ordinal net-works [last panel in Fig. 2(b)]. As fractional Browniansurfaces become smoother, we observe a concentration ofweight in a few edges among particular nodes, while theintensity of most links decreases. This concentration ofweight reflects the predominant occurrence of only a fewpermutations in the symbolic arrays related to smootherimages.Beyond the previous qualitative observations, we cal-culate the average values of the Gini index of edgeweights G , the global node entropy H GN , and the aver-age weighted shortest path ⟨ l ⟩ as a function of the Hurstexponent h using our ensemble of fractional Brownianlandscapes. Figures 3(c)-(e) show these three networkmeasures in comparison with their values estimated fromrandom ordinal networks. These results are in line withour qualitative observations. Specifically, the Gini index h = 0.7 h = 0.1 h = 0.3 h = 0.5 h = 0.9 h = 0.1 h = 0.3 h = 0.5 h = 0.7 h = 0.9 random ordinal network random ordinal network random ordinal network (c) (d) (e)(b)(a) FIG. 3. Ordinal networks of fractional Brownian landscapes. (a) Examples of fractional Brownian surfaces for a few values ofthe Hurst exponent (shown below each image). We have normalized all surfaces so that blue shades indicate low height regionsand red shades the opposite. (b) Ordinal networks mapped from the fractal surfaces shown in the previous panel. Dependenceof the (c) Gini index of edge weights G , (d) global node entropy H GN , and (e) average weighted shortest paths ⟨ l ⟩ on the Hurstexponent h of two-dimensional fractional Brownian motion. In these last three panels, the continuous lines represent averagevalues (from an ensemble of 100 landscape samples for each h ), and shaded regions delimit an one standard deviation band.The black dashed horizontal lines represent the values of these network metrics estimated from random ordinal networks. increases with the Hurst exponent, reflecting the concen-tration of weight in fewer edges. On the other hand, theglobal node entropy H GN and the average weighted short-est path ⟨ l ⟩ decrease as the Hurst exponent increases.The monotonic relationships of these three metrics asfunctions of the Hurst exponent indicate that their val-ues are good predictors of landscape roughness. We havealso verified that the behavior of these three networkmeasures obtained for embedding dimensions d x = d y = d x = d y = d x = d y = E. Ordinal networks of Ising surfaces
We have also applied ordinal networks to Ising sur-faces [33, 34] to verify whether network measures are ca- pable of identifying phase transitions. These surfaces areobtained by accumulating the spin variables σ ( t ) of thecanonical Ising model in a Monte Carlo simulation [35].To describe this model, we consider a square lattice whosesites are occupied by spin-1 / σ ∈ {− , } ] withHamiltonian given by H = − ∑ ⟨ i,j ⟩ σ i σ j , (11)where the summation is over all pairs of first neighbors.The height S i of the corresponding Ising surface at site i is then defined as S i = ∑ t σ i ( t ) , (12)where σ i ( t ) is the spin value in step t of the Monte Carlosimulation.Figure 4(a) shows examples of Ising surfaces of size250 ×
250 obtained for different reduced temperatures Tr = 0.8 Tr = 0.9 Tr = 1.0 Tr = 1.1 Tr = 1.2 random ordinal network (d) random ordinal network (c) random ordinal network (e) Tr = 0.8 Tr = 0.9 Tr = 1.0 Tr = 1.1 Tr = 1.2 (b)(a) FIG. 4. Ordinal networks of Ising surfaces. (a) Illustration of Ising surfaces for different values of reduced temperatures T r (indicated below each image). We note that more complex patterns emerge around criticality ( T r = G , (d) global nodeentropy H GN , and (e) average weighted shortest path ⟨ l ⟩ on the reduced temperature T r . The horizontal dashed lines in theprevious three panels indicate values of the corresponding metric estimated from random ordinal networks. T r = T / T c , where T c = / ln ( +√ ) is the critical temper-ature at which the Ising model undergoes a phase transi-tion. Surfaces generated at reduced temperatures distantfrom the critical value ( T r =
1) do not exhibit long-rangestructures and are similar to two-dimensional white noise.However, we start to observe more complex patterns asthe reduced temperature gets closer, and especially whenit is equal, to the critical value.We generate an ensemble containing 10 Ising surfacesof size 250 ×
250 for each value of T r ∈ { . , . , . . . , . } .Each surface is obtained after accumulating the spin vari-ables during 30,000 Monte Carlo steps to achieve equi-librium [24, 36]. Next, we map all surfaces into ordinalnetworks with embedding dimensions d x = d y =
2. Fig-ure 4(b) shows examples of networks mapped from theimages in Fig. 4(a). A visual inspection of these ordinalnetworks already suggests that their properties changewith the reduced temperature.Similarly to the previous applications, we calculatethe Gini index of edge weights G , global node entropy H GN , and average weighted shortest path ⟨ l ⟩ as a func- tion of the reduced temperature T r . Results presentedin Fig. 4(c)-(e) show that all three measures presentmarked variations before and after the phase transitionat T r =
1, assuming extreme values at the critical tem-perature. The values at the critical temperature are alsothe furthest from those estimated from random ordinalnetworks [dashed lines in Fig. 4(c)-(e)]. In addition, wenote that variations of these metrics are steeper beforethan after criticality, indicating that spatial correlationsare slowly broken with the rise of temperature. It isalso worth observing that these networks become slightlymore entropic than random ordinal networks at high tem-peratures.
F. Ordinal networks of texture images
As a final application, we use our generalized algorithmto map real-world images to ordinal networks. To do so,we consider 112 pictures of natural textures comprisingthe Normalized Brodatz Texture database [37], a set of
D21D14 D44D38 D56D49D71 (a) (b)(c) (d)
D18D81 D78D86 D105
FIG. 5. Ordinal networks mapped from Brodatz textures. (a) Locations of all Brodatz textures at the plane of global nodeentropy H G N versus average weighted shortest path ⟨ l ⟩ . (b) Six different images corresponding to highlighted textures in theprevious panel (blue markers). (c) Difference between the global network entropy estimated from horizontal and vertical ordinalnetworks ( H HorizontalGN − H VerticalGN ). (d) Six pictures corresponding to highlighted textures in the previous panel (red markers). ×
640 coveringa large variety of natural textures that is often used asvalidation set for texture analysis [37]. We map eachimage into an ordinal network with embedding dimen-sions d x = d y =
2. We then estimate the Gini index ofedge weights G , global node entropy H GN , and averageweighted shortest path ⟨ l ⟩ of each network.These network measures are cross-correlated withPearson correlation coefficients ranging from 0 .
92 for ⟨ l ⟩ versus H GN to − .
96 for G versus ⟨ l ⟩ . Figure 5(a) shows ascatter plot of ⟨ l ⟩ versus H GN (the less significant associ-ation) for all textures, where the dispersion pattern sug-gests that both measures are non-linearly related. Fig-ure 5(b) depicts six different images that are also high-lighted in Fig. 5(a). We observe that the two textureswith extreme values of ⟨ l ⟩ and H GN (D49 and D71) arequite different: while regular horizontal stripes mark tex-ture D49, texture D71 shows much more complex struc-tures.We also note the existence of textures with similar val-ues of H GN and distinct values of ⟨ l ⟩ as well as imageswith similar values of ⟨ l ⟩ and different values of H GN .These results suggest that both measures may quantifydifferent aspects of images. For instance, textures D86and D81 [highlighted in Fig. 5(a)] have almost the samevalues of global node entropy; however, the value of ⟨ l ⟩ is considerably larger for D86 than D81. By inspectingthese two textures in Fig. 5(b), we note that D86 ap-pears to be rougher than D81. Similarly, textures D18 and D78 have comparable values of ⟨ l ⟩ but quite differentvalues of H GN . The visual inspection of these texturessuggests that D18 is more regular and structured thanD78. While it is challenging to generalize these inter-pretations to other images, we believe the values of H GN quantify patterns at a more local level while ⟨ l ⟩ and G area more global measures. This idea somehow agrees withthe definition of these measures in the sense that H GN is based on relations involving first-neighbors, while ⟨ l ⟩ and G involve the entire ordinal network.We further investigate the possibility of exploring vi-sual symmetries in the Brodatz data set. To do so, wehave made a small modification in our original algorithmto create two ordinal networks from a single image. Oneof these networks considers only horizontal transitionsamong permutations (horizontal ordinal network), andthe other uses solely vertical transitions among permuta-tions (vertical ordinal network). Thus, we map each Bro-datz texture into a horizontal and vertical ordinal net-work with embedding dimensions d x = d y =
2. Then, weestimate the global node entropy from the horizontal net-work ( H HorizontalGN ) and the vertical network ( H VerticalGN ).Figure 5(c) shows the difference between these quantities( H HorizontalGN − H VerticalGN ) for each texture. We observe afew textures with extreme values for this difference andhighlight six of them, which are also depicted in Fig. 5(d).Most of these images are characterized by stripes or linesegments predominantly oriented in vertical or horizontaldirections, indicating that vertical and horizontal ordinal0networks are capable of detecting this simple symmetryfeature.These results indicate potential applications of our ap-proach in classification tasks as a way of extracting tex-ture features via network metrics [23], in a similar mannerto which permutation based metrics have already beensuccessfully used as predictors in image classification andregression problems [26, 27].
IV. CONCLUSION
We have proposed a generalization of the ordinal net-work algorithm for mapping images (two-dimensionaldata) into networks. After describing the method, wehave studied basic connectivity patterns of these net-works which in turn allowed us to find the exact formof ordinal networks mapped from random data. We haveobserved the emergence of these random ordinal networksin a controlled setting by randomizing a geometric pe- riodic ornament. We have also investigated changes insurface roughness of two-dimensional fractional Brown-ian motion and found monotonic relations between net-work measures and the Hurst parameter of these fractalsurfaces. This result extends similar findings previouslyobtained from time series data [19]. In the context ofphysical models, we have studied phase transition in anIsing-like model where variations in network metrics havebeen proven useful for accurately identifying the criticaltemperature. Finally, we have mapped natural textureimages into ordinal networks and briefly considered thepossibility of using networks to potentially extract imagefeatures.Our work thus contributes to recent developments innetwork science focused on mapping two-dimensionaldata into networks and characterizing them through net-work representations [21, 22]. As these network ap-proaches are quite novel when compared to other at-tempts stemming from complexity science [24, 25, 36, 38–40], we believe there are several opportunities for apply-ing these new tools to different contexts involving imageanalysis. [1] A. Vespignani, Nature , 528 (2018).[2] S. Dorogovtsev,
Lectures on Complex Networks , OxfordMaster Series in Physics (Oxford University Press, 2010).[3] R. Albert and A.-L. Barab´asi, Reviews of Modern Physics , 47 (2002).[4] M. Zanin, D. Papo, P. Sousa, E. Menasalvas, A. Nicchi,E. Kubik, and S. Boccaletti, Physics Reports , 1(2016).[5] Y. Zou, R. V. Donner, N. Marwan, J. F. Donges, andJ. Kurths, Physics Reports , 1 (2019).[6] L. Lacasa, B. Luque, F. Ballesteros, J. Luque, and J. C.Nu˜no, Proceedings of the National Academy of Sciences , 4972 (2008).[7] N. Marwan, J. F. Donges, Y. Zou, R. V. Donner, andJ. Kurths, Physics Letters A , 4246 (2009).[8] M. Small, in (2013) pp. 2509–2512.[9] B. Luque, L. Lacasa, F. Ballesteros, and J. Luque, Phys-ical Review E , 046103 (2009).[10] L. Lacasa, A. Nu˜nez, ´E. Rold´an, J. M. R. Parrondo,and B. Luque, The European Physical Journal B , 217(2012).[11] I. Bezsudnov and A. Snarskii, Physica A , 53 (2014).[12] F. M. Bianchi, L. Livi, C. Alippi, and R. Jenssen, Sci-entific Reports , 44037 (2017).[13] J.-P. Eckmann, S. O. Kamphorst, and D. Ruelle, Euro-physics Letters (EPL) , 973 (1987).[14] H. Kantz and T. Schreiber, Nonlinear Time Series Analy-sis , Cambridge Nonlinear Science Series (Cambridge Uni-versity Press, 2004).[15] E. Bradley and H. Kantz, Chaos , 097610 (2015).[16] C. Bandt and F. Shiha, Journal of Time Series Analysis , 646 (2007).[17] C. Bandt and B. Pompe, Physical Review Letters , 174102 (2002).[18] M. McCullough, M. Small, T. Stemler, and H. H.-C. Iu,Chaos , 053101 (2015).[19] A. A. B. Pessa and H. V. Ribeiro, Physical Review E , 042304 (2019).[20] F. Olivares, M. Zanin, L. Zunino, and D. P´erez, Chaos , 063101 (2020).[21] Q. Xiao, X. Pan, X.-L. Li, M. Stephen, H.-J. Yang,Y. Jiang, J.-Y. Wang, and Q.-J. Zhang, Chinese PhysicsB , 078904 (2014).[22] L. Lacasa and J. Iacovacci, Physical Review E , 012318(2017).[23] J. Iacovacci and L. Lacasa, IEEE Transactions on PatternAnalysis and Machine Intelligence , 974 (2019).[24] H. V. Ribeiro, L. Zunino, E. K. Lenzi, P. A. Santoro,and R. S. Mendes, PLOS ONE , 1 (2012).[25] L. Zunino and H. V. Ribeiro, Chaos, Solitons & Fractals , 679 (2016).[26] H. Y. D. Sigaki, R. F. de Souza, R. T. de Souza, R. S.Zola, and H. V. Ribeiro, Physical Review E , 013311(2019).[27] H. Y. D. Sigaki, M. Perc, and H. V. Ribeiro, Proceedingsof the National Academy of Sciences , E8585 (2018).[28] Y. Cao, W.-w. Tung, J. B. Gao, V. A. Protopopescu,and L. M. Hively, Physical Review E , 046217 (2004).[29] O. A. Rosso, H. A. Larrondo, M. T. Martin, A. Plastino,and M. A. Fuentes, Physical Review Letters , 154102(2007).[30] M. McCullough, M. Small, H. H. C. Iu, and T. Stemler,Philosophical Transactions of the Royal Society A ,20160292 (2017).[31] B. B. Mandelbrot, The Fractal Geometry of Nature (Free-man, San Francisco, 1982).[32] Z.-M. Yin, Journal of Computational Physics , 66(1996). [33] A. F. Brito, J. A. Redinz, and J. A. Plascak, PhysicalReview E , 046106 (2007).[34] A. F. Brito, J. A. Redinz, and J. A. Plascak, PhysicalReview E , 031130 (2010).[35] D. Landau and K. Binder, A Guide to Monte CarloSimulations in Statistical Physics (Cambridge UniversityPress, 2015).[36] A. Brazhe, Physical. Review E , 061301 (2018). [37] A. Safia and D.-C. He, ISRN Machine Vision , 14(2013).[38] Z. Cai, E. Shen, F. Gu, Z. Xu, J. Ruan, and Y. Cao,International Journal of Bifurcation and Chaos , 3235(2006).[39] Y. Andrienko, N. Brilliantov, and J. Kurths, The Euro-pean Physical Journal B , 539 (2000).[40] D. P. Feldman and J. P. Crutchfield, Physical Review E67