让数据库模型实时适应数据变化,无需重训就能保持高精度。
In-Context Adaptation to Concept Drift for Learned Database Operations
- 利用执行结果构建动态上下文,实现在线自适应。
- 在基数估计任务中误差降低22.5%,适应速度最快提升5.2倍。
- 适合需要持续运行的数据库系统,如实时分析平台。
机器学习在查询优化和数据库内数据分析等操作中展现出巨大潜力,但动态数据库环境中的频繁更新与数据分布变化会导致概念漂移,使学习模型性能下降,限制其实际应用。解决这一问题需高效框架,在不增加重训练或微调开销的前提下实现概念自适应。本文提出FLAIR,一种基于“上下文内自适应”新范式的在线适应框架。该框架利用数据系统中预测结果即时可得的特性,动态构建上下文记忆 $C_t$,将自适应形式化为 $f:(\mathbf{x} \,| \,C_t) \to \mathbf{y}$,使预测与当前概念对齐,避免运行时参数优化。FLAIR集成两个核心模块:任务特征编码模块,将任务特征求标准化;以及通过贝叶斯元训练预训练的动态决策引擎,可在运行时利用上下文信息无缝自适应。在多个关键数据库任务上的实验表明,FLAIR显著优于现有基线,最高实现5.2倍加速,基数估计误差降低22.5%。
原文摘要 · Abstract (English)
Machine learning has demonstrated transformative potential for database operations, such as query optimization and in-database data analytics. However, dynamic database environments, characterized by frequent updates and evolving data distributions, introduce concept drift, which leads to performance degradation for learned models and limits their practical applicability. Addressing this challenge requires efficient frameworks capable of adapting to shifting concepts while minimizing the overhead of retraining or fine-tuning. In this paper, we propose FLAIR, an online adaptation framework that introduces a new paradigm called \textit{in-context adaptation} for learned database operations. FLAIR leverages the inherent property of data systems, i.e., immediate availability of execution results for predictions, to enable dynamic context construction. By formalizing adaptation as $f:(\mathbf{x} \,| \,C_t) \to \mathbf{y}$, with $C_t$ representing a dynamic context memory, FLAIR delivers predictions aligned with the current concept, eliminating the need for runtime parameter optimization. To achieve this, FLAIR integrates two key modules: a Task Featurization Module for encoding task-specific features into standardized representations, and a Dynamic Decision Engine, pre-trained via Bayesian meta-training, to adapt seamlessly using contextual information at runtime. Extensive experiments across key database tasks demonstrate that FLAIR outperforms state-of-the-art baselines, achieving up to 5.2x faster adaptation and reducing error by 22.5% for cardinality estimation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。