KuaFu-Credit

Turn-level credit assignment for lifelong memory.

* Equal contribution

arXiv:2612.01942

FORWARD
Score each turn
00Build01Update02Update03Refine
A₀A₁A₂A₃
CREDIT
Assign credit
+3.0pp

Incremental user-memory evaluation

+Cur vs SFT · 78.80% → 81.80%
84.4%

WebShop · 7B success rate

GiGPO 82.8% → ours 84.4% · +1.6 pp
Turn × Object

Finer-grained credit assignment

Turn-level advantages support object-level span credit
01 / THE PROBLEM

Memory grows.
Credit should follow.

Lifelong user memory turns noisy, multi-domain implicit behavior into traceable facts and structured memory objects, rather than simply recalling explicit conversations. As new facts arrive, the L2 memory-building policy must continually update what it knows.

01

One score, many turns.

A trajectory-level reward is broadcast to every turn. The training signal cannot distinguish what an individual turn changed or how much it contributed.

02

A moving measuring stick.

The input fact set changes from turn to turn. A score may drop even when memory stays unchanged; a raw difference can therefore mix real updates with a changing evaluation target.

03

Quality ≠ compliance.

Collapsing quality and penalties into one scalar can hide real improvements and even encourage writing less to avoid penalties.

AbstractRead the abstract +

Understanding users underpins advertising, recommendation, and commercial agents, yet implicit behavior across videos, articles, and conversions is noisy and difficult to reuse. Lifelong user memory refines this behavior stream (L0) into traceable facts (L1), then aggregates them across windows into structured episodic memory objects (L2). Incremental construction is a long-horizon, multi-turn decision problem. A single trajectory-level GRPO reward cannot distinguish each turn's contribution, isolate the effects of inherited memory, or disentangle quality from penalties.

KuaFu-Credit decomposes each turn's advantage into a trajectory-level baseline and separate quality and penalty differences. For quality channels with changing L1 anchors, it re-evaluates old L2 on the current input to isolate the update's controllable increment. Per-axis normalization aligns the signal scales, and a γp curriculum gradually strengthens penalties to mitigate empty-memory collapse. Span credit further supports attribution to individual updated memory objects.

Experiments start from an SFT-aligned Qwen3.5-4B memory policy and ablate turn-level differencing, axis decoupling, and the penalty curriculum, with ProxMO as an external comparison. The value of credit assignment depends on task length: the base method leads at T=5–7, while the curriculum variant improves key retention on longer tasks and leads across reward, quality, and retention at T=9. Incremental evaluation improves over SFT by 1.8 pp for KuaFu-Credit and 3.0 pp for +Cur; removing axis decoupling instead loses 0.7 pp.

Figure 1: existing user-understanding paradigms; the L0-to-L3 lifelong-memory system; and KuaFu-Credit rollouts, separate quality and penalty scoring, turn-level advantages, and policy updates.
FIGURE 1 / LIFELONG MEMORY & CREDIT ASSIGNMENT (a) Traditional search, advertising, and recommendation rely on implicit behavior, while conversational memory targets explicit self-reports and detail retrieval. (b) L0 behavior becomes traceable L1 facts, five-dimensional L2 episodic memory, and a consolidated L3 profile for reuse across tasks. The pentagon illustrates memory structure, not radar-chart measurements. (c) One policy samples multiple rollouts; an independent evaluator records CSQ/CSP scores, and KuaFu-Credit assigns turn-level advantages for policy updates. Four rollouts and five turns are illustrative, not the separate eight-candidate, four-turn numerical demo below. Signal colors and ledger labels are schematic, not numerical advantage values. Open full figure ↗
02 / FOLLOW THE CREDIT

Watch the signal.
Understand the math.

Follow the signal along the timeline. Each stop reveals its computation: complete the rollout first, then assign credit back to each turn. The return order is a storytelling device, not an advantage recurrence.

FORWARD ROLLOUTSynthetic example · not a training log
01 / 13
SELECTED TRAJECTORYSame user · Candidate 1 / 8
TURN 0 · ScoreArrived · inspect this node
Forward scoring and credit assignment animation Four memory updates with separate quality and penalty scores. Re-evaluate old memory on the same input, normalize terminal scores across candidates, and compose each turn's advantage. FORWARD · L1 → GENERATE → MERGE → SCORE RETURN CREDIT · NOT A RECURSIVE ADVANTAGE ESTIMATE base group z Terminal scores 8 candidates
CSQ · Quality qCSP · Penalty pCredit · Advantage AReady to start
TURN 0Inside this nodeWill write q₀ / p₀ / r₀
Compare candidates at the same turnColumns: 8 candidates · rows: turns

Forward pass: collect q / p at each turn. The terminal baseline has not been computed yet.

Select a step or node to inspect it. The default walkthrough takes about 70 seconds: it starts when this section enters view, pauses when you leave, and resumes on return. Pause or slow it down to read details; a manual pause is never overridden. Reduced-motion mode disables autoplay by default.

