R3

Film a long walk, then ask a computer to rebuild the 3D scene. Most models drift as the walk grows. R3 asks only how each camera sits against another camera, and its error stays flat.

Tap a method and watch its estimated path stray from the true one. The length buttons show how the error grows with the walk. Then we build, piece by piece, why R3 stays flat. It has 372M parameters, runs at 20+ frames per second, and had the lowest trajectory error on 24 of 25 long scenes.

You need what a camera pose is and the idea of a network that outputs numbers. We build the rest from zero. By the authors Congrong Xu, Huachen Gao, Xingyu Chen, Yuliang Xiu, Jun Gao and Anpei Chen (arXiv 2605.26519).

Stream a long video

Ready

Pick a method.

The bars are the paper's real numbers: mean accuracy error (Acc: how far the rebuilt 3D points sit from the true surface, lower is better) on 7-Scenes dense reconstruction at 200, 500 and 1000 frames (Table 4). OOM means the method passed the 48 GiB GPU memory budget. The path and its drift are a toy: the wobble is scaled to each method's real number, not measured.

Chapter 0

Why a Global Frame Breaks

See why asking a network for every camera's place in one shared frame gets harder the longer the video runs

You walk through a house for two minutes and film it with your phone. Afterward you want a 3D model: the walls, the furniture, and the exact path your phone took. A computer must work out two things for every frame of that video.

The first is the camera pose: where the camera stood, and which way it faced. The second is a depth map: how far away each pixel is. With both, you can lift every pixel into 3D and stack all the frames into one scene.

For decades this took a long pipeline. It matched points between frames, solved the geometry, and polished the answer with an optimiser. Recent models skip the pipeline. A feed-forward model reads the images once, in a single pass through a network, and writes out poses and depth. There is no solver loop. DUSt3R started this line, and VGGT made it fast and accurate on short clips. This paper builds on a successor named DA3 (Depth Anything 3).

The hidden catch: a pose needs a ruler

A pose is only a set of numbers if you say what they are measured against. “The camera is 3 steps to the right” means nothing until you say: to the right of what? You need an origin and three axes. That reference is a coordinate frame.

Most feed-forward models pick one frame for the whole video. Often it is the first camera. Every other pose is written in that frame. We call it the global frame. The paper says these models are “built around a global coordinate frame”, and that this “works well for short offline clips”.

Now film a longer video. By frame 600 you stand far from where frame 1 stood. The network must still write your place as a distance from frame 1. That number is large. The network saw few large numbers when it learned, because it trained on short clips of at most 32 frames. The authors state the failure plainly: translation magnitudes “grow unbounded over time”.

Streaming makes it worse. Frames arrive one at a time, and the first few views fix the frame. Every later pose must obey that early, arbitrary choice. Try the walk below. Drag the length of the video and watch two numbers.

Walk further, watch the target grow

The camera takes one step per frame along a winding path. The warm line is how far frame n is from frame 1. The teal line is how far it is from the frame 8 earlier. The shaded band is the range a 32-frame training clip can show.

300

Illustrative toy: one step of travel per frame, a smooth winding heading, no paper data. The 32-frame band comes from the paper's training clips (4 to 32 views, App. F). A step is any unit you like; only the shapes of the two curves matter.

The warm line leaves the band after about 30 frames and never comes back. The teal line never leaves it. That gap is the paper’s whole motivation.

The paper’s move: ask for local facts, assemble later

The authors suggest a different job for the network. Do not ask “where is every camera in one frame?” Ask “how does camera j sit relative to camera i?” This is relative regression: the network regresses (predicts a number for) the move between two cameras. A separate step builds the global trajectory afterward. They give two reasons it helps.

  1. The size of a relative move depends on the baseline, the gap between the two cameras. It does not depend on how long the video is. The target stays “in distribution”: inside the range of numbers the network met in training.
  2. A video of N frames gives many pairs. Absolute poses give only N targets. Pairs give far more.

One problem remains. Pairs are not equally good. Some views barely overlap, some are blurred, some have a tiny baseline. If the network answers every pair, how does the assembly step know which answers to trust? So R3 adds a confidence: for each pair, the network also says how sure it is. Chapter 4 derives how it learns this.

R3 stands for 3D Reconstruction via Relative Regression. It has 372M parameters, about a third of recent 1B-class models. The authors trained it on six 48 GB GPUs. Figure 1 of the paper reports 20+ frames per second. On a set of long outdoor and indoor videos (DL3DV), it gives the lowest trajectory error on 24 of 25 scenes.

The road

The chapters follow the data. First the background, then the target, the network, the loss, the assembly, the memory, the numbers and the doubts.

  1. Poses, frames and relative moves: what a pose is, and why a relative move ignores the origin.
  2. Three ways to supervise a pose: VGGT, π³ and R3 as graphs.
  3. The network: camera tokens, the pair head, the nine outputs.
  4. Confidence: the loss that teaches the network to rate itself.
  5. Depth, data and training: the second head and the two-stage recipe.
  6. Assembling the trajectory: compose, then fuse with softmax weights.
  7. Streaming: the keyframe bank, the outlier gate, the reset.
  8. Full context: all pairs, one refinement solve.
  9. Results: what each table supports.
  10. Ablations and limits: what is shown, and what is not.
  11. Field Guide: numbers, code, links, source.
A model writes every camera pose in the frame of camera 1. Why does this get harder as the video gets longer?

Chapter 1

Poses, Frames and Relative Moves

Learn what a camera pose is, how two cameras relate, and why a relative move does not care where the world's origin sits

You and a friend stand in a hall. Your friend is two paces ahead of you and turned a little to the left. You can say this without a map. “Two paces ahead, turned left” is a fact about the pair of you. It stays true if you both walk to another room.

Now give each of you a place on a map of the house: “you at (2, 1), your friend at (2, 2)”. These numbers depend on where the map’s corner is. Move the corner and every number changes. This chapter is about the difference between those two kinds of fact.

A pose is a rotation and a translation

A camera pose has two parts. The translation says where the camera sits: three numbers in 3D, two in the flat toy of this chapter. The rotation says which way it faces. In the flat toy a single angle is enough.

R3 works in 3D. It stores a rotation as a unit quaternion, four numbers q that always have length 1. You do not need to do quaternion arithmetic by hand. Three facts are enough. Two quaternions multiply with the symbol ⊗ to give the rotation “first one, then the other”. A quaternion q(v) can rotate a vector v. And q and −q describe the same rotation, a detail Chapter 6 uses.

The paper writes the pose of camera i as Ti = (qi, ti). It is a camera-to-world pose: it turns a point written in the camera’s own axes into a point on the map.

The move between two cameras

The relative pose from camera i to camera j answers: where is j, when I stand at i and use i’s own axes? Call it Ti→j. The paper defines it with an inverse:

Ti→j
The relative pose: the move from camera i to camera j, written in camera i’s own axes. It has its own rotation and translation.
Ti−1
The inverse of i’s pose. It undoes “camera i to map”, so it takes you from the map back into i’s own axes.
Tj
The pose of camera j on the map.

Read it right to left. Tj puts j on the map. Ti−1 then re-measures the map from i’s point of view. Turn the equation around and you get the rule that builds poses: Tj = Ti Ti→j. Stand at i, then make the move.

In the flat toy the rule is easy to write. Angles add: θj = θi + θi→j. The move must be turned from i’s axes into map axes before it is added: tj = ti + R(θi) ti→j, where R(θ) is the rotation by θ. The paper’s 3D version, which Chapter 6 uses, has the same shape: qj = qi ⊗ q̂i→j and tj = ti + qi(t̂i→j).

A worked example

Put camera i at (2, 1), facing 90 degrees (straight up the map). Let the relative move be “1 unit ahead, 0 to the side, turn 30 degrees left”. In i’s own axes that is ti→j = (1, 0).

  1. Turn the move into map axes. R(90°) takes (1, 0) to (0, 1).
  2. Add it to i’s place: (2, 1) + (0, 1) = (2, 2). That is camera j.
  3. Add the angles: 90° + 30° = 120°. Camera j faces 120 degrees.

