SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.13846 · 2026

Beyond Static Personas: Situational Personality Steering for Large Language Models

Yang Deng, Zilei Wang, Mengxiang Li, Zesheng Wei

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 1 honoured the contract we drafted, 0 violated it and 0 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/2604.13846.json · badge: /api/ran/2604.13846.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
gradio-app/gradio canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
cache_hash Ran
ran; our contract draft was wrong, not the code
gradio-app/gradio/gradio/caching.py
code served (permissive licence) · get_code("1c128c3d8131d7bc")
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.

import hashlib
from typing import Any
import numpy as np
import pandas as pd
from PIL import Image
from pydantic import BaseModel


# Test with various types
ARGS = {
    "obj": {
        "none_val": None,
        "bool_val": True,
        "int_val": 42,
        "float_val": 3.14,
        "str_val": "hello",
        "bytes_val": b"test_bytes",
        "list_val": [1, 2, 3],
        "tuple_val": (4, 5, 6),
        "dict_val": {"key1": "value1", "key2": 42},
        "set_val": {7, 8, 9},
        "numpy_array": np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32),
        "pil_image": Image.new("RGB", (4, 3), color=(255, 0, 0)),
        "dataframe": pd.DataFrame({
            "col_a": [1, 2, 3],
            "col_b": ["x", "y", "z"]
        }),
        "series": pd.Series([10, 20, 30], name="test_series"),
        "pydantic_model": type("TestModel", (BaseModel,), {"field1": (str, "test"), "__annotations__": {"field1": str}})(),
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, pandas, pydantic — 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
extract_class_source_code Ran
ran; our contract draft was wrong, not the code
gradio-app/gradio/gradio/component_meta.py
code served (permissive licence) · get_code("54ad2ea2d3bbcc9a")
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 tuple, 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 ast

# Construct a valid code string containing a class definition
code = '''
class MyTestClass:
    """A simple test class."""
    def __init__(self):
        self.value = 42
    
    def method(self):
        return self.value * 2

class AnotherClass:
    pass
'''

class_name = "MyTestClass"

ARGS = {
    "code": code,
    "class_name": class_name,
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_block_name Ran
ran; our contract draft was wrong, not the code
gradio-app/gradio/gradio/analytics.py
code served (permissive licence) · get_code("026928ca5ca8a342")
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.

class Matrix:
    pass

class CustomComponent:
    pass

ARGS = {
    "class_name": Matrix
}
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 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
nearest_adts_rate Ran
ran, honoured the contract we drafted
gradio-app/gradio/gradio/audio_stream_encoder.py
code served (permissive licence) · get_code("4977821c97e1b933")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

ARGS = {
    "sample_rate": 44050
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
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
parse_adts_frames Ran
ran; our contract draft was wrong, not the code
gradio-app/gradio/gradio/audio_stream_encoder.py
code served (permissive licence) · get_code("b625cf3ffe5a4eef")
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 tuple. 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 torch
import numpy as np

# Construct valid ADTS frame data with proper headers
# ADTS frame format:
# - Bytes 0-1: Sync word (0xFFF, 12 bits all 1s)
# - Byte 3 bits 0-1: Frame length (part 1, 2 bits)
# - Byte 4: Frame length (part 2, 8 bits)
# - Byte 5 bits 5-7: Frame length (part 3, 3 bits)

def create_adts_frame(frame_number=1):
    """Create a minimal valid ADTS frame."""
    # Minimal ADTS frame is 7 bytes
    frame = bytearray(10)
    
    # Sync word: 0xFF 0xF0 (first 12 bits are 1)
    frame[0] = 0xFF
    frame[1] = 0xF0
    
    # Set some reasonable header bits
    frame[2] = 0x00
    
    # Frame length encoding (10 bytes total in this case)
    # Length is encoded across bytes 3, 4, 5
    length = 10
    frame[3] = (frame[3] & 0xFC) | ((length >> 11) & 0x03)  # 2 MSBs of length
    frame[4] = (length >> 3) & 0xFF  # 8 bits of length
    frame[5] = (frame[5] & 0x1F) | ((length & 0x07) << 5)  # 3 LSBs of length
    
    frame[6] = 0x00
    frame[7] = 0x00
    frame[8] = 0x00
    frame[9] = 0x00
    
    return bytes(frame)

# Create test data with multiple ADTS frames
frame1 = create_adts_frame(1)
frame2 = create_adts_frame(2)

# Combine frames into a single byte buffer
data = frame1 + frame2

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
updateable Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gradio-app/gradio/gradio/component_meta.py
code served (permissive licence) · get_code("f7e393093dd71b6d")
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 function. 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 inspect
from functools import wraps
from unittest.mock import MagicMock, patch

def get_local_contexts():
    from gradio.context import LocalContext
    return (LocalContext.in_event_listener.get(False), LocalContext.renderable.get(None) is not None)

def updateable(fn):

    @wraps(fn)
    def wrapper(*args, **kwargs):
        fn_args = inspect.getfullargspec(fn).args
        self = args[0]
        initialized_before = hasattr(self, '_constructor_args')
        if not initialized_before:
            self._constructor_args = []
        for i, arg in enumerate(args):
            if i == 0 or i >= len(fn_args):
                continue
            arg_name = fn_args[i]
            kwargs[arg_name] = arg
        self._constructor_args.append(kwargs)
        in_event_listener, is_render = get_local_contexts()
        if in_event_listener and initialized_before and (not is_render):
            return None
        else:
            return fn(self, **kwargs)
    return wrapper


class MockSelf:
    pass


def mock_function(self, arg1=None, arg2=None):
    """Mock decorated function for testing."""
    return {"arg1": arg1, "arg2": arg2}


decorated_fn = updateable(mock_function)

ARGS = {
    "fn": mock_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gradio — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
resolve_generator Not yet run
unverified (harvested, no recorded run)
gradio-app/gradio/gradio/caching.py
code served (permissive licence) · get_code("7e6b9106505ae9c7")
How it ran

no invocation recorded.

Also present in other papers' code

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

Personalized Large Language Models (LLMs) facilitate more natural, human-like interactions in human-centric applications. However, existing personalization methods are constrained by limited controllability and high resource demands. Furthermore, their reliance on static personality modeling restricts adaptability across varying situations. To address these limitations, we first demonstrate the existence of situation-dependency and consistent situation-behavior patterns within LLM personalities through a multi-perspective analysis of persona neurons. Building on these insights, we propose IRIS, a training-free, neuron-based Identify-Retrieve-Steer framework for advanced situational personality steering. Our approach comprises situational persona neuron identification, situation-aware neuron retrieval, and similarity-weighted steering. We empirically validate our framework on PERSONALITYBENCH and our newly introduced SPBench, a comprehensive situational personality benchmark. Experimental results show that our method surpasses bestperforming baselines, demonstrating IRIS's generalization and robustness to complex, unseen situations and different models architecture.

For agents

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

get_harvested_code_for_paper("2604.13846")
get_code_for_paper("2604.13846")
have("2604.13846")

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

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

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

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

Connect an agent — have() is free.