【SLAM】SLAM-Former

一句话定位

单目稠密 SLAM(Dense Monocular SLAM) 做成「同一个 Transformer 兼任前端跟踪 + 后端全局精炼」:不用传统回环检测 + 因子图,用 map tokens(地图 token) 和 KV cache(注意力键值缓存) 让前后端互相促进。

给机器人新人的直觉

传统 SLAM 像流水线:A 模块提特征、B 模块估位姿、C 模块全局优化。SLAM-Former 说:这些活都让同一个网络干------前端像「边走边记笔记」,后端像「隔一段把整本笔记重读一遍对齐」;笔记就是 map tokens,重读用到的记忆就是 KV cache。

背景概念(读本文前需要懂)

术语 白话
SLAM 同时建图 + 定位:机器人一边走一边弄清「我在哪、周围长什么样」
前端 / 后端 前端=实时跟踪;后端=全局消漂移(传统里常含回环+图优化)
Dense SLAM 输出稠密点云/表面,而不是稀疏特征点地图
Pointmap 每个像素对应一个 3D 点;几何基础模型(DUSt3R/VGGT/Pi3)常直接回归它
KV cache Transformer 注意力里 Key/Value 的缓存;流式推理时复用历史,避免重算
未标定(uncalibrated) 不给相机内参也能跑;本文主战场之一

相关概念卡:SLAM-Former · Map-Tokens地图令牌 · Transformer-SLAM-KV-Cache · DivPrune-KV剪枝 · Pointmap-点图 · 稠密单目SLAM · ATE-绝对轨迹误差 · 前后端KV-Cache-Sharing · SLAM-Former三训练模式 · Pi3-几何基础模型

论文在干什么

问题:基于几何基础模型的 SLAM(MASt3R-SLAM、VGGT-SLAM)靠子图对齐,全局易不一致;纯流式方法(StreamVGGT、Stream3R)只增量、不回头看历史,会漂。

做法:一个共享权重的 Transformer,三种注意力模式联合训练:

  1. Causal(因果) → 前端增量跟踪
  2. Mixed(混合) → 后端精炼后的 KV + 新图像前端
  3. Full(全连接) → 后端全局精炼(等价「用全注意力做回环」)

输出 :每帧局部 pointmap PPP、置信度 Σ\SigmaΣ、相机位姿 ggg(不预测某个固定世界坐标系下的全局点,避免指定参考系)。

1. 统一 Transformer 架构

  • 编码器:DINOv2 ViT-L/14(冻结或预训练初始化;代码里 dinov2_vitl14_reg)
  • 解码器:36 层,偶数层帧内注意力、奇数层帧间(全局)注意力(与 VGGT/Pi3 族类似)
  • 位置编码:RoPE2D(rope100)
  • 每帧加 5 个 register tokens
  • 任务头:point head(局部 3D)+ conf head + camera head(SVD 正交化到 SE(3)SE(3)SE(3))

2. Frontend--Backend 协作

#mermaid-svg-qIPLRuYyQ4uXDwe6{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .error-icon{fill:#552222;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .marker.cross{stroke:#333333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 p{margin:0;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster-label text{fill:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster-label span{color:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster-label span p{background-color:transparent;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .label text,#mermaid-svg-qIPLRuYyQ4uXDwe6 span{fill:#333;color:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .node rect,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node circle,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node ellipse,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node polygon,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .rough-node .label text,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node .label text,#mermaid-svg-qIPLRuYyQ4uXDwe6 .image-shape .label,#mermaid-svg-qIPLRuYyQ4uXDwe6 .icon-shape .label{text-anchor:middle;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .rough-node .label,#mermaid-svg-qIPLRuYyQ4uXDwe6 .node .label,#mermaid-svg-qIPLRuYyQ4uXDwe6 .image-shape .label,#mermaid-svg-qIPLRuYyQ4uXDwe6 .icon-shape .label{text-align:center;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .node.clickable{cursor:pointer;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .arrowheadPath{fill:#333333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-qIPLRuYyQ4uXDwe6 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-qIPLRuYyQ4uXDwe6 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster text{fill:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .cluster span{color:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-qIPLRuYyQ4uXDwe6 rect.text{fill:none;stroke-width:0;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .icon-shape,#mermaid-svg-qIPLRuYyQ4uXDwe6 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .icon-shape p,#mermaid-svg-qIPLRuYyQ4uXDwe6 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .icon-shape .label rect,#mermaid-svg-qIPLRuYyQ4uXDwe6 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-qIPLRuYyQ4uXDwe6 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-qIPLRuYyQ4uXDwe6 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-qIPLRuYyQ4uXDwe6 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 否
是
是
更新 KV
新图像
关键帧?
跳过
FrontendT: 用 KV cache 增量
追加 Map Tokens
每 T=10 KF?
BackendT: 全注意力精炼 M
Heads: 点云+位姿

  • 关键帧检测 :当前帧 + 上一关键帧做一次 KFT(无长历史 cache),相对平移 >τ=0.1>\tau=0.1>τ=0.1 则选为关键帧
  • 前端 :因果式增量,写 map tokens MMM 与 KV
  • 后端 :对全部 map tokens 做一次全注意力 refine,再把 KV 交回前端 → 互相促进

