---
title: Piecewise Exponential Additive Models
url: https://www.emergentmind.com/topics/piecewise-exponential-additive-models-pams
type: topic
---

# Piecewise Exponential Additive Models

Searching arXiv for recent and foundational papers on Piecewise Exponential Additive Models and closely related extensions.
Piecewise Exponential Additive Models (PAMs) are a class of hazard-based survival models that combine a piecewise exponential representation of event times with the structured flexibility of generalized additive modeling. Their defining construction is to partition follow-up time into intervals, assume the hazard is constant within each interval, and model the log-hazard through an additive predictor that may contain a smooth baseline hazard, linear covariate effects, smooth nonlinear effects, time-varying effects, random effects, and effects of time-dependent covariates [1806.01042]. In practice, this formulation converts continuous-time survival analysis into a Poisson regression problem on interval-split data, while retaining continuous-time semantics and allowing estimation with generalized additive mixed-model machinery such as **mgcv** [1806.01042, 2202.07423]. The term “PAM” is occasionally used in unrelated literatures for piecewise affine maps, but in survival analysis it refers to piecewise exponential additive models or, with random effects emphasized, piecewise exponential additive mixed models (PAMMs) [1510.04121, 1806.01042].

## 1. Definition and core model structure

PAMs model the hazard rather than the survival function directly. A general formulation used in the survival literature writes the hazard as
\[
h(t\mid \bm{x}(t),k)=\exp\!\left(\rho(\bm{x}(t),t,k)\right),\qquad k=1,\ldots,K,
\]
where \(\rho(\cdot)\) is an additive predictor and \(k\) may index causes or transitions in competing-risks and multi-state settings [2202.07423]. The survival function is then recovered through
\[
S(t)=\exp\!\left(-\int_0^t h(s)\,ds\right),
\]
so hazard estimation determines survival and cumulative hazard quantities [2202.07423].

The “piecewise exponential” component arises by partitioning follow-up time into intervals
\[
(\kappa_{j-1},\kappa_j],\qquad j=1,\ldots,J,
\]
and assuming the hazard is constant within each interval [2202.07423, 2011.05824, 1806.01042]. In this construction, the interval-specific hazard for subject \(i\) is often written
\[
h(t\mid \bm{x}_i(t))=\exp\bigl(\rho(\bm{x}_{ij},t_j)\bigr)=:h_{ij},\qquad t\in(\kappa_{j-1},\kappa_j],
\]
with \(t_j\) indexing the interval-specific time point used for baseline and time-varying effects [2202.07423].

What makes PAMs additive is the decomposition of the log-hazard into interpretable components. A canonical specification is
\[
\log(h_{ij})=\beta_0 + f_0(t_j) + \sum_{p=1}^P x_{ij,p}\beta_p + \sum_{l=1}^L f_l(x_{ij,l}),
\]
where \(\beta_0+f_0(t_j)\) is the log-baseline hazard, \(\beta_p\) are linear effects, and \(f_l(\cdot)\) are smooth univariate nonlinear effects [2202.07423, 2011.05824]. In the broader PAMM formulation, the hazard may be written as
\[
\lambda_i(t; x_i, Z_i, \ell_i) = \lambda_0(t)\exp\left[\sum_{p=1}^P f_p(x_{i,p}, t) + \sum_{m=1}^M g(z_{i,m}, t) + b_{\ell_i}\right],
\]
or equivalently
\[
\log(\lambda_i(t; x_i, Z_i, \ell_i)) = \beta_0 + f_0(t) + \sum_{p=1}^P f_p(x_{i,p}, t) + \sum_{m=1}^M g(z_{i,m}, t) + b_{\ell_i},
\]
thereby allowing time-varying effects of time-constant covariates, effects of time-dependent covariates, cumulative effects, and frailty terms \(b_{\ell_i}\) [1806.01042].

This model class is semi-parametric rather than fully nonparametric. The hazard is approximated by piecewise exponential pieces, but the predictor is smooth and penalized, typically through spline bases. A standard basis representation is
\[
f_l(x_{ij,l})=\sum_{m=1}^{M_l}\theta_{l,m}B_{l,m}(x_{ij,l}),
\]
with basis functions such as B-splines and coefficients controlled by quadratic penalties to regulate roughness [2202.07423].

