Skip to content

Add VJP-delta activation steering - #33

Open
wassname wants to merge 10 commits into
generative-computing:mainfrom
wassname:feat/vjp-delta
Open

wassname wants to merge 10 commits into
generative-computing:mainfrom
wassname:feat/vjp-delta

Conversation

@wassname

@wassname wassname commented Sep 17, 2026

Copy link
Copy Markdown

Adds VJP-delta activation steering, a simplified version of Anthropic’s Jacobian lens adapted to contrastive prompt pairs. Based on vjp-steering.

Fits steering vectors with gradients during steer(), then uses the existing additive intervention during generation. Includes a usage notebook.

Checks: existing VJP/lifecycle tests and notebook pass after review fixes. Full suite and CUDA smoke passed before those fixes.

wassname and others added 6 commits September 17, 2026 19:09
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 17, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

VJP fitting does not support sharded model placement or fully restore mixed submodule training modes, and raw host metadata is committed in verification artifacts.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a registered VJP-delta state control that fits additive activation directions via vector-Jacobian products, supports freezing to ActivationAdapter, and documents the new method.

Changes:

  • Implements VJP fitting, normalization, caching, and additive intervention binding.
  • Adds regression tests for mathematical correctness, lifecycle, serialization, batching, and devices.
  • Adds documentation, notebook examples, and verification artifacts.
File summaries
File Description
steerability/algorithms/state_control/vjp_delta/fit.py VJP fitting implementation.
steerability/algorithms/state_control/vjp_delta/control.py Registered additive state control.
steerability/algorithms/state_control/vjp_delta/args.py Control arguments and validation.
steerability/algorithms/state_control/vjp_delta/__init__.py Registry export.
tests/controls/test_vjp_delta.py Regression coverage.
examples/notebooks/algorithms/vjp_delta.ipynb VJP usage and freeze example.
examples/index.md Example index entry.
docs/reference/algorithms/state_control/vjp_delta.md API reference page.
docs/concepts/controls.md Controls catalog entry.
docs/.nav.yml Documentation navigation entries.
slop/audits/job_1647.md CUDA smoke audit.
slop/audits/job_1648.md CUDA retry audit.
slop/pr_drafts/2026-09-17_vjp_delta.md Draft PR metadata.
slop/reviews/2026-09-17_vjp_delta_cheap_review.md Review evidence.
slop/reviews/2026-09-17_vjp_delta_quick_oracle.md Review evidence.
slop/verification/2026-09-17_vjp-delta/gpu_smoke.py CUDA smoke harness.
slop/verification/2026-09-17_vjp-delta/gpu_check.log GPU availability record.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json CUDA job status.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json Retry job status.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json Final CUDA job status.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log Initial CUDA output.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log Initial CUDA log.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log Initial queue summary.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log Retry CUDA output.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log Retry CUDA log.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log Retry queue summary.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log Final CUDA output.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log Final CUDA log.
slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log Final queue summary.
slop/verification/2026-09-17_vjp-delta/notebook_execution.log Initial notebook execution log.
slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log Successful notebook execution log.
slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log Initial focused test output.
slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log Focused test output.
slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log Final focused test output.
slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log Docstring test output.
slop/verification/2026-09-17_vjp-delta/focused_tests.log Lifecycle test output.
slop/verification/2026-09-17_vjp-delta/full_pytest.log Full-suite output.
slop/verification/2026-09-17_vjp-delta/full_pytest_final.log Final full-suite output.
slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log Rebase full-suite output.
slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log Review-fix full-suite output.
slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log Review-fix lifecycle output.
slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log Rebase lifecycle output.
slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log Rebase VJP tests.
slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log Release-artifact tests.
slop/verification/2026-09-17_vjp-delta/precommit_all.log Full pre-commit output.
slop/verification/2026-09-17_vjp-delta/precommit_final.log Final pre-commit output.
slop/verification/2026-09-17_vjp-delta/precommit_docstring.log Docstring pre-commit output.
slop/verification/2026-09-17_vjp-delta/precommit_targeted.log Targeted pre-commit output.
slop/verification/2026-09-17_vjp-delta/precommit_staged.log Initial staged pre-commit output.
slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log Final staged pre-commit output.
slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log Review-fix pre-commit output.
slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log Code pre-commit output.
slop/verification/2026-09-17_vjp-delta/rebase_precommit.log Rebase pre-commit output.
slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log Release-artifact pre-commit output.
slop/verification/2026-09-17_vjp-delta/docs_build.log Strict documentation build output.
slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log Non-strict documentation build output.
slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log Rebase documentation build output.
slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log Review-copy integrity hashes.
slop/verification/2026-09-17_vjp-delta/run.md Verification run summary.
Review details
  • Files reviewed: 20/59 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread examples/notebooks/algorithms/vjp_delta.ipynb Outdated
Comment thread slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json Outdated
Comment thread steerability/algorithms/state_control/vjp_delta/fit.py Outdated
Comment thread steerability/algorithms/state_control/vjp_delta/fit.py Outdated
Comment thread steerability/algorithms/state_control/vjp_delta/control.py
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Memoized fit state is included in the frozen artifact digest, causing unchanged VJPDelta bundles to fail SPipe.load() staleness validation.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread steerability/algorithms/state_control/vjp_delta/fit.py
"""Arguments for `VJPDelta`.

Args:
steering_vector: A precomputed vector or artifact source. It skips gradient extraction.

@wassname wassname Sep 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified precomputed vectors versus fitting sources in 18ad0ba. — Pi

Comment on lines +23 to +24
A precomputed `SteeringVector` or `ArtifactSource` avoids gradient extraction. The frozen form
is `ActivationAdapter`, so a reloaded `.spipe` resolves the stored vectors without a VJP fit.

@wassname wassname Sep 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the same wording in 18ad0ba. — Pi

wassname and others added 3 commits September 17, 2026 21:17
Add fit_ingredients method to return fit inputs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: wassname (Michael J Clark) <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
Signed-off-by: wassname <1103714+wassname@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants