{
 "artifacts": null,
 "category": "regularization",
 "description": "Use the Legendre-dual Cramér transform of the minibatch embedding distribution as a geometry-aware novelty and confidence score. Add a penalty that separates correctly classified embeddings from high-Cramér-energy examples, or use the energy directly for OOD detection and hard-example mining; unlike squared distance, it adapts to anisotropic and non-Gaussian convex support.",
 "formulas_latex": [
  "$$\\Lambda_\\mu(\\theta)=\\log\\int_{\\mathbb{R}^{n}}e^{\\langle\\theta,x\\rangle}\\,d\\mu(x)$$",
  "$$\\Lambda_\\mu^{*}(x)=\\sup_{\\theta\\in\\mathbb{R}^{n}}\\left\\{\\langle\\theta,x\\rangle-\\Lambda_\\mu(\\theta)\\right\\}$$",
  "$$\\Lambda_{K}^{*}(x)\\leq-\\log q_{K}(x)\\leq\\Lambda_{K}^{*}(x)+\\frac{1}{2}\\log n+C$$",
  "$$E(x)=\\max_{\\theta\\in\\mathbb{R}^{d}}\\left\\{\\langle\\theta,x\\rangle-\\log\\left(\\frac{1}{B}\\sum_{i=1}^{B}e^{\\langle\\theta,z_i\\rangle}\\right)-\\frac{\\tau^{2}}{2}\\|\\theta\\|_2^2\\right\\}$$"
 ],
 "id": 2858,
 "implementation": "Integrate this at the penultimate embedding tensor of a classifier or encoder. First project embeddings to dimension \\(d\\leq128\\), detach a running memory bank of \\(B\\) recent in-distribution embeddings, and whiten them with an exponential-moving-average mean and diagonal covariance; clip each coordinate to a bounded interval so the empirical support is approximately convex and numerically controlled. For every queried embedding \\(x\\), solve the regularized dual problem by 5–10 gradient-ascent steps on \\(\\theta\\), initialized at zero or at the previous step’s solution. The gradient is \\(x-\\sum_i w_i z_i-\\tau^2\\theta\\), with \\(w_i=\\operatorname{softmax}_i(\\langle\\theta,z_i\\rangle)\\). Compute \\(E(x)\\) from the final dual objective. Pseudocode: `theta=0; repeat: logits=Z@theta; w=softmax(logits); g=x-w.T@Z-tau**2*theta; theta=theta+eta*g; E=x@theta-logsumexp(logits)+log(B)-0.5*tau**2*sum(theta**2)`. Use \\(E(x)\\) as an OOD score, or add \\(\\lambda E(z)\\) to incorrectly classified or low-margin examples. The mathematical quantities are the dual objective and depth interpretation; the memory-bank distribution, whitening statistics, \\(\\tau\\), step size, and threshold are estimated empirically. Test a ResNet-18 on CIFAR-10 against Mahalanobis distance and standard energy scoring, using CIFAR-100 or SVHN as OOD data. Success means higher AUROC or AUPR at matched false-positive rate, with no more than 10% training overhead.",
 "math_summary": "For a probability measure \\(\\mu\\) on \\(\\mathbb{R}^d\\), the logarithmic Laplace transform is \\(\\Lambda_\\mu(\\theta)=\\log\\int e^{\\langle\\theta,z\\rangle}\\,d\\mu(z)\\), where \\(z\\) is an embedding and \\(\\theta\\in\\mathbb{R}^d\\) is a dual variable. Its Cramér transform is \\(\\Lambda_\\mu^*(x)=\\sup_{\\theta\\in\\mathbb{R}^d}\\{\\langle\\theta,x\\rangle-\\Lambda_\\mu(\\theta)\\}\\), where \\(x\\) is a candidate embedding. For the uniform measure \\(\\mu_K\\) on a convex body \\(K\\), the paper proves \\(\\Lambda_K^*(x)\\le -\\log q_K(x)\\le \\Lambda_K^*(x)+\\tfrac12\\log d+C\\), where \\(q_K(x)=\\inf\\{\\mu_K(H):H\\text{ is a closed half-space containing }x\\}\\), \\(d\\) is embedding dimension, and \\(C\\) is an absolute constant. Thus high \\(\\Lambda^*\\) corresponds to low half-space depth. Estimate the transform from a minibatch using \\(\\widehat\\Lambda(\\theta)=\\log\\frac1B\\sum_{i=1}^B\\exp(\\langle\\theta,z_i\\rangle)\\), and compute the regularized finite-sample energy \\(E(x)=\\max_{\\theta\\in\\Theta}\\{\\langle\\theta,x\\rangle-\\widehat\\Lambda(\\theta)-\\tfrac{\\tau^2}{2}\\|\\theta\\|_2^2\\}\\), with \\(\\tau\u003e0\\) stabilizing dual optimization.",
 "math_tags": [
  "probability",
  "convex-analysis",
  "geometry"
 ],
 "ml_areas": [
  "embedding",
  "loss",
  "curriculum"
 ],
 "paper": {
  "arxiv_id": "2608.29972",
  "arxiv_url": "https://arxiv.org/abs/2608.29972",
  "summary_what_math_gives_to_ml": "The paper supplies a computable bridge between a large-deviation energy, the Cramér transform \\(\\Lambda^*\\), and geometric centrality measured by Tukey half-space depth. The key transferable asset is that \\(\\exp(\\Lambda^*(x))\\) estimates the number of independent samples needed for a point to appear in a random convex hull, while the depth comparison provides an interpretable geometric calibration up to a dimension-dependent factor. A practical neural use is to equip embedding models with a Cramér-energy confidence score and train or sample examples according to this score, rather than relying only on Euclidean distance or softmax confidence. The method is most suitable for bounded, approximately log-concave embedding distributions and should first be tested as an OOD detector and hard-example curriculum.",
  "title": "Cramér transform, half-space depth and threshold phenomena for convex bodies",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 6,
  "usefulness": 6
 },
 "solves": [
  "accuracy",
  "generalization",
  "sample-efficiency"
 ],
 "title": "Cramer-energy embedding confidence",
 "url": "https://synthcore.org/idea/2858/cramer-energy-embedding-confidence",
 "verification": {
  "peer_reviewed": false,
  "status": "unverified",
  "status_label": "Unverified",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
