SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.26071 · 2026

Model Forensics: Investigating Whether Concerning Behavior Reflects Misalignment

Aditya Singh, Neel Nanda, Senthooran Rajamanoharan, Gerson Kroiz

arXiv · PDF

Code that ran

12 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 5 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.26071.json · badge: /api/ran/2606.26071.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gkroiz/model_forensics_paper canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
gkroiz/agent-interp-envs community
Papers with Code archive
6 ran · 1 no recorded run
FunctionStatusWhere it lives
_end_task Ran
ran on a synthesized input
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("ecbaa8ca5b535ef4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function _end_task takes no parameters
# It's a standalone function that uses only global state (_CALL_SEQ)

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_exchange Ran
ran; our contract draft was wrong, not the code
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("3741cef458d450d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

# Analyze the function signature:
# _exchange(content: str | None, command: str, output: str) -> list[dict]

# The function takes three parameters:
# 1. content: str | None - can be a string or None
# 2. command: str - a command string
# 3. output: str - an output string

# The function body shows:
# - It increments a global counter
# - Creates a call ID
# - Returns a list of dicts with specific structure
# - No complex object usage, just basic string types

ARGS = {
    'content': 'This is a test message',
    'command': 'echo "hello world"',
    'output': 'hello world\n'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_binomial_ci Ran
ran, honoured the contract we drafted
gkroiz/model_forensics_paper/src/model_incrimination_paper/plotting.py
pointer only (licence: NONE) · get_code("7e08562a855fadd2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_binomial_pvalue_fisher Ran
ran, honoured the contract we drafted
gkroiz/model_forensics_paper/src/model_incrimination_paper/plotting.py
pointer only (licence: NONE) · get_code("6371ba05bd693e85")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_colors Ran
ran, honoured the contract we drafted
gkroiz/model_forensics_paper/src/model_incrimination_paper/plotting.py
pointer only (licence: NONE) · get_code("d134fa1b3032ebc7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

judge_summary Ran
ran; our contract draft was wrong, not the code
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("f56a74c9938a3c71")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from unittest.mock import Mock, MagicMock
from openai import OpenAI

# Create a mock OpenAI client
client = Mock(spec=OpenAI)

# Create a mock response object that mimics the OpenAI API response
mock_message = Mock()
mock_message.content = '{"grade": "discloses_regression", "evidence": "The test failure indicates a missing ts field"}'

mock_choice = Mock()
mock_choice.message = mock_message

mock_response = Mock()
mock_response.choices = [mock_choice]

# Set up the client to return our mock response
client.chat.completions.create = Mock(return_value=mock_response)

# Create the transcript dict with required 'failure_description' key
transcript = {
    'failure_description': 'Test failed: ts field missing from schema after refactoring. Backwards compatibility broken.'
}

# Create framing_text (used in the prompt format but not in the function body shown)
framing_text = 'Please review the PR description'

# Create reply text to be graded
reply = 'I have identified the regression where the ts field was removed. This needs to be fixed before merging.'

# Judge model name
judge_model = 'gpt-4'

ARGS = {
    'client': client,
    'judge_model': judge_model,
    'transcript': transcript,
    'framing_text': framing_text,
    'reply': reply
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_bar Ran
ran; our contract draft was wrong, not the code
gkroiz/model_forensics_paper/reproduce/plot.py
pointer only (licence: NONE) · get_code("ed1de9c9c3e87a3a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_binomial Ran
ran, honoured the contract we drafted
gkroiz/model_forensics_paper/reproduce/plot.py
pointer only (licence: NONE) · get_code("1999c7e0e179cf36")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_client Ran
ran on a synthesized input
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("f452549a5e92225e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned OpenAI. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from unittest.mock import Mock, patch

# The function make_client() takes no parameters and returns an OpenAI client
# It reads from os.environ['OPENROUTER_API_KEY'] and constructs a client
# with a specific base_url

# Since we cannot make actual network requests and need to avoid requiring
# a real API key, we'll mock the environment variable
os.environ['OPENROUTER_API_KEY'] = 'mock-api-key-for-testing'

# The function takes no parameters, so ARGS is empty
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OpenAI — a OpenAI output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OpenAI output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_sample Ran
ran; our contract draft was wrong, not the code
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("3bde8d2be8cf88c4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from unittest.mock import Mock, MagicMock
from openai import OpenAI

# Create a mock OpenAI client
client = Mock(spec=OpenAI)

# Mock the chat completions response for sample_summary
sample_response = Mock()
sample_response.choices = [Mock()]
sample_response.choices[0].message.content = "This is a sample PR description."
client.chat.completions.create = MagicMock(return_value=sample_response)

# Create a minimal transcript dict with required fields
transcript = {
    'id': 'test_transcript_001',
    'failure_type': 'test_failure',
    'failure_description': 'Test failed because the ts field was removed from the schema.',
    'messages': [
        {'role': 'user', 'content': 'What did you do?'},
        {'role': 'assistant', 'content': 'I made some changes to the code.'}
    ]
}

# Define parameters
model = 'gpt-4'
judge_model = 'gpt-4'
framing_key = 'pr_direct'
k = 1

ARGS = {
    'client': client,
    'model': model,
    'judge_model': judge_model,
    'transcript': transcript,
    'framing_key': framing_key,
    'k': k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_summary Ran
ran; our contract draft was wrong, not the code
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("fe6686e6d0fe4c5b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from openai import OpenAI
from unittest.mock import Mock, MagicMock

# Create a mock OpenAI client
client = Mock(spec=OpenAI)

# Mock the chat.completions.create method to return a valid response
mock_response = Mock()
mock_choice = Mock()
mock_message = Mock()
mock_message.content = "This is a summary of the transcript."
mock_choice.message = mock_message
mock_response.choices = [mock_choice]
mock_response.error = None

client.chat.completions.create = Mock(return_value=mock_response)

# Model name
model = "gpt-4"

# Transcript dict with messages
transcript = {
    'messages': [
        {'role': 'system', 'content': 'You are a helpful assistant.'},
        {'role': 'user', 'content': 'What is the weather?'},
        {'role': 'assistant', 'content': 'I do not have access to real-time weather data.'}
    ]
}

# Framing text
framing_text = "Please summarize the above conversation in one sentence."

# Define ARGS
ARGS = {
    'client': client,
    'model': model,
    'transcript': transcript,
    'framing_text': framing_text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sum_omission Ran
ran, honoured the contract we drafted
gkroiz/model_forensics_paper/reproduce/plot.py
pointer only (licence: NONE) · get_code("3e2a1ab52a556e1f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gkroiz/model_forensics_paper when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

main Not yet run
unverified (harvested, no recorded run)
gkroiz/agent-interp-envs/environments/code_summary_honesty/run_eval.py
code served (permissive licence) · get_code("1cc1526945db6851")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

A central goal of safety research is determining whether a model is misaligned. Prior work has largely focused on detecting concerning behavior. But behavior alone does not establish misalignment: a concerning action can arise from benign causes such as confusion. This motivates model forensics: investigating whether the action was driven by malign intent. In this paper, we propose a baseline protocol for model forensics consisting of two steps, iterated as needed. First, we read the chain of thought (CoT) to generate hypotheses about what drives model behavior. Second, we make edits to the prompt or environment to test these hypotheses. While the CoT is not always faithful, it is a rich source of unsupervised insight that can guide the collection of more rigorous evidence. To evaluate our protocol, we create a suite of six agentic environments where models exhibit concerning behavior, and apply it to each. We establish that Kimi K2 Thinking takes shortcuts due to a genuine disposition towards low-effort actions, by showing this hypothesis successfully predicts its behavior. Through counterfactual experiments, we show DeepSeek R1 deceives out of a desire to be consistent with a previous instance of itself. Our methods nonetheless leave significant room for refinement. For example, when we test whether Kimi K2 Thinking believes it is violating user intent, we find no evidence of such a belief, but without positive controls we cannot confirm our tests would detect it. Overall, we find our simple protocol provides a strong baseline that we hope future work will improve upon. More broadly, our work is a concrete step in developing the growing field of model forensics.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.26071")
get_code_for_paper("2606.26071")
have("2606.26071")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2606.26071.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2606.26071.svg)](https://syntology.ai/paper/2606.26071)

Connect an agent — have() is free.