嵌入空间 · 邻居决定可比较关系Embedding Space · Neighborhoods Define Comparable Relations
many embeddings + shared axes → clusters, neighbors, leakage
一个 embedding
只是一个点;许多点共享空间后,方向与邻域才开始表达关系。切换同库/分库,看空间设计如何改变邻居。One embedding is only a point. When many share a space, directions and
neighborhoods begin to carry relationships. Switch store design and
watch neighbors change.
01 · 从座位表开始01 · Think of a seating plan
把维修、财务、人事资料全坐在同一间教室,最近的“同学”一定是应该看到的吗?If maintenance, finance, and HR documents share one room, is the
nearest “classmate” always one that should be visible?
●··●
023D 聚簇与邻域球3D Clusters and Neighborhood Sphere
唯一变量:库设计One variable: store design
模式Mode
同库Shared
所有领域同空间all domains together
球内邻居Neighbors in sphere
4
radius 1.35
跨域邻居Cross-domain
1
应隔离should be isolated
正在生成词点聚簇…Generating word-point clusters…
同库 · 查询“电机故障”shared store · query “motor fault”
查询 · 电机故障query · motor fault
设备维修簇maintenance cluster
财务簇finance cluster
人事簇HR cluster
拖动旋转 · 红球 = 固定邻域drag to orbit · red sphere = fixed neighborhood
03从一个点到一个空间From One Point to a Space
point · cluster · neighborhood · boundary
POINT
Embedding
每个词或文档被映射为一个稠密向量点。Each word or document maps to one dense vector point.
CLUSTER
聚簇Cluster
相似训练关系会让若干点形成局部群。Similar training relationships form local groups of
points.
NEIGHBORHOOD
邻域Neighborhood
以查询为中心的范围决定哪些点成为候选。A region around the query determines which points become
candidates.
04最小机制:同一空间才可直接比较邻近Minimal Mechanism: Direct Proximity Requires a Shared Space
neighbors(q) = {d | dist(q,d) ≤ r}
Nr(q) = {d : ‖q⃗ − d⃗‖ ≤ r}
邻域半径 r 固定为
1.35。切换库设计只移动治理上不该同域比较的点,邻居集合随之变化。Neighborhood radius r stays 1.35. Switching store design moves
points that should not be compared within the same governance
domain, changing the neighbor set.
选择库设计Choose store design同库或按域隔离shared or domain-separated
空间边界改变Boundaries change跨域点移出可比区域cross-domain points move out
05边界实验:语义近邻也会跨域泄漏Boundary Test: Semantic Neighbors Can Leak Across Domains
主动制造失败Create a failure
让人事“绩效风险”混入维修邻域Let HR “performance risk” enter maintenance neighbors
“风险”在表示上可能靠近“故障”,但这不表示查询者应看到人事材料。向量相近不能替代授权边界。“Risk” may sit near “fault” in representation space, but
that does not authorize access to HR material. Vector proximity
cannot replace access boundaries.
尚未执行。先比较同库与分库。Not run yet. Compare shared and separated stores first.
✗ 一个 embedding 足以解释整个空间。One embedding explains the whole space.
→ ✓ 关系来自多个点共享的方向与邻域。Relations arise from shared directions and
neighborhoods.
✗ 最近邻天然有权限被召回。Nearest neighbors are automatically
authorized.
→ ✓ 权限和租户边界必须在相似度之外执行。Permissions and tenancy boundaries sit outside
similarity.
✗ 分库只会降低检索质量。Separating stores only hurts retrieval
quality.
→ ✓ 分库也能减少不该参与比较的候选。Separation also removes candidates that should not be
compared.
06 · 一句话带走06 · One line to keep
嵌入空间让多个 embedding
的方向与邻域可比较;同库/分库会直接改变候选邻居,但相似度永远不能代替授权。An embedding space makes directions and neighborhoods comparable
across embeddings. Shared versus separated stores changes
candidates directly, but similarity never replaces
authorization.