Now turn the whole map by 40 degrees about its corner. Camera i is now at (0.89, 2.05) facing 130 degrees. Camera j is at (0.25, 2.82) facing 160 degrees. Every absolute number changed. Compute the relative move again, Ti−1 Tj, and you get (1, 0) and 30 degrees, exactly as before. Try it.

Turn the world, keep the move

Left: the map, with cameras i (warm) and j (teal). Right: the same pair seen from camera i. Drag the slider to turn the map and read both panels.

40°

Flat 2D toy with the worked example above: camera i at (2, 1) facing 90°, camera j one unit ahead of it and turned 30°. The numbers are computed live in your browser. Nothing here is from the paper's experiments.

Why does this hold? Let G be any move of the whole world, a turn or a shift. It changes every pose on the map by the same G. Watch what happens to the relative pose:

(G Ti)−1 (G Tj)
The relative pose after you move the whole world by G. A product's inverse flips the order: (G Ti)−1 = Ti−1 G−1.
G−1 G
These two sit side by side, and a move followed by its undo is nothing. They cancel.
Ti−1 Tj
What is left is the original relative pose. The origin of the map has dropped out.

This is the property R3 is built on. A relative pose has no origin to choose. The network never has to decide which frame is “the” frame. The paper says it plainly: “since each edge only relates two cameras, it does not require a global coordinate frame.”

The same idea in a few lines of code:

import numpy as np
def pose(x, y, th):                       # 2D camera-to-world pose as a 3x3 matrix
    c, s = np.cos(th), np.sin(th)
    return np.array([[c, -s, x], [s, c, y], [0, 0, 1]])

Ti = pose(2, 1, np.deg2rad(90)); Tj = pose(2, 2, np.deg2rad(120))
Tij = np.linalg.inv(Ti) @ Tj              # relative move: (1, 0) ahead, 30 degrees
G = pose(0, 0, np.deg2rad(40))            # turn the whole world
print(np.allclose(np.linalg.inv(G @ Ti) @ (G @ Tj), Tij))   # True: origin dropped out
print(np.allclose(Ti @ Tij, Tj))                            # True: compose to rebuild j

The catch: chains drift

If you know T1 and every neighbouring move, you can rebuild all poses by chaining: T3 = T1 T1→2 T2→3. But each move carries a small error, and a chain adds those errors one after another. A thousand frames mean a thousand small errors in a row. This is drift.

R3 does not rely on one chain. It asks the network for the move between many pairs, builds one candidate pose for frame j from each, and averages them with weights. Chapter 6 shows how this keeps the errors from piling up.

You rigidly move the whole scene, and with it both cameras, to a new place on the map. What happens to Ti→j = Ti−1 Tj?

Chapter 2

Three Ways to Supervise a Pose

Compare VGGT, π³ and R3 as graphs of cameras and edges, and count what each one teaches the network

Three teachers grade a student who places pins on a map of a house, one pin for each camera. The first teacher says: “Measure every pin from pin 1, and I will check only those distances.” The second says: “I will check the distance between every pair of pins, and I count each pair the same.” The third says: “I will check every pair too, but you must tell me how sure you are of each answer. I trust the sure ones more.”

The three teachers are three ways to supervise camera poses. The paper draws them as pose graphs in its Figure 2. A pose graph has cameras as dots (nodes). A line (edge) between two dots means “the loss checks this pair”. An arrowhead means the check has a direction: from camera i to camera j.

Teacher one: VGGT, everything from the first camera

VGGT fixes the world frame to the first camera. It supervises only the edges from that anchor to every other camera. The loss sums a pose distance dpose between the prediction and the truth, with every truth written in the same anchored frame:

Labs
The absolute pose loss, as the paper writes it in its Appendix D.
∑j=1N
Add up one term for each of the N cameras.
dpose( T̂j, T*j )
How far the predicted pose T̂j is from the true pose T*j. Both are written in the first camera’s frame.

The target is simple. The paper names its cost: the network “must learn a coordinate choice that is arbitrary from the scene’s perspective and increasingly difficult to preserve as the trajectory grows.”

Teacher two: π³, every pair, equal weight

π³ (written Pi3 in the figure) predicts one pose per view, but it grades them through all pairs. It builds the relative pose from two predictions, T̂i−1 T̂j, and compares it with the true relative pose. A fixed first-frame frame no longer matters at the loss level. A video with N frames gives N(N−1)/2 unordered pairs to learn from.

Lπ³
The all-pair relative loss of π³, from the paper’s Appendix D.
∑i≠j
Add up a term for every pair of different cameras.
dpose( T̂i−1 T̂j, T*i→j )
The distance between the relative pose built from the two predictions and the true relative pose T*i→j.

The paper lists three limits that matter for long videos. First, the output is still a global pose per camera. The model chooses its origin more flexibly, but it must still “represent an entire trajectory in a single frame”, so translations still grow with the sequence. Second, the loss runs over a complete set of views. A causal stream only sees a prefix of the video and cannot use future frames. Third, every pair counts the same, so a hard pair uses as much gradient as an easy one.

Teacher three: R3, directed pairs and a learned weight

R3 drops the global-pose head. The network never outputs Tj in any frame. For each ordered pair (i, j) with i ≠ j it outputs the relative move from i to j, and two confidences. The pair (i, j) and the pair (j, i) are two separate predictions. The loss weights each pair by its own confidence (Chapter 4 derives how).

Compare the three with the paper’s Table 1.

AttributeVGGTπ³R3
Predicts a relative posenonoyes
Relative lossnoyesyes
All-pair edgesnoyesyes
Learned confidencenonoyes

Count the edges. Take N = 4 cameras. VGGT checks 3 edges (1→2, 1→3, 1→4). π³ checks 6 pairs. R3 can query 12 directed pairs. During training, R3’s camera loss uses the past-to-current pairs of a causal stream, which is 6 for N = 4 (Appendix F). For a 32-view clip the counts are 31 for VGGT and 496 for π³. R3’s causal set is also 496, and the full directed set would be 992. Slide the number of cameras to see how fast the count grows.

Draw the pose graph

Cameras sit on a circle. Lines are the pairs the loss checks. Choose a scheme, then add cameras and watch the edge count.

6

