VEGAWES: variational segmentation on whole exome sequencing for copy number detection Background: Copy number variations are important in the detection and progression of significant tumors and diseases. Recently, Whole Exome Sequencing is gaining popularity with copy number variations detection due to low cost and better efficiency. In this work, we developed VEGAWES for accurate and robust detection of copy number variations on WES data. VEGAWES is an extension to a variational based segmentation algorithm, VEGA: Variational estimator for genomic aberrations, which has previously outperformed several algorithms on segmenting array comparative genomic hybridization data. Results: We tested this algorithm on synthetic data and 100 Glioblastoma Multiforme primary tumor samples. The results on the real data were analyzed with segmentation obtained from Single-nucleotide polymorphism data as ground truth. We compared our results with two other segmentation algorithms and assessed the performance based on accuracy and time. Conclusions: In terms of both accuracy and time, VEGAWES provided better results on the synthetic data and tumor samples demonstrating its potential in robust detection of aberrant regions in the genome. We have developed a segmentation algorithm VEGAWES, based on Mumford and Shah variational model, to perform copy number segmentation on whole exome sequencing data. In our pipeline, we preprocess paired tumor-normal tumor BAM samples and prepare it for CN segmentation using VEGAWES. In addition to the variational approach derived from VEGA, we have enhanced the original model to include a specific property in WES data related to the average distance between exons of adjacent regions. VEGA follows a pyramidal approach where smaller segments are merged to create larger ones. In VEGAWES, we have taken the distance between exons into consideration while merging adjacent segments in addition to the existing parameters.. To validate our approach, we experimented our pipeline on both synthetic and real data of 100 GBM primary tumor samples and compared the segmentation results in terms of time performance and accuracy with two other algorithms commonly used in WES segmentation -CBS and HSLM. We also compare the results of VEGAWES with the original VEGA model. We observed that on synthetic data, VEGAWES outperforms both CBS and HSLM in all amplification events, whereas with deletion, it segments shorter regions more accurately than both other algorithms. With experiments on real data, we noticed that while VEGAWES provided similar or better segmentation results as compared to CBS, the time difference between the two approaches were significant with CBS performing very slow. Both VEG-AWES and VEGA beat HSLM in terms of accuracy, although in terms of time, all three are comparable. We also reported that introducing the distance between the exons measure into the model reduced errors and detection of false positives in the segmentation results. However, we have included a weight parameter in the model that allows the usage of both the original VEGA model and the enhanced VEGAWES for segmentation purposes. Structural variants are genomic rearrangements larger than 50 bp accounting for around 1 % of the variation among human genomes. Deletions, duplications, triplications, insertions, and translocations can all result in copy number variations (CNVs) [1] . CNVs correspond to the regions of the genome that have been deleted or duplicated on certain chromosomes. Various biological studies have shown a close association between chromosomal regions aberrant in copy number (CN) and diseases like tumor [1, 2] , intellectual disability and autism [3, 4] . Due to its importance in the study of the molecular basis of tumor, several techniques have been recently implemented to detect CNVs. In the past, CNVs were detected on data collected using array comparative genomic Benevento, Italy Full list of author information is available at the end of the article gybridization (aCGH), Single-nucleotide polymorphism (SNP) and fluorescence in situ hybridization (FISH) techniques. However, the low resolution data in these preliminary methods prohibits the detection of short CNVs.. Recently, Next Generation Sequencing (NGS), a low cost and high throughput sequencing technique, has emerged as an effective alternative approach for DNA analysis including CNV detection [5] . NGS involves parallel sequencing of massive amounts of short DNA strands, also known as the reads, from randomly fragmented copies of a genome. Although, NGS gained popularity with the development of Whole Genome Sequencing (WGS) that enabled several large scale sequencing projects, the costs, computational complexity and effectiveness of WGS has consistently posed limitations. Researchers are typically interested in the coding regions of the genome, known as the exons, which comprise of 1 % of the whole human genome and is cost effective with respect to whole genome sequencing.. Detection of CNV from NGS data comprises of three steps: preprocessing of the data to remove biases in the data, segmentation of the data, and classification of amplification/deletion events. Segmentation is used to identify the breakpoints at which these aberrations are likely to occur along the genome. This step is important as it allows identification of critical regions in the genome which contributes towards the detection of various genetic diseases. Hence, there is a need of accurate, efficient, and robust segmentation algorithms.. Several tools have been implemented to detect CNVs detection on WGS data using state-of-the-art segmentation algorithms. ReadDepth [6] is one such commonly used software that primarily contributes towards the preprocessing of the WGS raw data, wherein a new model for data representation is introduced, and deploys the Circular Binary Segmentation (CBS) [7] algorithm for segmentation. SeqCNA [8] also focuses on preprocessing of the data and proposes a novel approach to remove GC bias, and then applies the Gain and Loss Analysis of DNA (GLAD) [9] segmentation algorithm. CNV-TV [10] uses a Total Variation (TV) approach to fit the data. It applies a piecewise constant function with the TV penalized least squares, and detects the plateau/basin in the signal that indicates a amplification/deletion event. The Schwarz information criterion (SIC) is used to find the optimal parameter to control the sensitivity and specificity.. Unlike the case of WGS, there are fewer publicly available tools that perform CNV detection on Whole Exome Sequencing (WES) data. ExomeCNV [11] is one of the earliest tools that processes WES data to detect CNV. It uses CBS algorithm and proposes an optimal computation of parameters to call out CNVs. EXCAVATOR [12] is a recently published tool which introduces three normalization steps based on median approach [13] . It then calls the heterogeneous shifting level model (HSLM), which is a modified version of the shiting level model (SLM) segmentation algorithm [14] to include the distance between exons, and applies the FastCall algorithm [15] for CNV classification. Control-FREEC [16] is another such tool that is flexible with calling CNVs on WGS and WES data with or without matched normal samples. VarScan2 [17] uses a heuristic approach to call CNVs and CBS algorithm for segmentation. In addition to these tools that require a paired sample for CNV detection, there are other set of tools that detect CNVs based on large samples cohorts. Copy Number Inference From Exome Reads (CONIFER) [18] and XHMM [19] are two commonly used tools for this purpose. While both are based on a similar idea, CONIFER exploits the singular value decomposition (SVD) model to detect rare CNVs, and XHMM uses the Hidden Markov model (HMM) model, based on the principal component analysis (PCA) approach, to find the principal sources of variation. However, both tools require sampling of large number of sequences for detection.. In this work, we focus on segmentation of WES data while considering the accuracy as well as the computational performance of the algorithm. There are very limited segmentation algorithms to specifically analyze WES data. In CBS, the data is represented as a sequence of random variables and the change points are the locations of copy number changes. These change points are iteratively localized until the copy numbers of adjacent regions are significantly different. CBS was initially developed to detect CNV on aCGH data and has been extensively used in the past for segmentation of WES data. However, it gives poor computational performance due to the recursive splits. HSLM, introduced in EXCAVATOR, specifically designed for WES data to include the distance between the exons, gives a higher precision rate due to the parameters used to determine the confidence levels in the selection of a CNV.. In recent years, variational-based approaches are being widely considered to solve segmentation. Most solutions are primarily based on the discontinuity-adaptive variational models proposed by Mumford and Shah [20] and Rudin et al. [21] , which have been applied to segmentation of piecewise constant images. Variational models include minimization of an energy functional that attempts to find a solution such that the similarity between the computed segmentation and the observed data is increased while penalizing complex or irregular solutions. The measure of regularity is taken into account by a penalty term in the energy function that typically weighs the variability of the solution. In the Mumford and Shah model, the regularity is measured with the length of the boundary between regions. A regularization parameter controls the balance between the interpolation term and the regularity term.. With their initial accomplishment in addressing several image processing problems [22, 23] , variational based models have been experimented and proved to be successful with segmentation on several kinds of DNA data [10, 24] . Besides CNV-TV, variational estimator for genomic aberrations (VEGA) [24] is one such segmentation algorithm that is based on the Mumford and Shah model and similar to the region growing segmentation algorithms introduced in Koepfler et al. [25] . It performs minimization of the energy function that allows the identification of breakpoints and penalizes the number of segments with a bottom-up approach. In this approach, it merges smaller regions into larger ones in a sequential manner. The regularization parameter is computed based on data-driven heuristics. This algorithm has been applied on CN segmentation of aCGH data and shown to perform robustly and accurately when compared with three other state-of-the-art segmentation algorithms (CBS, Ultrasome [26] , and SMAP: Segmental Maximum A Posteriori approach [27] ).. Here, we propose a variational segmentation algorithm, inspired by VEGA, to detect CNV on WES data: VEGAWES. We created a pipeline to apply variational based model on WES data and modified the segmentation algorithm to include WES properties. To preprocess the WES data, we remove bias using an approach similar to the one taken in EXCAVATOR tool. In addition, we enhance the original VEGA model by introducing the distance between exons as a feature in the computation of the parameters for the energy function minimization. In order to evaluate and validate our algorithm, we compare the performance of VEGAWES in terms of accuracy and robustness (time) with CBS and HSLM, and with the original model of VEGA. The experiments were conducted on synthetic data as well as real data, a 100 Glioblastoma Multiforme (GBM) paired primary tumor WES samples, downloaded from The Cancer Genome Atlas (TCGA) database. Read count (RC) is one of the commonly used approaches for CN detection on WES data [5, 28] . In this process, the WES data are first used to extract the RC for each exon. This is done by calculating the number of reads aligned to an exon. Once the average read coverage has been computed for each exon in the paired sample (tumor and normal), the data are preprocessed for bias removal. The basic idea behind RC approach is that the read count of the genomic region should be proportional to the CN profile of the region. However, the data contain several forms of bias that need to be removed. In this work, we apply a two-step bias removal approach -Mappability and GC Correction. The data are then represented as a log ratio (LR) signal of the tumor sample with respect to its matched normal. This list of LR values corresponding to each exon is the input to the segmentation algorithm, which uses these values to fragment the signal and eventually help in the identification of amplifications and deletions in the genome. In the following subsections, we will describe the details of the algorithm.

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 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 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 B 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 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 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 O O O 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 O O O O O O 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 O O O O O O 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 B 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 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 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 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 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 O O O O O O 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 B I I 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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