## 2. Poisson representation and estimation machinery

The central computational device of PAMs is the transformation of survival data into piecewise exponential data (PED). For each subject, one row is created for every interval during which the subject is at risk [2202.07423, 2011.05824, 1806.01042]. The interval-specific event indicator is denoted \(\delta_{ij}\), and the time contributed in the interval is denoted \(t_{ij}\) or \(y_{ij}\) [2202.07423, 2509.19956]. In the formulation used by **pammtools**, the offset is
\[
o_{ij} = \log(t_{ij}), \qquad
t_{ij} = \min(\kappa_j-\kappa_{j-1},\, t_i-\kappa_{j-1}),
\]
and the event indicator is
\[
\delta_{ij} =
\begin{cases}
1, & \text{if } t_i \in (\kappa_{j-1}, \kappa_j] \wedge \delta_i = 1,\\
0, & \text{else}.
\end{cases}
\]
The resulting working model is
\[
\delta_{ij} \stackrel{i.i.d.}{\sim} \text{Poisson}(\mu_{ij}), \qquad \mu_{ij} = \lambda_{ij} t_{ij},
\]
or equivalently
\[
\delta_{ij}\sim \mathrm{Poisson}(\mu_{ij}=h_{ij}t_{ij})
\]
in the notation used in the DeepPAMM and DeepPAM papers [1806.01042, 2202.07423, 2011.05824].

Under this representation, the subject-specific log-likelihood contribution becomes
\[
\ell_i=\sum_{j=1}^{J_i}\bigl(\delta_{ij}\log(h_{ij})-h_{ij}t_{ij}\bigr),
\]
which is the standard PAM/PEM conversion of survival likelihood into a Poisson regression problem on interval-split data [2202.07423, 2011.05824]. The negative log-likelihood is then augmented by smoothing penalties,
\[
-\log\mathcal{L}(\boldsymbol{\beta},\boldsymbol{\theta}_0,\ldots,\boldsymbol{\theta}_L) +\sum_{l=0}^{L}\psi_l\Psi(\boldsymbol{\theta}_l),
\]
or, in closely related notation,
\[
- \log \mathcal{L}(\boldsymbol{\beta}, \boldsymbol{\theta}_0,\ldots,\boldsymbol{\theta}_L) + \sum_{l=0}^{L} \psi_{l}J(\boldsymbol{\theta}_{l}),
\]
where \(\psi_l\ge 0\) controls smoothness [2202.07423, 2011.05824].

This Poisson formulation is fundamental to the practical identity of PAMs. It explains why they are routinely estimated as generalized additive mixed models and why the methodology transfers directly from additive regression to time-to-event data [1806.01042]. In **mgcv**, a typical implementation is
```r
gam(ped_status ~ s(tend) + ..., data = ped, family = poisson(), offset = offset)
```
or `bam()` for large data [1806.01042]. The term `s(tend)` estimates the log-baseline hazard, parametric terms represent linear covariate effects, and smooth interaction constructions such as `s(..., by=...)`, `ti(...)`, or `te(...)` express time-varying and interaction effects [1806.01042].

A recurring technical point in the literature is that the Poisson representation is a working likelihood because interval indicators are not truly independent [1806.01042]. Nonetheless, it is the standard approximation underlying piecewise exponential models and is operationally central for penalization, mixed-model estimation, and scalable implementation.

## 3. Additive effects, smooths, random effects, and cumulative exposure structures

PAMs are distinguished from simpler piecewise exponential proportional hazards models by the breadth of effects that can enter the additive predictor. The smooth baseline hazard \(f_0(t)\) is one such component, but the framework extends to a wider structured-additive vocabulary [1806.01042, 2202.07423].

