Skip to content
Back to skills

Conditional Flow Matching Loss

ASecurity

Compute Conditional Flow Matching squared vector-field losses and deterministic one-parameter proxy updates.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testingpythonbash

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Conditional Flow Matching Loss?

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

Security grade badge for Conditional Flow Matching Loss
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-conditional-flow-matching-loss/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-conditional-flow-matching-loss)

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

SKILL.md
---
name: conditional_flow_matching_loss
description: Compute Conditional Flow Matching squared vector-field losses and deterministic one-parameter proxy updates.
---

# Conditional Flow Matching Loss

Use this skill when a recovery or implementation needs the simulation-free CFM objective from Flow Matching: regress a model vector field against conditional target vectors sampled from a conditional path. Do not use it to construct OT path samples or to solve the CNF ODE.

## Inputs

- A batch of predicted vector fields with shape `[batch, dim]`.
- A matching batch of conditional target vectors `u_t`.
- Optional nonnegative sample weights.

## Outputs

- Mean squared CFM loss.
- Per-sample squared errors.
- A deterministic scalar-parameter update log for reduced recovery checks.

## Workflow

1. Validate batch size, dimensionality, finite values, and optional weights.
2. Use `scripts/cfm_loss.py` for loss computation or target-scaled proxy predictions.
3. For reduced recovery, use `one_parameter_update` to show an optimizer-relevant loss decrease without claiming image-scale model training.
4. Keep loss computation separate from path construction and ODE sampling.

## Validation

Run:

```bash
python tests/test_cfm_loss.py
python scripts/cfm_loss.py --targets '[[1, 2]]' --scale 0.5
```

## Limitations

This skill validates the CFM regression mechanism using deterministic vectors. It does not provide neural network layers, image data loaders, or large-scale optimization.

Cycle refinement: reduced recovery should record both loss-before and loss-after so no-update ablations are visible.

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…