Phase 05 · Week 19 · 105 minutes

Day 131: Observation/action normalization and safe action decoding

Current VLA ecosystem and adaptation · Compare current policy families and adapt one without pretending to train a foundation model.

Chapter 19 · Adapt a current VLA through explicit data, action, and release contracts

Today in the field story

One problem, then the next

At the decoder desk, a harmless normalized vector attempts to become a robot command. You trace each field through training statistics, de-normalization, unit and frame conversion, then demand finite values, correct dimensions, freshness, authority, absolute and rate limits, collision clearance, and controller acceptance. A round-trip fixture proves the transforms invert as intended; it does not prove the action is safe in every scene. The passport records each rejection code so Week 20 can consume a typed proposal rather than opaque model output.

Why now

The action boundary is where a numerically plausible model result acquires physical consequence.

Ignore today

Ignore direct motor control and any safety claim based only on clipping.

Unlocks next

A typed, guarded action proposal suitable for skill-level orchestration.

Understand

Build the physical picture first

De-normalization opens a locked shipping crate: only after each value regains its name, unit, frame, time, and limits can the controller decide whether it is a usable command.

Normalization maps fields into numeric ranges convenient for learning; it does not standardize their physical meaning. A z-score transform stores x_norm = (x - mean) / standard_deviation, and its inverse is x = x_norm × standard_deviation + mean. Other policies use min-max, quantile, bounded, or model-specific statistics. Compute statistics from the declared training split, save them per named feature, and load the exact policy-supported processor. Reusing one field's statistics for another can produce finite, in-range-looking numbers with the wrong physical effect.

Decode into a typed action object before applying generic checks. Name every component, representation, unit, coordinate frame, command mode, reference point, action horizon, source time, and intended control period. An array [0.1, 0.0, 0.0] could mean metres of translation, radians of rotation, velocity, or an absolute target. Clipping the array to [-1, 1] cannot resolve that ambiguity, and swapping two legal joint values can remain inside all scalar limits while moving the wrong axis.

A command guard evaluates more than absolute bounds. Reject NaN or infinity, wrong dimension, missing schema ID, stale observation or action, invalid frame, unauthorized mode, and unavailable controller. Then check soft and hard joint or workspace bounds, per-step and per-second change, speed and acceleration, collision or keep-out constraints, gripper/load rules, action-chunk continuity, and current task preconditions. Send accepted commands through the existing commissioned controller and independently monitored stop behavior; the VLA must not bypass them.

Clipping should be an explicit policy, not a default disguise for errors. A tiny numerical overshoot may be bounded and logged when the controller contract permits it; a large jump, field-order mismatch, or stale chunk should be rejected and trigger a task-specific fallback. “Send zeros” is unsafe as a universal fallback because zero can mean open gripper, zero torque, origin target, or no velocity depending on mode. Define hold, controlled stop, queue clear, human handoff, or another response with the system owner and test it outside normal operation.

Words you need

Name each idea precisely

Normalization statistics

Training-derived values such as mean, standard deviation, minima, maxima, or quantiles used by a named processor for specific features.

Physical example:

The elbow target uses its own training mean and scale rather than the gripper's numerically convenient range.

De-normalization

The inverse processor operation that restores a model output to the declared action representation before physical validation.

Physical example:

A normalized elbow value of 1.5 becomes 0.7 rad using mean 0.4 rad and standard deviation 0.2 rad.

Typed action

A command whose components, order, units, frame, mode, timing, and intended controller are explicit rather than implied by array position.

Physical example:

The object names elbow_position_rad, wrist_position_rad, and gripper_width_m and includes source time and schema revision.

Rate limit

A bound on how quickly a command component may change per step or per unit time, independent of its absolute range.

Physical example:

An elbow target inside joint limits is rejected because it jumps 0.25 rad when the approved step limit is 0.10 rad.

Stale action

A once-valid command whose source state or execution deadline is too old for the current physical situation.

Physical example:

