TL;DR
Raw speech recognition outputs are usually unpunctuated streams of spoken-form words (think "two forty" instead of "2:40"). Instead of running slow, error-prone sequential pipelines to clean this up, UniForm trains a single, compact 0.8B-parameter language model to insert punctuation and normalize text in one pass. By introducing a specialized reinforcement learning technique that focuses gradient updates only on the few tricky tokens where formatting actually happens, this tiny model beats both traditional rule-based pipelines and 35B-parameter LLMs while running in real time.
What Problem Does This Paper Address?
Automatic Speech Recognition (ASR) is great at turning audio waves into words, but terrible at formatting them for human eyes or downstream NLP tasks. Cleaning up raw transcripts requires two main steps: Punctuation Restoration (PR) (adding commas, periods, etc.) and Inverse Text Normalization (ITN) (converting spoken phrases like "one hundred twenty three" into canonical written forms like "123").
Conventionally, production systems bolt together two separate models in a sequential pipeline—say, a Transformer encoder for punctuation followed by weighted finite-state transducers (WFSTs) for ITN. This setup adds latency, propagates errors, and misses a crucial linguistic reality: punctuation and normalization depend on each other. Sentence boundaries help disambiguate numbers, and knowing an entity's boundaries tells you where not to drop a comma.
You might think, "Just throw a small generative LLM at it!" Unfortunately, text formatting is a low-entropy task: 95% of the job is copying input words verbatim, and candidate outputs might differ by a single comma. In standard Reinforcement Learning (RL), reward signals here become sparse and washed out across long sequences of trivially copied tokens.
Methods
The authors build UniForm-0.8B (based on Qwen3.5-0.8B) using a three-stage curriculum—moving from broad data volume to surgical precision—capped off by a custom RL algorithm called Segment-Aware GRPO (SA-GRPO).
- Three-Stage Progressive Training:
- Stage 1 (Punctuation SFT): Supervised fine-tuning on 197M samples just to master broad punctuation patterns.
- Stage 2 (Joint PR-ITN SFT): Fine-tuning on 41.2M samples annotated with ITN spans, teaching the model to punctuate and normalize simultaneously.
- Stage 3 (SA-GRPO Alignment): Reinforcement learning on expert-verified, entity-dense data to resolve tricky ambiguities.
-
Segment-Aware GRPO (The Secret Sauce): Building on Group Relative Policy Optimization (GRPO, which samples $G=8$ outputs per prompt and compares them without a separate critic model), SA-GRPO introduces two innovations:
-
Multiplicative Structured Rewards: Every output is decomposed into three segment types: invariant text ($R_{\text{format}}$, binary check against hallucination), ITN spans ($R_{\text{ITN}}$, accuracy against valid written candidates), and punctuation ($R_{\text{punc}}$, F1 score). Rather than adding these rewards, UniForm multiplies them ($R_{\text{total}} = R_{\text{format}} \cdot R_{\text{ITN}} \cdot R_{\text{punc}}$). Any hallucination instantly zeros out the reward, and multiplication stretches out the tiny score differences between near-identical candidates.
- Token-Level Adaptive Credit Assignment: Standard GRPO broadcasts one scalar advantage equally to every token in a response—diluting the signal over easy, copied words. SA-GRPO dynamically redistributes credit to difficult tokens by combining empirical difficulty (how many of the 8 group samples got that specific span wrong) and intrinsic uncertainty (the model's token-level predictive entropy) in a zero-sum multiplier.
Datasets
- Training Corpus (>238M samples total): Aside from 197M punctuation samples in Stage 1, the 41.2M joint-training corpus blends ~7.2M real ASR transcripts, ~28M entity-enriched quality-controlled texts, and ~6M synthetic Cantonese samples generated via a teacher LLM (Qwen3.5-397B-A17B). It spans Chinese, English, Cantonese, and heavy code-switching across 13 domains.
- UniFormBench (New Benchmark): To test generalization without data leakage, the authors introduce a strictly deduplicated, expert-verified evaluation suite split into three tiers: Main (62,559 samples across Mandarin, English, Cantonese, and code-switching), Dialect (32,762 samples across 31 Chinese dialects), and Foreign (31,741 samples across 8 unseen world languages to test zero-shot cross-lingual transfer).
Key Insights and Ideas
- PR and ITN are genuinely synergistic: Adding ITN training in Stage 2 didn't cause a capacity trade-off in the 0.8B model—it actually boosted punctuation F1 from 0.734 to 0.798 while cutting ITN Word Error Rate (WER) in half. Entity boundaries help punctuation, and sentence structure helps normalization.
- Why DPO crashes and burns here: Direct Preference Optimization (DPO) completely collapsed on this task (punctuation F1 dropped to 0.045). When chosen and rejected sequences differ by a single comma, their sequence log-probabilities are nearly indistinguishable. Explicit group-normalized scalar rewards in GRPO completely sidestep this failure mode.
- Multiplicative beats additive in low-entropy RL: Under additive rewards, a model can "cheat" by skipping risky punctuation while riding high ITN scores. Multiplying rewards penalizes weakness in any single sub-task and sharpens gradients when scores hover near 1.0.
- Zero-shot general LLMs can't resist editing you: Prompting 30B–35B general-purpose LLMs yielded high ITN error rates because big LLMs naturally paraphrase or "clean up" grammar rather than preserving verbatim spoken words.
Key Results
- Accuracy: On UniFormBench-Main, UniForm-0.8B hits 0.801 punctuation F1 and 0.38% ITN WER, outperforming dedicated punctuation models (RoBERTa-Punc at 0.633 F1), specialized ITN systems (FunASR ITN at 0.84% WER; NeMo ITN at 15.18% WER), and zero-shot Qwen3.6-35B-A3B (0.737 F1, 5.66% WER).
- OOD Generalization: Just 128 steps of SA-GRPO cut Main ITN WER by 47% relative (0.72% $\rightarrow$ 0.38%) and slashed zero-shot Foreign WER by 55% relative (15.57% $\rightarrow$ 7.02%), while pushing Foreign punctuation F1 from 0.498 to 0.580 (where Chinese-specific classifiers score 0.000).
- Speed: Running on vLLM, UniForm-0.8B is 2.6$\times$ faster than a traditional sequential RoBERTa-Punc + WFST ITN pipeline and 14.9$\times$ faster than zero-shot Qwen3.5-4B.
Limitations and Future Work
- Language bias: Training data is overwhelmingly Chinese, Cantonese, and English; native multilingual training is needed to elevate low-resource foreign language accuracy.
- Partial post-processing scope: Real-world ASR cleanup also requires disfluency removal (stripping "ums" and false starts), ASR spelling correction, and speaker attribution, which aren't yet unified here.
- Text-only blind spots: Because UniForm only reads raw text, it misses acoustic prosody—pauses and intonation that could resolve genuinely ambiguous punctuation or normalization edge cases. Integrating audio features via cross-modal attention is a key next step.
Summary updated