In-Context Adaptation to Concept Drift for Learned Database Operations
Authors: Jiaqi Zhu
Shaofeng Cai
Yanyan Shen
Gang Chen
Fang Deng
Beng Chin Ooi
Venue: ICML 2025 poster (2025)
Keywords: Concept Drift
Learned Database Operation
Online Adaptation
Primary area: applications->everything_else
TL;DR: An efficient and effective online adaptation framework for learned database operations

Abstract: 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} | \mathcal{C}_t) \to \mathbf{y}$, with $\mathcal{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.2\times$ faster adaptation and reducing error by 22.5\% for cardinality estimation.

In-Context Adaptation to Concept Drift for Learned Database Operations
Jiaqi Zhu Shaofeng Cai Yanyan Shen
Gang Chen
4
Fang Deng'
Beng Chin Ooi
Abstract
1. Introduction
Data systems are increasingly integrating machine learning functionalities to enhance performance and usability, mark- ing paradigm shift in how data is managed and processed in databases (Ooi et al., 2024; McGregor, 2021; Li et al., 2021; Ooi et al., 2015). The integration has transformed key database operations such as query optimization, index- ing, and workload forecasting into more precise, efficient, and adaptive processes (Zhang et al., 2024a; Kurmanji & Triantafillou, 2023; Anneser et al., 2023).
Machine learning has demonstrated transforma- tive potential for database operations, such as query optimization and in-database data analytics. However, dynamic database environments, char- acterized 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 capa- ble of adapting to shifting concepts while mini- mizing the overhead of retraining or fine-tuning.
Despite these advancements, learned database operations face a persistent challenge: concept drift. Databases inherently dynamic, undergoing frequent insert, delete, and update operations that result in shifts in data distributions and evolving input-output relationships over time (Zeighami & Shahabi, 2024). These drifts, often subtle but cumulative, can alter the patterns and mappings that traditional machine learning models rely upon, rendering their assumptions of static distributions invalid. This phenomenon requires adap- tive methods for maintaining predictive accuracy in dynamic database environments.
In this paper, we propose FLAIR, an online adap- tation framework that introduces a new paradigm called in-context adaptation for learned database operations. FLAIR leverages the inherent prop- erty of data systems, i.e., immediate availability of execution results for predictions, to enable dy- namic context construction. By formalizing adap- tation as f (x C.) - y, with C, representing a dynamic context memory, FLAIIR delivers predic- tions aligned with the current concept, eliminating the need for runtime parameter optimization. To achieve this, FLAIR integrates two key modules: Task Featurization Module for encoding task- specific features into standardized representations, and a Dynamic Decision Engine. pre- pre-trained via Bayesian meta-training, to adapt seamlessly using contextual information runtime. Extensive ex- periments across key database tasks demonstrate that FLAIR outperforms Maate-ff-hhear baselines, achieving up to 5.2x faster adaptation and reduc- ing error by 22.5% for cardinality estimation.
Traditional reactive training- based adaptation approaches to handling concept drift, such as transfer learning (Jain et al., 2023; Kurmanji & Triantafillou, 2023; Kurmanji et al., 2024), active learning (Ma et al., 2020; Li et al., 2022), and multi-task learning (Kollias et al., 2024: Wu et al., 2021), come with significant drawbacks in learned database op- erations. As illustrated in Figure 1, delays and costs in post-deployment data collection and model updates, and re- liance on static mappings limit their practicality in dynamic database environments (Kurmanji al., 2024; Li al., 2022). In addition, they process each input independently. The negligence of inter-query dependencies and shared con- textual information in databases results in poor modeling of database operations. Addressing these limitations raises two critical challenges: (1) How can we support one-the-fly adaptation to constantly evolving data without incurring the overhead of frequent retraining or fine-tuning in databases? (2) How can we dynamically inject contextual information into the modeling process to achieve context-awars predic- tion for learned database operations?
Beijjnn Institute of Technology, Beijing, China Nattionll Uni- versity of Singapore, Singapore 'Shanghai Jiao Tong University, Shanghai, China "Zhejiang University, Hangzhou, China. Corre- spondence to: Shaofeng Cai <shaofeng @
Proceedings of the 4 International Conference on Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
To address these challenges, we introduce FLAIR, an eFficient and effective onLine Adaptation fRamework that

---

In-Context Adaptation to Concept Drift for Learned Database Operations
Concept Drift in Databases
Key Features and Applications
Concept Drift
Update
X
Selaei
Kay
Oh GOOOOOX -OO0--0---00 0O
Effectivenete
Efficiency
Transderabiliy
Quary
Database
Apprication
Adaptation Paradigim
System-intemal Taaka & Ueer-ariented Teaks
Staletica
Cantinllty
Appronamcll
CONS
Col omy Stateriic
Updating Stariatice
Updats
Stadiciaa with
Stalfckcs
Inefficlent
Overall Performance
ML W.-nshoron Modtte
Ratair Asaeptttion High Latency
Periedically Collect and Updats
PhelgeaO Lalange de
Drin Dvtvction
Eisrt-divmm
Modwl2
Nocal a
ARR seeeyy (1.9X Foster)
Relgge50.
FLAR
Online: in-contect Adapoation
Adape
DCUs
ALECE
Effciercy Adactatio apaed incrsasd by 5.2X
FAN toa
Eltesivvnoss Ener recuced
Mara
FLARR
Cecrsetic Meer of Ovener (OMG)
Figure 1: FLAIR in nutshell. (a) An example of concept drifts in dynamic database setting. (b) Adaptation paradigm for handling concept drifts in FLAIR and two conventional approaches. (c) Key features and applications of FLAIR. (d) A preview comparison of FLAIR against PostgreSQL and state- state-of-the-art approaches for handling dynamic databases.
establishes new adaptation paradigm for learned database operations. FLAIR is built on unique property of database operations: the immediate availability of execution results for predictions in the database. These results, serving as ground-truth labels, provide real-time feedback that enables seamless adaptation. FLAIR leverages this property to dy- namically adapt evolving concepts using such contextual cues from databases. Formally, FLAIR models the mapping as f (x C.) y. where denotes the input query, C, is the current context consisting of recent pairs of queries and their execution results, and y is the predicted output.
ciency and effectiveness.
FLAIR introduces Bayesian meta- meta-training that enables ro- bust and transferable learning from dynamic distributions, thus eliminating the need for costly parameter retraining or fine-tuning after deployment.
FLAIR is designed as a task-agnostic framework that enhances a wide range of learned database operations. These include system-internal tasks such as cardinality estimation, and user-oriented applications like approxi- mate query processing and in-database data analytics.
Extensive experiments show FLAIR's 's superior perfor- mance in dynamic databases, achieving a 5.2x speedup in adaptation and 22.5% reduction in GMQ error for car- dinality estimation. Furthermore, by integrating FLAIR with PostgreSQL, we achieve up to a 1.9x improvement in query exccution efficiency.
To achieve in-contexi udaptation for learned database oper- ations, FLAIR introduces two cascaded modules: the task featurization module (TFM) and the dynamic decision gine (DDE). The TFM encodes database operations into standardized task representations, extracting informative features and producing unified, structured input format. This ensures consistency and efficiency across diverse tasks within databases. The dynamic decision engine functions as the core of FLAIR, delivering predictions that can adapt evolving concepts. To this end, introduce Bayesian meta-training mechanism that utilizes synthetic prior distri- butions to pretrain FLAIR with a comprehensive knowledge base, pre-addpting it to handle diverse and dynamic scenar- ios. Unlike traditional reactive approaches, FLAIR elimi- intensive parameter optimization after deployment. To the best of our knowledge, FLAIR is the first framework enable on-the-fly and context-aware adaptation in dynamic data systems.
2. Preliminaries
Problem Formulation. Consider database D consisting of set of relations (tables) (Ri,. ..., RN). Each relation Rj has attribute fields (columns), R4 = (a.. a where the attributes correspond to either categorical or nu- merical features in prediction. select- peeect-rroeectjoinn (SPJ) queries executed alongside a mix of insert, delete, and update operations. The challenge ad- dressed is concept drift,, an intrinsic property of databases, described as shift in the relationship between queries and their corresponding predictive outputs over time.
this paper, we focus on
nates the need for compute-intensive
We summarize our main contributions as follows:
Definition 2.1 (Concept Drift in Databases). Let de be the underlying data of database at time t, and q, denote a user query at time t. Given the data-query pair (de, qı), let y: be the corresponding prediction output (e.g., row counts in
We propose a novel in-context adaptation framework FLAIR, designed to address the persistent challenge of concept drift in dynamic data systems with high effi-
2

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
cardinality estimation). Concept drift occurs at time i if the joint distribution of queries, data, and predictions changes, i.e. Pt (q, d, * P (q, d)
SQL Query
FLAIR
+ DBMS
Dynamic Decision Engine
Querr
Bayesion Merie-triniing
Oi-condest Adaptation
M
Parser
Systam-ittamal Tasks
Here, concept drift is driven by two interrelated sources: (I) Query drift, from evolving user behavior. (2) Data drift, caused by inser//deltte/update operations that change un- derlying data distributions. Notably, changing data not only changes the marginal distribution P(d), but also the condi- tional distribution P(ylq, d). That is, the same queries may yield different outputs over time. This suggests that concept drift in databases involves shifts in the joint distribution of queries, data, and predictions, and their interaction. For example, in an e-commerce database, incremental updates, such as new product additions, customer preference changes, or promotional campaigns, can lead to significant concept drift in product recommendations.
Cardinaity Estimation
Query Optimizer
Querles
Predictoos
Query Executor
Task Festurization Module
Update Context Momory
ontennoteete Yasks
Approsemtt Query Processing Dara Regression
Daka Access Layer
Data Clatsification
Figure 2: FLAIR for dynamic data systems.
from database environments and explore how to support in-context adaption for learned database operations.
Learned Database Operations. Learned database opera- tions employ machine learning models to enhance specific tasks in databases, such as cardinality estimation and approx- imate query processing. Let (n θ) denote prediction model parameterized by è in a database D. (M(xx; +) takes a query x as input and makes a prediction, e.g., the number of rows matching x for cardinality estimation.
3. FLAIR for Dynamic Data Systems
As illustrated in Figure 2, FLAIR introduces dual- module architecture that addresses concept drift in dynamic databases. First, to provide a unified interface across dif- ferent tasks, the Task Featurization Module (TFM) extracts task-specific features from database operation for the sub- sequent modeling. Second, the Dynamic Decision Engine (DDE) is pre-trained via Bayesian meta-training on dynamic distributions of tasks, pre-adapting it to diverse tasks encoun- tered during inference. After meta- tetaa-taiinin,, DDE utilizes the real-time feedback from databases as the latest contex- tual information to dynamically adapt to the current task. The workflow of FLAIR MM is outlined as:
However, a model becomes stale when concept drift oc- curs. Formally, the model Mp, (x; θ₂) trained on data D, becomes ineffective at time t + At, if P. yx * Pe-Ae (x, y). Traditional approaches require periodic data recollection and model retraining to maintain accuracy. This incurs high costs. Our objective is to ensure that the model MD, (x; θτ) can be efficiently and effectively adapted to evolving data distributions with these resource-intensive processes in database environments.
MF(x; (1(x;07,,p))
MDDDEMMMMMi θ7); Op), (l)
which comprises two cascading modules, the TFM MrFM and the DDE MaDE parameterized by Op and θ,, re- spectively. We introduce the technical details below.
In-context Learning with Foundation Models. Founda- tion models have seen rapid advancements in capability and scope (Radford et al., 2019; Raffel et al., 2020; Brown et al., 2020; Achiam et al., 2023), which give rise to a transforma- tive paradigm called in-context learning (ICL). ICL embeds context into the model input, and leverages foundation mod- els' broad learned representations to make predictions based on limited contextual examples, thus bypassing the need for parameter updates after deployment. This paradigm drastically cuts compute demands and facilitates various applications (Sun et al., 2022; Dong et al., 2022). A notable application for tabular data is Prior-data Fitted Networks (PFNs) (Müller et al., 2022: Hollmann et al., 2023; Helli al., 2024), which are pre-trained on synthetic datasets sampled from pre-defined priors. This enables PFNs to pre-adapt to dynamic environments by effectively modeling uncertainties and various distributions, making PFNs suit- able for scenarios with frequent updates and concept drift. Please refer to Appendix B for more details on ICL and PFNs. In this paper, we aim to utilize real-time feedback
3.1. Task Featurization Module
The TFM is designed to standardize database operations into structured inputs for downstream modeling. It first encodes data and queries of database operations into data vectors and a query vector respectively, and then extracts a task vector via cross-attention that integrates their interactions.
1.1.1. DATA AND QUERY ENCODING
Data Encoding, Each attribute (i.e., column) in the database is represented as a histogram, which captures its distribution. Formally, for attribute a,, in relation R,, the histogram x [ x56 uses 5 bins to discretize the range of the attribute. After scaling to [0. 1]. these histograms are aggre- gated to form comprehensive data vectors Xp of dimension x ΣN n2, where N is the total number of relations, and ny is the number of attributes relation R;-
3

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Query Encoding. Queries are represented vectors cap- turing structural and conditional information. Join predi- cates, e.g., Ria = Ryady are encoded into binary vec- tors qu via one-hot encoding, while filter predicates, e.g., Ria op Ω with op E {<, E, >, = being the compari- son operators and Ü the condition value, are encoded into boundary vectors qr. For details of encoding schemes for these predicates, please refer to Appendix C. The final query vector 90 9 concatenates these encodings.
Data
Query
COOO
Updated Conton Monery
TFM
Lita and Lharr Foooderr
Clurry View
DDE
Duta VocM
COOO
C
MLB: hood Adurtin
LBl Layer
Sell Altvtion
Layera
Layer
FFN ayar
Layer
Xb
Dioso
Liyars
Vulihaa
3.1.2. TASK FEATURIZATION
FFN Lapa!
MIP
To derive the task vector, we adopt a lightweight trans- former (Vaswani et al., 2017) architecture following (Li et al., 2023b), which employs hybrid attention mechanisms to extract deep latent features. The task featurization process starts with a data modeling phase, where data vectors XD processed through series of Multi-head Self-attention (MHSA) layers, interleaved with Feed-forward Network (FFN), Layer Normalization (LN), and residual connections. This is to capture implicit joint distributions and complex dependencies among attributes within XD:
Recent Ingul Info
Contect
Updare
Mieorry
Ougur
Goncalanate
Fronen (Metsmiood
Oupu
FIFO Qaeues
Figure 3: The architecture of FLAIR.
3.2. Dynamic Decision Engine
The DDE forms the core module of FLAIR. As illustrated in Figure 3, the DDE takes the task vector prepared by the TFM to provide real-time, context-aware predictions across various tasks. It comprises two phases: Bayesian meta-training and in-context adaptation.
2' = MHSA(LN(ZZ )) z
z FFN((IN(22) + 2'
(3)
where MHSA operations are formulated as:
pm z Whi Ki.. Z'-'W! Vlo. z' z'-'''' w!!" (4)
3.2.1. BAYESIAN META-TRAINING
z/m softmax( Ql. Qlm(k o
DDE is pre- tre-trained using synthetic datasets sampled from prior distributions, which equips the model with broad gen- eralization capabilities, enabling rapid adaptation to unseen tasks. The meta-training is based on Bayesian inference theory. Formally, for a given sample x with the evolving concept represented by a set of e observed sample pairs C = {(y,, x= from the current task, the Posterior Pre- dictive Distribution (PPD) of task predictive modeling is:
Vil
m 1,.,, M
(5)
vdx
z' concat(Z
z W
(6)
where Zo is composed of data vectors from XD. and M is the number of attention heads. Ql., K..m, and Vl. denote the query, key, and value of the m-th head in the I-th layer, obtained via transformation matrices Wi.m w and W respectively. Z' is the output of the 1-th layer, and w is the output transformation matrix.
p(y|x,C)= = ply|x, s)p(olC)do
(8)
In the subsequent interaction modeling phase, the output of the data modeling phase Zo is further refined via the Multi- head Cross-attention (MHCA) mechanism. Unlike MHSA, Zo serves dual roles as both the keys and values, while the query vector do acts as the query in MHCA. The query vector do interacts with every vector in Zo through key and value transformations, allowing TFM to dynamically focus on the features in Zo pertinent to the query. For each attention head m in MHCA, we have:
oc p(y| x, ))((C()))())
where the task distribution p(0) is sampled from curated prior distributions & to diversify the adaptability of DDE to different prediction tasks. Notably, to capture complex dependencies and uncover underlying causal mechanisms, we employ Bayesian Neural Networks (BNNs) (Neal, 2012) and Structural Causal Models (SCMs) (Pearl, 2009; Peters et al., 2017) in constructing the prior distribution following PFNs (Hollmann et al., 2023).
2"d = softmax go W
[ W.).
dd
The final task vector 2 is obtained by further processing the MHCA output through an FFN layer followed by LN with residual connections. In this way, the task vector zt contains task-specific information of both data attribute re- lations and query conditions, providing comprehensive task representations for the subsequent modeling in the DDE.
Based on the PPD formulation in Eq. (9), we first gener- ate synthetic datasets, namely the concept C of observed samples from the task distribution p(0), i.e., C ~ p(C)o). Second, we sample the data points (x,y) for predictive modeling from p(x, y (g). Next, we can train DDE using
4

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
the input-output configuration via the loss:
handle concept drift, these methods require collecting suf- ficient samples from the new distribution and updating the mapping fD,,e, ,, with parameter O based on these samples, so as to obtain a new mapping function f. with pa- rameter Q that aligns with the new distribution Dr. In contrast, our new paradigm essentially learns a conditional mapping as formulated in Eq. 14, which explicitly models the evolving concept provided by the context memory C₁ as the context of the current distribution Dz.
LDDE= Be(xxC)./Jepcosl- log (o C)]
(10)
where the yo x, C) is the model's predictive distribution parameterized by 0. By minimizing this expected nega- tive log probability LNDE, DDE is trained to maximize the likelihood of the observed data under the current task distribution p()). In particular, LDDE can be formalized as follows for different types of tasks, corresponding to regression and classification tasks, respectively,
Vt, ID. :x y Vt, (x.,0((x(0) y
(13)
y = + +lgg o
Creg= = E((xe0),))sp(s))
(11)
20a
(14)
This adaptability via the in-context adaptation mechanism is well-suited for databases. When a query is executed, the cor- responding system output becomes immediately available and can be stored in the context memory to provide super- vision for contextualized predictions of subsequent queries. Also, For user-oriented tasks like data classification, the con- text memory within FLAIR allows for online user feedback, which facilitates the development of a customized system better aligned with user preferences.
Ca.- - Ex(x))))))eplo)))
lyg co c)x
(12)
where ju and a are the mean and standard deviation in regres- sion tasks, II()) is the indicator function and qo (y k k|x, C) is the predicted probability of class k in classification tasks.
Remark. We note that the Bayesian meta-training is per- formed only once on the curated prior distributions across various tasks. With Bayesian meta-training, FLAIR is en- abled to quickly adapt to new concepts using a limited set of observed samples of the concept. This offers several advantages: (1) Cost-effective Data Collection: Generating synthetic data is significantly more cost-effective and faster (2) One-time Effort: The process is one-time effort, eliminating frequent retraining after deployment. (3) No Privacy Issues: Synthetic data does not contain real user information, thereby circumvent- ing privacy and security concerns. (4) Scalability: This strategy allows for easy adoption of desired prior task distri- butions instead of rebuilding the entire model from scratch.
3.3. FLAIR Workflow: Training to Inference
Training, FLAIR is trained in two stages: (i) First, the MDDE module undergoes a one-off meta-training phase using LDDE in Eq. 10 across crafted task distributions. Note that the meta-training is not to optimize FL.AIR directly on end tasks but to prepare DDE to adapt to new tasks met during inference without further training. (ii) Second, the MMFM module is trained to extract informative latent features that are critical for the specific tasks at hand. The training of TFM is tailored to optimize performance on these tasks. This employs a task-speeific loss Lrs to extract informative features for the DDE module.
than traditional data collection.
3.2.2. IN-CONTEXT ADAPTATION
During inference, we query the meta-trained DDE with the tuple (ZT,C) C) as input, where C = (Opme, Pmme), termed as context memory, contains contextual information of the current task. Spme and Ppme denote the sequences of recent queries and the system feedback, namely true outputs, which organized into two separate first-in, first-out (FIFO) queues of size g. This strategy enables DDE to dynamically adapt to new concepts guided by the context memory during adaptation
Inference. Once trained, FLAIR is ready for concurrent online inference and adaptation in a real-time environment:
MTFM θ7) Z7 MDDE(2T, C,pp) = y (15)
Sexeectee (x) = = (ZT.
update
C
(16)
where Sexecute()) is the data system executor that produces the actual system output y*, Fundamentally, FLAIR stream- lines the model update process by replacing the traditional, cumbersome backpropagation with an efficient forward pass via meta- meta-training and in-context adaptation mechanism.
inference, thus avoiding backpropagation-ban such as fine-tuning or retraining.
Remark. To better understand the in-context adapta- tion mechanism, we examine the key differences between FLAIR and existing learned approaches. Existing methods like Mareus et al. (2021); Zhao et al. (2022); Wang et al. (2023a) typically learn static mapping from input to output as in Eq. 13, which assumes fixed data distribution. When concept drift occurs in the time interval At = - t, i.e., D. * Dr and P. (x, y) # Pe (x,y), y), the mapping fo. from the input to the output should change accordingly. To
FLAIR efficiently accommodates large dynamic databases through incremental histogram maintenance in O(N,) with N₂ modified records and adapts to concept drift using FIFO key-value memory for in-context adaptation. The cross-attention mechanism operates on a single query vector and incurs only a linear overhead of Od, where d, is the attention dimension in DDE. This flexible and scalable workflow ensures that FLAIR learns effectively from new
5

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
tasks on-the-fly, adapting to evolving concepts in dynamic databases. Please refer Appendix F for more discussions.
memory e By ensuring that e is sufficiently large, the gen- eralization error remains well within the bounds of O Vo Unlike traditional models that experience a linear growth in generalization error with each data operation k. FLAIR's er- ror remains stable regardless of k. showing no performance deterioration with post-training data changes. Specifically, setting @ to be at least 8
3.4. Model Generalization Error Bound Analysis
In this section, we analyze the generalization error bounds of FLAIR against conventional models optimized for static data, when faced with post-training data evolving. We aim to uncover the susceptibility of outdated static models to dynamic environments and showcase FLAIR's resilience. Consider a model ft trained on dataset D' and frozen once training concludes. Subsequent single-point data opera- tions alter the data from D' to D3, where each operation is atomic, comprising either insertion deletion!. JD refers to the ground truth mapping to DJ, We now explore the worst-case bound on expected maximum generalization er- ror for robustness. A proof sketch is provided below, with detailed derivations available in Appendix E.
k-1 )² ensures that the expected worst-case generalization error of FLAIR stays below static models. This aligns with existing research (Namkoong & Duchi, 2016; Sagawa et al., 2020) that considers potential distribution shifts during training bolsters model resilience after deployment. Overall, Theorem 3.2 elucidates FLAIR's theoretical superiority over static models in maintaining continuous accuracy and operational efficiency, providing scalable solution with frequent data evolving.
4. Experiments
Consider a model i, trained on an initial dataset DV, where |D = i. After k data operations, in- cluding insertion and deletion, we obtain new dataset Dj of size |D'| = j. where k- + r > 1 and the nel difference in data size [j -i = rl. Suppose data in D are i.idd from any continuous distribution we have
Theorem 3.1.
In this section, we systematically evaluate the effective- ness, efficiency, and transferability of FLAIR2, Extensive experiments are conducted on real-world benchmarks for cardinality estimation to test the effectiveness of FLAIR across various degrees of concept drift, followed by assess- ments of training and inference efficiency. We then explore FLAIR's robustness against long-term concept drift, and its transferability to representative user-oriented tasks within databases. Moreover, we integrate FLAIR with PostgreSQL to confirm its compatibility with operational environments. Further results are provided in Appendix H and I.
sup Ens-x|]f((x-- - J (x)]] > k-1
Theorem 3.1 states that the risk of using a stale model to make predictions escalates at minimum rate of (2k)) as data evolves. Theoretically, to sustain error at c+1 model retraining is needed for every x data operation. The cost per retraining session generally involves processing the entire dataset or a significant portion thereof in the scale ((x) (Zeighami & Shahabi, 2024). Consequently, the amortized cost per data operation, given that retraining the model every e + data operation, also (x)). Thus, maintaining low error rates in such a dynamic setting can be computationally expensive. In contrast, our model defined as f(x exhibits resilience to changes in data.
4.1. Experimental Setup
Benchmarks. We evaluate FLAIR on two established real-world benchmarks: STATS (STA, 2015) and JOB- light (Leis et al., 2018; 2015). STATS contains over I million records, while JOB-light, derived from the IMDB dataset, includes 62 million records. We simulate real- world database conditions in our experiments by incorporat- ing varied SQL operations and design scenarios that mirror different levels of concept drift, ranging from mild severe. Further details are elaborated in Appendix G. and G.6.
Theorem 3.2. Consider FLAIR trained when the underlying database is D' and using context memory Ci to perform prediction when the database evolves D1, we have
Downstream Tasks. We primarily assess FLAIR's 's core per- formance through cardinality estimation (CE) tasks, along- side exploring its capabilities in user-oriented activities like approximate query processing (AQP) and in-database data analytics involving data classification and regression. Fur- ther details are available in Appendix G.3.
sup Epp Ex { - SDS - &
N
Vē
with high probubility 1 8, where N v ( + In +
Here, 2 is the size of the context memory C5, R is a constant reflecting the training adequacy, and data in Dd is drawn i.i.d from any continuous distribution x-
Baselines. We compare FLAIR with predominant fami- lies of CE technologies, including the estimator from Post- greSQL (pos, 1996). and SOTA learned approaches for dynamic environments, such as DeepDB (Hilprecht et al., 2019), ALECE (Li et al., 2023b), and DDUp (Kurmanji
Theorem 3.2 demonstrates that the generalization error of FLAIR can be effectively controlled by the size of context
'The code and data of FLAIR are available at https:// anonymous, 4open. sci wwwpe/////////////////
Forr simplicity, we solely consider insertion and deletion since the update operation can be decomposed into these operations.
6

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Table 1: Overall performance of cardinality estimation task under concept drift. The best performances are highlighted in bold and underlined, and the second- best are bold only.
Mild Dein
Severe Deifl
DuL
Method
90%
9.59
75%
9025
50%
75%
909
9055
Fisc-unet
5.35
3.47
9.32
$3.00
77.93
6.21
17.72
54.21
111.55
5.02
3.35
5.44
17:44
65.76
10.34
55.92
255.82
927.08
PostrrSQQ
174.38
497.56
611.53
21556.35
70977.46 .46
9.87
52.29
157.93
174.24
293.47
758.89
6740.46
62000.12
218196.66
10.39
83.37
401.75
1296.15
STATS
ALBCC
197.6
430.00
112.70
91
912.12
1130.76
DD00p
10.30
25.41
72.65
29.99
54.91
241.27
10:95
9.51
20:22
46.15
87.18
13,61
109.24
216.64
Pi PLAIR
4.49
7,86
6.95
24.06
04/94
7.01
75.04
61.33
167.61
5,47
513
7.67
25.52
81.57
7.97
16.76
306
100N 04
Fine-treet
2.45
1.36
9:28
20:47
2.56
3.42
4.09
2.31
9.68
57.51
5168.79 79
1,60
1.0%
1:30
1.86
PosignSQI.
K7.12
10.09
952.67
4.30
Job light
DeeyUi
32.24
10:52
436.77
698.13 12
0894,00
1.5%
18.19
36.24
125.55
05.69
14.76
972.51
7804.94
7.63e"
1.37
12:31
22.31
51.89
ALBCC
12.21
11:59
19.34
25.40
65:37
1.56
4.81
8.75
19.00
27.32
11.73
114.31
1930. 54
0670001
1.56
2.35
3.68
4.26
DDUp
46.95
35:35
1.39
FLAIR
2,09
6:00
18:62
1.36
2.04
10:21
73.91
4836.64
1.00
1.78
Fine-tone ty typeally represens perfortiance upper
amocg
achicwal through couyy
updates via partencta retnininn
Building Time
Adaptation Time
Inference Time
Storage Dvarheed
PostgreSQL
ALECE
Fine-tune
FLAIR
De
400
Dga
ALECE
300
D0.b:
OMO
200
20-
FLAI
10-
200
1956
1200
1005
100
6.0
003
90
Adaptadon Step (a) STATS
Adaptation Step
Total Time
Adapiation inference Ovemcad Time
Time
(MIB]
(b) light
Figure 4: Comparison of model efficiency.
Figure 5: Comparison of model robustness for long-term incremental concept drift.
& Triantafillou, 2023) with NeuroCard (Yang et al., 2020) being used as its base model. We also compare FLAIR with model fine-tuning outlined in (Kurmanji & Triantafillou, 2023), serving as high-performance baseline despite being computationally intensive. For AQP, our basclines include DBest++ (Ma et al., 2021), which utilizes only frequency tables (FTs) for the update, DBest++FT, which updates both FT's and mixture density networks (MDNs), and DDUp, which uses DBest++ as its base model. For in-database data analytics, we compare FLAIR with AutoML system AutoGluon (Erickson et al., 2020) and established ML algo- rithms, including n-nnarrst-neigghors (KNN), RandomFor- est, MLP, and popular boosting methods, XGBoost (Chen & Guestrin, 2016), LightGBM (Ke et al., 2017) and Cat- Boost (Prokhorenkova et al., 2018) for data classification, and AutoGluon, SVR, MLP, Dree RandomForest, and GradientBoosting for regression. See Appendix G.2 and G.4 for baselines and implementation details.
4.2. Effectiveness
In Table 1, we report the overall performance comparison in CE task. The results reveal that FLAIR consistently de- livers superior performance across all datasets and dynamic scenarios, often matching or even surpassing the outcomes of the fine-tune approach. Specifically, FLAIR achieves the best performance in 29 out of 32 quantile metrics. Even when including fine-tune comparisons, FLAIR surpasses nearly half of the evaluations for all metrics, underscoring its considerable precision in dynamic environments. Ad- ditionally, FLAIR significantly outperforms PostgreSQL across all datasets and settings, highlighting the limitations of PostgreSQL's independence assumption that often re- sults in inaccuracies with non-uniform data distributions. Furthermore, our experiments reveal that existing methods, including those using fine-tuning and knowledge distilla- tion, struggle with rapid and complex changes in dynamic systems. In contrast, FLAIR excels by promptly adapting to current concepts during concept drift, without data recollee- tion, offline updates, or separate drift detection processes.
Evaluation Metrics. We evaluate FLAAIR's effectiveness and efficiency across various tasks using targeted metrics. (1) Effectiveness Metrics: For CE tasks, we report the ac- curacy by the geometric mean of the Q-error (GMQ) as (Li et al., 2022; Dutt et al., 2019) along with Q-error and P-error across various quantiles, with particular emphasis on the tail performance. For AQP tasks, we use mean relative error (MRE) to evaluate the accuracy of query approximations. Additionally, we apply accuracy and Fl score for data clas- sification and mean squared error (MSE) and the coefficient of determination (It2) for data regression.
4.3. Efficiency
We evaluate the construction efficiency and resource us- age of FLAIR alongside baseline models on the JOB-light benchmark. The results in Figure 4 demonstrate that FLAIR is notably efficient in both building and adaptation phases. Remarkably, FLAIR accelerates adaptation speed by 5.2x while reducing the GMQ by 22.5% compared with the best baseline. To further improve FLAIR's 's inference efficiency, we implement an embedding caching mechanism in FLAIR,
(2) Efficiency Metrics: We assess FLAIR's 's efficiency by examining stor- age overhead, building time, inference time, and adaptation time. See Appendix G.5 for more details on the metries.
7

---

In-Con Co-CCntext Adaptation to Concept Drift for Learned Databasc Operations
Diledt+
Dilete+FT
FLAR AugFLAR
Irput Dara
CNN
Gau an Precess XGBcost
CatScost
NLP
Type LDD
FLAJR
AughBleste
NigDlesteof
AwgSOiip
Woomm Orrgin
MRE Jower better
Ave mag MBQ (lower is bettery
16-
BINDDRN Instoniinna Moons Driit Crote
Acc 0.915
Acc: 0.962 0.342
MEDI 0.542 F1:0.942
Acc: 0.515
Acc 0 925
Roc: 0.567
ACc 0.973
HRE
0.975
0.975
Acc:
0.520
F1.
Fl.00.422
F1:00780
F1: FLL00.82
[a] Dritt
(b) Severe Drift
Figure 6: Performance of AQP task.
PostgreSOL
Optimal
237
0.733
RCCTO
Ace: V27
RO5-0 750
FF:: 0:788
F11 0.732
P1:
0 724
F31 0:751
0352
F1: 0.788
Latancy 63
Litan 63
AOC- 0,296
FOD 0.4C4
RC2 P3:0.233
ACC 32
Rpc 2
Acc: D.46
RCC 6 6.000 0150.50
100 02297
71:00.43
0.345
2: 264
01:0.42
STATS
JDD
light
STATS
100 light
(a] Mild Crift
(b) Seveee Drift
Figure 7: Decision boundaries and model performance on data clas- sification task under concept drift.
Figure 8: Comparison of query latency.
which eliminates redundant computations by preventing recomputation on the repeated inputs. This enhancement significantly accelerates the inference process, yielding com- petitive inference times. Taking the overall performance into consideration, the slightly higher storage requirement imposed by FLAIR is acceptable.
Approximate Query Processing. The results in Figure 6, measured in MRE, consistently show that FLAIR outper- forms baseline approaches. Across various relations and dynamic settings, FLAIR achieves significant error reduc- tions, with averages up exceeding 10x with DBess++, 3x with +Be and 2x with DDUp These findings highlight the effectiveness of FLAIR in handling complex query scenarios. Most of the time, FLAIR outperforms methods that rely on fine-tuning and knowledge distillation, such as DBest++FT and DDUp This superiority stems from the limitations associated with only updating models during significant data drifts, which may not suffice for the accurate execution of AQP tasks in real and live system scenarios.
4.4. Long-term Incremental Concept Drift
To further assess FLAIR's s adaptability, we track the per- formance STATS and JOB- right,ght, focusing gradual drift indicated by rising Kullback-Leible divergence D L over extended periods. Figure 5 illustrates that FLAIR ef- fectively handles the challenging conditions of long-term incremental concept drift across both benchmarks, even on par with model fine-tuning. Furthermore, we observe that DDUp based knowledge distillation is inferior fine- tuning under long-tern gradual drift. This is in line with the results in Section 4.2, highlighting the inherent limitations of knowledge distillation: it mitigates catastrophic forget- ting by preserving prior learned knowledge but can inad- vertently replicate past errors, whereas fine-tuning directly adjusts to new data, correcting inaccuracies and adapting to evolving distributions. Conversely, FLAIR's 's innovative in-context adaptation paradigm, guided by dynamic context memory, achieves negligible error accumulation and ensures sustained adaptability without further training, distinguish- ing it from both knowledge distillation and fine-tuning.
In-database Data Analytics. We initially conduct a qualita- tive evaluation on illustrative toy problems to understand the behavior of FLAIR under concept drift, comparing against standard classifiers as shown in Figure 7. We utilize moons and iris datasets from scikit-learn (Pedregosa et al., 2011) 1). For the drift scenarios, we allocate 10% of data for model updates and the remaining 90% for evaluation. In each case, FLAIR effectively captures the decision boundary between samples, delivering well-calibrated predictions. We extend our empirical analysis to real-world tasks, applying data classification for sentiment analysis and data regression for rating prediction on IMDB (See Appendix H).
4.6. FLAIR in Action
Given the observation from existing research (Negi et al., 2021; Marcus et al., 2021; Li et al., 2023b) that a smaller Q- error does not necessarily reduce execution times, we extend our investigation by integrating FLAIR into PostgreSQL to assess its efficacy in a full full-fledged database system. We evaluate the latency measured as execution time per query on the test set of STATS and JOB-light. As in recent work (Li et al., 2023b), we substitute PostgreSQI's default cardinality estimator with FLAIR. Specifically, PostgreSQL uses the cardinality estimated by FLAIR to generate the ex-
4.5. Transferability
In data systems, system-internal tasks like CE provide im- mediate critical outcomes for optimization, while it is often not straightforward for user-oriented tasks. Next, we val- idate FLAIR's 's performance in user-oriented scenarios to showcase its wide applicability, where our context memory establishes a virtuous cycle of user feedback to refine model performance and facilitate system customization.
8

---

In-Conter Adaptation to Concept Drift for Learned Databasc Operations
ecution plan for each query in the benchmarks. The optimal baseline is established by replacing PostgreSQL's built-in estimations with ground-truth cardinalities. As depicted in Figure 8, FLAIR achieves latency that approaches the optimal level based on ground-truth cardinality. Compared to PostgreSQL's built-in cardinality estimator, FLAIR ac- celerates query execution by up to 1.9x. This superiority is even more significant in severe drift scenarios.
data insertions (Kurmanji & Triantafillou, 2023), and ex- plore transfer learning for machine unlearning address data deletions (Kurmanji et al., 2024). Additionally, re- inforcement learning (RL) has been used to strategically reduce the high costs of data collection by allowing an RI. agent to selectively determine which subsequent queries to execute in more targeted fashion (Zhang et al., 2019; Hil- precht et al., 2020; Zheng et al., 2024; Wang et al., 2023b), These strategies, while aimed at improving generalization in fluctuating settings, inherently face critical issues due to their requirements for data recollection and model retraining. For instance, optimizing query performance necessitates ex- ecuting numerous query plans, a process that is computation- ally intensive and significantly extends execution time (Wu et al., 2021; Hilprecht & Binnig, 2021; Li et al., 2022). The need for repetitive executions, whenever new concepts are detected, further compounds the operational challenges.
5. Related Work
Advances and Challenges of AIxDB. Database systems are increasingly embracing artificial intelligence (AI), spurring the development of Al-powered databases (AIxDB) (Ooi et al., 2024; Zhu et al., 2024b; Zhao et al., 2025). This fusion marks a new era for database systems, in which Al functionalities are incorporated to enhance the overall sys- tem performance and usability. Consequently, advanced models such deep neural networks (DNNs) and large lan- guage models (LLMs) are increasingly being integrated into database systems and applications, which have improved database management such as database tuning (Lao et al., 2024; Huang et al., 2024; Trummer, 2022), cardinality esti- mation (Lee et al., 2024; Kurmanji & Triantafillou, 2023; Li et al., 2023b; Hilprecht et al., 2019), and indexing (Zhang et al., 2024a; Li et al., 2020; 2023a; Gao et al., 2023; Sun et al., 2023; Zhang et al., 2024b). Recent work (Zeighami & Shahabi, 2024) presents a theoretical foundation for de- veloping machine learning approaches in database systems. However, unlike the data that Al models have been designed for, online transactional processing (OLTP) data is dynamic in nature and such dynamicity affects the robustness of mod- els. Indeed, the phenomenon of concept drift, where the underlying data distributions and relations shift, remains a critical challenge. In this study, our goal is to provide a solution for addressing concept drift in databases, ensuring both accuracy and sustainability in dynamic environments.
Inspired by large language models (LLMs), zero-shot learn- ing has been employed to enhance model adaptability to dynamic environments and generalize across different tasks (Zhou et al., 2023; Zhu et al., 2024a; Urban et al., 2023; Zhang et al., 2024c; Lin et al., 2025; Li et al., 2025). While this approach is theoretically promising, it faces prac- tical challenges, pre-training fine-tuning foundation models still requires substantial weal-world data collection. Additionally, the quality and relevance of training data to ac- tual workloads remain uncertain until deployment, making post-deployment performance unpredictable. Further, exist- ing methods struggle to keep pace with real-time evolving concepts and overlook inter-query relations, which compro- mises their effectiveness. To fundamentally address these challenges, we propose fresh perspective on online adapta- tion for database systems that supports on-the-fi in-context adaptation to evolving concepts without unnecessary data collection or retraining, ensuring unparalleled effectiveness and efficiency in operational settings.
Model Adaptation in Concept Drift. Variations in data critically affect the efficacy of Al-powered database sys- tems, also known as learned database systems. Such dis- crepancies between training data and those encountered post-deployment significantly degrade system performance, challenging model reliability in dynamical environments for the practical deployment (Negi et al., 2023; Zeighami & Shahabi, 2024). Recent cutting-edge machine learning paradigms such as transfer learning (Jain al., 2023; Kur- manji & Triantafillou, 2023; Zhu et al., 2023; Kurmanji et al., 2024; Ying et al., 2018), active learning (Ma et al., 2020; Li et al., 2022; Lampinen et al., 2024; Zhang et al., 2022), and multi-task learning (Kollias et al., 2024; Wu et al., 2021; Hu et al., 2024) have been employed to mitigate challenges of concept drift in learned database systems. No- tably, Kurmanji al. utilize knowledge distillation, guided by lass-
6. Conclusions
With frequent updates, the data in the database evolves, re- sulting in concept drift. Learned database operations are susceptible to concept drift, and may suffer significant pre- diction accuracy losses. This paper presents a novel online adaptation framework called FLAIR, which can adapt the in-database predictive model to evolving concepts automat- ically without cumbersome data recollection and model retraining. FLAIR performs Bayesian meta-training using abundant synthetic data sampled from dynamic task distribu- tions. After meta- training, it generates adapted predictions by prompting the model with contextual information re- garding the current concept. Extensive experiments across various database operations demonstrate that FLAIR is ef- fective, efficient, and transferable in dynamic data systems.
data detection for handling
9

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
ACKNOWLEDGMENTS
optimization for any sql database. Proceedings of the VLDB Endowment, 16(12):515-3327, 2023.
The work of BIT researchers is partially supported by Na- tional Science and Technology Major Project under Grant 20222D01 National Natural Science Foundation of China National Science Fund for Distinguished Young Scholars under Grant 62025301, and National Natural Sci- ence Foundation of China National Science Fund for Young Scientists (Ph.D.) under Grant 624B2027. The work of NUS researchers is supported by the Lee Foundation in terms of Beng Chin Ooi's s Lee Kong Chian Centennial Professorship fund. Yanyan Shen's work is supported by National Key Research and Development Program of China under Grant 2022YFE0200500. Gang Chen's work is supported by Na- tional Key Research and Development Program of China under Grant 2022YFB2703100.
Baldassini, F. B., Shukor, M., Cord. M., Soulier, L., and Piwowarski, B. What makes multimodal in-context learn- ing work? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1539- 1550, 2024.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models few-shot learners. Advances in neural information processing systems, 33: 1877-1901, 2020.
Chen, T. and Guestrin, C. Xgboost: scalable tree boosting system. In Proceedings of the 22nd aem sigkdd inter- national conference on knowledge discovery and data mining, pp. 785-794, 2016
Impact Statement
This paper showcases advances in the integration of Ma- chine Learning within data systems, presenting a framework that enhances the reliability and usability of Machine Learn- ing in real-world dynamic environments. By facilitating various database operations, the proposed framework en- courages broader adoption in practice, potentially reducing operational costs and energy consumption. There can be var- ious societal consequences, including enhancing decision- making in data-reliant sectors such healthcare, finance, and public services, and enabling businesses to achieve sig- nificant cost reductions through optimized operations and minimized manual intervention.
Dong, Q., Li, L.., Dai, D., Zheng, C., Wu, Z.,, Chang, B., Sun, X., Xu, J., and Sui, Z. A survey on in-context learning. arXiv preprint arXiv:2301.002 200.00044,,, 2022.
Dutt, A., Wang, C., Nazi, A., Kandula, S., Narasayya, V., and Chaudhuri, S. Selectivity estimation for range predi- cates using lightweight models. Proceedings of the VLDB Endowment, 12(9): 1044:1044-1100 1057, 2019.
Erickson, N., Mueller, J., Shirkov, A., Zhang, H., Larroy, P., Li, M., and Smola, A. Autogluon-tabular: Robust and accurate automl for structured data. arXiv preprint 2020.
References
Gao, J. Cao, X., Yao, x., Zhang, G., and Wang, W. Lmsfe: A novel multidimensional index based on learned monotonic space filling curves. arXiv preprint arXiv:2304. 2o..23044/265. /2635, 2023.
Postgresql global development group. https::/ //www. postgresql.co org. Accessed: 2024-05, 1996.
Stats benchmark. https://relati:e
data. org/dataset/Stats. Accessed: 2024-04, 2015.
Han, Y., Wu, Z., Wu, P., Zhu, R., Yang, J., Tan, L. W., Zeng, K., Cong, G., Qin, Y., Pfadler, A., et al. Cardinality esti- mation in dbms: comprehensive benchmark evaluation. Proceedings of the VLDB Endowment, 15(4):752-765, 2021.
Imdb dataset(top 2000 movies).
https://wwk
kaggle. kaaglle...om//ataattte/psssaaaaa
finbb--attaet-to--200---ooo 2024-05, 2024.
Accessed:
Harinath, S., Isaza, G., Mirchandani, A., and Dumitru, M. Testing microsoft sqi server analysis services. In Pro- ceedings of the 1st international workshop on Testing database systems, pp. 1-6, 2008
Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S.,
Anadkat, S., et al. Gpt-4 technical report. arXiv preprint 0030::2303.08774 2023.
Helli, K., Schnurr, D., Hollmann, N., Müller, S., and Hutter, F. Drift-resilient tabpfn: In-context learning temporal distribution shifts on tabular data. In The Thirty-eightt Annual Conference on Neural Information Processing Systems, 2024.
Amit, R. and Meir, R. Meta-learning by adjusting priors based on extended pac-bayes theory. In International Conference on Machine Learning, pp. 205-214. PMLR, 2018.
Anneser, C., Tatbul, N., Cohen, D., Xu, Z., Pandian, P., Laptev, N., and Marcus, Autosteer: Learned query
Helskyaho, H., Yu, J., Yu, K., Helskyaho, H., Yu, J., and Yu, K. Oracle analyties cloud. Machine Learning for Oracle
10

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Database Professionals: Deploying Model-Driven Appli- cations and Automation Pipelines, pp. 187-203, 2021.
Kullback, S. and Leibler, R. A. On information and suf- ficiency. The annals of mathematical statistics, 22(1): 79-86, 1951.
Hilprecht, B. and Binnig, C. One model rule them all: towards zero-shot learning for databases. arXiv preprint 0tt1:21105000442. 2021.
Kurmanji. M. and Triantafillou, P. Detect, distill and up- date: Learned di systems facing out of distribution data. Proceedings of the 2023 ACM SIGMOD International Conference on Management of Data, 1(1):1-27, 2023.
Hilprecht, B., Schmidt, A., Kulessa, M., Molina, A., Ker- sting, K., and Binnig, C. Deepdb: Learn from data, not from queries! arXiv preprint (0XXv::9990006000 2019.
Kurmanji, M., Triantafillou, E., and Triantafillou, P. Ma- chine unlearning in learned databases: An experimental analysis. Proceedings of the 2024 ACM SIGMOD Inter- national Conference on Management of Data. 2(1):1-26, 2024.
Hilprecht, B., Binnig, C., and Röhm, U. Learning par- titioning advisor for cloud databases. In Proceedings of the 2020 ACM SIGMOD international conference on management of data, pp. 143-157, 2020.
Lampinen, A., Chan, S., Dasgupta, I., Nam, A., and Wang, J. Passive learning of active causal strategies in agents and language models. Advances in Neural Information Processing Systems, 36, 2024.
Hoeffding, W. Probability incqualities for sums of bounded random variables. The collected works of Wassily Hoeffd- ing, pp. 409-426, 1994.
Hollmann, N., Müller, S., Eggensperger, K., and Hutter, F. Tabpfn: transformer that solves small tabular classifica- tion problems in a second. In The Eleventh International Conference on Learning Representations, 2023.
Lao, J., Wang, Y., Li, Y., Wang. J., Zhang, Y., Cheng, Z., Chen, W., Tang, M., and Wang. J. Gptuner: A manual- reading database tuning system via gpt-guided bayesian optimization. Proceedings of the VLDB Endowment, 17 18)11999-1952, 2024.
Hu, Y., Xian, R., Wu, Q., Fan, Q., Yin, L., and Zhao, H. Re- visiting scalarization in multi-task learning: A theoretical perspective. Advances in Neural Information Processing Systems, 36, 2024.
Lee, S., Kim, K., and Han, W.-S Asm in action: Fast and practical learned cardinality estimation. In Proceedings of the 2024 ACM SIGMOD International Conference on Management of Data, pp. 460-463, 2024.
Huang. X., Li, H., Zhang, J., Zhao, X., Yao, Z., Li, Y., Yu, 7., Zhang, T., Chen, H., and Li, C. Llmtune: Accelerate database knob tuning with large language models. arXiv preprint arXiv:2404. 10000.15550 11581, 2024.
Leis, V., Gubichev, A., Mirchev, A., Bonez, P., Kemper, A., and Neumann, T. How good query optimizers, really? Proceedings of the VLDB Endowment, 9(3):204- 215, 2015.
Jain, S., Salman, H., Khaddaj. A., Wong. E., Park, S. M., and Madry, A. A data-based perspective on transfer learning. In Proceedings of the IEFE/CVF Conference on Com- puter Vision and Puttern Recognition, pp. 3613-3622, 2023.
Leis, V., Radke, B., Gubichev, A., Mirchev, A., Bonez, P., Kemper, A., and Neumann, T. Query optimization through the looking glass, and what we found running the join order benchmark. The VLDB Journal, 27:643-668, 2018.
Jeon, H. J., Lee, J. D., Lei, Q. and Van Roy, B. An information -heeotiin-thhoorttic analysis of in-context learning. In Forty-first International Conference on Machine Learn- ing, 2024.
Li, B., Lu, Y., and Kandula, S. Warper: Efficiently adapting learned cardinality estimators data and workload drifts. In Proceedings of the 2022 International Conference on Management of Data, pp. 1920-1933, 2022.
Ke, G., Meng, Q. Finley, T., Wang. T., Chen, W., Ma, W., Ye, Q., and Liu, T.-Y. Lightgbm: A highly efficient gradient boosting decision tree. Advances in neural infor- mation processing systems, 30, 2017.
Li, G., Zhou, X., and Cao, I.. Ai meets database: Ai4db and db4ai. In Proceedings of the 2021 ACM SIGMOD International Conference on Management of Data, pp. 2859-2866, 2021.
Kollias, D., Sharmanska, V., and Zafeiriou, S. Distribution matching for multi-task learning of classification tasks: a large-scale study on faces & beyond. In Proceedings of the AAAI Conference on Artificial Intelligence, vol- ume 38, pp. 2813-2821, 2024.
Li, P., Lu, H., Zheng, Q., Yang, L., and Pan, G. Lisa: A learned index structure for spatial data. In Proceedings of the 2020 ACM SIGMOD international conference on management of data, pp. 21 2119-2133, 2020.

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Li, P., Lu, H., Zhu, R., Ding, B., Yang, L.,, and Pan, G. Dili: A distribution-driven learned index. Proceedings of the VLDB Endowment, 16(9):2112-222) 2023a.
International Conference on Learning Representations, 2022.
Namkoong. H. and Duchi, J. Stochastic gradient methods for distributionally robust optimization with f- divergences. Advances in neural information processing systems, 29, 2016.
Li, P. Wei, W., Zhu, R., Ding, B., Zhou, J., and Lu, H. Alece: An attention preention-based learned cardinality estimator for spj queries on dynamic workloads. P Proceedings of the VLDB Endowment, 17(2):97-210, 2023b.
Neal, R. M. Bayesian learning for neural networks, volume 118. Springer Science & Business Media, 2012.
Li, S., Lin, T., Lin, I.,, Zhang, W., Liu, J., Yang, X., Li, J., He, Y., Song, X., Xiao, J., et al. Eyecaregpt: Boost- ing comprehensive ophthalmology understanding with tailored dataset, benchmark and model. arXiv preprint arXiv:2504. 1 13650, 2025.
Negi, P., Marcus, R., Kipf, A., Mao, H., Tatbul, N., Kraska, T., and Alizadeh, M. Flow-loss: learning cardinality esti- mates that matter. Proceedings of the VLDB Endowment, 14(11), 2021.
Lin, T., Zhang, W., Li, S., Yuan, Y., Yu, B., Li, H., He, W., Jiang, H., Li, M., Song, X., al. Healthgpt: A medical large vision-languaee model for unifying comprehension and generation via heterogeneous knowledge adaptation. arXiv preprint arXiv:2502.099.0
Negi, P., Wu, Z., Kipf, A., Tatbul, N., Marcus, R., Mad- den, S., Kraska, T., and Alizadeh, M. Robust query driven cardinality estimation under changing workloads. Proceedings of the VLDB Endowment, 16(6):1200-1333 2023.
2025.
Ma, L., Ding, B., Das, S., and Swaminathan, A. Active learning for ml enhanced database systems. In Proceed- ings of the 2020 ACM SIGMOD International Conference on Management of Data, pp. 175-191, 2020.
Ooi, B. C., Tan, K.-L,, Wang. S., Wang, W., Cai, Q., Chen, G., Gao, J., Luo, Z., Tung, A. K., Wang, Y., et al. Singa: A distributed deep learning platform. In Proceedings of the 23rd ACM international conference on Multimedia, pp. 685-688, 2015.
Ma, Q. and Triantafillou, P. Dbest: Revisiting approximate query processing engines with machine learning models. In Proceedings of the 2019 International Conference Management of Data, pp. 1 1553-1570, 2019.
Ooi, B. C., Cai, S., Chen, G., Tan, K. L.., Wu, Y., Xiao, X., Xing, N., Shen, Y., Yue, C., Zeng, L., and Zhang, M. Neurdb: An ai-powered autonomous data system. Science China Information Sciences, 2024.
Ma, Q., Shanghooshabad, A. M., Almasi, M., Kurmanji, M., and Triantafillou, P. Learned approximate query process- ing: Make it light, accurate and fast. In Conference Innovative Data Systems, (CIDR21), 2021.
Pearl, J. Causality. Cambridge University Press, 2009.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P.,
Maas, A., Daly, R. E.,, Pham, P. T., Huang, D., Ng. A. Y., and Potts, C. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the asso- ciation for computational linguistics: Human language technologies, pp. 142-150, 2011.
Weiss, R., Dubourg, V., et al. Seikit-learn Machine learning in python. the Journal of machine Learning reseurch, 12:2825-2830. 2011.
Peters, J., Janzing, D., and Schölkopf, B. Elements of causal inference: foundations and learning algorithms. The MIT Press, 2017.
MacLennan, J., Tang, Z., and Crivat, Data mining with Microsoft SQL server 2008. John Wiley & Sons, 2011. 1.
Prokhorenkova, L.,, Gusev, G., Vorobev, A., Dorogush, A. V., and Gulin, A. Catboost: unbiased boosting with categori- cal features. Advances in neural information processing systems, 31, 2018.
Marcus, R., Negi, P., Mao, H., Tatbul, N., Alizadeh, M., and Kraska, T. Bao: Making learned query optimization practical. In Proceedings of the 2021 ACM SIGMOD International Conference on Management of Data, pp- 1275-1288, 2021.
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. Language models are unsupervised multitask learners. OpenAl blog, (8):9, 2019.
McGregor, S. Preventing repeated real world ai failures by cataloging incidents: The ai incident database. In Proceedings of the AAAI Conference on Artificial Intelli- gence, volume 35, pp. 14458-15463. 2021.
Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, J. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21 (140):1-67, 2020.
Müller, S., Hollmann, N., Arango, S. P., Grabocka, J., and
Hutter, F. Transformers can do bayesian inference. In
12

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Ross, S. M., Ross, S. M., Ross, S. M., and Ross, S. M. A first course in probability, volume 2. Macmillan New York, 1976.
for all tables. Proceedings of the VLDB Endowment, 14 (1):61-73, 2020.
Ying, W., Zhang, Y., Huang. J., and Yang, Q. Transfer learn- ing via learning to transfer. In International conference on machine learning, pp. 5085-5094. PMLR, 2018.
Sagawa, S., Koh, P. W., Hashimoto, B., and Liang, P. Distributionally robust neural networks. In International Conference on Learning Representations, 2020.
Yu, H., Li, J., Lu, J., Song, Y., Xie, S., and Zhang, G. Type- Idd: A type-driven lite concept drift detector for data streams. IEEE Transactions on Knowledge and Data Engineering, 36(12):446-9443) 2023.
Sun, J. and Li. G. An end-to-end learning-base baanid cost es- timator. Proceedings of the VLDB Endowment, 13(3): 507-319,2019
Sun, T., Shao, Y., Qian, H., Huang, X., and Qiu, X. Black- box tuning for aaguugg-modde------seeeeee national Conference on Machine Learning, pp. 20841- 20855. PMLR, 2022.
Zeighami, and Shahabi, C. Theoretical analysis of learned database operations under distribution shift through dis- tribution learnability. In Forty-first International Confer- ence Machine Learning, 2024.
In Inter-
Sun, Z., Zhou, X., and Li, G. Learned index: comprehen- sive experimental evaluation. Proceedings of the VLDB Endowment, (((8):1992-200) 2023.
Zeng, T., Lan, J., Ma, J., Wei, W., Zhu, Ri, P., Ding. B., Lian, D., Wei, Z.,, and Zhou, Price: A pretrained model for cross-database cardinality estimation. arXiv preprint arXiv: arXiv:2406.0102. 2024.
Trummer, Db-bert: a database tuning tool that" reads the manual", Proceedings of the 2022 ACM SIGMOD International Conference on Management of Data, pp. 990-203,222 2022.
Zhang, J., Liu, Y., Zhou, K., Li, G., Xiao, Z., Cheng, B., Xing, J., Wang, Y., Cheng, T., Liu, L., et al. An end-to- end automatic cloud database tuning system using deep reinforcement learning. In Proceedings of the 2019 ACM SIGMOD International Conference on Management of Data, pp. 415-432, 2019.
Urban, M., Nguyen, D. D., and Binnig, C. Omniscientdb: a large language model-augmented dbms that knows what other dbmss do not know. In Proceedings of the Sixth In- ternational Workshop on Exploiting A Artificial Intelligence Techniques for Data Management, pp. 1-7, 2023.
Zhang, J., Su, K., and Zhang, H. Making in in-memory learned indexes efficient on disk. Proceedings of the 2024 ACM SIGMOD International Conference on Management of Data, 2(3):1-26, 2024a.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. At- tention is all you need. Advances in neural information processing systems, 30, 2017.
Zhang, S., Qi, J., Yao, X., and Brinkmann, A. Hyper: A high-perffrmance and memory memory-efficient efficient learned index via hybrid construction. Proceedings of the 2024 ACM SIGMOD International Conference on Management of Data, 2(3):1-26, 2024b.
Wang, F., Yan, X., Yiu. M. L., Li, S., Mao, Z., and Tang, B. Speeding up end-to-end query execution via learning- based progressive cardinality estimation. Proceedings of the 2023 ACM SIGMOD International Conference on Management of Data, 1(1):1-25, 2023a.
Zhang, W., Zhu, L., Hallinan, J., Zhang, S., Makmur, A., Cai, Q., and Ooi, B. C. Boostmis: Boosting medical image supessuper learning with adaptive pseudo la- beling and informative active annotation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 20666-20677 2022.
Wang, J.. Trummer, I., Kara, A., and Olteanu, D. Adopt: Adaptively optimizing attribute orders for worst-case op- timal join algorithms via reinforcement learning. Pro- ceedings of the VLDB Endowment, 16(1))2885--281, 2023b.
Zhang, W., Lin, T., Liu, J., Shu, F., Li, H., Zhang, L.., Wang- gui, H., Zhou, H., Lv, Z.. Jiang, H., et al. Hyperllava: Dy- namic visual and language expert tuning for multimodal large language models. arXiv preprint arXiv:2403. 23444477..14 2024c.
Wasan, M. T. Parametric estimation. 1970.
Wu, 7., Yu, P., Yang, P., Zhu, R., Han, Y., Li, Y., Lian, D., Zeng, K., and Zhou, J. A unified transferable model for ml-enhanced dbms. arXiv preprint mrXiv:2105.02416 2021.
Zhao, K., Yu, J. X., He, Z., Li, R., and Zhang, H. Lightweight and accurate cardinality estimation by neural network gaussian process. In Proceedings of the 2022 International Conference on Management of Data, pp. 973-987, 2022.
Yang, Z., Kamsetty, A., Luan, S., Liang. E., Duan, Y. Chen, X., and Stoica, I. Neurocard: one cardinality estimator
13

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Zhao, Z., Gao, H., Xing, N., Zeng. L., Zhang, M., Chen, G., Rigger, M., and Ooi, B. C. Neurbench: Benchmarking learned database components with data and workload drift modeling. arXiv preprint 2r03: 1322, 2025.
Zheng, Y., Lin, C., Lyu, X., Zhou, X., Li, G., and Wang, T. Robustness of updatable learning-based index advisors against poisoning attack. Proceedings of the 2024 ACM SIGMOD International Conference on Management of Data, 2(1): 2024.
Zhou, X., Li, G., Sun, Z., Liu, Z., Chen, W., Wu, Liu, J.. Feng, R., and Zeng, G. D-bot: Database diagno- sis system using large language models. arXiv preprint arXiv:2312.01455 2023.
Zhu, J. Cai, S., Deng, F., Ooi, B. C., and Zhang, W. Me- ter: A dynamic concept adaptation framework for online anomaly detection. arXiv preprint arXiv:2312. 16831, 2023.
Zhu, J., Cai, S., Deng, F., Ooi, B. C., and Wu, J. Do Ilms understand visual anomalies? uncovering llm's capabil- ities in zero-shot anomaly detection. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 48-57, 2024a.
Zhu, R., Weng, L., Wei, W., Wu, D., Peng, J., Wang. Y., Ding, B., Lian, D., Zheng, B., and Zhou, J. Pi- lotscope: Steering databases with machine learning drivers. Proceedings of the VLDB Endowment, 17(5):
980-993, 2024b.
14

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
APPENDIX
Appendix A. Notation Table.
Appendix B. Extended Preliminaries.
Appendix C. Data and Task Query Encoding.
Appendix D. FLAIR Workflow: Training to Inference.
Appendix E. Proofs.
Appendix E.I. Proof of Theorem 3.1.
Appendix E.2. Proof of Theorem 3.2.
Appendix F. Discussion of FLAIR's Key Characteristics.
Appendix G. Details on Experimental Setup.
Appendix G.I. Benchmarks.
Appendix G.2. Baselines.
Appendix G.3. Downstream Applications.
Appendix G.4. Implementation Details.
Appendix G.5. Evaluation Metrics.
Appendix G.6. Dynamic Settings and Data Drift.
Appendix H. Supplementary Experimental Results on In-database Data Analytics.
Appendix H.1. Data Classification.
Appendix H.2. Data Regression.
Appendix I. Supplementary Experimental Results on Ablation Study of FLAIR.
Appendix 1.1. Effects of Queue Size in Context Memory.
Appendix 1.2. Effects of Histogram Granularity.
Appendix L.3. Effects of User Feedback.
15

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
A. Notation Table
In this paper, scalars are denoted by symbols such as x, vectors are represented by boldface symbols such as x, and matrices are described by uppercase boldface symbols such as X. To provide a comprehensive overview of the notations used throughout the paper. present summary notations in Table 2 as quick reference facilitate the understanding and recall of each symbol.
Table 2: Notations.
Notation
Description
R
The ith relation in the database.
an
The rith attribute of the relation R;-
The histogram for attribute ah.
Xn
Number of attributes in relation R;-
Data matrix, aggregated by attribute histograms x across all relations in the database. Number of histogram bins, hyperparameter that controls the granularity and dimensionality of X.
q0
qJ, qF
Query vector, formed by concatenating join predicate vector qu and filter predicate vector qr- Data distribution at time t. Mapping function of data distribution D:.
Dr.
fD.
ds
Scaling factor for the dot product in the attention mechanism. Number of attention heads.
M
q"' k", v
The query, key, value vector for the mith attention head.
Wm. Wm. & W
Transformation matrices for query, key, and value in the rath attention head.
W.
Output transformation matrix.
Zo
Final output of the MHSA phase. Task vector obtained by the TFM.
ZT
da
The attention dimension in the DDE.
ppm
The queue contains recent queries processed by the system.
Vpmt
The queue contains the corresponding system outputs of 2pmt.
C (ppmt, pmmt)
Context memory, containing contextual information of the current task. Size of the context memory.
Prior distributions in Bayesian meta-training.
LDDE
Negative log likelihood loss of the DDE.
Greg
The instantiation LDDE for regression lasks.
Leta
The instantiation of LDDE for classification tasks.
Lrs
Task-specific loss TFM.
IT, np
Learning rates for the TFM and DDE modules.
θr, Op
Model parameters for the TFM and DDE modules.
16

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
B. Extended Preliminaries
In this section, we further explore the technical aspects of two techniques central to FLAIR, in-context learning and Prior-data Fitted Networks.
In-context Learning. Emerging as revolutionary paradigm alongside the advancement of large language models (LLMs), in-context learning (ICL) enables the foundation models to make direct predictions based on contextual examples without the need for parameter updates (Baldassini et al., 2024; Radford et al., 2019; Raffel et al., 2020; Brown et al., 2020; Achiam et al., 2023; Jeon et al., 2024), akin to human reasoning processes. Specifically, ICL empowers a model by conditioning it on a few select set of input-output examples. This setup estimates the likelihood of potential outputs by utilizing contextual demonstrations with a sophisticated pre-trained model Formally, given an input x and a set of candidate outputs Y {yn, ".....,,.............. }. pre-trained model M selects the candidate output with the highest score as its prediction, conditioned on a demonstration set C. The demonstration set C includes & examples, represented as C =((1,, ... (Xx: Wes), where (xg, Bk)) is example of input-output pair pertinent to the task. The likelihood of candidate output y is determined by the scoring function S applied to the entire input examples using the model M. The predicted output j is then the candidate with the highest probability:
P(ul(x)= = SM(U6,x,C)
(17)
ÿ = arg max P()](x) B.EY
(18)
The scoring function S evaluates the plausibility of each candidate output based on the demonstration set C and the query input x, supporting various learning scenarios or new tasks without specific training.
In FLAIR, we leverage the principles of ICL to enable context aware adaptation for dynamic data systems. Our approach allows the model to dynamically adjust its predictions based on evolving concepts rather than relying on a static input-output mapping fixed particular data distribution, delivering superior modeling performance without the need for periodic model retraining or fine-tuning, as required by existing methods.
Prior-data Fitted Networks. Prior-data Fitted Networks (PFNs) (Müller et al., 2022; Hollmann et al., 2023; Helli et al., 2024) are advanced classifiers for tabular data, designed to perform Bayesian inference by pre-training on synthetic datasets, which are constructed based on a carefully designed prior distribution. This approach allows PFNs to make accurate predictions on new, unseen data without the need for further parameter updates, thereby effectively approximating the Posterior Predictive Distribution (PPD). In Bayesian learning, the PPD estimates the likelihood of predictions for new data points based on observed data D and a prior distribution of hypotheses O. For given test sample Xt, PFNs calculate the distribution of the label ye as follows:
plye D)x ply)xe, ())((o)) jq.
(19)
where ó & represents specific hypothesis, and p(D)Ø) is the likelihood of observing the data D given the hypothesis d. The PPD integrates over all hypotheses, weighted by respective priors and data likelihoods, thus enabling PFNs to make informed probabilistic predictions. By approximating PPD, PFNs merge Bayesian inference with deep learning to enhance the accuracy of predictions for diverse applications. In FLAIR, we integrate context into the input, via a task featurization module, and then, model the current data distribution p( D)Ø) explicitly by uncovering PFNs to adaptive cases through a dynamic decision engine, enhancing prediction accuracy for p(ye Xt. D). This enables FLAIR to adapt to new concepts in databases onythe-fly.
C. Data and Task Query Encoding
To encode the data, the process first obtains unified representation of the data distribution within the database via histogram encoding of each attribute (i.e., column) across all relations (i.e., tables). Specifically, each attribute a within a relation R2 is represented by a histogram defined as x" = [=1, , 2z3.. where å indicates the number of bins, parameter that can be adjusted to account for the complexity of the data distribution. These histograms are aggregated into a set {xi] [1 & n < n;, 1 < iis & N, i E 2} after scaling into [0, 1], where n; is the number of attributes in relation R2, and N is the total number of relations. The set is then aggregated into data vectors Xp of dimension 8 x Σ n4, offering a holistic view of the entire database.
17

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Subsequently, we encode the task query formulated as:
SELECT AGG FROM Ra...., RN
WHERE join predicates нe AND filter predicates m;
Here, AGG represents the aggregate function such as COUNT, SUM, or AVG. Join predicates, formatted Ria,, Rya are converted into binary vectors qu by a one-hot encoding- strategy. For filter predicates formatted as R,a", op i, where op {<, &,,,,,, >, }} denotes comparison operators and is the condition value. We encode them into qr by converting conditions on attributes into two boundary values, forming a 2 Σ;_1 dimensional vector. The final query vector qe =< qJ: qF is obtained by concatenating the join vector q and filter vector qp, capturing pertinent structural and conditional information of the task query.
D. FLAIR Workflow: Training to Inference
As outlined in Section 2, FLAIR Mr comprises two cascading modules, the TFM module MTFM parameterized by O and the DDE module MDDE parameterized by Op, represented as follows:
MF (x; θT. θD) = MMDDe(MTPN(xx0))))))
(20)
Next, elaborate on the workflow of FLAIR,, covering phases of offline training and online inference and adaptation.
Offline Training. FLAIR is trained in two stages, outlined in Algorithm 1. (i) In the first stage, the DDE module MDDE undergoes a one-off meta-training phase using the loss function LDDE formalized in Eq. 10 across various task distributions. These distributions are generated based on crafted priors, tailored to encompass a broad spectrum of scenarios rather than specific real-world data, which enables DDE to generalize across various tasks. Note that the Bayesian meta- training is not to optimize FLAIR directly on end tasks but to prepare DDE to adapt to new tasks met during inference without further training. In all our experiments across diverse tasks, we perform Bayesian meta-training only once, demonstrating its efficiency and scalability in real-wor wallw applications. (ii) In the second stage, the MrFas module is trained extract informative latent features that are critical for the specific tasks at hand. The training of TFM is tailored to optimize performance on these tasks, utilizing a task-specific loss function Lrs to extract standardized and informative features for the DDE module. In particular, for tasks outputting raw logits, such as cardinality estimation and approximate query processing, mean squared error (MSE) loss will be employed to optimize the representation space. Otherwise, we utilize cross-entropy loss for tasks generating probability distributions via softmax activation, like in-database data classification. Overall, the meta-training phase not confined specific tasks, instead, it establishes a foundation for efficient adaptation by learning a flexible and generalizable parameter space. Meanwhile, the TFM is independently tuned for the specific task hand. Together, this offline training approach ensures that the two key modules of FLAIR work seamlessly to the adaptability of the model in dynamic databases.
Algorithm 1 FLAIR Training
Input:
Designed priors p(o). number of synthetic datasets H. each with N,, observed samples, queue size g in the context memory, learning rate l/r for MTFM and byp for MpD..
Output: FLAIR Mp (x; Or, @p) constructed by cascading FMFM and MODE with parameters θ and Op.
I: Initialize MrFM and MaDE with random weights 0y and Op
2: io 1 to 7. do
3: Sample synthetic datasets D. ~ p(C ()
4: Randomly select context based on
from D,
5: repeat
6:
Randomly select a training batch [(x,, y, }),} from D,
7: Compute stochastic loss LDDE using Eq. 10
8: Update Op using stochastic gradient descent Op Op ao Vep
until Convergence
10:
end for
11: repeat
12: Randomly sample minibatch
13: Update θ by minimizing the loss Lrs of the specific task θy Oy -o, Lrs
until Convergence
15:
Mr θ,, ④D) ) = (M)
16: Return FLAIR Mr
18

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Online Inference and Adaptation. Once trained, FLAIR is ready for deployment in real-time environment, where it performs concurrent online inference and adaptation under evolving concepts detailed in Algorithm 2. Specifically, for an incoming input query x, the TFM first extracts its task vector shown in Eq. 21 below. The task vector, along with its contextual information in context memory C (Qpmttypmal are then fed to the DDE module as Eq. 22. After executing the current query, the query and the corresponding ground-truth result returned by the database are used to update the queues in context memory, i.c., Qpmt and pmme respectively. Thus, FLAIR effectively utilizes contextual information from the context memory adapt to tasks encountered during inference.
zT (TFM(x QT)
(21)
y (DDD((T,CC00)
(22)
Algorithm 2 Concurrent FLAIR Inference and Adaptation
Input: Mrras and MaDE with parameters θy and Op, input query and data underlying the data system.
Output: Predicted output y.
1: Extract latent feature zy incorporating information from query and data, using MTFM 2T (MF
2: Gather context memory C (2pmt, Pmmr)
3: Predict by inputting latent feature Z and context memory C into MODE as = MDDD(2T,CS Op)
4: Store 2 and the corresponding system output y* into queue 2pmt and Ypme to update the context memory
5: Remove oldest entries from 2pme. pmt to maintain size !
6: Return
E. Proofs
E.1. Proof of Theorem 3.1
Proof. Let Yie be the number of inserted data points out of k operations that land in query and Ydet be the number of deleted data points out of & operations that come from where x specifies an axis exis-parallel hyperrectangle within the data space. Then, the final frequency of points in x is
Ldex = fD:(x) + Yins Ydel fDJ = Σ
de DJ
Set y= = Yins Ydets then each data operation can increment y by +1 (insert), decrement y by -1 (delete), or leave y unchanged the inserted or deleted data point is out of x. We can represent the net difference for each single-point data operation as ('w) Σt_ Yz(w), where Y((w) takes values in (-1, 0, 13. Consequently, y is an integer-valued random
variable in [-k, k.. Hence, the generalization error can be represented as
Epi [D=xx[ff(x) - fo. (x)]] = Eps -x [1x(x) - (fD:(x) + Yins - Yaet =Epinx 1 fxx(x)) 3/ [D']]
Observe that fx(x) fD. (x) is a fixed quantity for given D' Recall the classic fact that arg min, I[| cl] = Med(X) for any random variable X (Wasan, 1970). Thus, for each realized dataset Dí, the fixed quantity f((x) J (x) can be seen as an offset and ) is the random part, so we have
Eps ED [(f((x) - fx)(x)) - 2' > Epss -x (ed(()) - 2']
To assess the worst-case scenario, we consider the extreme outcomes in which y attains or - k. Consequently, Med())) is forced to be either 1 or -1. both extremes, [Med()) y reveals mismatch of k 1. Maximizing over all possible queries thus enforces
sup E
bonxx(lfee llf((x) fD:(x)]] > k k-1
19

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
E.2. Proof of Theorem 3.2 Proof. First, consider
ED ( - SDs (
- ED -
+ fcs( - JDD(
where fcs (x) denotes the optimal model updated by C# after training on the initial data D'. By introducing fcr (x) term, we decompose the maximum generalization error of FLAIR into two parts using the triangle inequality.
EDi~ x [f(x(c) - fD: (x)] & EDI - [[((x|C)) sx)(x)]] -cs
+ EDi~ [Ire (x))))x
The first term ED - [
- Scs (x)]] (denoted as M represents the error between the FL.AIR output f(x(C*) and the optimal model fes (x) trained on the context memory C³. This measures the FLAIR's s ability to approximate fes (x), reflecting whether the FLAIR can efficiently utilize the information in context memory C2 for prediction. Theoretically. EM tends be if FLAIR can fully learn the mapping from C³ the posterior distribution. Using the generalization error bound on the PAC-Bayes framework (Amit & Meir, 2018), we have
KL(g( (L(((f)lP(()) in
EM = ED [[f(x|()) (xx(x]] & (
2g
divergence (Kullback & Leibler, 1951) between the posterior distribution q(f) over the model parameters, conditioned on the context memory C22 and prior distribution p(J) defined during meta-training. 5 E (0, 1) is the confidence parameter. This result states that, for each particular x, the
with high probability 1-6 8. Here, (L(g(f)lp(f)) is the
expected error of (x((') relative to fes (x) controlled by a PAC-Bayes term of order O 1 ve). training of FLAIR, (L(((f)PP(f)) is bounded by small constant K, leading to
Assuming sufficient
In
sup - - <
2g
This result highlights that FLAIR's generalization performance improves the size of the context memory 9 increases.
Moreover, the second term Epi-x [xx - fns (x)] (denoted as Eg) measures how well the context memory C approximates the full data D We assume the performance of fos (q) is estimated by the sample average on Cí, i.e., Ves = 2 Ei=, V,, where V; is defined as the performance metric of the model on the i-th data point in CJ. By Hoeffding's inequality (Hoeffding, 1994), the probability of the deviation between fes (x) and fDz (x) satisfies
Pr Prel (x) - fas (x) > c] Pr Pr|IVe: - pDil >
< 2exp(-20ee)
where μ denotes the expected performance on Dj Grounded in probability measure theory, the expectation of non- negative random variable be computed by integrating the probability that the variable exceeds all possible values (Ross et al., 1976). Consequently, integrating over e, the expected approximation error satisfies
& EDiix [ - S (x)
Pr Pr[[ec(x)= S (x) >
2exp( 1oppp(2ee)) 2
0
2
\/ 2g 4 2g
Finally, adding the two terms &M and &c, we obtain
sup E [[((((0)) (x)]
K In
π
1
& EM + E -
2g
2g
=
(1
2
K +
In
5
+
20

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
F. Key Characteristics of FLAIR
We discuss FLAIR on three key aspects that are crucial for deployment, namely effectiveness, efficiency, and transferability.
Effectiveness. FLAIR demonstrates robust effectiveness, particularly in handling dynamic environments. The task featurization module of FLAIR prepares standardized task features for the subsequent DDE modeling, providing holistic perspective to achieve comprehensive understanding of the context. Furthermore, compared to the existing event-driven adaptation to evolving concepts like gradient-based out-of outrof-distribution (OOD) detection (Kurmanji & Triantafillou, 2023), our FLAIR leverages ongoing access to relevant contextual information for contextualized task modeling, which greatly enhances prediction accuracy under evolving concepts.
Effficienyy. As opposed to conventional models that require continuous training-based updates to adapt to new concepts, FLAIR supports adaptation on-the-fly, eliminating the need for post-deployment data recollection and model retraining. This capability enables FLAIR to be deployed into operational environments with ease, substantially saving on resources. Specifi- cally, each attribute is initially represented by histogram of size 6, giving initialization complexity of O Σ N n4).
Subsequent insert, delete, or update operations require only (NN)) incremental maintenance on the affected histograms where N is the number of the records involved. Set the number of join and filter predicates in the query as N₂ and Nr. The time complexity of encoding a task query is approximately ONN, + NF), which is typically small and negligible. For simplicity of analysis, we disregard the MLP's computational cost, as is typically overshadowed by the dominant attention-relater operations. Thus, for the task featurization stage, the MHSA yields complexity of O(d 82), where denote the embedding and attention dimension as da- The cost reduces OOd 6) for the MHCA part, because the cross cross-attention occurs only once between the single query vector and the 5-dimensional data representation. In the DDE, the model employs FIFO key-value queue of input-output pairs as context memory. When new input vector (viewed as a single token) attends over these stored entries, the time complexity grows linearly in g. i.e., Odd 2). without incurring additional self-attention among the memory entries themselves, thus being scalable and avoiding the quadratic overhead.
Transferability. Beyond its proven effectiveness and efficiency, the transferability of FLAIR a pivotal feature for its practical deployment in diverse settings. Central to the design of FLAIR its in-context adaptation capability, which is inherently task-agnostic and facilitates ready application across various tasks including both regression and classification. This design enables FLAIR to support Al-powered database applications that meet both system-internal functions and user-oriented objectives such as cardinality estimation and approximate query processing. The broad applicability of FLAIR is thoroughly demonstrated in Section 4, providing empirical evidence of its superior utility across diverse tabular data-driven domains.
G. Details on Experimental Setup
In this section, we detail the experimental setup and provide additional information to facilitate reader comprehension and replication of our study.
G.1. Benchmarks
We evaluate FLAIR on two real-world benchmarks that are commonly referenced in previous database system studies (Sun & Li, 2019; Yang et al., 2020; Hilprecht et al., 2019; Han et al., 2021; Li et al., 2023b; Zeng et al., 2024).
STATS (STA, 2015), includes relations with 43 attributes. There are 1,029,842 records from the anonymized Stats Stack Exchange network. The benchmark workload includes 146 queries with 2603 sub-queries, featuring both PK-FK and FK-FK join.
JOB-light (Leis et al., 2018; 2015), derives from subset of the Internet Movie Data Base (IMDB) dataset and encompasses 6 relations with 14 attributes. There are 62,118,470 records in total. The benchmark workload consists of 70 queries with 696 sub-queries, focusing on PK-FK join.
As in a recent work (Li et al., 2023b), our evaluation involves randomly generating 2000 diverse queries with sub-queries to form the training set for each benchmark. In the STATS benchmark, we utilize an existing workload of 146 queries with 2603 sub-queries as the test set. For JOB-light, the test comprises 70 queries associated with 696 sub-queries.
Phtpps: //www/w.w/./////////// imdb. com/
21

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
Additionally, incorporate dynamic workload into each benchmark's training and test sets. This dynamic workload includes various SQL. operations, including insert, delete, and update, which are strategically varied in proportion throughout different phases of the experiment. Notably, the ground truth for the queries is obtained by executing them, both the dynamic workload and data changes can influence the results over time. For the cardinality estimation task, queries yielding a ground-truth cardinality of zero are excluded from the analysis to ensure data integrity and relevance.
G.2. Baselines
In our experiments, we first compare FLAIR with predominant families of cardinality estimation technologies, including the estimator from PostgreSQL. (pos, 1996), and state-of-the-ar learned approaches for dynamic environments, such as DBepDB (Hilprecht et al., 2019), ALECE (Li et al., 2023b), and DDUp (Kurmanji & Triantafillou, 2023) with Neuro- Card (Yang et al., 2020) being used as its base model. We also compare FLAIR with model fine-tuning outlined (Kurmanji Triantafillou, 2023), which serves as nigh-performance baseline despite being computationally intensive. For AQP, our baselines include DBest++ (Ma et al., 2021), which utilizes only frequency tables (FTs) for the update, DB which updates both FTs and mixture density networks (MDNs), and DDUp (Kurmanji & Triantafillou, 2023), which uses + as its base model. For in-database data analytics, we compare FLAIR with AutoML system AutoGluon (Erickson et al., 2020) and established machine learning algorithms, including K neighbot (KNN), RandomForest, MLP, and popular tree-based boosting methods, XGBoost (Chen & Guestrin, 2016), LightGBM (Ke et al., 201 and CatBoost (Prokhorenkova et al., 2018) for data classification, and AutoGluon, SVR, MLP, DecisionTree, KandomForest and GradientBoosting for regression, We briefly introduce the baselines in our experiments as follows.
PostgreSQL (pos, 1996) employs a default ID histogram-basee estimation method to analyze the distribution of individual columns.
DeepDB (Hilprecht et al., 2019) is a pure data-driven method, which learns the joint probability distribution of the underlying data using a Sum-Product-Networt (SPN).
ALECE' (Li et., 2023b) is an attention-based regression method, which captures the relations between queries and data.
DDUp (Kurmanji & Triantafillou, 2023) is two-stage approach, which first conducts loss-based -uttrf-distribuution (OOD) detection and then uses knowledge distillation for model updates. DDUp utilizes NeuroCard as its base model for cardinality estimation and employs DBest++ for approximate query processing.
Fine-tune (Kurmanji & Triantafillou, 2023) is based on DDUp's pipeline, with knowledge distillation being replaced by fine-tuning for model updates.
DBest++ (Ma et al., 2021) utilizes mixture density networks (MDNs) to learn the probability density function of data and predict the results of the queries. We use DBest++FT to denote the approach that updates only frequency tables (FTs), whereas DBest++FT represents updating both FTs and MDNs reflect its resemblance fine-tuning.
KNN is a distance-based method that classifies a data point based on the majority vote of its nearest neighbors.
RandomForest constructs multiple decision trees using majority voting for classification and averaging their predictions for regression tasks.
ML.P is fully connected feedforward neural network trained with stochastic gradient descent.
XGBoost (Chen & Guestrin, 2016) is an optimized gradient-boosting framework that builds an ensemble of decision trees sequentially.
LightGBM (Ke et al., 2017) is gradient-boosting algorithm with a leaf-wise tree growth strategy.
pubbii
hhttps://github.. hwtp:////////hccc//////0g
"nttps://github. ///pp//hhh..cooggggggg////aaaaaa
thub. htttss////ghtttt...cc/////oooo//
22

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
"atBoost (Prokhorenkova et al., 2018) is boosting method optimized for handling categorical variables via ordered boosting and efficient one-hot encoding alternatives.
Type-LDD" (Yu et al., 2023) is a drift-aware classifier via knowledge distillation.
SVR maps inputs into a high-dimensional space and finds an optimal hyperplane that minimizes the error within a defined margin.
Decision Tree recursively splits data into branches based on feature values, forming hierarchical structure of decision nodes and leaf nodes.
GradientBoosting trains weak decision trees iteratively, minimizing the residual error of the previous weak learners.
AutoGluon 12 (Erickson et al., 2020) is an AutoML framework that employs multi-layer stack ensembling to combine diverse models, simplifying hyperparameter tuning and model selection for classification and regression tasks.
G.3. Downstream Applications
In data systems, system-internal tasks such as cardinality estimation, database tuning, and transaction throughput mea- surement provide immediate ground-truth outcomes critical for query optimization, resource management, and system performance monitoring. However, obtaining ground truth for certain user-oriented tasks is more complex. In these cases, our context memory in FLAIR establishes a virtuous cycle of user feedback, where users can provide feedback on the model's predictive outcomes. This feedback acts as practical form of ground truth, facilitating continuous refinement of model performance on user-oriented tasks and enabling system customization.
In our study, we evaluate FLAIR across four critical tasks in data systems, spanning from internal system functions to user-oriented activities. Detailed descriptions of each task and its setting provided below.
Cardinality Estimation (CE) estimates the number of rows query returns, aiding query planners in optimizing execution plans. We demonstrate FLAIR's 's in-context adaptation process using the cardinality estimation task as an example, as illustrated in Figure 9. In the cardinality estimation experiment, data-driven approaches such as DeepDB and DDUp are configured with the database data after executing all statements from the training portion of the workload, reflecting a real-world system scenario as described in (Li al., 2023b). DeepDB is not compared on STATS as it only supports PK-FK joins. For FLAIR, the queue size @ is set to 80, unless specified otherwise.
Approximate Query Processing (AQP) quickly delivers approximate results from large datasets by balancing accuracy with computational efficiency. In our evaluation of the AQP task, we adopt the same query schema used in prior works (Kurmanji & Triantafillou, 2023; Ma et al., 2021). Specifically, the test queries included 100 instances of SUM and AVG functions across various relations in the IMDB dataset. Following (Kurmanji & Triantafillou, 2023), the queries are randomly generated by selecting a lower and an upper bound for range filters and uniformly selecting a categorical column for the equality filter, providing consistent and controlled testing environment. We instantiate the TFM for AQP tasks based on word embeddings to generate the task vector, following a methodology similar DBest++, All methods use identical samples from the original dataset to ensure fairness in model building.
In-database Data Analytics involves data classification tasks and data regression tasks executed within the database engine, delivering insights directly from the data source. (1) Data classification boosts business intelligence by using categorical attributes to categorize tuples, such as product types and transaction statuses, supporting analytics data systems. (2) Data regression predicts continuous outcomes, enhancing predictive analyties and decision-making on platforms like Oracle (Helskyaho al., 2021) and Microsoft SQL Server (MacLennan et al., 2011; Harinath et al., 2008).
G.4. Implementation Details
FLAIR is implemented in Python with Pytorch 2.0. In our experiments, we employ standard baselines such as KNN, MLP, and RandomForest from seikit-learn. Other baseline methods are implemented using their open-source packages or the source code provided by the respective researchers, which strictly adhere the recommended configurations and settings.
"https: h/tpt:::////hhb/ http://ggghagaac//////////////aa
"https:/ //gi thub. com wwm///aabb/ryp--111
Phttps: //gg thub. wwt.c/om//aat.e wwt..///utooggooo/euuttgguuuuu
23

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
g User Query
1
91+2
4++1
4:
4:-1
9c-2
distribution 2-11
Context Memory
Query Input
Contextual Information
SCB
FLAIR
distribution 2D;
Dynamic Databases
Ye-1
Ve-2
Push(q; Vz)
Poplat--:
x
Query
Result
distribution De+x
Yr
V2-1
y--2
Figure 9: In-context adaptation for cardinality estimation.
The experiments involving PostgreSQL are conducted on PostgreSQL 13.1. All experiments are conducted on a server with Xeon(R) Silver 4214R CPU @ 2.40GHz (12 cores), 128G memory, and GeForce RTX 3090 with CUDA 11.8. The OS is Ubuntu 20.04 with Linux kernel 5.4.0-72.
G.5. Evaluation Metries
We employ a comprehensive metrics evaluate both the effectiveness and efficiency our FLAIR across various downstream tasks, categorized into effectiveness metrics and efficiency metrics.
Effectiveness Metrics. For the CE task, report accuracy by the widely recognized metrics Q-error and P-error. Q-error gauges the accuracy of estimated query cardinalities by measuring the discrepancy between the estimated cardinalities Cest and the ground-truth cardinalities Cyt. as defined in Eq. 23. We report the geometric mean of the Q-error (GMQ) as (Li et al., 2022; Dutt et al., 2019) along with Q-error across various quantiles, with particular emphasis on the tail performance. P-error measures the gap between the optimal query plan Popts which uses actual cardinality Cyt, and the plan Pest derived using the estimated cardinality, as Eq. 24. It is quantified using cost function Feost, for which adopt the default setting in PostgreSQL.
max(CCett Cyt)
Q-error
+00)
(23)
min( (Cests Cgt)
Foost (Pest Cest)
P-error
(00)
(24)
Foost (Popts Cat)
For AQP task, mean relative error (MRE) Eq. 25, which is widely utilized in previous related works (Ma & Triantafillou, 2019; Kurmanji & Triantafillou, 2023; Kurmanji et al., 2024) to evaluate the accuracy of query approximations for SUM and AVG aggregates.
Jast: Ggel
MRE
x 100
(25)
For in-database data analytics, we apply accuracy and Fl score for data classification, both metrics range from 0 to 1, with higher values indicating better model performance. data regression, we utilize mean squared error (MSE) and the coefficient of determination (R²), where MSE ranges from 0 to infinity and R² ranges from 0 to 1. A lower MSE signifies more accurate regression model, while higher Rt2 indicates better performance.
Efficiency Metrics. We assess FLAIR's efficiency by examining storage overhead, building time, inference time, and adaptation time. Specifically, storage overhead gauges the memory requirement of a method. Building time measures the necessary offline training duration, while inference time indicates the average time per input instance for estimation, crucial for real-time applications. Lastly, adaptation time reflects how quickly the model can adjust to concept drift. Additionally,
24

---

In- In-Context Adaptation to Concept Drift for Learned Databasc Operations
Damelyy
Donstyy
Dynamic Setting
Varied Mix SQL Querles
0002
SELECT
INSERT
Dynamic
2033
1000
(connt)
2380
300000 Attribute (excerprpostee)
Workload
UPDATE
DELETE
Attribute Distribution Drift
Corre aton Heabmap Before Dni.
Correlation
Heatmap After Drif,
Permute the Joint Distribution Attributes
car 091 2:4
repocaioo
reputatinnd
Dynamic Data
6:18
spoote
spactes
Attribute Correlation Drift
Figure 10: Overview of dynamic settings, illustrated by distribution discrepancies confirmed by Kolmogonov- test p-values below 0.01 before and after concept drift.
we evaluate the efficiency of FL.AIR within PostgreSQI. by testing its query execution latency, which directly connects to the query optimizer and objectively shows how our method can enhance DBMS query performance.
G.6. Dynamic Settings and Data Drift
In our study, we explore a dynamic data system marked by variations in both workload and data, which is illustrated in Figure 10. To emulate real system environment, we introduce significant data drift after training and before testing. This involves sorting each column to alter the joint distribution of attributes and then performing random sampling from this permuted dataset. The impact of these manipulations on data distríbution and attribute correlations is visually depicted through histograms and heat maps in Figure 10, showcasing the data characteristics before and after experiencing data drift. This dynamic scenario comprehensively mirrors real-world database operations where frequent insert, delete, and update actions induce gradual changes in data distribution. Over time, these incremental modifications accumulate, resulting in more pronounced shifts in data structures and inter-atrribute relationships. To rigorously assess the robustness of our approach, we design two scenarios based on the extent and nature of the changes.
Mild Drift: We randomly select 50% of records from the database and independently permute their column values, altering data distribution and inter-column correlations.
Severe Drift: We randomly select 60% of records, independently permuting their columns, and performing random insertions, deletions, and updates, which affects 10% of the total data (keeping the total data size constant).
H. Supplementary Experimental Results on In-database Data Analytics.
H.1. Data Classification
conduct sentiment analysis (Maas et al., 2011) on IMDB, which is a prevalent binary classification task. We allocate 50% of the original data as the training set, and following prior setups, induced data drift on the remaining data. We designate 20% of the post-drift data the update set and the remaining post-drift data as the set. For models that support incremental updates, such as XGBoost, LightGBM, CatBoost, and MLP, incrementally update the models initially trained on the training set using the update set, while others are retrained on the update set. Finally, we evaluate all models on the test set to measure their effectiveness in adapting to data drift, as summarized in Table 3. The mean time represents the total execution time, integrating building, adaptation, and inference time averaged across two drift scenarios. Our FLAIR distinctly showcases its robustness and adaptability in handling concept drift, resulting in superior performance across both mild and severe drift scenarios. Furthermore, FLAIRR achieves this high accuracy while maintaining impressive
25

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
computational efficiency compared with AutoGluon, making it exceptionally suited for practical dynamic environments where both performance and speed are crucial.
Table Performance data classification on concept drift.
Mild Drift
Severe Drift
Mean Time(s)
Category
Method
Acc1
Fl
Acct
FI
KNN
0.795
0,591
0.586
0.379
1.469
Classical
RandomForest
0.921
0.891
0.621
0.334
8.893
Non-linear Classifier
MLP
0.852
0.585
0.676
0.496
15.798
XGBoost
0.905
0.896
0,596
0.385
55,681
GBDT Classifier
LightGBM
0,870
0.727
0,595
0.377
16.765
CatBoost
0.918
0,906
0.607
0.368
14.077
AutoML System
AutoGluon
0.936
0.908
0.679
0.441
85.183
Ours
FLAIR
0.932
0.920
0.826
0.632
8.377
H.2. Data Regression
Table 4 offers comprehensive comparison of representative regression methods in the context of concept drift, focusing on movie rating prediction (IMD, 2024), scenario typically characterized by evolving concepts. FLAIR excels in both mild and severe drift scenarios, maintaining consistent performance across MSE and R² metrics while demonstrating comparable efficiency. While AutoGluon delivers the best results under mild drift conditions, its performance noticeably declines under severe drift and requires more than 40x computational time compared to FL.AIR.
Table 4: Performance of data regression concept drift.
Mild Drift
Severe Drift
Mean Time(s)
Category
Method
MSEJ
R²1
MSE
R²1
Classical Method
SVR MLP
0.591
0.230
0.691
0,210
0.081
8.762
-10.418
28.355
-49.003
10.259
DecisionTree
0.557
0.231
0.652
0.198
0.068
Tree-based
RandomForest
0.315
0.570
0,458
0.475
0.942
Method
GrasientBoosting
0.325
0.577
0.396
0.487
0.355
AutoML System
AutoGluon
0.267
0.682
0.399
0.632
27.438
Ours
FLAIR
0.271
0.647
0.388
0.647
0.681
I. Ablation Study
L.1. Effects of Queue Size in Context Memory
We further analyze the sensitivity of FLAIR to the critical hyperparameter e. the size of queues in context memory, across various benchmarks and dynamic scenarios, depicted in Figure 11. The results confirm that increasing the queue size contributes to performance enhancements without escalating system latency, owing to embedding cache optimization. Initially, performance improves significantly with an increase in queue size but eventually plateaus, indicating diminishing returns. Notably, an oversized queue size may introduce information redundancy, potentially leading to a performance decline. For instance, increasing the queue size to 100 results in minor deterioration in the STATS benchmark's mild drift scenario. In summary, the optimal queue size @ should be tailored based on the complexity of the data to balance performance gains against the risk of redundancy, order to optimize the model's efficacy in dynamic environments.
I.2. Effects Histogram Granularity
To evaluate the impact of histogram binning granularity in the TFM, we conduct a sensitivity analysis by varying the number of bins 5 used data encoding. Specifically, we test e (10, 20, 40, 60, 80) across four scenarios involving two
26

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
0
=0
=0
e =60
e
=100
GMQ (lower better)
Inference Time (lower better)
5.00
0.40
6.00
0.40
Inference (s)
4.50
5.50
0.30
0.30
GMO
4.00
5.00
0.20
0.20
3.50
4.50
3.00
0.10
4.00
0.10
(a) STATS (Mild)
(b) STATS (Severe)
0.30
0.30
Inference Time (8)
7.50
10.00
0.25
0.25
GMO
5.00
0.20
8.00
6.00
2.50
0.15
4.00
0.00
0.10
0.10
(c) Job-light (Mild)
(d) Job-light (Severe)
Figure 11: Sensitivity analysis of the queue size g.
ZZ
=10
=0
40
=60
=80
GMQ (lower is better)
Training Time (lower is better)
1000
8.00
1000
6.00
800
6.00
800
Training Time
GMQ
4.00
600
600
2.00
400
400
2.00
(a) STATS (Mild)
(b) STATS (Severe)
6.00
800
10.00
800
Training Time (s)
4.00
GMQ
2.00
400
6.00
400
0.00
200
4.00
200
(c) Job-light (Mild)
(d) Job-light (Severe)
Figure 12: Sensitivity analysis of the bin number 5.
benchmarks under mild and severe dynamic scenarios. As shown in Figure 12, decreasing the bin number generally improves performance in terms of GMQ but increases the training time. Notably, 8 = 40 achieves favorable trade-off between encoding fidelity and computational efficiency, yielding significant reductions GMQ without incurring excessive training time.
I.3. Effeett User Feedback
To delve into the adaptability of FLAIR user-oriented tasks, we evaluate how varying proportions user feedback data p within queues affect model performance. We use drifted data with ground-truth outputs simulate user-customized feedback data, assessing the model's conformity to user-specific requirements. Specifically, the queues comprise a certain proportion of user feedback data combined with the model's 's recent input-output pairs. We maintain the queue size at 80 and vary the proportion of user feedback data. The results in Figure 13, demonstrate that increasing the proportion p within fixed queue size significantly enhances model performance, confirming the model's 's ability to be customized by users. To further explore the impact of integrating recent model interactions into the queue on performance, we conduct comparative experiments using only user feedback data. We observe that mixed queues outperform those containing solely user feedback. Additionally, integrating recent model data mitigates performance decline the proportion p of user feedback decreases.
27

---

In-Context Adaptation to Concept Drift for Learned Databasc Operations
p =100%
p 800%
p 0600%
p
40%
20%
Mixed (lower better)
User Feedback Data Only (lower is better)
Suboptimal Baseline Performance
1.00
1.50
MRE
MRE
0.50
0.50
0.00
0.00
(a) cast info (Mild)
(b) cast info (Severe)
1.00
2.00
0.75
MRE
MRE
0.50
1.50
0.25
0.00
1.00
(c) movie_ keyword (Mild)
(d) movie_keywer (Severe)
Figure 13: Sensitivity analysis of the user feedback p.
Still, advise against setting P too low due the risk of introducing noise. It is noteworthy that FLAIR surpasses the suboptimal model DDUp at most times even with very low p. underscoring FLAIRRs capability in user-oriented applications.
28


Reviews:
[{"review_id": "SxWcYA9suc", "reviewer": "Reviewer_uD1S", "summary": "This paper focuses on the issue of concept drift in dynamic database environments, which is an interesting and challenging research problem. To address this problem effectively, an online adaptation framework, FLAIR, has been developed. Sufficient experiment and analysis show the performance of the proposed method. I have some suggestions for further improvement.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer uD1S,\n\nWe sincerely thank you for your positive review and insightful comments. We address your concerns below and attach new results here: https://anonymous.4open.science/r/ICML25-7F63/ICML25.pdf\n\n> Q1: does the work consider both data and query change?\n\nYes, we considered both data and query change in Appx H6 (line 1287). We evaluated the query change of SELECT/UPDATE/INSERT/DELETE with varied ratios, and among them, UPDATE/INSERT/DELETE incur data change.\n\nWe further evaluate our pretrained model on insert/delete/update-heavy (IH/DH/UD) query changes. Results below (details in Table A) show that FLAIR adapts consistently well to both query and data changes across different settings.\n|||Mild|||Severe||\n|-|-|-|-|-|-|-|\n|Data|IH|DH|UH|IH|DH|UH|\n|STATS|2.85|2.96|3.76|3.35|3.26|3.96|\n|Job-light|1.68|1.59|1.92|6.26|6.58|7.21|\n\n> Q2: how to identify the impact of concept drift?\n\nUnlike reactive detect-then-adapt methods, FLAIR uses the dynamic context memory to adapt on the fly via the dynamic decision engine, avoiding the detection overhead.\n\nIncremental drift tests (Figure 5 in Sec 4.4) and our new abrupt drift tests below (details in Table B) confirm that FLAIR achieves the best performance without explicit detection.\n|Data|PG|ALECE|DDUp|FT|FLAIR|\n|-|-|-|-|-|-|\n|STATS|176.38|12.63|6.91|5.75|4.15|\n|Job-light|19.41|16.24|6.65|6.25|3.26|\n\n> Q3: how to ensure efficiency of meta-trained part? have you compared common learning strategies?\n\nDDE is meta-trained only once to approximate $q_{\\theta}(y|x,\\mathcal{C})$ across diverse tasks. During inference, it remains frozen and adapts efficiently via a forward pass using context $\\mathcal{C}$, built from recent query-output pairs, thereby enabling training-free adaptation.\n\nAs suggested, we update Figure 3 for clarity (see Figure A) and add training from scratch (RT) besides the fine-tuning (FT) and distillation (KD) baselines (details in Table C). Results show that RT and FT underperform in adaptation to new concepts, as they fit outdated data, while FLAIR archives timely and better adaptation.\n|Data|Drift|RT|FT|FLAIR|\n|-|-|-|-|-|\n|STATS|Mild|4.97|5.35|4.49|\n||Severe|5.59|5.02|5.47|\n|Job-light|Mild|3.25|2.45|2.36|\n||Severe|8.21|8.09|7.95|\n\n> Q4: runtime complexity analysis\n\nFLAIR's initialization complexity is $O(\\delta \\sum n_i)$ with $O(N_v)$ for updating modified records. Query encoding cost $O(N_J+N_F)$ is negligible. TFM incurs $O(d_a\\delta^2)$ (self-attention) and $O(d_a\\delta)$ (cross-attention). DDE scales linearly as $O(d_a\\varrho)$ with context size $\\varrho$. Please see Appx G for more details.\n\n> theoretical analysis should embed concept drift\n\nWe clarify that we model concept drift through insertions and deletions, which are key drivers of drift in databases, and derive worst-case bounds. As suggested, we will make the link to concept drift clearer in Sec 3.4.\n\n**[Additional Dataset]** We add TPC-H [1] (10GB, 86M records, 8 tables, 61 attributes). Experimental settings follow Appx H6.\nResults below show that FLAIR outperforms all the baselines, especially in tail and severe cases (details in Table D).\n|Drift|FT|PG|ALECE|DDUp|FLAIR|\n|-|-|-|-|-|-|\n|Mild|3.75|36.15|8.97|6.58|3.62|\n|Severe|6.11|88.75|38.05|9.65|5.67|\n\n**[Parameter Analysis]** As suggested, we clarify key parameter settings: the bin number is 40, context memory size is 80, the task encoder 8 attention layers with 8 heads, and DDE 12 layers with 4 heads. Detailed settings for FLAIR and baselines will be added to Appx H4.\n\nWe add analysis on bin number $\\delta$ (see Figure B), showing trade-off between accuracy and training time. Appx J provides more sensitivity analysis on context memory.\n\n**[Related Work]** As suggested, we expand related work with more references and discussion (see Table E).\nWe group existing methods into:\nLazy: retrain models after drift detection, high cost;\nIncremental: adapt gradually, respond slowly;\nEnsemble: maintain model pool to cover varied concepts, resource-heavy.\nIn contrast, FLAIR proposes a new in-context adaptation paradigm, enabling timely adaptation without retraining.\n\n**[Setting Clarification]** We clarify that our work is in the supervised setting. For CE and AQP, labels come from query execution (Appx H1). For regression/classification, ground truth is available pre- and post-drift, with results in Appx J1/J2, respectively. We'll clarify this in Sec 4.5.\n\n**[Definition Refinement]** As suggested, we refine Definition 2.1 to distinguish drift in databases from drift in data streams. In databases, predictions depend on both query and data, and the data evolves due to query-driven operations. We thus refine the input into two distinct but interrelated parts: query and data, both can incur drift in databases. Due to space limit, please see our response to Reviewer 5u5N-Q4 for the updated definition.\n\nWe hope our clarifications and new results have addressed your concerns and can improve your evaluation of our work.\n\n[1] https://www.tpc.org/", "claims_and_evidence": "Yes, sufficient experiment on different datasets and baselines have been conducted to evaluate the performance of the proposed method, and detailed analysis of the results also verify the efficiency.", "methods_and_evaluation_criteria": "The proposed method has been clearly introduced and evaluated, and the evaluation criteria have been chosen appropriately, but I have some suggestion for this part, as shown below:\n\n1.\tIn the dynamic database, the data may have incremental updates, leading to concept drift. However, the users’ queries may also change as time goes on. So, does this work consider this situation when both the data and query change?\n2.\tIt seems the proposed method does not have the drift detection process, so, how to identify the impact of concept drift on model performance, which is very important for learning adaptation.\n3.\tFor the proposed FLAIR, a meta-trained part is embedded, which has been frozen, so how to ensure the efficiency of this part when concept drift occurs? I understand you have extracted features from data and query, but the adaptation process of the meta-trained model should be explained clearly in Figure 3. Besides, training and fine-tuning are common solutions for concept drift adaptation, and the proposed method dynamically adapts to new concepts guided by the context memory during inference, have you compared the performance of these three learning strategies?\n4.\tThe runtime complexity analysis of the proposed is required.", "theoretical_claims": "The author gives the theoretical analysis of model generalization error bound analysis with sufficient proof and analysis. However, the target of the proposed method is to handle concept drift in a dynamic database environment, I have not seen the author analyze bound under concept drift respectively. That is to say, the theoretical analysis should embed the term of concept drift that occurs dynamically.", "experimental_designs_or_analyses": "I have reviewed the experimental designs and analysis, two benchmark datasets have been chosen for the experiment, I still suggest the author add more datasets for model evaluation.\nBesides, the parameter setting of the proposed method and all the baselines should be introduced in this paper, and a experiment for parameter analysis is needed.", "relation_to_broader_scientific_literature": "This paper address the issue of concept drift in dynamic database environments, which attracts high attention in recent years. Concept drift learning is a challenge research topic in data mining, concept drift occurs in dynamic data and many previous studies develops drift detection and adaptation method. This paper develops method for concept drift adaptation in the scenario of dynamic database, which is an interesting topic in this area, and sufficient comparison experiment verified the performance.", "essential_references_not_discussed": "The key contribution is an online adaptation framework, called in-context adaptation for learned database operations under concept drift, I have seen many database related reference has been listed, however, the related work about concept drift learning is insufficient, I suggest adding more reference about concept with detailed discussion.", "other_strengths_and_weaknesses": "1.\tIs this research work in the supervised learning setting? I know the definition of concept drift is $P_{t}(y|x) \\neq P_{t+1}(y|x)$ is based on the setting of supervised learning, so, does the data in the database with different category (at each time point) have the ground truth (label)? \n2.\tFor definition 2.1, I think this definition should show the difference of concept drift that occurs in dynamic data stream and dynamic database. Please explain and define it again.", "other_comments_or_suggestions": "Based on the comparison of learning efficiency in Figure 4, the runtime complexity analysis of the proposed is required.", "questions_for_authors": "I suggest the author clarify the setting of this research work, supervised learning (regression or classification? or both of them?), and the experiment of regression and classification should be analyzed separately.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "pB47seDwMm", "reviewer": "Reviewer_5u5N", "summary": "This paper addresses the challenge of concept drift in database operations. Its primary contribution is the introduction of an in-context adaptation framework to tackle this issue. The proposed method, FLAIR, comprises two essential components: a Task Featurization Module and a Dynamic Decision Engine. The effectiveness of FLAIR is demonstrated through both theoretical analysis and experimental evaluation.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer 5u5N,\n\nWe thank you for your recognition of our work and your insightful comments. Below, we provide detailed responses to the specific concerns you raised. Full tables/figures are in: https://anonymous.4open.science/r/ICML25-7F63/ICML25.pdf\n\n> expect a comparison with more recent approaches.\n\nAs suggested, we have added recent baselines:\nSOLID [1], a context-aware fine-tuning adaptation method, and DtACI [2], an adaptive conformal inference (ACI)–based fine-tuning method.\nResults below (details in Table F) show that FLAIR outperforms both under drift.\nThis is because SOLID’s residual-based detection and DtACI’s ACI mechanism miss subtle, continuous query-driven drift in databases, reducing accuracy, especially in tail cases.\nIn contrast, FLAIR’s in-context adaptation ensures timely and better adaptation to continuous drift.\n|Data|Method|Mild|Severe|\n|-|-|-|-|\n|STATS|SOLID|5.12|5.56|\n||DtACI|5.48|6.86|\n||FLAIR|4.49|5.47|\n|Job-light|SOLID|2.41|8.36|\n||DtACI|2.54|8.12|\n||FLAIR|2.36|7.95|\n\n> how the authors define the mild drift and severe drift？\n\nThank you for pointing this out. We clarify the drift setting below:\n\nMild Drift: randomly select 50% of records from the database and independently permute their column values, altering data distribution and inter-column correlations.\n\nSevere Drift: randomly select 60% of records, independently permuting their columns, and performing random insertions, deletions, and updates, which affects 10% of the total data (keeping the total data size constant).\n\nThis setting follows the recent work [3]. We will refine the descriptions in Figure 10 and Appx H6 for clarity.\n\n> confused with information conveyed in Figure 7\n\nWe appreciate your valuable feedback. We selected classical methods in Figure 7 for their interpretable decision boundaries, which provide an intuitive understanding of model behavior under concept drift.\n\nTo enhance comparison, we have added a recent method Type-LDD [4], a drift-aware classifier via knowledge distillation, in Figure C. While Type-LDD surpasses classical methods, FLAIR outperforms it due to the Type-LDD’s delayed adaptation from its detect-then-adapt strategy.\n\n> the concept of 'concept drift' appears to be no different from the distribution shift problem\n\nWe agree that clearly distinguishing our core focus concept drift in databases from the broader notion of distribution shift is important, and we would like to further clarify this as suggested.\nDistribution shift typically refers to a mismatch between training and test data distributions, often without inherent temporal evolution.\nIn contrast, concept drift in our work refers to the ongoing, temporal evolution of data and queries in operational database settings. In databases, this form emerges naturally: runtime queries continuously trigger insert/delete/update operations, incurring cumulative changes in both data and query. These drifts are ongoing and unpredictable, requiring models to adapt in real time rather than being trained repeatedly with new data distributions.\n\nTo clarify this clearly, we refine our problem definition as follows:\n\n**Definition** (Concept Drift in Databases) Let $\\mathbf{d}_t$ denote the underlying data of a database at time t, and $\\mathbf{q}_t$ denote a user query at time t. Given the data-query pair $(\\mathbf{d}_t,\\mathbf{q}_t)$, let $\\mathbf{y}_t$ represent the corresponding prediction output (e.g., row counts in cardinality estimation). Concept drift occurs at time t if the joint distribution of queries, data, and predictions changes, i.e., \n\n$P_t(\\mathbf{q},\\mathbf{d},\\mathbf{y})\\ne P_{t+1}(\\mathbf{q},\\mathbf{d},\\mathbf{y})$.\n\nHere, drift can arise from two distinct but interrelated sources:\n\n(1) Query drift, from evolving user behavior.\n\n(2) Data drift, caused by frequent insert/delete/update operations changing underlying data distributions.\n\nNotably, changing data not only changes the marginal distribution $P(\\mathbf{d})$, but also affects the conditional distribution $P(\\mathbf{y}|\\mathbf{q},\\mathbf{d})$, i.e., the same queries may yield different outputs over time.\nThis suggests that concept drift in databases involves shifts in the joint distribution of queries, data, and predictions, and their interaction. \n\nWe'll further clarify this distinction and update our problem formulation accordingly.\n\nWe hope our responses above have sufficiently addressed your concerns and can improve your evaluation of our work.\n\n[1] Calibration of Time-Series Forecasting- Detecting and Adapting Context-Driven Distribution Shift. KDD 2024\n\n[2] Conformal Inference for Online Prediction with Arbitrary Distribution Shifts. JMLR 2024\n\n[3] Detect, Distill and Update: Learned DB Systems Facing Out of Distribution Data. SIGMOD 2023\n\n[4] Type-LDD: A Type-Driven Lite Concept Drift Detector for Data Streams. TKDE 2024", "claims_and_evidence": "1. The intuition behind the in-context adaptation framework is outlined in Theorems 3.1 and 3.2, which I find reasonable.  \n\n2. The experimental results demonstrate that the proposed method performs well in real-world applications. However, I am concerned that the baseline methods used for comparison are somewhat outdated and may not specifically address the distribution shift problem. I would expect a comparison with more recent approaches designed to tackle distribution shift.", "methods_and_evaluation_criteria": "I am not well-versed in database operation problems, but the evaluation criteria appears reasonable to me. However, I am confused about how the authors define the mild drift and severe drift.", "theoretical_claims": "I do not consider this paper to have theoretical innovation. However, since its primary focus is on experimental analysis, I believe the current theoretical discussion is sufficient to illustrate and validate the authors' intuition. I don't find any issues in the proof.", "experimental_designs_or_analyses": "In Figure 7, the authors only compare with some very classical methods. I am confused with the information conveyed in this figure.", "relation_to_broader_scientific_literature": "This paper introduces the concept of \"concept drift.\" However, from my perspective, it appears to be no different from the distribution shift problem. Further clarification is needed.", "essential_references_not_discussed": "N/A", "other_strengths_and_weaknesses": "N/A", "other_comments_or_suggestions": "N/A", "questions_for_authors": "N/A", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "6GX06dTPd7", "reviewer": "Reviewer_C5eR", "summary": "The paper introduces an online adaptation framework to tackle concept drift in learned database operations. The topic is related to the application of machine learning. The proposed FLAIR leverages in-context adaptation through dynamic context memory and Bayesian meta-training, enabling models to adjust to evolving data distributions without retraining. The framework comprises a Task Featurization Module for standardizing inputs and a Dynamic Decision Engine pre-trained on synthetic data to generalize across tasks. Experiments on benchmarks like STATS and JOB-light demonstrate FLAIR’s competitive performance in severe concept drift.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer C5eR,\n\nWe sincerely thank you for the constructive feedback that helps improve our work. We address the concerns you raised below. The full new results are provided in: https://anonymous.4open.science/r/ICML25-7F63/ICML25.pdf\n\n**[Q1-Synthetic Priors]** We clarify that FLAIR's DDE is meta-trained using tasks from BNNs and SCMs, which model complex dependencies and causal structures fundamental in the data stored in real-world databases.\nThe priors span diverse functional forms reflecting causal relationships in real query-data-output relations and are trained in a fully Bayesian manner over a wide hyperparameter space broader than any single-task point estimate.\nWe also adopt Occam’s razor bias as [1], favoring lower-parameter models, which aligns with Bayesian and cognitive principles.\n\nWe validate the generalizability of the synthetic priors empirically: We meta-train FLAIR once and for all and test it across 4 core analytics tasks (i.e., CE, AQP, classification), reflecting distinct data-query patterns and dynamics.\nThe strong and consistent performance across all these tasks, even superior to the strong baseline fine-tuning on real-world data, confirms the generalizability of our synthetic priors.\n\nAs suggested, we further validate this with new experiments simulating insert/delete/update-heavy drifts. Results below (details in Table A) show robust and optimal performance, especially in update-heavy (UH) cases.\nThis confirms the alignment between our priors and actual drift patterns.\n|||Mild|||Severe||\n|-|-|-|-|-|-|-|\n|Data|IH|DH|UH|IH|DH|UH|\n|STATS|2.85|2.96|3.76|3.35|3.26|3.96|\n|Job-light|1.68|1.59|1.92|6.26|6.58|7.21|\n\n**[Q2-Latency/Partial Feedback]** We agree with you that the immediate availability of execution results may not always hold.\nTo address this, as suggested, we extend our evaluation to consider more complex scenarios and design two settings:\n\nDelayed feedback: context memory updates every k steps (5% and 10% of its size) rather than in real time.\n\nPartial feedback: 5% and 10% of context pairs are randomly dropped to mimic missing or partial feedback.\n\nThe results below (details in Table G) show that: (1) partial feedback performs slightly better, suggesting recency of execution results matters more than completeness. (2) FLAIR is resilient to both cases, which confirms its applicability in real systems.\n|Data|Drift|Delay 5%|Delay 10%|Partial 5%|Partial 10%|FLAIR|\n|-|-|-|-|-|-|-|\n|STATS|Mild|4.79|5.32|4.52|4.88|4.49|\n||Severe|5.62|5.92|5.53|5.61|5.47|\n|Job-light|Mild|2.45|2.56|2.40|2.49|2.36|\n||Severe|8.10|8.26|8.06|8.12|7.95|\n\n**[Q3-Larger Datasets]** We share your view that scalability is a key consideration beyond effectiveness. As discussed in Appx G, FLAIR is designed with scalability in mind with complexity linear scaling w.r.t. input and context size.\nIts runtime involves only a feedforward pass over compact context memory for adaptation, without backward gradient updates.\n\nWe evaluated FLAIR on real and widely accepted benchmarks STATS and JOB-light, which show low inference latency (Sec 4.3) and stability with context memory scaling (Fig 11, Appx J1). To further evaluate the scalability of our FLAIR, we add new experiments on a larger dataset TPC-H [2](10GB, 86M records, complex many-to-many joins).\nResults in Table H show that FLAIR outperforms baselines in all cases, with 3.5% and 7.2% gains under mild and severe drift.\n\nAcross all benchmarks, FLAIR maintains low latency(\\~10 ms/query), compact memory footprint(~5 MB), and stable storage overhead, showing its suitability for high-throughput, large-scale systems.\n|Data|Throughput(q/s)|Memory Footprint(MB)|Latency(ms/q)|Storage Overhead(MB)|\n|-|-|-|-|-|\n|STATS|109.17|4.97|9.16|47.68|\n|Job-light|121.21|5.02|8.25|47.23|\n|TPC-H|93.28|5.11|10.82|47.72|\n\n**[Remark]** We clarify that our work sits at the intersection of machine learning and data systems.\nThe key insights of our work lie in addressing two fundamental ML challenges: how to enable on-the-fly adaptation without retraining and how to achieve context-aware prediction, as stated in lines 036–042.\nThese challenges are central to real-time analytics on dynamic structured data for high stacks applications such as healthcare and stock trading.\nThus, we focus on typical structured data analytics tasks, addressing these challenges with contributions grounded in ML, i.e., in-context adaptation and Bayesian meta-training, achieving promising performance.\nWe believe this work contributes to the broader ML community and will resonate with a wide ML audience working on concept drift, structured data analytics, and real-time systems, complementing ongoing efforts in these areas.\n\nWe are grateful for the chance to discuss our work's potential and wish to thank you again for your valuable input.\nWe hope to have addressed your concerns and would highly appreciate your consideration for re-evaluating your initial rating.\n\n[1]Tabpfn. ICLR2023\n\n[2]https://www.tpc.org/", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "Yes", "theoretical_claims": "Yes", "experimental_designs_or_analyses": "Yes", "relation_to_broader_scientific_literature": "The paper introduces an online adaptation framework to tackle concept drift in learned database operations. The topic is related to the application of machine learning. The proposed FLAIR leverages in-context adaptation through dynamic context memory and Bayesian meta-training, enabling models to adjust to evolving data distributions without retraining. The framework comprises a Task Featurization Module for standardizing inputs and a Dynamic Decision Engine pre-trained on synthetic data to generalize across tasks. Experiments on benchmarks like STATS and JOB-light demonstrate FLAIR’s competitive performance in severe concept drift.", "essential_references_not_discussed": "NA", "other_strengths_and_weaknesses": "# Strengths \n1.\tThe topic of concept drift is related to the machine learning field.\n2.\tSolving the application of database with concept drift has the potential to boost real-world applications.\n3.\tThe proposed FLAIR is evaluated on several datasets against other baselines.\n\n# Weaknesses\n1.\tIn the proposed method, the Bayesian meta-training step relies on synthetic datasets sampled from predefined priors. Although it seems to improve the performance, the synthetic data may fail to capture real-world distribution complexities, leading to gaps in generalization. The paper lacks validation of how synthetic priors align with actual drift patterns encountered in dynamic databases.\n2.\tBesides, the current framework assumes immediate availability of execution results for context memory updates. In the real system, complex queries or distributed systems may introduce latency or partial feedback, limiting the framework’s applicability in real-time or large-scale environments. Hence, the authors should consider more complex experimental scenarios. \n3.\tThe experiments focus on moderate-scale datasets There is no analysis on the computational overhead, memory footprint, or latency when applied to high-velocity data streams or petabyte-scale databases.\n\n\n# Remark\nTo me, this paper would be a better fit for the internation conferences on database, where the audience would benefit more than the machine learning field.", "other_comments_or_suggestions": "NA", "questions_for_authors": "NA", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper proposes an online adaptation framework for learned database operations, introducing a novel in-context adaptation paradigm to address concept drift in dynamic database environments. The core task and methodology are developed within the context of databases. By leveraging immediate execution feedback and dynamic context memory, the proposed method avoids costly retraining and adapts at runtime through a task featurization module and a Bayesian meta-trained decision engine.

Initially, the paper received scores of 3, 3, and 2, with reviewers raising concerns about the realism of using synthetic priors for meta-training, the assumption of immediate feedback availability, the lack of comparison with stronger baselines for distribution shift, limited discussion of query drift or joint query-data drift, absence of explicit drift detection, and insufficient analysis of runtime complexity and scalability in large-scale systems.

Following the rebuttal, reviewers acknowledged that part of concerns were addressed and raised their scores to 4, 3, and 3. 

The AC agrees that the paper contains sufficient values to be accepted but is slightly concerned by the clarity of the concepts and some technical details, the relationship with other methods, the potentials issue of the synthetic data usage, and the scope of the work. While the topic intersects with machine learning, Reviewer C5eR noted that the paper may have greater impact within the database community.
Decision: Accept (poster)