Efficiently identifying working sets in block I/O streams Identifying groups of blocks that tend to be read or written together in a given environment is the first step towards powerful techniques for device failure isolation and power management. For example, identified groups can be placed together on a single disk, avoiding excess drive activity across an exascale storage system. Unlike previous grouping work, we focus on identifying groupings in data that can be gathered from real, running systems with minimal impact. Using temporal, spatial, and access ordering information from an enterprise data set, we identified a set of groupings that consistently appear, indicating that these are working sets that are likely to be accessed together. We present several techniques to obtain groupings along with a discussion of what techniques best apply to particular types of real systems. We intend to use these preliminary results to inform our search for new types of workloads with a goal of identifying properties of easily separable workloads across different systems and dynamically moving groups in these workloads to reduce disk activity in large storage systems. Grouping data on disk provides benefits such as being able to avoid track boundaries [23] , isolate faults [24] , and avoid power consumption from excessive disk activity [19] . On exascale systems, these benefits are magnified because every 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. element in a group may be on separate disks, necessitating many extra spin-ups that both waste power and decrease the lifetime of the system [29, 20] . Identifying these groups has been a hot research area for some time, with significant work done to bridge the gap between the semantic information provided by the file system and the behavior of the physical disk controller [4, 25, 24] . We build on this work, but focus on performing the grouping on data that can be collected non-intrusively from a running system with no modifications to the system itself other than attaching a protocol analyzer to the disk bus. On a real system, it is frequently impossible to put in hooks to collect even file-level access data. It is even harder to label data in any way useful for grouping as the data is written. Our method assumes that all we have is enough physical access to place a protocol analyzer on the storage bus to gather our data.. Cache prefetching and clustering active disk data exploits the fact that recently accessed data is more likely to be accessed again in the near future on a typical server [26] . Unlike several techniques that group data based on popularity or "hotness," we group data by likelihood of contemporaneous and related access regardless of the likelihood for the group, or any of its members, to be accessed at all. We also present partitioning algorithms including graph theoretic techniques that have not yet been considered for predictive grouping.. Before we can do any system partitioning, we need to define what it means for two disk accesses to be similar, which leads to defining a distance metric for accesses. Defining a distance metric that captures the relationship between disk accesses without over-fitting or underestimating relationships is crucial to forming meaningful groups. We introduce a set of methods for defining similarity and partitioning data into working sets, and we apply these methods to a multi-week workload trace from a multi-application server used for computer science research to test our definitions of similarity and the utility of the working sets that the partitioning algorithms built over this similarity calculation return. While we do not delve into the high-level origins of working sets, these origins could include an application that always accesses a particular subset of data, a user who tends to stay in their home directory, or a class working together on a project stored in a particular space. Focusing only on the trace allows us to adapt as the use of the system evolves. Also, this method of characterization could expose previously undetected high level activity.. Our goal is to identify and rigorously define similarity between disk accesses from different applications and use this similarity to uncover groupings within the data ("working sets") with the eventual goal of dynamically rearranging blocks of data on disk such that working sets have physical locality. While single-use servers with predictable access patterns are common in large environments, smaller institutions and single users run several applications on the same server. This makes accesses on a shared disk appear random and makes it difficult to group data on the disk to take advantage of access locality. Large, long term storage systems that grow organically also develop heavily interleaved access patterns as more use cases are added to the system. Our grouping techniques are designed to untangle accesses made by different agents in order to provide better guidelines for on-disk placement of data in the future.. After reviewing other work in the field, we present our similarity metric and partitioning algorithms, along with a discussion of how parameters are selected and which methodology is best suited to which workload. We then present the working set groupings that each of these partitioning algorithms return. We then discuss the validity of our groupings, and conclude with a discussion of the implications of our groupings and the work we are currently doing to both improve groupings and characterize workloads based on ability to be grouped into working sets. We have presented two distance metrics and three partitioning algorithms for separating a stream of I/O data into working sets. We have found that the working sets discovered by our method are stable under perturbation, implying that they have a high level basis for existing. Our methods are broadly applicable across workloads, and we have presented an analysis of how different workloads should respond to different partitioning methods. Unlike previous work in the field, we perform analysis using only data than can be collected without impacting the performance of the system. Our methods are also designed to separate working sets that are interleaved within the I/O stream. Finally, our methods are designed for use on disks instead of cache, changing the design goals from "likely to be accessed next" to "likely to be accessed together.". A consistent, easily calculable grouping that is not tied to a specific workload opens up two main avenues of work that is essential for the next stage of exascale system development. First, we will be able to characterize workloads based on how they are separated and how separable they are. Knowing a workload is likely separable allows us to move onto the next step, which is dynamically re-arranging data across a large storage system according to the working set classification of the data. Being able to re-arrange data to minimize spin-ups will be essential to keeping down power cost and increasing the long term reliability of these increasingly vital storage systems. Our current project is to use a protocol analyzer to collect block I/O data from a mixed-use, multi-disk educational storage system to provide a direct comparison and validity numbers to extend this work. With this data stream, we hope to implement working set detection in real-time, as well as track potential power savings and reliability gains from grouping the data together according to the assigned working set.. Once we have more data, our next step is to discover what about a workload makes it amenable to this sort of grouping. We believe that workloads with distinct use cases, whether they be from an application or a user, are the best bet for future grouping efforts, but many HPC and long-term storage workloads share some of the surface level properties that make the application servers good candidates. The goal of this line of questioning is to derive a set of characteristics of a workload that would indicate how easy it is to group along with what parameters to try first.. Another angle we are interested in is backtracking from our working sets to discover which sources tend to access the same offsets of data. Once we know this, we can implement more informed cache prefetching and, in large systems, physically move the correlated offsets near to each other on disk to avoid unnecessary disk activity. Previous work has led us to believe that even if files are duplicated across disks, the potential gain from catching subsequent accesses in large, mostly idle systems is high enough to make it worthwhile [29] . We are also interested in refining the graph covering algorithm to accept groups that are only partially connected instead of requiring complete cliques by implementing techniques from community detection [9] . The most encouraging result of our study was the consistency of groupings in the data despite the sparsity of the traces. This indicates that it is worthwhile to look for groupings in similar multi-user and multi-application workloads even if the only data available is block offsets and timestamps. Being able to collect useful workloads without impacting privacy or performance is invaluable for continuing research in predictive data grouping. This also reduces the cost of our analysis substantially, since we can determine whether a workload will be separable before trying advanced techniques to identify groupings and disrupting the system to group working sets together on disk.. A concern early on was that the access groups we discovered would overlap, leading to a need to disambiguate and manually tune our models to the data set. It turned out, however, that in every classification scheme we used we never had overlapping group chains. This allowed us to keep our methodology general and more likely to be easily portable to other data. More importantly, this is a strong indication that our groupings represent separate access patterns. If they did not, it is likely some of them would have had over-lapping components since the accesses are uniformly distributed.. A pressing concern for the viability of this work is the speed of computations. At this stage, while testing algorithms, we wrote all code in Python and did not optimize for speed. Under this constraint, the localized distance techniques ran nearly instantaneously while the global techniques, particularly the graph techniques, took between 20 and 35 minutes per run. We believe that much of this speed can be regained by tighter code, and online implementations will handle less data per timestamp than our static test case.. We realize the assumption that block offsets do not uniquely identify a block is not strictly true in some systems. A majority of data that is frequently overwritten is in the cache block, however, and this is consistently identified as a single group by our algorithms. The less frequent overwrites that occur as a result of normal system use should be handled by the adaptability of our algorithms over time. If the content of a block offset changes, it will start being placed into different groups as the algorithms update the distance matrix.. One surprising feature of our dataset was that it had a long list of consecutive writes to the same block. We believe that these writes are the result of overwrite activity in a log or a disk-based cache. These types of points are frequently present but filtered in other block I/O traces [1] . We intentionally include these points in our classifications to verify that they trivially classify into their own working set. Our k-NN and bag-of-edges methods can work around the noise of the spike to produce realistic working set groups given reasonable parameters. We tested the neighborhood partitioning algorithm on our data first to get some visibility into what groupings were present in the data and whether it would be worthwhile to run our more computationally expensive algorithms. Neighborhood partitioning ended up being very susceptible to small fluctuations of its initial parameters and to the spike of writes in our workload. Figure 5 shows the working sets the algorithm returned with the neighborhood set to half a standard deviation, calculated over the entire trace. The read-write workload has a significantly tighter grouping because the prevalence of the writes in the cache area overtook any effect of the reads. Isolating the reads, we see in Figure 5 (b) that the working sets become larger and more prevalent. This is due to the reduction in noise, leading to stronger relative relationships between the points that are left. We also notice that this technique is very fragile to the choice of neighborhood. For example, reducing the neighborhood to a quarter of a standard deviation ( Figure 5(c) ) causes the number of large groups to fall sharply and correspondingly increases the prevalence of small groups. Figure 6 shows the working sets returned by running k-NN with k ranging from 3200 to 25600. The results for the k-NN working sets are more in line with expectations, with many more small groups and a few scattered large groups. The groups are fairly consistent across variation, with the larger neighborhoods resulting in somewhat fewer small groups compared to the smaller neighborhoods. Note that the graphs in Figure 6 are calculated after the cache group is taken out. The cache group is a group of size 44000 that was consistently identified by both the k-NN and bag-of-edges algorithms. The consistent identification of this group is a strong indicator of the validity of our grouping. For the sake of these graphs, however, removing it increases the visibility of the other groups and better highlights the differences between the variations in grouping parameters. On this dataset, our clique-based graph algorithm failed to ever find a group above size two. This is useless for actually grouping data on a system since the potential benefit to prefetching one element is much smaller than the cost of doing the partitioning. The small groups are a result of the strong requirements for being in a group that this algorithm requires: namely that every member in the group be strongly related to every other member. What this tells us is that transitivity matters for grouping, i.e., groups are a set of accesses that occur sequentially. Running the bag-ofedges algorithm on this data supports this hypothesis. This algorithm is built with sequentially related groups in mind, and it returned groupings comparable to k-NN in a fraction of the time. Figure 7 shows the groupings bag-of-edges returns. The levels in Figure 7 represent the levels for the n-level distance metric, where larger levels are equivalent to more lax thresholds. The majority of the groupings are similar to k-NN, though at higher levels of distance we lose the larger groups. This is due to the lack of cohesion in large groups versus smaller ones. We also suspect that there is noise interfering with the data when the search window is too large, similar to the read-write case for neighborhood partitioning. Figure 8 provides an example of the stability of bag-ofedges under varying the weighting factors added to the parameters that make up the distance metric: namely time and the difference in offset numbers. Grouping data for performance gains and other optimizations has a long history. The original BSD FFS aimed to localize associated data and metadata blocks within the same cylinder groups to avoid excessive seeks [16] .. Subsequent projects have focused on specific workloads or applications where grouping could provide a benefit. The DGRAID project demonstrated that placing blocks of a file adjacent to each other on a disk reduced the system impact on failure, since adjacent blocks tend to fail together [24] . Localizing the failure to a specific file reduces the number of files that have to be retrieved from backups. Our grouping methodology will allow for failures to be localized to working sets, which represent use cases, allowing more of the system to be usable in case of failure. Schindler et al. show the potential gain from groupings by defining track-aligned extents and showing how careful groupings prevent accesses from crossing these borders [23] . They also demonstrate the prevalence of sequential full-file access, and make a strong case for predicting access patterns across data objects in environments with small files. Since most files in a typical mixed workload are still under 3000 bytes [27] , we believe our technique can be used to help define track-aligned extents.. Arpaci-Dusseau et al. have made a variety of advances in semantically aware disk systems [25, 4] . Their online inference mechanism had trouble with the asynchronous nature of modern operating systems. We use a longer history of block associations to un-couple the relationships between applications, and we are working on implementing their inference techniques as a secondary classification layer. Their techniques for inode inference and block association gain a great amount of information by querying the blocks, however there is an implicit assumption here that we can identify and parse the metadata. We collect only the bare minimum of data, which allows our algorithms to work almost domainblind.. Dorimani et al. discuss a need for characterization of HPC workloads for the purpose of file grouping [8] . They also demonstrate a grouping using static, pre-labeled groups, where the mean group size is about an order of magnitude larger than the mean file size. Pre-labeled groupings such as these are hard to obtain for general workloads, and they are susceptible to evolving usage patterns and other variation in workload. By focusing on the core issue of inter-access similarity, we hope to be able to form dynamic groups from realtime access data. Oly and Reed present a Markov model to predict I/O requests in scientific applications [18] . By focusing on scientific applications, their work bypasses the issue of interleaved groups. Yadwadkar et al. also use Markov modeling, and they apply their model to NFS traces, doing best when groups are not interleaved [30] . Their method is more difficult to adapt to online data than the algorithm we present. Essary and Amer provide a strong theoretical framework for power savings by dynamically grouping blocks nearby on a disk [11] . Other predictive methods have shown good results by offering the choice of "no prediction," allowing a predictor to signal uncertainty in the prediction [2] . CMiner uses frequent sequence matching on block I/O data, using a global frequent sequence database [15] . Frequent sequence matching is susceptible to interlaced working sets within data and thus best for more specialized workloads, whereas our technique is suitable for multi-application systems.. Caching can be defined as looking for groupings of data that are likely to be accessed soon, based on any one of a number of criteria. Caching algorithms can even be adaptive and pick a cache criteria based on what provides that best hit rate [3] . The cache criteria can involve file or block grouping [19] , but typically only in the context of grouping together popular or hot blocks of the system [28] . This is necessary because cache space is precious, so placing related, but less accessed data into the cache would only serve to pollute it [31] . DULO biases the cache towards elements that have low spatial locality, increasing program throughput, but is affected by cache pollution issues for data that is rarely accessed [12] .. Our work is strongly based on previous work in cache prefetching techniques that predict file system actions based on previous events. Kroeger and Long examined using a variant of frequent sequence matching to prefetch files into cache [13, 14] . Their work provides strong evidence that some workloads (Sprite traces, in this case) have consistent and exploitable relationships between file accesses. We are targeting a different problem, though with the same motivations. Instead of deciding what would be most advantageous to cache, we would like to discover what is most important to place together on disk so that when the cache comes looking for it, the data has high physical locality and can be transferred to cache with minimal disk activity. We assume that our methods will be used alongside a traditional cache because they complement each other, and it has been shown that both read and write caches amplify the benefits of grouping [17] .. Minimizing disk activity for disk accesses is especially important on some types of systems such as MAID where data is distributed around mostly idle disks [5] . Diskseen performs prefetching at the level of the disk layout using a combination of history and sequence matching [7] . Pinheiro and Bianchini group active data together on disk to minimize the total number of disk spin-ups, but they are vulnerable to workloads where a several blocks are typically accessed together, but accessed infrequently [19] . In a large system for long-term storage, the effect of these infrequent accesses can accumulate to be a large drain on power [29] .. Our end goal is to tease apart the accesses instigated by separate applications in order to obtain sets of blocks that are likely to be read or written to together. In our data, we find that the read:write ratio is almost 10:90, implying that our workload is directly comparable to the workload for personal computers with single disks in Riska's workload characterization study [22] . Riska also suggests the idea of using a protocol analyzer to collect I/O data without impacting the underlying system. We tested our partitioning algorithms on a publicly available dataset from MSR Cambridge. The MSR dataset represents one week of block I/O traces of enterprise servers used by researchers at Microsoft Research, Cambridge and are available from SNIA [17] . We chose these traces for two reasons: first, they allow us to simulate the bare bones block-timestamp trace we can collect from a protocol analyzer. Secondly, these traces were collected in 2007, making them more recent than most other publicly available block I/O traces. Among the traces in the collection, we selectively chose to test those that were from multi-purpose machines and could thus provide the most interesting results. Table 1 shows a sample set of accesses in our data set. For the sake of our preliminary analysis, we assume that block offset and access size form a unique, permanent identifier for a particular snippet of data. We realize this assumption does not hold true over the long term or in frequently re-written data, and we discuss how this could alter our results in section 5. We classify blocks based on the difference in timestamps, block offset, and by the order they appear in the trace.. The offsets accessed in our data were spaced between 581632 and 18136895488. Though there are gaps, likely at- tributable to bad sectors, Figure 3 shows that the offsets are approximately uniformly distributed, which allows us to use a consistent distance metric across our search space. Figure 3 (a) shows the accesses by block over time, and Figure 3 (b) highlights the read activity. We see that despite some denser areas that likely correspond to a cache spike, the accesses in our data are approximately uniformly distributed across offsets.. This dataset was very write-heavy with a read/write ratio of 10:90. This ratio is almost entirely attributable to a small range of offsets that are likely to represent an on-disk cache. Figure 4 shows the access spike set against the otherwise near-uniform access distribution.

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


