Lecture 19: Riemannian Manifolds — Local Polynomial Regression

Intrinsic local polynomial fitting for manifold-valued responses

1 Learning Goals

By the end of this lecture, learners should be able to:

  • Contrast local Fréchet regression (metric-only) with intrinsic local polynomial regression (manifold structure).
  • Write the intrinsic mean-zero error model \(Y = \exp_{\mu(X)}(\varepsilon)\).
  • Formulate the order-\(\ell\) local polynomial curve expansion in a tangent space.
  • Define the population and sample local polynomial criteria.
  • Explain how \(\ell = 0\) recovers local-constant (kernel Fréchet) and \(\ell = 1\) gives local-linear regression.
  • Discuss computational strategies and asymptotic theory.
  • Apply intrinsic local polynomial regression to SPD covariance data and interpret tangent-space slopes as rates of change of risk structure.
  • Compare local-constant (metric-space kernel Fréchet) and local-linear (manifold intrinsic) estimators on simulated portfolio stress-testing data, including boundary behavior and MSE.

2 Motivation: Metric vs. Manifold Methods

Local Fréchet regression (Lectures 7–8) works in any metric space — it only needs distances. When the response space is a smooth Riemannian manifold, we can do more: use the exponential and logarithm maps to linearize locally, fit a polynomial in a single tangent space, and map back.

This is the approach of Yuan et al. (2012), who developed the methodology for \(\mathcal{S}_{++}^m\) under the affine-invariant and log-Euclidean metrics.

3 Euclidean Local Polynomial Regression

Before introducing manifold-valued responses, it is useful to recall the Euclidean construction that local polynomial regression generalizes. Suppose that

\[ Y = m(X) + \varepsilon, \qquad \mathbb{E}(\varepsilon \mid X)=0, \]

where \(X\in\mathbb{R}\) and \(Y\in\mathbb{R}^q\); the scalar-response case is obtained by taking \(q=1\). Our target is the conditional mean curve \(m(x)=\mathbb{E}(Y\mid X=x)\) and, when needed, its derivatives \(m^{(j)}(x)\).

3.1 Why Fit a Polynomial Locally?

A single global polynomial imposes one shape over the entire predictor range and can behave poorly when the true regression curve has spatially varying curvature. A local fit instead uses only observations with \(X_i\) close to a target point \(x\). It therefore combines three ideas:

  1. Taylor approximation: every sufficiently smooth curve is approximately polynomial in a small neighborhood;
  2. Kernel localization: observations nearer to \(x\) receive more weight;
  3. Repeated pointwise fitting: moving \(x\) across the predictor range produces a smooth estimated curve without specifying a global parametric model.

Local polynomial regression contains several familiar smoothers. Order \(\ell=0\) gives the local-constant or Nadaraya–Watson estimator, \(\ell=1\) gives local-linear regression, and \(\ell=2\) gives local-quadratic regression. The local-linear fit is especially important: it reproduces linear trends exactly and removes the leading boundary bias of a local-constant smoother under standard smoothness and design conditions.

3.2 From Taylor Expansion to a Local Criterion

Fix a target \(x\) and write \(u=z-x\). If \(m\) is \(\ell+1\) times differentiable near \(x\), then

\[ m(x+u) = \sum_{j=0}^{\ell}\frac{u^j}{j!}m^{(j)}(x) + R_{\ell+1}(u), \qquad R_{\ell+1}(u)=O(|u|^{\ell+1}). \]

This suggests the local polynomial model

\[ p_{\beta,x}(z) = \sum_{j=0}^{\ell}\frac{(z-x)^j}{j!}\beta_j, \qquad \beta_j\in\mathbb{R}^q, \]

where \(\beta_0\) approximates \(m(x)\) and \(\beta_j\) approximates \(m^{(j)}(x)\). Centering the powers at \(x\) is crucial: the fitted value at the target is simply the intercept,

\[ p_{\beta,x}(x)=\beta_0. \]

Let \(K\) be a nonnegative kernel, usually symmetric with \(\int K(u)\,du=1\), and define \(K_h(u)=K(u/h)/h\) for bandwidth \(h>0\). The population local-polynomial target is any minimizer

\[ \beta_{\ell,h}(x) = \arg\min_{\beta_0,\ldots,\beta_\ell} \mathbb{E}\!\left[ K_h(X-x) \left\|Y-\sum_{j=0}^{\ell}\frac{(X-x)^j}{j!}\beta_j\right\|^2 \right]. \]

The kernel restricts attention to a neighborhood of width roughly \(h\). As \(h\to0\), the Taylor approximation becomes more accurate, but fewer observations contribute appreciably and the variance increases.

NotePopulation target versus regression function

For fixed \(h\), \(\beta_{0,\ell,h}(x)\) is a bandwidth-dependent smoothed target and need not equal \(m(x)\) exactly. Under the usual smoothness, design-density, and kernel assumptions, it approaches \(m(x)\) as \(h\to0\). Consistency also requires the effective local sample size to grow, typically \(nh\to\infty\) for a scalar predictor.

3.3 Sample Estimator as Weighted Least Squares

Given independent observations \((X_i,Y_i)\), \(i=1,\ldots,n\), define

\[ u_i=X_i-x, \qquad r_\ell(u_i)=\left(1,u_i,\frac{u_i^2}{2!},\ldots,\frac{u_i^\ell}{\ell!}\right)^\top, \qquad w_i(x)=K_h(u_i). \]

Stack the coefficient vectors as rows of \(B=(\beta_0,\ldots,\beta_\ell)^\top\in\mathbb{R}^{(\ell+1)\times q}\). The estimator minimizes

\[ \widehat B_{\ell,h}(x) =\arg\min_{B\in\mathbb{R}^{(\ell+1)\times q}} \sum_{i=1}^n w_i(x) \left\|Y_i-B^\top r_\ell(u_i)\right\|^2, \]

and

\[ \widehat m(x)=\widehat B_{\ell,h}(x)^\top e_0. \]

Here \(e_j\) selects row \(j+1\).

3.4 Estimation Choices and Statistical Tradeoffs

Polynomial order. Local linear (\(\ell=1\)) is a strong default for estimating \(m(x)\): it corrects boundary bias without the instability of a high-order fit. Local quadratic or cubic fits are useful when curvature or higher derivatives are scientifically meaningful, but they require more data within each neighborhood and can have larger variance.

Bandwidth. The bandwidth usually matters more than the polynomial order. For local linear regression at an interior point, the leading mean-estimation bias is typically \(O(h^2)\) and the variance is \(O\{(nh)^{-1}\}\) for a scalar predictor. Balancing squared bias and variance gives the familiar scale \(h\asymp n^{-1/5}\), although constants depend on the kernel, design density, noise variance, and curvature of \(m\). For the \(j\)th derivative, variance is of order \(O\{(nh^{2j+1})^{-1}\}\), so derivative estimation is more variable and requires a bandwidth criterion tailored to the derivative target.

Data-driven bandwidth selection. A practical prediction-oriented choice is leave-one-out cross-validation,

\[ \widehat h_{\mathrm{CV}} =\arg\min_{h\in\mathcal H} \frac{1}{n}\sum_{i=1}^n \left\|Y_i-\widehat m_{-i,h}(X_i)\right\|^2, \]

where \(\widehat m_{-i,h}\) is fitted without observation \(i\). Plug-in selectors are another option when reliable estimates of curvature and noise are available. If the inferential target is a derivative rather than the mean curve, the bandwidth should be selected for that derivative-specific loss.

Local identifiability. The matrix \(R_x^\top W_xR_x\) must have full rank. Failure occurs when too few distinct predictor values receive positive weight, when \(h\) is extremely small, or when the local polynomial order is too high for the available design. In computation, inspecting its condition number is preferable to blindly applying a matrix inverse.

TipBridge to manifold-valued responses

The Euclidean estimator uses two operations that are not intrinsically available on a curved manifold: subtracting \(Y_i-p_{\beta,x}(X_i)\) and adding polynomial coefficient vectors based at different points. The manifold construction below replaces the Euclidean polynomial by one in a single tangent space, maps it to the manifold with \(\exp\), and replaces squared Euclidean residuals by squared geodesic distances. The local intercept, slope, bandwidth, and polynomial-order interpretations remain the same.

4 Local Polynomial Regression on Manifolds

Intrinsic Error Model. For scalar predictor \(X \in \mathbb{R}\) and manifold response \(Y \in \mathcal{M}\), assume the conditional Fréchet mean \(\mu(x) = \arg\min_\omega \mathbb{E}\{d^2(Y, \omega) \mid X = x\}\) is unique. If the conditional support lies in a normal neighborhood of \(\mu(x)\) and differentiation under the conditional expectation is valid, its first-order condition is

\[ \mathbb{E}\{\log_{\mu(x)}(Y) \mid X = x\} = 0. \]

This is the manifold analogue of \(\mathbb{E}\{Y - \mu(X) \mid X\} = 0\). A convenient error representation is

\[ Y = \exp_{\mu(X)}(\varepsilon), \qquad \varepsilon \in T_{\mu(X)}\mathcal{M}, \qquad \mathbb{E}(\varepsilon \mid X) = 0. \]

Tangent-Space Taylor Expansion. Fix a target point \(x\). Near \(x\), the mean curve \(\mu\) can be expanded in \(T_{\mu(x)}\mathcal{M}\):

\[ \log_{\mu(x)}(\mu(x + u)) = u\,\dot{\mu}(x) + \frac{u^2}{2}\,\ddot{\mu}(x) + o(u^2), \qquad u \to 0, \]

where \(\dot{\mu}(x)\) is the velocity and \(\ddot{\mu}(x)=\nabla_{\dot\mu}\dot\mu(x)\) is the covariant acceleration, both represented in \(T_{\mu(x)}\mathcal{M}\). The expansion requires that \(\mu(x+u)\) remain inside the normal neighborhood used by the logarithm map.

