---
title: 'One-Class SVM: Smooth CVaR Optimization'
url: https://www.emergentmind.com/topics/one-class-svm-algorithms-optimising-smooth-cvar-objectives
type: topic
---

# One-Class SVM: Smooth CVaR Optimization

One-class Support Vector Machine (OC-SVM) algorithms optimising smooth Conditional Value-at-Risk (CVaR) objectives constitute a significant advance in novelty detection within path spaces, connecting sequential data analysis, statistical learning, and probability in function spaces. This class of algorithms exploits signature-based feature embeddings and the shuffle-product structure, enabling closed-form polynomial surrogates for risk-sensitive test statistics and new theoretical guarantees for error control and statistical power in hypothesis testing settings [2512.03243].

## 1. Signature-based Features and Smooth CVaR Surrogates

Let $X \sim \mu$ denote a path whose signature $S_N(X)$ is taken up to truncation level $N$. To approximate the positive part $[u]^+$ on $[-K,K]$, a polynomial $Q_n(u) = \sum_{i=0}^n a_i u^i$ is introduced. The smooth CVaR surrogate is then defined by
\[
f^n_\alpha(\rho) =
\rho
+ \frac{1}{1-\alpha} E_\mu\left[ Q_n(\langle w, S_N(X) \rangle - \rho) \right],
\quad \rho \in [-K, K]
\]
Employing the shuffle-product identity, $(\langle w, S \rangle)^i = \langle w^{\shuffle i}, S \rangle$, Theorem 3.1 shows the surrogate may be rewritten as
\[
E_\mu\left[ Q_n(\langle w, S(X) \rangle - \rho) \right]
= \langle Q_n^{\shuffle}(w - \rho 1), E_\mu[S(X)] \rangle
\]
where $Q_n^{\shuffle}(\ell) = \sum_{i=0}^n a_i \ell^{\shuffle i} \in (T^{nN}(\mathbb{R}^d))^*$. The result is an explicit polynomial $f^n_\alpha(\rho) = \sum_{m=0}^n b_m \rho^m$ whose coefficients $b_m$ depend only on $E_\mu[S(X)]$ and shuffle-powers of $w$. This surrogate admits closed-form computation, substantially improving tractability for high-dimensional path data.

## 2. OC-SVM Formulations and Optimisation Problems

The OC-SVM framework is captured as minimising a regularised CVaR of negative scoring functionals. Given a feature map $\varphi$, typically the truncated signature $S_N$ or its infinite-level version, the population-level objective reads
\[
w^* =
\arg\min_{w \in H}
\left\{
\mathrm{CVaR}_\alpha\left(-\langle w, \varphi(X) \rangle_H \right)
+\frac{1}{2} \|w\|_H^2
\right\}
\]
Replacing $\mathrm{CVaR}_\alpha$ by the smooth surrogate yields the smooth-CVaR OC-SVM problem,
\[
(w^*, \rho^*) =
\arg\min_{w \in H, \rho \in [-K,K]}
\left\{
\frac{1}{2} \|w\|_H^2
+ f^n_\alpha(\rho)
\right\}
\]
For empirical OC-SVM with finite samples $\{x_i\}$, the unconstrained primal is
\[
(\hat v, \hat \rho) =
\arg\min_{v \in H, \rho \in \mathbb{R}}
\left\{
\frac{1}{2} \|v\|_H^2
+ \left[
\frac{1}{\gamma n} \sum_{i=1}^n [\rho - \langle v, \varphi(x_i) \rangle_H]^+ - \rho
\right]
\right\}
\]
A constrained quadratic program variant introduces slack variables $\xi_i \ge 0$:
\[
\min_{v, \rho, \xi} \;
\frac{1}{2} \|v\|_H^2 + \frac{1}{\gamma n} \sum_{i=1}^n \xi_i - \rho
\quad \text{s.t.} \quad
\langle v, \varphi(x_i) \rangle_H \ge \rho - \xi_i,\; \xi_i \ge 0
\]

## 3. Dual Formulation and Signature Kernels

The dual form of the constrained OC-SVM is
\[
\min_{\alpha \in \mathbb{R}^n} \;
\frac{1}{2} \alpha^\top K \alpha
\quad \text{s.t.} \quad
0 \le \alpha_i \le \frac{1}{\gamma n},
\quad \sum_{i=1}^n \alpha_i = 1
\]
for kernel matrix $K_{ij} = \langle \varphi(x_i), \varphi(x_j) \rangle_H$. With $\varphi = S_N$, the signature kernel is
\[
\kappa_N(x,y) = \langle S_N(x), S_N(y) \rangle_{H_N}
\]
Given solution $\alpha$, the primal vector is $w = \sum_i \alpha_i S_N(x_i)$ and the test-score for a new path $x$ is $f(x) = \langle w, S_N(x) \rangle_{H_N} = \sum_{i=1}^n \alpha_i \kappa_N(x_i, x)$. In the smooth-CVaR population version, $E_\mu[S(X)]$ enters via the closed-form surrogate, replacing empirical averages.

## 4. Theoretical Error Bounds: Type I and Power

Denoting $\Omega_r = \{x : \langle w, S_N(x) \rangle > r\}$, the following bounds are established:

