Phrase DSL: velocity jobs on the 2-D field

August 22, 2026 · View on GitHub

What each operator actually does in velocity space, scored on the CPU 2-D fixture (color red/blue × pattern stripe/dot). Pictures and the erase/GEM suite live in 2d-analysis.md. This page is the job inventory: covered, already a recipe, or dead here.

Notation: v_f / v_t frozen / trained velocity, v0 = v(''), CFG(p) = v(p) − v0. The trainer multiplies each rule's loss by rule.alpha.

Live operators

SyntaxClaimed jobVelocity target (live rule_loss)2-D score
c++exaggerate; more of c everywherev_t(c) → v0 + g (v_f(c) − v0) (classic). Probe mode (not used here) globalizes onto a random prompt. Default g=3.right. red++ color +1 → ~+3. Stripe holds. Because the residual is a linear map of antipodes, blue goes to ~−3 — that is the bipolar slider.
c--neutralize; prompts that ask for c match emptyESD: v_t(c) → v0 − g (v_f(c) − v0) in c's own context. Default g=0 is v0.right. Bare red-- lands at the origin. Does not write blue.
c--:guidance=1ESD overshootsame formula at g=1−CFG(c)right. Identical to red=blue on this antipodal field (−CFG(red)=CFG(blue)).
a=bremap a so it behaves like bv_t(a) → v0 + g (v_f(b) − v0) in b's context. Empty a writes into uncond.right for red=blue. Also the mix and isolate recipes below. Uncond =b cannot move this fixture (e('')=0).
a#bpin a to frozen bv_t(a) → v_f(b) in b's context. Bare # pins uncond.right as a retain. stripe#stripe is identity. c--|k#k is keep+erase. # on ∅ is a no-op here (e('')=0).
a%borthogonalize trained b from frozen a; negative alpha alignsscale · |cos(CFG_f(a), CFG_t(b))|. Only b trains. Negative alpha flips the trainer sign → maximize |cos|.right no-op on this field: the axes already start orthogonal, so |cos|=0 and the gradient vanishes. Negative % therefore cannot create a mix from a perpendicular pair.
a~breplace / full swapmacro, not a fourth loss: b++:2λ | a=b:4λ | b%a:−λrecipe, not independently right here. On a linear antipodal LoRA, blue++ and red=blue are opposite motions. Use = or ++ when you want a clean 2-D story.
a^bpixel L2 between rendersrender a vs frozen b + velocity freeze-anchor on bdead here. TwoAxisBackend has no render. Velocity field ≠ pixels.
;cImageRewardparsed, not implemented. Needs a GPU scorer. Leave it.
@(deprecated)stripped before parseignored.

Phrases compose with |. {random_prompt} materializes per step.

Jobs that look missing — already recipes

Do not add a synonym operator for any of these. Tests in tests/test_dsl_jobs.py gate the probes.

Wanted jobPhraseWhy it is not a new op
Isolate / extract one axis without writing the antipodered stripe=stripeWrite the mix onto the keep concept. The mixed prompt lands on e_y. Standalone red/stripe drift is the linear LoRA class (same caveat as the antipodal write swap), not a missing extract op. % is the wrong tool: red%red stripe orthogonalizes by inflating the perpendicular, not by projecting.
Mix / add two concepts (red+stripe)red=red stripeWrite red toward the mixed embedding. On this fixture e("red stripe") = e(red)+e(stripe), so trained red → ~(1, 1). A first-class + would match this target here. On a real encoder the concat write uses the text encoder's mix, not a velocity-space sum — add + only if those diverge. Negative % blend is not this job (see above).
Bipolar slider (redblue)red++Classic exaggerate on an antipodal pair is a signed scale. blue++ is the other sign.
Erase but do not write the oppositec-- / c--:guidance=0Default g=0 is neutralize-to-uncond. g=1 is write-to-opposite on antipodes. Do not add c!! / c/ as a synonym. describe_phrase says "Neutralize" for bare -- and guidance 0.
Preserve-everything-exceptc--|#|keep#keepErase plus freeze uncond plus freeze the keep. Uncond freeze is a no-op on this e=0 fixture; the keep pin is the live retain.
Keep+erase in one tokenc--|k#kAlready first-class composition. Same keep geometry as the EA hook.

What was discarded

  • First-class neutralize. Bare c-- (and c--:guidance=0) is neutralize. Documented, tested, not forked.
  • First-class + / mix. Expressible as a=a b on this field. The 2-D embedding is additive, so a velocity-space add would be a synonym.
  • First-class isolate / project. Expressible as mix=keep. % does not project cleanly.
  • Signed % rewrite so blend-from-orthogonal has a gradient. Prototyped: maximizing cos from 0 blows up norms (stripe → ~(4, 0)). Leave |cos|. Blend % is for already-correlated concepts (the SANA anime/hyperrealistic proof), not orthonormal axes.
  • ImageReward ;. Still unimplemented. Out of scope (GPU scorer).
  • Pixel ^ on this fixture. Cannot run.

How to run

pytest tests/test_dsl_jobs.py tests/test_2d_analysis.py tests/test_dsl.py tests/test_ops.py -q
python scripts/analyze_2d.py --jobs --out outputs/2d_analysis