Order-\(\ell\) Local Polynomial Curves. For parameters \(\theta = (\omega, v_1, \ldots, v_\ell)\) with \(\omega \in \mathcal{M}\), \(v_j \in T_\omega\mathcal{M}\), define:

\[ m_{\theta, x}(z) = \exp_\omega\!\left\{\sum_{j=1}^\ell \frac{(z - x)^j}{j!}\,v_j\right\}, \qquad z \in \mathbb{R}. \]

  • \(\omega = m_{\theta,x}(x)\) is the local intercept (the fitted value at \(x\))
  • \(v_1\) is the local slope (velocity of the mean curve at \(x\))
  • \(v_2\) is the acceleration.

Estimation. For kernel \(K\) and bandwidth \(h > 0\), the population criterion is

\[ Q_{\ell, h}(\theta; x) = \mathbb{E}\Bigl[K_h(X - x)\, d^2(Y, m_{\theta, x}(X))\Bigr]. \]

A minimizer \(\theta_{\ell, h}(x) = (\mu_{\ell, h}(x), \beta_{1,\ell,h}(x), \ldots)\) gives the population target; the fitted regression value at \(x\) is the intercept \(\mu_{\ell, h}(x)\).

The sample estimator is

\[ \hat{Q}_{\ell, h}(\theta; x) = \frac{1}{n}\sum_{i=1}^n K_h(X_i - x)\, d^2(Y_i, m_{\theta, x}(X_i)), \]

with \(\hat{\theta}_{\ell, h}(x) = (\hat{\mu}_{\ell, h}(x), \hat{\beta}_{1,\ell,h}(x), \ldots)\) being any minimizer.

Special Cases.

  • \(\ell = 0\): \(m_{\theta, x}(z) \equiv \omega\), so \(\hat{\mu}_{0,h}(x) = \arg\min_\omega \frac{1}{n}\sum K_h(X_i - x)d^2(Y_i, \omega)\) — this is exactly the kernel Fréchet regression estimator (Lecture 7).

Contrast with Local Fréchet Regression.

Aspect Local Fréchet Regression Intrinsic Local Polynomial
Structure needed Only metric Smooth manifold + exp/log
Linearization Predictor-side weights \(s(z,x,h)\) Tangent space at \(\omega\)
Weight interpretation Absorbed into weight function Direct tangent-space polynomial
Computation Weighted Fréchet mean Optimization over \((\omega, v_1, \ldots, v_\ell)\)
Generality Any metric space Riemannian manifolds only
Slope interpretation Implicit Explicit: \(v_1 \in T_\omega\mathcal{M}\)

5 Computation

5.1 Optimization Landscape on the SPD Manifold

For responses \(Y_i \in \mathcal{S}_{++}^m\) and the affine-invariant metric \(d_{\mathrm{AI}}(A, B) = \|\log(A^{-1/2} B A^{-1/2})\|_F\), the objective is

\[ \hat{Q}_{\ell, h}(\theta; x) = \frac{1}{n}\sum_{i=1}^n K_h(X_i - x)\, d_{\mathrm{AI}}^2\!\left(Y_i,\; \exp_\omega\!\left\{\sum_{j=1}^\ell \frac{(X_i - x)^j}{j!}\,v_j\right\}\right), \]

where \(\omega \in \mathcal{S}_{++}^m\) and \(v_j \in \operatorname{Sym}(m)\). The parameters live in a space of dimension

\[ \dim(\theta) = \frac{m(m+1)}{2} \times (\ell + 1). \]

For \(m = 6\) (e.g., six assets) and \(\ell = 1\), this is \(21 \times 2 = 42\) parameters; for \(\ell = 2\), it’s 63 parameters. The objective is non-convex because the exponential map at \(\omega\) depends nonlinearly on \(\omega\), and the distance function involves matrix logarithms, inverses, and square roots.

For the trace/affine-invariant formulation studied by Yuan et al. (2012), the criterion for \(\ell>0\) can have multiple local minima, so results from a local optimizer may depend on initialization.

5.2 AESAMC: Annealing Evolutionary Stochastic Approximation Monte Carlo

Yuan et al. (2012) use the annealing evolutionary stochastic approximation Monte Carlo (AESAMC) algorithm of Liang (2011) for their non-convex trace-metric fit. AESAMC combines:

Component Mechanism Role
Stochastic approximation Monte Carlo Adaptive weights over energy subregions Encourages exploration across objective levels
Annealing Progressively restricts attention to lower-energy regions Concentrates the search near the best objective values found
Evolutionary Monte Carlo (EMC) Population-based crossover and mutation operators Explores the parameter space efficiently through genetic operations on a population of candidate solutions

At a high level, the method partitions objective values into energy regions, evolves a population with mutation/crossover proposals, adapts regional weights, and lowers the active energy ceiling as better solutions appear. The best point visited is returned.

5.3 Computation on Log-Euclidean Metric