A grasp chunk generated before the cup was moved is discarded even though every numeric value remains finite.

Command guard

Robot-side validation that decides whether a decoded proposal may enter the commissioned controller and selects a defined failure response.

Physical example:

The guard checks schema, clock, frame, limits, collision state, authority, and controller readiness before accepting one chunk.

Math, one line at a time

Work through today’s relationship

Prerequisite rescue · optionalFine-tuning size, normalization, and evidence

Model adaptation must fit compute limits and improve frozen physical trials.

P_train
parameters updated during tuningUnit: parameters
GB
memory footprintUnit: gigabytes
Δsuccess
new minus baseline success rateUnit: percentage points
  1. A baseline succeeds 12/20 = 60%; adaptation succeeds 16/20 = 80%.

  2. Improvement is 80%−60% = 20 percentage points, not 20 percent.

  3. Report parameter count, memory, latency, and the same frozen scenarios before claiming improvement.

Programmer analogy

Treat a policy release like a mobile release: same acceptance suite, device budget, rollback path, and versioned artifact.

A metric rises from 50% to 65%. What is the percentage-point gain?

15 percentage points.

Normalization and decoding are

a=qμσ,q=aσ+μ.a=\frac{q-\mu}{\sigma},\qquad q=a\sigma+\mu.

With a=1.5a=1.5, σ=0.2 rad\sigma=0.2\ \mathrm{rad}, and μ=0.4 rad\mu=0.4\ \mathrm{rad}, q=0.7 radq=0.7\ \mathrm{rad}. The change is

Δq=0.70.5=0.2 rad>0.1 rad,\Delta q=0.7-0.5=0.2\ \mathrm{rad}>0.1\ \mathrm{rad},

so the default guard rejects it; 0.6 rad0.6\ \mathrm{rad} is only the maximum under a separately declared clipping contract.

Decode one action and stop it at the first violated contract

A two-field policy outputs normalized elbow and gripper values [1.5, -0.5]. The elbow mean is 0.4 rad with scale 0.2 rad; the gripper mean is 0.03 m with scale 0.02 m. Previous elbow target is 0.50 rad and its step limit is 0.10 rad.

  1. Verify schema ID, action dimension two, ordered names [elbow_position, gripper_width], finite values, source timestamp, and the expected z-score processor revision.

  2. Decode elbow as 1.5 × 0.2 + 0.4 = 0.70 rad and gripper as -0.5 × 0.02 + 0.03 = 0.02 m, keeping names and units attached.

  3. Check the absolute joint and gripper bounds; suppose both 0.70 rad and 0.02 m lie inside their allowed ranges.

  4. Calculate the elbow change as 0.70 - 0.50 = 0.20 rad, which exceeds the declared 0.10 rad-per-step limit even though the target passed absolute bounds.

  5. Reject the whole coupled action under the chosen atomic rule, clear any dependent queued chunk entries, emit the rate-limit failure with original and decoded values, and enter the reviewed fallback.

  6. Repeat with elbow normalized value 1.0, which decodes to 0.60 rad and reaches the next frame, collision, authority, and controller-readiness gates before eligibility.

Result

The first proposal is rejected for a measurable temporal violation; the corrected proposal is merely command-eligible after all guards, not yet proven physically completed.

What this proves

A decoded value can be mathematically correct and inside its absolute range while still being stale, too abrupt, semantically wrong, or unsafe for the current state.

Physical examples

Where this appears in real life

Gripper statistics drive an elbow

A deployment processor applies a gripper mean and scale to the second action component after a field-order change.

Look for:

Schema and per-field statistics identity reject the mismatch before a finite decoded value can be mistaken for a valid elbow command.

Legal target, illegal jump

The elbow currently commands 0.50 rad; the VLA proposes 0.70 rad, which lies inside the joint's absolute range but exceeds the 0.10 rad-per-step limit.

Look for:

The guard distinguishes absolute validity from temporal validity and follows the declared reject or bounded-response rule rather than silently executing the jump.

