API referenceΒΆ

Auto-generated from the package docstrings. Each class and function appears once, under its canonical module. For the flatter top-level names (rhscope.HackMonitor, rhscope.DoMProbe, etc.) see the API overview or rhscope/__init__.py.

rhscope.monitor

User-facing monitor object.

rhscope.probes.base

Abstract base class for reward-hacking probes.

rhscope.probes.dom

Difference-of-means (DoM) probe.

rhscope.probes.logistic

L2-regularized logistic regression probe over pooled activations.

rhscope.probes.mlp

Shallow MLP probe for cases where the hacking concept is not linearly separable.

rhscope.probes.online

Streaming DoM probe fit incrementally with partial_fit() updates.

rhscope.probes.tokens

Token-level probe scoring - localise reward hacking inside a response.

rhscope.bench.compare

Head-to-head detector comparison.

rhscope.bench.curation

Curate HackExample subsets from an RHDetectBench.

rhscope.bench.detectors

Detector interface and baseline implementations.

rhscope.bench.leaderboard

Multi-probe benchmark runner.

rhscope.bench.ref_delta

Reference-model delta detector for reward hacking.

rhscope.bench.result

Benchmark result container.

rhscope.bench.rhdetect

RH-Detect benchmark runner.

rhscope.research.evasion

Evasion detection via probe-subspace drift.

rhscope.integrations.base

Backend-agnostic monitor-penalty primitive.

rhscope.integrations.dpo

Offline monitor scoring for DPO-style preference datasets.

rhscope.integrations.sinks

Metric sinks.

rhscope.integrations.trl

TRL integration - monitor-driven reward penalty for rollout-based RL.

rhscope.integrations.verl

verl integration - reward-model adapter for the second major RLHF framework.

rhscope.training.data

Data types and loaders for probe training.

rhscope.training.layer_select

Layer-candidate selection for probe training.

rhscope.training.trainer

Probe training orchestration.

rhscope.envs.base

Abstract hacking-environment interface + registry.

rhscope.envs.code_shortcut

Code-shortcut environment - the first concrete hacking environment.

rhscope.recipes.config

Recipe configuration schema.

rhscope.recipes.grpo

GRPO recipe runner - model-agnostic.

rhscope.recipes.probe_grid

Grid trainer for the pre-trained probe matrix.

rhscope.recipes.run

Module entry point for python -m rhscope.recipes.run.

rhscope.activations

Activation extraction from causal language models.

rhscope.hub

Hugging Face Hub helpers for probe artifacts.

rhscope.io

Low-level I/O for probe artifacts.

rhscope.metadata

Metadata model for probe artifacts.

rhscope.metrics

Metric primitives used throughout rhscope.

rhscope.model_card

Hugging Face model-card rendering for probe artifacts.

rhscope.sandbox

Code sandbox for evaluating untrusted Python snippets.

rhscope.cli

Command-line interface.