Time-constant covariates may enter linearly or smoothly. The **pammtools** exposition lists common representations such as linear time-constant effects `x`, smooth time-constant effects `s(x)`, linear time-varying effects `x + x:t`, smoothly time-varying linear effects `s(t, by = x)`, and full smooth interaction surfaces `te(x, t)` [1806.01042]. For selected covariates, the smooth terms \(f_l(x_{ij,l})\) are expressed through basis expansions and roughness penalties, with basis dimension chosen “relatively large to avoid underfitting” and overfitting controlled by penalties on neighboring spline coefficients [2202.07423].

Random effects, or frailties, yield the “mixed model” extension emphasized in PAMMs. In the survival-analysis formulation of **pammtools**, this appears as a group-specific term \(b_{\ell_i}\) in the log-hazard [1806.01042]. In the DeepPAMM paper, random effects are described as linear effects for each cluster with a normal prior, and the paper explicitly notes that a normal random effect is mathematically equivalent to a ridge penalty [2202.07423]. This equivalence links mixed-model estimation, Gaussian frailty interpretation, and penalized optimization.

Time-dependent covariates can enter either concurrently or cumulatively. For concurrent effects, the PED transformation can merge longitudinal covariate histories with the split survival data, carrying the last observed covariate value forward until the next measurement time [1806.01042]. The more general cumulative-effect formulation is
\[
g(z,t) = \int h(t, t_z, z(t_z))\, dt_z,
\]
meaning that the current hazard depends on the whole exposure history of a time-dependent covariate [1806.01042]. The paper identifies special cases including weighted cumulative exposure,
\[
h(t-t_z) z(t_z),
\]
and distributed lag nonlinear models,
\[
h(t-t_z, z(t_z)).
\]
This is one of the most distinctive extensions of PAMMs relative to conventional proportional hazards regression, because it allows the hazard at time \(t\) to aggregate multiple past exposure contributions with nonlinear lag structures [1806.01042].

Interpretation follows the structure of the additive predictor. The smooth baseline hazard is the log-baseline hazard, though the **pammtools** paper stresses that in the PED/PAMM setting it should be interpreted as a step function because the underlying hazard is piece-wise constant within intervals [1806.01042]. Time-varying effects of time-constant covariates are interpreted as time-specific log-hazard ratios or as surfaces over covariate value and time. For cumulative-effect terms, the literature distinguishes the partial effect surface \(h\) from the cumulative effect obtained by integration over exposure times [1806.01042].

## 4. Relationship to piecewise exponential models and proportional hazards formulations

PAMs are best understood as an extension of classical piecewise exponential models (PEMs). In a PEM, follow-up is divided into intervals and the hazard is approximated by a step function constant within each interval [1806.01042]. The PAM construction keeps this interval-wise exponential representation but replaces a purely parametric linear predictor with a flexible additive one estimated through penalized smooths and mixed-model techniques [1806.01042, 2202.07423].

This relationship matters because some recent papers concern only the piecewise exponential component and not the additive-model component. The paper "Proportional asymptotics of piecewise exponential proportional hazards models" studies a proportional hazards model with a piecewise-constant baseline hazard,
\[
\lambda(t \mid \cdot) := \sum_{k=1}^{\ell} \psi_k(t)\exp(\omega_k),
\]
with interval indicators
\[
\psi_k(t) := \mathbf{I}[\tau_k < t < \tau_{k+1}], \quad k=1,\dots,\ell,
\]
and a single linear predictor \(X^\top \beta\) under ridge penalization [2501.18995]. The paper explicitly states that it is **not about PAMs in the modern additive-model sense**, but rather about a piecewise exponential proportional hazards model with a piecewise-constant baseline hazard, a single linear predictor, and ridge penalization on regression and baseline-hazard parameters [2501.18995]. This distinction is important because the piecewise exponential construction alone does not imply additive covariate effects, smooth GAM terms, or mixed-model structure.