- **Type I Error (Theorem 3.4):** If $\mu$ obeys an $(a,c)$ transportation-cost inequality, including Gaussian and RDE laws, then there exist constants $C_1, C_2$ such that
  \[
  \mu\left(\langle w, S_N(X) \rangle > r\right)
  \le
  C_2 \exp \left\{ - \frac{C_1^2}{2} \left( (r/A)^{2p} \vee (r/A)^{2p/N} \right) \right\}
  \]
  where $A = \|w\|_H \sqrt{N} d^N C^{N/2}$ and $p \in (0, 1]$ depends on the deviation $a(t) \gtrsim t^{2p}$. Solving $\mu(\cdot) \le \alpha$ provides a quantile bound $r^*(\alpha)$ and super-uniform p-values
  \[
  p(x) = C_2 \exp \left\{ - \frac{C_1^2}{2} \left( (\langle w, S_N(x) \rangle / A)^{2p} \vee (\langle w, S_N(x) \rangle / A)^{2p/N} \right) \right\}
  \le
  \mu(\langle w, S_N(X) \rangle \ge \langle w, S_N(x) \rangle)
  \]

- **Type II Error (Power, Theorem 3.3):** For alternatives $\nu$ with finite first moment,
  \[
  \nu( \langle w, S_N(X) \rangle \le r )
  \ge
  1 - C \left( r / \|w\|_H \right)^{- \frac{p}{N}(1 - \frac{1}{N} + \frac{1}{N} E_*) } d^p N^{p / 2N}
  \]
  with $E_* = a^{-1}((\nu \mid \mu)) + E_\mu [ \|X\|^p_\gamma ]$ for $E_* \le 1$, and $(\nu \mid \mu)$ the relative entropy. Thus, finite relative entropy ensures nontrivial lower bounds on power.

## 5. Algorithmic Procedure and Practical Considerations

Population-level smooth-CVaR OC-SVM is implemented via the following high-level steps:

1. **Empirical expected signature:** $\hat E = (1/m) \sum_{i=1}^m S_N(X^{(i)})$
2. **Surrogate objective:** $ \hat f_n(\rho) = \rho + \frac{1}{1-\alpha} \langle Q_n^{\shuffle}(w - \rho 1), \hat E \rangle $
3. **Joint optimisation:** $ \min_{w, \rho} \{ \frac{1}{2} \|w\|_H^2 + \hat f_n(\rho) \} $
   - Solved by alternation or explicit polynomial root-finding when $\dim \ll \infty$.
4. **Test statistic:** $ \text{score}(x) = \langle w^*, S_N(x) \rangle $
5. **Hypothesis rejection:** Reject $H_0$ if $\text{score}(x) > \rho^*$.

For sample-based OC-SVM, standard primal/dual QP with signature kernels is used (e.g., LIBSVM, ThunderSVM). At test time, $\sum_i \alpha_i \kappa_N(x_i, x)$ is compared to the learned bias $\hat \rho$.

## 6. Empirical Evaluation: Diffusion and Molecular Biology

### Anomalous Diffusion

- **Setup:** Binary discrimination between standard Brownian motion ($\mu$) and “spiked-BM” ($\nu_\epsilon$) defined by $X_t = B_t + \epsilon \sqrt{ [t-\theta]^+ } \wedge 1$, $\theta \sim \mathrm{Unif}[0,1]$.
- **Statistic:** Signature-based distance $f(x) = \|S_N(x) - E[S_N(X)]\|$; also, linear form in $S(x)$.
- **Results:**
  - **AUROC vs $\epsilon^2$:** Monotonic increase, no sharp phase at $\epsilon = \sqrt{8}$.
  - **Type I and II control:** Empirical p-values ($n=1000$ calibration) give marginal FDR $\le 0.1$ but high conditional variability. Weibull tail-bound (Theorem 3.4) with $10^5$ samples yields super-uniform p-values, tighter FDR and FPR control.
  - **Comparison:** Signature-based distance outperforms TAMSD and is competitive with kernelised OC-SVM.

### RNA Modification Detection

- **Data:** Synthetic 100-nt oligos, three modifications (inosine, m5C, $\Psi$) at fixed positions; Nanopore direct RNA reads (Leger et al. 2021).
- **Preprocessing:** Dorado basecalling, Uncalled4 event alignment, per-base segmentation.
- **Methods:**
  - OC-SVM on signature features ($N=6$, time-augment and invisibility-reset), $3000$ unmodified reads per site, p-values from $10^5$ held-out reads.
  - OC-SVM on standard 2D features (mean current and dwell time).
- **Results:** At BH–FDR level $0.20$, signature OC-SVM yields substantially higher recall (power) for all modification types, with type I error controlled at nominal level.

## 7. Connections, Scope, and Implications

These developments bridge hypothesis testing, path signatures (Lyons et al.), transportation-cost inequalities (Gasteratos and Jacquier 2023), and robust machine learning. The use of smooth CVaR surrogates via shuffle-product identities establishes new analytic techniques for risk calibration and empirical p-value calculation. Non-asymptotic bounds on error rates generalise beyond Gaussian settings to laws of rough differential equation solutions, supporting broader applications in anomalous diffusion analysis and molecular biology. A plausible implication is further cross-fertilisation with time-series anomaly detection and functional data analysis, leveraging closed-form population objectives and signature kernel methods.

The principal contribution is the integration of population-level risk surrogates, shuffle-product algebra, and theoretical guarantees for novelty detection [2512.03243]. This framework enables more refined control of type I and type II errors and supports robust calibration for high-dimensional non-Euclidean data spaces.

Source: https://www.emergentmind.com/topics/one-class-svm-algorithms-optimising-smooth-cvar-objectives