Skip to content
Back to skills

Mixed Variable Diffusion Objective

ASecurity

Encode mixed continuous and categorical variables and compute GSDM-style conditional diffusion denoising losses.

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

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Mixed Variable Diffusion Objective?

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

Security grade badge for Mixed Variable Diffusion Objective
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-mixed-variable-diffusion-objective/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-mixed-variable-diffusion-objective)

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

Download with Pro
SKILL.md
---
name: mixed_variable_diffusion_objective
description: Encode mixed continuous and categorical variables and compute GSDM-style conditional diffusion denoising losses.
---

# Mixed Variable Diffusion Objective

Use this skill when a GSDM recovery needs deterministic diffusion mechanics for mixed continuous and discrete variables: one-hot categorical encoding, arbitrary observation masks, forward noising, decoding, and masked `x0` denoising loss.

Do not use this skill as a full neural diffusion implementation. It supplies the objective contract and small numerical helpers used by recovery and tests.

## Inputs

- Variable specs with `name`, `kind`, and optional `num_categories`.
- Values for each variable.
- Beta schedule and timestep.
- Noise vector.
- Prediction vector and optional loss mask.

## Outputs

- Encoded `x0` vector.
- Noisy `xt` vector.
- Observation mask expanded to encoded dimensions.
- Masked mean-squared denoising loss.
- Decoded categorical values by argmax.

## Workflow

1. Encode continuous values as scalar channels.
2. Encode categorical values as one-hot channel blocks.
3. Expand observed variable names to encoded dimensions.
4. Compute `alpha_bar_t` from the beta schedule.
5. Produce `xt = sqrt(alpha_bar_t) * x0 + sqrt(1 - alpha_bar_t) * noise`.
6. Compute masked MSE over latent dimensions.

## CLI

```bash
python scripts/diffusion_objective.py --demo --output /tmp/gsdm_objective.json
```

## Validation

```bash
python -m pytest tests
```

The tests cover categorical round-trips, the noising equation, and masked loss behavior.

## Limitations

The helpers use Python lists and floats for portability. They are intended for small recovery checks, not high-throughput training.

Files in this skill

  • SKILL.md1.7 KB
  • scripts/diffusion_objective.py5 KB
  • tests/test_diffusion_objective.py1.5 KB

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.