A multiscale wavelet-inspired scheme for nonlinear diffusion Nonlinear diffusion filtering and wavelet shrinkage are two successfully applied methods for discontinuity preserving denoising of signals and images. Recently, relations between both methods have been established taking into account wavelet shrinkage at one scale. In this paper, we propose a new explicit scheme for nonlinear diffusion which directly incorporates ideas from multiscale Haar wavelet shrinkage. We prove that our scheme permits larger time steps while preserving convergence to the mean signal value. Numerical examples demonstrate the behavior of our scheme for two and three scales.Mathematics Subject Classification 2000. 65T60, 65M06, 65M12, 94A12. Nonlinear diffusion filtering has become a powerful tool in signal and image restoration, e.g., for denoising purposes. The choice of nonlinear diffusion filters leads to impressive results by removing insignificant, small-scale variations while preserving important features such as discontinuities, see [4, 10, 14, 16] and the references therein. On the other hand, wavelet shrinkage methods were also successfully applied for removing noise without sacrificing important structures such as edges, see [1, 5, 7, 11] and the references therein. Recently, the connections between explicit discrete one-dimensional schemes for nonlinear diffusion and shift-invariant Haar wavelet shrinkage were established in [15, 12] . The authors showed that one step of a (stabilized) explicit discretization of nonlinear diffusion can be expressed in terms of wavelet shrinkage on a single spatial level. This equivalence allows a fruitful exchange of ideas between the two fields. For example, new wavelet shrinkage functions can be derived from existing diffusivity functions and vice versa leading to explicit schemes with well understood stability properties. These considerations were generalized to two spatial dimensions in [13, 18] . In particular, diffusion inspired wavelet shrinkage schemes with improved rotation invariance were proposed. However, while these approaches rely on one scale of wavelet shrinkage, wavelet filter banks are usually applied with multiple scales. Of course, multiscale shrinkage with Haar wavelets can be interpreted as application of the one scale nonlinear explicit diffusion scheme to hierarchical signals [15] . In this paper, we propose a wavelet inspired explicit diffusion scheme which directly incorporates multiple scales. The new discretization admits larger time steps than the original explicit scheme and is therefore more efficient. It has been shown already in [2] that translationinvariant wavelet shrinkage can be interpreted as a smoothing scale-space. We prove that the new explicit scheme satisfies a lot of discrete scale-space criteria as the average level invariance, a certain extremum principle and convergence to spatial average. Note that the ideas for proving scale-space properties from [16] can not applied here. Compared to the model of discrete diffusion filtering presented in [16] , our iteration matrices do not satisfy all conditions given there. In particular, the nonnegativity of all elements of the iteration matrix may be violated. In this paper, we restrict our attention to the one-dimensional spatial setting. Moreover, we do not take semi-implicit discretization schemes into account which do not suffer from time step restrictions, but require to solve a linear system of equations, see, e.g., [17, 16] . This paper is organized as follows. Section 2 reviews the relation between explicit schemes for nonlinear diffusion and shift-invariant one-scale Haar wavelet shrinkage in a matrix-vector notation. We extend this scheme to multiple scales in Section 3. This results in a new explicit diffusion scheme which allows larger time steps while preserving convergence. Section 4 deals with convergence and stability properties of our new scheme. Finally, we present numerical results in Section 5.

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