Hands-on exercise

Make the idea observable

Implement or table-test a pure offline decoder for five synthetic fields. The output must stop at a mock controller boundary and must never open a hardware device.

  1. Define ordered state and action schemas with names, dtype, unit, frame, mode, training-statistics ID, absolute range, step limit, freshness limit, and controller destination.

  2. Implement normalization and inverse operations per field, then assert round-trip recovery for boundary, midpoint, negative, and ordinary values within a stated tolerance.

  3. Return a typed action carrying schema, model, processor, source time, generation, and component metadata instead of a bare numeric array.

  4. Add checks for missing field, reordered field, NaN, infinity, zero scale, wrong statistics ID, stale source, absolute violation, delta violation, and unavailable controller.

  5. Choose and document atomic versus partial acceptance, clipping tolerance, queue-clearing behavior, fallback, operator signal, and evidence fields for every rejection class.

  6. Run the complete fault table, verify zero mock-controller calls for rejected actions, and separately record accepted, eligible, commanded, and observed states.

Observe

Round-trip arithmetic catches statistics errors, while typed metadata and temporal checks catch dangerous cases that scalar clipping cannot distinguish.

Done when

Every field round-trips by name and unit, every injected fault has a deterministic disposition, rejected cases make no controller call, and acceptance is not mislabeled physical success.

Build today

Benchmark a supported LeRobot/OpenVLA policy, trace its processors and normalized actions, then design or run a LoRA adaptation with a frozen baseline.

Evidence to save

DONE when a comparison table for “Observation/action normalization and safe action decoding” contains the test condition, metric, result, and justified engineering decision.

Common mistakes

Catch the wrong mental model

Wrong

Using one global mean and scale for an action vector.

Better

Bind statistics to versioned named fields and verify processor identity, because components with different units and distributions require their own supported transform.

Wrong

Calling any clipped action safe.

Better

Clipping only addresses a declared numeric boundary; semantic order, frame, staleness, rate, collision, mode, authority, and controller constraints still decide eligibility.

Wrong

Using an all-zero action as a universal fallback.

Better

Define fallback from the real command mode and system risk—hold, controlled stop, clear queue, or handoff—and test its physical meaning with the responsible controller and safety owners.

Job connection

How this becomes employable evidence

Own the robot-side action contract that loads policy statistics, creates typed commands, enforces freshness and physical bounds, integrates with the commissioned controller, and exposes rejection and fallback state to operators.

Relevant target roles

  • Robotics Application / ROS 2 Integration Engineer
  • Robotics Software Engineer — ROS 2 / AMR
  • Robotics Deployment, Integration & Validation Engineer
  • Robot HMI / Control & Monitoring Engineer
  • Robot Learning Deployment / Physical AI Integration Engineer

Chapter 19 interview drill

Interview questions: Observation/action normalization and safe action decoding

Practise a 60–90 second answer: define the idea, connect it to a physical robot, state assumptions, frames, and units when relevant, then finish with the failure signal or evidence you would inspect.

Primary interview scenario

A VLA's normalized output is finite and de-normalizes inside joint limits, yet the motion is wrong. Trace field identity, statistics, frame, mode, timestamp, rate, collision, authority, and observed-state evidence.

Answer shape: clarify the situation → trace the physical and software path → test the most likely boundaries → name the evidence that would confirm the result.

Technical follow-up questions

Q1With mean 0.4 rad, standard deviation 0.2 rad, and normalized value 1.5, what is the decoded target?
Model interview answer

The target is 1.5 × 0.2 + 0.4 = 0.70 rad before command-guard checks.

Q2Why is an in-range decoded joint target not necessarily eligible?
Model interview answer

It may have the wrong identity, unit, frame, mode, time, step rate, collision state, authority, or controller readiness despite passing absolute bounds.

Q3What evidence distinguishes command eligibility from completion?
Model interview answer

Eligibility is the guard decision; completion requires correlated controller acceptance and fresh measured physical state or a task-specific terminal observation.