SCRIM

Where Small Mistakes Matter

Quantifying State Criticality for Imitation Learning

Yusuf Umut Ciftci1,2* Joonwon Kang1,3* Ajay Suresha Sathya1,4 Somil Bansal1

1Stanford University 2University of Southern California 3Georgia Institute of Technology 4DIENS, Inria Paris, PSL University

* Equal contribution

SCRIM criticality score along real-robot demonstrations of cube stacking and tape hanging, with peaks at pre-grasp and alignment moments.
SCRIM along real-robot demonstrations of cube stacking (left) and tape hanging (right). The score peaks at the moments where a small action error would derail the task: lining up before the grasp, aligning the cube for placement, and aligning the tape with the hook. Everywhere else it stays near zero.
TL;DR Not every state in a demonstration matters equally. SCRIM finds the few where a small action error flips success into failure, and uses them to train better imitation policies with less data.

Abstract

Imitation learning typically treats every demonstration state as equally important, optimizing a behavior-cloning objective uniformly across the dataset. Yet not all states are created equal: in a small number of critical states, even a slight deviation from the expert action can lead to a failure, while in many other states such errors are recoverable and inconsequential.

We formalize state criticality in imitation learning as the worst-case degradation in downstream value induced by a bounded perturbation of the expert action at a given state. We then propose SCRIM, a practical State CRIticality Measure that estimates this quantity by training an adversarial disturbance policy and a value critic around a fixed imitation policy. SCRIM assigns each demonstration state a score reflecting how vulnerable the task outcome is to small, policy-relevant action errors.

We show that these scores can be used to reweight behavior-cloning losses, improving imitation at consequential states and increasing overall task performance. We further show that SCRIM enables data curation by selecting compact, high-value subsets of demonstrations that preserve performance while substantially reducing the amount of training data. We evaluate SCRIM across various simulated and real-world robotic manipulation tasks, and demonstrate that SCRIM improves policy training, enables efficient data selection, and provides interpretable insights into which moments in a demonstration are most critical for task success.

61.5% vs 48.5%

Average success of SCRIM-weighted behavior cloning vs. standard (uniform) BC across four simulated tasks.

25%

of the demonstrations, picked by SCRIM, beat uniform BC trained on the full dataset (54.0% vs 48.5%).

50

real-robot rollouts were enough to learn criticality for cube stacking (150 for tape hanging).

How SCRIM works

We ask a simple question at every demonstration state: if the robot's action were off by a little, how much more likely would the task fail? To answer it, we let an adversary push a trained policy around and learn which nudges hurt.

Freeze the imitation policy

Train a behavior-cloning policy \(\pi\) as usual, then freeze it. It becomes the base controller.

Train a bounded adversary

An adversary adds a small disturbance \(\delta\) to every action, \(|\delta_j| \le \epsilon_j\), and is trained with SAC to make the task fail. A critic \(\bar{Q}\) learns the outcome value of each executed action.

Score every demo state

At each demonstration state, compare the critic's value of the expert action with its value after the adversary's worst nudge.

The reward is sparse: \(-1\) for success, \(0\) otherwise, so a higher \(\bar{Q}\) means a worse outcome. The criticality of a state is the worst-case increase in that value from an in-budget perturbation of the expert action \(\pi_E(s)\):

$$C_\epsilon(s) \;=\; \max_{\delta \in \Delta_\epsilon} \bar{Q}\big(s,\, \pi_E(s) + \delta\big) \;-\; \bar{Q}\big(s,\, \pi_E(s)\big) \;\ge\; 0$$

In practice, the learned adversary \(\delta_\pi(s)\) stands in for the inner maximization:

$$\Delta Q(s) \;=\; \bar{Q}\big(s,\, \pi_E(s) + \delta_\pi(s)\big) \;-\; \bar{Q}\big(s,\, \pi_E(s)\big)$$
Critical: \(\Delta Q(s)\) is large. A small error can turn a likely success into a likely failure. Forgiving: \(\Delta Q(s) \approx 0\). No small error changes the outcome.

Because the adversary only explores a small neighborhood around the policy's actions, the critic only has to be accurate there, not across the entire action space. And breaking a task is much easier to learn than fixing it, so this takes far less interaction than learning a corrective residual policy.

Putting the scores to work

The scores are standardized and turned into a sampling distribution over demonstration states. We use it in two ways:

Criticality-weighted training

Train a fresh BC policy that sees critical states more often, so its capacity goes to the moments that decide the task.

Data curation

Keep a small subset of the demonstrations, chosen by criticality, and train standard BC on it.

SCRIM finds the moments that matter

