Views
No views yet
PHASE 1 RESEARCH ARTIFACT — detects model confidence, not factual correctnessThis model was trained on LLM hidden-state activations to produce an energy score that correlates with the model's output confidence (hallucination likelihood). It cannot verify whether a model's answer is factually correct — it can only signal how uncertain the model appears token-by-token.This limitation was confirmed in Exp 184/203: the energy scores reflect model confidence, not answer correctness. Do not use these scores as a correctness verifier.For production use, install the full Carnot pipeline:pip install carnot-ebmThe production pipeline includes FormalClaimVerifier (solver-routed formal claim verification), PBT code verification, and the Carnot MCP server. See Carnot on GitHub for documentation.
| Model | GSM8K Accuracy | 95% CI | N |
|---|---|---|---|
| Gemma4-E4B-it | 26.3% | [22.2%, 30.8%] | 400 |
| Qwen3.5-0.8B | 27.5% | [23.4%, 32.1%] | 400 |
results/experiment_316_fullscale_results.json for full details.⚠️ PHASE 1 RESEARCH ARTIFACTThis model detects output confidence (hallucination likelihood signals from LLM hidden-state activations), not correctness. It cannot verify whether a model's answer is right — it can only signal how uncertain the model appears token-by-token.For production use, install the full Carnot pipeline which includes FormalClaimVerifier (solver-routed formal claim verification), PBT code verification (property-based testing on 164-problem HumanEval), process integrity detection (right-for-wrong-reasons), and the Carnot MCP server:pip install carnot-ebmSee Carnot on GitHub for documentation and the full production API.
Note: These are Phase 1 research artifacts — per-token activation EBMs that detect hallucination confidence signals from LLM hidden states. For production use of the full Carnot EBM framework (constraint verification, guided decoding, energy-based repair), see:pip install carnot-ebmSource and documentation: https://github.com/Carnot-EBM/carnot-ebm
Important: Research Artifact, Not a Production DetectorThis model achieves 83.4% on held-out TruthfulQA test sets, but in practical deployment (8 real questions), activation-based EBMs agreed with ground truth only 50% of the time. The EBM detects model confidence, not correctness — confident hallucinations get low energy (look fine) while correct-but-hedging answers get flagged.This model is a research artifact documenting activation-space structure. It is NOT a reliable hallucination detector for production use.For practical verification, use structural constraints (test execution, SAT solving) rather than activation analysis. See the Carnot technical report for 41 experiments and 14 principles learned.
| Metric | Value |
|---|---|
| Test accuracy | 83.4% |
| Energy gap | 3.2692 |
| Source model | Qwen/Qwen3-0.6B |
| Thinking mode | N/A (base model) |
| Training tokens | 26,800 |
| Architecture | Gibbs [1024 → 256 → 64 → 1], SiLU |
1from safetensors.numpy import load_file
2import jax.numpy as jnp
3import jax.random as jrandom
4from carnot.models.gibbs import GibbsConfig, GibbsModel
5
6# Load weights
7weights = load_file("per-token-ebm-qwen3-06b/model.safetensors")
8config = GibbsConfig(input_dim=1024, hidden_dims=[256, 64], activation="silu")
9ebm = GibbsModel(config, key=jrandom.PRNGKey(0))
10
11# Set weights
12ebm.layers = [
13 (jnp.array(weights["layer_0_weight"]), jnp.array(weights["layer_0_bias"])),
14 (jnp.array(weights["layer_1_weight"]), jnp.array(weights["layer_1_bias"])),
15]
16ebm.output_weight = jnp.array(weights["output_weight"])
17ebm.output_bias = jnp.array(weights["output_bias"])
18
19# Score an activation vector (from Qwen/Qwen3-0.6B hidden states)
20energy = float(ebm.energy(activation_vector))
21# Low energy = likely correct, high energy = likely hallucinationpip install carnot-ebm.| Capability | What it does | Evidence |
|---|---|---|
| FormalClaimVerifier | Solver-routed formal claim verification: arithmetic, boolean-entailment, set-membership, execution-oracle, cardinality, comparison routes | 1,243 solver-routable rows from live GSM8K + HumanEval traces (Exp 244/246) |
| PBT code verification | Property-based testing (Hypothesis) catches bugs that official test suites miss | +3.0pp on 164-problem HumanEval with Gemma4-E4B-it (Exp 226); 2 official-test misses caught on Qwen3.5-0.8B (Exp 227) |
| Process integrity detection | Detects right-for-wrong-reasons answers where the output is correct but the reasoning process is invalid | 5 right-for-wrong-reasons cases caught across 30-case HumanEval cohort (Exp 251) |
| Carnot MCP server | Exposes verify_code_with_pbt and 6 other tools to any MCP-compatible agent | 7 discoverable tools, 30s timeout, 10K input guard (VERIFY-031) |
pip install carnot-ebm