The edge counts are exact: N−1, N(N−1)/2 and N(N−1) for the full directed set (the paper's causal training uses N(N−1)/2 past-to-current pairs). In the R3 view, line thickness follows a made-up rule (nearby cameras count more) to show the idea of per-edge weights; it is not a learned result.

More edges alone is not the point. π³ already has all pairs. The new part is that R3 also chooses how much to trust each pair, and that its output is a local move, not a place in a shared frame.

Which attribute does R3 have that π³ does not, according to Table 1?

Chapter 3

The Network: Camera Tokens and a Pair Head

Follow the tensors from a stack of frames to nine numbers for every ordered pair of cameras

Picture a mail room. Each frame of the video is a letter. A clerk reads every letter and writes one summary card for it. Later a second clerk takes two cards at a time and writes a short note: “the second sender stands this far from the first, turned this much, and I am this sure.” R3 has the same two jobs, done by two parts of one network.

Part one: the backbone writes one card per frame

The backbone is the big part of the network. R3 does not build it from scratch. It starts from DA3 (Depth Anything 3), a model that predicts consistent geometry from images. DA3 itself is built on DINOv2, an image network pretrained on very many pictures. R3 keeps most of this backbone frozen, which means its weights do not change during R3’s training. Only two things are trained: the backbone’s global attention layers and the new pair head. That is about 110M trainable parameters out of 372M in the model used at inference.

Attention is the layer where each piece of the input reads the other pieces and mixes in what it finds. Global attention lets the pieces of different frames read each other. That is how the backbone learns that two frames show the same wall. R3 trains it as frame-causal: frame j may read frames 1 to j, never later ones. This is like reading a book front to back. At run time it lets the model keep what it has already read in a KV cache, a store of the earlier frames’ attention keys and values, so a new frame does not force a re-read of the past.

For each frame i the backbone writes one camera token zi: a single vector of numbers that carries what the network knows about that camera. It also writes a depth map for the frame, with a confidence for each pixel, and a separate small head turns zi into the frame’s focal length f̂i. Chapter 5 covers depth and focal length. This chapter follows the camera.

Part two: the pair head reads two cards

The pairwise pose head is a small MLP (multilayer perceptron: a few dense layers that turn one vector of numbers into another). One copy is shared by all pairs. It takes two camera tokens joined end to end and answers for the ordered pair (i, j):

q̂i→j, t̂i→j, cR, cT
The four outputs for one directed pair: a unit quaternion for the rotation from i to j, the translation of camera j written in i’s axes, and two positive confidences, one for rotation and one for translation.
MLPrel
The shared pair head. The same weights serve every pair of every video.
[ zi ; zj ]
The two camera tokens joined into one longer vector. Order matters: [zj ; zi] is the opposite pair, with its own answer.

Count the outputs. A quaternion has 4 numbers. A translation has 3. Two confidences add 2 more. That is 9 numbers for every ordered pair. The confidences pass through a softplus, a smooth function that turns any number into a positive one, because the paper needs c > 0.

Follow the shapes

Take N frames of height H and width W. Call the width of a camera token d. The paper does not give d in its main text, so we keep the symbol. The shapes are:

  1. Frames in: [N, 3, H, W], three colour channels per frame.
  2. Backbone out: camera tokens [N, d], plus depth maps and focal lengths.
  3. Make pairs. Each ordered pair joins two tokens: [P, 2d], where P = N(N−1) for every directed pair, or N(N−1)/2 for the past-to-current pairs used in causal training.
  4. Pair head out: [P, 9].
  5. Split into q [P, 4], t [P, 3], cR [P] and cT [P].

Step through it for yourself. Choose how many frames, then press Step.

Step the data flow

Each row is one stage. The lit row is the current one. Add frames and watch the number of pairs, and so the size of the pair arrays, grow.

8

Shapes follow the paper's description (Sec. 3.1 and App. F). The paper does not state the token width d, so it stays a symbol. The pair count uses all directed pairs, N(N−1); the paper's causal training uses the lower-triangular half.

The pair head is cheap. The paper notes that the all-pair computation “is only an MLP over compact camera tokens and is negligible relative to image-token attention.” The costly part is reading the frames. The pairs add very little. That is why R3 can train on every pair, and why it can query a few pairs per frame at run time.

The same flow as code

The paper does not publish its code in the text we have. This sketch follows its described data flow, so you can see where each shape lives:

def forward(frames, pairs):                    # frames [N,3,H,W]; pairs [P,2] of (i, j)
    z, depth, sigma = backbone(frames)         # z [N,d] camera tokens; frame-causal attention
    f = focal_head(z)                          # [N] one focal length per frame
    zi, zj = z[pairs[:, 0]], z[pairs[:, 1]]    # [P,d] each
    out = pair_mlp(torch.cat([zi, zj], -1))    # [P,9]  (order of the pair matters)
    q = F.normalize(out[:, 0:4], dim=-1)       # unit quaternion (normalising is the usual way)
    t = out[:, 4:7]                            # translation of camera j in i's axes
    cR = F.softplus(out[:, 7])                 # rotation confidence, > 0
    cT = F.softplus(out[:, 8])                 # translation confidence, > 0
    return q, t, cR, cT, depth, sigma, f

Why separate confidences for rotation and translation? The paper gives the reason: translation is often less reliable when geometric cues are weak, while rotation can stay well constrained. One shared number could not say “I know the turn, but I do not know the distance.” Appendix D confirms the asymmetry. Rotation confidences sit in a higher numerical range and reach lower binned error than translation confidences.

For one ordered pair (i, j), what does the pair head read and what does it write?

Chapter 4

Confidence: Learning Whom to Trust

Derive why one extra number per pair, with one extra term in the loss, teaches the network to rate its own answers

A student takes a test where every answer comes with a confidence slider. The teacher’s rule is: your penalty for an answer is your error multiplied by your slider. What will a clever student do? Set every slider to zero. The penalty is then zero for every answer, however wrong. The rule rewards a student who says “I am never sure”.

The fix is a price for low confidence. Charge the student a little for every slider kept low. Now the student must weigh two costs. A high slider makes errors expensive. A low slider costs a fee. The best setting depends on how big the error is likely to be. This is exactly the loss R3 uses, and the trade-off is what teaches the network to rate itself.

The loss for one pair

Let ℓ be the error of one prediction: an L1 residual, which means the absolute difference between the predicted number and the true number, added over the components. Let c > 0 be the confidence. For one directed pair the paper writes a rotation term and a translation term, each with its own confidence:

cR ℓrot
The rotation error ℓrot, scaled up by the rotation confidence cR. A high cR makes a rotation mistake costly.
cT ℓtrans
The same for translation, with its own confidence cT.

The term −α log c is the fee. The number α = 0.2 sets its size, and log is the natural logarithm. When c is small, log c is a large negative number, so −α log c is large and positive: a low confidence is expensive. When c is large the fee shrinks, and the first term takes over.

Derive the best confidence

Fix one error ℓ and ask: which c makes the loss smallest? The loss is L(c) = cℓ − α log c. Take its slope with respect to c and set it to zero.

dL/dc
How fast the loss changes as you raise c. The slope of cℓ is ℓ. The slope of −α log c is −α/c.
c*
The confidence with the lowest loss. It equals the fee size α divided by the error. A pair with half the error gets twice the confidence.

The slope of the slope is α/c², which is positive, so this point is a minimum. The loss at the minimum is α(1 + log(ℓ/α)). It rises as the error rises.

Work it with α = 0.2 for two pairs. Pair A is easy: ℓ = 0.02, so c* = 0.2 / 0.02 = 10. Pair B is hard: ℓ = 0.5, so c* = 0.2 / 0.5 = 0.4. Pair A earns 25 times the confidence of pair B. Because c multiplies the pair’s error term, pair A also pulls 25 times harder on the network’s weights. Pair B can be mostly ignored. Drag the error below and watch the best confidence move.

Find the best confidence

The curve is the loss L(c) for one pair. The dot is its lowest point. Drag the residual, then switch the fee off and see what the network could do instead.

0.100

The curve is computed from the paper's formula L(c) = cℓ − α log c with the paper's α = 0.2. One residual stands in for one pair; real training averages over many pairs and the network sets c, not you.

With the fee off, the curve is a straight line that only goes down as c shrinks. The best c is zero, and the loss is zero for any error. The network would learn to be unsure of everything. The fee −α log c is the part that prevents this collapse. The paper says the log term “keeps c from collapsing to zero”.

This loss has a known statistical meaning. It is the negative log-likelihood of a Laplace distribution, a bell-like curve with sharper tips, whose width is 1/c. The paper calls it a “Laplacian likelihood” in Appendix D. In plain words: the network states how wide its own error will be, and is scored on both the error and the claim.

What the confidence is used for

One signal, four jobs. During training, c weights the loss. At run time, c weights each candidate pose when frames are fused (Chapter 6). It ranks the references that are worth keeping (Chapter 7). And it gates bad frames (Chapter 7). The paper stresses this reuse as its contribution: the confidence acts as “a unified anchor”.

Does the learned c really track the error? Appendix D checks it on pairs from the first 20 ScanNet test scenes. Pairs are binned by predicted confidence. Mean error falls from the low bins to the high bins, and the spread shrinks. The trend is sharpest at the low end, where unreliable pairs have much larger residuals. That is the property the three later uses need.

The full camera loss averages Lrot + Ltrans over a set of ordered pairs P, plus a plain L1 term for focal length. In the causal setting P is the past-to-current set. In code:

def conf_term(c, resid, alpha=0.2):
    return c * resid - alpha * torch.log(c)           # the paper's per-pair term

def camera_loss(q, t, cR, cT, q_gt, t_gt, f, f_gt, alpha=0.2):
    l_rot   = (q - q_gt).abs().sum(-1)                # an L1 residual (stand-in; App. D has the exact form)
    l_trans = (t - t_gt).abs().sum(-1)
    pair = conf_term(cR, l_rot, alpha) + conf_term(cT, l_trans, alpha)   # [P]
    return pair.mean() + (f - f_gt).abs().mean()      # plus a plain L1 on focal length
In L(c) = cℓ − α log c, what happens if the −α log c term is removed?

Chapter 5

Depth, Data and the Training Recipe

See how depth is supervised without a scale, which data R3 learns from, and how the two training stages run

You photograph a room, and a friend asks: how far is the far wall? From one picture alone you cannot say metres or feet. You can say “the far wall is twice as far as the table”. A depth map from images has the same limit: it is right only up to an unknown scale, a single number that stretches all distances together.

So how should the network be graded on depth? If the answer is “3.0” and the truth is “6.0”, the shape may be perfect and only the unit is off. The paper’s answer is to remove the unit before it grades.

The depth head and its loss

Besides camera tokens, the backbone gives a depth map Di for every frame, with a confidence Σp for every pixel p. The loss divides each prediction and each target by its own per-frame median (the middle value when you sort all depths). This is median normalisation. After it, a depth map that is twice too large looks the same as the truth.

Ldepth
The depth loss for one frame. The total training objective is L = Lcam + Ldepth.
1/|M|
Average over the set M of pixels that count. M holds the pixels where the target is trusted.
∑p∈M
Add up one term per counted pixel p.
Σp | D̃(p) − D̃*(p) |
The L1 depth error of pixel p, after both depth maps are divided by their medians, scaled by the pixel’s own confidence Σp.
α log Σp
The same fee as in Chapter 4, with the same α = 0.2. It stops Σp from falling to zero.

The paper says the depth loss “applies the same idea per pixel” as the camera loss. A pixel at a window edge or a glass door can be uncertain, and the network may say so.

Work a tiny case. The true depths of three pixels are 3, 6 and 12. A prediction says 2, 4 and 8. The raw L1 error is 1 + 2 + 4 = 7. The prediction median is 4 and the target median is 6. Divide: the prediction becomes 0.5, 1, 2, and so does the target. The error is 0. The prediction had the right shape and the wrong unit. Try it with five pixels.

Remove the unit

Five pixels. In each pair the green bar is the true depth. The teal bar is a prediction that is the right shape but scaled. Left: raw. Right: after dividing each map by its own median. Drag the scale.

2.0×

Toy depths (1.2, 2.0, 3.1, 4.5, 7.0) and a made-up per-pixel prediction error of a few percent. The normalisation rule is the paper's (Sec. 3.4): divide each depth map by its own per-frame median.

Where do the targets come from? The depth target D* has two sources. On synthetic scenes it is the true depth, and the mask M is the set of pixels with valid ground truth. On real-world video, clean depth is rare, so the target is the output of a frozen, pretrained DA3 model, and the mask uses that teacher’s own confidence. R3 learns real-world depth from a teacher, and its pose from the data’s camera labels.

What R3 learns from

R3 trains on 15 public datasets with 70,710 scenes in all, after filtering. They fall into three groups by how the labels were made.

Source of labelsDatasets (scenes)Total
SyntheticAriaSyntheticENV 2,000 · Dynamic Replica 524 · OmniWorld-Game 484 · TartanAir 355 · HyperSim 344 · MVS-Synth 121 · Virtual KITTI 2 50 · Spring 473,925
LiDAR or RGB-D captureWildRGBD 23,050 · ARKitScenes 4,388 · ScanNet 1,201 · ScanNet++ 23028,869
COLMAP reconstructionCO3Dv2 30,616 · DL3DV 6,379 · MapFree 92137,916

The table is the paper’s Table 10, regrouped. Most scenes come from real captures, whose camera labels came from COLMAP, a classical reconstruction program, or from depth sensors.

The recipe

Training runs in two stages with the AdamW optimiser. Stage 1 adapts the DA3-Large backbone into a frame-causal checkpoint that still predicts absolute poses. It runs 15,000 iterations at a constant learning rate of 1e−4, with 4 to 16 views per batch. Stage 2 trains the relative-pose head on top of that checkpoint for 25,000 iterations. The learning rate starts at 1e−4 and falls to 1e−5 on a cosine curve. Gradients are accumulated over 2 steps. The batch grows from 4 to 16 views to 4 to 32 views in the second half.

Why 32 at most? Memory. The authors train on six 48 GB GPUs, with gradient checkpointing (recompute activations instead of storing them), bfloat16 mixed precision (smaller numbers to save memory), and a FlexAttention version of frame-causal attention. They fit about 200 views per GPU without the depth teacher and 96 with it. The paper names the consequence: a “train/inference length gap”. R3 trains on at most 32 frames and runs on streams of hundreds. Chapter 7 shows the trick that closes this gap.

for step in range(25_000):                                   # stage 2
    n = random.randint(4, 32 if step > 12_500 else 16)       # views in this clip
    clip = sample_clip(n)                                    # 15 datasets
    pairs = causal_pairs(n)                                  # past-to-current ordered pairs
    q, t, cR, cT, D, sigma, f = model(clip.images, pairs)
    loss = camera_loss(q, t, cR, cT, clip, pairs) + depth_loss(D, sigma, clip.depth_target, clip.mask)
    loss.backward(); opt.step(); sched.step()                # only global attention + heads get updates
Why does the depth loss divide each depth map by its own median before it compares them?

Chapter 6

Assembling the Trajectory

Turn many relative guesses into one pose per frame, by composing each guess and averaging with confidence weights

Five friends stand in a park. A new guest arrives. Each friend knows their own place on the park map, and each says: “the guest is this far from me, in that direction.” Each friend therefore gives a spot for the guest on the park map. The five spots disagree a little. Some friends could see the guest clearly. One was looking at a tree. What do you do? You average the spots, and you give more weight to the friends who say they are sure.

That is R3’s assembly step. The pair head gives relative moves. The trajectory step turns them into one pose per frame, in one frame. The paper’s Section 3.2 calls it “confidence-weighted aggregation”. There is no network in it, only arithmetic you can do by hand.

Step one: anchor the first frame

Frame 1 defines the shared frame: T1 = I, the identity pose, which means “no move”. Everything else is written relative to it. Frame 2 follows directly from the pair (1, 2): T2 = T1 T̂1→2. Note that this is the only place a global frame appears, and it appears downstream of the network.

Step two: every reference makes a candidate

Now frame j arrives, with j ≥ 3. Some earlier frames already have poses. Call them the reference set Rj. Each reference i already knows its own pose (qi, ti), and the pair head gave the move (q̂i→j, t̂i→j). Chapter 1’s rule turns that into a candidate for frame j:

qj(i)
The rotation of frame j as proposed by reference i: i’s own rotation, then the predicted turn.
tj(i)
The place of frame j as proposed by reference i. The predicted move t̂ is written in i’s axes, so qi( · ) turns it into map axes before it is added to ti.

Step three: fuse with softmax weights

Now you have one candidate per reference. Fuse them into the final pose. Rotation and translation use separate weights, built from the separate confidences. A softmax turns a list of numbers into weights: it takes e to the power of each number and divides by the total, so the weights are positive and add up to 1.

tj
The final place of frame j: a weighted sum of the candidate places. The weights c̃T are the softmax of the translation confidences over the retained references.
qj
The final rotation. The candidates are weighted by the softmax of the rotation confidences, added, and Norm( ) scales the result back to length 1 so it is a valid quaternion.

The set NK(j) is the K references with the highest average confidence c̄ = ½(cR + cT). The paper calls this “only an efficiency cap”. If K is at least the number of references, you use all of them.

A worked example, with every step

Translation first, one axis only. Three references propose frame j at t = 10.0, 10.4 and 12.0. Their translation confidences are 3.0, 2.5 and 0.5.

  1. Take e to each confidence: e3.0 = 20.09, e2.5 = 12.18, e0.5 = 1.65. The total is 33.92.
  2. Divide: the weights are 0.592, 0.359 and 0.049.
  3. Weighted sum: 0.592 × 10.0 + 0.359 × 10.4 + 0.049 × 12.0 = 10.24.

A plain average would give 10.80. The weighted answer stays close to the two sure references and ignores the doubtful third. A gap of 3 confidence units means a weight ratio of e3, about 20 to 1.

Now rotation, where one detail needs care. Two references propose a turn about one axis. Reference a says 30 degrees, written as qa = (0.9659, 0.2588) in the two numbers that matter here. Reference b says 34 degrees, but its network wrote the same rotation with the opposite sign: qb = (−0.9563, −0.2924). Remember that q and −q mean the same rotation. If you average qa and qb as they stand, you get (0.005, −0.017), a vector almost zero in length, and normalising it gives nonsense. The paper’s fix is to sign-align first: flip qb to (0.9563, 0.2924). The average is now (0.9611, 0.2756). It has length 0.9998, and it stands for 32.0 degrees, the right midpoint.

Fuse three guesses

The green cross is the true place of frame j. Three references each propose a place (circles, sized by weight). The diamond is the fused answer. Change the confidences, or keep only the top K.

4.0
3.0
1.0

Toy positions and confidences, not from the paper. Reference C is a deliberate outlier. The fusion rule is the paper's: softmax of the confidences over the kept references, then a weighted sum. The toy ranks references by this one confidence; the paper ranks by the average of the rotation and translation confidences.

Try to make the answer worse. Raise C’s confidence to 6 and the fused point is dragged toward the outlier. A wrong but confident reference is the danger. That is why Chapter 4 trains confidence to follow the error, and why Chapter 7 adds a gate for the worst frames.

Why many references beat a chain

Chaining each frame to its neighbour adds one error to the next. Fusing many references averages errors that point in different ways, and the softmax lets the most reliable ones lead. The paper tests it on three benchmarks (Table 9, left). The mean ATE across TUM, Sintel and ScanNet falls as more references are fused: 0.0624 for the single most confident reference, 0.0586 for the top 5, 0.0574 for the top 10, and 0.0572 for all references. Fusing all of them cuts the error of top-1 by 8%. An optional graph refinement (Chapter 8) brings it to 0.0567.

def fuse(refs, q_hat, t_hat, cR, cT, K=None):      # refs: {i: (q_i, t_i)}, others keyed by i
    ids = list(refs)
    if K: ids = sorted(ids, key=lambda i: -(cR[i] + cT[i]) / 2)[:K]       # top-K by mean confidence
    cand_t = [refs[i][1] + rotate(refs[i][0], t_hat[i]) for i in ids]     # t_i + q_i(t_hat)
    cand_q = [qmul(refs[i][0], q_hat[i]) for i in ids]                    # q_i (x) q_hat
    cand_q = [q if q @ cand_q[0] >= 0 else -q for q in cand_q]            # sign-align first
    wT, wR = softmax([cT[i] for i in ids]), softmax([cR[i] for i in ids])
    t = sum(w * x for w, x in zip(wT, cand_t))
    q = sum(w * x for w, x in zip(wR, cand_q)); return q / np.linalg.norm(q), t
Two reference quaternions, q and −q, describe the same rotation. Why does R3 sign-align candidate quaternions before averaging them?

Chapter 7

Streaming with a Keyframe Bank

Keep memory fixed on an endless video by admitting novel frames, culling weak ones and rejecting bad ones

A hiker keeps a photo notebook of a long trail. The notebook has 100 pages and the trail has thousands of steps. The hiker cannot photograph every step. So there are rules. Take a photo only when the view is new. Every so often take one anyway, in case the view changes slowly. When the notebook is full, tear out the page that adds least. And if the camera is covered by a hand, do not photograph at all.

R3 in streaming mode follows the same rules. Its notebook is the keyframe bank. The idea comes from classical SLAM systems, and R3 replaces their hand-tuned motion rules with two learned signals: a token similarity and the pair head’s confidence.

The active context

In streaming, frames arrive one by one. R3 does not pair a new frame j with the whole history. It pairs it only with the active context Ct = {1} ∪ Bt: frame 1, which fixes the origin, plus the bank Bt of earlier frames that were kept. The pair head runs only on edges between j and the frames in Ct. Fusion (Chapter 6) uses the same set as its reference set. A frame joins the bank only after its own pose is estimated. This bounds the work for every new frame, however long the stream.

Admitting a frame: is it new?

To judge novelty, R3 needs a summary of how each frame looks. It uses tokj, the average of frame j’s backbone encoder tokens before any attention between frames. The frame-only encoder is pretrained for 3D reconstruction, so this token already reflects look and scene geometry. Two tokens are compared by cosine similarity, the cosine of the angle between two vectors: 1 means they point the same way, and smaller values mean they differ more.

max cos( toki, tokj )
How similar the new frame is to its closest look-alike in the bank. High means “I have seen this view”.
τ
The novelty threshold. The new frame is admitted only if even its closest look-alike falls below τ. The paper’s best value on ScanNet is 0.98.

A lower τ is stricter, because the frame must be less similar to everything stored. If no frame has been admitted for Δmax = 20 incoming frames, R3 admits one anyway. This guards against a slow scene change that never crosses the threshold. Slide τ below. The camera moves, stops for a while, then moves again.

Fill the bank

Each tick is one frame of a 300-frame stream. The camera pauses at frames 100 to 160. Blue ticks were admitted. Hollow ticks were admitted and later culled. The curve is the bank size. Drag τ.

0.980

Toy: a frame's token is a direction on a circle that turns 1.2 degrees per frame while the camera moves, so cosine similarity is the cosine of the turn. The rules are the paper's (admit if max cos < τ, force-admit after 20 frames, evict the lowest u = d × c). The bank cap is 24 here so culling is visible; the paper's is 100. Every pair confidence is set equal in this toy.

Look at the pause. Without the forced rule, nothing new gets in for 60 frames. With it, one frame enters every 20. Look at the slider’s two ends too. At a low τ the bank starves: few frames qualify. At a high τ the bank takes in near-duplicates and fills with redundant edges. The paper finds the same trade-off on ScanNet (Table 9, right). The ScanNet pose error (ATE) at 1,000 frames is 0.357 for τ = 0.96, 0.332 for 0.97, 0.318 for 0.98 and 0.329 for 0.99. The value 0.98 wins.

Culling a frame: which page matters least?

When the bank reaches its cap Mmax = 100, R3 evicts the entry with the lowest utility uj = dj cj. Here dj is the distinctiveness of j, the smallest value of 1 − cos(toki, tokj) over the other bank members. It is small when j has a near twin. And cj is the strongest pair confidence between j and the rest of the bank. It is small when j has no strong pose link to anything. A frame that is redundant, or poorly connected, or both, goes first. Frame 1 is never evicted.

The bank serves one more purpose. The network trained on at most 32 frames and now meets streams of thousands. A strict novelty gate keeps the effective context about as long as the training clips, even when the wall-clock stream is much longer. The paper describes this as helping to “bridge the train/inference length gap”.

Rejecting a frame: do I trust this?

Motion blur, a hand over the lens, a scene cut: these frames have no sound geometry. R3 reuses its confidence as a gate. For frame j, it takes the mean averaged pair confidence against the active context, c̄j. It compares c̄j with a baseline c̄ref, calibrated as the mean of the first Ncal = 3 frames. If c̄j < τout c̄ref with τout = 0.15, the frame is rejected. A rejected frame has already passed through the backbone, because its tokens are needed to score the pairs. But its entries are evicted from the KV cache, it never joins the bank, and it gets no pose. Try the gate.

Gate the bad frames

The line is a frame's mean pair confidence. The dashed line is the gate at τout times the baseline. Red dots are rejected frames. Three in a row means lost track. Drag the gate.

0.15

Toy trace in arbitrary units: a mild blur at frame 12, a worse blur at 22 and 23, a short dip at 31, and a scene cut from 40 to 44. The rule and the constants Ncal = 3, τout = 0.15 and Nrej = 3 are the paper's (App. C); the trace is not.

At the paper’s 0.15 the gate is loose. It keeps hard but recoverable frames and removes catastrophes. The paper says so: “loose enough to retain difficult but recoverable frames while filtering catastrophic cases”. Raise the gate and it starts to throw away frames that were only blurry.

If Nrej = 3 frames in a row are rejected, R3 declares loss of track and starts a new segment. It links the segments with a short bridge of 3 to 10 shared frames. It clears the cache and the bank, and reruns the backbone on the bridge frames plus the new stream. Poses stay continuous by plain composition: each new frame j gets Tj = Tb Tb→j, where b is a bridge frame whose pose is already known. No extra step to align one segment to the next is needed. Scale can drift between passes, so each segment’s first-frame depth is aligned to a pretrained metric-depth model with one median-based scalar.

class Bank:
    def __init__(self, tau=0.98, d_max=20, m_max=100):
        self.keys, self.since = [], 0                  # frame 1 lives outside, never evicted
    def offer(self, j, tok, conf):                    # tok: pre-attention token of frame j
        self.since += 1
        novel = all(cos(tok, k.tok) < self.tau for k in self.keys)
        if novel or self.since >= self.d_max:
            self.keys.append(Key(j, tok)); self.since = 0
        if len(self.keys) > self.m_max:
            u = lambda k: k.distinct() * k.best_conf  # u_j = d_j * c_j
            self.keys.remove(min(self.keys, key=u))   # evict the least useful
Why does R3 admit a frame into the bank even when its token is very similar to a stored one, once 20 frames have passed without an admission?

Chapter 8

Full Context and Pose-Graph Refinement

Switch off the causal mask, query every pair, and clean up the trajectory with one confidence-weighted solve

A surveyor finishes a field day with a list of measured distances between pairs of survey posts. Some pairs were measured with a good laser. One reading was taken in fog. Now the surveyor sits at a desk with the whole list and one job: place every post on the map so that, as far as possible, all the measured distances come out right. The foggy reading must not be allowed to pull the whole map out of shape.

That desk job is R3’s full-context mode. Streaming gives an answer as frames arrive. If the whole clip is already on disk, you can do better, and the paper does it with the same checkpoint and no retraining.

Step one: take off the causal mask

In training and streaming, frame j reads only frames 1 to j. The paper calls the mask that enforces this the causal mask. At test time you can remove it. Then the backbone sees all frames at once, and each camera token can use the full clip. The pair head can be queried on every pair (i, j) with i ≠ j. The authors call it “a simple test-time attention switch”. One set of weights works in both modes.

Step two: solve one weighted problem

First, a causal streaming pass gives starting poses {Ti}. Then comes one pose-graph refinement. A pose graph is the picture from Chapter 2: poses as nodes, and predicted relative moves as edges. Refinement moves the poses to best agree with the edges. For each edge (i, j), let eRij and eTij be the rotation and translation residuals: the gaps between the relative pose implied by the current Ti and Tj and the edge the network predicted. The solver minimises:

min{Ti}
Search over the poses of all frames. Frame 1 stays fixed at the identity, so the map has an origin. The paper uses L-BFGS, a standard step-by-step optimiser.
∑(i,j)∈E
Add one term per edge in the edge set E: every pair in full context.
cR HδR( eR )
The rotation residual, passed through a Huber loss, then scaled by the network’s own rotation confidence for that edge.
cT HδT( eT )
The same for translation.

The Huber loss Hδ(e) is a safety rule for outliers. For a small residual, |e| ≤ δ, it is a square, ½e². For a large one it grows only in a straight line, δ(|e| − ½δ). A square punishes a big mistake very hard, so one foggy reading can drag everything. A straight line punishes it gently. The paper’s confidence does a similar job from the other side: a doubtful edge has a small c.

Why is this cheap? The edges carry only relative-pose residuals and scalar confidences. The paper states that the refinement “does not run bundle adjustment, point reprojection, or depth optimization”. Bundle adjustment would re-solve the 3D points too, which costs far more.

A worked example in one dimension

Take three posts on a line, with true places 0, 1 and 2. Post 1 is fixed at 0. Two edges are good: (1, 2) says +1.0 and (2, 3) says +1.0, each with confidence 2. A third, (1, 3), is foggy: it says +2.6, not 2.0. Its confidence is 1. With squared residuals the cost is 2(x2 − 1)² + 2(x3 − x2 − 1)² + 1(x3 − 2.6)².

  1. Set the slope for x2 to zero: 4(x2 − 1) − 4(x3 − x2 − 1) = 0. This gives x2 = x3/2.
  2. Set the slope for x3 to zero: 4(x3 − x2 − 1) + 2(x3 − 2.6) = 0.
  3. Put in x2 = x3/2: 2x3 − 4 + 2x3 − 5.2 = 0, so x3 = 2.30 and x2 = 1.15.

Post 3 is off by 0.30. Now give the foggy edge a confidence of 0.1 instead of 1. The same steps give x3 = 4.52 / 2.2 = 2.05. The error falls to 0.05. A low confidence makes a bad edge nearly harmless. Try it on four posts with six edges.

Solve with one foggy edge

Four posts on a line. The green ticks are the true places. The teal dots are the solved places. The edge from post 1 to post 4 reads 1.5 too far. Lower its confidence, or switch to Huber.

2.00

Toy 1D problem: true places 0, 1, 2.2 and 3.1, small made-up noise on each edge, every good edge at confidence 2. The solver is a plain weighted least squares, repeated with Huber weights (δ = 0.3) when Huber is on. The paper's version works on 3D poses with L-BFGS; the idea is the same.

What full context buys

Table 2 gives the full-context row, marked R3†. On TUM-dynamics its ATE ties VGGT at 0.012. On Sintel it reaches 0.130, against 0.172 for VGGT and 0.140 for DA3-Large. On ScanNet it reaches 0.037, close to VGGT’s 0.035 and better than DA3-Large’s 0.039. In Table 3, the full-context switch improves the mean accuracy and completeness on both point-map datasets: 7-Scenes accuracy 0.081 and completeness 0.070 (streaming: 0.092 and 0.093), and NRGBD 0.038 and 0.044 (streaming: 0.047 and 0.050). One honest wrinkle: on Sintel, the full-context ATE (0.130) is worse than the streaming ATE (0.115). The authors blame one outlier sequence, sintel-temple-3.

R3† has 372M parameters. VGGT has 1.26B. The paper reads this as competitive accuracy from a model about a third the size.

def refine(T0, edges, d_rot, d_trans):          # edges: (i, j, rel_pose, cR, cT)
    def cost(x):
        T = unpack(x)                           # T[0] stays the identity
        total = 0.0
        for i, j, rel, cR, cT in edges:
            eR, eT = residual(T[i], T[j], rel)  # implied relative pose vs predicted edge
            total += cR * huber(eR, d_rot) + cT * huber(eT, d_trans)
        return total
    return lbfgs(cost, pack(T0))                # no bundle adjustment, no depth, no reprojection
What does R3 change at test time to switch from streaming to full-context mode?

Chapter 9

What the Tables Show

Read the pose, point-map, long-stream and distractor tables, and see which claim each one supports

You are asked to referee this paper. You do not read the abstract. You ask of each table: what exactly does this number claim, against whom, on what data, and what would it have looked like if the claim were false? This chapter reads the paper’s tables that way.

First, three words that name the metrics. ATE, absolute trajectory error, is how far the whole estimated path is from the true path after best alignment. RPE, relative pose error, is how wrong the move between nearby frames is. It comes in a translation part (RPE-T) and a rotation part (RPE-R, in degrees). For all three, lower is better.

Table 2: camera poses, short clips

The paper tests on Sintel (50 frames), TUM-dynamics (90 frames) and ScanNet (90 frames). Among streaming methods, R3 has the lowest ATE on all three: 0.115, 0.018 and 0.038. Its closest rivals score 0.159 (ZipMap-stream, a number the authors took from that paper), 0.026 and 0.052 (STream3R). This is with 372M parameters, where StreamVGGT and STream3R have 1.26B and ZipMap-stream has 1.40B. One short-term translation number trails: RPE-T on Sintel is 0.068, against 0.063 for TTT3R. Explore every number below.

Compare the streaming methods

Bars are errors, so shorter is better. R3 is teal. Pick a benchmark and a metric.

All numbers are from the paper's Table 2, streaming block. ZipMap-stream is reported on Sintel only, and its number is taken from its own paper, not rerun. A dash means not reported.

What does Table 2 not show? The clips are short, 50 to 90 frames. It cannot show what happens at 1,000 frames. That is Table 4’s job.

Table 3: dense geometry from sparse views

Following CUT3R, the paper builds a point cloud from sparse keyframes on 7-Scenes and NRGBD. It measures accuracy (Acc: how close predicted points are to true surface points), completeness (Comp: how much of the true surface is covered) and normal consistency (NC, higher is better). On 7-Scenes, streaming R3 leads on mean Acc (0.092 against 0.122 for STream3R) and mean Comp (0.093 against 0.110). On NRGBD it is better on Acc (0.047 against 0.057) but behind STream3R on Comp (0.050 against 0.028) and NC (0.883 against 0.910). The authors call this “competitive with the strongest streaming baseline”, and that is fair.

Tables 4 and 5: long streams

This is the paper’s main claim, and the hero at the top of the page shows it. On 7-Scenes at 200, 500 and 1,000 frames, R3’s Acc is 0.021, 0.022 and 0.022. It stays flat. At 1,000 frames the best rival is InfiniteVGGT, which goes 0.046, 0.040, 0.061 across the three lengths. CUT3R goes 0.087, 0.194, 0.240. StreamVGGT fits in memory at 200 frames and then runs out of the 48 GiB budget at 500 and 1,000. Go back to the hero and pick two methods to compare.

A second test uses 25 scenes drawn at random from the 140 in the DL3DV-Benchmark, each 304 to 439 frames long, with wider baselines and outdoor views. TTT3R uses a 100-frame reset interval here, because the paper found that this beats running TTT3R with no resets. R3 runs the whole sequence in a single pass. Three scores appear: ATE-norm is the whole-path error as a percentage, ATE-RMSE is the path error in scene units, and Rot RMSE is the typical rotation error in degrees. ATE is taken after the best scale-and-pose alignment.

MethodATE-norm (%)ATE-RMSERot RMSE (°)Scenes won
TTT3R4.910.6015.651 of 25
InfiniteVGGT2.850.3673.060 of 25
R31.160.1551.7924 of 25

The error here falls from 2.85% to 1.16%, a cut of 59% against the best rival. Speed and memory come from Appendix B and Figure 1. R3 runs at 20+ frames per second. Its GPU memory stays bounded as the stream grows, while global-regression baselines hit OOM or slow sharply. The bounded keyframe bank causes this, as Chapter 7 showed. The paper reads the ScanNet and TUM curves (Figure 4) more carefully than a flat line: R3’s ATE “grows gradually as views are added but avoids the stronger drift observed in the baselines”.

Read the fine print before you trust the comparison. All methods run under one fixed budget of 48 GiB of GPU memory, and a method that exceeds it is marked OOM (out of memory), which counts against it. That is a fair rule for streaming, though it favours small, bounded designs. The authors also leave out one strong concurrent system, LingBot-Map, because it was trained on a cluster of a hundred GPUs with large internal datasets, so “a fair comparison is unpractical”. Readers should keep that gap in mind: the table is a fair fight among methods of similar means, not a ranking of every system in the world.

Table 6: distractor frames

Now the gate of Chapter 7 is put to a test. Following the Robust-VGGT protocol, random frames from other scenes are mixed into a stream. A good system must spot them and not be fooled. Read the table with care: on RobustNeRF the Robust-VGGT variants keep a lower pose error than R3, even though R3 rejects the distractors in one pass. The device below compares the pose error and the rejection success rate (SR: the share of distractors thrown out).

Let the gate work

Each bar is a mean ATE over distractor settings (lower is better). Pick a dataset and compare the two Robust-VGGT variants with R3 before and after its gate.

The paper's Table 6: mean over the Small, Medium and Large settings, 10 seeds each. Robust-VGGT needs a multi-pass offline detection stage; R3 does it in one online pass. SR is not reported for R3 without the gate. The paper adapted the protocol for streaming: frame order is kept, and the first three frames are clean.

Table 11: does depth survive?

R3 learns pose and depth together, so does depth get worse? The paper compares video depth with its DA3-Large backbone. On Sintel R3 is better: Abs Rel 0.410 against 0.460. On Bonn it is close: 0.102 against 0.106. On KITTI it trails: 0.130 against 0.122. On the second score, the share of pixels within 25% of the true depth (δ < 1.25), R3 is lower on Sintel (0.479 against 0.518) and KITTI (0.845 against 0.870), and 0.880 against 0.890 on Bonn. The authors summarise it as preserved depth quality, and the numbers say “mostly preserved, with a small loss on KITTI”.

Which result best supports the claim that R3 “scales to long sequences with bounded memory”?

Chapter 10

Ablations, Limits and Open Questions

Check what the relative target buys, what the thresholds cost, and what the authors say is still unsolved

A mechanic wants to know which part of an engine does the work. She does not admire the whole engine. She takes one part out, runs it, and puts it back. An ablation is that test for a model: remove or swap one design choice, keep everything else the same, and see what the score does.

R3 makes one bold choice, to predict relative poses with confidence, and it should be tested first.

Ablation 1: relative against direct

Table 7 is the paper’s controlled test. The backbone, the data and the training budget stay the same. Only the prediction target and its loss change. There are two blocks.

Swap the target

Warm bars use a direct (global) pose target. Teal bars use R3’s relative target. Each pair is one metric, scaled to its own larger bar. Lower is better.

The paper's Table 7. The percentage changes are computed from its numbers. Each pair of bars is scaled separately, so compare within a pair, not across pairs.

In the full-context block the relative target wins on all six numbers. On Sintel the rotation error falls from 0.9492 to 0.7282 degrees, a cut of 23%, and the ATE from 0.1583 to 0.1370. In the streaming block it wins on five of six. The exception is Sintel ATE: 0.141 for the direct baseline, 0.146 for relative. The paper says so: “the direct baseline remains slightly better on Sintel streaming ATE.” The biggest gains are in rotation error (1.56 to 0.67 degrees on Sintel).

Be careful what this table proves. It varies “the prediction target and its associated loss” together. The relative target and the confidence weighting both change at once. The table therefore cannot say how much of the gain belongs to relative prediction and how much to learning confidence. A reader may want that split.

Do not set Table 7 beside Table 2. The ablation models train for 5,000 or 64,000 iterations in set-ups chosen for control, not for the best score, so their numbers differ from the headline rows. Compare a bar only with the other bar in its pair. The useful result is the direction and size of the gap, in two different settings, with the backbone, the data and the budget held equal.

The other ablations

Chapter 6 gave the aggregation test (Table 9, left). More references fused means a lower ATE, from 0.0624 down to 0.0572, and an optional graph refinement makes it 0.0567. Chapter 7 gave the threshold test (Table 9, right). The best novelty threshold is τ = 0.98.

Table 8 is a calibration check, not a controlled test. The authors fine-tune the model with full attention and compare it with the original DA3-Large backbone. ATE goes from 0.140 to 0.117 on Sintel, from 0.013 to 0.011 on TUM-dynamics, and from 0.039 to 0.035 on ScanNet. They state that DA3-Large was trained with substantially more data and an absolute-pose target, so it is a reference, not a matched baseline.

What the authors say is not solved

Appendix J lists the limits. They are worth reading in a table next to the remedies the authors name.

Limit the paper statesWhat it suggests
A 372M model on six 48 GB GPUs. Larger backbones and more data are not explored.Scale the backbone and the training data.
The bank rests on hand-set constants: τ, Δmax, Mmax and the gate values. They may need re-tuning in very different domains.Learn the thresholds and a reset policy.
On very long streams the trajectory can drift, and the camera can be lost, unless it is reset now and then (Figure 9).Reset now and then; learn the reset policy.
The model cannot revisit past tokens, so distant views, occlusions and long runs leave residual inconsistencies in the geometry (Figure 10).A global refinement pass, or limited bidirectional re-attention.
The refinement is pose-only, with no bundle adjustment.Bundle adjustment or joint depth and pose optimisation.

Add three cautions from the tables themselves. First, the confidence is shown to track error on pairs from the first 20 ScanNet scenes (Figure 8); no other dataset is shown. Second, the Sintel full-context result is hurt by one outlier sequence, sintel-temple-3, which the authors name but do not fix. Third, in long streams ATE “grows gradually”. Bounded memory is not the same as zero drift.

Two questions of our own, not the paper’s. If most gain comes from many references fused with confidence, how small can the bank be before the gain falls away? And would the same trick, relative targets plus a trust score, carry over to other regression tasks with an arbitrary origin, such as time or scale?

Table 7 changes the prediction target and its associated loss together. What can you not conclude from it?

Chapter 11

Field Guide

Keep the numbers, the core code, the neighbouring lessons and the source in one place

R3: 3D Reconstruction via Relative Regression was written by Congrong Xu, Huachen Gao, Xingyu Chen, Yuliang Xiu, Jun Gao and Anpei Chen, from the University of Michigan, Westlake University and NVIDIA. It appeared as arXiv:2605.26519 in May 2026. This lesson is our reading of it. Every number below comes from the paper, and the page lists the table or figure it comes from. The authors’ project page is kevinxu02.github.io/r3-site.

The paper’s claim in one paragraph. Feed-forward models that write every camera pose in one global frame struggle on long and streaming video, because the frame is arbitrary and the translations grow. R3 trains a small MLP to predict the relative move between each pair of cameras, with separate rotation and translation confidences. It assembles global poses afterward by confidence-weighted fusion. The same confidence weights the training loss, ranks the references, manages a bounded keyframe bank and gates bad frames. One checkpoint runs causally for streaming and, with the mask removed, in full context.

The numbers

MeasurementValueSource
Parameters: whole model, trainable part372M, about 110MSec. 1, App. F
Speed20+ frames per secondFigure 1
Training: hardware, stage 1 and stage 2six 48 GB GPUs; 15,000 and 25,000 iterationsApp. F
Training data15 datasets, 70,710 scenes (sum of the counts)Table 10
Confidence feeα = 0.2Sec. 3.4
Keyframe bank: novelty, forced admit, capτ = 0.98, Δmax = 20, Mmax = 100App. C, Table 9
Gate: calibration frames, threshold, run to reset3, 0.15, 3 (bridge of 3 to 10 frames)App. C
Streaming ATE on Sintel, TUM-dynamics, ScanNet0.115, 0.018, 0.038Table 2
7-Scenes Acc at 200, 500 and 1,000 frames0.021, 0.022, 0.022Table 4
DL3DV long scenes: ATE-norm, scenes won1.16% (best rival 2.85%), 24 of 25Table 5
ETH3D distractors: ATE without and with the gate0.998 and 0.244, rejection 100%Table 6
Relative against direct, full-context Sintel RPE-R0.9492° and 0.7282°Table 7
All-reference fusion against top-1, mean ATE0.0572 and 0.0624Table 9

The terms

TermIn one line
Relative pose Ti→jThe move from camera i to camera j, in i’s own axes. It has no origin to choose.
Camera token ziOne vector per frame from the backbone. The pair head reads two of them.
Pair headA shared MLP: [zi; zj] to a quaternion, a translation and two confidences.
Confidence cR, cTThe network’s own estimate of how right a pair is. Best value c* = α / error.
AggregationCompose each reference’s move, then fuse the candidates with softmax weights.
Keyframe bankA bounded store of novel frames. The active context is frame 1 plus the bank.
Gate, segment, bridgeReject a frame if its confidence is under 0.15 of baseline; after 3 in a row, start a new segment linked by shared frames.
Pose-graph refinementOne L-BFGS solve with Huber residuals and confidence weights over all pair edges.
ATE, RPEWhole-path error, and error of the move between nearby frames. Lower is better.

The core as code

Here is the streaming loop, the shape every earlier chapter built one piece of. It is a sketch from the paper’s description, not its released code.

poses = {0: IDENTITY}; bank = Bank(tau=0.98, d_max=20, m_max=100)
gate = Gate(n_cal=3, tau_out=0.15, n_rej=3)
for j, frame in enumerate(stream, start=1):
    z_j, tok_j = backbone.step(frame)                 # causal attention, KV cache holds the past (Ch 3)
    ctx = [0] + bank.ids                              # active context C_t = {1} + bank (Ch 7)
    q, t, cR, cT = pair_head(z[ctx], z_j)             # one directed edge per reference (Ch 3)
    if gate.reject(mean((cR + cT) / 2)):              # confidence doubles as an outlier gate (Ch 7)
        backbone.evict(j)                             # drop its KV entries, no pose, no bank entry
        if gate.lost_track(): start_new_segment(bridge=last_frames(3, 10))
        continue
    poses[j] = fuse({i: poses[i] for i in ctx}, q, t, cR, cT)   # softmax-weighted candidates (Ch 6)
    bank.offer(j, tok_j, conf=(cR + cT) / 2)          # admit if novel; cull lowest d * c (Ch 7)
# training: sum over past-to-current pairs of  c * l1 - 0.2 * log c  (Ch 4), plus depth loss (Ch 5)
# full context: drop the causal mask, query all pairs, run refine(poses, edges)   (Ch 8)

Where it sits, and where to go next

Classical pipelines (structure from motion, SLAM) matched features and optimised. DUSt3R turned this into a network that outputs pointmaps, and MASt3R added matching. VGGT predicted poses and depth for many views at once, with every pose written in the first camera’s frame. π³ made the loss all-pair. DA3 supplied the backbone R3 builds on. Streaming rivals carry state or memory (Spann3R, CUT3R, Point3R, StreamVGGT, STream3R, TTT3R, ZipMap, InfiniteVGGT), and R3’s own answer is the confidence-driven keyframe bank.

To fill gaps, start with the site’s multi-view geometry lesson and 3D vision. For another long-video 3D problem, see TrackEverything. For the paper’s own references, start from its list of feed-forward models: DUSt3R, VGGT, π³ and DA3.

Ask for the local fact. Assemble the global one. A pose in a global frame gets harder to predict the longer the video runs. A move between two cameras does not. R3 trains the network on moves, adds a trust score to every one, and lets simple arithmetic build the trajectory. The same trust score then runs the memory and the gate.

The paper is just as direct about what it has not shown. It trains a 372M model on six GPUs and does not try larger ones. Its bank rests on hand-set constants. Without a reset, a very long stream can still drift. Chapter 10 listed the rest.

Which sentence best sums up why R3 predicts relative poses?
Go back to the hero and run all five methods again at 1,000 frames. Notice that the other bars rise with length while R3’s stays flat, and that you now know the three parts that make it flat: a relative target, a confidence, and a bank. Open Teach or Present from the dock to explain it back in your own words.
R3: 3D Reconstruction via Relative Regression
Read the paper · Back to Veanors