Abstract-A very fast noniterative algorithm is proposed for denoising or smoothing one-dimensional discrete signals, by solving the total variation regularized least-squares problem or the related fused lasso problem. A C code implementation is available on the web page of the author.Index Terms-Total variation, denoising, nonlinear smoothing, fused lasso, regularized least-squares, nonparametric regression, convex nonsmooth optimization, taut string
I. INTRODUCTIONThe problem of smoothing a signal, to remove or at least attenuate the noise it contains, has numerous applications in communications, control, machine learning, and many other fields of engineering and science [1]. In this paper, we focus on the numerical implementation of total variation (TV) denoising for one-dimensional (1D) discrete signals; that is, we are given a (noisy) signalN of size N ≥ 1, and we want to efficiently compute the denoised signal x ⋆ ∈ R N , defined implicitly as the solution to the minimization problemfor some regularization parameter λ ≥ 0 (whose choice is a difficult problem by itself [2]). We recall that, as the functional to minimize is strongly convex, the solution x ⋆ to the problem exists and is unique, whatever the data y. The TV denoising problem has received large attention in the communities of signal and image processing, inverse problems, sparse sampling, statistical regression analysis, optimization theory, among others. It is not the purpose of this paper to review the properties of the nonlinear TV denoising filter, since numerous papers can be found on this vast topic; see, e.g., [3]-[6] for various insights. A more general problem, which encompasses TV denoising as a particular case, is the fused lasso signal approximator, introduced in [7], which yields a solution that has sparsity in both the coefficients and their successive differences. It consists in solving the problem Total variation denoising can be interpreted as pulling the discrete primitive r of the signal y taut in a tube around it. The taut string (blue polyline) interpolates the sequence s ⋆ solution to (4) (blue dots), which after discrete differentiation yields the denoised sequence x ⋆ solution to (1). The proposed algorithm is not based on this interpretation.denoising, since the solution z ⋆ can be obtained by simple soft-thresholding from the solution x ⋆ of (1):It is straightforward to add soft-thresholding steps to the proposed algorithm, for essentially the same computation time. So, for simplicity of the exposition, we focus on the TV denoising problem (1) direct, noniterative, way, possibly in-place. It is appropriate for real-time processing of an incoming stream of data, as it locates the jumps in x ⋆ one after the other by forward scans, almost online. The possibility of such an algorithm sheds light on the relatively local nature of the TV denoising filter [25].After this work was completed, the author found that there already exists a direct, linear time, method for 1D TV denoising, called the taut string algorithm [26], see al...