Dissimilarity-Based Algorithms for Selecting Structurally Diverse Sets of Compounds This paper commences with a brief introduction to modern techniques for the computational analysis of molecular diversity and the design of combinatorial libraries. It then reviews dissimilarity-based algorithms for the selection of structurally diverse sets of compounds in chemical databases. Procedures are described for selecting a diverse subset of an entire database, and for selecting diverse combinatorial libraries using both reagent-based and product-based selection. Computational methods for the processing of chemical structure information have been used to support drug-discovery programmes for more than three decades; however, the introduction of combinatorial approaches to drug discovery has now focused the industry's interest on tools that can analyse and control the floods of chemical and biological data resulting from such approaches.. In this paper, we have reviewed some of the techniques that have been developed for selecting diverse sets of compounds from chemical structure databases, both real (as with corporate structure files or files of available synthetic reagents) and virtual (as with fully enumerated combinatorial libraries), illustrating the techniques by focusing upon methods for dissimilaritybased selection that have been developed in our laboratory in Sheffield.. Although the techniques discussed here, and many others that have been reviewed elsewhere (Dean and Lewis, 1999) , provide effective and efficient means of selecting compounds there is still much scope for further work. A very simple, but important, task is that of comparing the many available methods to find those that are most suitable, both in terms of efficiency and effectiveness. Such studies are now appearing in the literature (Brown and Martin, 1996, 1997; Matter, 1997; Patterson et al., 1996) but only that by Snarey et al. (1998) has provided a detailed analysis of some of the dissimilarity-based selection methods considered in this paper. More importantly, the full value of methods for analysis molecular diversity will only be obtained when they are linked to other, existing approaches to computer-aided molecular design, such as ligand docking, pharmacophore mapping and quantitative structure-activity relationships (Martin and Willett, 1998) : the merits of such linked approaches are well illustrated by very recent work on the docking of combinatorial libraries (Jones et al., 1999; Kick et al., 1997) , and we can expect many further such reports in the next few years.

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


