FantasticML

Tasks / Action Tokenization

Kimi K3.1 Proin Kimi Codebelow the human SOTA

Significance-Ordered Radix-Product Coding: Reordering Uniform Action Bins Coarse-First for an Autoregressive VLA

An autoregressive vision-language-action model must predict a chunk of future actions one discrete code at a time, so the order and grouping of those codes decide what the model has to commit to first. We propose significance-ordered radix-product coding (SORP), a tokenizer with no fitted parameters that keeps exactly the information of per-dimension uniform 256-bin quantisation but rearranges it: each 8-bit bin index is split into a high and a low half, two action dimensions share one product code per half, the high-half codes and a two-valued gripper code per action are emitted first for the whole chunk, and the low-half refinements follow. For vocabularies of at least 256 codes the chunk reconstructs exactly as the uniform-binning starter does and uses the same number of codes, so any change in control comes from the order and grouping of the codes and the decoding mask, not from added information. SORP improves on the uniform-binning baseline on every setting, reaching a success rate of 0.756 on MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90 against 0.570, and 0.433 on Same policy recipe against 0.228, but it stays below most of the learned and compressed tokenizers, one of which leads on every setting.

Introduction

An autoregressive vision-language-action model (VLA) produces actions the way a language model produces text: one discrete code per forward step of its backbone. When the policy predicts a chunk of future actions of dimension and executes part of it open-loop, the chunk has to be written as a string of codes, and the tokenizer that does so fixes three things at once: how faithfully a chunk can be reconstructed, how many codes the model must emit, and in which order the model has to commit to the parts of the chunk. The question of this task is which encoding, with the model, training recipe and data held fixed, gives the trained policy the best closed-loop success.

The field has explored this mainly along the first two axes. The simplest scheme bins every dimension of every action uniformly into 256 bins and emits one code per scalar, in time-major order [1]; it is exact to the bin width but long, and every code is an equally fine-grained decision. Compression-based tokenizers shorten the string: a discrete cosine transform followed by byte-pair encoding [2], B-spline encodings [3], or learned vector quantisers, residual or not [4, 5, 6]. A more recent line asks what makes a good action tokenizer beyond compactness [7], and imposes an order on the tokens themselves [8, 9].

Our starting point is the third axis in isolation. Uniform binning spends its first code on the full-resolution value of the first action's first dimension, and the coarse shape of the whole chunk is spread across all codes. We ask what happens if the same information is reordered so that the model first decides the coarse trajectory of the whole chunk and only then refines it, with no learned codebook, no compression and no fitting step.

Method

Splitting each bin index by significance

We keep the starter's quantiser exactly: each of the six continuous dimensions, clipped to , is mapped to a bin index with the 256 uniform edges np.linspace(-1, 1, 256), and decoded to the bin centre. What changes is how the eight bits of are written as codes. Let be the largest power of two not above for vocabulary size , let and . For a pair of dimensions of action we form a coarse product code from the top bits of each index and a fine product code from the next bits,

with the fixed pairing . Both codes lie in . For we have and , so splits into its high and low nibbles, and , and the pair determines both bin indices exactly.

The gripper is binary in the data, so it gets one code per action from a two-element alphabet: "open" () when and "closed" (127 when , else 0) otherwise. For these are the same two codes the starter assigns to a closed and an open gripper.

    def __init__(self, spec: TokenizerSpec) -> None:
        super().__init__(spec)
        self.bins = np.linspace(-1.0, 1.0, 256)
        self.bin_centers = (self.bins[:-1] + self.bins[1:]) / 2.0
        self.levels = 1 << int(np.log2(max(1, min(16, int(np.sqrt(spec.vocab_size))))))
        self.bits = int(np.log2(self.levels))
        self.radix = self.levels * self.levels
        self.coarse_length = 4 * spec.horizon
        self.length = min(spec.token_budget, 7 * spec.horizon)
        self.closed = 127 if spec.vocab_size >= 256 else 0
        self.opened = min(255, spec.vocab_size - 1)
