arXiv:2610.33137stat.MEOct 2026

Manuscript Offprint

arXiv:2610.33137

Smoothing splines with some discontinuities

Matteo Pelagatti, Paolo Maranzano, Giulio Cesare Gatto Ronchieri

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We generalize cubic smoothing splines to signals with a finite number of discontinuities at unknown positions. Rather than changing the roughness penalty, we deform the domain over which it is computed: every interval between consecutive observations can be stretched by a non-negative warp, subject to a total budget, and the optimizer spends the budget only where a jump makes stretching cheaper than bending. The estimator inherits the state-space form of smoothing splines, so it can be fitted by maximum likelihood with the Kalman filter, and it also admits a fast alternating algorithm that solves a banded linear system and takes a projected-gradient step on the warps. The budget is selected by an extended Bayesian information criterion whose constant is calibrated by simulation. In a Monte Carlo comparison the new estimators reconstruct a piecewise-smooth signal more accurately than the cubic smoothing spline with discontinuities of Storath and Weinmann, at the cost of more false alarms. Two energy applications illustrate the method: the temperature response of electricity demand in Northern Italy, and retail fuel prices, whose discontinuities, changes in excise duties, are dated by public record. The three supplements follow the references.

Keywords Change-point detection ⋅\cdot Domain warping ⋅\cdot Extended BIC ⋅\cdot Kalman filter ⋅\cdot Signal extraction ⋅\cdot Structural breaks

1 Introduction

Data recorded over an ordered index often behave smoothly for long stretches punctuated by a handful of sharp, isolated changes: a policy shock in a price series, a phase transition in a physical process, a saturation threshold in a demand curve. Cubic smoothing splines (Wahba, 1978; Wecker and Ansley, 1983), and their equivalent state-space signal-extraction formulation (Harvey and Koopman, 2000), recover the smooth part of such signals well, but they are twice continuously differentiable by construction: the roughness penalty that makes them smooth also prevents them from reproducing a discontinuity, which is either washed out over several observations or, if the penalty is relaxed everywhere, accommodated at the price of overfitting the noise elsewhere. What is needed is an estimator that is smooth almost everywhere and sharp exactly where the data demand it, without the analyst having to specify in advance where.

This paper proposes such an estimator. The idea is to leave the classical roughness penalty unchanged and to deform the domain over which it is computed. Every pair of consecutive observations is allowed a non-negative domain warp γi≥0\gamma_{i}\geq 0, an amount of fictitious domain length inserted between them, subject to a total budget MM, and the roughness of the spline is penalized on the warped domain. Where the signal is smooth, warping buys nothing, the optimal γi\gamma_{i} is zero and the fit coincides with an ordinary smoothing spline. Where the signal jumps, the same vertical change can be spread over a longer warped interval at a much lower curvature cost, so the optimizer concentrates the budget on the few intervals where a jump is present. Strictly speaking, the fitted function remains continuous: it approximates a discontinuity much as a steep sigmoid approximates a step function. Because the mechanism is a reparameterization of the domain, the estimator inherits the state-space representation of smoothing splines, which we use for maximum likelihood estimation via the Kalman filter, and it also admits a fast alternating algorithm that avoids numerical likelihood maximization altogether.

The idea of penalizing discontinuities directly, rather than smoothing through them, goes back to the weak rod and weak plate models of Blake and Zisserman (1987) and to the Mumford–Shah functional (Mumford and Shah, 1989), which penalize the roughness of a piecewise-smooth function together with the number of its discontinuities and lead to a combinatorial search over candidate discontinuity sets. The estimator closest to ours, and our benchmark throughout, is the cubic smoothing spline with discontinuities (CSSD) of Storath and Weinmann (2024), which specializes the weak-rod functional to cubic splines and non-equidistant data and solves it exactly by dynamic programming. Wavelet shrinkage (Donoho and Johnstone, 1994) denoises jumpy signals by thresholding multiresolution coefficients, but it targets equidistant designs and does not produce a piecewise-smooth curve. The fused lasso (Tibshirani et al., 2005) and trend filtering (Kim et al., 2009; Tibshirani, 2014) penalize the ℓ1\ell_{1} norm of successive differences of the fitted values or of their derivatives, a convex problem with automatic knot placement, but the knots are a by-product of a coefficient-level penalty rather than of an explicit, interpretable deformation. Free-knot splines (Koo, 1997) and two-stage procedures, which first locate breaks with a changepoint detector such as PELT (Killick et al., 2012) and then smooth between them, decouple detection from estimation. Our formulation keeps the roughness penalty unchanged and reparameterizes the metric in which it is computed, so that detection and estimation are solved jointly, through a single continuous, non-negative vector γ\bm{\gamma}.

Section 2 introduces the domain-warping formulation, its state-space form, the alternating algorithm and the tuning of the method. Section 3 compares the estimators with CSSD and with a classical smoothing spline by Monte Carlo simulation, and Section 4 applies them to two energy-related data sets, chosen to cover the two kinds of data the method is meant for. The first application investigates the temperature response of electricity demand, a cross-sectional relation estimated on hourly observations ordered by temperature rather than by time, irregularly spaced and with many ties, whose discontinuities are thresholds of the physical system and are not known in advance. The second uses weekly time series of retail fuel prices, serially dependent and close to a stochastic trend, in which changes in the excise duty shift the level of the prices at dates that are a matter of public record, so that the estimated discontinuities can be checked against a ground truth that real data rarely offer. Section 5 concludes. Three supplements accompany the paper: the Computational Supplement collects derivations and implementation details, the Calibration Supplement the tuning of the method, and the Application Supplement additional results for the two applications.