THE CORE IDEA
At = base + γq z(Δqt) − γp z(Δpt)
Trajectory-level directionThis turn's quality incrementThis turn's penalty change
03 / TRAINING FRAMEWORK

From alignment to
fine-grained learning.

SFT first aligns turn-by-turn understanding; dual-axis counterfactual-difference RL then learns finer credit assignment. The interactive timeline breaks down the calculations, while the diagram below shows the complete training framework.

Two-stage training: teacher turn-level supervision and student SFT, followed by RL with dual-axis terminal normalization, counterfactual differences, same-turn normalization, and credit assignment.
SFT → DUAL-AXIS RLTwo-stage training: SFT task alignment → dual-axis counterfactual-difference RL. Four candidates are drawn for illustration; training uses eight.Open full figure ↗
04 / THREE DESIGN CHOICES

Finer credit.
Less noise.

Δ

The same input.
A fair comparison.

Evaluate old and new L2 against the same current L1. Changing-input channels then measure what this update actually added, rather than comparing scores from different evaluation targets.

Δqcf,t = q(L2new, L1t)
− q(L2old, L1t)
Fixed-anchor and L2-only quality components retain raw differences.
q / p

Two axes.
One clear signal.

Normalize each axis before composing the advantage. A large raw quality scale should not silently overwhelm the signal from structural violations.

Quality + z(Δq)Penalty − z(Δp)
z-score statistics come from candidates at the same turn.
γp

Explore first.
Then tighten.

Use weaker penalties early to allow memory-building exploration, then gradually restore their weight to constrain violations over longer trajectories.

0.27
1.00
The curriculum changes the penalty bridge weight, not the inputs.
Why use a counterfactual?An unchanged-memory example +
Previous turn4 / 5 = 0.80

Four of five key facts are covered.

Current turn · unchanged memory4 / 8 = 0.50

The input grows to eight facts; old memory still covers four.

Re-score on the same input0.50 − 0.50 = 0

Raw difference: −0.30. The actual update increment is zero.

This illustrates changing-input coverage only, not the full weighted key_ret_po metric or total quality score.

05 / RESULTS

Better memory.
Beyond memory.

From incremental user memory to multi-turn WebShop decisions. Main-task performance, difficulty segments, and cross-domain generalization are reported separately, with their respective comparison baselines.

LIFELONG USER MEMORY

Not just a higher reward.
A better downstream score.

The dual-axis method improves over SFT by 1.8 pp, and the curriculum variant reaches +3.0 pp. Removing axis decoupling instead puts end-to-end performance below the starting point.

78.80%→81.80%
SFT → KuaFu-Credit + Cur
Best incremental-evaluation score in each experiment
Method Score vs SFT
SFT baseline 0.7880 —
GRPO w/o Diff 0.7951 +0.7 pp
w/o dual axes 0.7810 −0.7 pp
ProxMO 0.8000 +1.2 pp
KuaFu-Credit 0.8060 +1.8 pp
KuaFu-Credit + Cur 0.8180 +3.0 pp

Internal benchmark: 50 users, 10 ground-truth anchors per user, and 12 checks evaluated by a Qwen3.8-27B judge. These are not scores from uniformly selected final checkpoints.

Total reward, quality, key retention, key coverage, penalties, and structural consistency for five credit-assignment methods at T=3–9.
DIFFICULTY MATTERSThe base method leads in reward, quality, and key retention at T=5–7. +Cur leads in key retention at T=8–9 and all three at T=9. Six panels compare difficulty-bin means for reward, quality, retention, coverage, penalties, and structural consistency. From T=7, reward alone can obscure information loss; inspect quality, retention, and coverage together.Open full figure ↗
CROSS-DOMAIN GENERALIZATION

The credit travels.

WebShop 1.5B: KuaFu-Credit achieves SR 0.805 and score 0.899, exceeding GiGPO, GRPO, and ProxMO.
1.5B / +3.2 pp SRKuaFu-Credit: SR 80.5%, score 0.899; GiGPO: SR 77.3%, score 0.876.

Both model scales share their base model and common hyperparameters, with 400 steps and seed=0; only credit assignment changes. Cross-seed significance evidence is not provided. Main-task difficulty segments are associated with curriculum order, not an independently controlled causal study of difficulty.

06 / MECHANISM & BOUNDARIES

Show the evidence.
Keep the caveats.

Beyond performance, inspect how credit is allocated. Mechanism diagnostics are neither final-task accuracy nor an independent absolute ground truth.

SIGN AGREEMENT · BEFORE Z-SCORE99.4%

Turn-level difference sign agreement

Among 854 aligned observations, KuaFu-Credit has five sign disagreements; GRPO achieves 45.1% agreement.

This diagnostic uses pre-z-score differences with base=0 and reference Δq−Δp. It does not imply 99.4% accuracy for the final advantage.
Turn-level sign-agreement heatmap for five methods
Mechanism comparison aligned at the same step and turn.Open full figure ↗
KUA FU · FOLLOW THE SIGNAL

Long-lived memory.
Well-assigned credit.

Explore the timeline again ↑Paper on arXiv

The paper is available on arXiv. Code and citation resources will be added when available.