Data-Driven Grasp Synthesis Using Shape Matching and Task-Based Pruning Abstract-Human grasps, especially whole-hand grasps, are difficult to animate because of the high number of degrees of freedom of the hand and the need for the hand to conform naturally to the object surface. Captured human motion data provides us with a rich source of examples of natural grasps. However, for each new object, we are faced with the problem of selecting the best grasp from the database and adapting it to that object. This paper presents a data-driven approach to grasp synthesis. We begin with a database of captured human grasps. To identify candidate grasps for a new object, we introduce a novel shape matching algorithm that matches hand shape to object shape by identifying collections of features having similar relative placements and surface normals. This step returns many grasp candidates, which are clustered and pruned by choosing the grasp best suited for the intended task. For pruning undesirable grasps, we develop an anatomically-based grasp quality measure specific to the human hand. Examples of grasp synthesis are shown for a variety of objects not present in the original database. This algorithm should be useful both as an animator tool for posing the hand and for automatic grasp synthesis in virtual environments. A NIMATED characters in games and virtual environments must be able to interact with their world in a realistic way. One requirement is the ability to grasp objects in order to manipulate them. If a grasp is not carefully constructed, it may appear impossible or awkward. In fact, the anatomical complexity of the human hand makes it challenging to pose the hand in ways that appear natural.. The problem of posing the human hand in a natural way can be addressed by making use of a database of successful grasps. Even though the hand has a large number of degrees of freedom (DOF), it takes on a similar shape in many grasps, and it may be easy to find an example grasp that is a good match to the current problem. This paper presents a data-driven algorithm for selecting hand poses to grasp an object in a natural way. The key insight presented in this paper is that, when a grasp database is available, grasping can, to a large extent, be treated as a shape matching problem (Fig. 1) . As intuition for why shape matching may be an effective way to select a grasp from a database, consider Fig. 2 , which shows the hand pose for a grasp of a mouse. The shape of the inside surface of the hand gives us a great deal of information about the shape of the mouse. We represent this shape information by extracting from each example grasp a set of representative contact points and normals. 1 If we find a similar arrangement of contact points and normals on the surface of a different object, then we may be able to reuse the same hand pose to grasp the new object. For example, the mouse grasp is used in the leftmost image in the middle row of Fig. 1 to hold the spray bottle.. Shape matching is commonly used in other fields-examples include object recognition in computer vision [1] and example-based retrieval of geometric models in computer graphics [2] . However, the use of shape matching for grasp synthesis presents some new challenges. First of all, the hand surface gives us information about only a portion of the surface of the object. Because of this, global measures of shape such as overall volume and principal directions cannot be used to match the shape of the inner surface of the hand to the shape of the object. This problem also arises in the vision community-where there may be only partial shape information available from range scans, for example. In those circumstances, discriminative local features are typically used to compensate for the absence of global shape information (for example, [3] ). Discriminative local features are local regions of three-dimensional (3D) geometry (curves, corners, angles, and so forth) that are useful for distinguishing one shape from another. However, in shape matching for grasp synthesis, our local features are typically not discriminative. They generally consist of contact patches that are nearly planar and ellipsoidal in shape. As such, they are not helpful for distinguishing between different grasped objects or different hand shapes.. In this paper, we present a novel algorithm that allows us to overcome the problem of partial shape information that does not contain discriminative local features. The main idea behind our approach is to randomly generate a set of global shape features from the contact points and normals representing a grasp. These features are global in the sense that they capture arrangements of contacts with respect to one another. If a similar collection of features can be located on an object surface, then we hypothesize that the hand shape may match this object surface and attempt to find alignments of the hand to the object that achieve the desired overall arrangement of contacts and normals. We tailor our solution to the domain of grasp synthesis by 1. Specifically, the contact points are selected by hand from a discrete set of possibilities each time the user enters a new grasp into the database. Normals are obtained by taking the normal from the closest point on the object surface. making use of shape features that contain contact normal information, which is important for grasping.. Our shape matching algorithm is extremely successful in that it returns a large number of candidate grasps. However, many of these grasps are not appropriate for the desired task (for example, to lift the object to place it on a shelf). To obtain the single best grasp or a small set of candidate grasps to present to the user, we cluster the results and then prune them using a grasp quality metric. For effective pruning, we develop a novel grasp quality measure that compares the ability of the hand to apply forces to the grasped object to those forces needed to accomplish the task. Our model of grasp quality captures anatomical features of the human hand (for example, the fact that flexors are stronger than extensors) and distinguishes grasps having a good arrangement of contacts over the object surface from those that do not.. Portions of this work have appeared separately in [4] and [5] . In this paper, we bring the ideas of shape matching and task-based quality metrics together into a single system for humanlike grasp synthesis. Specifically, we add a refinement algorithm to the shape matching portion of the algorithm to achieve solid contact with the object, and we present many new results and observations from evaluating the resulting grasps based on the intended task. This paper describes a shape matching algorithm for synthesizing humanlike enveloping grasps that is inspired by work in geometric model matching. We have described an approach that handles the specific challenges of applying shape matching to grasp synthesis. The availability of only partial information is handled using a representative descriptor approach, and the lack of good local features is handled by sampling a global shape function. We introduce a novel global shape function that emphasizes the relations Fig. 22 . Best hand poses for the spray bottle. The first grasp (lightbulb grasp) is the best among the five candidates of water bottle and lightbulb grasps, considering the partial spray bottle shape. The next three grasps are chosen from the twelve candidates (phone, jelly jar, and mouse grasps) considering the entire spray bottle shape. Among these three grasps the first two are jelly jar grasps, and the last one is a phone grasp. Fig. 23 . Best hand poses for the mouthwash bottle. The first grasp (phone grasp) is the best among 19 candidates (phone, jelly jar, coke bottle, and mug grasps) considering the partial mouthwash shape. The last two grasps are chosen from the 16 candidates (phone, mouse, coke bottle, mug, and softball grasps) considering the entire mouthwash shape. The first one is a coke bottle grasp and the second one is a softball grasp. Fig. 24 . Best hand poses for the sander. The first two softball grasps are the best among the five candidates (mug and softball grasps) considering the partial sander shape. The last grasp is the sauce jar grasp, the best among the 11 candidates (sauce jar, mug, and softball grasps) considering the whole sander shape. between relative positions and normals of pairs of oriented points, and we introduce a mechanism to weight features relative to one another to improve the discriminatory power of our shape matching algorithm. To prune unsuitable matches from consideration, we introduce a grasp quality metric that compares forces that can be exerted by the hand to those required for the task.. There are several limitations to the current algorithm that must be addressed in future work. First of all, our algorithm assumes that the animated hand model is very similar to the hand of the actor whose motion was originally captured. If the same joint angles are assumed for a similar hand, the database should still represent plausible grasps. However, adapting grasps in the database to extremely different hand kinematics may produce unnatural results. Retargeting grasps in the database to different hands while preserving the "intent" of the grasp is an interesting topic of future work.. The algorithm uses a number of sampling steps. The sampling process is straightforward, easy to implement, and effective. However, it is inefficient, and processing a new object to obtain a small set of grasps to present to the user requires several minutes of runtime. There are many ways this process could be made more efficient (for example, with fast nearest neighbor algorithms), although we expect that obtaining real-time performance may be challenging with today's computers. In addition to efficiency considerations, sampling has the potential to poorly sample high-frequency or very thin features. Objects for which power grasps are applicable, however, do not typically have such features; we did not have any such difficulties with the objects in our database.. We considered power grasps almost exclusively because the large number of contacts between the hand and object provided a great deal of useful shape information. Precision grasps could also be addressed using this framework. However, if there are only two, three, or four contacts between the hand and object, the possibility of more efficient algorithms should be considered.. Our current refinement algorithm has some difficulty in achieving all of the desired contacts (for example, see Figs. 25 and 27) . There are two primary reasons for this difficulty. The first is that the set of algorithms we use are threshold-based. For example, if a contact is too far from the surface, we do not attempt to move it to a surface point. However, there is no one threshold that works in all cases, and although we attempted to set thresholds that produced generally good results, there were still a number of failures, the most extreme of which are shown here. The second reason for the difficulty in achieving the desired contacts is that the standard Jacobian-based IK algorithm we were using produced highly unnatural grasps in our first implementation (for example, unnatural twisting of the fingers), and we chose to impose stringent joint limits in order to avoid these problems. A more satisfying solution may be obtained by developing an IK algorithm that takes hand synergies into account or formulates the pose refinement task as a more general optimization or control problem. Improving the refinement algorithm is a topic of future research.. Our results show that the shape matching algorithm can find very good matches between the hand and the object surface. In fact, we were surprised at the variety of good matches found using our small database of 17 grasps, even after functionally poor grasps were pruned using our quality metric. At present, a user must select the desired grasp from among the possibilities presented by the system because some of the grasps appear unintuitive. For example, the hand may appear to be grasping the object "backward" or "upside down." Objects such as tools with buttons or levers may require customized shape matching algorithms that can exploit these features (for example, see Miyata et al. [60] ) and, for a fully automatic system, aspects of natural grasps other than the ability to apply forces must be taken into account. Much research remains to be done to better understand human grasping (for example, see [61] ) and to develop algorithms that quantify the "naturalness" of grasps. For example, comfort and reachability of the hand and arm pose must certainly be considered. Results are presented to illustrate the discriminative power of our features, to show the effectiveness of the shape 3 . A more complete analysis would consider the distinction between sets of contact forces that can be resisted by the hand and those that can be actively applied. In our experiments and in most practical grasps, the two sets of forces are identical, and the constraint equations in (17) are sufficient. Please see [5] for more detail. Fig. 16. (b) Silhouettes of the 17 objects in our database. The highlighted "partial objects" show the regions of those objects that were grasped to form the hand pose database. (a) New objects that were not in the database were used as query objects to test our algorithm. Specifically, we created four queries pictured from top to bottom as 1) the entire surface geometry of a mouthwash bottle, 2) the entire surface geometry of a spray bottle, 3) a portion of the surface of a sander, and 4) a portion of the surface of a spray bottle. Fig. 21 shows results from these four queries.. matching, clustering, and refinement algorithms, and to demonstrate use of our grasp quality metric. Algorithms for grasp synthesis that consider complex hand kinematics are typically procedural or rule-based [6] , [7] , [8] , [9] , [10] , [11] , [12] . These systems involve treating all or part of an object as a primitive shape (for example, box, cylinder, and sphere) for which a grasp synthesis strategy is available. This approach is supported by classifications and taxonomies of observed human grasps [13] , [14] , [15] . However, creating a rule-based grasping system based on these classifications requires a significant amount of skill on the part of the designer, and it may not always be clear how to fit irregularly shaped objects into a given classification system. Our goals in this paper are to reduce the knowledge and tuning required of the algorithm designer by 1) making use of a grasp database to capture variation in hand shape both across and within families of grasps and 2) developing a grasp synthesis algorithm that allows an appropriate grasp to be selected from the database based on object geometry and task definition.. Data-driven grasp synthesis has been used by Pollard and Zordan [16] , who automatically construct a controller for grasping by fitting control setpoints from measured human example grasps and, similarly, by Kry and Pai [17] , who create grasping controllers to match the measured stiffness in measured hand-object interactions. However, in both cases, the grasp synthesis algorithms cannot form appropriate controllers for objects that differ substantially from those objects in the database. The work in the current paper could be combined with that in [16] or [17] to create a more robust and flexible grasping system. In other datadriven work related to grasping, ElKoura and Singh [18] use a data-driven approach to animate the hand for guitar playing. They use a database of human grasps to filter results produced using an inverse kinematics algorithm so that a natural coupling between joint angles is expressed.. Data-driven approaches are now quite popular for tasks such as reaching, kicking, and locomotion (for example, [19] , [10] , [20] ). In particular, Yamane et al. [21] make use of a database to obtain a full body posture for characters that are grasping and moving objects. However, these systems often work by identifying poses that match constraints such as the end-effector position. Extending this approach to work for nontrivial grasps is challenging due to the large amount of contact between the hand and object. This difficulty motivated us to consider an alternative approach based on matching the shape of the inner surface of the hand to the geometry of the object.

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