When the log-Euclidean (LE) metric is used instead of the affine-invariant metric, the SPD manifold becomes globally isometric to \(\operatorname{Sym}(m)\) through the matrix logarithm (Arsigny et al. 2007). Write \(a_j=D\log_\omega[v_j]\) for the log-coordinate representation of the tangent vector \(v_j\). Then:

  • The Riemannian exponential is \(\operatorname{Exp}^{\mathrm{LE}}_\omega(v)=\exp\{\log\omega+D\log_\omega[v]\}\); equivalently, a log-coordinate increment \(a\) maps back as \(\exp(\log\omega+a)\).
  • The distance is \(d_{\mathrm{LE}}(A, B) = \|\log A - \log B\|_F\).
  • The objective simplifies to weighted least squares in the log-domain:

\[ \hat{Q}_{\ell, h}(\theta; x) = \frac{1}{n}\sum_{i=1}^n K_h(X_i - x)\, \left\|\log Y_i - \log\omega - \sum_{j=1}^\ell \frac{(X_i - x)^j}{j!}\,a_j\right\|_F^2. \]

This is convex in \((\log\omega,a_1,\ldots,a_\ell)\) and has the standard weighted-least-squares solution. The interactive SPD demo below uses these log coordinates.

6 Interactive Exploration: Local-Constant vs. Tangent Local-Linear Approximation on \(S^2\)

Figure 1: Interactive: local-constant regression and a two-step tangent local-linear approximation on S²

The demo plots data and pointwise fits directly on \(S^2\). Rotate the globe by dragging. Orange is a numerical local-constant fit found by a descent/Karcher iteration; on the positively curved sphere this need not be the unique global Fréchet minimizer. Blue is a computationally light two-step approximation: it first finds the local Fréchet mean, maps nearby observations to that tangent plane, performs Euclidean local-linear regression there, and maps the fitted intercept back. It is not the joint minimizer of \(\hat Q_{1,h}(\omega,v_1;x)\) defined above.

  • Local linear fitting often reduces leading boundary bias under the usual smoothness, design-density, and bandwidth conditions; a finite noisy sample need not show lower MSE.
  • Larger \(\sigma\) raises variability, and estimating a tangent slope adds uncertainty.
  • The displayed blue line joins pointwise fitted intercepts. It is not one global geodesic, because its base point and local tangent fit are recomputed at every grid value.

7 Application: From Metric-Space to Manifold — Local Polynomial Regression on \(\mathcal{S}_{++}^m\)

7.1 Motivation: What the Manifold Adds to Regression

Lectures 6–9 developed a progressive toolkit for regressing SPD-valued responses on scalar predictors:

Lecture Method What it captures
6 Global Fréchet regression Linear trend in log-covariance
7 Kernel Fréchet regression Smooth nonlinear trend
8 Local-linear Fréchet regression Nonlinear trend + boundary correction
9 TV-regularized Fréchet regression Piecewise-constant jumps (regime changes)

All four methods treat \(\mathcal{S}_{++}^m\) as a metric space — they only need pairwise distances. The predictor-side weight functions \(s(z, x, h)\) do the linearization. With the Riemannian manifold structure from Lectures 15–16, we now have intrinsic local polynomial regression: instead of predictor-side weights, we linearize in the tangent space at the fitted intercept.

This section revisits the portfolio stress-testing application from Lectures 6–9 and asks: what does the manifold approach add, numerically and interpretively?

7.2 The SPD Manifold as a Regression Space

Suppose \(r_t\in\mathbb{R}^p\) is the vector of asset returns at time \(t\). Divide the return series into estimation windows and, for each window \(i\), construct

\[ (X_i,\Sigma_i),\qquad i=1,\ldots,n, \]

where \(X_i\) is a scalar market-state variable—for example, realized market volatility, a volatility-index-like stress measure, or a macroeconomic score—and \(\Sigma_i\in\mathcal{S}_{++}^p\) is the estimated covariance matrix of the \(p\) asset returns in that window. The windows, covariance estimator, and stress measurement should all use information available at the same forecast origin; otherwise the fitted risk curve can contain look-ahead leakage.

Under the log-Euclidean (LE) metric, the logarithm map turns the SPD manifold into the vector space \(\operatorname{Sym}(p)\):

\[ Z_i=\log\Sigma_i\in\operatorname{Sym}(p), \qquad d_{\mathrm{LE}}(\Sigma_i,\Sigma_j)=\|Z_i-Z_j\|_F. \]

Thus fitting SPD-valued responses is equivalent to fitting the symmetric-matrix responses \(Z_i\) by ordinary local polynomial regression and then applying the matrix exponential. For software that expects vectors, use the isometric half-vectorization

\[ \operatorname{svec}(Z) =\bigl(Z_{11},\ldots,Z_{pp},\sqrt{2}Z_{12},\ldots,\sqrt{2}Z_{p-1,p}\bigr)^\top, \]

