Skip to content
Back to skills

Atomic Loss Training

ASecurity

Build and optimize the finite-atom APT contrastive loss with proposal posterior correction.

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill atomic_loss_training --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Atomic Loss Training?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Atomic Loss Training
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-atomic-loss-training/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-atomic-loss-training)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: atomic_loss_training
description: Build and optimize the finite-atom APT contrastive loss with proposal posterior correction.
---

# Atomic Loss Training

Use this skill to implement the APT finite-atom objective from Section 3.2. It is appropriate for reduced recovery, ablations, and deterministic tests where the posterior estimator is represented by a simple differentiable score function.

## Inputs
- Atom parameter values and the index of the positive simulated parameter.
- Observation value and affine score parameters.
- Prior and proposal log-density values for the atoms.
- Learning rate for one optimizer step.

## Outputs
- Cross-entropy loss before and after update.
- Probability assigned to the positive atom.
- Parameter values before and after the optimizer step.

## Workflow
1. Score each atom with an observation-conditioned affine model.
2. Apply the proposal-posterior transform before computing probabilities.
3. Compute cross-entropy against the positive atom.
4. Compute analytic gradients and update trainable parameters.
5. Record a trace compatible with recovery validation.

## Validation
Run `python scripts/atomic_loss.py --self-test`. The deterministic test verifies that the optimizer changes parameters and reduces loss.

## Limitations
The provided script is a compact recovery implementation. Full APT normally uses neural density estimators such as mixtures or flows.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…