模型架构
Embedding models
Map text, images, audio, users, or items into vectors whose geometry is trained to preserve a useful notion of similarity.
思维模型
A learned coordinate system. Nearness means “similar under the training objective,” not universally equivalent or factually related.
数据流
- Input item
- Encoder
- Pooling or projection
- Fixed-length vector
- Similarity search, clustering, or classifier
训练方式
Contrastive, metric-learning, classification, or paired-data objectives pull useful matches together and push negatives apart. The negative-sampling strategy and domain data define what similarity means.
推理运行方式
Each item is encoded in one forward pass. Stored vectors enable fast approximate-nearest-neighbor search; a cross-encoder can rerank the small candidate set for finer interaction.
优势
- Efficient semantic retrieval over large collections
- Reusable features for clustering, routing, recommendations, and deduplication
- Candidate vectors can be computed and indexed ahead of time
权衡
- A single vector compresses away token-level detail
- Similarity degrades under domain, language, or time drift
- Scores are model- and index-specific, not calibrated probabilities
适用场景
- You need semantic candidate retrieval
- The corpus is too large for pairwise scoring
- You can evaluate recall on production-shaped queries
应避免或质疑的场景
- Exact lexical matching is the only requirement
- You need a generated response rather than a representation
- A similarity threshold would be deployed without calibration
已发表的示例系列
- • BERT-derived sentence encoders
- • The separate text and image towers used by CLIP
常见组合
Encoder-only TransformerContrastive / dual encodersRetrieval-augmented systems