Robust histogram construction from color invariants for object recognition Abstract-An effective object recognition scheme is to represent and match images on the basis of histograms derived from photometric color invariants. A drawback, however, is that certain color invariant values become very unstable in the presence of sensor noise. To suppress the effect of noise for unstable color invariant values, in this paper, histograms are computed by variable kernel density estimators. To apply variable kernel density estimation in a principled way, models are proposed for the propagation of sensor noise through color invariant variables. As a result, the associated uncertainty is obtained for each color invariant value. The associated uncertainty is used to derive the parameterization of the variable kernel for the purpose of robust histogram construction. It is empirically verified that the proposed density estimator compares favorably to traditional histogram schemes for the purpose of object recognition. COLOR is a powerful information cue for object recognition. To provide object recognition robust against confounding imaging conditions (e.g., illumination, shading, highlights, and interreflections), color histograms are usually computed from photometric color invariants [1] , [2] , [3] , [4] , [5] . For example, illuminationindependent color ratios have been proposed by Funt and Finlayson [1] and Nayar and Bolle [6] . Further, for the dichromatic reflection model, Gevers and Smeulders [2] showed that normalized color rgb (c 1 c 2 c 3 ) is to a large extent invariant to a change in camera viewpoint, object pose, and the direction and intensity of the incident light. In addition, the hue color space H (l 1 l 2 l 3 ) is insensitive to highlights under the restriction of white illumination or a white-balanced camera.. Although color invariance is essential for robust color-based object recognition, the corresponding color transformations used to compute these color invariants bring with them several serious drawbacks, since these transformations are singular at some sensor values and unstable at many others. In fact, color ratios, rgb, and the c 1 c 2 c 3 color space become unstable near the black point while hue H and l 1 l 2 l 3 are (very) unstable near the achromatic axis [2] . As a consequence, a small perturbation of sensor values will cause a large jump in the transformed values. Traditionally, the effect of noise blow-up at unstable color invariant values is simply ignored or suppressed by ad hoc color thresholding. For instance, during histogram construction, all sensor values along the achromatic axis could be discarded by eliminating all sensor values having a saturation and intensity value smaller than 5 percent of the total range. Inevitably, more elaborated computational methods are required to construct robust histograms from color invariants.. Therefore, in this paper, a more principled method is proposed to suppress the effect of noise during histogram construction from color invariants. To achieve this, variable kernel density estimation is employed to construct color invariant histograms. To apply variable kernel density estimation in a proper way, computational methods are presented for the propagation of sensor noise through color invariant transformations. As a result, the associated uncertainty is known for each color invariant value. The associated uncertainty is used to derive the optimal parameterization of the variable kernel used during histogram construction. This paper is organized as follows: In Section 2, related work is reviewed. A theoretical model is presented in Section 3 to derive the uncertainty for each color invariant value. In Section 4, the optimal kernel parameterization is proposed and incorporated in the variable kernel density estimator. Then, in Section 5, experiments are conducted in which the computed uncertainty in the transformed color values is empirically compared to the actual uncertainty. Finally, in the context of color-based object recognition, the variable kernel density estimator is compared to traditional histogram matching. In this paper, variable kernel density estimation is used to construct robust color invariant histograms. The variable kernel density estimation is derived from a theoretical framework for noise propagation through color invariants. In this way, the associated uncertainty is computed for each color invariant value, which is used to steer the kernel sizes. From the theoretical and experimental result, we conclude that kernel density estimator overcome the problem of ad hoc thresholding at unstable color invariants. Further, our method is less sensitive to Gaussian noise than traditional histogram construction schemes. A drawback of the variable kernel method compared to traditional histogram construction is that the method is computationally more expensive. It is known from Kender [7] that normalized color rgb is undefined at the black point (R ¼ G ¼ B ¼ 0), and that hue H is undefined at the entire achromatic axis (R ¼ G ¼ B). Moreover, rgb and H become very unstable at these singularities, where a small perturbation in the RGB-values (e.g., due to sensor noise) will cause a large jump in the transformed values. Traditionally, this effect of noise blow-up is suppressed by ad hoc thresholding of the transformed values. Ohta [8] considers only RGB-values if the intensity is larger than 30 (on a range of 256 values), and rejects hue values if the saturation times the intensity is less than nine. Healey [9] rejects rgb-values when the RGB-values fall within the sphere of radius 4 centered at the origin of the RGB space.. A more elaborated approach is given by Burns and Berns [10] , analyzing the error propagation through the CIE L Ã a Ã b Ã color space. The goal was to estimate the influence of the mean, variance, and covariance of the CIE L Ã a Ã b Ã colors under the influence of noise. Further, Shafarenko et al. [11] use an adaptive filter for noise reduction in the CIE L Ã u Ã v Ã space prior to 3D color histogram construction. In fact, the filter width is steered based on the covariance matrix of the noise distribution in the CIE L Ã u Ã v Ã space. As opposed to previous work, the aim of this paper is to use kernel density estimation (see, e.g., [12] , [13] ) to construct robust color invariant histograms for the purpose of object recognition. Kernel density estimators form an alternative to histograms as density estimators. The novelty of this paper is to propose a mathematical framework to variable kernel density estimation based on noise propagation through color invariants. In this way, the associated uncertainty is computed for each color invariant value which is used to steer the kernel sizes. Although the method is suited for different color invariants (e.g., color ratios, c 1 c 2 c 3 , l 1 l 2 l 3 , etc.) or color transformations in general, in this paper, we focus on normalized color rgb, opponent color o 1 o 2 , and hue as these color spaces are widely in use in computer vision tasks. In this section, the performance of the proposed variable kernel density estimator will be evaluated. First, the accuracy of noise propagation is empirically verified. Then, the kernel density estimation is experimentally compared to traditional histogram schemes in the context of color based object recognition. For the experiments, the hue range is defined from 0 to 360 over a 1 interval. The normalized color range is defined from 0 to 255 units over 1 unit intervals. The images are obtained using a Sony XC-003P color camera and Matrox Corona framegrabber.

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


