Files
myWiki/concepts/dual-encoder-vlm.md

35 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "双编码器 VLM (Dual-Encoder VLM)"
created: 2026-07-04
updated: 2026-07-04
type: concept
tags: [architecture, multimodal, vlm]
sources: []
---
# 双编码器 VLM (Dual-Encoder VLM)
使用独立视觉编码器和文本编码器将图像和文本分别映射到共享嵌入空间,然后通过余弦相似度进行匹配的视觉语言模型架构。
## 数学表述
- 图像 $x$ 经视觉编码器 $f_{\text{img}}$ → 单位嵌入 $z \in S^{d-1}$
- 文本 $t$ 经文本编码器 $f_{\text{text}}$ → 单位嵌入 $u \in S^{d-1}$
- 分类:$f(z) = \arg\max_c \langle z, u_c \rangle$
## 与融合型 VLM 的对比
- 双编码器:嵌入独立计算,可预先缓存文本嵌入,检索效率高
- 融合型(如 LLaVA、Flamingo视觉和文本在 Transformer 中交叉注意力,能力更强但计算成本高
## 对鲁棒性认证的意义
双编码器的分类器是闭式的cosine similarity → Voronoi cells决策边界可解析刻画这使得 [[semantic-robustness-certification|语义鲁棒性认证]] 中的闭式分析成为可能。
## 参考
- [[vision-language-models|VLM]]
- [[clip|CLIP]]
- [[cosine-similarity-geometry|余弦相似度几何]]
- [[voronoi-decision-regions|Voronoi 决策区域]]