A similar distinction arises in neural-network generalizations. The paper "Neural Network-Based Piecewise Survival Models" partitions time into a grid
\[
\{\tau_i\}_{i=0}^N,\qquad \tau_0=0<\tau_1<\cdots<\tau_N=t_{\max},
\]
and proposes four models: piecewise constant density, piecewise linear density, piecewise constant hazard, and piecewise linear hazard [2403.18664]. The piecewise constant hazard model,
\[
h(t\mid x)=h_{k(t)}(x), \qquad h_i(x)=e^{z_i(x)},
\]
is described as the direct neural-network version of a piecewise exponential model [2403.18664]. Yet the paper does not introduce explicit additive predictor formulas in the generalized additive-model sense, so its relationship to PAMs is structural rather than formal. It shares interval-wise hazard modeling and continuous-time semantics, but replaces spline-based additive predictors with a neural network that outputs interval-specific parameters [2403.18664].

A common misconception is therefore to treat all piecewise hazard models as PAMs. The literature does not support that equivalence. Classical PEMs, ridge-penalized piecewise exponential proportional hazards models, neural piecewise hazard models, and GAM-based PAMs all exploit the same interval partitioning idea, but PAMs specifically refer to the additive-model survival framework in which the log-hazard contains structured linear, smooth, and mixed effects [1806.01042, 2202.07423, 2501.18995].

## 5. Software ecosystem and workflow

The practical development of PAMs is closely associated with the **pammtools** package, introduced specifically to facilitate data transformation, estimation support, simulation, visualization, and interpretation for piece-wise exponential additive mixed models [1806.01042]. The package does not perform model fitting itself; instead, it prepares data and post-processes results so that estimation can be carried out in **mgcv** [1806.01042].

Its central transformation function is **`as_ped`**, which converts standard time-to-event data into PED format [1806.01042]. For ordinary right-censored data, `as_ped(Surv(time, status) ~ ., cut = ...)` splits follow-up into intervals, creates `tstart` and `tend`, adds an interval indicator, constructs `ped_status`, and computes the offset as the log interval length or remaining time [1806.01042]. For time-dependent covariates, the function can merge survival data with longitudinal measurement histories by using `concurrent()`, employing the union of event times and measurement times as split points and carrying forward the last observed covariate value [1806.01042]. For cumulative effects, `as_ped` accepts `cumulative()`, together with arguments such as `tz_var`, `ll_fun`, and optionally `latency()`, and outputs the matrix-valued covariates needed for estimation in **mgcv** [1806.01042].

The package also provides tools for simulation and effect visualization. Functions highlighted in the paper include **`sim_pexp()`** and **`add_tdc()`** for data generation; **`get_laglead()`**, **`gg_laglead()`**, **`gg_partial()`**, **`gg_slice()`**, and **`gg_cumu_eff()`** for inspection of lag-lead windows and effect surfaces; and post-processing helpers such as **`tidy_fixed()`**, **`tidy_smooth()`**, **`get_cumu_coef()`**, **`add_hazard()`**, **`add_cumu_hazard()`**, and **`add_surv_prob()`** [1806.01042].

A notable practical recommendation concerns interval choice. The **pammtools** paper recommends using the unique observed event times as cut points, and states that this is the default in `pammtools` [1806.01042]. The motivation is that this gives more resolution where the hazard changes and improves approximation, although fewer intervals may be required for computational reasons in large data settings [1806.01042]. This suggests a trade-off between approximation fidelity and computational burden rather than a single universally optimal partitioning strategy.

The estimation syntax remains standard GAM/GAMM practice. Smooths, tensor products, and by-variable interactions are specified through the familiar **mgcv** interface [1806.01042]. This is one reason PAMs occupy an important methodological niche: they provide a bridge between continuous-time survival analysis and the mature ecosystem of additive-model software.

## 6. Extensions: deep learning, joint models, multi-state processes, and high-dimensional settings

A major recent line of work embeds PAMs within neural architectures. "Semi-Structured Deep Piecewise Exponential Models" proposes **DeepPAM**, which starts from the general hazard
\[
h(t \mid \mathbf{x}(t), k) = \exp\left(f(\mathbf{x}(t), t, k)\right), \qquad k=1,\ldots,K,
\]
and augments the additive predictor with deep components for unstructured data [2011.05824]. One extension is
\[
h(t \mid \mathbf{x}(t), \mathbf{z}(t)) = \exp\bigl\{ f(\mathbf{x}(t), t) + d(\mathbf{z}(t)) \bigr\},
\]
where \(f(\mathbf{x}(t), t)\) is the structured PAM part and \(d(\mathbf{z}(t))\) is a neural encoder [2011.05824]. A more flexible version allows interaction between structured and learned features,
\[
h(t \mid \mathbf{x}(t), \mathbf{z}(t)) = \exp\bigl\{ f(\mathbf{x}(t), d(\mathbf{z}(t)), t) \bigr\},
\]
thus enabling non-proportional hazards and richer interaction structures [2011.05824].

