Files
nexus/wiki/concepts/SemanticAnomalyCompression.md
2026-05-03 05:42:12 +08:00

37 lines
1.2 KiB
Markdown
Raw 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: "Semantic Anomaly Compression"
type: concept
tags: []
last_updated: 2026-05-01
---
## Definition
通过向量嵌入sentence-transformers和语义聚类ChromaDB/FAISS将海量异常数据行压缩为少量语义模式家族从而将大规模数据修复问题的 SLM/LLM 调用量降低 95%+ 的方法论。
## Core Mechanism
1. **Embedding**: 使用本地 sentence-transformers如 all-MiniLM-L6-v2对异常数据行生成向量表示
2. **Clustering**: 使用 ChromaDB 或 FAISS 对向量进行语义聚类,分组为 8-15 个模式家族
3. **Sampling**: 从每个聚类中提取 3-5 个代表性样本
4. **Fix Generation**: SLM 只需处理 ~12 个聚类代表,而非数万个原始数据行
## Formula
```
50,000 anomalous rows → ~12 semantic clusters → ~12 SLM calls (vs 50,000)
```
## Key Properties
- **Deterministic**: 聚类结果可复现
- **Offline**: 所有嵌入计算在本地完成,无外部 API 调用
- **Composable**: 可与任何数据管道集成,不改变上游 schema
- **Auditable**: 每个聚类的代表样本和处理过程均可记录
## Related
- [[Air-Gapped SLM Fix Generation]]
- [[Hybrid Fingerprinting]]
- [[Zero Data Loss Guarantee]]