arXiv

Trace4D

Grounded Spatiotemporal Reasoning via 4D State Sequences

Wooseok Jang1 Seungryong Kim1 Yan Lu2 Lei Ji2
1KAIST AI  ·  2Microsoft Research Asia
Paper arXiv Code Data

TL;DR. Trace4D teaches a VLM to first write down where things are at each annotated frame, as a 4D state sequence of 2D boxes and 3D centroids, and then reason over how those states change, checking each change against what is visible in the video before answering.

Example

Trace4D predicts where the boxer and the referee are at five annotated frames. Its reasoning puts their centroid distance at about 0.27 at frame 0, 0.11 at frame 8, and 0.17 at frame 31. It matches this to the visible approach and the later separation and answers B: closer together, then farther apart. Qwen3-VL and MLLM-4D both answer wrong.

FrameBoxer (x, y, z)Referee (x, y, z)
0(−0.05, −0.01, 1.00)(−0.16, 0.01, 0.75)
8(−0.01, 0.04, 0.92)(−0.04, 0.02, 0.82)
16(−0.05, 0.02, 0.89)(0.01, 0.02, 0.80)
23(−0.11, 0.02, 0.86)(0.03, 0.03, 0.79)
31(−0.16, 0.04, 0.82)(0.01, 0.02, 0.79)

Predicted 3D centroids in the camera frame at each timestep (x right, y down, z forward). Boxes in the video are the predicted bbox_2d, interpolated between annotated frames.

79.25
Trace4D-Bench overall (4B), vs 38.92 for the Qwen3-VL-4B-Instruct base model
64.32
VLM4D accuracy (4B), the best non-proprietary model evaluated
600K
4D perception examples from about 362K in-the-wild clips
69,331
grounded QA examples with 4D-grounded CoT supervision

Abstract

Understanding how objects and their spatial relationships evolve over time remains challenging for vision-language models (VLMs), particularly under changing viewpoints. Recent approaches incorporate explicit 4D information into model responses, but how this information supports the final answer can remain implicit. We present Trace4D, a framework that trains VLMs to use predicted 4D state changes and temporal visual observations as joint evidence for video reasoning. Its 4D-grounded chain-of-thought (CoT) consists of a structured 4D state sequence, temporal visual analysis, and 4D-grounded reasoning that connects state changes to observations of the same targets over matching intervals and explains how they support the answer. From in-the-wild videos, we construct Trace4D-Train with 600K 4D perception examples and approximately 70K grounded question–answer (QA) examples with 4D-grounded CoT supervision. Joint supervised fine-tuning learns state prediction and grounded reasoning together, followed by geometry-aware GRPO that refines responses using answer correctness and reference 4D state agreement. At inference, Trace4D predicts its own 4D states and reasoning from video, without reference annotations or an external geometric model. Experiments on our held-out Trace4D-Bench and the external VLM4D benchmark show improved QA accuracy over the base VLMs and demonstrate the benefit of combining 4D state changes with temporal visual evidence.

Videos

Trace4D on held-out clips

Each clip is shown with its question, Trace4D's answer, and the predicted 4D values the reasoning cites. All Trace4D-Bench clips come from source videos excluded from training.

Trace4D-Bench · Relative · Distance to camera
Following the camera, how does the distance between the dog and the camera change?
Trace4D: B. It stays about the same distance, then moves farther from the camera.
dist(cam) 1.02 f0–9 → 1.30 → 1.60 → 1.81 → 2.12 f31
Trace4D-Bench · Relative · Direction from camera
Following the camera, how does the direction from the camera to the guinea pig change?
Trace4D: B. It is to the front-left, then to the front.
x −0.351 f0 → −0.181 → −0.006 → 0.019 f31, z ≈ 1.06
Trace4D-Bench · Absolute · Speed comparison
Anchored to frame 27, compare the speed between the white dog and the labrador.
Trace4D: B. They move at a similar speed, then the second is faster.
f27–31 step: white dog 0.000 vs labrador 0.118 (z 0.979 → 0.869)
Trace4D-Bench · Absolute · Distance to anchor camera
Anchored to frame 0, how does the distance between the plastic wrap and the anchor camera change?
Trace4D: A. It moves farther from the camera, then stays about the same distance.
dist 1.00 f0 → 1.38 f4 → ≈1.38 … 1.37 f31
VLM4D · Synthetic
Which direction did the robot arm move?
Trace4D: D. right
x −0.044 f0 → 0.099 → 0.180 → 0.262 → 0.374 f31; cam ≈ 0
VLM4D · Real (DAVIS)
Is the swan swimming forwards or backwards from its own perspective?
Trace4D: D. forwards
x −0.076 f0 → 0.009 → 0.081 → 0.151 → 0.223 f31; cam ≈ 0
Method

A response that shows its geometry