The related **DeepPAMM** framework generalizes the same idea and explicitly positions PAMMs as the statistical core of a flexible deep survival model [2202.07423]. It writes the hazard as
\[
h(t\mid \bm{x}(t),\bm{z}(t))=\exp\bigl\{\rho(\bm{x}(t),t)+d(\bm{z}(t))\bigr\},
\]
or, interval-wise,
\[
h_{ij}=\exp\bigl\{\bm{B}_{ij}\bm{w}+\sum_{u=1}^U \zeta_{ij,u}\gamma_u\bigr\},
\]
where \(\bm{B}_{ij}\bm{w}\) preserves the structured additive terms and the latent features \(\zeta_{ij,u}\) come from the deep component [2202.07423]. The paper emphasizes that interpretability is retained for the structured part because of the additive form [2202.07423]. It also extends naturally to non-proportional hazards and competing risks through
\[
h(t\mid \bm{x}(t),\bm{z}(t))=\exp\bigl\{\rho(\bm{x}(t),d(\bm{z}(t)),t)\bigr\}
\]
and cause-specific hazards
\[
h_{ijk}=\exp\bigl\{\bm{B}_{ijk}\bm{w}_k+\sum_{u=1}^U \zeta_{ijk,u}\gamma_{k,u}\bigr\}
\]
for \(K\) causes [2202.07423].

