用于概率机器学习谓词的无冲突策略语言:一个框架和语义路由器DSL的案例研究
Conflict-Free Policy Languages for Probabilistic ML Predicates: A Framework and Case Study with the Semantic Router DSL
AI总结:
本文提出一个无冲突策略语言框架,解决概率ML信号在路由和访问控制中的冲突问题,通过温度缩放softmax划分嵌入空间,避免模型冲突,应用于语义路由器DSL。
摘要:
策略语言中的冲突检测是一个已解决的问题--只要每个规则条件都是清晰的布尔谓词。BDD、SMT求解器和NetKAT都利用这一假设。但越来越多的路由和访问控制系统基于概率ML信号做决策:嵌入相似性、领域分类器、复杂度估计器。两种这样的信号,声明在作者意图互斥的类别上,可以在同一查询上同时超过阈值,静默地路由到错误的模型。编译器中没有任何东西会警告这一点。我们将问题表征为三级可判定性层次结构--清晰冲突可通过SAT解决,嵌入冲突减少到球面帽交集,分类冲突在没有分布知识的情况下是不可判定的--并显示对于嵌入情况,这在实践中占主导地位,用温度缩放的softmax替代独立阈值化,将嵌入空间划分为Voronoi区域,其中同时触发是不可能的。不需要模型重新训练。我们实现了检测和预防机制在语义路由器DSL中,这是一个用于LLM推理的生产路由语言,并讨论了相同的想法如何应用于语义RBAC和API网关策略。
英文摘要:
Conflict detection in policy languages is a solved problem -- as long as every rule condition is a crisp Boolean predicate. BDDs, SMT solvers, and NetKAT all exploit that assumption. But a growing class of routing and access-control systems base their decisions on probabilistic ML signals: embedding similarities, domain classifiers, complexity estimators. Two such signals, declared over categories the author intended to be disjoint, can both clear their thresholds on the same query and silently route it to the wrong model. Nothing in the compiler warns about this. We characterize the problem as a three-level decidability hierarchy -- crisp conflicts are decidable via SAT, embedding conflicts reduce to spherical cap intersection, and classifier conflicts are undecidable without distributional knowledge -- and show that for the embedding case, which dominates in practice, replacing independent thresholding with a temperature-scaled softmax partitions the embedding space into Voronoi regions where co-firing is impossible. No model retraining is needed. We implement the detection and prevention mechanisms in the Semantic Router DSL, a production routing language for LLM inference, and discuss how the same ideas apply to semantic RBAC and API gateway policy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。