Before you start
Four ideas this paper assumes you already have.
- A point cloud is an unordered set. N points pi ∈ ℝ³, each with features (colour, LiDAR intensity, normals). Any order of the rows is the same scene, so classic point networks are built to be permutation invariant. That invariance is exactly what PTv3 chooses to break.
- Three ways to feed 3D to a network. Projection (render to images), voxels (3D grid; made fast by sparse convolution, e.g. MinkUNet / SpUNet), and point-based (operate on the points directly, e.g. PointNet++, KPConv, Point Transformers).
- Attention and receptive field. Attn(Q,K,V) = softmax(QKᵀ/√d)·V. The number of points one query can attend to is its receptive field. This paper calls it the patch size.
- The Point Transformer lineage. PTv1 and PTv2 use vector attention over neighbourhoods found by K-nearest-neighbour (KNN) search, with learned relative positional encodings. Accurate, but every layer pays for a neighbour search.
The bottleneck: point transformers do not scale
Two observations in the paper's pilot study set the whole design.
By 2023 the field treated accuracy and efficiency as a trade-off. Point transformers (PTv1, PTv2, Stratified Transformer, Swin3D) chose accuracy: vector attention with learnable relation layers, careful neighbourhoods, complex relative positional encodings. Sparse convolution chose efficiency. The paper's pilot study asks whether that trade-off is real.
Observation 1: scale beats intricacy
Sparse convolution is cheap enough to train on several datasets at once. With multi-dataset joint training (Point Prompt Training, PPT), a sparse-conv backbone goes from 72.2 to 77.0 mIoU on ScanNet semantic segmentation. PTv2 trained from scratch scores 75.4. The simpler model wins by 1.6 points, because its efficiency let it eat more data. Point transformers could not join in, since they were too slow and too memory hungry to train at that scale.
Observation 2: where PTv2 spends its time
Permutation invariance is expensive. Because the points have no order, a network has to rediscover spatial structure at run time: search for neighbours, compute relative positions pairwise. PTv3's whole idea is to pay for structure once, up front, by imposing an order, and then reuse it in every layer.
The scaling principle
One sentence of philosophy, then three concrete replacements.
“Model performance is more significantly influenced by scale than by intricate design.”Wu et al., Sec. 1. The deal: accept a small accuracy loss in mechanisms that matter little after scaling, in exchange for the efficiency that makes scaling possible.
Applied to PTv2, the principle produces three swaps. Each removes a cost that grows with neighbourhood size, and each unlocks something the old design could not afford.
What PTv2 did
- KNN query for every neighbourhood (28% of time)
- Neighbourhood / grouped vector attention, high memory
- Relative positional encoding by pairwise distances (26% of time)
- Receptive field 16 points; BatchNorm everywhere
What PTv3 does instead
- Serialize points along space-filling curves; neighbours are sequence neighbours (Step 3)
- Plain multi-head dot-product attention inside fixed-size patches (Step 4), patches mix by changing the order (Step 5)
- xCPE: one sparse conv with a skip, run before attention (Step 6)
- Receptive field 1024 points; pre-norm blocks with LayerNorm (Steps 7, 8)
The authors are explicit that the serialized neighbourhood is less precise than KNN. Their claim is that the gap is small, and that attention's own re-weighting can live with slightly wrong neighbours, while the efficiency gain is large. The rest of this page checks that claim mechanism by mechanism.
Serialize the point cloud
Turn an unordered set into a 1-D sequence whose neighbours are (mostly) spatial neighbours.
3.1 Space-filling curves
A space-filling curve is a path that visits every cell of a discrete grid exactly once. Formally it is a bijection φ : ℤ → ℤⁿ (here n = 3). Its useful property is locality: cells that are close along the curve are usually close in space. PTv3 uses two classic curves and a transposed variant of each, giving four serialization patterns:
3.2 Serialized encoding
To sort points by a curve, each point gets an integer code. Quantize the position with grid size g, apply the inverse curve φ⁻¹, and pack the batch index b into the high bits of a 64-bit integer:
Encode(p, b, g) = (b << k) | φ⁻¹( ⌊ p / g ⌋ )
↑ ↑
batch index in curve code in the
the leading bits trailing k bits
Sorting all points by this one integer orders them batch by batch, and inside each batch along the chosen curve. Nothing is physically moved. PTv3 stores the resulting permutation (and its inverse) for each of the four patterns, so switching from Z to Hilbert later is just picking a different index array.
Cell x = 2 = 10₂, y = 1 = 01₂. Z-order interleaves y₁x₁y₀x₀ = 0110₂ = 6. The cell is the 7th visited by the curve. In 3D the same interleave runs over three indices, and PTv3 reserves enough trailing bits for the whole quantized scene.
3.3 Try it: serialization playground
Group into patches and attend
The serialized sequence makes attention as simple as it is in a Vision Transformer.
Once the points are in a sequence, patch grouping is just slicing: cut the sequence into consecutive, non-overlapping patches of a fixed size (1024 by default). If the last patch is short, pad it by borrowing points from the neighbouring patch, so every patch has exactly the same length (paper Fig. 4). Reordering and padding are a single indexing operation, which is why this step is almost free.
Inside a patch, PTv3 uses the standard multi-head scaled dot-product attention of ViT, not the vector attention of PTv1/PTv2. The reason is purely practical: dot-product attention is a matrix multiply, so it benefits from FlashAttention and keeps memory flat even at 1024 points per patch. Vector attention computes a weight vector per pair and cannot be fused the same way.
Lost: exact spatial neighbourhoods. A patch boundary can separate two points that are 1 cm apart, and a patch may contain a point from across a jump in the curve. Gained: no neighbour search at all, dense tensors, a receptive field 64× larger than PTv2's 16 neighbours, and attention that is still cheap at 4096 points per patch. The paper's line for this is “scaling it up is all we need.”
Let patches talk: patch interaction
Non-overlapping patches never exchange information unless something changes between layers.
If every layer used the same patch boundaries, a point would see the same 1023 companions forever and the receptive field would never grow beyond one patch. Swin Transformer solves this for images by shifting windows. PTv3 evaluates four options (paper Fig. 5):
Standard
Same grouping in every layer. No interaction.
Shift Dilation
Every other layer groups every k-th point, so patches become dilated (from OctFormer).
Shift Patch
Offset the boundaries by half a patch in alternate layers (Swin-style). Needs attention masks.
Shift Order (default)
Cycle the serialization pattern Z → TZ → H → TH across successive layers. Boundaries move for free, because the order was precomputed.
Shuffle Order (marked with an asterisk in the paper, and also a default) adds randomness: before each stage, the sequence of the four patterns is randomly permuted. Each attention layer is then not tied to one pattern, which acts as a regulariser and improves generalisation.
| Patterns | S.O. | + S.D. | + S.P. | + Shuffle O. |
|---|
Positional encoding without the cost
Attention ignores position, so position has to be injected. The question is where and how cheaply.
Dot-product attention is permutation equivariant: shuffle the inputs and the outputs shuffle the same way. 3D networks therefore add positional information. The paper benchmarks five options:
- APE, absolute positional encoding: embed xyz and add it to the features. Cheap, weak.
- RPE, relative positional encoding: for every attended pair compute the offset, map it through a learned layer or lookup table, add to the attention logits. Accurate, and 26% of PTv2's forward time.
- cRPE, contextual RPE as in Swin3D: RPE made feature-dependent. Even slower.
- CPE, conditional positional encoding (OctFormer): a depthwise sparse convolution on the voxel grid before attention. The kernel offsets encode relative position implicitly.
- xCPE, PTv3's variant: a full sparse convolution layer with a skip connection, prepended to the attention block.
Show as table
| Encoding | mIoU | Latency |
|---|---|---|
| APE | 72.1 | 50 ms |
| RPE | 75.9 | 72 ms |
| cRPE | 76.8 | 101 ms |
| CPE | 76.6 | 58 ms |
| xCPE | 77.3 | 61 ms |
Assemble the network
Block, pooling, and the U-Net macro structure. Each choice is backed by an ablation.
7.1 The block
PTv3 adopts the modern pre-norm Transformer block and replaces BatchNorm with LayerNorm inside the block. BatchNorm statistics depend on batch size, which varies badly across point cloud tasks. Written out, one block is:
x = x + SparseConv(x) # xCPE
x = x + Attention(LN(x)) # multi-head dot-product attention inside each patch
x = x + MLP(LN(x)) # MLP ratio 4, GELU
Block structure (paper Table 18)
- Traditional (op → norm → act): 76.6
- Post-norm: 72.3
- Pre-norm: 77.3
Normalization (paper Table 17)
- BN in block, BN in pooling: 76.7
- LN in block, LN in pooling: 76.1
- BN in block, LN in pooling: 75.6
- LN in block, BN in pooling: 77.3
7.2 Pooling between stages
PTv3 keeps PTv2's grid pooling: coarsen the voxel grid by ×2, and pool all points that fall into one coarse cell into a single point. BatchNorm stays here; the ablation above shows it is essential for stabilising the feature distribution during pooling. Shuffle Order is also applied at pooling time, since the pooled points need a fresh serialization anyway.
7.3 Macro architecture
| Stage | Grid stride | Depth | Channels | Heads | Patch size |
|---|---|---|---|---|---|
| Embedding | 1× | 2 | 32 | – | – |
| Encoder 1 | 2× | 2 | 64 | 4 | 1024 |
| Encoder 2 | 4× | 2 | 128 | 8 | 1024 |
| Encoder 3 | 8× | 6 | 256 | 16 | 1024 |
| Encoder 4 | 16× | 2 | 512 | 32 | 1024 |
| Decoder 4 → 1 | 16× → 2× | 1 each | 256, 128, 64, 64 | 16, 8, 4, 4 | 1024 |
Paper Table 15. Other defaults: MLP ratio 4, QKV bias on, drop path 0.3, serialization Z + TZ + H + TH, patch interaction Shift Order + Shuffle Order, positional encoding xCPE. Total 46.2 M parameters.
7.4 The forward pass in pseudo-code
# Simplified PTv3 forward pass (semantic segmentation)
def ptv3_forward(xyz, feats, batch, grid=0.02):
# Step 3 -- serialize once: one permutation per pattern
cells = floor(xyz / grid)
orders = [argsort((batch << k) | curve(cells))
for curve in (z_order, trans_z, hilbert, trans_hilbert)]
x = embedding(feats) # 32 channels
skips = []
for s in range(4): # encoder stages, depth [2, 2, 6, 2]
x, xyz, orders = grid_pool(x, xyz, orders, stride=2) # BatchNorm inside
orders = shuffle(orders) # Step 5 -- Shuffle Order
for i in range(depth[s]):
order = orders[i % 4] # Step 5 -- Shift Order
x = x + sparse_conv(x) # Step 6 -- xCPE
seq = pad_to_patches(x[order], patch=1024) # Step 4 -- grouping
seq = seq + attention(layernorm(seq), heads=heads[s]) # dot-product
x = unpad(seq)[inverse(order)]
x = x + mlp(layernorm(x))
skips.append((x, xyz))
for s in reversed(range(4)): # decoder, 2 blocks per stage (released code; Table 15 prints 1)
x = unpool(x) + skips[s].x
for b in range(2): x = block(x)
return seg_head(x) # per-point class logits
7.5 Training recipe
| Setting | Indoor (ScanNet, S3DIS) | Outdoor (nuScenes, SemanticKITTI, Waymo) |
|---|---|---|
| Optimizer / schedule | AdamW, cosine | AdamW, cosine |
| Loss | Cross-entropy + Lovász | Cross-entropy + Lovász |
| Learning rate / weight decay | 5e-3 / 5e-2 | 2e-3 / 5e-3 |
| Block LR scaler | 0.1 | 0.1 |
| Batch size / epochs | 12 / 800 (warm-up 40) | 12 / 50 (warm-up 2) |
| Grid size g | 0.02 m | 0.05 m |
| Augmentation | rotate, scale, flip, jitter, elastic distort, colour jitter, grid sampling, sphere crop | rotate (z), scale, flip, jitter, grid sampling |
| Joint training (PPT) | ScanNet ×2, S3DIS ×1, Structured3D ×4; batch 24, 120k iters | nuScenes, SemanticKITTI, Waymo ×1 each; batch 24, 180k iters |
Paper Tables 12, 13, 16. Implementation in Pointcept; outdoor detection uses OpenPCDet with a CenterPoint head. Notably PTv3 needs no point-range clipping, which most outdoor models rely on.
Scale it up
The payoff of Steps 3 to 7: a receptive field that can grow without the cost growing with it.
Show as table
| Patch size | 16 | 32 | 64 | 128 | 256 | 1024 | 4096 |
|---|---|---|---|---|---|---|---|
| mIoU | 75.0 | 75.6 | 76.3 | 76.6 | 76.8 | 77.3 | 77.1 |
| Std | 0.15 | 0.22 | 0.32 | 0.36 | 0.28 | 0.22 | 0.39 |
Inference latency (ms)
Inference memory (GB)
Show as table (with training cost and parameters)
| Model | Params | Train latency | Train memory | Infer latency | Infer memory |
|---|---|---|---|---|---|
| MinkUNet / 3 | 37.9 M | 163 ms | 3.3 G | 48 ms | 1.7 G |
| MinkUNet / 5 | 170.3 M | 455 ms | 5.6 G | 145 ms | 2.1 G |
| MinkUNet / 7 | 465.0 M | 1120 ms | 12.4 G | 337 ms | 2.8 G |
| PTv2 / 16 | 12.8 M | 213 ms | 10.3 G | 146 ms | 12.3 G |
| PTv2 / 24 | 12.8 M | 308 ms | 17.6 G | 180 ms | 15.2 G |
| PTv2 / 32 | 12.8 M | 354 ms | 21.5 G | 213 ms | 19.4 G |
| PTv3 / 256 | 46.2 M | 120 ms | 3.3 G | 44 ms | 1.2 G |
| PTv3 / 1024 | 46.2 M | 119 ms | 3.3 G | 44 ms | 1.2 G |
| PTv3 / 4096 | 46.2 M | 125 ms | 3.3 G | 45 ms | 1.2 G |
Indoor (ScanNet, paper Table 11) tells the same story: PTv3 infers in 61 ms / 5.2 GB against PTv2's 191 ms / 18.2 GB, Swin3D's 456 ms / 8.8 GB and OctFormer's 86 ms / 12.5 GB, while MinkUNet is 90 ms / 4.7 GB.
Efficiency is what makes the second kind of scaling affordable. With Point Prompt Training the same architecture is trained jointly on several datasets (indoor: ScanNet, S3DIS, Structured3D; outdoor: nuScenes, SemanticKITTI, Waymo). Rows marked ● in Step 9 use this; rows marked ○ are trained from scratch on one dataset.
What it achieves
Highest reported numbers per benchmark. ○ trained from scratch, ● multi-dataset joint training (PPT).
Semantic segmentation (mIoU %)
| Method | ScanNet val | ScanNet test | ScanNet200 val | ScanNet200 test | S3DIS Area 5 | S3DIS 6-fold |
|---|---|---|---|---|---|---|
| ○ MinkUNet | 72.2 | 73.6 | 25.0 | 25.3 | 65.4 | 65.4 |
| ○ OctFormer | 75.7 | 76.6 | 32.6 | 32.6 | – | – |
| ○ Swin3D | 76.4 | – | – | – | 72.5 | 76.9 |
| ○ PTv2 | 75.4 | 74.2 | 30.2 | – | 71.6 | 73.5 |
| ○ PTv3 | 77.5 | 77.9 | 35.2 | 37.8 | 73.4 | 77.7 |
| ● PTv3 + PPT | 78.6 | 79.4 | 36.0 | 39.3 | 74.7 | 80.8 |
| Method | nuScenes val | nuScenes test | SemanticKITTI val | SemanticKITTI test | Waymo val mIoU | Waymo val mAcc |
|---|---|---|---|---|---|---|
| ○ MinkUNet | 73.3 | – | 63.8 | – | 65.9 | 76.6 |
| ○ SphereFormer | 78.4 | 81.9 | 67.8 | 74.8 | 69.9 | – |
| ○ PTv2 | 80.2 | 82.6 | 70.3 | 72.6 | 70.6 | 80.2 |
| ○ PTv3 | 80.4 | 82.7 | 70.8 | 74.2 | 71.3 | 80.5 |
| ● PTv3 + PPT | 81.2 | 83.0 | 72.3 | 75.5 | 72.1 | 81.3 |
Paper Tables 5 and 7. From scratch, PTv3 beats PTv2 by 3.7 on the ScanNet test set and 4.2 on S3DIS 6-fold; with joint training the margins widen to 5.2 and 7.3. Outdoors it beats SphereFormer by 2.0 (nuScenes) and 3.0 (SemanticKITTI) on validation.
Other tasks
| Task | Benchmark · metric | Best prior in table | ○ PTv3 | ● PTv3 + PPT |
|---|---|---|---|---|
| Instance segmentation (PointGroup head) | ScanNet · mAP | 38.3 (PTv2) | 40.9 | 42.1 |
| Instance segmentation (PointGroup head) | ScanNet200 · mAP | 21.4 (PTv2) | 23.1 | 24.0 |
| 3D object detection (CenterPoint head) | Waymo val, 1 frame · mean L2 mAPH | 67.2 (FlatFormer) | 70.5 | – |
| 3D object detection (CenterPoint head) | Waymo val, 3 frames · mean L2 mAPH | 72.0 (FlatFormer) | 73.0 | – |
| Data efficiency | ScanNet, 1% of scenes · mIoU | 26.0 (MinkUNet) | 25.8 | 31.3 |
| Data efficiency | ScanNet, 20 labelled points per scene · mIoU | 58.4 (PTv2) | 60.1 | 62.4 |
Paper Tables 8, 9, 10. The backbone is dropped into existing task frameworks (PointGroup, CenterPoint) without task-specific changes, which is the practical meaning of “backbone”.
Limits and outlook
What the authors flag, and what to take away.
- Attention mechanism. Plain dot-product attention converges more slowly than vector attention, and scaling depth further runs into the “attention sink” problem seen in language models. The authors see this as an open problem, not a solved one.
- Parameter scaling. PTv3 scales the receptive field and the data, not the parameter count (46 M). The paper argues current point transformers are already over-capacity for existing datasets, and that model scale should grow together with data, tasks and modalities.
- Other modalities. Serialization turns any n-D grid into a 1-D sequence, so images can be fed through the same backbone. The authors suggest this as a route to joint 2D–3D pre-training.
Takeaways for this course
- Permutation invariance is a cost, not just a property. Breaking it with a fixed serialization removes neighbour search entirely.
- A space-filling curve plus sorting gives approximate neighbourhoods that attention can tolerate, provided the patch boundaries change between layers (Shift Order) and across training (Shuffle Order).
- Relative position can be supplied by one sparse convolution before attention (xCPE) instead of pairwise computation inside attention.
- Once attention is a plain matrix multiply, hardware tricks like FlashAttention make the receptive field almost free: 256 to 4096 points cost the same.
- The resulting efficiency is what allows multi-dataset training, and that, more than any single module, is where the final accuracy comes from.
Check yourself
Six questions. Open each one to see the answer the paper supports.
1. Why is KNN expensive in PTv2, and how does PTv3 avoid it?
Because the points are unordered, every layer must search for each point's K nearest neighbours (28% of the forward time). PTv3 sorts the points once along a space-filling curve and treats sequence neighbours as spatial neighbours, so neighbourhoods become index slices and no search is needed.
2. In Encode(p, b, g) = (b << k) | φ⁻¹(⌊p/g⌋), what are the roles of b, g and k?
g is the grid size used to quantize the continuous position into a cell index. φ⁻¹ maps the cell to its position along the curve, stored in the trailing k bits. b is the batch index shifted into the leading bits, so a single sort orders points by batch first and by curve position second.
3. Why does a single serialization pattern limit the receptive field, and what fixes it at no extra cost?
With fixed patches a point only ever attends to the same 1023 companions, so stacking layers does not enlarge its receptive field. Shift Order cycles through Z, TZ, H and TH across layers; each pattern draws the patch boundaries differently, and since all four permutations were precomputed, switching costs nothing (61 ms vs. 97–99 ms for mask-based Shift Patch / Shift Dilation).
4. Why is xCPE both cheaper and about as accurate as RPE?
RPE computes an encoding for every attended pair inside attention, which is quadratic in the patch and blocks fused kernels. xCPE is one sparse convolution before attention; its kernel offsets already encode relative geometry, so position is injected in a single linear-cost pass and attention stays FlashAttention-compatible. In the ablation xCPE scores 77.3 at 61 ms versus RPE's 75.9 at 72 ms.
5. Where does PTv3 keep BatchNorm, and why?
Inside the grid pooling layers only. Attention blocks use LayerNorm (pre-norm) because batch statistics are unreliable across tasks with varying batch size, but the ablation shows BatchNorm is needed to stabilise the feature distribution when points are pooled. The mix scores 77.3; all-LN scores 76.1.
6. Patch size 4096 is slightly worse than 1024 and more variable. Suggest a reason.
The paper reports the numbers without an explanation, so any answer is a hypothesis. A reasonable one: the larger the patch, the more of it lies across a jump in the curve, so more attended points are far away in space and act as noise; and at 4096 points per patch the number of patches per scene is small, so the Shift and Shuffle mechanisms have fewer distinct groupings to mix.
Glossary and reference
- mIoU
- Mean intersection-over-union across classes, the standard semantic segmentation metric.
- mAP, mAPH
- Mean average precision for instance segmentation and detection; mAPH weights by heading accuracy (Waymo).
- Sparse convolution
- 3D convolution evaluated only at occupied voxels (MinkowskiEngine, spconv). The backbone family PTv3 compares against, and the operator inside xCPE and the embedding.
- FlashAttention
- A fused GPU kernel for dot-product attention that never stores the full attention matrix, so memory stays linear in sequence length.
- PPT (Point Prompt Training)
- Multi-dataset joint training with dataset-specific prompts and normalisation, from the same group (Wu et al., CVPR 2024).
- Grid pooling
- PTv2's downsampling: voxelise at a coarser grid and pool the points in each cell into one.
Cite as: Xiaoyang Wu, Li Jiang, Peng-Shuai Wang, Zhijian Liu, Xihui Liu, Yu Qiao, Wanli Ouyang, Tong He, Hengshuang Zhao. Point Transformer V3: Simpler, Faster, Stronger. CVPR 2024. arXiv:2312.10035.