PAM-based survival components have also been used in Bayesian joint models. "Spatial Joint Models through Bayesian Structured Piece-wise Additive Joint Modelling for Longitudinal and Time-to-Event Data" rewrites the time-to-event submodel as a piece-wise exponential additive mixed model within a Bayesian shared-parameter joint model [2302.07020]. The survival component becomes
\[
\boldsymbol{\lambda}(t) = \exp\left\{f_0(t_j) + \boldsymbol{\eta}_{\text{s} + \alpha \boldsymbol{\eta}_{\text{ls}\right\}, \qquad t \in (\kappa_{j-1}, \kappa_j],
\]
with nonlinear smooths, spatial effects, and random effects represented through structured additive priors [2302.07020]. The paper reports that the resulting Structured Piecewise Additive Joint Model is about **twice as fast** as the benchmark model and remains stable in imbalanced settings with few events [2302.07020].

The framework has also been extended to multi-state disease histories. "Multi-state Models For Modeling Disease Histories Based On Longitudinal Data" develops transition-specific PAMs for dependent left-truncation, multiple time scales, index event bias, and interval-censoring [2509.19956]. In the single stratified time scale (SSTS) setting, the transition-specific baseline hazard is
\[
h_{0,k}^{ssts}(t) = \exp \Big( \beta_{0,k} + f_k^{ssts}(t) \Big),
\]
while in the multiple time scales (MTS) setting the baseline hazard can depend on several time scales through a sum of smooth transition-specific functions [2509.19956]. The paper reports that PAMs can handle dependent left-truncation and multiple time scales, that SSTS PAMs are more robust than MTS PAMs under misspecification, and that PAMs recover baseline and fixed effects well in most settings except for baseline hazards in interval-censored data [2509.19956].

By contrast, the 2025 high-dimensional asymptotic theory paper does not analyze PAMs with additive covariate effects, but it provides theory for ridge-penalized piecewise exponential proportional hazards models when \(p = \zeta n\) and covariates are Gaussian [2501.18995]. The authors prove that the optimal ridge-penalized log-likelihood converges in probability to a deterministic saddle-point problem and characterize the estimator and prediction error under proportional asymptotics [2501.18995]. This is directly relevant to the piecewise exponential component and to regularization in high dimensions, but not to smooth additive covariate modeling itself.

## 7. Applications, empirical behavior, and interpretive scope

Empirically, PAMs and PAM-derived models are used in settings where continuous-time semantics, flexible baseline hazards, and structured covariate effects are needed simultaneously. The **pammtools** paper demonstrates this with tumor data, primary biliary cholangitis data, and simulated weighted cumulative exposure and distributed lag nonlinear models [1806.01042]. The tumor-data example shows that PAMM estimates for time-constant effects are very close to Cox PH estimates, while more elaborate specifications reveal non-proportional hazards and cumulative hazard differences not directly encoded in standard Cox models [1806.01042].

DeepPAMM extends this empirical scope to settings with high-dimensional, multimodal, or unstructured inputs. Across public datasets such as tumor, gbsg2, metabric, breast, mgus2, and icu, it is described as consistently among the top-performing methods in terms of integrated Brier score while remaining applicable to right-censored data, competing risks, high-dimensional data, and mixed effects [2202.07423]. In the London fire brigade response-time case study, the structured part of the hazard is written as
\[
\log(h(t\mid t_d,c_1,c_2,v))= \beta_0+f_0(t)+f_1(t_d)+f_2(c_1,c_2)+b_v+d(t,t_d,c_1,c_2,v),
\]
combining a cyclic spline for time of day, a bivariate tensor-product spline for spatial coordinates, and ward-specific random effects [2202.07423]. The paper reports that the structured effects are interpretable and aligned with prior work, while the deep component gives only slight predictive improvement in that application [2202.07423].

The neural piecewise-survival literature further suggests that interval-wise hazard parameterization can yield favorable accuracy–computation trade-offs. On a simulated Weibull dataset, "Neural Network-Based Piecewise Survival Models" reports test losses of \(0.600\pm0.07138\) for Constant Hazard and \(0.561\pm0.0592\) for Linear Hazard, compared with \(0.549\pm0.0615\) for an energy-based model, while training times for the piecewise models were roughly \(0.6\)–\(0.7\) seconds versus \(2.16\) seconds for the energy-based model [2403.18664]. This is not evidence about PAMs in the strict GAM sense, but it suggests that the piecewise continuous-time representation remains competitive when combined with modern function approximators.

The recent multi-state CKD application illustrates the scope of PAMs in longitudinal disease-history analysis. In UK Biobank data with \(n = 142{,}667\) subjects and \(19{,}293\) non-censoring transitions, transition-specific hazards were estimated for Healthy, Mild CKD, Severe CKD, ESKD, and Death [2509.19956]. The paper reports that CKD progression risk was highest for individuals with early CKD onset and further increased over age, and that the genetic variant rs77924615 in the UMOD locus was associated with CKD onset hazards but not convincingly with further CKD progression after adjustment [2509.19956]. This illustrates a broader property of PAMs: because the hazard is decomposed additively, one can separate onset effects, progression effects, time-scale effects, and history-dependent effects within a single coherent survival framework.

A final interpretive point concerns the scope of “interpretability.” In classical PAMs, interpretability derives from the additive decomposition of the log-hazard into smooth and linear terms whose shapes can be visualized and whose cumulative implications can be computed [1806.01042, 2202.07423]. In deep extensions such as DeepPAM and DeepPAMM, the structured part remains interpretable, but the learned latent features are not directly interpretable in the same way [2011.05824, 2202.07423]. This is less a contradiction than a layered architecture: the additive PAM predictor continues to serve as the interpretable statistical backbone, while the deep component absorbs complex residual structure.

Taken together, the literature presents PAMs as a versatile survival-modeling framework centered on a piecewise exponential hazard, a PED-to-Poisson reduction, and a richly structured additive predictor [1806.01042, 2202.07423]. Their modern development proceeds in two directions at once: toward broader data modalities and more complex event structures, and toward sharper theoretical understanding of the piecewise exponential foundation under regularization and high dimensionality [2011.05824, 2202.07423, 2302.07020, 2501.18995, 2509.19956].

Source: https://www.emergentmind.com/topics/piecewise-exponential-additive-models-pams