A flood-based information flow analysis and network minimization method for gene regulatory networks Background: Biological networks tend to have high interconnectivity, complex topologies and multiple types of interactions. This renders difficult the identification of sub-networks that are involved in condition-specific responses. In addition, we generally lack scalable methods that can reveal the information flow in gene regulatory and biochemical pathways. Doing so will help us to identify key participants and paths under specific environmental and cellular context.Results: This paper introduces the theory of network flooding, which aims to address the problem of network minimization and regulatory information flow in gene regulatory networks. Given a regulatory biological network, a set of source (input) nodes and optionally a set of sink (output) nodes, our task is to find (a) the minimal sub-network that encodes the regulatory program involving all input and output nodes and (b) the information flow from the source to the sink nodes of the network. Here, we describe a novel, scalable, network traversal algorithm and we assess its potential to achieve significant network size reduction in both synthetic and E. coli networks. Scalability and sensitivity analysis show that the proposed method scales well with the size of the network, and is robust to noise and missing data.The method of network flooding proves to be a useful, practical approach towards information flow analysis in gene regulatory networks. Further extension of the proposed theory has the potential to lead in a unifying framework for the simultaneous network minimization and information flow analysis across various "omics" levels. In this paper, we have presented the method of network flooding that aims to minimize regulatory networks in order to capture core regulatory patterns and information flow for specific biological conditions. We introduced a scalable, robust, graph-based algorithmic implementation that can achieve impressive network size reduction, without disrupting core regulatory pathways in synthetic datasets. When network flooding was applied in the reconstructed E. coli regulatory network, it was able to Figure 7 Flood network minimization overview for the E. coli gene regulatory network in the "Stationary phase" scenario.. (A) Sub-network "reachable" from the inputs, which contains all nodes directly or indirectly regulated by the input nodes; (B) and (C) reduced sub-networks of nodes with the flood above 0.25 and 0.65 thresholds, respectively. Nodes represent genes; dark blue nodes in the center are the regulator nodes; light blue nodes in the outer circles are the regulated nodes (regulated genes from the same transcription unit and identical regulation are grouped together); grey nodes are the genes which are not included into the sub-network. Transition phase / expression data σ 70 , σ 38 Genes expressed in the transition from the exponential to the stationary phase (microarray expression data (23) 1,595 34 241 102 52. Total number of genes is shown for a sub-network regulated by the selected inputs. Total flood is shown for full and minimized networks with three different flood thresholds (the maximum flood through a link is 1.0). Ideally, performance evaluation of the network floods theory requires complete regulatory networks where all nodes and links are present, together with link directionality and a signed weight. In addition, the quantitative expression model for each node should be known, and the phenotypic change after the network reduction should be measurable for informative comparison between the original and minimized network. Since currently we are far from having any such dataset, we first adopted a similar approach to what is used for benchmarking gene network reconstruction algorithms, by constructing synthetic datasets of in silico organisms [24] . We used a multi-scale microbial evolution simulator to create a synthetic complete dataset with the information mentioned above to comprehensively evaluate the proposed methods. Our results show that our method has very good scaling, is robust to noise and missing data, and does not require full network knowledge. We then evaluated our method with experimental data in the case of the bacterium E. coli, a well-studied model organism. The source code, sample data files and a brief tutorial on the network flooding algorithm is provided in Additional file 1. In the last decade we have witnessed an explosion of biological data that are available in all branches of the Tree of Life. Significant advances in the biotechnological and computational realm have enabled new ways of acquisition, representation, analysis, and integration of many heterogeneous and seemingly disparate sources of data. This has led to the development of numerous databases that contain validated and putative associations between DNA, proteins or metabolites and various inference algorithms for network reconstruction. Still, in many cases, we lack the methods to extract information that is specific to a cellular mechanism, a biological behavior, or a complex phenotype from the plethora of the available data. The need to develop such methods will become increasingly more obvious, due to the projected accumulation of data in the following years.. Here, we address the problem of network minimization and regulatory information flow in gene regulatory networks. Given a gene regulatory network, a set of source (input) and a set of sink (output) nodes, our task is to find (a) the minimal sub-network that encodes the regulatory program which involves all input and output nodes and (b) the information flow from the source to the sink nodes of the network. Concomitantly, if no sink nodes are specified, our task is reduced to identify the underlying pathways and nodes that are recipients of the information propagated from the source node(s). In this context, source nodes can be thought as cellular components that are sensitive to environmental fluctuations, and they can propagate this information to their downstream targets. In bacteria, this set includes intracellular and transmembrane receptors that participate in complex behaviors, such as chemotaxis and quorum sensing, transcription factors and response-specific proteins that are (in)activated by external environmental stimuli, and sigma factors that initiate system-wide regulatory responses to environmental changes, such as heat shocks and nutrient limitation. In vertebrates, this list expands even more to include proteins involved in signal propagation in the nervous system, tissues, and organs. Similarly, sink nodes represent downstream targets of interest. Some examples include enzymes that participate in metabolic reactions, and proteins that are responsible for complex traits, such as stress-response proteins, motility genes, and genes involved in aerobic respiration.. The theory of network floods that we introduce here is a fundamental extension of network flow theory for networks where (a) interactions can be negative and (b) flow is replicated instead of conserved, as it is the case in regulatory networks. Network flow theory [1] [2] [3] has been traditionally applied in other disciplines, including multiprocessor scheduling [4] , transportation [5] , and sociology [6] . Despite the availability of efficient methods in the field early on [7] , network flow theory has not been applied in this biological context. The network flow theory cannot be applied directly to biological systems in general, and gene regulatory systems more specifically, since the interactions that take place in biological networks and the network properties are of different nature when compared to the networks in other applications. One of the most striking difference is that network flow is not conserved in each node, in other words, the sum of all incoming flows is not equal with the sum of all outgoing flows. In fact, most regulatory networks exhibit flow replication, where the sum of the incoming flow is replicated in each of the outgoing interactions. This network characteristic captures the process of transcriptional activation of a gene that itself has multiple downstream targets. In that case, each outgoing regulatory edge from that node can have activatory or inhibitory information that does not have to conform to any flow conservation rule. As an example of this flow replication property, imagine a transcriptional regulator, (e.g. the AraC activator protein) that can bind to two distinct promoters in the genome, which drive two different genes. In that case, upregulation of the araC gene will signify the simultaneous up-regulation of the downstream targets (the two distinct genes). In this typical case, there is no conservation rule of any sort, for example the number of AraC copies do not have to be equal to the number of the two gene copies. Furthermore, given saturating levels of regulatory protein, the effect of the regulation will be the simultaneous up-regulation of all upstream genes and thus the replication of the information flow to each distinct path. The vast majority of signal transduction network analysis methods are focused on topological features [8] , such as motifs and binary interactions between nodes in the network [9] . Other approaches use Boolean theory to infer hidden regulatory pathways [10] or compute the minimal set of nodes that can perform signal transduction independently [11] . Although these methods provide valuable insight, they can't capture quantitative relationships between nodes that are critical for elucidating the network dynamics, and where the weights of the individual edges have a critical role. In a recent study the information flow of acyclic, activationonly, hierarchical networks was studied using continuous expression models [12] . Other relevant prior work includes the application of elementary modes in signaling and regulatory networks for functional analysis [13] , shortest path algorithms for biological interaction paths [14, 15] , application of Petri-net based analysis to signal transduction pathways [16] , partitioning biological data with transitivity clustering [17, 18] , and measuring information flow through random walks ignoring inhibitory links [19] . In contrast to the methods that mostly target clustering or motif finding in biological data, network flooding can elucidate the regulatory information flow taking into account regulation weight and sign, an important challenge in systems biology [9, 20] , and perform hypothesis-specific network minimization towards transforming data and networks to knowledge. Although network-based approaches have been developed in the past mainly for metabolic networks [21] [22] [23] , they are not suitable to be applied in cases where both positive and negative regulation is present and flow conservation does not hold. Figure 1 depicts different scenarios for network minimization and information flow in regulatory networks. Given a set of input/output nodes and an undirected network, node reduction can be achieved by deleting nodes that are not connected to sub-graphs that contain at least one input or output nodes ( Figure 1A) . In a directed weighted network where regulation follows an additive continuous model where the combined information flow through an edge is a continuous variable and can be less or equal than that edge's weight, this approach can be extended to discard nodes that do not regulate the output node(s) directly or indirectly ( Figure 1B ). In the flood network analysis that is introduced in this paper, the weight, sign and directionality of the network is taken into account in order to minimize the network and reveal the flow of information in the various pathways ( Figure 1C ).. Note that network flooding is very different from simple superposition of negative and positive regulatory weights for each node, as it takes into account the amount of regulatory information in the preceding paths. For instance, nodes 5 and 6 have exactly the same regulatory influences (both direction and strength). However, while node 6 will be activated and propagate the signal to downstream nodes, node 5 will be inactive, due to the large information flow from node 1 to node 2 (compared to the small information flow from 1 to 4), which in this case has an inhibitory effect. The outcome of this process is thus highly dependent on both the network topology, and the corresponding weights. The problem becomes more challenging in the presence of loops and cycles, where simple network traversals (such as depth/breadthfirst search) are not applicable. In addition, network flooding is fundamentally different from network flows, as it introduces negative regulatory interactions and conservation of flow is not guaranteed for each node, as it would be the case in metabolic processes. The latter is a necessary addition to realistically capture regulatory interactions, as regulatory information is usually replicated as it passes through a node with multiple outputs. In this section, we define the problem of gene regulatory network (GRN) minimization and we introduce the network flooding method along with an algorithmic implementation. Before we describe the method of network flooding, we first define some terms that we will use in its description.

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