sigreg

$npx mdskill add Tibsfox/gsd-skill-creator/sigreg

Computes a scalar loss regularizing embeddings toward a standard-normal distribution.

  • Measures deviation of embedding distribution from standard-normal target.
  • Depends on Cramér-Wold slicing and Epps-Pulley empirical characteristic function test.
  • Uses random projections and univariate ECF test to estimate distribution mismatch.
  • Returns a differentiable scalar loss for use in total training objective.

SKILL.md

.github/skills/sigregView on GitHub ↗
---
name: sigreg
description: Sketched Isotropic Gaussian Regularization primitive. Scalar loss matching the embedding distribution to a standard-normal target via Cramér-Wold slicing and the Epps-Pulley empirical characteristic function test. Port of rbalestr-lab/lejepa (MIT). Default-off in v1.49.571.
version: 1.49.571
tier: T1
phase: 729
source_paper: arXiv:2511.08544v3
license_attribution: rbalestr-lab/lejepa (MIT)
---

# SIGReg — Sketched Isotropic Gaussian Regularization

Port of SIGReg from Balestriero & LeCun (2025, *LeJEPA*) arXiv:2511.08544v3. The
primitive computes a scalar loss measuring how far an embedding distribution is
from the standard-normal target, using Cramér-Wold slicing plus the Epps-Pulley
empirical characteristic function test. Linear O(N·M·K) time, naturally
differentiable, multi-GPU friendly (all_reduce over ECF averages).

## Public API

```typescript
import { sigreg } from './src/sigreg/index.js';

const loss = sigreg(embeddings);  // embeddings: number[num_samples][num_dims]
// scalar loss; use as L_total = L_pred + λ · loss
```

For telemetry:

```typescript
import { sigregWithBreakdown } from './src/sigreg/index.js';

const { loss, perSliceStatistic, maxSliceStatistic, runTag } = sigregWithBreakdown(embeddings);
```

## Configuration

Default matches the LeJEPA reference implementation:

```typescript
const LEJEPA_DEFAULT_CONFIG = {
  numSlices: 1024,
  univariateTest: { numPoints: 17, sigma: 1.0 },
};
```

## Feature flag

Default-off. Opt-in via `.claude/gsd-skill-creator.json`:

```json
{
  "heuristics-free-skill-space": {
    "sigreg": { "enabled": true }
  }
}
```

## Attribution

Ported from https://github.com/rbalestr-lab/lejepa under the MIT license.
© Randall Balestriero and LeJEPA Contributors. See `../../license_notices.md`.

## Related modules

- `src/skill-isotropy/` — Skill Space Isotropy Audit (Phase 728) — read-only audit use case

More from Tibsfox/gsd-skill-creator

SkillDescription
3d-interaction-designDesign heuristics for three-dimensional interaction — input modalities (6DoF controllers, gaze, gesture, voice), selection and manipulation techniques (ray-cast, virtual hand, go-go, world-in-miniature), navigation (teleport, continuous, redirected walking), and feedback loops (haptic, audio, visual). Covers Fitts' law in 3D, discoverability vs affordance, safe-zone design, and comfort/simulator sickness mitigation. Use when designing VR/AR interactions, immersive walkthroughs, or any input system where the user's body is the controller.
accessibility-patternsProvides web accessibility best practices for semantic HTML, ARIA, keyboard navigation, color contrast, and screen reader patterns. Use when building UI components, reviewing accessibility, or when user mentions 'a11y', 'accessibility', 'ARIA', 'screen reader', 'keyboard navigation', 'WCAG'.
active-listeningActive listening techniques for effective communication. Covers attending behaviors, paraphrasing, reflective listening, clarifying questions, empathic response, barriers to listening, listening in conflict, and cross-cultural listening. Use when building listening skills, improving understanding in conversation, mediating disputes, or analyzing communication breakdowns.
adversarial-pr-reviewAdversarial spec-compliance PR review — cross-references diffs against approved specs, verifies runtime claims against source, detects competing PRs, audits scope/convention compliance. Use before merging.
agile-methodsAgile and Lean software development methodologies for iterative, adaptive project execution. Covers Scrum (roles, ceremonies, artifacts), Kanban (WIP limits, flow metrics), XP (TDD, pair programming, CI), SAFe overview, Lean Software Development (Poppendieck's 7 principles), user stories (INVEST criteria), estimation via story points and velocity, and the Agile Manifesto's values and principles. Includes Cynefin framework for methodology selection and GSD's relationship to Agile as a structured Lean variant.
algebraic-reasoningSymbolic manipulation, equation solving, and algebraic structures for mathematical reasoning. Covers distributive law, factoring, completing the square, linear through polynomial equation solving, systems of equations (substitution, elimination, Gaussian elimination, matrix methods), algebraic structures (groups, rings, fields), modular arithmetic, polynomial theory, and inequalities. Use when solving equations, simplifying expressions, working with algebraic structures, or performing symbolic manipulation.
algorithmic-awarenessUnderstanding how algorithmic systems shape what users see, know, and do -- from recommendation feeds to search ranking to credit scoring to hiring software. Covers the mechanics of recommendation systems, algorithmic bias and its sources, personalization's effects on information diets, opacity and accountability, AI limitations (hallucination, confident wrongness), and the human-in-the-loop question. Use when a learner needs to think critically about why particular content reached them.
algorithms-data-structuresAlgorithms and data structures from first principles through advanced analysis. Covers sorting (bubble, insertion, selection, merge, quick, heap, radix), searching (linear, binary, BFS, DFS, Dijkstra, A*), fundamental data structures (arrays, linked lists, stacks, queues, hash tables, trees, heaps, graphs, tries), complexity analysis (Big-O, Big-Omega, Big-Theta, amortized), recurrence relations, and algorithm design paradigms (divide-and-conquer, greedy, dynamic programming, backtracking). Use when analyzing, selecting, implementing, or comparing algorithms and data structures.
aminet-browserAminet search and browse: full-text search, category tree navigation, architecture filtering, package detail, and curated collections. Use when searching, browsing, or managing package collections.
aminet-emulatorFS-UAE emulator configuration and launch: hardware profiles, ROM management, WHDLoad integration, config generation, and state snapshots. Use when configuring emulation, managing ROMs, or launching Amiga software.