Abstract
The spatial colocation problem is totally different from the traditional association rule problem, as it operates on spatial data and not on conventional transaction data. In this work, a spatial colocation mining framework is proposed that mines spatial colocation of image-objects present in images using a tensor factorization approach. The framework takes in image data directly, tensorize it and perform the mining task, thus eliminating the need of converting into a transaction based approach. An interestingness measure called, spatial dominance is also proposed in this work. This measure is an indicator of the prevalence of the mined colocation pattern. Algorithms are designed in this framework, first to map the classified pixels as members of image-objects, which is a pre-stage before mining and second to find spatial colocation patterns. Experiment results are provided to show the strength of the spatial colocation mining algorithm.
Introduction
Colocation pattern mining is a member of data mining family and is the process of finding patterns that are located together or in proximal location. Mining of colocations in the spatial domain is referred to as spatial colocation pattern mining. Colocation pattern mining yields important insights in application domains like environment monitoring [1], earth science [2], mobile services [3], public safety [4] and urban facility analysis [5]. The task of colocation pattern mining is challenging because of the following facts: (a) the features of the data under study is embedded in continuous space in contrast to the traditional transaction type discretized structure and (b) a number of spatial relationships exists between the features of the data thus resulting in considerable computation time for finding the significant number of colocation instances and patterns. Challenges become more difficult and tedious when the data varies from ordinary text data to complex media data.
Generally, spatial colocations are mined in transaction databases, where each space instance is modeled as a row in a table. The approach to find spatial colocation patterns is to find spatial colocation instances and generalize the same to a pattern, based on interestingness measures. This will result in enormous computation time as the instances are to be discovered, modeled appropriately and further downsized to obtain patterns. The complexity of the work structure mentioned increases when there are no transaction databases for image data. Building a transaction database for image data is a manual interventional task. Hence there is a crucial need to find spatial colocations from image data without the aid of a transaction database. One another reason to be noted for considering image data is attributed to the fact that today’s world is witnessing an overflow of image data from various arena. Hence it is felt that the need for analyzing the patterns present in this image data is the responsibility of the spatial research community.
The spatial colocation mining algorithm proposed in this research is based on the concept of tensors, which are basically multi-way arrays. The tensor data structure captures all kinds of spatial relationships that exists between objects or entities. The objects or entities in this research are from images, which are termed as image-objects. Hence there is a necessity of a pre-stage of finding image-objects from pixel-wise classified images, which is also taken care of in this work. To the best of our knowledge, this is the first work which proposes to mine spatial colocation in images.
The advantages of modelling image-objects as tensors are (i) management of huge amount of data with tensors is easy (scalable images/image-objects) (ii) tensors are easily reducible to lower dimensions resulting in easy understanding of latent information and (iii) extraction from tensor data to lower dimensions results in more components of information than ordinary matrix-based methods.
The paper is organized as follows. The next section briefs about the relevant and related work in colocation pattern mining. The framework proposed is detailed in the further sections. Section 3 provides the basics of the concept of tensors used in this work. Section 4 builds the framework to mine spatial colocation patterns and explains the proposed algorithms. The evaluation and discussion of the proposed algorithms with respect to other relevant algorithms in the literature are briefed as well in Section 5. A valid summary of this work as well as suggested future directions are described towards the end of the paper in Section 6.
Background
The first attempt to perform spatial colocation mining is seen in [6]. This work is an attempt to capture a subset of spatial features for a particular class, which is different from the colocation mining concept in today’s world. An effective approach is presented in [7] that depicts a space partitioning method for identifying neighbourhood regions which contain instances of colocations. The algorithm may miss colocations across the different neighbourhoods, due to distinct partitions. A join based colocation mining algorithm is presented in [8] which works similar to Apriori [9]. This is a computationally expensive process with the increase in the number of colocation instances. An approach to perform a partial join to increase computational efficiency is seen in [10]. In this work, the spatial data is modeled as clique neighbourhood and the cut in the neighbourhood determines the colocation instances mined. The joinless approach [11] reduces the computational time by introducing the instance look -up scheme instead of the regular join operation. The algorithm does not miss any colocation patterns, even though the computational time is dependent on the size of the data. A framework for spatial colocation pattern mining based on association analysis and maximal clique representation of the spatial data is presented in [12]. However, in this case, the spatial data has to be modelled as transaction type data to perform mining of the spatial colocation instances. It is observed that computing spatial colocations using candidate based approaches are extensively expensive due to the exponential number of candidate subsets. Realizing this fact, approaches had been attempted in the literature to avoid the generation of candidate sets to mine spatial colocation patterns.
Representative Colocation Pattern (RCP) mining is introduced in [13] to reduce the exponential number of patterns that arise due to increasing in data size. Instead of the distance measure, a new prevalence measure is introduced in this work to find the covering relationship among spatial colocation instances. In [14] maximal colocations are identified through a maximal clique based approach wherein a Sparse undirected Graph is used for the purpose. Each instance clique of a maximal colocation is further stored in a Condensed Tree for verification and to reduce the storage size. This algorithm is hereafter referred to Sparse Graph Condensed Tree algorithm (SGCT). However, the algorithm does redundant computations when the instances generated have a huge number of object types.
Tensor-based approaches are being used in temporal data networks [15] to find the activity patterns of the time series data due to the generation of huge amount of data and the experimental results are satisfactory, which motivated to apply the tensor factorization techniques to spatial colocation pattern mining problems. The tensor based approaches are nowadays seen in big data processing, understanding and analyzing signal processing applications [16, 17] and in information retrieval [22]. Tensors has helped to improvise the standard flat view matrix models of data to high dimensional and versatile models [18, 23].
Tensor model for pattern discovery in image-objects
Image-objects are entities in an image, which are actually groups of pixels of similar digital values. Image-objects possess size and shape in addition to the pixel value and location, that is, an image-object holds spatial as well as non-spatial attributes. Non-spatial attributes are the characteristic features holding nominal values like label or name of image-objects. Spatial attributes describe the spatial characteristics like spatial location (longitude and latitude), spatial extent (area, perimeter, size), spatial shape (point, extended, polygon) and even spatial elevation [19]. As the non-spatial attributes and their relationships are explicit, we focus on discovering the implicit spatial attributes and their relationships. The spatial relationships or patterns that exists among image-objects can be sought in set, topological, metric or distance space. Hence it is felt that the pattern discovery of image-objects in all these mentioned spaces will yield knowledge beneficial for decision making systems. In our approach, a tensor model for pattern discovery of image-objects is proposed.
Tensors are arrays in which more than two dimensions can be represented. This is the obvious reason for choosing tensors in our approach, as the attributes and relationships that exists among image-objects can be of any dimension. Thus the tensor modeling is enabling a paradigm shift from two-way to multi-way components or analysis of the spatial image-objects.
Tensorization
The multifaceted/multidimensional data has to be stacked as a tensor. The ‘N’ spatial relationships between the image-objects can be modeled as tensor to start with. In this work, the tensor notations are marked in bold-faced calligraphic font, matrices are in bold faced capital letters and vectors are in bold faced small letters. Let the tensor be represented as 𝒮. The tensor is to be stacked with the spatial relationship between all image-objects. Assuming there are K image-objects in the datasets (I1, I2, I3, …, IS) and the number of spatial relationships can be (S1, S2, S3,….,SN). Thus the image-objects can now be looked upon as a tensor as follows.
Depending on the spatial relationship under set, topological, metric or distance space chosen for study, the set S1, S2, S3, …, SN can be decided. Thus the process of tensorization can be defined as follows.
Definition - Tensorization of Image-Objects – The process of converting or stacking all spatial relationships in the defined space existing between the image-objects into a tensor.
The modeled tensor contains information about the patterns of spatial relationship that exists between the image-objects. The question posed here is how to uncover the pattern that exists inside the tensor. The spatial patterns that exists between the image-objects have to be discovered by extracting the lower dimensional factors of the tensor. This can be achieved by canonical decomposition of the tensor [17]. The terms ‘decomposition’ and ‘factorization’ are synonymously being used in tensors, referring to the same process of factorizing the tensors to generate decomposed factors.
Consider a 3-order tensor
The symbol ∘ represent the outer product of the vectors and R
S
is the number of components in this model and the smallest value of R
S
is the rank of the tensor 𝒮. The tensor rank cannot be calculated by any known algorithm, as it is a NP-hard problem. A typical use of 3-order tensor is to model the interaction between 3 entities X, Y, and Z. An entry
Thus the tensor contains latent feature represented for the image-objects under consideration. The interaction pattern of the image-objects can be recovered once the decomposition is done successfully.
To generalize the pattern mining, continuing with Equation (2), the set of vectors
The way to solve this problem is to find R rank-1 tensors that best approximate the tensor. The decision of the value of R helps to find the patterns that exists between image-objects. A lower value of R yields only the strongest underlying patterns whereas higher value of R while producing weakest patterns, is also prone to the risk of over-fitting. Thus choosing R is an optimization problem and the resulting R number of components yield the spatial patterns that exists between image-objects.
Definition – Spatial Pattern Discovery from Tensorized Image-Objects – The process of finding explicit patterns in the latent space that exists between image-objects through decomposition of tensorized data.
The high dimensionality associated with the spatial relationships is never a curse in our model, in fact, turns out as a blessing which helps to find different compact spatial patterns. The tensor model can be used for finding the spatial pattern in any space that exists between the image-objects as long as the relationship patterns can be appropriately represented. Hence the model can find patterns that capture multiple interactions in addition to standard pairwise interactions.
Spatial colocation pattern mining framework
The spatial pattern discovery using the tensor based model is attempted in the metric space. There are two kinds of relationships in the metric space, namely, distance and topological. Mining the distance relationship that exists between image-objects helps to discover spatial colocation patterns. In this framework, the generalized tensor model is adopted for finding spatial colocation patterns. The workflow of the framework is presented in Fig. 1.