with any fixed ordering of the off-diagonal entries. The factor \(\sqrt{2}\) ensures \(\|\operatorname{svec}(Z)\|_2=\|Z\|_F\); simply stacking the upper triangle without this factor changes the geometry.

Let \(L(x)=\log\mu(x)\) denote the log-covariance curve at stress level \(x\). Around a chosen target \(x\), approximate it by

\[ L(x+u)\approx A_0(x)+uA_1(x)+\frac{u^2}{2}A_2(x)+\cdots+\frac{u^\ell}{\ell!}A_\ell(x), \]

where each \(A_j(x)\) is symmetric. \(A_0(x)\) estimates the log-covariance at \(x\), \(A_1(x)\) estimates its stress derivative, and \(A_2(x)\) estimates how that log-coordinate slope changes with stress.

7.2.1 Pointwise fitting algorithm

At target stress \(x\), set

\[ u_i=X_i-x, \qquad r_i=\left(1,u_i,\frac{u_i^2}{2!},\ldots,\frac{u_i^\ell}{\ell!}\right)^\top, \qquad k_i=K_h(u_i). \]

Let \(R_x\) be the \(n\times(\ell+1)\) matrix with rows \(r_i^\top\), let \(W_x=\operatorname{diag}(k_1,\ldots,k_n)\), and let \(\mathbf Z\) be the \(n\times q\) matrix with rows \(\operatorname{svec}(Z_i)^\top\), where \(q=p(p+1)/2\). The log-Euclidean local polynomial estimator is the weighted least-squares solution

\[ \widehat C(x) =\left(R_x^\top W_xR_x\right)^{-1}R_x^\top W_x\mathbf Z, \]

provided \(R_x^\top W_xR_x\) is well-conditioned. Applying \(\operatorname{svec}^{-1}\) to row \(j+1\) of \(\widehat C(x)\) gives \(\widehat A_j(x)\). The estimates on the SPD manifold are then

\[ \widehat\mu(x)=\exp\{\widehat A_0(x)\} \]

For the common local-linear case (\(\ell=1\)), the calculation can also be written directly in matrix form. Define

\[ S_r=\sum_{i=1}^n k_i u_i^r, \qquad T_r=\sum_{i=1}^n k_i u_i^r Z_i, \qquad r=0,1,2, \]

where \(T_r\) is a symmetric matrix, and let \(D=S_0S_2-S_1^2\). Then

\[ \widehat A_0(x)=\frac{S_2T_0-S_1T_1}{D}, \qquad \widehat A_1(x)=\frac{S_0T_1-S_1T_0}{D}. \]

This formula makes the boundary correction transparent: near an edge of the observed stress range, the local-linear fit compensates for the one-sided predictor design instead of merely averaging the nearby log-covariances.

7.2.2 From the fitted covariance curve to portfolio risk

Let \(a\in\mathbb{R}^p\) be a fixed vector of portfolio weights. Once \(\widehat\Sigma(x)=\widehat\mu(x)\) has been obtained, the fitted conditional portfolio variance and volatility are

\[ \widehat V_a(x)=a^\top\widehat\Sigma(x)a, \qquad \widehat\sigma_a(x)=\sqrt{\widehat V_a(x)}. \]

These scalar curves answer the operational question: what risk would the current portfolio carry if the market were at stress level \(x\)? The local slope also quantifies the rate at which that risk changes. For \(\ell\geq1\),

\[ \widehat{\dot\Sigma}(x) :=\left.\frac{d}{dz}\widehat\mu_x(z)\right|_{z=x} =D\exp_{\widehat A_0(x)}[\widehat A_1(x)], \]

and therefore

\[ \widehat{\dot V}_a(x) =a^\top\widehat{\dot\Sigma}(x)a. \]

\(\widehat A_1(x)\) is the slope of the log-covariance, not the covariance itself. The locally fitted curve is

\[ \widehat\mu_x(z) =\exp\!\left\{\widehat A_0(x)+(z-x)\widehat A_1(x)\right\}, \]

so the chain rule gives

\[ \left.\frac{d}{dz}\widehat\mu_x(z)\right|_{z=x} =D\exp_{\widehat A_0(x)}[\widehat A_1(x)]. \]

