---
title: Two-Part Affine Approximation
url: https://www.emergentmind.com/topics/two-part-affine-approximation
type: topic
---

# Two-Part Affine Approximation

Two-part affine approximation designates approximation schemes that deliberately split a target into two interacting components and impose affine structure on one component, or else achieve affine approximation by a two-stage procedure. The clearest current formulation is in control-affine learning, where \(\hat h(x,u)\) is required to be affine in \(u\) while permitting arbitrary nonlinear dependence on the state \(x\) [2406.06514]. Closely related work applies the same split principle by decomposing a nonlinear multivariate function into unary or binary factors and replacing each factor by a piecewise affine approximation [2402.15601], and by first establishing nearly affine behavior on one-dimensional slices before upgrading it to a genuinely high-dimensional affine approximation on a ball [1202.2567; 1510.00276]. This suggests that the expression refers less to a single canonical object than to a recurrent approximation architecture.

## 1. Structural scope and recurrent patterns

Across the cited literature, two-part affine approximation appears in two main forms. In a **structural split**, the model itself is partitioned into an affine part and a non-affine part. In a **procedural split**, approximation is carried out in two stages, with local or partial affine control converted into a global approximation.

| Setting | Two-part structure | Representative paper |
|---|---|---|
| Control-affine modeling | \(f(x)\) plus \(g(x)u\) | [2406.06514] |
| Compositional PWA approximation | Decompose into unary/binary factors, then approximate each factor | [2402.15601] |
| High-dimensional Lipschitz approximation | Control on 1D slices, then upgrade to a ballwise affine approximation | [1202.2567], [1510.00276] |

In the control-affine case, the decomposition is explicit:
\[
\dot{x} = f(x) + g(x)u
\qquad\text{or}\qquad
x_{t+1} = f(x_t) + g(x_t)u_t.
\]
Here \(f(x)\) is the state-only term and \(g(x)u\) is the control-affine term. In the compositional PWA case, the split is algorithmic: decompose a complicated nonlinear function into simpler unary or binary intermediates, approximate each intermediate function with a PWA map, then compose the approximants while propagating error bounds. In the high-dimensional Banach-space literature, the split is geometric: one first proves affine-like behavior on many one-dimensional restrictions and then uses multiscale aggregation to obtain a true affine approximation on a sub-ball.

This taxonomy does not define a single theorem. Rather, it isolates a recurring design principle: preserve or recover affine structure in one component while allowing complexity to reside in the other component or in the composition.

## 2. Control-affine random-feature models

The most literal use of two-part affine approximation appears in nonlinear modeling for control-affine systems [2406.06514]. The modeling objective is to learn a function \(\hat h:\mathcal X\times\mathcal U\to\mathbb R\) such that \(\hat h(x,u)\) is affine in \(u\) while remaining nonlinear in \(x\). A concrete motivating example is the derivative of a certificate function:
\[
\dot C(x,u)=\nabla C(x)^\top(f(x)+g(x)u),
\]
which naturally decomposes into a state-dependent part and a control-affine part.

Two random-feature constructions are proposed. The **Affine Dot Product (ADP) basis** is
\[
\varphi_c(x,u)=\begin{bmatrix} u_1 \varphi_1(x)^\top & \dots & u_m \varphi_m(x)^\top & \varphi_{m+1}(x)^\top \end{bmatrix}^\top,
\]
and can also be written as a block-diagonal operator on the augmented control vector. Its dimension is \(D(m+1)\). The **Affine Dense (AD) basis** is
\[
\varphi_d(x,u)= \begin{bmatrix} \varphi_1(x) & \dots & \varphi_{m+1}(x) \end{bmatrix} \begin{bmatrix}u\\1\end{bmatrix},
\]
with output dimension \(D\). In both cases, the only dependence on \(u\) is through multiplication by \([u^\top~~1]^\top\), so the learned predictor is affine in the control input.

The state-dependent features are instantiated by random Fourier features:
\[
\varphi_i(x):= \sqrt{2/D} \begin{bmatrix} \sin(\omega_{i,1}^\top x) & \cos(\omega_{i,1}^\top x) & \dots & \sin(\omega_{i,D/2}^\top x) & \cos(\omega_{i,D/2}^\top x) \end{bmatrix}^\top,
\]
with \(\omega_{i,j}\) sampled i.i.d. from \(p_i(\cdot)\). This yields Monte Carlo approximations of the associated state kernels.

