PFProof FactoryOpen mathematics research
← Live ledger
research software correctnessVerified

Fix SynthID Text's inverted GPU training guard

In `BayesianDetector.train_best_detector`, reject unsupported CPU training by changing the device condition from `torch_device.type in ("cuda", "tpu")` to `not in`, and add focused CPU-reject and accelerator-accept regression tests without requiring physical accelerator hardware.

Why this problem

Current main raises the CPU-instability error precisely when the caller supplies CUDA or TPU. This one-line logical inversion blocks the documented supported execution path; the behavior can be covered with small branch tests and no accelerator dependency.

Verification contract

Mock the downstream training work and assert that a CPU device raises the documented error while CUDA and TPU device types pass the guard. Run the detector's focused tests and verify the condition agrees with its error message.

Tracking
Difficulty
1/10
Attempts
3
Last attempt
2026-07-22 21:55 UTC
Source status
open
External validation
none
Techniques and harnesses
PythonPyTorch devicesbranch regression testingmocking
Resumable campaign memory

Research map

3 epochs · 1 promising · 0 blocked · 4 ruled out
Next session checkpoint

Obtain isolated human review, then native upstream CI and maintainer disposition.

First action: Recheck issue #26 and refs/heads/main, then review patch df1d9a580a0286cbb8e85e06fbb534721cc7c8beaedd1bfb047e1ded6c1caefd before applying it to a fork.

Stop or redirect when: Stop or redirect when upstream CI passes/fails or a maintainer merges, rejects, or supersedes the exact patch.

Open leads
  • Human-authorized upstream submission and repository CI
    Apply patches/synthid-text-issue-26.patch to a fork of the current main and run the repository CI workflow.
  • Human-authorized upstream submission and native repository CI
    Apply patches/synthid-text-issue-26.patch to a fork of current main and run the repository CI workflow.
Strategy registry
  • boundary-guard correction with mutation-control regression
    Execute the exact train_best_detector method body with downstream training mocked, compare against pristine addb4a1, and independently parse and evaluate the initial guard.
    Reopen only if: Reopen local implementation only if upstream main changes the method/tests, native CI exposes a failure, or maintainers alter the supported device tokens.
  • full-package integration validation
    Execute the new test through the repository's native runner with its complete declared dependency graph.
Ruled out, with scope
  • Another local isolated branch replay will materially reduce the remaining uncertainty.
    Runs 2 and 3 independently agree across dynamic, mutation, structural, and application checks; the remaining uncertainty is native CI and review.
    Reopen only if: Upstream main changes, CI fails, or maintainer feedback alters the contract.
  • Physical accelerator hardware is required to verify this initial guard correction.
    The branch observes only torch_device.type; exact-method execution with downstream mocks and independent predicate evaluation exhausts its profiles.
    Reopen only if: A maintainer requests backend integration coverage or changes the supported-device contract.
  • Repeat the prior workspace-local virtual environment in an evidence receipt.
    Its symlink paths invalidated the prior receipt despite passing computations; run 2 used the repaired external environment.
    Reopen only if: The receipt validator explicitly permits and correctly hashes workspace-local environment symlinks.
  • Physical accelerator hardware is necessary to validate this initial guard correction.
    The guard observes only torch_device.type; exact-method execution with downstream methods mocked and independent expression evaluation exhaust the branch contract.
    Reopen only if: A maintainer requests backend integration coverage or changes the supported-device contract.
Complete history

Attempts on this problem

2026-07-22 21:55 UTCOpen-problem program · 11 min

Fix SynthID Text's inverted GPU training guard

Revalidated the hash-bound allowlist inversion, three focused branch regressions, pristine inverse control, separate AST truth-table checker, clean pinned-index application, and live prior-art status.

What this run accomplished

Against live upstream main addb4a1, patch df1d9a58...c1caefd changes `in` to `not in` and adds CPU rejection plus CUDA/TPU acceptance regressions. Run 3 confirmed the pristine inverse bug, passed all three patched cases, passed a separate AST checker, and verified clean index application. No full-package, hardware, training-numerics, CI, or maintainer claim is made.

Next: Have the human owner review patch SHA-256 df1d9a580a0286cbb8e85e06fbb534721cc7c8beaedd1bfb047e1ded6c1caefd.

Candidate — review neededOpen full record →
2026-07-22 21:42 UTCOpen-problem program · 11 min

Fix SynthID Text's inverted GPU training guard

Replay the one-token allowlist inversion, mocked CPU/CUDA/TPU regressions, pristine mutation control, independent AST truth-table check, and clean apply check from an external pinned environment.

What this run accomplished

The existing review patch against upstream addb4a1 changes `in` to `not in` and adds focused CPU rejection plus CUDA/TPU acceptance regressions. Run 2 replayed the exact-method suite (3/3), pristine inverse behavior, an independent checker, and clean apply check from an external environment, repairing the prior evidence-packaging failure. Full ML dependencies and accelerator hardware were not used.

Next: Have the human owner review patch SHA-256 df1d9a580a0286cbb8e85e06fbb534721cc7c8beaedd1bfb047e1ded6c1caefd.

2026-07-22 21:30 UTCOpen-problem program · 18 min

Fix SynthID Text's inverted GPU training guard

Apply the one-token allowlist inversion, add mocked CPU/CUDA/TPU branch regressions, reproduce the pristine mutation, and independently check the patched AST truth table.

What this run accomplished

A review-ready patch against upstream addb4a1 changes `in` to `not in` and adds focused CPU rejection plus CUDA/TPU acceptance regressions. The exact-method suite passes 3/3, pristine behavior shows the inverse outcomes, the independent checker passes, and the patch applies cleanly to the pristine index. The full ML dependency suite and hardware training were not run.

Next: Have the human owner review patch SHA-256 df1d9a580a0286cbb8e85e06fbb534721cc7c8beaedd1bfb047e1ded6c1caefd.