2.1 模型内部结构(单次 decode 在干什么)

#mermaid-svg-Zj4IzP4SkcZ4q77L{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Zj4IzP4SkcZ4q77L .error-icon{fill:#552222;}#mermaid-svg-Zj4IzP4SkcZ4q77L .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Zj4IzP4SkcZ4q77L .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .marker.cross{stroke:#333333;}#mermaid-svg-Zj4IzP4SkcZ4q77L svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Zj4IzP4SkcZ4q77L p{margin:0;}#mermaid-svg-Zj4IzP4SkcZ4q77L .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster-label text{fill:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster-label span{color:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster-label span p{background-color:transparent;}#mermaid-svg-Zj4IzP4SkcZ4q77L .label text,#mermaid-svg-Zj4IzP4SkcZ4q77L span{fill:#333;color:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .node rect,#mermaid-svg-Zj4IzP4SkcZ4q77L .node circle,#mermaid-svg-Zj4IzP4SkcZ4q77L .node ellipse,#mermaid-svg-Zj4IzP4SkcZ4q77L .node polygon,#mermaid-svg-Zj4IzP4SkcZ4q77L .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .rough-node .label text,#mermaid-svg-Zj4IzP4SkcZ4q77L .node .label text,#mermaid-svg-Zj4IzP4SkcZ4q77L .image-shape .label,#mermaid-svg-Zj4IzP4SkcZ4q77L .icon-shape .label{text-anchor:middle;}#mermaid-svg-Zj4IzP4SkcZ4q77L .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .rough-node .label,#mermaid-svg-Zj4IzP4SkcZ4q77L .node .label,#mermaid-svg-Zj4IzP4SkcZ4q77L .image-shape .label,#mermaid-svg-Zj4IzP4SkcZ4q77L .icon-shape .label{text-align:center;}#mermaid-svg-Zj4IzP4SkcZ4q77L .node.clickable{cursor:pointer;}#mermaid-svg-Zj4IzP4SkcZ4q77L .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .arrowheadPath{fill:#333333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Zj4IzP4SkcZ4q77L .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Zj4IzP4SkcZ4q77L .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Zj4IzP4SkcZ4q77L .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster text{fill:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L .cluster span{color:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Zj4IzP4SkcZ4q77L .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Zj4IzP4SkcZ4q77L rect.text{fill:none;stroke-width:0;}#mermaid-svg-Zj4IzP4SkcZ4q77L .icon-shape,#mermaid-svg-Zj4IzP4SkcZ4q77L .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Zj4IzP4SkcZ4q77L .icon-shape p,#mermaid-svg-Zj4IzP4SkcZ4q77L .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Zj4IzP4SkcZ4q77L .icon-shape .label rect,#mermaid-svg-Zj4IzP4SkcZ4q77L .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Zj4IzP4SkcZ4q77L .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Zj4IzP4SkcZ4q77L .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Zj4IzP4SkcZ4q77L :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 输入
36 层解码器 · 帧内/帧间交替
重复18次
偶数层

帧内注意力: 每帧内部 patch 互相看
奇数层

帧间注意力: 所有帧 tokens 展平互相看
图像帧
DINOv2 ViT-L/14 编码器

切 patch
+5 个 register tokens
输出 hidden tokens

= Map Tokens
Point Head

局部 3D 点 xyz
Conf Head

置信度 Σ
Camera Head

9D旋转+SVD正交化 → SE3位姿 g
位姿 g 变换局部点 → 世界点云

  • 同一套解码器权重,靠注意力 mask 不同切换 Frontend / Backend / Mixed(见下方三模式表),不是三个不同网络
  • RoPE2D 给每个 patch 编 2D 位置;KV cache 存的正是这些层的 K/V

2.2 三训练模式的数据流对比

#mermaid-svg-UubeD0Ct18hozcwz{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-UubeD0Ct18hozcwz .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-UubeD0Ct18hozcwz .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-UubeD0Ct18hozcwz .error-icon{fill:#552222;}#mermaid-svg-UubeD0Ct18hozcwz .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-UubeD0Ct18hozcwz .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-UubeD0Ct18hozcwz .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-UubeD0Ct18hozcwz .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-UubeD0Ct18hozcwz .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-UubeD0Ct18hozcwz .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-UubeD0Ct18hozcwz .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-UubeD0Ct18hozcwz .marker{fill:#333333;stroke:#333333;}#mermaid-svg-UubeD0Ct18hozcwz .marker.cross{stroke:#333333;}#mermaid-svg-UubeD0Ct18hozcwz svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-UubeD0Ct18hozcwz p{margin:0;}#mermaid-svg-UubeD0Ct18hozcwz .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-UubeD0Ct18hozcwz .cluster-label text{fill:#333;}#mermaid-svg-UubeD0Ct18hozcwz .cluster-label span{color:#333;}#mermaid-svg-UubeD0Ct18hozcwz .cluster-label span p{background-color:transparent;}#mermaid-svg-UubeD0Ct18hozcwz .label text,#mermaid-svg-UubeD0Ct18hozcwz span{fill:#333;color:#333;}#mermaid-svg-UubeD0Ct18hozcwz .node rect,#mermaid-svg-UubeD0Ct18hozcwz .node circle,#mermaid-svg-UubeD0Ct18hozcwz .node ellipse,#mermaid-svg-UubeD0Ct18hozcwz .node polygon,#mermaid-svg-UubeD0Ct18hozcwz .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-UubeD0Ct18hozcwz .rough-node .label text,#mermaid-svg-UubeD0Ct18hozcwz .node .label text,#mermaid-svg-UubeD0Ct18hozcwz .image-shape .label,#mermaid-svg-UubeD0Ct18hozcwz .icon-shape .label{text-anchor:middle;}#mermaid-svg-UubeD0Ct18hozcwz .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-UubeD0Ct18hozcwz .rough-node .label,#mermaid-svg-UubeD0Ct18hozcwz .node .label,#mermaid-svg-UubeD0Ct18hozcwz .image-shape .label,#mermaid-svg-UubeD0Ct18hozcwz .icon-shape .label{text-align:center;}#mermaid-svg-UubeD0Ct18hozcwz .node.clickable{cursor:pointer;}#mermaid-svg-UubeD0Ct18hozcwz .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-UubeD0Ct18hozcwz .arrowheadPath{fill:#333333;}#mermaid-svg-UubeD0Ct18hozcwz .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-UubeD0Ct18hozcwz .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-UubeD0Ct18hozcwz .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-UubeD0Ct18hozcwz .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-UubeD0Ct18hozcwz .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-UubeD0Ct18hozcwz .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-UubeD0Ct18hozcwz .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-UubeD0Ct18hozcwz .cluster text{fill:#333;}#mermaid-svg-UubeD0Ct18hozcwz .cluster span{color:#333;}#mermaid-svg-UubeD0Ct18hozcwz div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-UubeD0Ct18hozcwz .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-UubeD0Ct18hozcwz rect.text{fill:none;stroke-width:0;}#mermaid-svg-UubeD0Ct18hozcwz .icon-shape,#mermaid-svg-UubeD0Ct18hozcwz .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-UubeD0Ct18hozcwz .icon-shape p,#mermaid-svg-UubeD0Ct18hozcwz .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-UubeD0Ct18hozcwz .icon-shape .label rect,#mermaid-svg-UubeD0Ct18hozcwz .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-UubeD0Ct18hozcwz .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-UubeD0Ct18hozcwz .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-UubeD0Ct18hozcwz :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 模式3 Backend·Full
仅 Map Tokens M
全部互相看
backendT 输出

≈ 一次性回环优化
模式2 Mixed
前半: Map Tokens M

后半: 新图像 I
前半任意互看

后半只看过去
后端cache接前端
模式1 Frontend·Causal
图像 tokens I
只准看过去帧
frontendT 输出

3. 联合训练三模式(同一套权重)

Mode 输入 注意力 对应推理
1 Frontend 图像 tokens III Causal frontendT + KV
2 Backend+Frontend 前半 MMM + 后半新 III Mixed 后端 cache 共享后继续前端
3 Backend 仅 MMM Full backendT