Every Trace4D answer is generated as y = [s; o; r; a]: the model writes its own 4D state sequence, describes what it sees phase by phase, links the two, and only then answers. The predicted states stay in context, so later reasoning can cite exact positions and their changes.

<4d> · s

Structured 4D state sequence

For each annotated frame, every queried entity gets a label, a normalized 2D box, and a 3D centroid. The camera appears as cam when the question needs it.

<visual> · o

Temporal visual analysis

Question-relevant observations across temporal phases: actions, interactions, and occlusions that geometry alone does not capture.

reasoning · r → answer · a

4D-grounded reasoning

Each visual observation is tied to the matching state change for the same target, interval, and coordinate frame, then used to justify the option.

Trace4D pipeline: QA generation from frozen geometry models, GPT-generated 4D-grounded CoT, and two-stage training with joint SFT and GRPO.
Overview. Reference 4D states from Grounded SAM and Pi3 drive template-based QA construction and teacher-generated CoT. Joint SFT learns state prediction and grounded QA together, then geometry-aware GRPO rewards answer, format, position, displacement, and bounding-box agreement.

Two-stage training

Stage 1: Joint SFT. Starting from the base VLM, we train in one mix on 600K perception examples, whose target is the <4d> block alone, and about 70K grounded QA examples, whose target is the full response.

Stage 2: Geometry-aware GRPO. On about 7K QA examples, the policy is rewarded for the correct answer and for predicted states that agree with the reference: position error per timestep (Rpos), the displacement vector between consecutive timesteps (RΔ), and box IoU (Rbbox). Reference states are used only to compute rewards. At inference the model sees just the video and the question, with no external geometric model.

Data

Trace4D-Train and Trace4D-Bench

Source videos come from Koala-36M, selected for observable scene or object dynamics. Grounding DINO and SAM 2 track the entities, and Pi3 lifts them to 3D point maps and camera poses. Object centroids are the mean of reconstructed points inside each mask. After box-size checks and a multimodal verifier, the retained tracks become reference 4D states.

Questions come in two coordinate conventions. Relative questions use the camera frame at each timestep. Absolute questions use a fixed anchor-camera frame, so motion can be compared over time. The held-out Trace4D-Bench has 1,200 questions, 100 for each of 12 types. Splits are made at the source-video level, so no benchmark source is used in SFT, GRPO, or any ablation.

Reference annotation example: two entities tracked across four frames with bounding boxes and 3D centroids.
Example of 4D reference annotations. Colored boxes identify the same two entities across four frames; labels report their bounding-box coordinates and 3D centroids.
Dataset statistics: dynamics distribution, question-type distribution, and mean reasoning length by question type.
Dataset statistics. (a) Joint distribution of object and camera dynamics. (b) Question-type proportions for relative and absolute QA. (c) Mean reasoning token counts by question type.
Results

Trace4D-Bench and VLM4D

Multiple-choice accuracy (%). Open-source models decoded greedily.

Trace4D-Bench, per question type

Trace4D improves on its Qwen3-VL-4B-Instruct base model by 40.33 points and beats every evaluated baseline on all 12 question types.

ModelRelativeAbsoluteOverall
SpdSpd CompDistCamDistObjDirCamDirObjAvg.SpdSpd CompDistCamDirCamDirObjMotionAvg.
Show all baselines

VLM4D

On VLM4D's real and synthetic videos, Trace4D ranks first among non-proprietary models, 8.92 points above its Qwen3-VL-4B-Instruct base model. Most of the gain comes from the synthetic split.

ModelSyn.RealAvg.
Proprietary
GPT-4o54.3856.0255.62
GPT-562.7074.6971.75
Open source
Qwen3-VL-4B-Instruct48.7657.5555.40
Qwen3-VL-8B-Instruct55.7360.2559.14
VG-LLM-8B34.8348.8745.43
VLM-3R-7B35.2852.8848.57
MLLM-4D-8B55.0563.0961.12
GSM-7B50.1147.5648.18
4DThinker-3B24.7238.9535.46
Trace4D (Qwen3-VL-4B-Instruct)77.3060.1064.32

Bold and underline mark the best and second-best non-proprietary scores.

Predicted states

We evaluated the final 4B model's own <4d> output on all 1,200 benchmark questions. Errors are larger in the Absolute setting, where objects must be placed in one fixed scene frame.

SettingIoU ↑Centroid err. ↓Traj. L2 ↓
Relative0.75560.09940.0852
Absolute0.71760.26540.1428

Better states go with better answers. Grouping responses into thirds by trajectory error:

QA acc. (%)Low L2Mid L2High L2
Relative89.9081.3771.72
Absolute91.9275.0065.66

Citation

@article{trace4d2026,
  title   = {Trace4D: Grounded Spatiotemporal Reasoning via 4D State Sequences},
  author  = {Jang, Wooseok and Kim, Seungryong and Lu, Yan and Ji, Lei},
  journal = {arXiv preprint},
  year    = {2026}
}