You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] MCAdvantage changes when adding a common offset to nearby float32 rewards #4807
MCAdvantage changes the advantages of two one-step trajectories when the same constant is added to both rewards. The two float32 rewards are exactly representable in either case. This affects per-step rewards and trajectory_return="sum" on main at 6ffc7a21.
Both reward groups have a sample standard deviation above the clamp. At either origin, the expected advantages are approximately [-0.707107, +0.707107]. At offset 32 the lower-reward rollout receives 0.0 and the higher receives approximately 1.414214.
The shifted reduction introduced in #4610 handles uniform fractional rewards. For adjacent rewards, adding the origin back to the mean rounds the midpoint to an endpoint before the subtraction. Centering the shifted rewards first preserves the signal. A CPU regression reproduces this with PyTorch 2.15.0 and TensorDict 0.15.6.
Activity
wufei-png commentedon Dec 2, 2026
/assign