The paper formalizes the representational content of these constructions through two compound kernels. The ADP basis approximates the **ADP kernel**
\[
k_c((x,u),(x',u')) := \begin{bmatrix}u^\top & 1\end{bmatrix} \operatorname{diag}(k_1(x,x'),\dots,k_{m+1}(x,x')) \begin{bmatrix}u'^\top & 1\end{bmatrix}^\top,
\]
while the AD basis approximates the **AD kernel**
\[
k_d((x,u),(x',u')) := \begin{bmatrix}u^\top & 1\end{bmatrix} \big(D(x,x')+A(x,x')\big) \begin{bmatrix}u'^\top & 1\end{bmatrix}^\top.
\]
If each individual kernel approximation satisfies
\[
|k_i(x)-\varphi_i(x)^\top\varphi_i(x')|\le \epsilon,
\qquad |k_i(x)|\le 1,
\]
then both compound approximations satisfy
\[
\max\Big\{ |k_c(s,s')-\varphi_c(s)^\top\varphi_c(s')|,\; |k_d(s,s')-\varphi_d(s)^\top\varphi_d(s')| \Big\} \le \epsilon(u^\top u'+1).
\]

The computational motivation is equally explicit. Kernel methods are described as typically requiring \(O(N^3)\) time and \(O(N^2)\) memory, whereas RF methods require about \(O(ND^2)\) time and \(O(ND)\) memory. Because the model remains affine in \(u\), it can be inserted directly into a quadratic program in the certainty-equivalent setting, or an SOCP in the robust GP-style setting. On a double inverted pendulum, the nominal controller built from an incorrect model fails, while the data-driven affine models succeed in stabilizing or balancing the pendulum. ADP is described as more expressive but larger; AD is more compact, faster, and often competitive.

## 3. Compositional piecewise-affine approximation

A second major realization of the two-part pattern is the decomposition of a nonlinear multivariate function into one- and two-input factors, followed by separate PWA approximation of each factor and analytic propagation of the resulting error [2402.15601]. This avoids the combinatorial blow-up associated with direct high-dimensional PWA approximation.

A canonical example is
\[
f(x)=\left(\sin\left(\frac{1}{x}\right)\right)^2,\qquad x\in[1,3],
\]
decomposed as
\[
w_1=x,\qquad
w_2=\frac{1}{w_1},\qquad
w_3=\sin(w_2),\qquad
w_4=w_3^2.
\]
A higher-dimensional case study considers
\[
y=f(x)=\sum_{i=1}^4 \frac{1}{d_i^2+1},\qquad f:[-5,5]^2\to\mathbb{R},\quad d_i=\|x-s_i\|_2,
\]
which is decomposed into \(28\) unary functions.

Two breakpoint-placement procedures are given for unary scalar-valued functions on an interval. **Method 1** uses bisection to find the largest next breakpoint such that the secant-line error remains below a tolerance \(\tau\). It can be nearly optimal in the number of breakpoints, but each interval error evaluation may require nonlinear optimization. **Method 2** is optimization-free under the assumptions \(f\in\mathcal C^3\) and a known bound
\[
d_3 \ge \max_{x\in[\underline{x},\bar{x}]} |f'''(x)|.
\]
Its central bound is
\[
\max_{x\in[\underline{x},\bar{x}]} |\bar{f}(x)-f(x)| \leq \frac{d_3}{8}(\bar{x}-\underline{x})^3 + \frac{d_2}{8}(\bar{x}-\underline{x})^2,
\qquad
d_2 = |f''(\underline{x})|.
\]
The algebraic breakpoint rule updates \(d_2=|f''(x_{k+1})|\), allowing variable breakpoint spacing: when curvature is small, the next breakpoint can be farther away.

The second contribution of the paper is error propagation for compositions. For iterated compositions such as \(f(g(h(x)))\), the recursive structure is
\[
\begin{aligned}
\varepsilon_{f\circ g\circ h}
&= \tau_f + d_{f,g}\varepsilon_{g\circ h} \\
&= \tau_f + d_{f,g}\tau_g + d_{f,g}d_{g,h}\tau_h,
\end{aligned}
\]
with \(\varepsilon_x=0\) when the input is exact. The paper uses this to formulate two inverse problems: minimize complexity subject to a global error tolerance, or minimize error subject to a breakpoint budget.

The tower-function case study follows the workflow: propagate domains by interval arithmetic via CORA, sample tolerances logarithmically for each unary function, determine the number of breakpoints with Algorithm 1, form a mixed-integer optimization problem for the global complexity budget, and solve for a PWA approximation with a fixed number of breakpoints. The reported result is **163 breakpoints**, upper error bound **0.4453**, and true maximum error approximately **0.33**; uniform breakpoint spacing with the same 163 breakpoints gives a worse true error, about **0.60**. A common misconception is therefore that uniform gridding is an adequate proxy for affine segmentation. In the cited results, intelligent breakpoint placement is materially better.

## 4. Quantitative affine approximation in high-dimensional analysis

In Banach-space theory, the relevant question is not representation by finitely many affine pieces but the scale on which a Lipschitz map must resemble a single affine map. Li and Naor formalized this through the modulus of affine approximability \(r_{X\to Y}(\varepsilon)\), defined as the largest radius such that every Lipschitz \(f:B_X\to Y\) admits a sub-ball \(y+\rho B_X\subseteq B_X\) and an affine map \(A\) with
\[
\sup_{z\in y+\rho B_X}\|f(z)-A(z)\|_Y \le \varepsilon\,\|f\|_{\mathrm{Lip}}\,\rho.
\]
Their proof is explicitly interpretable as a two-part mechanism: first obtain one-dimensional control along many lines, then promote it to affine control on a genuinely high-dimensional cube or ball [1202.2567].

The one-dimensional component is encoded by a dyadic coercive quantity
\[
E_{a,b}^{(m)}(h) = \sum_{k=0}^{2^m-1} \frac{ \left\| h\!\left(a+\frac{k+1}{2^m}(b-a)\right)-h\!\left(a+\frac{k}{2^m}(b-a)\right) \right\|_Y^p }{ 2^{-mp}(b-a)^p },
\]
and uniform convexity yields a rigidity inequality controlling deviation from the linear interpolant. The higher-dimensional component introduces multiscale quantities such as \(H_{m,k}^{\theta}(f)(x)\) and multilinearity defects \(D_m(f)(x)\); if \(D_m(f)(x)\) is small on a cube, then there exists an affine map \(A\) with
\[
\sup_{z\in x+[0,\theta\sqrt{\varepsilon}]^n}\|f(z)-A(z)\|_Y \le 8n^2\varepsilon.
\]
This is the geometric prototype of two-stage affine approximation: linewise straightness first, affine synthesis second.

For UMD targets, the scale is substantially improved [1510.00276]. The main theorem states that there exists \(c=c(Y)\in(0,\infty)\) such that for every \(n\in\mathbb N\), every \(n\)-dimensional normed space \(X\), every \(1\)-Lipschitz map \(f:B_X\to Y\), and every \(\varepsilon\in(0,1/2]\), there exist an affine map \(\Lambda:X\to Y\) and a sub-ball
\[
B^*=y+\rho B_X\subseteq B_X,\qquad \rho\ge \exp\!\bigl(-(1/\varepsilon)^{cn}\bigr),
\]
such that
\[
\|f(x)-\Lambda(x)\|_Y\le \varepsilon\rho
\qquad\forall x\in B^*.
\]
The proof passes through a Dorronsoro-type theorem for UMD targets and a canonical affine approximation operator
\[
P_u f = P_0 f + T_u f,
\]
with
\[
T_u f(w)=(n+2)\int_{B^n} \langle z,w\rangle f(uz)\,dz.
\]
The analytic content is that a multiscale integral estimate for \(f_x-P_u f_x\) yields the existence of a scale and location at which the canonical affine part is already good.

These results do not assert that a high-dimensional Lipschitz map is globally close to affine. They provide explicit macroscopic sub-balls, but the radius remains exponentially small in the ambient dimension or in \(\varepsilon^{-1}\).

## 5. Piecewise affine approximation in \(BV\) and \(W^{1,1}\)

A different but closely allied theory studies when rough functions can be approximated by countably piecewise affine maps. Kristensen and Rindler showed that \(BV\) functions cannot, in general, be approximated well by piecewise constant functions, but can be approximated effectively by piecewise affine functions if the mesh is adapted to the singularities of the \(BV\) function [1211.1792].

For a bounded Lipschitz domain \(\Omega\subset\mathbb{R}^d\), a finite Borel measure \(\lambda\), and any \(u\in BV(\Omega;\mathbb{R}^m)\), their main theorem states that for every \(\varepsilon>0\) there exist a countable family \(R\) of rotated rectangles and simplices and a function \(v\in W^{1,1}(\Omega;\mathbb{R}^m)\) such that
- \(( \mathcal{L}^d + |Du| )\bigl(\Omega\setminus \bigcup R\bigr)=0\),
- \(v|_R\) is affine for every \(R\in R\),
- \(\|u-v\|_{L^1(\Omega;\mathbb{R}^m)} + |Du|(\Omega)-|Dv|(\Omega)<\varepsilon\),
- \(R=R_g\cup R_b\), \(\lambda\bigl(\bigcup R_b\bigr)<\varepsilon\), and \(\sum_{R\in R_g}\int_{\partial R}|u-v|\,d\mathcal{H}^{d-1}<\varepsilon\),
- \(v|_{\partial\Omega}=u|_{\partial\Omega}\).

The proof combines blow-up analysis at regular and singular points with an adapted local mesh construction. At \(\mathcal L^d\)-almost every point, the blow-up converges strictly in \(BV\) to the affine tangent map. At \(|D^s u|\)-almost every point, the blow-up is one-directional and reflects Alberti’s rank-one structure. This is then matched by thin rectangles aligned with the singular direction, after which a gluing lemma constructs countably piecewise affine approximants on annuli with Whitney-type geometry.

For Sobolev functions, the same paper proves a genuine \(W^{1,1}\) estimate on a regular uniform triangulation \(T\):
\[
\int_{\Omega}\bigl(|u-a|+|\nabla u-\nabla a|\bigr)\,dx \le C\,\omega(3k),
\]
where \(a\) is a \(T\)-piecewise affine quasi-interpolant and \(\omega\) is an \(L^1\)-modulus of continuity of \(\nabla u\). The authors emphasize that this is a full \(W^{1,1}\)-error estimate rather than merely an \(L^1\)-estimate. A frequent misunderstanding is that piecewise constants are a sufficient substitute in \(BV\); the cited proposition shows that a nontrivial smooth compactly supported \(u\) cannot be area-strictly approximated by piecewise constant \(BV\) functions.

## 6. Extensions, adjacent notions, and terminological boundaries

The same general preference for affine structure appears in several adjacent literatures. In two-stage adjustable robust optimization with covering constraints and right-hand-side uncertainty, an LP restriction produces an explicit feasible affine recourse rule
\[
\mathbf{y}_{\sf AFF}(\mathbf{h}) = \mathbf{y}^* + \sum_i \frac{\mathbf{R}_i^T\bm{\alpha}^*}{\theta_i}\,\mathbf{v}_i\,h_i,
\]
and affine policies achieve an
\[
O\!\left(\frac{\log n}{\log \log n}\frac{\log L}{\log \log L}\right)
\]
approximation guarantee [2112.00868]. Here the “two-part” structure is first-stage static decisions plus second-stage affine recourse.

In propositional knowledge compilation, affine approximation means something different: the affine envelope \(\mathit{aff}(\varphi)\) is the least affine Boolean function entailed by a Boolean knowledge base \(\varphi\). The ROBDD-based algorithm of Zanuttini’s successors computes this envelope by translating the model set into a vector space over \(\mathbb F_2\), taking XOR-closure, and translating back. On random functions, the reported average timings in milliseconds are \(0.021\) versus \(0.017\) at 12 variables and \(5.991\) versus \(0.272\) at 15 variables, while the model-set implementation ran out of memory beyond 15 variables [0804.0066].

A mathematically different two-part structure appears in the computation of Falconer’s affinity dimension for dominated affine iterated function systems. There the singular value function is split across exterior powers \(\wedge^k\) and \(\wedge^{k+1}\), and the resulting transfer-operator method yields super-exponentially accurate numerical approximations, including examples with more than 30 stable decimal digits [1807.09084]. This is not a theory of affine approximation in the control or Banach-space sense, but it is an important adjacent use of two-part affine structure.

Another adjacent universality theorem proves that one arbitrary continuous non-affine univariate function together with the specific affine function
\[
g_2(t)=1-\frac{t}{2}
\]
generate, under addition and composition, a class dense in \(C(K)\) for every compact \(K\subset\mathbb R\), and similarly in \(C(K)\) on \(\mathbb R^n\) when the coordinate functions are available [2605.26550]. This is again not the same formalism as control-affine or PWA approximation, but it shows how an affine generator can act as one half of a dense approximation mechanism.

Finally, the expression should not be conflated with the **two-part MDL code** of algorithmic information theory. The abstract of “Approximation of the Two-Part MDL Code” concerns successive monotonically length-decreasing two-part MDL codes, computability issues, and goodness of fit expressed through Kolmogorov complexity, not affine approximation [0612095]. The overlap is terminological rather than conceptual.

Taken together, these works show that two-part affine approximation is best understood as a family of approximation strategies centered on preserving affine structure where tractability, certification, or analytic control require it, while allowing the remaining component to carry the nonlinear or combinatorial complexity.

Source: https://www.emergentmind.com/topics/two-part-affine-approximation