Improving recommendation lists through topic diversification In this work we present topic diversification, a novel method designed to balance and diversify personalized recommendation lists in order to reflect the user's complete spectrum of interests. Though being detrimental to average accuracy, we show that our method improves user satisfaction with recommendation lists, in particular for lists generated using the common item-based collaborative filtering algorithm.Our work builds upon prior research on recommender systems, looking at properties of recommendation lists as entities in their own right rather than specifically focusing on the accuracy of individual recommendations. We introduce the intra-list similarity metric to assess the topical diversity of recommendation lists and the topic diversification approach for decreasing the intra-list similarity. We evaluate our method using book recommendation data, including offline analysis on 361, 349 ratings and an online study involving more than 2, 100 subjects. Recommender systems [23] intend to provide people with recommendations of products they will appreciate, based on their past preferences, history of purchase, and demographic information. Many of the most successful systems make use of collaborative filtering [27, 8, 11] , and numerous commercial systems, e.g., Amazon.com's recommender [16] , exploit these techniques to offer personalized recommendation lists to their customers.. Though the accuracy of state-of-the-art collaborative filtering systems, i.e., the probability that the active user 1 will appreciate the products recommended, is excellent, some implications affecting user satisfaction have been observed in practice. Thus, on Amazon.com (http://www.amazon.com), many recommendations seem to be "similar" with respect to content. For instance, customers that have purchased many of Hermann Hesse's prose may happen to obtain recommendation lists where all top-5 entries contain books by that respective author only. When considering pure accuracy, all these recommendations appear excellent since the active user clearly appreciates books written by Hermann Hesse. On the other hand, assuming that the active user has several interests other than Hermann Hesse, e.g., historical novels in general and books about world travel, the recommended set of items appears poor, owing to its lack of diversity.. Traditionally, recommender system projects have focused on optimizing accuracy using metrics such as precision/recall or mean absolute error. Now research has reached the point where going beyond pure accuracy and toward real user experience becomes indispensable for further advances [10] .. This work looks specifically at impacts of recommendation lists, regarding them as entities in their own right rather than mere aggregations of single and independent suggestions. We presented topic diversification, an algorithmic framework to increase the diversity of a top-N list of recommended products. In order to show its efficiency in diversifying, we also introduced our new intra-list similarity metric.. Contrasting precision and recall metrics, computed both for user-based and item-based CF and featuring different levels of diversification, with results obtained from a largescale user survey, we showed that the user's overall liking of recommendation lists goes beyond accuracy and involves other factors, e.g., the users' perceived list diversity. We were thus able to provide empirical evidence that lists are more than mere aggregations of single recommendations, but bear an intrinsic, added value.. Though effects of diversification were largely marginal on user-based CF, item-based CF performance improved significantly, an indication that there are some behavioral differences between both CF classes. Moreover, while pure itembased CF appeared slightly inferior to pure user-based CF in overall satisfaction, diversifying item-based CF with factors ΘF ∈ [0.3, 0.4] made item-based CF outperform user-based CF. Interestingly for ΘF ≤ 0.4, no more than three items tend to change with respect to the original list, shown in Figure 3 . Small changes thus have high impact.. We believe our findings especially valuable for practical application scenarios, since many commercial recommender systems, e.g., Amazon.com [16] and TiVo [1] , are item-based, owing to the algorithm's computational efficiency. Possible future directions branching out from our current state of research on topic diversification are rife.. First, we would like to study the impact of topic diversification when dealing with application domains other than books, e.g., movies, CDs, and so forth. Results obtained may differ, owing to distinct characteristics concerning the structure of genre classification inherent to these domains. For instance, Amazon.com's classification taxonomy for books is more deeply nested, though smaller, than its movie counterpart [34] . Bear in mind that the structure of these taxonomies severely affects the taxonomy-based similarity measure c * , which lies at the very heart of the topic diversification method.. Another interesting path to follow would be to parameterize the diversification framework with several different similarity metrics, either content-based or CF-based, hence superseding the taxonomy-based c * . We strongly believe that our topic diversification approach bears particularly high relevance for recommender systems involving sequential consumption of list items. For instance, think of personalized Internet radio stations, e.g., Yahoo's Launch (http://launch.yahoo.com): community members are provided with playlists, computed according to their own taste, which are sequentially processed and consumed. Controlling the right mix of items within these lists becomes vital and even more important than for mere "random-access" recommendation lists, e.g., book or movie lists. Suppose such an Internet radio station playing five Sisters of Mercy songs in a row. Though the active user may actually like the respective band, he may not want all five songs played in sequence. Lack of diversion might thus result in the user leaving the system.. The problem of finding the right mix for sequential consumption-based recommenders takes us to another future direction worth exploring, namely individually adjusting the right level of diversification versus accuracy tradeoff. One approach could be to have the user himself define the degree of diversification he likes. Another approach might involve learning the right parameter from the user's behavior, e.g., by observing which recommended items he inspects and devotes more time to, etc.. Finally, we are also thinking about diversity metrics other than intra-list similarity. For instance, we envision a metric that measures the extent to which the top-N list actually reflects the user's profile. Few efforts have addressed the problem of making top-N lists more diverse. Only considering literature on collaborative filtering and recommender systems in general, none have been presented before, to the best of our knowledge.. However, some work related to our topic diversification approach can be found in information retrieval, specifically meta-search engines. A critical aspect of meta-search engine design is the merging of several top-N lists into one single top-N list. Intuitively, this merged top-N list should reflect the highest quality ranking possible, also known as the "rank aggregation problem" [6] . Most approaches use variations of the "linear combination of score" model (LC), described by Vogt and Cottrell [32] . The LC model effectively resembles our scheme for merging the original, accuracy-based ranking with the current dissimilarity ranking, but is more general and does not address the diversity issue. Fagin et al. [7] propose metrics for measuring the distance between top-N lists, i.e., inter-list similarity metrics, in order to evaluate the quality of merged ranks. Oztekin et al. [21] extend the linear combination approach by proposing rank combination models that also incorporate content-based features in order to identify the most relevant topics.. More related to our idea of creating lists that represent the whole plethora of the user's topic interests, Kummamuru et al. [15] present their clustering scheme that groups search results into clusters of related topics. The user can then conveniently browse topic folders relevant to his search interest. The commercially available search engine Northern Light (http://www.northernlight.com) incorporates similar functionalities. Google (http://www.google.com) uses several mechanisms to suppress top-N items too similar in content, showing them only upon the user's explicit request. Unfortunately, no publications on that matter are available.

O B O O O B O O O O O O B O O B O O O O O O B O O B O O O O O O O O O O O O O B O O O O B O B I O B O O O O O O O O O O B I O O O O O B O B I O O O O B O O O O O O O O O O O O O B O O O O O O O B O O O O O B O B O O O O B O O O O O B O O O B O O B B O O B O O O O O O B O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O B O O O O O O B O O B I O O O O O O O B O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O B O O O O O O O O B O O O O O O O O B O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O B O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O B O O O O O O B O O O O O O O O O B O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B B O O O O O O O O O O B O O O O B B O O O O O O O O O O O O O O O O O B O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B B O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O B I O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O B B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


An EM algorithm for wavelet-based image restoration Abstract-This paper introduces an expectation-maximization (EM) algorithm for image restoration (deconvolution) based on a penalized likelihood formulated in the wavelet domain. Regularization is achieved by promoting a reconstruction with low-complexity, expressed in the wavelet coefficients, taking advantage of the well known sparsity of wavelet representations. Previous works have investigated wavelet-based restoration but, except for certain special cases, the resulting criteria are solved approximately or require demanding optimization methods. The EM algorithm herein proposed combines the efficient image representation offered by the discrete wavelet transform (DWT) with the diagonalization of the convolution operator obtained in the Fourier domain. Thus, it is a general-purpose approach to wavelet-based image restoration with computational complexity comparable to that of standard wavelet denoising schemes or of frequency domain deconvolution methods. The algorithm alternates between an E-step based on the fast Fourier transform (FFT) and a DWT-based M-step, resulting in an efficient iterative process requiring ( log ) operations per iteration. The convergence behavior of the algorithm is investigated, and it is shown that under mild conditions the algorithm converges to a globally optimal restoration. Moreover, our new approach performs competitively with, in some cases better than, the best existing methods in benchmark tests. W AVELET-BASED methods had a strong impact on the field of image processing, especially in coding and denoising. Their success is due the fact that the wavelet transforms of images tend to be sparse (i.e., many coefficients are close to zero). This implies that image approximations based on a small subset of wavelets are typically very accurate, which is a key to wavelet-based compression. The good performance of wavelet-based denoising is also intimately related to the approximation capabilities of wavelets. Thus, the conventional wisdom is that wavelet representations that provide good approximations will also perform well in estimation problems [23] . Image deconvolution is more challenging than denoising. This is a classic, well-studied image processing task [1] , but applying wavelets has proved to be a nontrivial problem. Deconvolution is most easily dealt with (at least computationally) in the Fourier domain. However, image modeling (thus denoising) is best handled in the wavelet domain; here lies the problem. Convolution operators are generally quite difficult to represent in the wavelet domain, unlike the simple diagonalization obtained in the Fourier domain. This suggests the possibility of combining Fourier-based deconvolution with wavelet-based denoising, and several ad hoc proposals exploiting this combination have appeared in the literature.. In this paper we formally develop an image deconvolution algorithm based on a maximum penalized likelihood estimator (MPLE). The MPLE cannot be obtained in closed-form, and so we propose an expectation-maximization (EM) algorithm to numerically compute it. The result is an iterative deconvolution algorithm which alternates between the Fourier and wavelet domains. We compare our method with the state-of-the-art in benchmark problems, showing that it performs competitively, sometimes better, in terms of SNR improvement. In wavelet-based estimation, the image is re-expressed in terms of an orthogonal wavelet expansion, which typically provides a very sparse representation (a few large coefficients and many very small ones) [23] . Let denote the (inverse) discrete wavelet transform (DWT) and let us write , where is the vector of wavelet coefficients [23] . As above, let us consider an MPLE/MAP criterion, expressed in terms of , the wavelet coefficients of the original image, that is, taking the likelihood function to be . Considering some penalty emphasizing sparsity of the DWT coefficients, the MPLE/MAP estimate is given by. The penalty function can be interpreted as minus the logarithm of some (non-Gaussian, sparseness-inducing) prior [26] , , as a complexity-based penalty [27] , or as a regularization term [2] .. When , that is, for direct denoising problems, waveletbased methods are extremely efficient, thanks to the fast implementations of the DWT and to the orthogonality of (that is, ) which allows solving (8) using a coefficient-wise denoising rule; moreover, these methods achieve state-of-the-art performance (see [14] , [23] , [25] , [26] and references therein). The very good performance of wavelet-based denoising can be traced back to the adequacy of the underlying priors/models of real world images.. Although wavelets have also been shown to be effective in image restoration problems (see [3] , [4] , [8] , [9] , [17] , [18] , [22] , [28] , [29] , [33] , and [34] ), major difficulties arise. • unlike alone, is not block-circulant, thus it is not diagonalized by the DFT; • unlike alone, is not orthogonal, thus precluding efficient coefficient-wise rules. This paper proposed a wavelet-based MPLE/MAP criterion for image deconvolution. The estimate must be computed numerically, and we derived an EM algorithm for this purpose, leading to a simple procedure that alternate between Fourier domain filtering and wavelet domain denoising. We have also proposed extensions of the algorithm which perform shiftinvariance restoration. Experimentally, our approach performs competitively with two of the best existing methods.

O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Lines pinning lines A line is a transversal to a family F of convex polytopes in R 3 if it intersects every member of F. If, in addition, is an isolated point of the space of line transversals to F, we say that F is a pinning of . We show that any minimal pinning of a line by polytopes in R 3 such that no face of a polytope is coplanar with the line has size at most eight. If in addition the polytopes are pairwise disjoint, then it has size at most six. A line transversal to a family F of disjoint compact convex objects is a line that meets every object of the family. Starting with the classic work of Grünbaum, Hadwiger, and Danzer in the 1950's, geometric transversal theory studies properties of line transversals and conditions for their existence. There is a sizable body of literature on line transversals in two dimensions. Of particular interest are so-called "Helly-type" theorems, such as the following theorem already conjectured by Grünbaum in 1958, but proven in this form by Tverberg only in 1989: If F is a family of at least five disjoint translates of a compact convex figure in the plane such that every subfamily of size five has a line transversal, then F has a line transversal. More background on geometric transversal theory can be found in the classic survey of Danzer et al. [4] , or in the more recent ones by Goodman et al. [6] , Eckhoff [5] , Wenger [15] , or Holmsen [8] .. Much less is known about line transversals in three dimensions. Cheong et al. [3] showed a Helly-type theorem for pairwise disjoint congruent Euclidean balls, Borcea et al. [2] generalized this to families of arbitrary disjoint balls (with an additional ordering condition). On the other hand, Holmsen and Matoušek [9] proved that no such theorem can exist for convex polytopes: For every n > 2 they construct a convex polytope K and a family F of n disjoint translates of K such that F has no line transversal, but F {F } has a transversal for every F ∈ F.. If a line transversal to a family F cannot move without missing some F ∈ F, then we call the line pinned by F. Here we consider small continuous movements of in the vicinity of its current position. (We obviously exclude a translation of parallel to itself, which moves the points on the line but does not change the line as a whole.) In other words, is pinned if is an isolated point in the space of line transversals to F. We will define an appropriate space L of lines in Section 2.. The line shown on the left is pinned by the three convex figures. Whenever a family F of convex objects in the plane pins a line , there are three objects in F that already pin ; this fact was already used by Hadwiger [7] . Or, put differently, any minimal pinning of a line by convex figures in the plane is of size three. Here, a minimal pinning is a family F pinning a line such that no proper subset of F pins . The Helly-type theorems for balls in three dimensions are based on a similar result: any minimal pinning of a line by pairwise disjoint balls in R 3 has size at most five [2] .. In this paper we prove the analogous result for convex polytopes, with a restriction: Theorem 1. Any minimal pinning of a line by possibly intersecting convex polytopes in R 3 , no facet of which is coplanar with the line, has size at most eight. The number reduces to six if the polytopes are pairwise disjoint.. In the light of the construction by Holmsen and Matoušek, which shows that there can be no Helly-type theorem for line transversals to convex polytopes, Theorem 1 is perhaps surprising. Any Helly-type theorem can be considered as a guarantee for the existence of a small certificate: Tverberg's theorem, for instance, says that whenever a family of translates in the plane does not admit a line transversal, we can certify this fact by exhibiting only five objects from the family that already do not admit a line transversal. (This interpretation of Helly-type theorems is the basis for their relation to LP-type problems [1] .) Holmsen and Matoušek's construction, on the other hand, shows that there are families F of translates of a convex polytope that do not admit a line transversal, but such that it is impossible to certify this fact by a small subfamily of F. Now, Theorem 1 can be interpreted as follows: Whenever there is a family F of convex polytopes and a line (with the non-coplanarity restriction) such that there is a neighborhood of that contains no other line transversal to F, then there is a subfamily G ⊂ F of size at most eight that admits no other line transversal in a neighborhood of . So, while the absence of a line transversal globally cannot be witnessed by a small certificate, locally this is the case.. 0 e e Consider a family F of convex polytopes pinning a line 0 . A polytope whose interior intersects 0 cannot contribute to a minimal pinning, so we can assume that each element of F is tangent to 0 . The simplest case is when 0 intersects a polytope F in a single point interior to an edge e of F (see the figure on the left). In that case, the condition that a line near 0 intersects F is characterized by the "side" (a notion we formalize in Section 2) on which passes the oriented line e supporting the edge e. Since pinning is a local property, it follows that we can ignore the polytopes that constitute the family F, and speak only about the lines supporting their relevant edges. We say that a family F of oriented lines in R 3 pins a line 0 if there is a neighborhood of 0 such that for any oriented line = 0 in this neighborhood, passes on the left side of some line in F. We will prove the following theorem: Theorem 2. Any minimal pinning of a line 0 by lines in R 3 has size at most eight. If no two of the lines are simultaneously coplanar and concurrent with 0 , then it has size at most six.. We will actually give a full characterization of families of lines that minimally pin a line 0 when either all lines are orthogonal to 0 , or when they do not contain pairs of lines that are at the same time concurrent and coplanar with 0 .. When 0 lies in the plane of a facet of a polytope, the condition that a line close to 0 intersects the polytope becomes a disjunction of two sidedness constraints with respect to lines. Thus it cannot be handled by the methods of Theorem 2. In fact, the non-coplanarity condition is necessary: We describe a construction that shows that no pinning theorem holds for collections of polytopes when they are allowed both to intersect each other and to touch the line in more than just a single point: Theorem 3. There exist arbitrarily large minimal pinnings of a line by convex polytopes in R 3 .. We do not know if the condition that the convex polytopes be pairwise disjoint is sufficient to guarantee a bounded minimal pinning number. In fact, we are not aware of any construction of a minimal pinning by pairwise disjoint convex objects in R 3 of size larger than six.. Pinning is related to the concept of grasping used in robotics: an object is immobilized, or grasped, by a collection of contacts if it cannot move without intersecting (the interior of) one of the contacts. The study of objects ("fingers") that immobilize a given object has received considerable attention in the robotics community [10, 11] , and some Helly-type theorems are known for grasping. For instance, Mishra et al.'s work [12] implies Helly-type theorems for objects in two and three dimensions that are grasped by point fingers. We give two examples of how our pinning theorems naturally translate into Helly-type theorems for grasping a line. First, we can interpret a family F of lines pinning a line 0 by considering all lines as solid cylinders of zero radius. Each constraint "cylinder" touches the "cylinder" 0 on the left. As a result, it is impossible to move 0 in any way (except to rotate it around or translate it along its own axis), because it would then intersect one of the constraints, so 0 is grasped by F. Second, consider a family F = {P 1 , . . . , P n } of polytopes such that P i is tangent to 0 in a single point interior to an edge e i , and letP i denote the mirror image of P i with respect to the plane spanned by 0 and e i . Since F pins 0 if and only ifF grasps it, our pinning theorems directly translate into Helly-type theorems for grasping a line by polytopes.. Outline of the paper. Our main technical contributions are our pinning theorem for lines (Theorem 2), a construction of arbitrarily large minimal pinnings of a line by overlapping polytopes with facets coplanar with the line (Theorem 3), and a classification of minimal pinnings of a line by lines (Theorems 6 and 7). Sections 2 and 3 are devoted to the proof of the general case of Theorem 2. The idea of the proof is the following. We consider a parameterization of the space of lines by a quadric M ⊂ R 5 , where a fixed line 0 is represented by the origin 0 ∈ R 5 , and the set of lines passing on one side of a given line g is recast as the intersection of M with a halfspaceŪ g . This associates with a family F of lines a polyhedral cone C; C represents all lines not passing on the left side of some element of F. Then F pins 0 if and only if the origin 0 is an isolated point of C ∩ M. We give a characterization of the cones C such that the origin is isolated in C ∩ M in terms of the trace of C on the hyperplane tangent to M in the origin; this is our Isolation Lemma (Lemma 3). The Isolation Lemma allows us to analyze the geometry of the intersection C ∩ M when F is a pinning of 0 , and to find a subfamily of size at most eight that suffices to pin.. The subsequent two sections discuss the various configurations of lines that form minimal pinnings, first for constraints that are perpendicular to the pinned line (Section 4) and then for the general case (Section 5). Theorems 1, 2, and 3 are then proven in Section 6. We have shown that minimal pinnings by convex polytopes have bounded size if the line 0 is not coplanar with a facet of a polytope. It seems that this condition can be slightly relaxed: if 0 intersects a polytope in a vertex v and lies in the plane of a facet incident to v, then one can argue separately in T and T . However, we do not know if the result generalizes any further.. If 0 meets the relative interiors of two different edges of a polytope facet (and is thus coplanar with this facet), then a line near 0 intersects the polytope if and only if it satisfies one of the two line constraints that support the front edge and the back edge of the facet. It follows that the set of lines intersecting the polytope is the union of two "halfspaces." Since this is not a convex shape, our techniques do not seem to apply.. We have shown that intersecting convex polytopes can have minimal pinnings of arbitrary size. We conjecture that pairwise disjoint convex polytopes have bounded pinning number. In fact, as mentioned in the introduction, we are not aware of any construction of a minimal pinning by arbitrary pairwise disjoint compact convex objects of size larger than six.. Lemma 9 is a key lemma. The most difficult case is when E is three-dimensional, and in fact the proof only works because E ∩ M must consist of two intersecting 2-spaces. The proof would not go through if E ∩ M were allowed to be, for example, a circular cone. Perhaps this is an indication that there might be no corresponding result in higher dimensions.. We saw in the introduction that a family of lines pinning a line can be considered as a grasp of that line. In grasping, one often considers form closure, which means that the object is immobilized even with respect to infinitesimally small movements. For instance, an equilateral triangle with a point finger at the midpoint of every edge is immobilized, as it cannot be moved in any way, but it is not in form closure because an infinitesimal rotation around its center is possible. It is easy to see that all grasps listed in Theorem 6 are form closure grasps in this sense. The grasp caused by a 4-pinning, however, is not a form-closure grasp, as 0 can be moved infinitesimally in the quadric defined by three of the lines.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Decoupled software pipelining creates parallelization opportunities Decoupled Software Pipelining (DSWP) is one approach to automatically extract threads from loops. It partitions loops into long-running threads that communicate in a pipelined manner via inter-core queues. This work recognizes that DSWP can also be an enabling transformation for other loop parallelization techniques. This use of DSWP, called DSWP+, splits a loop into new loops with dependence patterns amenable to parallelization using techniques that were originally either inapplicable or poorly-performing. By parallelizing each stage of the DSWP+ pipeline using (potentially) different techniques, not only is the benefit of DSWP increased, but the applicability and performance of other parallelization techniques are enhanced. This paper evaluates DSWP+ as an enabling framework for other transformations by applying it in conjunction with DOALL, LO-CALWRITE, and SpecDOALL to individual stages of the pipeline. This paper demonstrates significant performance gains on a commodity 8-core multicore machine running a variety of codes transformed with DSWP+. Chip manufacturers have shifted to multicore processors to harness the raw transistor count that Moore's Law continues to provide. Unfortunately, putting multiple cores on a chip Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. CGO'10, April 24-28, 2010 , Toronto, Ontario, Canada. Copyright c 2010 ACM 978-1-60558-635-9/10/04...$10.00. does not directly translate into performance. The trend toward simpler cores and the increasing disparity between the growth rates of core count and off-chip bandwidth means performance may even degrade. Not only do sequential codes suffer, multi-threaded programs may too deteriorate due to smaller caches per core and lower single-threaded performance. Consequently, producing well-formulated, scalable parallel code for multicore is the biggest challenge facing the industry.. Concurrency and non-determinism pose fundamental problems for programmers looking to (re-)write parallel code, as is evident in active research in automatic tools for the identification of deadlocks, livelocks, and race conditions. Conceptually, tools to automatically identify and extract parallelism appear more attractive. Until recently, success in automatic loop parallelization was restricted to the scientific domain. If all the iterations of a loop can be executed concurrently, then the DOALL transformation can be applied to extract the parallelism [1] . If there are interiteration (or loop-carried) dependences in the loop, then techniques such as DOACROSS and DOPIPE may be applicable [4, 6] . The applicability of these techniques is generally limited to codes with regular, array-based memory access patterns, and regular control flow, hence their success in scientific codes.. Unfortunately, the vast majority of general-purpose applications have irregular control flow and complex memory access patterns using pointers. To parallelize such codes, Decoupled Software Pipelining (DSWP) was proposed [15] . An automatic parallelization technique, DSWP splits the loop body into several stages distributed across multiple threads, and executes them in a pipeline. To generate the pipeline organization, DSWP segregates dependence recurrences into separate stages. Compared to DOALL, DSWP enjoys wider applicability. Compared to DOACROSS, DSWP enjoys better performance characteristics. By keeping critical path dependences thread-local, DSWP is tolerant of long communication latencies between threads. By decoupling the execution of the threads using inter-core queues, DSWP is also tolerant of variable latency within each thread. This paper looks beyond the performance benefits of DSWP, and explores DSWP as an enabling transformation for various loop parallelization techniques. At its core, DSWP identifies dependence cycles within a loop and isolates said cycles in stages of a pipeline. As a result, the dependence patterns of each stage tend to be much simpler. A key insight of this work is that other parallelization techniques may often be applied or applied more effectively to these simplified stages but cannot be applied to the original code.. This paper introduces DSWP+, an enabling transformation for other loop parallelization techniques, and evaluates DSWP+ in conjunction with several techniques such as DOALL, LOCALWRITE, and SpecDOALL [1, 10, 17] . Unlike DSWP, which tries to maximize performance by balancing the stages of the pipeline, DSWP+ tries to assign work to stages so that they can be further parallelized by other techniques. After partitioning, DSWP+ allocates enough threads to the parallelizable stages to create a balanced pipeline. DSWP+ yields more performance than DSWP and other parallelization techniques when applied separately. This paper shows how DSWP+ code partitioning can mitigate problems inherent to some parallelization techniques, such as redundant computation in LOCALWRITE.. Through manual parallelization of a variety of application loops, this paper demonstrates significant performance gains on existing multicore hardware. By virtue of its use of fully automatic techniques, the proposed methodology can be made fully automatic in future work.. Section 2 provides a detailed background of the DSWP transformation and then illustrates how DSWP+ uses it to create other parallelization opportunities. Section 3 discusses how various parallelization techniques are chosen and integrated with DSWP+. Section 4 provides results of experiments and analyzes factors that affect performance. Section 5 discusses related work, while Section 6 concludes the paper. This paper introduces the idea that DSWP is an enabling transformation that creates opportunities for various parallelization techniques to become applicable and wellperforming. By splitting up a loop with complex dependence patterns into new loops each with a dependence pattern amenable to other parallelization techniques, DSWP uncovers opportunities to extract scalable parallelism from apparently sequential code. This paper describes in detail the code transformations that occur when DSWP+ is applied in conjunction with DOALL, LOCALWRITE, and SpecDOALL. Since it leverages automatic compiler techniques, the proposed parallelization framework can be automated in future work. An evaluation of DSWP+ on a set of codes with complex dependence patterns yielded a geomean speedup of 3.69x on up to 8 threads. This surpasses the geomean speedups of DSWP (1.16x) or other parallel optimizations (1.81x) acting on their own. In Figure 9 , each bar represents the best performance of a technique on up to 8 threads. For each benchmark, the first bar indicates the speedup obtained with whichever of DOALL, LOCALWRITE, and SpecDOALL is applicable. If the parallel optimization (PAR OPT I) is not applicable to the unmodified code, then the speedup is shown as 1x. The second bar indicates the speedup with DSWP which tries to balance the work done by each stage. The third bar indicates the speedup with DSWP+; recall that DSWP+ creates unbalanced stages with the intent to parallelize the larger ones. By itself, the speedup with DSWP+ is worse than with DSWP. However, applying DSWP+ with one or more of DOALL, LOCALWRITE, and SpecDOALL results in significantly greater performance as indicated by the fourth bar. Table 2 . Benchmark details The C code example in Figure 1 (a) illustrates that in many applications' loops, the dependence pattern renders conventional parallelization techniques either inapplicable or poorly-performing. In the example, a program traverses a linked-list list (statements A and D); the data in each node of the list indexes into an array arr in order to calculate the index (statement B), and updates the density array at index (statement C). By applying DSWP+ to this loop, the very techniques that were originally inappropriate can become applicable and well-performing. For illustrative purposes, assume that statement B accounts for 50%, statement C accounts for 37.5%, and statements A and D account for 12.5% of the total execution time of the loop.. Figure 1(b) shows the Program Dependence Graph (PDG) of the loop [7] . There are many inter-iteration dependences. The inter-iteration self-dependence in statement C arises because the index may not always be different on different iterations. It depends on the data inside each node, the contents of array arr, and the calc function.. Inter-iteration dependences prevent executing each iteration of the loop independently (as in DOALL) without costly synchronization. DOACROSS schedules entire loop iterations on different threads, while synchronizing dependences to maintain correctness. Although DOACROSS is applicable, the large amount of synchronization will severely limit the benefits of parallelization. DOACROSS communicates dependence recurrences (cycles in the PDG) from core to core, putting inter-core communication latency on the critical path [22] .. Thread-Level Speculation (TLS) may speculatively remove dependences that prevent DOALL or DOACROSS from being applicable [14, 17, 20, 24] . In the example shown, speculating all loop-carried dependences to make DOALL applicable could cause excessive misspeculation since the linked-list traversal dependence manifests on every loop iteration. A better option is to synchronize these dependences as in DOACROSS and speculate only the inputdependent self-dependence in statement C. However, the problem of inter-core communication latency on the critical path persists.. In contrast to DOALL and DOACROSS which partition the iteration space across threads, DSWP partitions the loop body into stages of a pipeline, with each stage executing within a thread. DSWP's pipeline organization keeps dependence recurrences local to a thread, avoiding communication latency on the critical path. DSWP operates in four steps [15] .. • First, DSWP builds the PDG of the loop [1] . The program dependence graph contains all data (both register and memory) and control dependences, both intra-and interiteration. Figure 1(b) shows the PDG for the loop in Figure 1 (a).. • Second, DSWP finds the loop recurrences, instructions participating in a dependence cycle. DSWP groups dependence cycles into strongly-connected components (SCCs) that form an acyclic graph. Figure 1(c) shows the DAG SCC . Each node in the DAG SCC is a single SCC. These SCCs form the minimum scheduling units so that there are no cross-thread cyclic dependences.. • Third, DSWP allocates each SCC to a thread. Since the slowest stage in the pipeline limits overall performance, DSWP tries to balance the load on each stage when assigning SCCs to threads. This partitioning operation is shown using horizontal lines in Figure 1 (c).. • Finally, DSWP inserts produce and consume operations to transmit data values in case of data dependences and branch conditions for control dependences.. While DSWP often provides noticeable performance improvement, it is limited by the number and size of the SCCs. DSWP extracts at most one thread per SCC. Further, the pipelined organization means that the throughput is limited by the slowest stage (Speedup = 1/T slowest stage ). In the example loop, DSWP performance is limited to 2.0x (= 1/T Stage 2 ). However, as Figure 1 While there may be dependences inside calc that are carried across an inner loop, note that B does not contain any loop-carried dependences across the loop being parallelized. Consequently, DOALL may be applied to the second stage which can now be replicated across multiple threads. Stage 1 distributes the values it produces in a round-robin fashion across iterations to the multiple Stage 2 threads. By extracting a new loop with no loop-carried dependences out of the original, DSWP+ makes DOALL applicable.. After the DSWP+DOALL transformation, the obtainable speedup is limited to 2.67x (= 1/T Stage 3 ). The selfdependence in statement C inhibits parallelization. Since the index depends on the contents of array arr, node->data, and the calc function, it is not guaranteed to be different on different iterations; in other words, the manifestation of the dependence from statement C in one iteration to another is input-dependent. Consequently, the compiler must conservatively insert a loop-carried dependence in the PDG preventing DOALL from being applicable. However, a technique known as LOCALWRITE can be applied [10] . LOCALWRITE partitions the array into blocks and assigns ownership of each block to a different thread. Each thread only updates the array elements belonging to its block. Figure 2 shows the code for each thread: updates to the array are guarded by ownership checks. While LOCALWRITE is applicable to the original loop in Figure 1 (a), it will perform poorly due to the problem of redundant computation (see Section 4.2.2 for details).. An alternative parallelization of Stage 3 is possible. Speculation can be used to remove the loop-carried dependence from statement C to itself. Hardware or software TLS memory systems can be used to detect whether the dependence manifests; if it does, then the violating iteration(s) will be rolled back and re-executed [14, 17, 20, 23] . Blindly speculating all loop-carried dependences in the original loop will cause excessive misspeculation because other loop-carried dependences (self-dependence in statement D) manifest on every iteration. The overhead of misspeculation recovery negates any benefits of parallelization. By separating out the problematic dependences, DSWP+ creates a loop with dependences that can be speculated with a much higher degree of confidence, thus getting good performance.. In summary, the example shows that DSWP+ can transform a loop with an unworkable dependence pattern into multiple loops each of which can be parallelized in (potentially) different ways using the very techniques that failed on the original loop. The following section describes the integration of specific loop parallelization techniques with DSWP+. Many techniques have been proposed to extract threadlevel parallelism from scientific and general-purpose applications. This paper integrates many of these techniques such as DOALL, LOCALWRITE, and SpecDOALL with DSWP [1, 10, 15] . Data Write Affinity with Loop Index Prefetching (DWA-LIP) is an optimization based on LOCALWRITE [9] . Like DSWP+LOCALWRITE, DWA-LIP also eliminates redundant computation in LOCALWRITE. It does this by prefetching loop indices, but since DWA-LIP takes the whole iteration as a parallel unit, it misses parallelism in loops that contain multiple array element updates. DSWP+LOCALWRITE can split the updates across multiple stages and provide more scalable and finer-grained parallelization.. Parallel Stage DSWP (PS-DSWP) is an automatic parallelization technique proposed by Raman et al. to improve the scalability of DSWP by applying DOALL to some stages of the DSWP pipeline [16] . DSWP+ derives its insight from this extension, and generalizes PS-DSWP by creating pipeline stages optimized for arbitrary parallelization techniques. The code transformation done by DSWP+DOALL is the same as PS-DSWP. By applying techniques like LOCALWRITE and SpecDOALL to stages with loop-carried dependences, DSWP+ can extract more parallelism than PS-DSWP.. Loop distribution isolates parts of a loop with loopcarried dependences from the the parts without these dependences [11] . Like PS-DSWP, loop distribution is used to extract a loop to which DOALL can be applied. The technique proposed in [23] is the speculative counterpart of loop distribution + DOALL, and targets loops that are almost DOALL. Other techniques such as LRPD, R-LRPD, and master/slave speculative parallelization have also been proposed to parallelize loops [5, 17, 24] . In contrast to these approaches, DSWP+ not only extracts the parts without loop-carried dependences, but also extracts parts with dependence patterns that are amenable to parallelization techniques other than (speculative) DOALL. This significantly improves both applicability and performance scalability. While loop distribution executes the sequential part of the loop followed by the parallel part, DSWP+ overlaps the execution of different parts of the original loop through pipeline parallelism.

O O O O B O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B I O O O B O O O O B O B O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O B O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O B O O B I O O O B O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O B O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O B O O B O O O O O O O O B O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O B O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B I O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O B O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O B O O O O O O O O O O O B O O O O O O O O B O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O


A Cognitive Fault Diagnosis System for Distributed Sensor Networks This paper introduces a novel cognitive fault diagnosis system (FDS) for distributed sensor networks that takes advantage of spatial and temporal relationships among sensors. The proposed FDS relies on a suitable functional graph representation of the network and a two-layer hierarchical architecture designed to promptly detect and isolate faults. The lower processing layer exploits a novel change detection test (CDT) based on hidden Markov models (HMMs) configured to detect variations in the relationships between couples of sensors. HMMs work in the parameter space of linear time-invariant dynamic systems, approximating, over time, the relationship between two sensors; changes in the approximating model are detected by inspecting the HMM likelihood. Information provided by the CDT layer is then passed to the cognitive one, which, by exploiting the graph representation of the network, aggregates information to discriminate among faults, changes in the environment, and false positives induced by the model bias of the HMMs. This paper introduced a cognitive FDS with novelties in 1) the design of a graph-based representation of the spatial/temporal relationships among measurements in a sensor network, and 2) a two-level hierarchical FDS exploiting such temporal and spatial relationships. The lower level of the FDS relies on a HMM CDT to promptly detect changes in a relationship between two measurement datastreams, while the upper level exploits the graph-based functional representation of the network to discriminate among faults, changes in the environment, and false positives induced by model bias. The effectiveness of the proposed solution was evaluated on both synthetic and real datasets.. The FDS that was presented here with the detection and isolation phases can be extended to consider also the identification and accommodation phases.. In fact, a set of HMMs can be trained to identify the occurrence of a fault belonging to a priori available fault dictionary. Once detected and verified by the upper level, the FDS could select the fault from the fault dictionary associated with the HMM showing the largest likelihood value.. The accommodation phase aims at reducing the effects of a change and adapting the system to the new working conditions. In case of faults, the affected sensor is removed from the reduced dependency graph and, possibly, substituted with its virtual representation (by exploiting the temporal and spatial redundancies with the other sensors). In case of changes in the environment, the whole network representation (i.e., the reduced dependency graph and the HMMs) becomes obsolete and must be retrained from up-to-date data, thus making the FDS adaptive over time. In case of fault detection induced by model bias, the corresponding HMM CDT could be trained on a larger dataset.

