{
 "artifacts": [
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1149/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1149/results.json"
  },
  {
   "name": "shape_private_noise.py",
   "url": "https://synthcore.org/code/1149/shape_private_noise.py"
  },
  {
   "name": "sweep_results.json",
   "url": "https://synthcore.org/code/1149/sweep_results.json"
  },
  {
   "name": "verify_and_sweep.py",
   "url": "https://synthcore.org/code/1149/verify_and_sweep.py"
  }
 ],
 "category": "training",
 "description": "Replace fixed Gaussian noise in a private optimizer with generalized-Gaussian noise whose shape p is selected for the actual clipped-gradient sensitivity and privacy budget. For every candidate p, numerically find the minimum scale b satisfying the hockey-stick privacy constraint, then choose the p minimizing a gradient-update utility moment such as variance or expected absolute magnitude.",
 "download_zip": "https://synthcore.org/download/1149",
 "formulas_latex": [
  "$$D_{\\varepsilon}(P\\|Q):=\\sup_A\\{P(A)-e^{\\varepsilon}Q(A)\\},\\qquad D_{\\varepsilon}(P_D\\|P_{D'})\\leq\\delta\\quad(D\\sim D').$$",
  "$$f_{p,b}(z)=\\frac{p}{2b\\,\\Gamma(1/p)}\\exp\\!\\left[-\\left(\\frac{|z|}{b}\\right)^p\\right],\\qquad p\\in[1,\\infty),\\ b\u003e0.$$",
  "$$D_{\\varepsilon}(f_{p,b}\\|f_{p,b,\\Delta})=\\int_{\\mathbb R}\\left[f_{p,b}(x)-e^{\\varepsilon}f_{p,b}(x-\\Delta)\\right]_+dx\\leq\\delta,$$",
  "$$U_m(p)=b(p)^m\\frac{\\Gamma((m+1)/p)}{\\Gamma(1/p)},\\qquad p^*=\\arg\\min_{p\\in[1,p_{\\max}]}U_m(p).$$"
 ],
 "id": 2956,
 "implementation": "Integrate this at the noise-injection line of a private optimizer, initially for a scalar clipped gradient query or one coordinate of a clipped gradient. Clip each per-example gradient to norm C, so use scalar sensitivity Delta=C or 2C according to the neighboring-dataset convention; keep that convention identical for all baselines. For every candidate p on a grid such as {1.0,1.25,...,8.0}, solve for b(p) by bisection. At each b, evaluate the hockey-stick integral numerically by constructing f(x) and f(x-Delta), identifying where f(x)-exp(epsilon)f(x-Delta)\u003e0, and integrating the positive difference with adaptive quadrature over an interval initially covering 12b+Delta. Expand the interval until the omitted tail is below 1e-10. Choose the smallest b whose divergence is at most delta minus a numerical safety margin, then calculate U_m(p) and select p*. Sample noise using inverse-CDF sampling: for u uniform on [-1/2,1/2], set z=b sign(u)[-log(1-2|u|)]^(1/p). Apply g_private=g_clipped+z before the optimizer update. The paper supplies the divergence, distribution family, and moment objective; quadrature and bisection are numerical implementations. First test logistic regression and a small MNIST MLP, comparing p=1, p=2, and selected p under equal epsilon, delta, steps, clipping C, parameter count, and training FLOPs. Pre-register: measured divergence must be within 1% of delta at the selected scale; multiplying Delta by 0.5, 1, and 2 must leave p* unchanged within one grid step while b* scales proportionally within 3%; and at least one privacy regime must produce a 5% lower U_2 or U_1 than both Laplace and Gaussian. Fixing p=2 is the ablation. The transfer is falsified if calibration is non-conservative, p* changes substantially under sensitivity rescaling, or no moment/task improvement appears across privacy regimes.",
 "math_summary": "The paper defines approximate differential privacy through the epsilon hockey-stick divergence D_epsilon(P||Q)=sup_A{P(A)-exp(epsilon)Q(A)} and requires D_epsilon(P_D||P_D')\u003c=delta for neighboring datasets. Use the generalized-Gaussian density f_{p,b}(z)=p/[2b Gamma(1/p)] exp[-(|z|/b)^p] for p in [1,infinity) and scale b\u003e0. For an additive scalar mechanism M(D)=q(D)+Z with sensitivity Delta=|q(D)-q(D')|, the privacy constraint is D_epsilon(f_{p,b}(.)||f_{p,b}(. - Delta))\u003c=delta. The scale-homogeneous utility moment is E|Z|^m=b^m Gamma((m+1)/p)/Gamma(1/p), so minimizing utility for fixed p means using the smallest privacy-feasible b(p); shape selection minimizes U_m(p)=b(p)^m Gamma((m+1)/p)/Gamma(1/p). Since rescaling Delta rescales b(p) by the same factor, the optimal p should be invariant to the absolute sensitivity scale when the normalized sensitivity geometry is unchanged.",
 "math_tags": [
  "probability",
  "statistics",
  "optimization",
  "information-theory"
 ],
 "ml_areas": [
  "optimizer",
  "training",
  "regularization"
 ],
 "paper": {
  "arxiv_id": "2608.31138",
  "arxiv_url": "https://arxiv.org/abs/2608.31138",
  "summary_what_math_gives_to_ml": "The paper provides a constructive way to choose the shape of additive generalized-Gaussian noise rather than treating Laplace and Gaussian noise as the only useful options. Its transferable asset is the combination of privacy calibration through the hockey-stick divergence with a scale-homogeneous utility objective, which makes shape comparison invariant to the absolute sensitivity scale. A direct neural-network application is private gradient or update perturbation: for a fixed privacy budget, numerically calibrate the smallest noise scale for each shape p and select the shape minimizing a gradient-relevant moment. The strongest initial test is one-step or few-step private optimization with exact scalar accounting, followed by a conservative coordinate-wise extension to clipped gradients.",
  "title": "Scale Analysis and Shape Selection for the Generalized Gaussian Mechanism under Approximate Differential Privacy",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 7,
  "usefulness": 7
 },
 "solves": [
  "accuracy",
  "stability",
  "sample-efficiency"
 ],
 "title": "Shape-Optimized Private Gradient Noise",
 "url": "https://synthcore.org/idea/2956/shape-optimized-private-gradient-noise",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "Built generalized-Gaussian sampling, hockey-stick divergence calibration, grid-based shape selection, scaling checks, and a clipped scalar mean-estimation experiment. Quadrature calibration reached delta accurately, Monte Carlo moments matched the analytic formula, and b scaled proportionally with sensitivity while p*=1 remained invariant. However, p=1 was optimal in all tested privacy regimes; the optimized arm is therefore Laplace and its small MSE difference is not evidence of a shape-optimization gain.",
   "metrics": {
    "baseline": "Laplace p=1: U2=1.999920 at epsilon=1, delta=1e-5; mean-estimation MSE=0.4461 ± 0.0476",
    "idea": "Selected p=1, b=0.999980: U2=1.999920; mean-estimation MSE=0.4318 ± 0.0383. Gaussian p=2 had U2=13.9176 and MSE=6.6056 ± 0.7046."
   },
   "how_to_run": "python3 shape_private_noise.py \u0026\u0026 /home/maxwelhelp/main/bin/python3 verify_and_sweep.py",
   "files": [
    "shape_private_noise.py",
    "verify_and_sweep.py",
    "results.json",
    "sweep_results.json"
   ],
   "limitations": "Only a scalar clipped mean-estimation task was tested, not logistic regression or MNIST MLP. The task prototype uses a sensitivity-calibrated scalar mechanism but does not implement a full DP-SGD accountant or composition across iterations; no wall-clock/FLOP comparison was performed."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-02T12:22:13",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": null,
    "tested": false
   },
   "practical_benchmark": {
    "beats_baseline": null,
    "tested": false
   },
   "toy_mechanism_gate": {
    "confirmed": false,
    "tested": true
   }
  }
 }
}