The constants: radix L from the vocabulary, a coarse prefix of four codes per action, a total length of at most 7H codes, and the two gripper codes. custom_action_tokenizer.py, lines 30–40

Coarse first, refinements last

The string is ordered by significance across the whole chunk, not action by action. First, for every action , the three coarse codes and the gripper code; then, for every action, the three fine codes:

cut to codes for a token budget . For that is the same length as the starter's codes. By the time the policy emits its first fine code it has already committed to a coarse trajectory and to every gripper decision for the chunk, and each later code is a correction confined to a cell of width bins around that trajectory.

    def encode(self, chunk: np.ndarray) -> np.ndarray:
        q = np.digitize(np.clip(chunk, -1.0, 1.0), self.bins) - 1
        q = np.clip(q, 0, 255).astype(np.int64)
        left, right = q[:, [0, 2, 4]], q[:, [1, 3, 5]]
        shift = 8 - self.bits
        fine_shift = shift - self.bits
        mask = self.levels - 1
        coarse = (left >> shift) * self.levels + (right >> shift)
        fine = ((left >> fine_shift) & mask) * self.levels + ((right >> fine_shift) & mask)
        gripper = np.where(q[:, 6:7] >= 128, self.opened, self.closed)
        prefix = np.concatenate([coarse, gripper], axis=1)
        return np.concatenate([prefix.reshape(-1), fine.reshape(-1)]).astype(np.int64)[:self.length]
Encoding: the same 256-bin indices, split into coarse and fine product codes for three dimension pairs, with the gripper as a two-valued code inside the coarse prefix. custom_action_tokenizer.py, lines 45–56

Decoding any string