Spatial Colocation Mining Framework.
The proposed framework operates in a two-stage scenario, wherein (i) a neighborhood growing technique to find image-objects from pixel-wise classified image and (ii) discovering spatial colocation patterns by tensorizing image-objects. The first stage performs the mapping of pixels to appropriate image-objects through a neighborhood growing technique and is named as “Pixel Mapping to Image-Objects” (PMIO) phase in the framework. The second stage consists of two phases (a) tenorization of image-objects and (b) tensor factorization to mine spatial colocation patterns and is named as SCLP-TF.
The first phase, abbreviated as PMIO, is the phase in which a neighborhood growing technique is applied on a window of classified pixels. The objective of this phase is to extract image-objects from the classified image. The heuristic approach proposed, selects a window of random size, say W. The window size is generally set to a power of 2, for better computational results. From the centroid pixel of the window, the neighborhood is examined in log2 W group of pixels, which is referred as sub-window. On examining the neighborhood, find the most occurring class label and assign it to the entire sub-window. The growing technique terminates when the threshold limits in terms of size (from the knowledge base input) is reached. The entire set of image-objects in the image can be identified when this algorithm is applied throughout the image. The algorithm also finds out the position of image-objects from the centroid pixel.
The selection of the size of window (and sub-window) is the deciding criteria for the extraction of image-objects. An appropriate window-size helps to find the image-objects accurately, whereas an under-fitting window will not identify all image-image and over-fitting window will result in more computational complexity.
Spatial colocation pattern mining using tensor factorization (SCLP-TF)
After obtaining image-objects and the corresponding position, the next objective in second stage is to mine spatial colocation patterns. The spatial colocation patterns are mined using the tensor factorization method explained in Section 3.
Tensorization of image-objects
The image-objects (I1, I2,…., IS) and their corresponding positions P I 1 , P I 2 , …… , P I K in images under study has to be stacked as a tensor and the process is referred to as tensorization. As the intention is to find spatial colocation patterns, the spatial relationship has to be sought in metric space, and we fix the Euclidean distance as the relationship type. From here onwards, whenever we refer to distance, it is the Euclidean distance which is being taken into account of. The tensor stack has to model the distance relation among all image-objects. The tensor is built with labels of image-objects in 1st and 2nd dimension (say, N image-objects), 3rd dimension is tensorized using the Euclidean distance between image-objects (say, S). Let the tensor be represented as 𝒮.
Tensor factorization to find SCLP
The latent spatial patterns present in the tensorized data has to be discovered by using the principle of tensor factorization. Tensor factorization yields components of the tensorized image-objects and their distance relationships. The tensor 𝒮 obtained after stacking is of 3rd order kind. The canonical decomposition is applied on 𝒮 for factorization using Alternating Least Squares [17] method. It is well known that finding the rank of a tensor is still an open problem. The general solution is to find different number of components till the factorization fits into a defined error ratio.
The tensor 𝒮 is of the order N x N x S. The tensor 𝒮, has to be factorized to obtain the decomposed components (matrices) say
Repeatedly change the entries in A, B and C and iterate this process over a definite number of times, where the deciding factor is the difference between the entries in the original tensor and the recovered tensor from the components A, B and C. The optimal selection of rank is done by finding the fitting of the original tensor and the decomposed components. The process terminates when R reaches Rmax or the difference between the original tensor (𝒮) and recovered tensor (
The decomposed components (air, bjr, ckr) shows the interaction with respect to image-objects and the distance relation. The R components of
The R components of
Definition – Spatial Dominance – It is an interestingness measure in spatial domain that determines the degree of domination of a particular spatial colocation pattern in the set of images and is an indicator of how strong the pattern is in the given set of images.
The decomposed components from the tensorized data, namely
The decomposed component
Results and discussions
Dataset
Sparse and dense datasets are being used in this study for finding the spatial colocation patterns. Data_1 consists of 10103 images and is a sparse kind of dataset. Data_2 [21] consists of 2873 images and is a dense kind of dataset. These pixel-wise classified images are first run through PMIO (stage 1) and image-objects and their positions are identified. After identification of image-objects, the SCLP-TF (stage 2) is applied to find the spatial patterns.
Experiment setup
The first stage in the framework is to perform the mapping of classified pixels to image-objects. As the output of stage 1, the labels of image-objects and their corresponding positions in the images are obtained. Sample examples of classified image-objects from Data_1 and Data_2 are shown in the Fig. 2. The threshold sizes for the datasets are fixed through manual intervention. After the stage 1, 59 and 107 image-objects were extracted from Data_1 and Data_2 respectively. The image-objects are labeled semantically and their positions in the images are also obtained as the output in stage 1. On doing an evaluation of the image-objects extracted with respect to the ground truth data, Data_1 consists of 68 image-objects, and Data_2 consists of 146 image-objects. Thus there are some missing image-objects when the PMIO method is applied, amounting to 0.09% in Data_1 and 0.39% in Data_2. The higher error rate in Data_2 is accounted for the following two reasons (a) Data_2 is a highly dense data set and consists of overlapping objects (b) Data_2 consists of different types of image-objects which vary much in size (pointing to the fact that the single threshold value is the cause of 39 objects missed in the mapping).

Image-Objects from the Dataset after PMIO.
In stage 2, the image-objects in all images and the spatial relationship between them (distance) is tensorized. The tensor thus holds the association between image-objects and the distance between them. When the distance between the image-objects are computed, the resolution of the image helps to find the same. The distance value is tensorized only after normalization with respect to the resolution of the image.
After tenesorization, the tensor is decomposed by applying ALS method, into which the minimum and maximum rank of the tensor has to be inputted. The range is chosen from 2 to 24. For each of the dataset, the convergence of the rank happen at different points. For Data_1, the rank of the approximate tensor is 7 and for Data_2, the rank is 11. At these rank values, the decomposed components resulting from factorization is projected to find spatial colocation patterns as per Algorithm 2.
The objective of the proposed framework is to find spatial colocation patterns. The sample patterns mined from the datasets are summarized in the Table 1. The threshold value for spatial dominance is set at 0.5. Following the antimonotone property, the subsets of spatial colocation patterns are also collocated.
Sample Spatial Colocation Patterns Mined
Sample Spatial Colocation Patterns Mined
The number of spatial colocation patterns mined by the proposed system and [13, 14] are compared for the purpose of understanding the significance. The number of image-objects involved in each spatial colocation pattern is chosen as the performance parameter. The comparison is made in terms of number of image-objects involved in mined patterns. It is observed that patterns containing more number of image-objects are being mined by the proposed systems. It is also understood by us that longer patterns are less understandable and hence the threshold value to choose from the decomposed components is fixed to obtain a maximum of eight image-objects in the pattern. Figure 3 shows the number of patterns (indicating the count of image-objects) for Data_1 and Data_2.

Number of SCLP mined vs Number of Image-Objects.
The execution time for the algorithm is also compared with [13] and [14] for finding the computational efficiency and is depicted in Fig. 4. It is to be noted that the time for feature extraction is not taken into account in the comparisons. The number of images being input to the data is taken as a function to find the execution time. The influence on computation time on the size of the input dataset for different algorithms is compared for Data_1 and Data_2. The computation time for SCLP-TF increases as the size of the dataset increases, just like other algorithms. The exponential increase in the computational time stabilizes after a particular feature/image size, attributed to the reason that there exists very few colocation patterns.

Computation time vs Size of Images.
To summarize the discussions on the experiments, the following points are noted. The tensor based model to find spatial colocation patterns results in scalable computation time as compared with other algorithms and exhibits less sensitivity in dense data environments. The colocation patterns yielded from the proposed models contain patterns with more significance in terms of containment of the number of image-objects. The tensor modeling supports the image data without the need of conversion to transaction type data.
In this work, a spatial colocation pattern mining framework is proposed. The framework first performs a pixel mapping of the classified image to image-objects and their corresponding locations of the images. The image-objects and their positions are tensorized to stack the objects and their spatial relationship in a 3-order tensor. The tensorized data is decomposed to obtain the association between the image-objects in terms of the spatial colocation relationship existing between them. The significant collocated patterns are identified with the aid of the spatial dominance factor from the decomposed component of the tensor. On analysis of the spatial colocation patterns, it is observed that patterns containing more than 3 image-objects are obtained from the proposed system and the computation time associated with the proposed system also is at par with the existing system. Thus the proposed work attains the objective to mine spatial colocation patterns consisting of all kinds of image-objects.
Similarly, the tensor model can be used to define different spatial relationships and find patterns accordingly. In our future research, we propose to extend the tensor factorization methodology to obtain spatiotemporal colocation patterns, where the temporal relation between image-objects is the decisive factor instead of the spatial relationship. A temporal analysis of the tensor will help to discover patterns, predict evolutions and find anomalies.
Footnotes
Acknowledgements
The authors acknowledge the computing facilities built under projects funded by UGC-RUSA and DST-PURSE for this work, in the Department of Computer Science, Cochin University of Science and Technology.