Causal reversibility in Bayesian networks Abstract. Causal manipulation theorems proposed by Spirtes et al. and Pearl in the context of directed probabilistic graphs, such as Bayesian networks, oOE er a simple and theoretically sound formalism for predicting the eOE ect of manipulation of a system from its causal model. While the theorems are applicable to a wide variety of equilibrium causal models, they do not address the issue of reversible causal mechanisms, i.e. mechanisms that are capable of working in several directions, depending on which of their variables are manipulated exogenously. An example involving reversible causal mechanisms is the power train of a car: normally the engine moves the transmission which, in turn, moves the wheels; when the car goes down the hill, however, the driver may want to use the power train to slow down the car, i.e. let the wheels move the transmission, which then moves the engine. Some probabilistic systems can also be symmetric and reversible. For example, the noise introduced by a noisy communication channel does not usually depend on the direction of data transmission. In this paper, we investigate whether Bayesian networks are capable of representing reversible causal mechanisms. Building on the result of Druzdzel and Simon (1993), which shows that conditional probability tables in Bayesian networks can be viewed as descriptions of causal mechanisms, we study the conditions under which a conditional probability table can represent a reversible causal mechanism. Our analysis shows that conditional probability tables are capable of modelling reversible causal mechanisms but only when they ful® ll the condition of soundness, which is equivalent to injectivity in equations. While this is a rather strong condition, there exist systems where our ® nding and the resulting framework are directly applicable. For over a decade, arti® cial intelligence researchers have tried to incorporate a principled account of causality into existing formalisms for uncertain reasoning, for example in the area of planning (Davidson and Fehling 1994) , inferring causal structure from observations Verma 1991, Spirtes et al. 1993) , explaining causal assumptions in decision analytic models (Druzdzel and Simon 1993, Heckerman and Shachter 1995) , experimental design (Pearl 1995) , and in modelling counterfactua l reasoning (Balke and Pearl 1995) .. An explicit representation of causality is important in arti® cial intelligence because of several reasons. 1 The foremost of these is that causal models allow intelligent agents to predict the eOE ects of their actions. A causal model frees the agent from the need to store a combinatorially large set of pairs action e ect. Result of external manipulation on the model variables can be predicted directly from the model. In the context of directed graphical probabilistic models, such as Bayesian networks, two foremost formalizations of manipulation are due to Spirtes et al. and Pearl. Spirtes et al. (1993) proposed a theorem, known as causal manipulation theorem, specifying the eOE ect of imposing externally a value on any node in a graphical model. Pearl (1995) , who built his recent work on structural equation models, has an equivalent formalization of manipulation. The manipulation theorems oOE er a simple and theoretically sound formalism for predicting the eOE ect of manipulation of a system from its causal model. They bring much clarity into statistics and such disciplines as experimental design by making a thorough distinction between observation and manipulation. While the theorems are applicable to a variety of equilibrium causal models, they exclude from their framework the issue of reversible causal mechanisms, i.e. mechanisms that are capable of working in several directions, depending on which of their variables are manipulated exogenously.. Both approaches to causal manipulation have been developed in the framework of directed graphical models and imply that if the eOE ect of an external manipulation of a node imposes a deterministic value on it (for the sake of simplicity, we will consider only such interventions in this paper), the eOE ect of this manipulation on other nodes in the network can be predicted by removing the arcs from s parents to . This operation, popularly known as arc cutting semantics, is based on the premise that each mechanism in the model represents an asymmetric relationship among the model s variables. This poses a limitation on modelling reversible causal mechanisms, i.e. mechanisms that are capable of working in several directions, depending on which of their variables are manipulated exogenously. We would like to make a distinction between reversible causal mechanisms and mutual causation. The latter arises in systems that are dynamic in nature and contain feedback loops. For example, research output of a university often depends on the available research funding. Research funding, in turn, depends on the research output. The focus of this paper is on reversible causal mechanisms and our results do not in general apply to mutual causation. Reversible causal mechanisms occur often in equilibrium systems, for example in ® nancial or engineering domains. An example of a reversible causal mechanism is the power train of a typical car: when a car goes up the hill, the engine moves the transmission which, in turn, moves the wheels; when the car goes down the hill, the driver may want to use the power train to slow down the car, i.e. let the wheels move the transmission which then moves the engine. The interactions between the engine and the transmission and between the transmission and the wheels are independent of how the power train is actually used. Knowledge of these interactions can be reused whenever these mechanisms are parts of a larger system. Some probabilistic systems can also be symmetric and reversible. For example, errors introduced by a noisy communication channel do not usually depend on the direction of data transmission. It is the pursuit for a manipulation framework for such mechanisms that provided inspiration for the current paper.. Reversible mechanisms are modelled quite naturally in the context of equilibrium structural equation models, as nothing in a structural equation implies asymmetry among its variables. It is the context of a model that introduces asymmetry among variables. Druzdzel and Simon (1993) related the notion of causality in directed probabilistic graphs to structural equations and structural equation models in econometrics. They showed that it is possible to reproduce the joint probability distribution modelled by a Bayesian network (Pearl 1988 ) by a system of simultaneous equations in such a way that the independence graph of the former coincides with the causal ordering over the latter. They made it quite clear that conditional probability tables in Bayesian networks can be viewed as descriptions of causal mechanisms and, thereby, be equivalent to structural equations. It is natural to ask the question whether Bayesian networks can, similarly to structural equation models, represent reversible causal mechanisms.. In this paper, we study the algebraic conditions under which a conditional probability table can represent a reversible causal mechanism. We demonstrate that representing reversible causal mechanisms in Bayesian networks is possible, although reversibility implies a strong constraint on the conditional probability tables. The conditional probability tables of reversible mechanisms have to be`multiplynormalized , i.e. their numerical probabilities have to add up to one along each dimension. We derive this constraint formally in the paper. We also improve on the notation used by Druzdzel and Simon (1993) and frame their theorems in a more general way. Our approach is unique in that it brings the natural formalization of manipulation in equilibrium structural equation models to Bayesian networks and shows that the latter have the capability to model reversible causal mechanisms, albeit this capability is strongly limited.. We will use lower case letters, such as , to denote variables, and capital letters, such as , to denote a set of variables. Furthermore, will denote the number of values of a variable or, more generally, the number of elements in a ® nite set. ( ) will denote the set of parents of in the independence graph of a Bayesian network. . The values of a variable will be called con® gurations, the set of all con® gurations of a variable denoted by ( ), while an element of this set will be denoted by . A con® guration of a set of variables is an assignment of a value to each of them; the set of all con® gurations of a set of variables will be written as ( ), one particular con® guration is . The restriction of a con® guration to a set of variables is the part of that assigns values to variables in . The remainder of this paper is structured as follows. Section 2 reviews the foundation s of manipulation within the framework of structural equation models. Section 3 discusses causal reversibility in the framework of structural equation models. Section 4 reviews the fundamentals of Bayesian networks. Sections 5 and 6 study how reversible causal mechanisms can be modelled by Bayesian networks and derive the constraints on the conditional probability tables that have to be ful® lled for a mechanism to be reversible. Finally, section 7 shows an example of a reversible causal mechanism modelled by a Bayesian network. Causal manipulation theorems proposed by Spirtes et al. (1993) and Pearl (1995) in the context of directed probabilistic graphs, such as Bayesian networks, oOE er a simple and theoretically sound formalism for predicting the eOE ect of manipulation of a system from its causal model. While the theorems are applicable to a variety of equilibrium causal models, they do not address the issue of reversible causal mechanisms, i.e. mechanisms that are capable of working in several directions, depending on which of their variables are manipulated exogenously. An example involving reversible causal mechanisms is the power train of a car: normally the engine moves the transmission which, in turn, moves the wheels; when the car goes down the hill, however, the driver may want to use the power train to slow down the car, i.e. let the wheels move the transmission, which then moves the engine. Some probabilistic systems can also be symmetric and reversible. For example, the noise introduced by a noisy communication channel does not usually depend on the direction of data transmission.. In this paper, we addressed the question whether Bayesian networks are capable of representing reversible causal mechanisms. Building on the result of Druzdzel and Simon (1993) , which shows that conditional probability tables in Bayesian networks can be viewed as descriptions of causal mechanisms, we demonstrated that representing reversible causal mechanisms in Bayesian networks is possible. Our analysis has shown that in order to model reversible causal mechanisms, conditional probability tables have to ful® ll the condition of soundness, which is equivalent to injectivity in equations. While this limits the applicability of Bayesian networks, there exist systems where our ® nding and the resulting framework are directly applicable.

B I O B I O O B 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 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 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 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 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 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 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 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 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 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 B 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 I 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 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 B 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 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 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 B I 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 B I O O O O O O O O O O O O O O


Camel: collective-aware message logging The continuous progress in the performance of supercomputers has made possible the understanding of many fundamental problems in science. Simulation, the third scientific pillar, constantly demands more powerful machines to use algorithms that would otherwise be unviable. That will inevitably lead to the deployment of an exascale machine during the next decade. However, fault tolerance is a major challenge that has to be overcome to make such a machine usable. With an unprecedented number of parts, machines at extreme scale will have a small mean-time-between-failures. The popular checkpoint/restart mechanism used in today's machines may not be effective at that scale. One promising way to revamp checkpoint/restart is to use message-logging techniques. By storing messages during execution and replaying them in case of a failure, message logging is able to shorten recovery time and save a substantial amount of energy. The downside of message logging is that memory footprint may grow to unsustainable levels. This paper presents a technique that decreases the memory pressure in message-logging protocols by only storing the necessary messages in collective-communication operations. We introduce Camel, a protocol that has a low memory overhead for multicast and reduction operations. Our results show that Camel can reduce memory footprint in a molecular dynamics benchmark for more than 95 % on 16,384 cores. The persistent advance in supercomputing has made possible the exploration of many fundamental problems in science. Methods that were once considered intractable are now practical, thanks to the availability of well-established petascale systems. The next step in the evolution of supercomputers, fueled by many performance-hungry problems in computational science, will lead to the deployment of exascale machines in the next decade. The computational power provided by extreme-scale systems is considered a fundamental tool in extending the frontier of our knowledge of nature and the universe. However, a threat glooms the future of supercomputing. The mere number where multicast, reduction, and point-to-point receive approximately, a third of the communication volume each. This paper aims to provide a general framework to decrease the memory footprint of message logging protocols for collective-communication operations. We introduce Camel, a mechanism that only stores the minimum amount of messages necessary to replay a collective during recovery. It does not increase the recovery cost and minimally interferes with a running message-logging protocol.. This paper makes the following contributions:. -An algorithmic description of simple causal message logging (Scmel), a traditional fault tolerance protocol on which Camel is based (Sect. 2). -A formalization of collective-aware message logging (Camel), a method that minimizes the memory overhead of message-logging protocols (Sect. 3). -The design principles of Camel and its implementation in a scalable parallel computing library (Sect. 4). -An experimental evaluation of Camel with two representative applications and on two supercomputing platforms using up to 16,384 cores (Sect. 5). The effective usage of future supercomputers will depend on the ability of the system to overcome the high rate of failures predicted for such large systems. Rollback-recovery strategies have been widely adopted in the HPC community. One of those strategies is message logging, which stores communication to avoid a global rollback. That feature makes message-logging protocols able to reduce execution time and energy consumption on a faulty machine. However, a drawback of message logging is the increased memory pressure due to the message log.. This paper introduces Camel, a collective-aware protocol to reduce the size of the message log in memory. Camel extends traditional protocols by adding a few bits of extra information and only stores messages that are absolutely necessary to reproduce multicast and reduction operations during recovery. Results on two different platforms and using two different applications demonstrate Camel's ability in substantially reduce the memory pressure of message logging.. Other types of collective communication operations can be incorporated into Camel's model. We will explore those operations in the future along with other applications that make a significant use of collective operations. In addition, we will design a holistic approach that combines Camel with other memory-reducing techniques for message logging. Traditional message-logging protocols can cope with messages from collectivecommunication operations [3, 7, 13] , but fail to leverage the structure of those operations to decrease the memory size of the message log. Camel capitalizes on the implementation of collective operations on a spanning tree and only saves the minimum amount of data needed to reproduce the result of such operation after a failure. Camel is meant to extend any traditional message-logging protocol by adding extra few bits of information and handling collective messages slightly differently. Although this paper uses causal message logging as an example, Camel philosophy is applicable to other protocols.. Camel does not require the generation of determinants for reduction messages, except at the root of the spanning tree. Determinism is not needed when agglomerating messages at the intermediate nodes because replicating the same deterministic decisions will not have any impact on the correctness of the execution. More specifically, if process X is an intermediate node in a spanning tree and agglomerates reduction messages in a non-deterministic way, the exact same decision does not need to be made during recovery because the agglomerated message emitted by X will be discarded. If functions Accumulate and Agglomerate are deterministic, then determinant generation can be removed from the root node in Algorithm 2.. The failure unit assumed in this paper is a process (or a PE in the Charm++ implementation). A more realistic assumption, given the failure pattern of modern supercomputers [22] , is to assume a node as the unit of failure. It is straightforward to extend Camel's ideas into a multicore node-based runtime system. At the node level, Camel would work exactly the same way as in the PE-based case. For instance, the Scmel protocol in Algorithm 1 has been extended to multicore node systems [22] and Camel could be adjusted to such environment.. The design of Camel includes a tight collaboration with the runtime system. Figure 2a shows this interaction in which certain operations in Camel call the runtime layer for accumulation and agglomeration of messages. One additional function at the runtime layer might be to provide message buffering in case of concurrent collective operations.. One of the main features of Camel is its appeal for scalability. The results in Sect. 5 demonstrated the benefits of Camel in both strong and weak scaling. As more processes are used to run collective-intensive programs, the spanning trees get deeper and there is a bigger impact on saving messages near the root that would otherwise have been stored throughout the whole tree.. There are several ways in which Camel can be optimized. First, during recovery multicast messages are always propagated, regardless whether the multicast has actually reached all nodes. Duplicate multicast messages can be suppressed by having acknowledgments from children. Therefore, parents in the spanning tree would not propagate a multicast message if the operation has been confirmed by its chil-dren. Second, other structures for collectives can be used. In some cases, processes would delegate collective messages even if they are not part of the group involved in the collective. Third, it is possible to merge Camel with other memory-reducing techniques for message logging. For instance, team-based message logging [21, 26] groups processes into teams and avoids storing communication within teams. Teambased message logging can be integrated with Camel. The main goal of Camel is to reduce the memory footprint of the message log in message-logging protocols. We measured the size and type of all messages logged during executions of both LeanMD and OpenAtom and present the breakdown of the message log. Figure 5 presents the message log memory consumption of LeanMD on Stampede using the traditional Scmel protocol (listed in Algorithm 1) and Camel (listed in Algorithm 2). The former is represented by letter S in the figure, while the latter by letter C. Figure 5a shows a small problem size, whereas Fig. 5b shows a moderate problem size. In both cases, Camel manages to dramatically decrease the memory pressure. Camel reduces the size of the memory log by at least 95 %. Both figures also show the strong scale of Camel from 1K cores up to 16K cores. This dramatic reduction comes from the fact that LeanMD transfers most of the data through collective operations (as shown in Fig. 1a) . In fact, less than 1 % of the data is sent via point-to-point operations. LeanMD exchange particle information between cells and computes using multicast and reductions. We should note that Camel is more effective reducing the memory footprint of multicast. That is reflected in Fig. 5a ,b. In general, Camel decreases multicast memory pressure from 50 to 1 %, whereas reduction memory pressure goes down from 50 to 3 %. This is a natural effect of having (b) 4-million-particle dataset to store only one copy of the multicast message, but as many reduction messages as the root of the spanning tree receives (see Algorithm 2) . Figure 6 shows the OpenAtom results on Intrepid. Two problem sizes, small and moderate, were used and appear in Fig. 6a, b, respectively. Again, Camel shows a significant reduction of the message log. In Fig. 6 the total memory required by the message log gets reduced from 24 to 5 % as we move from 256 to 4K cores. The fraction of messages that belong to point-to-point operations remains unchanged because Camel only addresses collective messages. That fraction is significant in OpenAtom, taking from 55 to 32 %. Again, Camel has a higher impact on multicast messages than in reduction messages. For instance, at 4K in Fig. 6 , the fraction of the message log related to reduction messages goes from 30 to 10 %, whereas its multicast counterpart goes from 38 to 6 %. Figure 6b shows similar results for a bigger problem size in OpenAtom. The decrease on the message log for this case goes from 24 to 65 % as we strong scale the program from 1K to 16K cores. Figure 6a , b share the same trend to decrease the message log used by Camel as the program strong scales. The reason for such pattern is that OpenAtom uses more heavily collective communication operations as more cores are available. That can be verified by the decreasing fraction of point-to-point messages in the spectrum. Many HPC applications apply the same logic of relying more heavily on collective operations as the scale gets larger. Finally, a difference in the magnitude of the impact of Camel on LeandMD and OpenAtom relates to the depth of the spanning tree. LeanMD uses spanning trees that reach more cores and hence Camel manages to get a more dramatic decrease in the size of the message log. An additional benefit of Camel is the elimination of certain determinants for reduction operations and the avoidance of piggybacking certain determinants for multicast operations. Algorithm 2 shows in function ReceiveReductionMsg how a reduction message generates determinants only at the root of the spanning tree. Therefore, compared with Scmel, Camel does not create determinants for reception of intermediate contribution messages to a reduction. In the case of multicast, Algorithm 2 shows in function ReceiveMulticastMsg how piggybacked determinants are removed from the original multicast messages before being forwarded to the children by function SendMsgToChildren. Table 3 presents relevant communication statistics for LeanMD running 100 iterations on the one-million particle dataset. The test was run on Stampede for the range between 1024 and 16,384 cores. The first row in Table 3 reports the total number of messages sent in the system during the whole execution. Although the table presents a strong scaling test, the number of total messages increases with the system size due to a different and deeper structure in the spanning tree. The same holds true for the size of the message log. Table 3 compares Scmel and Camel for the size of the message log (the proportion appears in Fig. 5a ), the total number of determinants created and the total number of determinants piggybacked. Again, the numbers correspond to the sum of all determinants in all the processes for the whole execution. Besides the dramatic reduction in message log size, Camel is also able to approximately reduce in half the number of determinants created and the number of determinants piggybacked. Eliminating determinants (and their distribution) can alleviate the main source of performance penalization of message-logging protocols [17] .. It does, however, depend on the type of interconnection. The performance difference on Stampede was not significant. Hursey and Graham [15] presented a proposal to build fault-tolerant collective communication operations on MPI. Their mechanism supports algorithm-based fault tolerance (ABFT) based on a resilient implementation of MPI collectives. The programmer of the fault-tolerant algorithm can incorporate the optimized implementation of resilient collectives. A recent proposal in the MPI Forum addressed the need for resilient MPI calls and, among other operations, defined MPI_Comm_validate_all that helps a rank to recognize all failures in a communicator. Therefore, the application is aware of the failure in different ranks. Hursey and Graham reviewed three different designs for tree-based collectives. In the first approach, a rerouting technique would check for a failed process before interacting with it and route around crashed processes in a recursive fashion. The second method consists in a lookup-avoiding design that would remove the check for failures and calculate the relationships parent/child at the end of MPI_Comm_validate_all. Finally, the third method uses rebalancing to remove the check for failures and balance the tree for the collective call at the end of MPI_Comm_validate_all. The third design provides the best performance and a negligible overhead compared to the fault-unaware implementation. Our approach markedly differs from theirs. The protocol presented in this paper aims to provide an automatic solution for fault tolerance in collectives, without the intervention of the programmer. Bronevetsky et al. [4] presented a protocol for application-level coordinated checkpoint that targets applications without global synchronization points. In their extension for collective communication operations, the checkpoint infrastructure is based on an algorithm that creates a coordinated checkpoint similar to Chandy-Lamport algorithm [8] . In their protocol, an initiator starts the checkpoint process and coordinates the rest of the procedure. This protocol assumes the checkpoint calls are not made in global synchronization points, hence the presence of special measures to log messages and non-deterministic events during checkpoint. Recovery works properly by replaying the necessary messages and reproducing all non-deterministic events. Their algorithm finds two important consistent cuts. The first cut is composed by the collection of local checkpoints of the processes. This cut forms a recovery line to which all processes may roll back in case of a failure. The second cut is composed by the points at which processes stop recording messages and non-deterministic events. The algorithm makes strong claims about the consistency of both cuts. In particular, there must not be any data flow from collectives crossing the second cut. Our approach is based on synchronized checkpoints. Therefore, we removed all the complexity at checkpoint time. In addition, we extend a full message-logging protocol that features the benefits of faster recovery and low energy consumption.. This paper presents a message-logging protocol that minimizes the memory overhead for collective communication operations. A different mechanism, named teambased message logging [21, 26] , creates groups of nodes in the system (called teams) and only logs messages crossing team boundaries. That way, if teams are created to match the communication graph of the application, a substantial amount of the total communication volume can be contained internal to the teams and does not need to be stored. That scheme may apply to any implementation of collective communication operations. However, a failure in one node requires the whole team to roll back, increasing the recovery cost. This paper presents a mechanism that decreases memory pressure in collectives and does not increase the recovery cost. The Charm++ parallel programming runtime system [18] was chosen for Camel's implementation. There are several features of the Charm++ execution model that make it a general framework for message-passing programs. The Charm++ philosophy encourages modularity and locality by having objects that carry out the execution of the program. Each object, called a chare in Charm++'s terminology is an independent execution unit that exports remote methods. Each method invocation is transformed into an active message that triggers a particular method upon reception. Thus, the collection of objects in a Charm++ program performs a computation by exchanging messages in an asynchronous fashion, providing what is called message-driven execution. This mechanism is more general than the one enforced by the message-passing interface (MPI). The Charm++ runtime system conceives the underlying machine as Fig. 4 Architecture of Camel implementation in Charm++ a collection of processing entities (PEs). The unit of failure in the Charm++ model is one PE. Therefore, we will consider in the rest of the paper the loss of one PE as the representative example of a failure in HPC systems. The set of objects in a computation is divided among the set of PEs by the runtime system. Because multiple objects may reside on the same PE, it is said that Charm++ provides overdecomposition. The runtime system also handles migration of objects between different PEs to achieve load balance, fault tolerance, and power management. Figure 4 presents a general view of the architecture in Charm++ that implements the Camel protocol. The processing entities take the place of the processes described in Sect. 2. Therefore, the failure of one PE implies multiple objects are lost simultaneously. Figure 4 also shows two spanning trees: one for the set of PEs {R, S, T, W, X } rooted at R, one for the group of objects {r, s, t, . . . , z} rooted at r . This figure replaces the view of the spanning tree between the group of processes in Fig. 3b . In Charm++, both PEs and objects have spanning trees, although they are interdependent. A manager object (tagged with a letter M in the diagram) represents a special kind of object that manages collective operations among the set of objects and defines the spanning tree. All the information relative to spanning trees for collectives is maintained in this set of objects. In addition, the manager is in charge of sending and receiving all collective communication messages. Because of its strategic role, the manager object may interact with the runtime system layer (see Fig. 2a ) to perform all necessary operations in Algorithm 2, in particular functions Accumulate and Agglomerate.. Seemingly, the two major challenges of the implementation of Camel in Charm++ are the non-FIFO channels and the asynchrony of execution. If channels do not conserve FIFO ordering, then Algorithms 1 and 2 will still work because reception order is stored and reproduced during recovery. However, the programmer has to be aware of this property and design the application accordingly. By the same token, asynchronous operations do not prevent the algorithms to be correct, but create a restriction on the mind of the programmer as to what type of assumptions can be made.

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 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 B I 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 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 B I 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 B I 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 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 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 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 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 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 B I O O O B I 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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


Higher-order tangent and secant numbers Abstract. In this paper higher-order tangent numbers and higherorder secant numbers, {T (n, k)} ∞ n,k =0 and {S (n, k)} ∞ n,k =0 , have been studied in detail. Several known results regarding T (n, k) and S (n, k) have been brought together along with many new results and insights and they all have been proved in a simple and unified manner. In particular, it is shown that the higher-order tangent numbers T (n, k) constitute a special class of the partial multivariate Bell polynomials and that S (n, k) can be computed from the knowledge of T (n, k). In addition, a simple explicit formula involving a double finite sum is deduced for the numbers T (n, k) and it is shown that T (n, k) are linear combinations of the classical tangent numbers T n . Let us, for non-negative integers n and k, define the n-th tangent number of order k, T (n, k), by the generating relation (see [1, p. 259 . Similarly, define n-th secant number of order k, S (n, k), by (cf. [2, p. 428 . Since T (n, k) and S (n, k) are, respectively, generalizations of the classical (and well-known) tangent (or, zag) numbers T n (see [1, p. 259] and [4] ). T n t n n! , i.e., T n := T (n, 1) (1. 3) and secant (or, zig) numbers S n (see [4] and [5, p. 63]) sec t = S n t n n! , i.e., S n := S (n, 0), (1.4) the numbers T (n, k) and S (n, k) may also be referred to as the higher-order (or, generalized) tangent numbers and the higher-order (or, generalized) secant numbers.. In a recent paper by Cvijović [6] , very simple and compact closed-form higher derivative formulae are derived for eight trigonometric and hyperbolic functions [6, Corollaries 1 and 2] and they involve the numbers T (n, k) and S(n, k) given by T (n, k) = T (n, k) k! and S(n, k) = S (n, k) k!.. (1.5). The elegance and remarkable simplicity of the obtained results (see Propositions 11 and 12) have been the main motivation behind our further interest in these numbers. It has turned out that they are not sufficiently studied as yet and it is aimed here to thoroughly examine T (n, k) and S (n, k). Several known results have been brought together along with many new results and insights and they all have been proved in a simple and unified manner (for further details, see Section 3). In this paper, two sequences of non-negative integer numbers, {T (n, k)} ∞ n,k =0. and {S (n, k)} ∞ n,k =0 , have been thoroughly investigated and many of their properties are determined. In particular, it should be mentioned that the higher-order tangent numbers T (n, k) constitute a special class of the partial multivariate Bell polynomials. Furthermore, from the knowledge of T (n, k), the higher-order secant numbers S (n, k) can be easily computed since S (n, k) and T (n, k) are related (see Proposition 3). In addition, a simple explicit formula involving a double finite sum is deduced for the higher-order tangent numbers T (n, k) (Proposition 8) and it is shown that T (n, k) are linear combinations of the classical tangent numbers T n (Proposition 7).. As an example of an application of the numbers T (n, k) and S (n, k) we give, without proof, recently established [6, Corollaries 1 and 2], and here slightly modified (observe that T (n, k) = T (n, k) k! and S(n, k) = S (n, k) k!), closed-form higher derivative formulae.. We remark that, apart from T (n, k), which were introduced by Comtet (see the definition of T (n, k) in [1, p. 259]), in the literature can be found several more definitions of higher-order tangent numbers: Carlitz and Scoville considered the numbers T 1) ]. However, it seems that numbers T (z) n defined by Cenkci [13, p. 1500 ] cannot be brought into connection with T (n, k). We note also that Carlitz and Scoville [2, p. 428] defined higher-order secant numbers S (k) n := k!S (n, k) (see also [4, p. 665] ). The tangent and secant numbers, T n and S n , were first studied by André in 1879 [14] .. The . Also, the formula (2.18) was deduced earlier by different arguments [15, p. 156] . In addition, it should be noted that, judging by the results of extensive numerical calculations which support such a conclusion, our simple and rather compact formulae (2.6) and (2.15) appear to be equivalent to the (relatively complicated-looking) formulae which were established by Lomont [12, see, respectively, Eq. (3.2) and Eqs. (3.4), (3.6) and (3.7)].

O O O B I O O O O O B I 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 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 B I O B I 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B I 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 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 B I 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


Applying data mining techniques for spatial distribution analysis of plant species co-occurrences The continuous growth of biodiversity databases has led to a search for techniques that can assist researchers. This paper presents a method for the analysis of occurrences of pairs and groups of species that aims to identify patterns in co-occurrences through the application of association rules of data mining. We propose, implement and evaluate a tool to help ecologists formulate and validate hypotheses regarding co-occurrence between two or more species. To validate our approach, we analyzed the occurrence of species with a dataset from the 50-ha Forest Dynamics Project on Barro Colorado Island (BCI). Three case studies were developed based on this tropical forest to evaluate patterns of positive and negative correlation. Our tool can be used to point co-occurrence in a multi-scale form and for multi-species, simultaneously, accelerating the identification process for the Spatial Point Pattern Analysis. This paper demonstrates that data mining, which has been used successfully in applications such as business and consumer profile analysis, can be a useful resource in ecology.

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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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


New feature extraction approach for epileptic EEG signal detection using time-frequency distributions Abstract This paper describes a new method to identify seizures in electroencephalogram (EEG) signals using feature extraction in time-frequency distributions (TFDs). Particularly, the method extracts features from the Smoothed Pseudo Wigner-Ville distribution using tracks estimated from the McAulay-Quatieri sinusoidal model. The proposed features are the length, frequency, and energy of the principal track. We evaluate the proposed scheme using several datasets and we compute sensitivity, specificity, F-score, receiver operating characteristics (ROC) curve, and percentile bootstrap confidence to conclude that the proposed scheme generalizes well and is a suitable approach for automatic seizure detection at a moderate cost, also opening the possibility of formulating new criteria to detect, classify or analyze abnormal EEGs. The electroencephalogram (EEG) is the record of the electrical activity of the neurons in the brain, and can be a good indicator of abnormality in the central nervous system. An abnormal EEG is a dynamic signal which exhibits non-stationary behavior with focal or multifocal activity, spikes, sharp waves, and focal mono-rhythmic discharges.. The particular abnormal EEG behavior we will deal with in this paper is associated to epilepsy, which is a neurological disorder in which patients suffer recurrent seizures with sudden incidence causing life-threatening situations and considerably perturbing their quality of life. This disease affects approximately 0.5% of the world population, 25% of which have incontrollable or medically intractable seizures.. In the 80s, EEG analysis was mainly based on two significant characteristics extracted from EEG: frequency and amplitude [33] . These approaches, which include EEG epoch analysis, spike detection, parametric models, methods of clustering, quantitative analysis, and spectral EEG signal analysis, assume quasi-stationarity, require long recordings and present relatively high false detection rates due to the presence of typical EEG artifacts [6, 41, 48, 47] . These methods give frequency and energy information but they do not provide temporal information about when seizure discharges begin. Another way of dealing with nonstationarity is to assume an underlying non-stationary stochastic EEG model, and describe the EEG record as a piecewise stationary signal. This strategy has been used in studies of seizure propagation, automatic recognition of epileptic seizures, and neuronal burst discharges [20, 21, 16] . The inability to accurately detect and quantify these changes and to automatically and efficiently analyze such long-time series has limited the understanding of epilepsy as well as the application of automatic detection systems in the clinical practice [42] .. The typical procedure for epilepsy seizure detection is based on brain activity monitoring through EEG data. This usually involves identifying sharp repetitive waveforms or rhythmic patterns in the EEG data that indicate seizure onset. This processing consumes a lot of time, especially in the case of long recordings, but the major problem is the subjective nature of the analysis, due to the lack of agreement among specialists when analyzing the same record [2] . From this perspective, it could be necessary to try to identify hidden dynamical patterns which could yield important insight into the underlying physiological mechanisms. From such analysis we could characterize the nonstationary behavior of the abnormal EEG signals and isolate seizure activity in the EEG with the final objective of developing automatic seizure detection systems.. Automatic detection of EEG seizures has been investigated for years. However, so far, no detector has demonstrated to have competitive sensitivity and specificity values due to the presence of artifacts such as line noise, eye movements, muscle artifacts and so on, that makes the detection more difficult being sometimes necessary a visual inspection. The availability of a good algorithm for seizure detection would simplify the review of hours and hours of EEG recordings. It would also be of great value if the detector could help to distinguish between real epileptic seizures and artifacts during non-epileptic events (high specificity).. In the last few years, EEG epileptic detectors have evolved including new techniques such as neural networks [2] , non-linear models [34] , independent component analysis (ICA) [30] , Bayesian methods [22] , support vector machines [19] , and variance-based methods [40] . Other group of methods potentially useful for detecting and analyzing nonstationary signals are time-frequency distributions (TFDs) [11, 23, 44] . These methods allow us to visualize the evolution of the frequency behavior during some non-stationary event by mapping a one dimensional (1-D) time signal into a two-dimensional (2-D) function of time and frequency. Therefore, from the time-frequency (TF) plane it is possible to extract relevant information using methods such as peak matching, filter banks, energy estimation, etc. [9, 10, 43] .. In this paper, we propose a peak-matching approach based on the McAulay-Quatieri (MQ) sinusoidal model [39] in order to detect tracks in the TF plane, follow their frequency value and measure their energy and length. Our goal is to obtain a new feature vector able to considerably improve the accuracy with low computational cost. We tailor this technique to our detection task and evaluate the proposed method in real EEG databases. This paper is organized as follows. Section 2 introduces the preprocessing method that provides an EEG without electrooculogram (EOG) artifacts and line noise. It also explains the different techniques that comprise the detection method: the segmentation algorithm, the SPWV distribution (Smooth Pseudo Wigner-Ville) as a suitable TFD chosen for epileptic EEG signals, the MQ peak estimation model applied to SPWV, and the feature extraction method. Section 3 shows the results of the seizure detection method applied to real EEG data from epileptic patients. In Section 4 the main results are discussed and the principal conclusions with further work are presented. A new feature extraction method in epileptic EEG signals relying on track extraction and analysis in a timefrequency plane is presented. Our results suggest that the proposed method is a powerful tool for extracting features in EEG signals. The feature vector based on track measurements such as length, frequency, and energy (L, F, E) in every segment is simple and useful for the detection task. It gives us ' tracks on the time-frequency plane 0(n, m) representing the true nature of the spectral components and really concentrates and localizes EEG frequencies with low computational cost. This opens up the possibility of classifying epileptic EEG channels in a new and promising way.. In order to account for noise, background, artifacts, and seizure activity, the EEG has been preprocessed using a low-pass filter and ICA. ICA has been reported to isolate multiple ictal components in EEG analysis [35] although The duration of EEG records and epilepsy episode are given in minutes there is a noticeable difference between ICA and low-pass filter when a visual inspection of the time-frequencies plane is done. Automatic EOG removal has proved to be useful except when EEG is very contaminated with muscle artifacts because ICA is not able to eliminate them totally.. Muscle artifacts are more difficult to suppress since its morphology and topography causes a confusion with the abnormal spikes. We think that this problem does not considerably affect the performance of the detection task because the seizure information is not affected if we do not eliminate the muscle artifacts. Additionally, a low-pass filter was chosen because it is possible to detect epileptic activity on low frequencies and the EEG typically has a frequency content from 1 to 40 Hz [37] .. We have seen the presence of tracks on the time-frequency plane during seizure events as also observed by other authors [11, 50] . In [11, 9, 10 ] the authors found a time-frequency seizure criteria based on two calibrations in time and time-frequency domain. In our case, we have proposed a new form of extracting features based on principal track by following the ridges (tracks) on the timefrequency plane and obtaining measures such as duration, frequency, and energy. The length of the ridge of the main time-frequency EEG component has been previously proposed in a number of applications including EEG [9, 10, 43] . Features such as energy and other frequency-based features have been widely used in the literature dealing with EEG. The extraction method proposed here is much simpler than others previously proposed in the literature, since they need many calibrations to properly work.. Another important issue is the applicability of the method to any distribution due to its non-dependency to a particular TFD. For example, the Ridges Extraction method [5] , which is a good approach for the reassignment method [23] , is able to extract relevant information from the time-frequency plane, but it depends on the values obtained by reassignment method affecting the time computation [23] . This problem is presented in [13] when the frequency update is not easy because it is necessary to modify the ridge detection algorithm.. The proposed technique could also be used in any scenario where different types of EEG activity have to be detected and associated to particular events. In brain computer interface (BCI) applications, the model could be adopted to detect ''brain actions'', e.g., moving up, left, right or down a cursor on a screen using EEG readings. The detection of other brain disorders could also be tackled [28, 46, 1] . However, further research is needed to validate the discriminative capability of the track extraction features in these new scenarios. Since the algorithm takes information from a TFD, it is necessary a suitable distribution for EEG signals, subject to the following compromise: high-quality resolution, good detection, and low computation time [8] .. With a good TFD choice, the localizations of both amplitude and frequency peaks are less problematic. We have chosen the smooth pseudo Wigner-Ville (SPWV) as the TFD suitable for EEG signal detection as it provides good resolution, low cross-terms, and is computationally efficient [23] .. Although the detector presented a good performance by the evaluation of receiver operating (ROC) curves, ''F score'' measure and confidence intervals, another important issue is how to select the threshold to yield high sensitivity. The particular value of magnitude threshold and D used during track extraction algorithm do not appreciably affect the results, but a good choice in these values is required. Likewise, it is necessary a long-term analysis to understand the epilepsy behavior and to account for all possible L values (maximum and minimum) in seizure, because our EEG data records were not very large. Further research into this matter including how to incorporate a threshold selection into an automatic seizure algorithm is worthwhile. Future works implies the study of a wide range of machine learning methods to better exploit the features proposed here to finally obtain improved seizure detections.. In conclusion, this paper presents a new EEG feature vector based on track measurements such as length, frequency, and energy (L, F, E) using the time-frequency distributions (TFD) and MQ sinusoidal analysis. The performance during detection shows that our feature vector is a suitable approach for epileptic seizure detection, it generalizes well, and opens the possibility of using this method in other scenarios such as brain computer interface (BCI) and detection of other brain disorders. The elimination of undesirable information of the EEG improves our task detection or EEG feature extraction. For example, Fig. 3 shows the results of three time-frequency representations of an epileptic EEG segment. We have the SPWV of the raw EEG (upper), the SPWV of the preprocessed EEG (middle), and track extraction using preprocessed EEG (bottom). Note how the ICA preprocessed EEG produces a SPWV transform that highlights the non-stationary signal in an epileptic episode permitting to better identify the tracks. We think that this improvement is due to the elimination of considerable contribution of noise, background, and artifacts that hide important information from seizure activity. This benefits the task of extracting features and detection of seizure activity, as will be shown in what follows. Figure 4 shows the results of tracks extraction on three EEG segments. Note the correspondence between a larger track and its oscillatory frequency, demonstrating the typical non-stationary behavior during epileptic episodes. Figure 5 shows the feature vector in an epileptic EEG register for k = 58 segments, consisting in L , F, and E (upper, middle, and bottom pannels, respectively) and illustrates how these features grow during the seizure (segment between the arrows).. In every EEG register we identify L* as the largest track, and F*, and E* the corresponding frequency and energy values, at the same position as L* in the register. The threshold values are selected as the median values of all L*, F*, and E* measures on the training set. The thresholds obtained by median values that we have used in what follows are " L ¼ 2:7 s, " F ¼ 4:13, and " E ¼ 24% To evaluate the performance of the proposed decision scheme, we use six random EEG records from patient 1 as training data, their L*, F*, and E* values are depicted in Upper SPWV of the raw EEG. Middle SPWV of preprocessed EEG. Bottom Track extraction from SPWV using preprocessed EEG. Note how it is easier to obtain a principal track (bottom) using a preprocessed EEG (middle) than a raw EEG (upper). We can also see the improvement in resolution obtained by this method highlighting the non-stationary behavior of the seizure Table 1 . The rest of the EEG recordings from that patient, plus data from patients 2-7, plus the N1 data collection are used as test data. Table 2 presents the results of sensitivity and specificity, which are defined as follows:. Sensitivity: Percentage of EEG segments containing seizure activity correctly classified. Specificity: Percentage of EEG segments not containing seizure activity correctly classified.. We also use another measure of performance of our detector as a function of dataset size called ''F score'' and defined as:. Note the good performance of our method when we test with different EEG data (patients number 2-7 and N1 problem in Table 2 ) and how this performance is also good when we try to detect epileptic activity from the same patient (patient number 1 in Table 2 ). Since dataset used in the Table 2 is quite small (the larger EEG is 15.01 min that corresponds to 901 samples), we use a new larger EEG database (N2) to evaluate the effect of the dataset size in our detector. To evaluate this effect we compute the receiver operating characteristics (ROC) and area under a ROC curve (AUC) for a varying data size. A value of AUC of 0.5 indicates random detections, and a value of 1 indicates perfect detection. Note how the AUC increases when more data are used, up to a maximum value of 0.925 (see Fig. 6, upper) .. A 95% confidence interval for the F score is estimated using N bootstrap datasets [25] . Each bootstrap dataset is a simple random sample from 50 to n values selected with replacement from the original EEG data (the increment step is 50). Because a bootstrap dataset is drawn with replacement, some of the original observations are repeated more Features extraction for an epileptic EEG register (k = 58 segments). The seizure is localized between the arrows and the EEG was segmented using n = 5 s. Upper Vector L. Middle Vector F. Bottom Vector E. The feature vector F gives us information about frequencies in seizure. We can visually choose the larger L* value (dotted arrow) with its corresponding values in frequency F* and energy E* to test the classification algorithm in new EEG datasets than once. The statistics are estimated for each bootstrap dataset and bootstrap confidence interval was computed as the percentile confidence, where the endpoints of the 95% confidence interval are given by the 25th and 975th sorted bootstrap values. For N2 problem, using N = 1000 and n = 1569 samples, the interval is (0.87, 0.95). Figure 6 (bottom) shows the evolution of F score for N = 1000, the median m = 0.91 (dashed line), and standard deviation r = 0.0217 (solid line curves represent m ± r). Note how the value of F score is more stable when we increase the size of the data and it presents a good percentile bootstrap confidence. Although the percentile bootstrap illustrated here is one of the simplest bootstrap confidence interval methods, this experiment in large EEG data discards the hypothesis that our results are overfitted to the data. The design of our EEG detection system comprises several stages: acquisition of raw EEG, low-pass filtering and ICA processing, windowing, SPWV analysis, MQ sinusoidal analysis, extraction of features and decision. The EEG is represented as a graph of voltage versus time measured in a number of sensors or electrodes. After acquisition and preprocessing steps, the analysis of the EEG usually relies on windowing the signal using an sliding window. Each resulting segment is processed using time-frequency analysis and then we apply peak energy matching on the TF plane based on the MQ sinusoidal analysis, with the objective of extracting features and using them for the task of detection. We assume the existence of some wave in epileptic seizures from results obtained by others authors [11, 23, 50] that have observed tracks along the time-frequency plane during a seizure. Our approach is detailed in what follows.

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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B I 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 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 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 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 B 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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