Skip to content

About

Empirical compliance probes for openai/parameter-golf submissions (Issue #1017 C1 target-side, C1 input-side, C2)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

pgolf-validator

Empirical compliance probes for openai/parameter-golf submissions, applied to a subset of the four conditions in Issue #1017 — A Field Guide to Valid Submissions.

$ python examples/clean_baseline.py
[✓ PASS] CausalityProbe          (C1 target-side causality)
[✓ PASS] NormalizationProbe      (C2 normalized distribution over Σ)
[✓ PASS] InputCausalityProbe     (C1 input-side causality)

$ python examples/c1_violating_slot.py     # SLOT @ PR #1929 settings
[✗ FAIL] CausalityProbe          violations=4/8 — max |Δnll| = 1.703
[✓ PASS] NormalizationProbe
[✗ FAIL] InputCausalityProbe     violations=4/8 — max |Δnll| = 1.126

$ python examples/c2_violating_byte_mixer.py
[✓ PASS] CausalityProbe
[✗ FAIL] NormalizationProbe      violations=8/8 — worst |Σp − 1| = 0.0225
[✓ PASS] InputCausalityProbe

CPU only. Toy model. ~5 seconds per probe.

Coverage: Issue #1017 C1 (target-side and input-side) and C2. Not covered: C3 (online-state update ordering) and C4 (single-pass eval). See DESIGN_DECISIONS.md for why these are static-analysis territory rather than behavioral-probe territory.


Why this exists

Parameter Golf has an enforcement gap.

The contest defines four conditions on what counts as a valid score (Issue #1017): C1 causality, C2 normalization over the token alphabet Σ, C3 score-before-update, C4 single-pass. Reviewers have at this point flagged two clusters where many open Record-claiming PRs likely violate one of these conditions:

  • Issue #1872 (PPM-D byte mixture cluster, ~7 PRs in the 0.90–1.01 BPB range) — the byte-level mixture distribution does not sum to 1 over Σ. The PR author for the original ruling request acknowledged this in the thread ("you're right").
  • Issue #1336 (SLOT cluster, 4+ PRs in the 0.83–1.08 BPB range) — per-sample delta and logit-bias variants leak future-target information through the shared optimization step. Some PRs in this cluster have been voluntarily withdrawn after the issue surfaced.

Existing community tools each cover part of the surface but leave gaps:

Tool Approach What it checks Gap
Bortlesboat/parameter-golf-checker Static AST C1–C4 + 4 patterns Static-only; can be fooled by indirection / metaprogramming
openai/parameter-golf PR #1240 prove_slot_causal_violation.py Behavioral, toy LM C1 SLOT only Single-condition, single-mechanism, not a reusable framework
asuramaya/conker-detect Artifact + weight forensics 13 audit modes Different layer (artifact-level), not per-condition behavioral probes

This repo's lane: behavioral probes for C1 (target-side and input-side) and C2 against any object that conforms to the Scorer protocol — generalizing the PR #1240 idea to scorers that are not SLOT-shaped and adding a C2 check for the byte-mixer family. C3 and C4 are deliberately left to static analysis; see DESIGN_DECISIONS.md.

It is intentionally complementary to Bortlesboat's static checker. Static analysis catches the shape; behavioral probes catch the semantics. They catch different classes of failure, and the union is stronger than either alone.


Install

pip install torch
git clone https://github.com/yaowubarbara/pgolf-validator
cd pgolf-validator
PYTHONPATH=. python examples/clean_baseline.py

No GPU required. PyTorch CPU is sufficient.


Use

A submission must implement the Scorer protocol (see pgolf_validator/scorer.py):

from pgolf_validator import (
    CausalityProbe,
    NormalizationProbe,
    InputCausalityProbe,
)

scorer = MyAdaptedSubmission(...)   # wraps your submission's eval loop
print(CausalityProbe().run(scorer))
print(NormalizationProbe().run(scorer))
print(InputCausalityProbe().run(scorer))

To probe a real PR's behavior at scale you adapt that PR's train_gpt.py into a Scorer (typically 30–80 lines of glue) and run the probes. The probes never look inside — they only observe input → output.


What each probe does

CausalityProbe (C1, target-side)

Runs the scorer on (x, y) and on (x, y′) where y′ differs from y at exactly one position p. Records |nll_a[i] − nll_b[i]| for all positions i ≠ p (both i < p and i > p). A clean causal scorer returns zero — flipping y_p does not appear in −log p(y_q | x_{<=q}) for any q ≠ p. SLOT-style optimization-during-eval routines violate this because the AdamW step over the target window propagates gradient from y_p into a delta that shifts predictions at every position.

NormalizationProbe (C2)

Picks a random position t, queries scorer.distribution(x, t), and verifies the returned [1, V]-shaped distribution sums to 1 over Σ. This is the operational form of @sharpobject's question on Issue #1872. Caveat: a Scorer adapter that re-projects byte-level scores back to a Σ-shaped tensor and renormalizes will pass this probe even if the underlying mechanism is byte-level. Pair with static analysis to catch that case.

InputCausalityProbe (C1, input-side)

Runs (x, y) and (x′, y) where x′ differs from x at exactly one position p. Verifies that NLLs at positions < p are unchanged. In a clean causal LM this is automatic — causal masking ensures position q for q < p cannot see x_p. SLOT-style scorers fail this even with a scored-position-only optimization mask, because flipping x_p changes the hidden state at position p, which changes the gradient signal during optimization, which changes the converged delta, which is then applied to hidden state at positions < p.

This probe does NOT test Issue #1017's C3 (score-before-update / online-state ordering); see DESIGN_DECISIONS.md.


What this repo deliberately does NOT do

  • It does not run real submission training or evaluation. That requires 8×H100 and is out of scope for a triage tool.
  • It does not produce binding rulings. That is an organizer prerogative (@cocohearts, @valerio-oai, @0hq, @yuzhougu-oai). These probes produce evidence that informs review.
  • It does not replace static analysis. False positives and false negatives are independent across the two layers; the value is the union.

Audits

Manual audits applying this framework's diagnostic shape to two clusters that have requested rulings:

  • audits/audit_1854_ppm_d.md — PR #1854's PPM-D mixture, mapped onto the C2 violation that NormalizationProbe detects on the analogous toy case.
  • audits/audit_1929_slot.md — PR #1929's per-sample SLOT delta + EMA warmup, mapped onto the target-side and input-side C1 violation pattern reproduced in examples/c1_violating_slot.py.

These are not formal accusations. They are reasoned mappings between the PR's procedure and the empirical signature this framework would produce if the procedure were re-implemented under the Scorer interface.


License

MIT. See LICENSE.


Contact

This tooling is offered as community infrastructure. PRs adding probes for C4 (single-pass), edge cases, or adapter helpers for specific submission shapes are welcome.

About

Empirical compliance probes for openai/parameter-golf submissions (Issue #1017 C1 target-side, C1 input-side, C2)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages