Skip to content

fix(prism): ban non-causal TokenMix label-leak class - #95

Merged
echobt merged 1 commit into
mainfrom
fix/prism-noncausal-label-leak
Aug 8, 2026
Merged

fix(prism): ban non-causal TokenMix label-leak class#95
echobt merged 1 commit into
mainfrom
fix/prism-noncausal-label-leak

Conversation

@echobt

@echobt echobt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Catch MLP-Mixer / TokenMix dense sequence mixers without a causal mask before pod rent (static NonCausalLabelLeak screen + agentic cheat code).
  • Treat absurdly low recipe-v1 BPB (< 1.0) as the same label-leak class in sim/agentic.
  • Document the causal LM ban for miners (docs/PRISM.md, recipe, external-miner).

Triggered by prod exploit b99a7047 (bpb≈0.23, score ~813k in ~12m) — already operator-revoked to Score(0)/rejected.

Test plan

  • cargo test -p challenge-ast --lib source_cheats
  • cargo test -p challenge-agentic sim_prism_tokenmix
  • cargo test -p challenge-agentic sim_absurd_low_bpb
  • CI green
  • Deploy prism-challenge; confirm next TokenMix-class submit rejects pre-pod

Summary by CodeRabbit

  • New Features

    • Added detection for non-causal sequence mixing that can expose future labels during next-token prediction.
    • Added the non_causal_label_leak result across cheat classifications and verdict reporting.
    • Added checks for unusually low BPB scores and expanded static source screening.
  • Documentation

    • Clarified causal language-model requirements, prohibited patterns, failure outcomes, and permitted causal alternatives.
    • Updated Prism rules and prompt guidance to distinguish valid causal components from label leakage.
  • Tests

    • Added coverage for TokenMix and MixerBlock detection while confirming causal Transformer patterns remain valid.

Catch MLP-Mixer/TokenMix sequence mixers without a causal mask before pod
rent (static screen + agentic code), and document the causal LM ban for miners.
@echobt
echobt merged commit a4e8963 into main Aug 8, 2026
0 of 2 checks passed
@echobt
echobt deleted the fix/prism-noncausal-label-leak branch August 8, 2026 11:49
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 75eb5067-b822-42dd-b2f3-a03764c9fc44

📥 Commits

Reviewing files that changed from the base of the PR and between b09d33e and 0d1806c.

📒 Files selected for processing (11)
  • crates/challenge-agentic/src/lib.rs
  • crates/challenge-agentic/src/prompts.rs
  • crates/challenge-agentic/src/sim.rs
  • crates/challenge-agentic/src/tools.rs
  • crates/challenge-agentic/src/types.rs
  • crates/challenge-ast/src/lib.rs
  • crates/challenge-ast/src/source_cheats.rs
  • crates/prism-challenge/src/orchestrator.rs
  • docs/PRISM.md
  • docs/PRISM_RECIPE.md
  • docs/external-miner/prism.md

📝 Walkthrough

Walkthrough

The PR adds AST detection for non-causal sequence mixing, integrates the finding into agentic simulator verdicts, classifies sub-1.0 BPB results, updates prompt rules, and documents the causal next-token contract.

Changes

Non-causal label-leak detection

Layer / File(s) Summary
AST source detector
crates/challenge-ast/src/source_cheats.rs, crates/challenge-ast/src/lib.rs
The AST crate detects unmasked sequence mixing, exposes the detector, integrates it into static source checks, and tests TokenMix, MixerBlock, and causal Transformer patterns.
Simulator verdict integration
crates/challenge-agentic/src/types.rs, crates/challenge-agentic/src/tools.rs, crates/challenge-agentic/src/lib.rs, crates/challenge-agentic/src/sim.rs
The simulator maps static-source findings and BPB values below 1.0 to NonCausalLabelLeak. The agentic crate exposes the detector and parses the new cheat-code strings.
Prism rules and contracts
crates/challenge-agentic/src/prompts.rs, crates/prism-challenge/src/orchestrator.rs, docs/PRISM.md, docs/PRISM_RECIPE.md, docs/external-miner/prism.md
Prompt versioning, orchestration documentation, and Prism contracts define non-causal label leakage and permitted causal mechanisms.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Submission
  participant static_source_cheat
  participant Simulator
  participant CheatCode
  Submission->>static_source_cheat: provide architecture and training sources
  static_source_cheat-->>Simulator: return source-cheat finding
  Simulator->>CheatCode: map non-causal finding to NonCausalLabelLeak
  Submission->>Simulator: provide evaluation metrics
  Simulator->>CheatCode: classify BPB below 1.0 as NonCausalLabelLeak
Loading

Possibly related PRs

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/prism-noncausal-label-leak

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant