arXiv:2610.32369cs.CVOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.32369

A Regularity Condition Under Which a CPAB Transformation is a Diffeomorphism

Amit Aflalo, Oren Freifeld

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

Abstract

Continuous Piecewise-Affine Based (CPAB) transformations, introduced by Freifeld et al. in [10, 11], are defined as the flows obtained by integrating continuous piecewise-affine (CPA) velocity fields. These highly expressive, well-behaved transformations have proven useful in a variety of applications, including nonlinear temporal warping and trainable activation functions in 1D, as well as nonrigid spatial deformations in 2D and 3D. While computational costs were not an issue in 1D, they originally limited the practical expressiveness of CPAB transformations in 2D and, much more severely, in 3D. Our recent work (Aflalo et al. [1]), however, removed this bottleneck, enabling efficient optimization of CPAB transformations with much finer tessellations and substantially greater expressiveness, thereby providing a more practical way than traditional methods for representing and constructing diffeomorphisms in 1D, 2D, and 3D.

There is, however, a mathematical subtlety that was overlooked in the original CPAB papers [10, 11]. CPAB transformations are always homeomorphisms and, in fact, bi-Lipschitz, implying that both the transformations and their inverses are differentiable almost everywhere. However, an additional regularity condition is needed to ensure that these transformations are also diffeomorphisms. The purpose of this note is to remedy this omission by identifying a sufficient regularity condition under which a CPAB transformation is guaranteed to be a diffeomorphism. In 1D and 2D, we show that these conditions can be easily enforced and, moreover, hold with probability one under standard sampling assumptions; we expect analogous behavior in 3D.

1 Introduction

Throughout this note, a diffeomorphism is a differentiable bijection whose inverse is also differentiable. Diffeomorphisms are a natural choice in spatial modeling tasks that require differentiable, invertible, and topology-preserving deformations. They are widely used in applications such as registration, spatial alignment, and geometric warping, where folding, tearing, or self-intersection would result in geometrically invalid deformations. The standard way to construct such transformations is via integration of either a stationary velocity field (SVF) [2] or a time-dependent velocity field as in Large Deformation Diffeomorphic Metric Mapping (LDDMM) [3]. However, in practice, such methods often rely on a dense-grid discretization of the spatial domain. As a result, the number of parameters controlling the diffeomorphisms grows directly with the resolution of the domain (e.g., with the number of pixels in 2D). In modern 2D and especially 3D settings, this leads to high memory use, slow optimization, and difficult optimization landscapes.

Continuous Piecewise-Affine Based (CPAB) transformations, introduced by Freifeld et al. [10, 11], offer a compelling alternative. Instead of a dense-grid discretization, this approach tessellates the domain into cells (e.g., triangles in the 2D case) and constrains the velocity field to be a continuous piecewise-affine (CPA) function. A CPAB transformation is, by definition [10], obtained by integrating a CPA velocity field. CPAB transformations provide a compact low-dimensional pa-rameterization while still capturing rich nonlinear deformations and have been used in diverse deep learning settings, including 1D applications such as time-series alignment and trainable activation functions [15, 19, 24, 27, 5, 17, 20, 16, 23], parameter-efficient multi-task fine-tuning [18], and 2D vision and generative modeling tasks [14, 7, 21, 22, 25, 26, 13].

CPAB transformations are homeomorphisms and even bi-Lipschitz functions (hence also almost-everywhere differentiable with an almost-everywhere differentiable inverse). Typically, but technically not always, CPAB transformations are also diffeomorphisms. Under a suitable regularity condition, a CPAB transformation is a diffeomorphism. The purpose of the present paper is to provide and explain this condition, as well as to show that in 1D and 2D it usually holds in practice. We expect that it also usually holds in 3D.

Relation to the ODE literature. The dependence of ODE flows on initial conditions is a classical topic [12]. Related questions concerning crossings, tangencies, and differentiability of flows at switching interfaces arise in the theory of piecewise-smooth dynamical systems [8, 4, 9]. Some of this literature considers discontinuous vector fields, whereas the CPA velocity fields considered here are continuous and Lipschitz. Our focus is on sufficient regularity conditions that guarantee differentiability of CPAB flows, and on whether these conditions hold generically for commonly used tessellations.

A Remark on Expressiveness and Scalability. Until recently, despite their compact parameterization, CPAB transformations remained hard to scale in practice. The bottleneck lay in computing the loss gradient, ∇θL\nabla_{\theta} \mathcal{L}, where the standard formulation made optimization prohibitively expensive once tessellations become fine or spatial inputs become large. Consequently, traditional CPAB implementations were limited to coarse tessellations, restricting their practical expressiveness. Fortunately, in work concurrent with this paper [1], we showed how to remove this bottleneck. The consequence was drastic improvements (orders of magnitude) in speed and memory consumption. Such gains enable efficient optimization of fine-tessellation CPAB diffeomorphisms even in 3D, and make CPAB competitive as a modern primitive for large-scale nonrigid spatial modeling.

References (25)