Post-Selection Inference for Changepoint Detection Algorithms with Application to Copy Number Variation Data
Sangwon Hyun, Kevin Lin, Max G'Sell, Ryan J. Tibshirani

TL;DR
This paper develops tailored post-selection inference methods for changepoint detection algorithms, especially in copy number variation data, enhancing uncertainty quantification and practical usability.
Contribution
It adapts post-selection inference techniques for specific changepoint algorithms, incorporating randomization and MCMC methods to improve test power and usability.
Findings
Improved power in post-selection tests using auxiliary randomization.
Effective application of methods to copy number variation data.
Guidelines for practical implementation and analysis.
Abstract
Changepoint detection methods are used in many areas of science and engineering, e.g., in the analysis of copy number variation data, to detect abnormalities in copy numbers along the genome. Despite the broad array of available tools, methodology for quantifying our uncertainty in the strength (or presence) of given changepoints, post-detection, are lacking. Post-selection inference offers a framework to fill this gap, but the most straightforward application of these methods results in low-powered tests and leaves open several important questions about practical usability. In this work, we carefully tailor post-selection inference methods towards changepoint detection, focusing as our main scientific application on copy number variation data. As for changepoint algorithms, we study binary segmentation, and two of its most popular variants, wild and circular, and the fused lasso. We…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
\frefformat
plainTHMtheorem\fancyrefdefaultspacing#1\FrefformatplainTHMTheorem\fancyrefdefaultspacing#1\frefformatvarioTHMtheorem\fancyrefdefaultspacing#1#3\FrefformatvarioTHMTheorem\fancyrefdefaultspacing#1#3 \frefformatplainthmtheorem\fancyrefdefaultspacing#1\FrefformatplainthmTheorem\fancyrefdefaultspacing#1\frefformatvariothmtheorem\fancyrefdefaultspacing#1#3\FrefformatvariothmTheorem\fancyrefdefaultspacing#1#3 \frefformatplainLEMlemma\fancyrefdefaultspacing#1\FrefformatplainLEMLemma\fancyrefdefaultspacing#1\frefformatvarioLEMlemma\fancyrefdefaultspacing#1#3\FrefformatvarioLEMLemma\fancyrefdefaultspacing#1#3 \frefformatplainlemlemma\fancyrefdefaultspacing#1\FrefformatplainlemLemma\fancyrefdefaultspacing#1\frefformatvariolemlemma\fancyrefdefaultspacing#1#3\FrefformatvariolemLemma\fancyrefdefaultspacing#1#3 \frefformatplainlemmalemma\fancyrefdefaultspacing#1\FrefformatplainlemmaLemma\fancyrefdefaultspacing#1\frefformatvariolemmalemma\fancyrefdefaultspacing#1#3\FrefformatvariolemmaLemma\fancyrefdefaultspacing#1#3 \frefformatplainpropproposition\fancyrefdefaultspacing#1\FrefformatplainpropProposition\fancyrefdefaultspacing#1\frefformatvariopropproposition\fancyrefdefaultspacing#1#3\FrefformatvariopropProposition\fancyrefdefaultspacing#1#3 \frefformatplaincorcorollary\fancyrefdefaultspacing#1\FrefformatplaincorCorollary\fancyrefdefaultspacing#1\frefformatvariocorcorollary\fancyrefdefaultspacing#1#3\FrefformatvariocorCorollary\fancyrefdefaultspacing#1#3 \frefformatplaindefdefinition\fancyrefdefaultspacing#1\FrefformatplaindefDefinition\fancyrefdefaultspacing#1\frefformatvariodefdefinition\fancyrefdefaultspacing#1#3\FrefformatvariodefDefinition\fancyrefdefaultspacing#1#3 \frefformatplainclclaim\fancyrefdefaultspacing#1\FrefformatplainclClaim\fancyrefdefaultspacing#1\frefformatvarioclclaim\fancyrefdefaultspacing#1#3\FrefformatvarioclClaim\fancyrefdefaultspacing#1#3 \frefformatplainsssubsection\fancyrefdefaultspacing#1\FrefformatplainssSubsection\fancyrefdefaultspacing#1\frefformatvariosssubsection\fancyrefdefaultspacing#1#3\FrefformatvariossSubsection\fancyrefdefaultspacing#1#3 \frefformatplainalgalgorithm\fancyrefdefaultspacing#1\FrefformatplainalgAlgorithm\fancyrefdefaultspacing#1\frefformatvarioalgalgorithm\fancyrefdefaultspacing#1#3\FrefformatvarioalgAlgorithm\fancyrefdefaultspacing#1#3 \frefformatplainassassumption\fancyrefdefaultspacing#1\FrefformatplainassAssumption\fancyrefdefaultspacing#1\frefformatvarioassassumption\fancyrefdefaultspacing#1#3\FrefformatvarioassAssumption\fancyrefdefaultspacing#1#3 \frefformatplainremremark\fancyrefdefaultspacing#1\FrefformatplainremRemark\fancyrefdefaultspacing#1\frefformatvarioremremark\fancyrefdefaultspacing#1#3\FrefformatvarioremRemark\fancyrefdefaultspacing#1#3
Post-Selection Inference for Changepoint Detection Algorithms
with Application to Copy Number Variation Data
SANGWON HYUN∗, KEVIN LIN, MAX G’SELL, RYAN J. TIBSHIRANI
Department of Statistics, Carnegie Mellon University, 132 Baker Hall, Pittsburgh, PA 15213. *
Abstract
Changepoint detection methods are used in many areas of science and engineering, e.g., in the analysis of copy number variation data, to detect abnormalities in copy numbers along the genome. Despite the broad array of available tools, methodology for quantifying our uncertainty in the strength (or presence) of given changepoints, post-detection, are lacking. Post-selection inference offers a framework to fill this gap, but the most straightforward application of these methods results in low-powered tests and leaves open several important questions about practical usability. In this work, we carefully tailor post-selection inference methods towards changepoint detection, focusing as our main scientific application on copy number variation data. As for changepoint algorithms, we study binary segmentation, and two of its most popular variants, wild and circular, and the fused lasso. We implement some of the latest developments in post-selection inference theory: we use auxiliary randomization to improve power, which requires implementations of MCMC algorithms (importance sampling and hit-and-run sampling) to carry out our tests. We also provide recommendations for improving practical useability, detailed simulations, and an example analysis on array comparative genomic hybridization (CGH) data. CGH analysis; changepoint detection; copy number variation; hypothesis tests; post-selection inference; segmentation algorithms
00footnotetext: To whom correspondence should be addressed: [email protected].
1 Introduction
Changepoint detection is the problem of identifying changes in data distribution along a sequence of observations. We study the canonical changepoint problem, where changes occur only in the mean: let vector be a data vector with independent entries following
[TABLE]
where the unknown mean vector forms a piecewise constant sequence. That is, for locations ,
[TABLE]
where for convenience we write and . We call changepoint locations of . Changepoint detection algorithms typically focus on estimating the number of changepoints (which could possibly be 0), as well as the locations , from a single realization . Roughly speaking, changepoint methodology (and its associated literature) can be divided into two classes of algorithms: segmentation algorithms and penalization algorithms. The former class includes binary segmentation (BS) (Vostrikova, 1981) and popular variants like wild binary segmentation (WBS) (Fryzlewicz, 2014) and circular binary segmentation (CBS) (Olshen et al., 2004); the latter class includes the fused lasso (FL) (Tibshirani et al., 2005) (also called total variation denoising (Rudin et al., 1992) in signal processing), and the Potts estimator (Boysen et al., 2009). These two classes have different strengths; see, e.g., Lin et al. (2016) for more discussion.
Having estimated changepoint locations, a natural follow-up goal would be to conduct statistical inference on the significance of the changes in mean at these locations. Despite the large number of segmentation algorithms and penalization algorithms available for changepoint detection, there has been very little focus on formally valid inferential tools to use post-detection. In this work, we describe a suite of inference tools to use after a changepoint algorithm has been applied—namely, BS, WBS, CBS, or FL. We work in the framework of post-selection inference, also called selective inference. The specific machinery that we build off was first introduced in Lee et al. (2016); Tibshirani et al. (2016), and further developed in various works, notably Fithian et al. (2014); Fithian et al. (2015); Tian and Taylor (2018), whose extensions we rely on in particular. The basic inference procedure we develop can be outlined as follows.
Given data , apply a changepoint algorithm to detect some fixed number of changepoints . Denote the sorted estimated changepoint locations by
[TABLE]
and their respective changepoint directions (whether the estimated change in mean was positive or negative) by . For notational convenience, we set and . The specifics of the changepoint algorithms that we consider are given in \Frefsec:algorithms. 2. 2.
Form contrast vectors , defined so that for arbitrary ,
[TABLE]
the difference between the sample means of segments to right and left of , for . 3. 3.
For each , we test the hypothesis by rejecting for large values of a statistic , which is computed based on knowledge of the changepoint algorithm that produced (2) in Step 1, and the desired contrast vector (3) formed in Step 2. Each statistic yields an exact p-value under the null (assuming Gaussian errors (1)). The details are given in Sections 2.2 and 3. 4. 4.
Optionally, we can use Bonferroni correction and multiply our p-values by , to account for multiplicity.
It is worth mentioning that several variants of this basic procedure are possible. For example, the number of changepoints in Step 1 need not be seen as fixed and may be itself estimated from data; the set of estimated changepoints (2) may be pruned after Step 1 to eliminate changepoints that lie too close to others, and alternative contrast vectors to (3) in Step 2 may be used to measure more localized mean changes; these are all briefly described in \Frefsec:practicalities. Though not covered in our paper, the p-values from our tests can be inverted to form confidence intervals for population contrasts for (Lee et al., 2016; Tibshirani et al., 2016).
At a more comprehensive level, our contributions in this work are to implement theoretically valid inference tools and practical guidance for each combination of the following choices that a typical user might face in a changepoint analysis: the algorithm (BS, WBS, CBS, or FL), number of estimated changepoints (fixed or data-driven), the null hypothesis model (saturated or selected model, to be explained in \Frefsec:post-selection), what type of conditioning (plain or marginalized, to be explained in \Frefsec:randomization), and the error variance (known or unknown). In \Frefsec:practicalities, we summarize the tradeoffs underlying each of these choices.
Finally, as the primary application of our inference tools, we study comparative genomic hybridization (CGH) data, making particular suggestions geared towards this problem throughout the paper. We begin with a motivating CGH data example in the next subsection, and return to it at the end of the paper.
1.1 Motivating example: array CGH data analysis
We examine array CGH data from the 14th chromosome of cell line GM01750, one of the 15 datasets from Snijders et al. (2001); more background can be found in Lai et al. (2005) and references therein. Array CGH data are ratios of dye intensities of diseased to healthy subjects’ measurements, mixed across many samples. Normal regions of the gene are thought to have an underlying mean ratio of zero, and aberrations are regions of upward or downward departures from zero because the gene in that region has been mutated – duplicated or deleted. The presence and locations of aberrations are well studied in the biomedical literature to be associated with the presence of a wide range of genetically driven diseases – as many types of cancer, Alzheimer, and autism (Fanciulli et al., 2007; Sebat et al., 2007; Consortium et al., 2008; Stefansson et al., 2008; Walters et al., 2010; Bochukova et al., 2010). Accurate changepoint analysis of array CGH data is thus useful in studying association with diseases, and for medical diagnosis.
The data is plotted in the left panel of \Freffig:intro. Two locations , marked A and B respectively, were detected by running 2-step WBS. Ground truth in this data set can be defined via an external process called called karyotyping; this is done by Snijders et al. (2001) who finds only one true changepoint at location A. (To be precise, they do not report exact locations of abnormalities, but find a single start-to-middle deviation from zero level.)
Without access to any post-selection inference tools, we might treat locations A and B as fixed, and simply run t-tests for equality of means of neighboring data segments, to the left and right of each location. This is precisely testing the null hypothesis , , where the contrast vectors are as defined in (3). P-values from the t-tests are reported in the first row of the table in \Freffig:intro: we see that location A has a p-value of , but location B also has a small p-value of , which is troublesome. The problem is that location B was specifically selected by WBS because (loosely put) the sample means to left and right of B are well separated, thus a t-test a location B is bound to be optimistic.
Using the tools we describe shortly, we test , in two ways: using a saturated model and a selected model on the mean vector . The satured model assumes nothing about , while the selected model assumes is constant between the intervals formed by and . Both tests yield a p-value at location A, but only a moderately small p-value at location B. If we were to use the Bonferroni correction at a nominal significance level , then in neither case would we reject the null at location B.
1.2 Related work
In addition to the references on general post-selection inference methodology given previously, we highlight the recent work of Hyun et al. (2018), who study post-selection inference for the generalized lasso, a special case of which is the fused lasso. These authors already characterize the polyhedral form of fused lasso selection events, and study inference using contrasts as in (3). While writing the current paper, we became aware of the independent contributions of Umezu and Takeuchi (2017), who study multi-dimensional changepoint sequences, but focus problems in which the mean has only one changepoint. Aside from these papers, there is little focus on valid inference methods to apply post-detection in changepoint analysis. On the other hand, there is a huge literature on changepoint estimation, and inference for fixed hypotheses in changepoint problems; we refer to Jandhyala et al. (2013); Aue and Horvath (2013); Horvath and Rice (2014), which collectively summarize a good deal of the literature.
2 Preliminaries
2.1 Review: changepoint algorithms
Below we describe the changepoint algorithms that we will study in this paper. For the first three segmentation algorithms, we will focus on formulations that run the algorithm for a given number of steps ; these algorithms are typically described in the literature as being run until internally calculated statistics do not exceed a given threshold level . The reason that we choose the former formulation is twofold: first, we feel it is easier for a user to specify a priori a reasonable number of steps , versus a threshold level ; second, we can use the method in Hyun et al. (2018) to adaptively choose the number of steps and still perform valid inferences. In what follows, we use the notation and for a vector .
Binary segmentation (BS).
Given a data vector , the -step BS algorithm (Vostrikova, 1981) sequentially splits the data based on the cumulative sum (CUSUM) statistics, defined below. At a step , let be the changepoints estimated so far, and let , be the partition of induced by . Intervals of length 1 are discarded. Let and be the start and end indices of . The next changepoint and maximizing interval are chosen to maximize the absolute CUSUM statistic:
[TABLE]
Additionally, the direction of the new changepoint is calculated by the sign of the maximizing absolute CUSUM statistic, for .
Wild binary segmentation (WBS).
The -step WBS algorithm (Fryzlewicz, 2014) is a modification of BS that calculates CUSUM statistics over randomly drawn segments of the data. Denote by a set of uniformly randomly drawn intervals with , . At a step , let to be the index set of the intervals in which do not intersect with the changepoints estimated so far. The next changepoint and the maximizing interval are obtained by:
[TABLE]
where is as defined in (4). Similar to BS, the direction of the changepoint is defined by the sign of the maximizing absolute CUSUM statistic.
Circular binary segmentation (CBS).
The -step CBS algorithm (Olshen et al., 2004) specializes in detecting pairs of changepoints that have alternating directions. At a step , let , be the changepoints estimated so far (with the pair , estimated at step ), and let , be the associated partition of . Intervals of length 2 are discarded. Let and denote the start and end index of . The next changepoint pair and , and the maximizing interval , are found by:
[TABLE]
As before, the new changepoint direction is defined based on the sign of the (modified) CUSUM statistic, for .
Fused lasso.
The fused lasso (FL) estimator (Rudin et al., 1992; Tibshirani et al., 2005) is defined by solving the convex optimization problem:
[TABLE]
for a tuning parameter . The fused lasso can be seen as a -step algorithm by sweeping the tuning parameter from down to . Then, at given values of (called knots), the FL estimator introduces an additional changepoint in the solution in (7) (Hoefling, 2010).
2.2 Review: post-selection inference
We briefly review post-selection inference as developed in Lee et al. (2016); Tibshirani et al. (2016); Fithian et al. (2014). For a more thorough and general treatment, we refer to these papers or to Hyun et al. (2018). Our description here will be cast towards changepoint problems. For clarity, we notationally distinguish between a random vector distributed as in (1), and , a single data vector we observe for changepoint analysis. When a changepoint algorithm—such as BS, WBS, CBS, or FL—is applied to the data , it selects a particular changepoint model . The specific forms of such models are described in \Frefsec:polyhedra; for now, loosely, we may think of as the estimated changepoint locations and directions made by the algorithm on the data at hand. Post-selection inference revolves around the selective distribution, i.e., the law of
[TABLE]
under the null hypothesis , for any that is a measurable function of . Here is a vector of sufficient statistic of nuisance parameters that need to be conditioned on in order to tractably compute inferences based on (8). The explicit form of differs based on the assumptions imposed on under the null model. Broadly, there are two classes of null models we may study: saturated and selected models (Fithian et al., 2014). Computationally, in either null models, it is important for the selection event be polyhedral. This is described in detail in Section 3.1, where we show that this holds for BS, WBS, CBS, and FL.
Saturated model.
The saturated model assumes that is distributed as in (1) with known error variance , and assumes nothing about the mean vector . We set , the projection of onto the hyperplane orthogonal to . The selective distribution becomes the law of
[TABLE]
Selected model.
The selected model again assumes that follows (1), but additionally assumes that the mean vector is piecewise constant with changepoints at the sorted estimated locations (assuming we have run our changepoint algorithm for steps). That is, we assume
[TABLE]
where for convenience we use and . Under this assumption, the law of becomes a -parameter Gaussian distribution. Additionally, with the contrast vector defined as in (3), for any fixed , the quantity of interest is simply the difference between two of the parameters in this distribution. Assuming is known, the sufficient statistics for the nuisance parameters in the Gaussian family are simply sample averages of the appropriate data segments, and the selective distribution becomes the law of
[TABLE]
Part of the strength of the selected model is that we can properly treat as unknown; in this case, we must only additionally condition on the Euclidean norm of to cover this nuisance parameter, and the selective distribution becomes the law of
[TABLE]
3 Inference for changepoint algorithms
We describe our contributions that enable post-selection inference for changepoint analyses, beginning with the form of model selection events for common changepoint algorithms. We then describe computational details for saturated and selected model tests, and auxiliary randomization.
3.1 Polyhedral selection events
We show that, for each of the BS, WBS, and CBS algorithms, there is a parametrization for their models such that event is a polyhedron—in fact a convex cone—of the form , for a matrix that depends on (and we interpret the inequality componentwise). Throughout the description of the polyhedra for each algorithm, we display the number of rows in since it loosely denotes how “complex” each model selection event is. The same was already shown for FL in Hyun et al. (2018), and we omit details, but briefly comment on it below. Overall, the matrices for FL and BS are linear in , while it is quadratic in for CBS, and for WBS using intervals of length . This number can grow faster than linear in if , which is recommended in practice (Fryzlewicz, 2014).
Selection event for BS.
We define the model for the -step BS estimator as
[TABLE]
where and are the changepoint locations and directions when the algorithm is run on , as described in Section 2.1.
Proposition 1**.**
Given any fixed and , we can explicitly construct where
[TABLE]
and where has rows.
Proof.
When , linear inequalities characterize the single changepoint model :
[TABLE]
Now by induction, assume we have constructed a polyhedral representation of the selection event up through step . All that remains is to characterize the th estimated changepoint and direction by inequalities that are linear in . This can be done with inequalities. To see this, assume without a loss of generality that the maximizing interval is ; then must satisfy the inequalities
[TABLE]
For each interval , , we also have inequalities
[TABLE]
The last two displays together completely determine , and as , we get our desired total of inequalities. ∎
Selection event for WBS.
We define the model of the -step WBS estimator as
[TABLE]
where is the set of intervals that the algorithm uses, and are the changepoint locations and directions, and are the maximizing intervals.
Proposition 2**.**
Given any fixed , and , we can explicitly construct where
[TABLE]
The number of rows in will vary depending on the configuration of and , but if each of the intervals in has length , it will be at most .
The proof of \Frefprop:wbs-polyhedral-event is only slightly more complicated than that of \Frefprop:bs-polyhedral-event, and is deferred until Appendix A. Note that unlike BS, the maximizing intervals are part of WBS’s model.
Selection event for CBS.
Finally, we define the model for the -step CBS estimator as
[TABLE]
where now and are the pairs of estimated changepoint locations, and are the changepoint directions, as described in Section 2.1.
Proposition 3**.**
Given any fixed and , we can explicitly construct where
[TABLE]
Let denote the th interval formed and be the selected interval defined in (5) for an intermediate step , and let . Then has a number of rows equal to
[TABLE]
The proof of \Frefprop:cbs-polyhedral-event is only slightly more complicated than that of \Frefprop:bs-polyhedral-event, and is deferred until Appendix A.
Selection events for FL, and a brief comparison.
The model for the -step FL estimator is:
[TABLE]
where and are changepoint locations and directions, and whose elements represent signs of a certain statistic calculated at location in competition for maximization with at step . These statistics are weighted mean differences at location and are analogous to CUSUM statistics in BS. Hyun et al. (2018) make this representation more explicit, proving that for any fixed and , we can explicitly construct such that
[TABLE]
where has the same number of rows as a -step BS event.
3.2 Computation of p-values
Given a precise description of the polyhedral selection event , we can describe the methods to compute the p-value, i.e. the tail probability of the selective distributions described in \Frefsec:post-selection. Without loss of generality, all of our descriptions will be specialized to testing the null hypothesis of against the one-sided alternative . For saturated model tests, this exact calculation has been developed in previous work and we review it as it is relevant to our contributions on increasing its power. For selected model tests, an approximation was described in previous work, but we develop a new hit-and-run sampler that has not been implemented before.
Saturated model tests: exact formulae.
As shown in Lee et al. (2016) and Tibshirani et al. (2016), the saturated selective distribution (9) has a particularly computationally convenient distribution when is Gaussian and the model selection event is a polyhedral set in . In this case, the law of (9) is a truncated Gaussian (TG), whose truncation limits depend only on , and can be computed explicitly. Its tail probability can be computed in closed form (without Monte Carlo sampling). That is, the probability that under the law of (9) is exactly equal to
[TABLE]
where represents the standard Gaussian CDF, , and
[TABLE]
This above equation is commonly referred as the TG statistic. Since this statistic is a pivot, it is the p-value used for the saturated model test.
Selected model tests: hit-and-run sampling.
To compute the p-value for selected model tests, Fithian et al. (2015) proposed a hit-and-run strategy for sampling from the distribution for the known setting, (10). This was implemented by the authors, and we briefly review the details in Appendix B. For the unknown setting, Fithian et al. (2014) suggested an importance sampling strategy for sampling the distribution (11). However, we find that an intuitive hit-and-run strategy can be adapted to the unknown setting and implement this as a new algorithm.
Given a changepoint , observe that we can design a segment test contrast where sampling from (11) is equivalent to sampling uniformly from the set
[TABLE]
Note that the above set no longer depends on or . This is because we conditioned all the relevant sufficient statistics under the selected model. Our hit-and-run sampler then sequentially draws samples from the above set. For notational convenience, observe that the last constraints in (14) can be rewritten as for some matrix . Our new hit-and-run algorithm is then shown in \Frefalg:hitandrun.
3.3 Randomization and marginalization
We apply the ideas of randomization in Tian and Taylor (2015) that improve the power of selective inference to changepoint algorithms and devise explicit samplers. We investigate two specific forms of randomization: randomization over additive noise and randomization over random intervals. We specialize the following descriptions to saturated models. We note that similar randomization of selected model inferences is also possible but is doubly computationally burdensome.
Marginalization over additive noise.
Tian and Taylor (2015) shows that performing inference based on the selected model where is additive noise and then marginalizing over leads to improved power. Here, is a realization of a random component sampled from , where is set by the user. Fithian et al. (2014) provides a mathematical basis for pursuing such randomization, stating that less conditioning results in an increase in Fisher information. For additive noise, the above model selection event is:
[TABLE]
This means the new polyhedron formed by the model selection event based on perturbed data is slightly shifted.
Porting the ideas of Tian and Taylor (2015) to our setting, to test the one-sided null hypothesis , we want to compute the following tail probability of the marginalized selective distribution,
[TABLE]
It is hard to directly compute this. However, the formulas in (12) and (13) give us exact formulas to compute the non-marginalized tail-probabilities,
[TABLE]
The following proposition shows that we can compute by reweighting instances of via importance sampling. Here, let and .
Proposition 4**.**
Let denote the support of the random component . If the distribution of is independent of the random event , (15) can be exactly computed as
[TABLE]
where the weighting factor is .
The first equality in (16) demonstrates the reweighting of , but the second equality gives a sampling strategy where we approximate the integrals. \Frefalg:additive-importance-sampler describes this, where for one realization , we let and denote the integrand of the last term’s numerator and denominator in (16) respectively.
Marginalization over WBS intervals.
In contrast to the above setting where represents Gaussian noise, in wild binary segmentation described in \Frefsec:algorithms, represents the set of randomly drawn intervals. Observe that \Frefprop:additive_noise still applies to this setting, where is now replaced with , as described in \Frefsec:polyhedra. However, one additional complication is that the maximizing intervals in the model are embedded in the construction of the matrix representing the polyhedra. This prevents a naive resampling of all intervals.
We describe how to overcome this complication. Let be the maximizing intervals. We resample all other intervals, for . Specifically, for each of such intervals , and are sampled uniformly between to where . After all intervals are resampled, a check is performed to ensure that are still the maximizing intervals when WBS is applied again to . The full algorithm is in \Frefalg:wbs-importance-sampler.
4 Practicalities and extensions
The above sections formalize the mechanisms to perform selective inference with respect to the basic procedure highlighted in \Frefsec:introduction. We now briefly summarize the all the combination of choices that the user faces based on the methods developed in the above sections and their practical impact.
4.1 Practical considerations
There are some practical choices that the user needs to make when implementing the procedure. Here, we outline a few, each related with a key element of the broader inference procedure.
- •
Algorithm (BS, WBS, CBS and FL): It is useful for the user to be able to compare algorithms. CBS is specialized for pairs of changepoints, and WBS specializes in localized changepoint detection compared to BS. FL and BS have similar mechansims which sequentially admit changepoints by maximizing a statistic. However, BS has a simpler mechanism and a less complex selection event, potentially giving higher post-selection conditional power.
- •
Conditioning (Plain or marginalized): Marginalizing over a source of randomness yields tests with higher power than plain inference, but at two costs: increased computational burden due to MCMC sampling being required, and worsened detection ability when using additive noise marginalization. Also, the marginalized p-values are subject to the sampling randomness, and the number of trials needed to reduce the p-values’ intrinsic variability scales with .
- •
Number of estimated changepoints (Fixed or data-driven): As currently described in \Frefsec:algorithms, the changepoint algorithms discussed in our paper require the user to pre-specify the number of estimated changepoints . However, we can adopt local stopping rules from Hyun et al. (2018) to adaptively choose . This variation increases the complexity of the polyhedra compared to those in \Frefsec:polyhedra, leading to lower statistical power than its fixed- counterpart. This is shown in Appendix D.
- •
Assumed null model (Saturated or selected): As mentioned in \Frefsec:post-selection, selected model tests are valid under a stricter set of assumptions but often yield higher power. Computationally, saturated model tests are often simpler to perform than selected model tests due to the closed form expression of the tail probability.
- •
Error variance (Known or unknown): Saturated model tests require to be known. In practice, we need to estimate it in-sample from a reasonable changepoint mean fitted to the same data, or estimated out-of-sample on left-out data. Selected model tests have the advantage of not requiring knowledge of .
4.2 Extensions
As mentioned in Hyun et al. (2018), there are many practically-motivated extensions to the baseline procedure mentioned in \Frefsec:introduction to either improve power or interpretability. We highlight these below. All of these extensions will still give proper Type-I error control under the appropriate null hypotheses.
- •
Designing linear contrasts: The user can make many types of contrast vectors to fit their analysis, in addition to the segment test contrasts (3), as long as it measurable with respect to . One example is the spike test from (Hyun et al., 2018) of single location mean changes. For CNV analysis, it could be useful to test regions between an adjacent pair of changepoints away from the immediately surrounding regions. Also, a step-sign plot (a plot that shows the locations and direction of the changepoints, but not their magnitude) can help the user design contrasts (Hyun et al., 2018).
- •
Post-processing the estimated changepoints: Multiple detected changepoints too close to one another can hurt the power of segment tests. Post-processing the estimated changepoints based on decluttering (Hyun et al., 2018) or filtering (Lin et al., 2017) so the new set of changepoints are well-separated can lead to contrasts that yield higher power. We show empirical evidence of this improving power of the fused lasso, in Appendix C.1.
- •
Pre-cutting: We can also modify all the algorithms in \Frefsec:algorithms to start with an initial existing set of changepoints. This is useful in CGH analyses, when it is not meaningful to consider segments that start in one chromosome and end in another. By pooling information in this manner from separate chromosomal regions, the pre-cut analysis is an improvement over conducting separate analyses in individual chromosomes.
5 Simulations
5.1 Gaussian simulations
In this section, we show simulation examples to demonstrate properties of the segmentation post-selection inference tools presented in the current paper. The mean consists of two alternating-direction changepoints of size in the middle as in (17), chosen to be a realistic example of mutation phenomena as observed in array CGH datasets (Snijders et al., 2001). We vary the signal size , while generating Gaussian data from a fixed noise level .
This is the duplication mutation scenario. The sample size is chosen to be in the scale of the chromosomal data. An example of this synthetic dataset can be seen in Figure 2.
[TABLE]
Methodology.
In the following simulations, we consider the following four estimators (BS, WBS, CBS and FL) each run for two steps. From each, we perform both saturated and selected model tests. For the latter, we only include the results of BS and FL for simplicity, for both settings of known and unknown noise parameter . We use the basis procedure outlined in \Frefsec:introduction with a significance level of . We verify the Type-I error control of our methods next. Throughout the entire simulation suite to come, the standard deviation in each of the power curves and detection probabilities is less than 0.02. For each method, for each signal-to-noise size , we run more than 250 trials.
Type-I error control verification.
We examine all our statistical inferences under the global null where to demonstrate their validity – uniformity of null p-values, or type I error control. Specifically, any simulations from the no-signal regime from the middle mutation (17) can be used. When there is no signal, the null scenario is always true so we expect all p-value to be uniformly distributed between 0 and 1. We verify this expected behavior in \Freffig:null-dist. We notice that the methods that require MCMC (marginalized saturated and selected model tests) requires more trials to converge towards the uniform distribution compared to their counterparts that have exact calculations.
Calculating power.
Since the tests are performed only when a changepoint is selected, it is necessary to separate the detection ability of the estimator from power of the test. To that end, we define the following quantities,
[TABLE]
The overall power of an inference tool can only be assessed by examining the conditional and unconditional power together. We consider a detection to be correct if it is within of the true changepoint locations.
Power comparison across signal sizes .
For saturated model tests, we perform additive-noise inferences using Gaussian with for BS, FL, and CBS. For WBS, we employ the randomization scheme as described in \Frefsec:randomization with . With the metrics in (19)-(20), we examine the performance of the four methods. The solid lines in \Freffig:power-comparison show the “plain” method where model selection based on . The dotted lines show the marginalized counterparts where the model selection is , margnialized over .
WBS and CBS have higher conditional and unconditional power than BS. This is as expected since the former two are more adept for localized change-points of alternating directions. FL noticeably under-performs in power compared to segmentation methods. This is partially caused by FL’s detection behavior, and can be explained by examining alternative measures of detection and improved with post-processing. This investigation is deferred to Appendix C.1. The marginalized versions of each algorithm have noticeably improved power, but almost unnoticeably worse detection than their non-randomized, plain versions (middle panel of \Freffig:power-comparison) . Combined, in terms of unconditional power, marginalized inferences clearly dominate their plain counterparts.
Selected model inference simulations are shown in \Freffig:power-comparison-selected. Surprisingly, there is an almost inconceivable drop in power from unknown to known . Compared to the saturated model tests in \Freffig:power-comparison, there is smaller power gap between FL and BS. Also, selected model tests appear to have higher power than saturated model tests. In general however, it is hard to compare the power of saturated and selected models due to the clear difference in model assumptions.
Comparison with sample-splitting.
Sample splitting is another valid inference technique. After splitting the dataset in half based on even and odd indices, we run a changepoint algorithm on one dataset and conduct classical one-sided t-test on the other. This is the most comparable test, as it does not assume is known and conducts a one-sided test of the null . Instead of slack used for calculating detection in selective inference detection (dotted and dashed lines), was used for sample splitting inference (solid line). The loss in detection accuracy in the middle panel of \Freffig:samplesplit shows the downside of halving data size for detection. Unconditional power for marginalized saturated model tests and selected model tests are noticeably higher than the other two.
5.2 Pseudo-real simulation with heavy tails
We present pseudo-real datasets based on a single chromosome – chromosome 9 in GM01750 – in order to investigate how heavy-tailed distributions affect our inferences. We only present saturated model tests for brevity. From the original data, we estimate a 1-changepoint mean , shown in the bold red line in Figure 7, and residuals , both based on a fitted 1-step wild binary segmentation model. The QQ plot shows that these residuals have heavier tails than a Gaussian (top middle panel of \Freffig:pseudoreal), and are close in distribution to a Laplacian. This motivates us to generate synthetic data by adding noise in three ways:
Gaussian noise (black), 2. 2.
Laplace noise (green), and 3. 3.
Bootstrapped residuals, , where samples the residuals with replacement (red).
We then investigate the behavior of saturated model tests after a 3-step binary segmentation across all three types of noises when the null hypothesis is true. To set for these saturated model tests, we compute the empirical variance after fitting a pre-cut 10-step wild binary segmentation across the entire cell line. The results are shown in Figure 7. Exactly valid null p-values would follow the theoretical distribution, optimistic (superuniform) p-values would lie below the diagonal, and conservative (subuniform) p-values would lie above the diagonal. We see that the inferences are exactly valid with Gaussian noise but is optimistic with both Laplacian noise and bootstrapped residuals (panel B of \Freffig:pseudoreal).
To overcome this optimism, we modify the bootstrap substitution method (Tibshirani et al., 2018). Let denote , the grand mean of . Originally, the authors’ main idea is to approximate the law of used to construct the TG statistic (12) with the bootstrapped distribution of by bootstrapping the residuals, . Here, the empirical grand mean represents the simplest model with no changepoints. While this estimate will usually restore validity, it is expected to produce overly conservative p-values if there exist any changepoints (panel C of \Freffig:pseudoreal).
Hence, we instead consider the bootstrapped distribution of , by bootstrapping the residuals, , where is a piecewise constant estimate of . For our instance, we use a -step binary segmentation model to estimate , where we choose using two-fold cross validation from a two-fold split of the data into odd and even indices. This procedure is not valid in general and should be used with caution. In order to combat the main risk of over-fitting of , we may further modify this procedure by excluding shorter segments in prior to bootstrapping. For our dataset, these potential downsides do not seem to come to fruition in practice. At the sample size and signal-to-noise ratio of our current dataset, the resulting p-values in both heavy-tailed and Gaussian data are convincingly uniform (panel D of \Freffig:pseudoreal).
6 Copy Number Variation (CNV) data application
Array CGH analyses detect changes in expression levels (measured as a log ratio in fluorescence intensity between test and reference samples) across the genome. Aberrations found are linked with the presence of a wide range of genetically driven diseases – as many types of cancer, Alzheimer’s disease, and autism, see, eg. Consortium et al. (2008); Bochukova et al. (2010).
The datasets we study in this paper are originally from Snijders et al. (2001), and have been studied by numerous works in the statistics literature, e.g. Hao et al. (2013); Lai et al. (2008). In each dataset consist of individual cell lines with measurements or more across 23 chromosomes. Our analysis focuses on middle-to-middle duplication, the setting that was studied in \Frefsec:simulation.
In our analysis, we use a 4-step wild binary segmentation and perform marginalized saturated model tests on two cell lines GM01524 and GM01750 in \Freffig:analysis. Recall that the 14th chromosome of the latter cell line was shown in \Freffig:intro. As decribed in \Frefsec:practicalities, we pre-cut both analyses at chromosome boundaries since the ordering of 1 through 23 is essentially arbitrary. In GM01524, we can see that the our choice of methods – segment test inferences on changepoints recovered from pre-cut wild binary segmentation, after decluttering – deems two changepoint locations A and B of alternating directions in chromosome 6 to be significant, and two other locations to be spurious, at the signifance level after Bonferroni correction. This result is consistent with karyotyping results of a single middle-to-middle duplication. Likewise, in GM01750, the wild binary segmentation inference correctly identified the two start-to-middle duplications in chromosomes 9 and 14 which were confirmed with karyotyping, and correctly invalidated the rest.
7 Conclusions
We have described an approach to conduct post-selection inference on changepoints detected by common segmentation algorithms, using the same data for detection and testing. Through simulations, we demonstrated the detection probability and power over signal-to-noise ratios in a variety of settings, as well as our tools’ robustness to heavy-tailed data. Finally, we demonstrated the application in array CGH data, where we show that our methods effectively provide a statistical filter that retains the changepoints that validated by karyotyping and discards the rest.
Future work in this area could improve the practical applicability of these methods. One useful extension would be to incorporate more complex and realistic noise models. For example, the selected model testing framework can be extended to include other exponential family models. The methodology for inference after changepoint detection may also be extended to multiple streams of copy number variation data in order to make more powerful inferences about changepoint locations. These and other methodological extensions can be useful for newer types of copy number variation data from recent technology, such as next-generation sequencing.
8 Code and supplemental material
The code to perform estimation as well as saturated model tests are in https://github.com/robohyun66/binseginf, while the code to perform selected model tests are additionally in https://github.com/linnylin92/selectiveModel.
The following is a brief summary of the supplements. Appendix A contains the proofs omitted from the main text. Appendix B contains the algorithmic details for the selected model test sampler in the known setting. Appendix C contains numerous additional simulations results and details. Appendix D contains a description of the procedure to choose adaptively and its corresponding simulation results. Appendix E contains additional results on our array CGH application.
9 Acknowledgment
The authors used Pittsburgh Supercomputing Center resources (Proposal/Grant Number: DMS180016P). Sangwon Hyun was supported by supported by NSF grants DMS-1554123 and DMS-1613202. Max G’Sell was supported by NSF grant DMS-1613202. Ryan Tibshirani was supported by NSF grant DMS-1554123.
Appendix A Additional proofs
A.1 Proof of \Frefprop:wbs-polyhedral-event, (WBS)
Proof.
The construction of is basically the same as that for BS in \Frefprop:bs-polyhedral-event; the only difference is that, at step , the inequalities defining the new rows of are based on the intervals and , , instead of and , , respectively. To compute the upper bound on the number of rows , observe that in step , there are at most intervals remaining. Among these, the interval contributes inequalities, and the remaining intervals contributes inequalities. ∎
A.2 Proof of \Frefprop:cbs-polyhedral-event, (CBS)
Proof.
The proof follows similarly to the proof of \Frefprop:bs-polyhedral-event. Observe that for any , the model is strictly contained in the model . Hence, we can proceed using induction, and let for denote for simplicity, and do the same for , and . Let for simplicity as well.
For , the following inequalities characterize the selection of the changepoint model ,
[TABLE]
for all where , and .
By induction, assume we have constructed the polyhedra for the model, . To construct , all that remains is to characterize the th parameters . To do this, assume that corresponds with the interval having the form . Within this interval, we form the first inequalities of the form,
[TABLE]
for all where and and . The remaining inequalities originate from the remaining intervals. For each interval , for , let have the form . We form the next inequalities of the form
[TABLE]
for all where . ∎
A.3 Proof of \Frefprop:additive_noise, (Marginalization)
Proof.
For concreteness, we write the proof where represents additive noise, but the proof generalizes to the setting where represents random intervals easily. First write as an integral over the joint density of and ,
[TABLE]
Then the joint density partitions into two components, whose latter component (a probability mass function) can be rewritten using Bayes rule. For convenience, denote .
[TABLE]
where we used the independence between and in the last equality. With this, from (21) becomes:
[TABLE]
Now, rearranging, we get:
[TABLE]
This proves the first equality in \Frefprop:additive_noise. To show what the weighting factor equals, observe that by applying Bayes rule to the numerator of , and rearranging:
[TABLE]
Finally, to show the seocnd equality in \Frefprop:additive_noise, observe that we can also represent as
[TABLE]
by definition, where the denominator is the expectation taken with respect to the random variable . Leveraging the geometric theorems of Lee et al. (2016); Tibshirani et al. (2016), it can be shown that
[TABLE]
Also from the same references as well as stated in \Frefsec:randomization, we know that
[TABLE]
Putting (23), (24) and (25) together into (22), we complete the proof by obtaining
[TABLE]
∎
Appendix B Selected model tests, hit-and-run sampling for known
The following is the hit-and-run sampler to estimate the tail probability of the law of (9). This is for the known setting, which differs from the setting described in the main text in \Frefsec:computation. This was briefly described in Fithian et al. (2015) but the authors have later implemented it in ways not originally described in the above work to make it more efficient. We do not claim novelty for the following algorithm, but simply state it for completion. The original code can be found the repository https://github.com/selective-inference, and we reimplemented it to suite our coding framework and simulation setup.
We specialize our description to test the null hypothesis against the one-sided alternative . There are some notation to clarify prior to describing the algorithm. Let denote the vector such that
[TABLE]
As in \Frefsec:computation, let denote the matrix such that the last equations in the above display are satisfied if and only if . Based on \Frefsec:polyhedra, observe that our goal reduces to sampling from the -dimensional distribution
[TABLE]
where is the identity matrix.
The first stage of the algorithm removes the nullspace of in the following sense. Construct any matrix such that it has full rank and the last rows are equal to . Then, consider the following -dimensional distribution.
[TABLE]
Note that has the same law as (26). Observe that the above distribution is a conditional Gaussian, meaning we can remove the last conditioning event. Towards that end, let denote the first columns of the matrix , and let denote the last columns of left-multiplying . Also, consider the following partitioning of the matrix ,
[TABLE]
where is a submatrix, is a submatrix, and is a submatrix. Then, consider the following -dimensional distribution.
[TABLE]
Note that has the same law as the first coordinates of (27).
The next stage of the algorithm whitens the above distribution so its covariance is the identity. Let and denote the mean and variance of the unconditional form of the above distribution (28). Let be the matrix such that . This must exist since is positive definite. Consider the following dimensional distribution,
[TABLE]
Note that has the same law as (28). Hence, we have constructed linear mapping and between (26) and (29) such that , and .
In order to set up a hit-and-run sampler, generate unit vectors . (The choice of is arbitrary, and the specific method of generating these vectors is also arbitrary.) Our hit-and-run sampler with move in the linear directions dictated by . We are now ready to describe the hit-and-run sampler in \Frefalg:hitandrun_knownsigma, which leverages many of the same calculations in (12) and (13). The similarity arises since by definition of projection.
The computational efficiency of the above algorithm comes from the fact that little multiplication needs to be done with the polyhedron matrix , a potentially huge matrix. and , each vectors of the same length, carry all the information needed about polyhedron throughout the entire procedure of generating samples.
Appendix C Additional simulation results
C.1 Power comparison using unique detection
Fused lasso was appeared to have a large drop in power compared to segmentation algorithms. In addition to these three measures shown in \Frefsec:simulation, for multiple changepoint problems like middle mutations it is useful to measure performance using an alternative measure of detection called unique detection. This is useful because some algorithms – mainly fused lasso, but to also binary segmentation to some extent, primarily in later steps – admit “clumps” of nearby points. If this clumped detection pattern occurs in early steps, the algorithm requires more steps than others to fully admit the correct changepoints. In this case, detection alone is not an adequate metric, and unique detection can be used in place.
[TABLE]
In plain words, unique detection is measuring how many of the true changepoint locations have been approximately recovered.
We present a simple case study. In addition to a 2-step fused lasso, imagine using a 3-step fused lasso, but with post-processing. For post-processing, declutter by centroid clustering with maximum distance of 2, and test the changepoints, pitting the resulting segment test p-values against . A 2-step fused lasso’s detection does not reach 1 even at high signals () because of the aforementioned clumped detection behavior. The resulting segment tests are also not powerful, since the segment test contrast vectors consist of left and right segments which do not closely resemble true underlying piecewise constant segments in the data. However, when detection is replaced with unique detection, two things are noticeable. First, decluttered lasso’s detection performance is noticeably improved when going from 2 to 3 steps. Also, when unconditional power is calculated using unique detection, binary segmentation does not have as large of an advantage over the the several variants of fused lasso. This is shown in \Freffig:unique-power-comparison. We see from the right figure (compared to the left) that the a “decluttered” version of 2- or 3-step fused lasso has much closer unconditional power to binary segmentation.
C.2 Power comparison with different mean shape
The synthetic mean discussed here consists of a single upward changepoint piece-wise constant mean, as shown in (31) and \Freffig:power-comparison-data-edge. This is chosen to be another realistic example of the mutation phenomenon as observed in array CGH datasets from Snijders et al. (2001), in addition to the case shown in the main text. We focus on the duplication mutation scenario, but the results apply similarly to deletions. As before, the sample size was chosen to be in the scale of the data length in a typical array CGH dataset in a single chromosome. An example of this synthetic dataset can be seen in Figure 2. For saturated model tests, WBS no longer outperforms binary segmentation in power. This is expected since there is only a single changepoint not accompanied by opposing-direction changepoints.
[TABLE]
C.3 Sample splitting (continued)
The results in \Freffig:samplesplit were based on approximate detection where, for methods used on the entire dataset of length , we defined a detection event as estimating of the true changepoint locations. For sample splitting, this was defined as estimate of the true changepoint location based on half the dataset. This choice of approximate detection is somewhat arbitrary, and it is informative to see if the results would change if we considered only exact detection. We can see from \Freffig:samplesplit-exact that randomized TG p-values have comparable power with sample splitting inferences, among tests that are regarding exactly the right changepoints.
Appendix D Model size selection using information criteria
Throughout the paper we assume that the number of algorithm steps is fixed. Hyun et al. (2018) introduces a stopping rule based on information criteria (IC) which can be characterized as a polyhedral selection event. The IC for the sequence of models is
[TABLE]
We omit the dependency on when obvious. We use the BIC complexity penalty for this paper. Also define to be the sign of the difference in IC between step and . This is a for a rise and for a decline. A data-dependent stopping rule is defined as
[TABLE]
which is a local minimization of IC, defined as the first time consecutive rises occur. As discussed in Hyun et al. (2018), is a reasonable choice for the changepoint detection. To carry out valid selective inference, we condition on the selection event , which is enough to determine . A -step model for chosen by (33) can be understood to be . The corresponding selection event is with the additional halfspaces, as outlined in Hyun et al. (2018). Simulations in Figure 13 show that introducing IC stopping is valid, by controlled type-I error, but comes at the cost of considerable power loss.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Aue and Horvath (2013) Aue, A. and Horvath, L. (2013). Structural breaks in time series. Journal of Time Series Analysis 34, 1–16.
- 2Bochukova et al. (2010) Bochukova, E. G., Huang, N., Keogh, J., Henning, E., Purmann, C., Blaszczyk, K., Saeed, S., Hamilton-Shield, J., Clayton-Smith, J., O’Rahilly, S., et al. (2010). Large, rare chromosomal deletions associated with severe early-onset obesity. Nature 463, 666.
- 3Boysen et al. (2009) Boysen, L., Kempe, A., Liebscher, V., Munk, A., and Wittich, O. (2009). Consistencies and rates of convergence of jump-penalized least squares estimators. Annals of Statistics 37, 157–183.
- 4Consortium et al. (2008) Consortium, I. S. et al. (2008). Rare chromosomal deletions and duplications increase risk of schizophrenia. Nature 455, 237.
- 5Fanciulli et al. (2007) Fanciulli, M., Norsworthy, P. J., Petretto, E., Dong, R., Harper, L., Kamesh, L., Heward, J. M., Gough, S. C., De Smith, A., Blakemore, A. I., et al. (2007). Fcgr 3b copy number variation is associated with susceptibility to systemic, but not organ-specific, autoimmunity. Nature genetics 39, 721.
- 6Fithian et al. (2014) Fithian, W., Sun, D., and Taylor, J. (2014). Optimal inference after model selection. ar Xiv: 1410.2597.
- 7Fithian et al. (2015) Fithian, W., Taylor, J., Tibshirani, R., and Tibshirani, R. J. (2015). Selective sequential model selection. ar Xiv: 1512.02565.
- 8Fryzlewicz (2014) Fryzlewicz, P. (2014). Wild binary segmentation for multiple change-point detection. Annals of Statistics 42, 2243–2281.
