gitwtfhub

wtf is jspace?

solarkyle/jspace — explained in plain English

Analysis updated 2026-05-18

48PythonAudience · researcherComplexity · 4/5LicenseSetup · easy

TL;DR

A preregistered research project testing whether internal LLM signals can predict wrong answers better than the model's own confidence, with mixed results.

Mindmap

mindmap
  root((jspace))
    What it does
      Reads internal model signals
      Predicts wrong answers
      Preregistered testing
    Tech stack
      Python
      LightGBM
      Gemma model
      Hugging Face data
    Use cases
      Hallucination research
      Reproducible experiments
      Confound detection
    Audience
      AI researchers
      Interpretability community
    Setup
      pip install deps
      Runs on CPU
      90 second reproduce script

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study whether internal model signals predict hallucinations better than output confidence scores.

REASON 2

Reproduce a preregistered machine learning research campaign on a laptop CPU in under two minutes.

REASON 3

Learn about the answer identity confound as a pitfall to check for in similar error-detection research.

REASON 4

Explore public trace and feature data from a 24,500-example hallucination detection campaign on Hugging Face.

What's in the stack?

PythonLightGBMGemmaHugging Face

How it stacks up

solarkyle/jspacedevelp10/rustinterviewquiestionsfukikomarga/exodus-fake-balance
Stars484848
LanguagePythonPythonPython
Setup difficultyeasymoderatemoderate
Complexity4/52/52/5
Audienceresearcherdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Reproducing the headline results needs only pip-installed dependencies and a CPU, no GPU required.

Scripts in this repository are MIT licensed, and free to use for any purpose, the underlying Jacobian lens method it builds on is Apache 2.0 licensed from Anthropic.

Wtf does this do

jspace is a research project that asks whether you can peek inside a large language model's internal workings to predict when it is about to give a wrong answer, rather than just trusting how confident the model sounds. The model under study is Google's Gemma 4, and the internal signal comes from a technique called the Jacobian lens, a way of reading activity inside the model as it processes a prompt. The README describes a large, carefully planned experiment covering over 25,000 prompts across 13 public test sets and six subject areas. Before looking at the results, the researchers wrote down exactly what would count as success or failure for each stage, a practice called preregistration, meant to keep the analysis honest. They trained a small classifier, a simple model that learns to sort things into categories, on these internal signals and found it predicted wrong answers better than the model's own stated confidence did, and this held up when tested on related but different datasets within the same type of task. However, when the frozen classifier was tested on five completely new, never-seen datasets, the results did not hold up as a universal rule. It kept working on question-answering tasks that involve looking up facts, but broke down on tasks that ask the model to judge whether a statement is true, sometimes even flipping direction. The researchers are upfront that they do not yet fully understand why this happens. A notable side finding is a methodological warning for anyone doing similar research. On test questions where the correct answer never changes, such as always answering yes to a certain type of question, this kind of internal signal probe can appear to detect errors extremely well while actually just reading which answer the model was already leaning toward, not genuinely detecting a mistake. The authors call this an answer identity confound and recommend that other researchers check for it in their own published results. The project includes a script that reproduces the main results on a normal computer in under two minutes using only a CPU, along with public data, reports, and code. The underlying Jacobian lens method credits Anthropic's research and is Apache 2.0 licensed, while the scripts written for this repository are MIT licensed.

Yoink these prompts

Prompt 1
Explain in simple terms what the Jacobian lens technique is measuring in this project.
Prompt 2
Walk me through running the 90 second reproduction script and what its output means.
Prompt 3
Help me understand why the classifier failed on veracity-judgment tasks but worked on retrieval tasks.
Prompt 4
Explain the answer identity confound this project found and how to check for it in my own research.
Prompt 5
Summarize the four preregistered gates in this campaign and what each one tested.

Frequently asked questions

wtf is jspace?

A preregistered research project testing whether internal LLM signals can predict wrong answers better than the model's own confidence, with mixed results.

What language is jspace written in?

Mainly Python. The stack also includes Python, LightGBM, Gemma.

What license does jspace use?

Scripts in this repository are MIT licensed, and free to use for any purpose, the underlying Jacobian lens method it builds on is Apache 2.0 licensed from Anthropic.

How hard is jspace to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is jspace for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.