SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.15456 · NeurIPS · 2025

Teaching Language Models to Evolve with Users: Dynamic Profile Modeling for Personalized Alignment

Ting Liu, Yanyan Zhao, Bing Qin, Weixiang Zhao, Jiahe Guo, Yulin Hu, Xingyu Sui, Haixiao Liu, Biye Li

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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 1 has no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-24; 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.15456.json · badge: /api/ran/2505.15456.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
XingYuSSS/RLPA canonical (classifier label)
classifier basis not recorded on the link
4 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_approx_kl Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XingYuSSS/RLPA/openrlhf/models/utils.py
code served (permissive licence) · get_code("95084b4b49902e3d")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# Create small log probability tensors
batch_size = 2
num_actions = 4

log_probs = torch.randn(batch_size, num_actions)
log_probs_base = torch.randn(batch_size, num_actions)

# Create action mask (optional)
action_mask = torch.ones(batch_size, num_actions)

# Set kl_estimator to one of the valid options
kl_estimator = 'k1'

ARGS = {
    'log_probs': log_probs,
    'log_probs_base': log_probs_base,
    'action_mask': action_mask,
    'kl_estimator': kl_estimator
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
extract_profile_response Ran
ran on a synthesized input
XingYuSSS/RLPA/scirpts/multi_turn_rfn.py
code served (permissive licence) · get_code("b865f2e32571acf0")
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 re

def extract_profile_response(response: str):
    profile_pattern = '<profile>\\n(.*?)</profile>\\n\\n<response>\\n(.*?)</response>'
    match = re.search(profile_pattern, response, re.DOTALL)
    if match:
        profile = match.group(1)
        response = match.group(2)
        return (profile, response)
    else:
        return (None, response)


# Test case 1: response with both profile and response sections
response_with_both = """<profile>
user_name: John Doe
age: 30
</profile>

<response>
This is the response text.
</response>"""

# Test case 2: response without profile section
response_without_profile = """This is just a response without the profile section."""

# Test case 3: response with incomplete formatting
response_incomplete = """<profile>
some profile data
</profile>
incomplete response"""

ARGS = {
    "response": response_with_both
}
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
log_probs_from_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XingYuSSS/RLPA/openrlhf/models/utils.py
code served (permissive licence) · get_code("75afa2affd2a8e36")
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 Tensor, ndim 2, dtype family float, shape (2, 3) 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
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for testing
# logits: shape (batch_size, seq_len, vocab_size) = (2, 3, 4)
# labels: shape (batch_size, seq_len) = (2, 3)
batch_size = 2
seq_len = 3
vocab_size = 4

logits = torch.randn(batch_size, seq_len, vocab_size, dtype=torch.float32)
labels = torch.randint(0, vocab_size, (batch_size, seq_len), dtype=torch.long)
temperature = 1.0

ARGS = {
    "logits": logits,
    "labels": labels,
    "temperature": temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flash_attn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
strip_sequence Ran
ran; our contract draft was wrong, not the code
XingYuSSS/RLPA/openrlhf/cli/serve_rm.py
code served (permissive licence) · get_code("ca3514c46a1261d7")
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 re

def strip_sequence(text, pad_token, eos_token):
    pad_token_escaped = re.escape(pad_token)
    eos_token_escaped = re.escape(eos_token)
    pattern = f'^({eos_token_escaped}|{pad_token_escaped})+'
    text = re.sub(pattern, '', text)
    pattern = f'({eos_token_escaped}|{pad_token_escaped})+$'
    text = re.sub(pattern, '', text)
    return text

ARGS = {
    'text': '[PAD][EOS]hello world[PAD][EOS]',
    'pad_token': '[PAD]',
    'eos_token': '[EOS]'
}
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
compute_reward Not yet run
unverified (harvested, no recorded run)
XingYuSSS/RLPA/openrlhf/models/utils.py
code served (permissive licence) · get_code("0d27f3b8c425d79f")
How it ran

no invocation recorded.

convert_ring_attn_params Not yet run
unverified (harvested, no recorded run)
XingYuSSS/RLPA/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("d66f259aaf6cd9c7")
How it ran

no invocation recorded.

pad_sequences Not yet run
unverified (harvested, no recorded run)
XingYuSSS/RLPA/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("b26627fa753393a8")
How it ran

no invocation recorded.

reset_ring_attn_position_ids Not yet run
unverified (harvested, no recorded run)
XingYuSSS/RLPA/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("e93117d99aa6b210")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 1 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.

FunctionAlso present inEarliest-datedOthers named
reset_ring_attn_position_ids 15 other papers
10 dated earlier, 5 later
2306.00398 (2023-06)
Preference-grounded Token-level Guidance for Language Model Fine-tuning
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2404.18922 (2024-04)
DPO Meets PPO: Reinforced Token Optimization for RLHF
and 12 more not named here
convert_ring_attn_params 9 other papers
8 dated earlier, 1 later
2306.00398 (2023-06)
Preference-grounded Token-level Guidance for Language Model Fine-tuning
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2404.18922 (2024-04)
DPO Meets PPO: Reinforced Token Optimization for RLHF
and 6 more not named here
compute_reward 6 other papers
3 dated earlier, 3 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2504.08837 (2025-04)
VL-Rethinker: Incentivizing Self-Reflection of Vision-Language Models with Reinforcement Learning
and 3 more not named here
strip_sequence 5 other papers
4 dated earlier, 1 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2502.03373 (2025-02)
Demystifying Long Chain-of-Thought Reasoning in LLMs
2502.18968 (2025-02)
Know You First and Be You Better: Modeling Human-Like User Simulators via Implicit Profiles
and 2 more not named here
compute_approx_kl 4 other papers
2 dated earlier, 2 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2506.08011 (2025-06)
Play to Generalize: Learning to Reason Through Game Play
and 1 more not named here
log_probs_from_logits 4 other papers
2 dated earlier, 2 later
2502.14768 (2025-02)
Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2603.22352 (2026-03)
WIST: Web-Grounded Iterative Self-Play Tree for Domain-Targeted Reasoning Improvement
and 1 more not named here
pad_sequences 4 other papers
2 dated earlier, 2 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2506.08011 (2025-06)
Play to Generalize: Learning to Reason Through Game Play
and 1 more not named here

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

Personalized alignment is essential for enabling large language models (LLMs) to engage effectively in user-centric dialogue. While recent prompt-based and offline optimization methods offer preliminary solutions, they fall short in coldstart scenarios and long-term personalization due to their inherently static and shallow designs. In this work, we introduce the Reinforcement Learning for Personalized Alignment (RLPA) framework, in which an LLM interacts with a simulated user model to iteratively infer and refine user profiles through dialogue. The training process is guided by a dual-level reward structure: the Profile Reward encourages accurate construction of user representations, while the Response Reward incentivizes generation of responses consistent with the inferred profile. We instantiate RLPA by fine-tuning Qwen-2.5-3B-Instruct, resulting in Qwen-RLPA, which achieves state-of-the-art performance in personalized dialogue. Empirical evaluations demonstrate that Qwen-RLPA consistently outperforms prompting and offline fine-tuning baselines, and even surpasses advanced commercial models such as Claude-3.5 and GPT-4o. Further analysis highlights Qwen-RLPA's robustness in reconciling conflicting user preferences, sustaining long-term personalization and delivering more efficient inference compared to recent reasoning-focused LLMs. These results emphasize the potential of dynamic profile inference as a more effective paradigm for building personalized dialogue systems. Our code is available at: https://github.com/XingYuSSS/RLPA.

For agents

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

get_harvested_code_for_paper("2505.15456")
get_code_for_paper("2505.15456")
have("2505.15456")

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

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

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

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

Connect an agent — have() is free.