The scalar analogue is \(\Sigma(x)=e^{L(x)}\), for which \(\Sigma'(x)=e^{L(x)}L'(x)\) rather than merely \(L'(x)\). For matrices the conversion is more involved because matrix multiplication need not commute:

\[ D\exp_A[H] =\int_0^1 e^{(1-s)A}H e^{sA}\,ds. \]

If \(A\) and \(H\) commute, this reduces to \(D\exp_A[H]=e^A H\); it equals \(H\) only in special cases such as \(A=0\).

For example, if

\[ \widehat A_0= \begin{pmatrix}\log 4&0\\0&\log 9\end{pmatrix}, \qquad \widehat A_1= \begin{pmatrix}0.1&0\\0&0.2\end{pmatrix}, \]

then the two matrices commute and

\[ \widehat{\dot\Sigma} =D\exp_{\widehat A_0}[\widehat A_1] =\begin{pmatrix}4(0.1)&0\\0&9(0.2)\end{pmatrix} =\begin{pmatrix}0.4&0\\0&1.8\end{pmatrix}, \]

not \(\widehat A_1\). Thus \(\widehat A_1\) describes motion in global log-covariance coordinates, while \(D\exp_{\widehat A_0}[\widehat A_1]\) expresses the same motion on the original covariance scale used in portfolio-risk sensitivity \(a^\top\widehat{\dot\Sigma}(x)a\).

7.2.3 Choosing the bandwidth and validating the risk curve

Choose \(h\) using leave-one-out or blocked cross-validation with the intrinsic prediction loss

\[ \operatorname{CV}(h) =\sum_i d_{\mathrm{LE}}^2\!\left( \Sigma_i,\widehat\mu_{-i,h}(X_i) \right). \]

For overlapping rolling covariance windows, ordinary random folds leak many of the same returns into training and validation sets. Time-ordered or blocked folds, preferably with a gap at least as long as the overlap, give a more honest assessment. The bandwidth selected to predict covariance matrices or portfolio variance need not be optimal for estimating \(\widehat A_1(x)\); derivative estimation is noisier and usually benefits from a separate, smoother bandwidth choice.

7.3 Interactive Demo: Local-Constant vs. Local-Linear on Simulated SPD Data

The following demo simulates \(2 \times 2\) SPD covariance matrices whose log-entries depend nonlinearly on a stress predictor, mimicking the portfolio stress-testing setup. We compare:

  1. Local-constant (\(\ell = 0\), kernel Fréchet) — the metric-space approach from Lecture 7.
  2. Local-linear (\(\ell = 1\), intrinsic) — the manifold approach from this lecture.
  3. Boundary behavior — local-linear should reduce bias near the edges (\(x \approx 0\) and \(x \approx 1\)).
  4. Estimated slopes — the manifold method recovers the true tangent-space derivative.
Figure 2: Interactive: Local-constant vs. local-linear regression on the SPD manifold (log-Euclidean metric)
NoteHow to read this
  • Boundary MSE averages squared LE distance for \(x < 0.15\) or \(x > 0.85\); local linear removes the leading design-asymmetry term under standard smoothness conditions.
  • The slope MSE assesses the directly fitted derivative of the matrix-log curve; a local-constant fit has no slope parameter.
  • Increasing bandwidth \(h\) smooths both fits and generally trades variance for bias.
  • Increase noise \(\sigma\): advantage of LL diminishes — with very noisy data, the extra parameter (slope) is harder to estimate.
TipKey observations from the demo
  • Boundary behavior: Under standard smoothness and design conditions, local linear fitting removes the leading \(O(h)\) boundary term of local constant fitting. The displayed finite-sample MSEs can still reverse because variance also matters.
  • Slope estimation: The fitted slope estimates \(L'(x)\) for \(L(x)=\log\mu(x)\). Convert it with \(D\exp_{L(x)}\) before interpreting changes in the entries of \(\mu(x)\) itself.
  • Bias-variance tradeoff: With small \(h\) or large \(\sigma\), slope estimates become noisy. Distance-loss cross-validation can select \(h\) for prediction, while derivative estimation may favor a different bandwidth.

7.4 Discussion: What the Manifold Approach Adds to Regression

1. Explicit slopes. A basic local Fréchet fit produces \(\hat\mu(x)\) without a response-space slope parameter. Intrinsic local polynomial regression estimates the intercept and slope jointly. Under LE geometry, \(\hat A_1(x)\) is the derivative of the matrix-log curve; \(D\exp_{\hat A_0(x)}[\hat A_1(x)]\) is the corresponding covariance sensitivity.

2. Boundary correction without a boundary-specific estimator. Under the regularity conditions used in local polynomial theory, local-constant bias is \(O(h)\) at a boundary while local-linear bias is \(O(h^2)\) (Yuan et al. 2012). This concerns the leading asymptotic bias; it does not guarantee lower finite-sample MSE.

3. Higher-order fits. The manifold framework supports \(\ell = 2\) (local quadratic), which estimates a second normal-coordinate coefficient. This describes bending of the regression curve; it is distinct from curvature of the ambient manifold. Metric-only methods can still represent nonlinear mean curves, but do not parameterize this intrinsic second-order term directly.

8 Key Takeaways

  • Intrinsic local polynomial regression uses the manifold’s smooth structure (exp/log) to fit polynomials directly in tangent spaces.
  • The intrinsic error model \(Y = \exp_{\mu(X)}(\varepsilon)\), \(\mathbb{E}(\varepsilon \mid X) = 0\) generalizes the Euclidean mean-zero error.
  • Order \(\ell = 0\) recovers local-constant (kernel Fréchet); \(\ell = 1\) gives local-linear with explicit tangent slope.
  • Contrast with local Fréchet regression: manifold method uses tangent-space linearization; metric method uses predictor-side weights.
  • Under the LE metric, computation is weighted least squares. For affine-invariant local polynomials, use a carefully derived Riemannian optimizer or a stochastic search such as AESAMC.
  • On \(\mathcal{S}_{++}^m\) with the LE metric, local-linear regression reduces to weighted least squares in \(\mathbb{R}^{m(m+1)/2}\) — no iterative manifold optimization required.
  • The fitted slope provides first-order sensitivity directly; a basic metric-space Fréchet fit has no such direct parameter.
  • Local-linear fitting reduces leading boundary bias under regularity conditions.

9 Exercises

  1. Recovering kernel Fréchet. Show that for \(\ell = 0\), the intrinsic local polynomial estimator is exactly the kernel Fréchet regression estimator from Lecture 7. 📝 Show Solution

  2. Tangent slope interpretation. For \(\ell = 1\) on \(S^1\), interpret \(v_1\) geometrically. How does it relate to the derivative of the unwrapped mean curve? 📝 Show Solution

  3. Metric vs. manifold. In what scenarios would you prefer local Fréchet regression over intrinsic local polynomial regression? 📝 Show Solution

  4. Affine-invariant local-linear. Implement the affine-invariant local-linear estimator from Yuan et al. (2012).

Exercise 1

Exercise: Show ℓ=0 recovers kernel Fréchet regression.
Solution: For \(\ell=0\), \(m_{\theta,x}(z) = \exp_\omega(0) = \omega\) for all \(z\). The parameter \(\theta = (\omega)\) with no \(v_j\). The objective is \(\hat{Q}_{0,h}(\omega; x) = \frac{1}{n}\sum K_h(X_i-x)d^2(Y_i, \omega)\), and the minimizer is \(\hat{\mu}_{0,h}(x) = \arg\min_\omega \frac{1}{n}\sum K_h(X_i-x)d^2(Y_i, \omega)\). This is exactly the kernel Fréchet regression estimator with unnormalized kernel weights. After normalizing by \(\sum K_h(X_j-x)\), it’s identical to the estimator in Lecture 7.

Exercise 2

Exercise: Interpret v₁ geometrically on S¹.
Solution: On \(S^1\), the tangent space at \(\omega\) is \(\mathbb{R}\) (identified with the real line). The local linear curve is \(m(z) = (\omega + (z-x)v_1) \bmod 2\pi\) (for small \((z-x)v_1\)). \(v_1\) is the angular derivative of the mean curve at \(x\): \(v_1 = \frac{d}{dz}\mu(z)|_{z=x}\), measuring how fast (in radians per unit \(x\)) the conditional Fréchet mean moves along the circle. Positive \(v_1\) = counterclockwise movement; negative = clockwise. Unlike Euclidean local-linear regression where slopes are vectors in \(\mathbb{R}^p\), here the slope \(v_1\) is a single scalar — the rate of angular change.

Exercise 3

Exercise: When prefer metric vs. manifold local regression?
Solution: Prefer local Fréchet regression (metric-only) when: (1) The response space is not a smooth manifold (e.g., BHV tree space with singularities, or a general metric space). (2) You do not have exp/log maps—only distances. (3) You need only the fitted mean curve. Prefer intrinsic local polynomial regression when: (1) the response is a smooth Riemannian manifold with computable exp/log maps; (2) you want an explicit tangent slope; or (3) you want explicit higher-order normal-coordinate coefficients. Both approaches can fit nonlinear mean curves; the distinction is whether response-space derivatives are parameters of the fit.

Exercise 4

Exercise: Bandwidth selection for manifold local polynomial regression.
Solution: Bandwidth still controls a bias–variance tradeoff, but response geometry enters the expansion through log/exp derivatives and the Hessian of the population criterion. There is no rate that follows merely from saying the manifold is Hadamard; it also depends on predictor dimension, polynomial order, design density, smoothness, and the estimator. A practical choice is cross-validation with the same squared geodesic loss used for prediction. If the goal is slope estimation rather than prediction, tune for derivative loss when a validation proxy or justified plug-in rule is available. Under the LE metric the problem is Euclidean in matrix-log coordinates, so standard local-polynomial bandwidth theory applies in those coordinates.

Exercise 5

Exercise: Interpret log-coordinate slopes for portfolio stress-testing.

Solution: \(\hat A_1(x)\) estimates \(\frac{d}{dx}\log\mu(x)\), so comparing \(\hat A_1(0.2)\) with \(\hat A_1(0.8)\) compares the direction and speed of the fitted curve in the common LE coordinate space. Its off-diagonal entry is the derivative of an off-diagonal entry of the matrix logarithm; it is not automatically the derivative of covariance or correlation. The covariance-matrix sensitivity is

\[ \frac{d}{dx}\mu(x)=D\exp_{\log\mu(x)}[A_1(x)]. \]

Only after computing this Fréchet derivative (and, for correlation, applying the variance normalization and product rule) should one make an entrywise financial interpretation. A basic local-constant fit has no directly estimated slope parameter, although a derivative could be approximated from a separately smoothed curve.

Exercise 6

Exercise: Derive boundary bias of ℓ=0 and show how ℓ=1 eliminates it.

Solution: Local-constant boundary bias (ℓ=0): At a boundary point \(x\) (say \(x=0\)), data only exists on one side (\(X_i \ge 0\)). The tangent-space expansion gives \(\log_{\mu(x)}(\mu(X_i)) = (X_i - x)\dot{\mu}(x) + O((X_i-x)^2)\). The local-constant estimator solves \(\min_\omega \sum K_h(X_i-x) d^2(Y_i, \omega)\). In the tangent space:

\[ \mathbb{E}\!\left[\log_{\mu(x)}\hat{\mu}_{0,h}(x)\right] \approx h\,\dot{\mu}(x)\frac{\int_0^\infty u K(u)\,du}{\int_0^\infty K(u)\,du} + O(h^2), \]

which is \(O(h)\) because \(\int_0^\infty u K(u) du \neq 0\) (the kernel is asymmetric at the boundary). At interior points, the integral is symmetric and the \(O(h)\) term vanishes, leaving \(O(h^2)\) bias.

Local-linear correction (ℓ=1): The estimator fits \(\min_{\omega, v_1} \sum K_h(X_i-x) d^2(Y_i, \exp_\omega((X_i-x)v_1))\). In the tangent space, this is weighted least squares with an intercept and slope. The design matrix includes the \((X_i-x)\) term, which absorbs the first-order bias:

\[ \mathbb{E}\!\left[\log_{\mu(x)}\hat{\mu}_{1,h}(x)\right] = O(h^2) \]

at an interior or boundary target, under the usual smoothness, positive design-density, kernel-moment, and bandwidth conditions. This is a bias statement, not a guarantee about finite-sample MSE. On the SPD manifold with the LE metric, the calculation is exactly Euclidean in matrix-log coordinates because \((\mathcal{S}_{++}^m,g^{\mathrm{LE}})\) is isometric to a vector space.

10 Further Reading

  • Yuan et al. (2012) — Local polynomial regression on SPD matrices.
  • Fletcher (2013) — Geodesic regression (the parametric counterpart).
  • Petersen and Müller (2019) — Local Fréchet regression (the metric-only counterpart).
  • Liang (2011) — AESAMC algorithm used for optimization.
  • Bhattacharya and Patrangenaru (2005) — Large-sample theory for ordinary intrinsic/extrinsic sample means; useful background, but not a local-polynomial confidence-band theorem.
  • Arsigny et al. (2007) — The log-Euclidean metric and its global matrix-log isometry.
  • Pennec et al. (2006) — Affine-invariant SPD geometry and tensor-computing operations.
  • Moakher (2005) — Affine-invariant geometric mean on SPD matrices; alternative to LE metric for regression.

11 Self-Assessment Quiz

Test your understanding of this lecture with the interactive MCQ quiz:

👉 Lecture 19 Quiz — 10 Multiple-Choice Questions

References

Arsigny, V., P. Fillard, X. Pennec, and N. Ayache. 2007. “Geometric Means in a Novel Vector Space Structure on Symmetric Positive-Definite Matrices.” SIAM Journal on Matrix Analysis and Applications 29 (1): 328–47. https://doi.org/10.1137/050637996.
Bhattacharya, Rabi, and Vic Patrangenaru. 2005. “Large Sample Theory of Intrinsic and Extrinsic Sample Means on Manifolds. II.” The Annals of Statistics 33 (3): 1225–59. https://doi.org/10.1214/009053605000000093.
Fletcher, P. Thomas. 2013. “Geodesic Regression and the Theory of Least Squares on Riemannian Manifolds.” International Journal of Computer Vision 105 (2): 171–85. https://doi.org/10.1007/s11263-012-0591-y.
Liang, Faming. 2011. “Annealing Evolutionary Stochastic Approximation Monte Carlo for Global Optimization.” Statistics and Computing 21 (3): 375–93. https://doi.org/10.1007/s11222-010-9176-1.
Moakher, M. 2005. “A Differential Geometric Approach to the Geometric Mean of Symmetric Positive-Definite Matrices.” SIAM Journal on Matrix Analysis and Applications 26 (3): 735–47. https://doi.org/10.1137/S0895479803436937.
Pennec, X., P. Fillard, and N. Ayache. 2006. “A Riemannian Framework for Tensor Computing.” International Journal of Computer Vision 66 (1): 41–66. https://doi.org/10.1007/s11263-005-3222-z.
Petersen, A., and H.-G. Müller. 2019. Fréchet Regression for Random Objects with Euclidean Predictors.” The Annals of Statistics 47 (2): 691–719.
Yuan, Ying, Hongtu Zhu, Weili Lin, and J. S. Marron. 2012. “Local Polynomial Regression for Symmetric Positive Definite Matrices.” Journal of the Royal Statistical Society: Series B (Statistical Methodology) 74 (4): 697–719. https://doi.org/10.1111/j.1467-9868.2011.01022.x.