损失:L=Ldepth+Lpmap+λLcamL = L_{\text{depth}} + L_{\text{pmap}} + \lambda L_{\text{cam}}L=Ldepth+Lpmap+λLcam,λ=100\lambda=100λ=100;三模式 Lall=L1+L2+βL3L_{\text{all}}=L_1+L_2+\beta L_3Lall=L1+L2+βL3,β=10\beta=10β=10。尺度对齐跟 Pi3。

4. KV Pruning(DivPrune)

  • 问题:长序列 KV 显存/延迟炸
  • 做法:每帧对 patch tokens 做 最大最小多样性 选留 γ⋅P\gamma\cdot Pγ⋅P 个;只剪 K/V,保留全部 Q
  • 效果:保留 50%/25%/12.5% 时 7-Scenes 重建几乎不掉;6.25% 才明显变差;还可动态 log/sqrt 池

实验结论(记住数量级即可)

设定 结果要点
TUM ATE(未标定) Avg 0.039 m,优于多数学习 SLAM;复杂 room/floor 受益于后端
7-Scenes 跟踪 Avg 0.042 m,未标定领先
Replica 跟踪 Avg 0.030 m,未标定强;合成无噪声时仍略逊经典 DROID(标定)
7-Scenes 重建 Acc 0.017 / Complet 0.037 / Chamfer 0.027,显著优于 VGGT-SLAM 等
Replica 重建 Acc/Comp 2.09 / 1.56,全面最优
消融 Frontend-only ATE 0.134 → +Backend 0.039

训练:Pi3 初始化,10 epoch,batch 32,每 batch 12 帧,32×A100 ≈11h;推理评测用 RTX 4090。

要点总结

  1. 完整 SLAM 流水线可以学进一个 Transformer ,关键不是「又一个重建网络」,而是 前端因果 + 后端全注意力 + KV 回灌。
  2. Map tokens 是隐式地图;最终点云/位姿是 heads 从 tokens 解出来的。
  3. 后端的全注意力 ≈ 传统回环:不需要单独 BoW 回环模块。
  4. 只剪 KV、不剪 Query 是长序列可跑的关键工程技巧。

开放问题

  • 真机动态物体、运动模糊、大幅曝光变化下稳定性如何?
  • 多相机 / 人型机器人外参抖动场景是否直接适用?
  • retention_ratio=0.5 演示友好,正式评测作者要求 1.0(见 issue #15)------工程上如何自适应?
  • ConvHead(V1.1)修 grid artifact:与 LinearPts3d 在精度/速度上的系统对比?

本地资源

  • FAQ:2026-08-10 - SLAM-Former机制FAQ深讲

  • PDF:

  • 代码:

  • 精读+代码导读展开:2026-08-10 - SLAM-Former论文与代码导读

相关推荐
Eloudy20 小时前
从 DeepSeek-V1 到 DeepSeek-V2:一次从“堆稠密参数”到“稀疏计算+压缩缓存”的架构转向
gpt·llm·transformer
高洁012 天前
数据同化与动态状态估计:让孪生持续贴合现实
人工智能·python·深度学习·transformer·迁移学习
wangxiaoxuan2172 天前
地图表示怎么选:栅格、点云、体素、TSDF 与 ESDF
机器人·slam·机器人导航·科沃斯八界
一起学安全技术5 天前
拆大模型 03|注意力的一句话版本:不用论文讲清 Attention
深度学习·算法·语言模型·transformer
风巽·剑染春水5 天前
【Generative AI综述】生成式人工智能在医学影像中的应用(ACME-2026)
人工智能·transformer·gan·vae·生成模型·扩散模型·医学影像
机器学习之心5 天前
5 个特征、2 个输出:让 DBO 替 CNN-Transformer 挑结构,再用 SHAP 把黑箱撬开
人工智能·cnn·transformer·cnn-transformer
bryant_meng6 天前
【TNT】《Transformer in Transformer》
人工智能·深度学习·transformer·word embedding·tnt·sentence embed
布吉岛的石头8 天前
Java 程序员第 50 阶段14:灾难性遗忘与回放
人工智能·深度学习·transformer
weixin_468466858 天前
视觉Transformer的“第二次革命”:ViT³如何用测试时训练重构注意力范式
人工智能·深度学习·机器学习·ai·重构·transformer·vit
米糕闯编程9 天前
鱼香ros2(二十五)导航
机器人·slam·ros2·launch·navigation2