O O B I O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


An expert system for detecting automobile insurance fraud using social network analysis The article proposes an expert system for detection, and subsequent investigation, of groups of collaborating automobile insurance fraudsters. The system is described and examined in great detail, several technical difficulties in detecting fraud are also considered, for it to be applicable in practice. Opposed to many other approaches, the system uses networks for representation of data. Networks are the most natural representation of such a relational domain, allowing formulation and analysis of complex relations between entities. Fraudulent entities are found by employing a novel assessment algorithm, Iterative Assessment Algorithm (IAA), also presented in the article. Besides intrinsic attributes of entities, the algorithm explores also the relations between entities. The prototype was evaluated and rigorously analyzed on real world data. Results show that automobile insurance fraud can be efficiently detected with the proposed system and that appropriate data representation is vital. Fraud is encountered in a variety of domains. It comes in all different shapes and sizes, from traditional fraud, e.g. (simple) tax cheating, to more sophisticated, where entire groups of individuals are collaborating in order to commit fraud. Such groups can be found in the automobile insurance domain.. Here fraudsters stage traffic accidents and issue fake insurance claims to gain (unjustified) funds from their general or vehicle insurance. There are also cases where an accident has never occurred, and the vehicles have only been placed onto the road. Still, the majority of such fraud is not planned (opportunistic fraud) -an individual only seizes the opportunity arising from the accident and issues exaggerated insurance claims or claims for past damages.. Staged accidents have several common characteristics. They occur in late hours and non-urban areas in order to reduce the probability of witnesses. Drivers are usually younger males, there are many passengers in the vehicles, but never children or elders. The police is always called to the scene to make the subsequent acquisition of means easier. It is also not uncommon that all of the participants have multiple (serious) injuries, when there is almost no damage on the vehicles. Many other suspicious characteristics exist, not mentioned here.. The insurance companies place the most interest in organized groups of fraudsters consisting of drivers, chiropractors, garage mechanics, lawyers, police officers, insurance workers and others. Such groups represent the majority of revenue leakage.. Most of the analyses agree that approximately 20% of all insurance claims are in some way fraudulent (various resources). But most of these claims go unnoticed, as fraud investigation is usually done by hand by the domain expert or investigator and is only rarely computer supported. Inappropriate representation of data is also common, making the detection of groups of fraudsters extremely difficult. An expert system approach is thus needed. Jensen (1997) has observed several technical difficulties in detecting fraud (various domains). Most hold for (automobile) insurance fraud as well. Firstly, only a small portion of accidents or participants is fraudulent (skewed class distribution) making them extremely difficult to detect. Next, there is a severe lack of labeled data sets as labeling is expensive and time consuming. Besides, due to sensitivity of the domain, there is even a lack of unlabeled data sets. Any approach for detecting such fraud should thus be founded on moderate resources (data sets) in order to be applicable in practice. Fraudsters are very innovative and new types of fraud emerge constantly. Hence, the approach must also be highly adaptable, detecting new types of fraud as soon as they are noticed. Lastly, it holds that fully autonomous detection of automobile insurance fraud is not possible in practice. Final assessment of potential fraud can only be made by the domain expert or investigator, who also determines further actions in resolving it. The approach should also support this investigation process.. dependently for each particular entity, while in our system, the entities are assessed in a way that considers also the relations between them. This is done with appropriate representation of the domain -networks.. Networks are the most natural representation of any relational domain, allowing formulation of complex relations between entities. They also present the main advantage of our system against other approaches that use a standard flat data form. As collaborating fraudsters are usually related to each other in various ways, detection of groups of fraudsters is only possible with appropriate representation of data. Networks also provide clear visualization of the assessment, crucial for the subsequent investigation process.. The system assesses the entities using a novel Iterative Assessment Algorithm (IAA algorithm), presented in this article. No learning from initial labeled data set is done, the system rather allows simple incorporation of the domain knowledge. This makes it applicable in practice and allows detection of new types of fraud as soon as they are encountered. The system can be used with poor data sets, which is often the case in practice. To simulate realistic conditions, the discussion in the article and evaluation with the prototype system relies only on the data and entities found in the police record of the accident (main entities are participant, vehicle, collision 1 , police officer). The article makes an in depth description, evaluation and analysis of the proposed system. We pursue the hypothesis that automobile insurance fraud can be detected with such a system and that proper data representation is vital. Main contributions of our work are: (1) a novel expert system approach for the detection of automobile insurance fraud with networks; (2) a benchmarking study, as no expert system approach for detection of groups of automobile insurance fraudsters has yet been reported (to our knowledge); (3) an algorithm for assessment of entities in a relational domain, demanding no labeled data set (IAA algorithm); and (4) a framework for detection of groups of fraudsters with networks (applicable in other relational domains).. The rest of the article is organized as follows. In section 2 we discuss related work and emphasize weaknesses of other proposed approaches. Section 3 presents formal grounds of (social) networks. Next, in section 4, we introduce the proposed expert system for detecting automobile insurance fraud. The prototype system was evaluated and rigorously analyzed on real world data, description of the data set and obtained results are given in section 5. Discussion of the results is conducted in section 6, followed by the conclusion in section 7. The article proposes a novel expert system approach for detection of groups of automobile insurance fraudsters with networks. Empirical evaluation shows that such fraud can be efficiently detected using the proposition and, in particular, that proper representation of data is vital. For the system to be applicable in practice, no labeled data set is used. The system rather allows the imputation of domain expert's knowledge, and it can thus be adopted to new types of fraud as soon as they are noticed. The approach can aid the domain investigator to detect and investigate fraud much faster and more efficiently. Moreover, the employed framework is easy to implement and is also applicable for detection (of fraud) in other relational domains.. Future research will be focused on further analyses of different assessment models for IAA algorithm, considering also the nonlinear models. Moreover, the IAA will be altered into an unsupervised algorithm, learning the factors of the model in an unsupervised manner during the actual assessment. The factors would thus not have to be specified by the domain expert. Applications of the system in other domains will also be investigated. Empirical evaluation from the previous section shows that automobile insurance fraud can be detected using the proposition. Moreover, the results suggest that appropriate data representation is vital -even a simple approach over networks can detect a great deal of fraud. The following section discusses the results in greater detail (in the order given).. Almost all of the metrics obtained with PRIDIT analysis and IAA mean bas algorithm, golden standard, are very high (table 3) . Only precision appears low, still this results (only) from the skewed class distribution in the domain. The F1 measure is consequently also a bit lower, else the performance of the system is more than satisfactory. The latter was confirmed by the experts and investigators from a Slovenian insurance company, who were also pleased with the visual representation of the results.. The confusion matrix given in table 4 shows that we correctly classified almost 90% of all fraudsters and over 85% of nonfraudsters. Only 5 fraudsters were not detected by the prototype system. We thus obtained a particularly high recall, which is essential for all fraud detection systems. The majority of unlabeled participants were classified as unsuspicious (not shown in table 4), but the corresponding collisions are mainly isolated and the participants could have been trivially eliminated anyway (for our purposes).. We proceed with discussion of different assessment models (table 5) . Performance of the simplest of the models IAA raw , which uses no domain expert's knowledge, could already prove sufficient in many circumstances. It can still be significantly improved by also considering the factors, set by the domain expert (model IAA bas ). Model IAA mean · further improves the assessment of both (simple) models, confirming the hypothesis behind it (see section 4.3). Although the models (probably incorrectly) assume that the fraudulence of an entity is linear (in the fraudulences of the related entities), they give a good approximation of the fraudulent behavior.. The analysis of the factors used in the models confirms their importance for the final assessment. (table 6) . First, this confirms the hypothesis that domain knowledge can be incorporated into the model using factors (as defined in section 4.3). Second, it shows that better understanding of the domain can improve assignment of factors. Combination of both makes the system extremely flexible, allowing for detection of new types of fraud immediately after they have been noticed by the domain expert or investigator.. As already mentioned, running the IAA algorithm for too long over-fits the model and decreases algorithm's final performance (see Fig. 7, Fig. 8 , note different scales used). Early iterations of the algorithm still increase the performance in all cases analyzed, which proves the importance of iterative assessment as opposed to single-pass approach. However, after some particular number of iterations has been reached, performance decreases (at least slightly). Also note that the decrease is much larger in the case of AM mean raw model than AM mean bas , indicating that the latter is superior to the first. We propose to use this decrease in performance as an additional evaluation of any model used with IAA, or similar, algorithm.. It is preferable to run the algorithm for only a few iterations for one more reason. Networks are often extremely large, especially when they describe many characteristics of entities. In this case, running the algorithm until some fixed point is simply not feasible. Since the prototype system uses only the basic attributes of the entities, the latter does not present a problem.. The number of iterations that achieves the best performance clearly depends on various factors (data set, model, etc.). Our evaluation shows that superior, or at least very good, performance (Fig. 7, Fig. 8 ) can be achieved with the use of a dynamic setting of the number of iterations (equation (28)).. When no detection of fraudulent components is done, the comparison between IAA algorithm and measures of centrality shows no significant difference (table 7) . On the other hand, when we use PRIDIT analysis for fraudulent components detection, the IAA algorithm dominates others. Still, the results obtained with DegCen and EigCen are comparable to those obtained with supervised approaches over flat data. This shows that even a simple approach can detect a reasonably large por-tion of fraud, if appropriate representation of data is used (networks).. The analysis of different approaches for detection of fraudulent components produces no major surprises (table 8) -the best results are obtained using (P)RIDIT analysis. Note that a single indicator can match the performance of majority classifier MA-JOR, confirming its naiveness (see section 4.2); exceptionally high AUC score obtained by MAJOR, prior to no fraudulent entities detection, only results from the fact, that the returned set of suspicious components is almost 10-times smaller than for other approaches. The precision of the approach is thus much higher, but for the price of lower recall (useless for fraud detection).. We have already discussed the purpose of hierarchical detection of groups of fraudsters -to simplify detection of fraudulent entities with appropriate detection of fraudulent components. Another implication of such an approach is also simpler, or is some cases even feasible, data collection process. As the detection of components is done using only the relations between entities (relational attributes), a large portion of data can be discarded without knowing the values of any of the intrinsic attributes. This characteristic of the system is vital when deploying in practice -(complete) data often cannot be obtained for all the participants, due to sensitivity of the domain.. Last, we briefly discuss the applicability of the proposition in other domains. The presented IAA algorithm can be used for arbitrary assessment of entities over some relational domain, exploring the relations between entities with no demand for an (initial) labeled data set. When every entity is well defined with (only) the entities directly related to it, considering the context observed, one of the proposed assessment models can also be used. Furthermore, the presented framework (four modules of the system) could be employed for fraud detection in other domains. The system is also applicable for use in other domains, where we are interested in groups of related entities sharing some particular characteristics. The framework exploits the relations between entities, in order to improve the assessment, and is structured hierarchically, to make it applicable in practice. Performance of the system depends on random generation of networks, used for detection of suspicious components (second module). We construct 200 random networks for each indicator and each component (equations (11), (12)), however, the results still vary a little. The entire assessment was thus repeated 20 times and the scores were averaged. To assess the ranking of the system, average AUC (Area Under Curve) scores were computed, AUC. Results given in tables 5, 6, 7, 8 are all AUC. In order to obtain a standard for other analyses, we first report the performance of the system that uses PRIDIT analysis for fraudulent components detection, and IAA algorithm with model AM (positive predictive value), specificity (1− false positive rate), F1 score (harmonic mean of recall and precision) and AUC. All but last are metrics that assess the classification of some approach, thus a threshold for suspicion scores must be defined. We report the results from the first run that minimize the total cost, assuming the cost of misclassified fraudsters and nonfraudsters is the same. Same holds for confusion matrix seen in table 4. Fraudster 41 5 Non-fraudster 22 143 Table 4 : Confusion matrix for the system that uses PRIDIT analysis with IAA mean bas algorithm (determined so the total cost on the first run is minimal). Our work places in the wide field of fraud detection. Fraud appears in many domains including telecommunications, banking, medicine, e-commerce, general and automobile insurance. Thus a number of expert system approaches for preventing, detecting and investigating fraud have been developed in the past. Researches have proposed using some standard methods of data mining and machine learning, neural networks, fuzzy logic, genetic algorithms, support vector machines, (logistic) regression, consolidated (classification) trees, approaches over red-flags or profiles, various statistical methods and other methods and approaches (Artis et al., 2002; Brockett et al., 2002; Bolton & Hand, 2002; Estevez et al., 2006; Furlan & Bajec, 2008; Ghosh & Schwartzbard, 1999; Hu et al., 2007; Kirkos et al., 2007; Perez et al., 2005; Rupnik et al., 2007; Quah & Sriganesh, 2008; Sanchez et al., 2009; Viaene et al., 2002 Viaene et al., , 2005 Weisberg & Derrig, 1998; Yang & Hwang, 2006) . Analyses show that in practice none is significantly better than others (Bolton & Hand, 2002; Viaene et al., 2005) . Furthermore, they mainly have three weaknesses. They (1) use inappropriate or inexpressive representation of data; (2) demand a labeled (initial) data set; and (3) are only suitable for larger, richer data sets. It turns out that these are generally a problem when dealing with fraud detection (Jensen, 1997; Phua et al., 2005) .. In the narrower sense, our work comes near the approaches from the field of network analysis, that combine intrinsic attributes of entities with their relational attributes. Noble & Cook (2003) proposed detecting anomalies in networks with various types of vertices, but they focus on detecting suspicious structures in the network, not vertices (i.e. entities). Besides that, the approach is more appropriate for larger networks. Researchers also proposed detecting anomalies using measures of centrality (Freeman, 1977 (Freeman, , 1979 , random walks (Sun et al., 2005) and other (Holder & Cook, 2003; Maxion & Tan, 2000) , but these approaches mainly rely only on the relational attributes of entities.. Many researchers have investigated the problem of classification in the relational context, following the hypothesis that classification of an entity can be improved by also considering its related entities (inference). Thus many approaches formulating inference, spread or propagation on networks have been developed in various fields of research (Brin & Page, 1998; Domingos & Richardson, 2001; Kleinberg, 1999; Kschischang & Frey, 1998; Lu & Getoor, 2003b; Minka, 2001; Neville & Jensen, 2000) . Most of them are based on one of the three most popular (approximate) inference algorithms: Relaxation Labeling (RL) (Hummel & Zucker, 1983 ) from the computer vision community, Loopy Belief Propagation (LBP) on loopy (Bayesian) graphical models (Kschischang & Frey, 1998) and Iterative Classification Algorithm (ICA) from the data mining community (Neville & Jensen, 2000) . For the analyses and comparison see (Kempe et al., 2003; Sen & Getoor, 2007) .. Researchers have reported good results with these algorithms (Brin & Page, 1998; Kschischang & Frey, 1998; Lu & Getoor, 2003b; Neville & Jensen, 2000) , however they mainly address the problem of learning from an (initial) labeled data set (supervised learning), or a partially labeled (semi-supervised learning) (Lu & Getoor, 2003a) , therefore the approaches are generally inappropriate for fraud detection. The algorithm we in-troduce here, IAA algorithm, is almost identical to the ICA algorithm, however it was developed with different intentions in mind -to assess the entities when no labeled data set is at hand (and not for improving classification with inference). Furthermore, IAA does not address the problem of classification, but ranking. Thus, in this way, it is actually a simplification of RL algorithm, or even Google's PageRank (Brin & Page, 1998) , still it is not founded on the probability theory like the latter.. We conclude that due to the weaknesses mentioned, most of the proposed approaches are inappropriate for detection of (automobile) insurance fraud. Our approach differs, as it does not demand a labeled data set and is also appropriate for smaller data sets. It represents data with networks, which are one of the most natural representation and allow complex analysis without simplification of data. It should be pointed out that networks, despite their strong foundations and expressive power, have not yet been used for detecting (automobile) insurance fraud (at least according to our knowledge).

O O O O O B I O O B I I O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O