loss-backprop-lens

Solid

Use when deciding whether to edit code at all, how large the edit should be, or whether a "working" fix actually generalizes. Applies when iterating on a failing test/run, chasing a flake, committing a sequence of small patches, or tempted to ship on one data point. Frames code changes as gradient steps and forbids overfitting to a single sample or a single test.

AI & Automation 20 stars 4 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
44
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Loss-Backprop-Lens ## Overview Working on a codebase is **gradient descent on code**. A test / CI run / E2E is a **forward pass**. The difference between expected and actual is the **loss**. Every edit is a **step** toward lower loss. This is not a metaphor — it dictates which edits are admissible and which are noise injected into your parameters. **Core principle:** A fix that reduces training loss (the current failing test) but raises generalization loss (future unseen inputs or sibling tests) is **overfitting** and is rejected, regardless of whether CI turns green. This skill is a *mental frame*, not a rigid procedure. Apply it when one of the triggers below fires; combine with `root-cause-by-layer` for the mechanics of diagnosis. ## When to Use - You have **one failing signal** and are tempted to ship a fix - You've made **3+ small patches to the same area** in a short window - A test is **flaky** and you want to retry / widen / skip - A fix **works for this test** but you aren't sure about siblings - You're deciding between a **local tweak** and a **structural change** Do **not** use for: greenfield feature work, pure refactors with no failing signal, single-concept bug fixes where the contract is obvious. ## The Mapping | ML concept | Code equivalent | |---|---| | Forward pass | Running the test / job / E2E | | **Loss** | Difference between expected and actual output | | Backprop | Tracing symptom → structural origin (use `root-cause-by-layer`) | | Parameters...

Details

Author
CorvinLabs
Repository
CorvinLabs/CorvinOS
Created
4 weeks ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category