April 11, 2026 · note
KAN We Flow — an RWKV + KAN flow-matching head
Replacing the heavy UNet in a flow-matching policy with RWKV time-mixing and GroupKAN channel-mixing: 86.8% fewer parameters, ~10x faster inference, and still the best accuracy across difficulty tiers.
The Problem
Robot action policies need to be accurate, fast, and lightweight. Current approaches fail on at least one:
| Approach | Accurate | Fast | Lightweight |
|---|---|---|---|
| Diffusion (DP3) | ✓ | ✗ many denoising steps | ✗ 255M params, heavy UNet |
| Flow Matching (FlowPolicy) | ✓ | ✓ one step | ✗ still inherits heavy UNet |
| KAN-We-Flow | ✓ | ✓ | ✓ |
The heavy UNet backbone is the bottleneck in both. DP3 has 255M parameters. Even fast flow-matching methods still inherit UNet-style stacks.
The question: Can we replace the UNet with something much smaller and faster without losing accuracy?
Background: What is Flow Matching?
Instead of iteratively denoising noise into an action (diffusion = 50+ steps), flow matching learns a velocity field — a single function that says “go in this direction” — and you follow it in one step.
The straight-line path between noise and target action :
The network learns velocity along this path. At inference, one Euler step gives the action: (Same as numerical technique approach h here is (1-t)).
- = robot state
- = visual representation
- = timestep along the flow path (not robot timestep)
Why one step is enough: flow matching learns a straight-line trajectory in action space, so a single Euler integration lands accurately at the target.
KAN-We-Flow: Three Components
1. RWKV — Replacing UNet’s Temporal Mixing
RWKV = Receptance Weighted Key Value
Normal attention is — expensive for long sequences. RWKV does sequence mixing in linear time using exponential time-decay: recent tokens matter more, older ones decay away. Apne quant wala EMA
The time-mixing output (forward scan):
- = per-channel decay rate (learned) — controls how fast past tokens fade
- = key and value projections of token
- = learned “current token” bias specifically uniquely determined for each timestamp.
They run this bidirectionally (forward + backward scan, then sum):
So each token sees full trajectory context in both directions. The time-mixing output is then gated by a receptance :
The channel-mixing branch applies a token-wise gated MLP:
Key idea: RWKV captures long-range temporal dependencies across the action trajectory at linear cost — no quadratic attention needed.
2. GroupKAN — Replacing UNet’s Channel MLPs
KAN = Kolmogorov-Arnold Networks
A normal MLP layer uses fixed nonlinearity with learned weight matrices :
A KAN layer replaces fixed with learnable spline functions placed on the edges:
Each is a matrix of learned univariate spline functions — one per edge between nodes. The network learns the shape of the function itself, not just scaling weights. This approximates complex nonlinearities with far fewer parameters.
GroupKAN — split input channels into groups, apply an independent KAN to each group, then concatenate: 4 is sweet spot of speed and quality.
They also add Channel Affinity Modulation (CAM) — a learned gating vector that highlights task-relevant channels using temporal pooling :
Final GroupKAN output:
3. RWKV-KAN Block — Full Architecture
Each block combines both branches with pre-norm residuals:
The full model is a U-shaped encoder-decoder (3 stages down, 3 stages up) stacking these blocks instead of heavy UNet convolutions.
Inputs concatenated as condition:
- Point cloud → Vision Encoder → visual embedding
- Robot state → State Encoder → state embedding
- Timestep → Time Encoder → time embedding
- Noisy action → fed directly into the UNet
4. Consistency Flow Matching (CFM) Objective
Two training losses:
Endpoint loss — decoded action should match across nearby times:
Velocity loss — velocity field should be consistent:
where is an exponential moving average of . They use segments (MFM) for better expressivity.
5. Action Consistency Regularization (ACR)
Flow matching can drift on long horizons. ACR is a training-only auxiliary loss — no extra inference steps.
Given noisy action , do a one-step decode to the horizon :
Penalize deviation from expert demonstration over a control window :
It biases the learned velocity field toward expert-faithful solutions, reducing drift on longer horizons.
Final training loss:
Results
Efficiency (Table III) — the main win
| Method | Params | FLOPs | GPU Memory |
|---|---|---|---|
| DP3 | 255M | 0.3G | 996MB |
| FlowPolicy | 255M | 0.4G | 980MB |
| MambaPolicy | 47.9M | 0.03G | 137MB |
| KAN-We-Flow | 33.6M | 0.03G | 101MB |
- 86.8% fewer parameters than DP3
- Inference: 8–10ms on Adroit, 6.7–11.8ms on Meta-World → ~100Hz real-time control
- DP3 runs at 103–141ms — over 10× slower
Accuracy (Table I) — smaller AND better
On Meta-World:
- Easy: 92.0 vs 88.2 (MP1) and 85.0 (FlowPolicy)
- Very Hard: 71.3 vs 67.2 (MP1) and 53.0 (FlowPolicy)
Best accuracy across all difficulty tiers while being the smallest model.
Ablations (Table IV) — what each part contributes
| Components Active | SR1 | SR5 |
|---|---|---|
| Baseline only | 59.5 | 45.5 |
| + RWKV time-mixing | 62.0 | 48.3 |
| + RWKV channel-mixing | 64.5 | 50.5 |
| + GroupKAN | 65.0 | 53.1 |
| + ACR | 68.0 | 56.5 |
Every component adds value. RWKV gives the largest single jump; ACR gives the final precision boost.
Summary Table
| Component | Replaces | What it does |
|---|---|---|
| RWKV (time-mixing) | UNet temporal layers | Long-range trajectory context, linear complexity |
| RWKV (channel-mixing) | UNet feature MLPs | Per-feature gated mixing |
| GroupKAN | Heavy MLP layers | Learnable spline functions, fewer parameters |
| CAM | Fixed channel weighting | Highlights task-relevant channels adaptively |
| CFM objective | Standard flow loss | Enforces velocity + endpoint consistency |
| ACR | Nothing (auxiliary) | Anchors one-step decode to expert demos, training only |
Key Takeaways
- UNet is the bottleneck — not the flow matching paradigm itself
- RWKV handles time cheaply — linear complexity vs quadratic attention, bidirectional scan captures full trajectory context
- KAN replaces fixed activations with learned splines — same expressivity, far fewer parameters
- ACR is free at inference — just a training loss that makes the velocity field more expert-faithful
- Result: 86.8% fewer params, ~10× faster inference, still best accuracy across all benchmarks