SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.14617 · NeurIPS · 2025

The Hawthorne Effect in Reasoning Models: Evaluating and Steering Test Awareness

Sahar Abdelnabi, Ahmed Salem

arXiv · PDF · Open in the Atlas

Code that ran

1 of 4 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2505.14617.json · badge: /api/ran/2505.14617.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
microsoft/test_awareness_steering canonical (classifier label)
classifier basis: classifier_2025
1 ran · 3 no recorded run
FunctionStatusWhere it lives
extract_hidden_states_for_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/test_awareness_steering/scripts/getRepFromEvidence.py
code served (permissive licence) · get_code("d99dc919ca5d4947")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.vocab_size = 100
        self.pad_token_id = 0
    
    def __call__(self, texts, return_tensors=None, padding=False, truncation=False, add_special_tokens=False):
        # Simulate tokenization
        batch_size = len(texts)
        seq_len = 8
        input_ids = torch.randint(1, 50, (batch_size, seq_len))
        attention_mask = torch.ones(batch_size, seq_len)
        
        class TokenizerOutput:
            def __init__(self, input_ids, attention_mask):
                self.input_ids = input_ids
                self.attention_mask = attention_mask
        
        return TokenizerOutput(input_ids, attention_mask)
    
    def convert_tokens_to_ids(self, token):
        return 42

# Create a minimal model that outputs hidden states
class MinimalModel(nn.Module):
    def __init__(self, hidden_dim=4, num_layers=64):
        super().__init__()
        self.hidden_dim = hidden_dim
        self.num_layers = num_layers
        # Create learnable embeddings for each layer
        self.embeddings = nn.ModuleList([
            nn.Embedding(100, hidden_dim) for _ in range(num_layers)
        ])
    
    def forward(self, input_ids, attention_mask=None, output_hidden_states=False):
        batch_size, seq_len = input_ids.shape
        
        # Generate hidden states for each layer
        hidden_states_list = []
        for layer_idx in range(self.num_layers):
            # Create a hidden state tensor: (batch_size, seq_len, hidden_dim)
            layer_hidden = self.embeddings[layer_idx](input_ids)
            hidden_states_list.append(layer_hidden)
        
        class ModelOutput:
            def __init__(self, hidden_states):
                self.hidden_states = hidden_states
        
        return ModelOutput(hidden_states_list)

# Instantiate components
tokenizer = MinimalTokenizer()
model = MinimalModel(hidden_dim=4, num_layers=64)

# Create text and evidence data
text_and_evidence = [
    ("This is a test sentence", [(1, 3), (5, 6)]),
    ("Another example text here", [(2, 4)])
]

special_token = "[SPECIAL]"
layers = list(range(0, 64))
location = 'end'
modelName = 'test_model'

ARGS = {
    'text_and_evidence': text_and_evidence,
    'special_token': special_token,
    'tokenizer': tokenizer,
    'model': model,
    'layers': layers,
    'location': location,
    'modelName': modelName
}
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 3, 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
process_examples_actions Not yet run
unverified (harvested, no recorded run)
microsoft/test_awareness_steering/scripts/genOutputs_steered_batch.py
code served (permissive licence) · get_code("179a8bb834862104")
How it ran

no invocation recorded.

process_examples_triggers_dataset Not yet run
unverified (harvested, no recorded run)
microsoft/test_awareness_steering/scripts/genOutputs_steered_batch.py
code served (permissive licence) · get_code("aab19bcdae425568")
How it ran

no invocation recorded.

redirect_print_to_file Not yet run
unverified (harvested, no recorded run)
microsoft/test_awareness_steering/scripts/getRepFromEvidence.py
code served (permissive licence) · get_code("b03b145ea62bc2ac")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 4 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-24.

Repositories linked to this paper

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

Abstract

Reasoning-focused LLMs sometimes alter their behavior when they detect that they are being evaluated-which can lead them to optimize for test-passing performance or to comply more readily with harmful prompts if real-world consequences appear absent. We present the first quantitative study of how such "test awareness" impacts model behavior, particularly its performance on safety-related tasks 1 . We introduce a white-box probing framework that (i) linearly identifies awareness-related activations and (ii) steers models toward or away from test awareness while monitoring downstream performance. We apply our method to different state-of-the-art openweight reasoning LLMs across both realistic and hypothetical tasks (denoting tests or simulations). Our results demonstrate that test awareness significantly impacts safety alignment (such as compliance with harmful requests and conforming to stereotypes) with effects varying in both magnitude and direction across models. By providing control over this latent effect, our work aims to provide a stress-test mechanism and increase trust in how we perform safety evaluations. 1 We loosely use the term "aware" to refer to the mere perceived awareness based on the model's responses. We do not intend to anthropomorphize models by creating analogies to human awareness.

For agents

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

get_harvested_code_for_paper("2505.14617")
get_code_for_paper("2505.14617")
have("2505.14617")

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

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

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

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

Connect an agent — have() is free.