Skip to content
Back to skills

Bbvi Stochastic Optimizer

ASecurity

Apply stochastic ascent and AdaGrad updates to black-box variational inference gradient estimates while recording parameter-change evidence.

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

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 bbvi_stochastic_optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bbvi Stochastic Optimizer?

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

Security grade badge for Bbvi Stochastic Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-bbvi-stochastic-optimizer/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-bbvi-stochastic-optimizer)

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: bbvi_stochastic_optimizer
description: Apply stochastic ascent and AdaGrad updates to black-box variational inference gradient estimates while recording parameter-change evidence.
---

# BBVI Stochastic Optimizer

## When To Use

Use this skill to update variational parameters with BBVI gradient estimates. It supports fixed Robbins-Monro-style scalar ascent and diagonal AdaGrad updates from the paper.

Do not use it to compute BBVI gradients or to evaluate predictive likelihood.

## Inputs

- `params`: current variational parameters as a numeric list.
- `gradient`: gradient estimate with the same shape.
- `method`: `scalar` or `adagrad`.
- `learning_rate`: scalar base learning rate.
- `state`: optional AdaGrad accumulator.

## Outputs

- `params_before` and `params_after`.
- `gradient` and `step`.
- `state_before` and `state_after`.
- `optimizer_step_executed` boolean.

## Workflow

1. Validate finite parameters and gradients.
2. For `scalar`, apply `params + learning_rate * gradient`.
3. For `adagrad`, update the squared-gradient accumulator and apply `learning_rate / sqrt(accumulator + epsilon)` per parameter.
4. Return a trace suitable for recovery validation.

## Validation

Run:

```bash
python tests/test_optimizer.py
```

## Limitations

This skill performs ascent. If minimizing a loss, negate the gradient before calling it.

Files in this skill

  • SKILL.md1.3 KB
  • scripts/optimizer.py2.6 KB
  • tests/test_optimizer.py828 B

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.