We compare SCRIM to four other ways of scoring states: distance from the gripper to the object, action magnitude, and two value-based measures (the variance of the policy's Q-function over actions, and the gap between the best and average Q-value). All scores are normalized to the same scale and plotted along a single demonstration.

Normalized criticality along a MetaWorld hammer demonstration: SCRIM peaks when the gripper aligns over the hammer handle; baselines peak elsewhere.
Hammer (MetaWorld). SCRIM peaks as the gripper lines up over the handle, just before the grasp. Nothing has been touched yet, but a small error here means an unstable grasp and a dropped hammer. Distance-to-object saturates after the approach, action magnitude spikes at every phase change, and the value-based measures peak later, during contact, where the Q-function is most sensitive to arbitrary actions rather than to small errors.

Criticality doubles as a measure of task difficulty

SCRIM is computed with a single critic trained across all demonstrations of a task, so scores are comparable across trajectories and task variations.

On TurnFaucet, which spans ten faucet models, ranking the models by their mean SCRIM gives an intuitive easy-to-hard ordering: broad, forgiving handles score low, while handles that need a precise grasp and turn score high.

Four faucet models ordered by mean SCRIM, from 0.0011 and 0.0013 for the easiest to 0.0036 and 0.0039 for the hardest.
Faucet models ordered by mean SCRIM: the two easiest (top) and the two hardest (bottom).

Better policies from the same demonstrations

Demonstration datasets are dominated by easy, recoverable free-space motion. Uniform BC spreads its capacity across all of it. Weighting training by SCRIM shifts that capacity toward the few states that decide the outcome.

Criticality-weighted training

Success rate (%) over 100 rollouts. Every measure is calibrated to the same sharpness, so they differ only in which states they emphasize.

WeightingStackCubeTurnFaucetPegInsertionHammerAverage
Uniform (standard BC)68.039.026.061.048.5
Distance to object4.04.00.00.02.0
Action magnitude41.021.05.069.034.0
Q-function variance77.044.610.065.049.2
Q-value discrepancy74.033.010.067.046.0
SCRIM (ours)91.047.025.083.061.5

SCRIM weighting raises average success from 48.5% to 61.5%, improving three of four tasks and matching uniform BC on PegInsertion. The strongest baseline, Q-function variance, lands barely above uniform BC, and the geometric heuristics hurt because they underweight the states that actually matter.

Histograms of BC action-error percentile against SCRIM percentile on StackCube and PegInsertion, for uniform and SCRIM-weighted BC.
Where does the policy make its mistakes? Action-error percentile vs. SCRIM percentile, with Spearman correlation \(\rho\) and success rate. On StackCube, uniform BC makes its largest errors at critical states; SCRIM weighting flattens that relationship and lifts success from 68% to 91%. On PegInsertion, the base policy is already accurate at critical states, so reweighting has little room to help.

Less data, same performance

Next we use SCRIM to curate data: sample 25% of the demonstrations according to criticality, then train standard BC on that subset.

Success rate (%) over 100 rollouts. Bold marks the best 25% subset per task.

SelectionStackCubeTurnFaucetPegInsertionHammerAverage
Full dataset (reference)
Uniform (standard BC)68.039.026.061.048.5
SCRIM-weighted91.047.025.083.061.5
25% subset
Uniform sampling73.041.014.060.047.0
Distance to object9.01.00.00.02.5
Action magnitude39.012.07.060.029.5
Q-function variance76.037.08.070.047.8
Q-value discrepancy81.029.011.073.048.5
SCRIM (ours)83.043.013.077.054.0

With a quarter of the data, SCRIM-selected subsets reach 54.0% on average, above uniform BC trained on all the data (48.5%).

Cheaper than learning a fix

A natural alternative is residual RL: learn a corrective policy on top of the frozen BC policy. Our intuition is that actions that break a task are far more abundant than actions that fix it, so the adversarial problem is easier to explore.

Success rate (%) at a matched interaction budget. The last column is how much interaction residual RL needs, relative to the budget, to reach SCRIM.

TaskBudgetResidual RLSCRIM-weighted BCInteraction to match
StackCube100k0.085.07.5×
TurnFaucet200k16.052.01.5×
PegInsertion500k0.018.05.8×
Hammer100k79.074.0—

On the three ManiSkill tasks, residual RL falls below the base policy it is meant to correct at the same budget. Hammer is the exception: residual RL leads early there, although SCRIM reaches the same peak success within 500k interactions. The two approaches are complementary.

On a real robot

We learned SCRIM on a Franka Panda for two teleoperated tasks: StackCube (stack the red cube on the green cube, 70 demonstrations) and TapeHang (hang a roll of tape on a hook, 100 demonstrations). The base policies are fine-tuned from the \(\pi_{0.5}\) vision-language-action model, which uses a flow-matching action expert and is conditioned on three cameras, proprioception and a language instruction. The adversary is trained with SAC directly on the robot. It needed only 50 rollouts for StackCube and 150 for TapeHang.

SCRIM improves a real-world VLA

We use the hardware SCRIM scores the same way as in simulation: to reweight fine-tuning on the full dataset, and to curate a 25% subset of the demonstrations.

Success rate (%) over 25 real-robot rollouts per task and policy. Residual RL gets the same number of robot episodes as SCRIM's adversary (in parentheses).

MethodStackCubeTapeHang
Full dataset
Uniform (standard fine-tuning)5656
Residual RL, matched interaction60(50 ep.)4(150 ep.)
SCRIM-weighted (ours)7688
25% subset
Uniform selection5248
SCRIM selection (ours)6860

SCRIM weighting lifts the fine-tuned VLA from 56% to 76% on StackCube and from 56% to 88% on TapeHang. Residual RL given the same robot episodes barely moves StackCube (60%) and collapses on TapeHang (4%). With a quarter of the demonstrations, SCRIM-selected subsets beat uniformly selected ones (68% vs 52% and 60% vs 48%), and even beat uniform fine-tuning on all the data. Because curation here drops whole demonstrations, it tests dataset compression rather than just resampling transitions.

Mean criticality flags fragile demonstrations

Because scores are comparable across trajectories, a demonstration's mean SCRIM grades its quality. A high mean marks a success that a small execution error would have turned into a failure; a low mean marks a robust one.

Two real-robot cube-stacking demonstrations: high mean SCRIM 0.84 with a fragile edge placement, and low mean SCRIM 0.42 with a centered, stable placement.
StackCube. The high-mean demonstration (0.84) sets the cube on the edge of the support, where it barely balances and a slight deviation would topple it. The low-mean demonstration (0.42) sets it down centered and stable.

Limitations

BibTeX

@misc{ciftci2026scrim,
  title  = {Where Small Mistakes Matter: Quantifying State Criticality for Imitation Learning},
  author = {Ciftci, Yusuf Umut and Kang, Joonwon and Sathya, Ajay Suresha and Bansal, Somil},
  year   = {2026}
}