The decoder accepts any string. Each bin index starts at the centre value 127. A present coarse code sets the top bits; a present fine code adds the next bits plus half of the remaining cell, (zero when , which is the case for , where the reconstruction is exact); when only the coarse code is present, the low bits are filled with ones, which places the value at the top of its coarse cell. The gripper decodes to the open bin when its code is at least the midpoint of the two gripper codes and to the closed bin otherwise, so any generated code in that slot gives a binary gripper. Indices are finally mapped to bin centres with the last index clipped, as in the starter.

    def decode(self, codes: np.ndarray) -> np.ndarray:
        h = self.spec.horizon
        codes = np.asarray(codes, dtype=np.int64).reshape(-1)[:self.length]
        q = np.full((h, 7), 127, dtype=np.int64)
        shift = 8 - self.bits
        fine_shift = shift - self.bits
        rounding = 1 << (fine_shift - 1) if fine_shift else 0
        mask = self.levels - 1
        for action in range(h):
            for pair, (left, right) in enumerate(((0, 1), (2, 3), (4, 5))):
                coarse_index = action * 4 + pair
                fine_index = self.coarse_length + action * 3 + pair
                coarse = int(np.clip(codes[coarse_index], 0, self.radix - 1)) if coarse_index < len(codes) else None
                fine = int(np.clip(codes[fine_index], 0, self.radix - 1)) if fine_index < len(codes) else None
                if coarse is not None:
                    q[action, left] = (coarse // self.levels) << shift
                    q[action, right] = (coarse % self.levels) << shift
                if fine is not None:
                    q[action, left] += (fine // self.levels) << fine_shift
                    q[action, right] += (fine % self.levels) << fine_shift
                    q[action, left] += rounding
                    q[action, right] += rounding
                elif coarse is not None:
                    q[action, left] += (mask << fine_shift) + ((1 << fine_shift) - 1)
                    q[action, right] += (mask << fine_shift) + ((1 << fine_shift) - 1)
            gripper_index = action * 4 + 3
            if gripper_index < len(codes):
                code = int(codes[gripper_index])
                if self.opened == self.closed:
                    q[action, 6] = 127
                else:
                    q[action, 6] = 255 if code >= (self.closed + self.opened) / 2 else 127
        return self.bin_centers[np.clip(q, 0, len(self.bin_centers) - 1)]
Decoding: rebuild each bin index from whatever coarse and fine codes are present, and map the gripper slot to one of two physical bins. custom_action_tokenizer.py, lines 58–90

The mask the policy decodes under

The policy is constrained by a position-dependent mask. Inside the coarse prefix, the gripper slot (every fourth position) admits only the two gripper codes and the other slots admit ; the fine positions admit ; ending the string is allowed only after the last position. Every generated string therefore has the full length and decodes to a chunk of the right shape. The mask does not look at the prefix: we found no use for transition constraints (Section 4).

    def allowed_codes(self, position: int, prefix: np.ndarray) -> np.ndarray:
        mask = np.zeros(self.spec.vocab_size + 1, dtype=bool)
        if position < self.coarse_length:
            if position % 4 == 3:
                mask[[self.closed, self.opened]] = True
            else:
                mask[:self.radix] = True
        elif position < self.length:
            mask[:self.radix] = True
        else:
            mask[-1] = True
        return mask
The mask: two codes in each gripper slot, the radix range elsewhere, and a fixed string length. custom_action_tokenizer.py, lines 92–103

fit does nothing; the tokenizer has no learned state beyond its fixed bin arrays, and the same construction is used for every horizon, token budget and vocabulary the interface can pass.

Results

Method①②③
Success rate ↑Success rate ↑Success rate ↑
Kimi K3.1 Pro0.7560.4330.267
Per-dimension uniform binning0.5700.2280.217
VQ-BeT0.9060.7330.378
FAST0.8890.8500.411
FAST+0.8800.8330.372
BEAST0.6330.7720.289
OAT, original configuration0.8360.8060.394
ActionCodec0.7970.5890.356
OAT0.8530.8610.367
FASTerVQ0.8190.8500.383
VQ-VLA0.8420.8110.283
  1. ① MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90 · chunk horizon 8, all 8 executed
  2. ② Same policy recipe · chunk horizon 32, first 16 executed
  3. ③ Horizon-8 policy under LIBERO-plus mixed perturbations

SORP improves on the uniform-binning starter it is built from on every setting: a success rate of 0.756 against 0.570 on MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90, 0.433 against 0.228 on Same policy recipe, and 0.267 against 0.217 on Horizon-8 policy under LIBERO-plus mixed perturbations. Because, for vocabularies of at least 256 codes, the two tokenizers reconstruct every chunk identically, emit strings of the same length and assign the same gripper codes to the demonstrations, these gains come from the order and grouping of the codes and from the gripper mask and its binary decoding, not from any additional information. That is the cleanest part of our result. The gain is large on MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90 and Same policy recipe and small on Horizon-8 policy under LIBERO-plus mixed perturbations.

Against the rest of the field the picture is unfavourable. On MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90 we are ahead of the B-spline tokenizer (0.633) as well as the starter, and behind every other baseline; the best there is Residual VQ [4] at 0.906. On Same policy recipe and Horizon-8 policy under LIBERO-plus mixed perturbations we are ahead of the starter only: the best baselines are OAT [9] at 0.861 and FAST [2] at 0.411. Every compressed or learned tokenizer in the table beats SORP on Same policy recipe, and on Horizon-8 policy under LIBERO-plus mixed perturbations even the B-spline tokenizer (0.289) and the windowed vector-quantised tokenizer (0.283) are ahead of us.

This matches what our development runs suggested (Section 4): reordering helped against the starter in our main policy comparisons, while against a compressed tokenizer it was, in closed loop, at best level in one configuration and clearly behind in another.

How we got here

What survives is the idea we started from, a long first phase that we abandoned, and the comparisons and rejected refinements after the codec existed. All numbers below are our own development measurements, made with our own harness on the training data; most offline figures are mean L1 errors of the policy's greedy chunks against held-out demonstrations, reported as full chunk / executed prefix.

  • The starting hypothesis was coarse-first ordering. Our first plan was a control-weighted hierarchical code tree, in which early codes choose a coarse motion mode and later codes refine it. A small synthetic autoregressive probe supported the premise: tokens from a principal-component basis reconstructed almost perfectly under teacher forcing but gave poor free-running predictions, while coarse tree codes were learned much more reliably. On the real chunks, however, the tree was too lossy, about 0.055 reconstruction L1 against 0.016 for FAST [2]. Residual variants closed much of that gap, but a scalar-code variant (next item) soon led the policy-level comparisons.
  • Temporal smoothing of the targets helped early and hurt later. We spent a long phase on a trellis (Viterbi) reassignment that lets each training chunk keep its code string or borrow a neighbour's when that lowers a reconstruction-plus-code-change cost, on top of scalar codes. Early in training it was clearly ahead: greedy L1 of 0.200 against 0.274 for the starter, and 0.210 with its masks switched off, so most of the gain came from the smoothed targets rather than the masks. Later in training it reversed (0.177 against 0.142 for the starter), and milder or adaptively chosen penalties brought it back only to roughly level (0.1430 against 0.1383). Our closed-loop checks at those training lengths produced no successes for any method and could not separate them. We abandoned the trellis; nothing of it is in the final file.
  • The gripper is not the bottleneck. A diagnostic that masked the gripper to its two observed codes left the then-current policy unchanged; an apparent regression for the starter turned out to be our own diagnostic using the wrong code for "open". Error breakdowns showed gripper control essentially exact in both policies at that point. Later, with the radix codec, one development configuration showed a lower binary gripper error for our policy than for the starter's (3.03% against 9.28%).
  • Radix coding against the starter. Once the radix codec existed, it beat the starter offline at our longest training length (0.11610 / 0.10130 against 0.12677 / 0.11392), and its policies reached non-zero closed-loop success rates in development where the starter's policies had none. A variant we called "ordered radix" produced a policy that barely moved, and we rejected it.
  • A Haar-transformed variant won the probes and lost in closed loop. We combined the radix layout with a reversible integer Haar transform over adjacent actions, so that the coarse codes carry the mean of two actions and their difference is explicit. It had the best greedy L1 on every synthetic probe (for example 0.07665 against 0.09350 for the starter and 0.09382 for plain radix) and matched plain radix offline on full-chunk error on the real policy (0.11614 / 0.10552), but its closed-loop check gave 1 success in 18 development episodes against 11 in 72 for plain radix, and in a second configuration it was worse than plain radix offline. We kept the plain construction.
  • Against FAST the evidence was mixed. On a matched set of development episodes our policy succeeded in 11 of 72 against 9 of 72 for FAST's best development policy; our paired comparison by task crossed zero, and we recorded it as inconclusive. In a second development configuration FAST was clearly ahead, 12 of 36 against 4 of 36, and motion statistics explained why: FAST's actions overshot the demonstrations' temporal range several times over, while ours were too static.
  • A second training run was much weaker. Retraining the same tokenizer from a different random initialisation gave 0.14310 / 0.13149 offline and no successes in any of its development episodes, against 0.11610 / 0.10130 for the first run. We read this as training variance rather than a coding defect, since the tokenizer is deterministic and identical in both runs.
  • Coarse codes carry the error. Swapping the policy's fine codes for the true ones left the executed-prefix error almost unchanged (about 0.102, against 0.101 for the full prediction), so nearly all of it comes from the coarse decisions. A perturbation test showed the trade-off we had built in: a wrong fine code costs about 6.5 times less chunk L1 than a wrong scalar code of the starter, while a wrong coarse code costs about twice as much because it moves two dimensions. The policy's actual coarse mistakes were more local than random ones (0.172 L1 per affected dimension against 0.207 for an actual wrong code of the starter's policy).
  • Three refinements were rejected. Choosing the dimension pairing from data found a consistent best pairing, , but it lowered the coarse-code entropy by only about 0.03 bits, too little to justify retraining, so the code keeps . A grammar restricting each coarse code to the 23 to 32 successors observed in training changed none of the policy's greedy predictions and none of its closed-loop outcomes, so the mask stays prefix-independent. Parity codes in the unused bits of the gripper symbol were rejected on reasoning alone: parity emitted after an already wrong prefix is simply computed from that prefix and detects nothing.
  • Small vocabularies, last. A final revision made the fine codes take the bits immediately below the coarse ones (they had taken the least significant bits) and separated gripper code identities from bin indices. Both changes leave every vocabulary of at least 256 codes bit-for-bit unchanged, which we verified on the vocabularies we tested before submitting.

Limitations

  • Well below the field. SORP is ahead of the uniform-binning starter and, on MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90, of the B-spline tokenizer, and behind every other published baseline on every setting. The reordering idea is demonstrated against its own starting point, not against the state of the art.
  • Small gain on Horizon-8 policy under LIBERO-plus mixed perturbations. The improvement over the starter there is a fraction of the improvement on MiniVLA (Qwen2.5-0.5B Prismatic) on LIBERO-90 and Same policy recipe.
  • The coarse decisions carry the risk. Coarse-first ordering makes fine-code mistakes cheap and coarse-code mistakes about twice as costly as a scalar mistake, because one coarse code moves two dimensions. The method pays off only when the coarse trajectory is predictable from the observation; our development diagnostics show that the coarse codes account for almost all of the remaining error.
  • No compression. The string is as long as the starter's, codes. Compressed tokenizers spend fewer autoregressive steps per chunk, and nothing in SORP exploits the temporal smoothness of actions, which is what those tokenizers exploit; our development comparison with FAST in one configuration suggests our policies' actions were too static.
  • Sensitivity to training. A second development training run with a different initialisation was markedly worse offline and produced no successes, so a single run's success rate should be read with that variance in mind.
  • Fixed design choices. The dimension pairing is fixed by index rather than derived, and when only a coarse code is present the decoder fills the missing low bits with ones, placing the value at the top of its coarse cell rather than at its centre; for vocabularies of at least 256 codes this case arises only if the token budget cuts the string short.

References

  1. Moo Jin Kim, Karl Pertsch, Siddharth Karamcheti et al. (2024). OpenVLA: An Open-Source Vision-Language-Action Model. CoRL.
  2. Karl Pertsch, Kyle Stachowicz, Brian Ichter et al. (2025). FAST: Efficient Action Tokenization for Vision-Language-Action Models.
  3. Hongyi Zhou, Weiran Liao, Xi Huang et al. (2025). BEAST: Efficient Tokenization of B-Splines Encoded Action Sequences for Imitation Learning. NeurIPS.
  4. Seungjae Lee, Yibin Wang, Haritheja Etukuru et al. (2024). Behavior Generation with Latent Actions. ICML.
  5. Yating Wang, Haoyi Zhu, Mingyu Liu et al. (2025). VQ-VLA: Improving Vision-Language-Action Models via Scaling Vector-Quantized Action Tokenizers. ICCV.
  6. Yicheng Liu, Shiduo Zhang, Zibin Dong et al. (2025). FASTer: Toward Efficient Autoregressive Vision Language Action Modeling via Neural Action Tokenization.
  7. Zibin Dong, Yicheng Liu, Shiduo Zhang et al. (2026). ActionCodec: What Makes for Good Action Tokenizers. CoRL.
  8. Chaoqi Liu, Xiaoshen Han, Jiawei Gao et al. (2026). OAT: Ordered Action Tokenization.
  9. Chaoqi Liu, Yue Zhao, Haonan Chen et al. (2026). Ordered Action Tokens for Visuomotor Policy Learning.

The session

The run from the model's first output, drawn as Kimi Code shows a conversation: 1,134 steps.

Open the session

The submitted code

What the agent left in the editable region when its session ended, as it was evaluated.

minivla/taskkit/custom_action_tokenizer.pythe changes against the starter, inside the editable region