EconBase
← Back to paper

F-FOMAML: GNN-Enhanced Meta-Learning for Peak Period Demand Forecasting with Proxy Data

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

48,747 characters · 13 sections · 45 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

F-FOMAML: GNN-Enhanced Meta-Learning for Peak Period Demand Forecasting with Proxy Data

abstractDemand prediction is a crucial task for e-commerce and physical retail businesses, especially during high-stake sales events. However, the limited availability of historical data from these peak periods poses a significant challenge for traditional forecasting methods. In this paper, we propose a novel approach that leverages strategically chosen proxy data reflective of potential sales patterns from similar entities during non-peak periods, enriched by features learned from a graph neural networks (GNNs)-based forecasting model, to predict demand during peak events. We formulate the demand prediction as a meta-learning problem and develop the Feature-based First-Order Model-Agnostic Meta-Learning (F-FOMAML) algorithm that leverages proxy data from non-peak periods and GNN-generated relational metadata to learn feature-specific layer parameters, thereby adapting to demand forecasts for peak events. Theoretically, we show that by considering domain similarities through task-specific metadata, our model achieves improved generalization, where the excess risk decreases as the number of training tasks increases. Empirical evaluations on large-scale industrial datasets demonstrate the superiority of our approach. Compared to existing state-of-the-art models, our method demonstrates a notable improvement in demand prediction accuracy, reducing the Mean Absolute Error by 26.24% on an internal vending machine dataset and by 1.04% on the publicly accessible JD.com dataset.

Introduction

Forecasting product demand during high-stake sales events such as Black Friday or Prime Day is a daunting task for both e-commerce giants like Amazon and JD.com and physical retailers. This challenge stems largely from the scarcity of event-specific historical data. Commonly, businesses anchor their strategies on regular sales data, which may not fully capture the distinct consumer behaviors observed during promotional periods. Beyond standard demand prediction, promotional forecasting includes predicting "extreme" events Laptev2017. These events, marked by deeper discounts and atypical merchandising strategies, significantly deviate from the typical sales patterns influenced by factors like seasonality or product life cycles. This deviation necessitates a specialized approach to deal-level forecasting, one that thoroughly considers promotion-specific intricacies, from the depth of discounts to deal combinations.

For instance, an online retailer aiming to anticipate the demand spike for a newly launched electronic item during a holiday sale might struggle. They might be unsure how various promotions will influence demand during these events, particularly when previous similar event data is limited or non-existent. To mitigate this, our research effectively uses proxy data from non-peak sales to inform decisions during peak sales events. However, this supplemental data alone is insufficient, given the intricate interrelationships among various products and categories and even across different shopping platforms. We thus introduce a representation learning task for each product, leveraging a cutting-edge Graph Neural Network (GNN) based forecasting model Yang2023. This model generates embeddings enriched with graph-enhanced features, encapsulating cross-product information derived from pertinent graph structures. Such structures offer insights into a myriad of dynamics, from relationships between products to patterns of inter-platform shopping behaviors.

Our proposed Feature-based First-Order Model-Agnostic Meta-Learning (F-FOMAML) approach refines the foundational MAML framework Finn2017MAML, Nichol2018OnFM, incorporating task-specific insights Yu2022 drawn from GNN-processed data. By training F-FOMAML with this enhanced metadata, the model showcases an unparalleled ability to adapt, consistently surpassing conventional forecasting techniques in accuracy metrics. While we primarily target enhancing e-commerce and brick-and-mortar retail demand prediction, the potential of our GNN-augmented F-FOMAML is vast. Its versatility makes it a candidate for various applications, from fortifying online banking fraud detection systems to optimizing digital advertising click-through rates.

Our main contributions can be summarized as follows:

enumerate• Model: We propose a novel approach to model demand prediction, reframing it as a graph-augmented meta-learning challenge. • Algorithm: We introduce the GNN-infused F-FOMAML algorithm, which skillfully combines meta-learning and the feature-wise linear modulation (FiLM) layers. This results in a model capable of producing robust predictions, even when historical data is sparse. • Theory: We provide a theoretical framework that provides insights into how our proposed algorithm reduces predictive risk through the lens of bias-variance trade-off. • Numerical Experiments: Our numerical experiments address the inherent challenges of forecasting with multi-modal time series data (combining static and dynamic features) while facing data scarcity in both the target domain and source tasks. Empirical tests validate F-FOMAML's proficiency, with the model consistently outshining existing forecasting methods in the prediction MAE values by 26.24% on the vending machine dataset and by 8.7% on the JD.com dataset using domain-knowledge constructed features. Furthermore, our model achieves an 1.04% improvement over the MAE metric against baselines with GNN integrated.

Related Work

In this section, we discuss prior studies related to sales prediction models, meta-learning's role in time series forecasting, and the significance of proxy data in prediction endeavors. We categorize the related works into four main sub-domains: Prediction with Limited Data, Meta-Learning for Demand Prediction, Few-Shot Meta-Learning Methods, and Graph Neural Networks for Time Series Forecasting.

\paragraph{Prediction with Limited Data} Previous work in transfer learning has focused on learning from data-rich domains and transferring knowledge to data-sparse regions or underrepresented classes transferyield, poverty_mapping,Zhu2020TransferLO.

In e-commerce, we aim to learn from popular products to improve the performance of new or less popular products. Multi-task learning has also been used to enhance model performance on data-sparse tasks rapidresponse, chang2019chimera, fiot2015electricity,pan2009survey. Conventional transfer learning methods learn transferable latent factors between one source domain and one target domain long2013transfer, gong2012geodesic, tzeng2017adversarial,long2015learning. In our work, we focus on adopting meta-learning techniques to learn from various tasks and then adapt them to unseen tasks in demand prediction.

\paragraph{Meta-Learning for Demand Prediction} Meta-learning has been applied to various retail and demand prediction tasks, with an emphasis on learning from diverse data sources and adapting to new tasks with limited data. For instance, retail_demand employed meta-learning to predict demand in retail settings, demonstrating the effectiveness of meta-learning in capturing complex patterns across diverse scenarios. Similarly, online_retail applied meta-learning to online retail data, highlighting the potential for meta-learning in e-commerce applications.

In the time series-related problems, oreshkin2020n oreshkin2020n briefly discusses the relation between neural time series prediction and meta-learning oreshkin2020n. yao2019learning incorporate the gradient-based meta-learning with a region functionality based memory yao2019learning for spatiotemporal prediction. However, this method relies on the spatial semantic correlations between tasks, which limits its applicability to our problem.

Our work contributes to the problem of learning customer demand for new products with few historical data points. Previous works have suggested comparing the features of new products to existing ones ferreira2016analytics, baardman2017leveraging, or efficient methods for eliciting additional information cao2021preference, ma2022constructing. Our paper assumes that sales have already been observed at limited prices and leverages more information from other related products and environments as proxy data.

\paragraph{Meta-Learning Methods for Few-Shot Learning} Meta-learning methods for few-shot learning can be broadly categorized into two main approaches: metric-learning-based and optimization-based. Metric-learning-based approaches focus on establishing similarity or dissimilarity between classes, as demonstrated by works such as Prototypical Networks snell_prototypical_2017, Matching Networks https://doi.org/10.48550/arxiv.1606.04080, and Relation Networks https://doi.org/10.48550/arxiv.1711.06025. These methods aim to learn representations that facilitate comparisons between few-shot examples and known classes. On the other hand, optimization-based approaches aim to learn a good initialization point that can quickly adapt to new tasks with minimal parameter updates. Prominent examples of this category include Model-Agnostic Meta-Learning (MAML) Finn2017MAML, Reptile Nichol2018OnFM, and Meta-SGD li2017meta. These methods have been further extended by advanced techniques such as Task-Specific Adaptation (TSA) zhou2020task and Multi-Modal Model-Agnostic Meta-Learning (MUMOMAML) vuorio2019multimodal. These optimization-based approaches enhance the adaptability and robustness of the learned models across diverse tasks and domains.

Our method falls into the domain of optimization-based approaches.

\paragraph{Graph Neural Networks for Time Series Forecasting} Deep learning models have been extensively explored for time series forecasting especially those with the Seq2Seq structure DBLP:conf/nips/SutskeverVL14, which involves learning an encoder to transform various inputs into fixed-length hidden states for producing forecasts. Recent developments include DeepAR salinas2020deepar, TFT Lim2018 and MQ-Forecasters wen2017multi, Eisenach2020MQTransform. However, these methods do not account for cross-observation information, which becomes important in many practical applications. As a result, Graph Neural Networks (GNNs) have rapidly emerged as a promising framework to address this issue by combining temporal processing with graph convolution to augment the learning of individual time series kipf2016, li2017diffusion,wu2020,shang2021. A popular family of methods propose graph structure learning for the joint inference of a latent structure through GNN while forecasting kipf2018,wu2020. However, they suffer limitations in scaling to large datasets. A scalable approach recently introduced by Yang et al. Yang2023 uses predefined graphs as data augmentations rather than enabling graph structure learning, which demonstrates not only to scale to graphs over millions of nodes but also shows substantially improving model performance, especially for cold-start problems when data is scarce.

Our work builds upon these foundations by specifically applying meta-learning and few-shot learning techniques to the demand forecasting problem, with the goal of improving the adaptability and performance of models in this context. To the best of our knowledge, we are the first to study peak period demand prediction with limited records by borrowing relation-aware knowledge from other time periods. We focus on this domain, exploring the application of meta-learning for few-shot prediction and incorporating auxiliary information, such as proxy data from other related tasks, to improve model performance.

Problem Formulation

figure*[figure* omitted — 223 chars of source]

During peak periods, promoted products often have limited historical sales (e.g., less popular items) or are new items without historical transaction data. Consequently, the demand forecasting tasks for product-location pairs during these periods are new and unseen compared to regular products and periods (e.g., paper towels). To address this challenge, we frame our research problem within a generic setting, focusing on a few-shot meta-learning paradigm, specifically targeting demand forecasting. Throughout our discussion, we use JD.com's transactional data as the primary example to illustrate our approach.

Task Definition

Demand forecasting aims to predict the future demand for a product in a specific environment based on observed features. Each forecasting task is associated with a product and its environment.

Formally, let $\mathcal{P}({\mathcal T})$ denote a distribution over tasks ${\mathcal T}_{ij}$, each corresponding to product $i$ in environment $j$. For a set $[n]=\{1,\ldots,n\}$ of $n$ products with product $i$ present in $t_i$ environments, we have a total of $\sum_{i=1}^n t_i$ tasks. Each task dataset is symbolized as a pair $(\mathbf{x}_{ij}, y_{ij})$, where $\mathbf{x}_{ij}$ is the feature vector and $y_{ij}$ signifies the associated demand.

To provide a concrete example, consider a scenario where we have $n=10$ products, each available in $t_i=5$ locations. Therefore, we have a total of 50 tasks in our meta-training set. The dataset corresponding to each task is represented as a demand-feature pair $(\mathbf{x}_{ij}, y_{ij})$, where $\mathbf{x}_{ij} \in \mathbb{R}^m$ is a feature vector and $y_{ij} \in \mathbb{R}$ is the associated demand.

Our goal is to train a model, denoted by $f: \mathbb{R}^m \rightarrow \mathbb{R}^+$, capable of mapping $m$-dimensional observations $\mathbf{x}$ to outputs $y$ across a large or possibly infinite number of tasks. We employ the First-Order Model Agnostic Meta-Learning (FOMAML) algorithm for this purpose. For a given product characterized by a feature vector $s_i, \forall i \in [n]$ and an environment (e.g., location) characterized by a feature vector $v_j, \forall j \in [t_i]$, we consider a single historical price and demand observation $(\Tilde{p}_{ij}, \Tilde{y}_{ij})$.

Given a price of interest $p_{ij}$, we assume our task as the following demand function:

equation[equation omitted — 80 chars of source]

where $\mathbf{x}_{ij}$ is the feature tuple $(s_i,v_j,\Tilde{p}_{ij},\Tilde{y}_{ij}, p_{ij})$ and $y_{ij}$ is the corresponding demand $y_{ij}$. Here, $f_{ij}$ is a flexible function (e.g., linear regression, MLP, etc.) and each task is associated with a unique model parameter $\beta_{ij}\in{\mathbb R}^m$. We assume that the noise $\epsilon_{ij}$ follows a centered sub-Gaussian distribution with parameter $\sigma_i^2$. Furthermore, without loss of generality, we assume that $\mathcal{P}_{X}$ is an isotropic-centered sub-Gaussian distribution, i.e., $\mathbb{E}(\mathbf{x}_{ij}\mathbf{x}_{ij}^\top) = \mathbb{I}_d$. Exploiting some structural similarities in $\mathcal{P}\left({\mathcal{T}}\right)$, the goal is to train a model for a new task ${\mathcal{T}}^{\rm new}$, coming from $\mathcal{P}\left({\mathcal{T}}\right)$, from a small amount of {\em training dataset} ${\mathcal{D}}={\big(\mathbf{x}^{\text{new}}_{ij},y^{\text{new}}_{ij}\big)}$.

remarkIncorporating features allows us to capture an additional form of shared structure. However, despite accounting for observed product features, the demand functions of two products can exhibit distinct behaviors. For instance, even for Diet Coke, price sensitivities may vary significantly on different vending machines due to factors such as customer demographics or preferences that are challenging to capture as explicit features. To account for these product-location-specific nuances, we introduce the flexibility for the demand function's coefficients (e.g., price elasticity) to differ.

In the First-Order MAML (FOMAML) approach, the model parameters for each task in the meta-training dataset are computed after a single gradient update. Specifically, for each task $\mathcal{T}_{ij}$, the task-specific model parameters, denoted $\beta_{ij}^{\prime}$, are updated as follows:

equation[equation omitted — 140 chars of source]

where $\lambda$ is the learning rate, $\beta^*$ is the global model parameter shared across tasks, and $\mathcal{L}_{\mathcal{T}_{ij}}(\beta_{ij})$ is the task-specific loss, such as the mean squared error:

equation[equation omitted — 123 chars of source]

After updating the task-specific parameters, a meta-update is performed on the shared global parameter $\beta^*$ using the performance of the updated $\beta_{ij}^\prime$ on their corresponding tasks. This meta-update is given by the following:

equation[equation omitted — 165 chars of source]

where $\eta$ is the meta-learning rate. The objective of this meta-learning process is to optimize the shared global parameter $\beta^*$ such that, after a few updates on each task, the task-specific parameters $\beta_{ij}$ yield improved performance on their corresponding tasks. Once the meta-learning process is complete, the model parameters of a newly arriving task can be estimated using the learned meta-parameters $\beta^*$. These task-specific parameters $\beta_{ij}^{\prime}$ can then be fine-tuned on the new task using the available data, yielding improved performance and adaptability to new tasks.

By incorporating the FOMAML algorithm into our meta-learning framework, we aim to construct an efficient model for sales prediction that can adapt to new tasks with limited historical sales data.

Methodology

We illustrate the pipeline of our algorithm in Figure (ref). Imagine there are 3 locations offering 6 drink types with transaction data, capturing their historical sales. First, a graph neural network (GNN), $G$, is formed using both static features like machine locations and dynamic features from past sales time series. To predict the demand for Coke at the gym with a discount, relevant nodes and edges from $G$ are extracted. This subset, denoted as $G_\mathcal{T}$, undergoes training using MAML's inner loop, yielding initial task-specific parameters. These parameters are further refined through the FiLM transformer, considering proxy data that might suggest a promotion for Coke. The shared meta-parameters are updated in MAML's outer loop based on the specific task losses. Once this cycle is completed across all tasks, the model is evaluated on fresh data to project the demand.

Our proposed methodology for e-commerce demand prediction encompasses three pivotal components: proxy data selection, GNN-enhenced representation learning, and the F-FOMAML algorithm design. To cater to the multi-faceted nature of e-commerce products and their varied demand across different locations or customer segments, we weave task-adaptive estimators into the meta-learning framework. Further, we employ GNN and the FiLM layer to utilize and encode proxy data into hidden representations, thus enabling the modulation of learner parameters for enhanced adaptation to the specific characteristics of products and customer segments.

Proxy Data Selection

The proxy data, vital for tasks with limited historical sales data, is judiciously selected. The ideal proxy data simulates the potential sales behavior of the focal product, informed by sales trends of similar products or those in related categories.

For e-commerce scenarios, task similarity might arise from: 1) Historical Transactions: Edges represent products often purchased together. 2) User Behavioral Patterns: Edges might indicate similar purchase behaviors or browsing patterns of users. 3) Product Similarities: Linking products of the same category or with similar attributes. 4) Domain Knowledge: Connections deriving from expert insights into customer behaviors, seasonal trends, or market dynamics.

Traditional methods use clustering techniques and measure distances with metrics like Euclidean and cosine similarity to quantify task similarity. Our approach, however, leverages a GNN-based method for selecting relevant tasks as proxy data. For a given task, we denote its proxy data as $Z_{ij}$, representing the most relevant data identified through our GNN-based approach. This ensures the proxy data accurately reflects the target task, enhancing demand forecasting accuracy. \paragraph{Graph Construction for Proxy Data} A tailored graph for our GNN encapsulates relationships among tasks. In determining proxy data for e-commerce settings, we choose tasks from support set $\mathcal{T}$ resembling our target task, $\mathcal{T}_{\text{new}}$, guided by $\text{correlation}(\mathcal{T}, \mathcal{T}_{new}) > \delta,$ where $\delta$ is a threshold indicating task similarity, and the function $\text{correlation}(\mathcal{T}, \mathcal{T}_{new})$ captures the similarity between $\mathcal{T}_{new}$ and $\mathcal{T}$ through different methods such as the ones described above.

GNN-enhanced Representation Learning

Here, we describe how to obtain the graph-enhanced features for each product. In a nutshell, we set up a time series forecasting task and utilize a GNN-based demand forecasting model to predict future sales given each product's historical information as well as cross-product relationships defined by a predefined graph. We then extract the hidden encoded context from the trained model to produce the product embeddings as features. \paragraph{Input Product Features} E-commerce platforms host a plethora of products, each with unique characteristics and consumer interactions. In this case, We construct the graph using product-specific attributes such as brands (i.e., we connect all products with the same brand). The input features for node $N_i$ (representing product $i$) are: 1) Static features $S_i$, like the product category, brand, and manufacturing details. 2) Dynamic features $D_i$, encompassing time-evolving aspects like recent sales and price changes. \paragraph{Product Embedding Generation via Forecasting} A crucial aspect is to generate meaningful product embeddings that can capture the multifaceted nature of e-commerce products. To facilitate this, we set up a demand forecasting task as:

equation[equation omitted — 93 chars of source]

where $f$ represents the forecasting model. At time $t$, target $Y_{t+1}\in\mathbb{R}^{N\times 1}$ are the future one-day sales, $D_{t-C:t} \in\mathbb{R}^{N\times d}$ are $d$ dynamic features with the history length of $C$ days, and $S\in \mathbb{R}^{N\times m}$ are $m$ static features for all $N$ products. We adopt the GNN-based forecasting model introduced in Yang2023 and use the brand information to craft the predefined graph. The GNN is utilized both for forecasting and for generating the embedding of tasks. After training convergence, we extract the embedding for each product, which serves as compact representations of product dynamics. \paragraph{Edge Relationship Determination} Let $E(\mathcal{T}_i, \mathcal{T}_j)$ denote the edge between tasks $\mathcal{T}_i$ and $\mathcal{T}_j$. The edge relationships between the two entities are inferred using:

equation[equation omitted — 227 chars of source]

where $emb(\mathcal{T}_i)$ stands for the embedding of task $\mathcal{T}_i$, $\text{dist}(\cdot,\cdot)$ denotes a function measuring the distance between two embeddings, $h$ denotes the task (i.e., product) hierarchy or taxonomy, and $\theta$ is a pre-determined threshold to determine closeness. We will create an edge between tasks $\mathcal{T}_i$ and $\mathcal{T}_j$ if either their corresponding embeddings are close to each other or they belong to the same category.

F-FOMAML Algorithm Description

We present the GNN-Integrated Feature-based First-Order MAML (F-FOMAML) for Demand Forecasting Algorithm (ref), which incorporates transactional data with static and dynamic features, and proxy data to forecast demand in peak periods. This variant of the MAML algorithm delineates the learning process into several stages: meta-learner, base learners, FiLM Layer, and fine-tuning.

algorithm[algorithm omitted — 1,983 chars of source]

\paragraph{FiLM Layer.} The feature-wise linear modulation (FiLM) layer perez_film_2017 is a critical component in tailoring the learner parameters based on the proxy data features. This layer applies an affine transformation, feature-wise, to its input, modulating the hidden vector outputs of the meta-model using the proxy data $Z_{ij}$ as task encodings. The construction and purpose of the proxy data $Z_{ij}$ is elaborated in section (ref). The FiLM layer facilitates a more refined adaptation to the distinctive traits of the product and vending machine location by exploiting the relationship between the product-specific and machine-specific price-sensitivity estimators encapsulated in the proxy data.

The FiLM layer's mechanism can be formally described as

equation[equation omitted — 108 chars of source]

where $\mathbf{x}_{ij}$ represents the input feature representation, $\beta(Z_{ij})$ (abv. $\beta_{ij}$) and $\gamma(Z_{ij})$ signify the scaling and shifting factors learned from the proxy data $Z_{ij}$, and $\odot$ symbolizes element-wise multiplication. The functions $\beta(Z_{ij})$ and $\gamma(Z_{ij})$ are learned during the training phase to cater to the specific task at hand. By applying this transformation to the task-specific model parameters $\beta_{ij}^{\prime}$, the model captures complex feature interactions and becomes better equipped to adapt to the specific characteristics of each unique product-environment pair. \paragraph{Meta-Learner.} The core of the meta-learning approach is the meta-learner, an overarching model that helps in initializing and updating the meta-parameters, \(\beta^*\). These parameters serve as a shared knowledge base that aids in swift adaptation across a myriad of tasks. The meta-learner initializes the global meta-parameters $\beta^*$ and, after task-specific adaptations are performed, updates $\beta^*$ using the aggregated first-order gradients from each task. This process ensures that the meta-parameters incorporate insights from various tasks, enabling rapid adaptation to new tasks and reducing the cold-start problem in the e-commerce domain. \paragraph{Base Learners.} The base learners are models tailored to specific tasks, such as predicting the demand for a new product launch or forecasting sales during a flash sale. Each base learner operates by extracting relevant nodes and edges to form a subgraph for each task, initializing task-specific parameters $\beta_{ij}$ from the global meta-parameters $\beta^*$, computing the task-specific loss, and updating the task-specific parameters $\beta_{ij}'$ using first-order gradient descent. Additionally, the FiLM transformer applies proxy data to modulate input features, enhancing the adaptation of the task-specific parameters.

\paragraph{Fine-Tuning.} In our approach, fine-tuning involves a final meta-update on $\beta^*$ after task-specific updates, evaluating the model on testing data to forecast demand $\widehat{y}$ for products and returning the forecasted demand $\widehat{y}$ as the final prediction output. This process leverages the FiLM transformer and proxy data to ensure that the models are not just generic but tailored to capture the heterogeneity in tasks.

The strength of this method mainly lies in its ability to utilize shared structures across tasks while also adapting swiftly to unique task characteristics using the FiLM transformer and proxy data.

Theoretical analysis

In this section, we provide a theoretical model to illustrate the benefit of our proposed method and shed light on why proxy data improves the few-shot prediction. \paragraph{Data generative model.} Suppose we have a set of tasks $\mathcal T$. For each task $t\in\mathcal T$, we observe training samples $\{(x_k^{(t)},y_k^{(t)})\}_{k=1}^{n_t}$, where $n_t$ is the sample size for the task $t$. In addition, for each task, we observe a task-specific feature $v_t\in\mathbb{R}^r$. For the simplicity of presentation, we assume $v_t\in [0,1]^r$. We denote the set of training domains by $\mathcal D^{tr}$ and assume there are ${T}=|\mathcal{T}|$ training tasks. Following equation ((ref)), we assume that for each task $t$, the outcome prediction function $g$ takes the form of $ y=g_t(x)+\epsilon:= h_t(f(x))+\epsilon$, where $h_t$ is the base-learner that depends on individual task $t$, $f$ is the meta-learner, and $\epsilon$ is a noise term which is assumed to be sub-Gaussian with mean 0 and variance $\sigma^2$.

Following Section (ref), for each task $t\in\mathcal T$, we construct the proxy data $Z_{t}$ by including all similar tasks $t'$ such that $\|v_{t'}-v_t\|\le h$ for some threshold parameter $h>0$. Then similarly, for the test task $\widetilde t$, the outcome prediction function $\widehat g_{\widetilde t}$ is computed as $ \widehat g_{\widetilde t}(x)=\widehat h_{\widetilde t}(f(x)), $ where $\widehat h_{\widetilde t}(\cdot)=\frac{\sum_{t\in\mathcal T} w(\widetilde t, t) \widehat h_i(\cdot)}{\sum_{t\in\mathcal T} w(\widetilde t, t)}$, with the weight $w(\widetilde t,t)=\1\{\|v_{\widetilde t}-v_t\|\le h\}$. In the case where the denominator is $0$, we define $\widehat h_{\widetilde t}=0$.

\paragraph{Theoretical results.} To facilitate the theoretical analysis, we first assume that the distance between task-specific features indeed captures the similarity of tasks: there exists a universal constant $C$, such that $ \| h_{t_1}- h_{t_2}\|_\infty\le C\cdot \|v_{t_1}-v_{t_2}\|. $

In addition, we assume that for each training domain $t$, $\widehat h_t$ is well learned such that $\operatorname*{\mathbb{E}}\big[\big(\widehat h_t(f(x))-h_t(f(x))\big)^2\big]=O(\frac{C(\mathcal H)}{n_t})$, where $C(\mathcal H)$ is the Rademacher complexity of the function class $\mathcal H$. We further assume $v_t$ has a positive density over $[0,1]^r$. Then, we have:

theoremConsider the data generative model, the algorithm $\widehat g_{\widetilde t}$, and the assumptions above. Suppose we have $n_d\gtrsim n$ for all $t\in\mathcal D^{tr}$. Define the excess risk for the test domain $\widetilde t$ by $R(\widehat g_{\widetilde t})=\operatorname*{\mathbb{E}}_{(x,y)\sim \widetilde t} [l(\widehat g_{\widetilde t}(x;\mathcal D^{tr}, A),y)]-\operatorname*{\mathbb{E}}_{(x,y)\sim \widetilde t} [l(g_{\widetilde t}(x;\mathcal D^{tr}, A),y)]$. If the loss function $l$ is Lipschitz with respect to the first argument, then the excess risk satisfies \begin{equation} R(\widehat g_{\widetilde t})\lesssim h+\sqrt\frac{C(\mathcal H)/n}{\max\{1,nh^r\}}. \end{equation} In particular, if $h$ is properly chosen such that $h\asymp (\frac{C(\mathcal H)/n}{T})^{\frac{1}{r+2}}$, then $ R(\widehat g_{\widetilde t})\lesssim \left(\frac{C(\mathcal H)/n}{T}\right)^{\frac{1}{r+2}}. $

Theorem (ref) suggests that the superiority of our algorithm comes from a better bias-variance trade-off. More concretely, the threshold $h$ tunes the trade-off for the excess risk. On the one hand, when we do not use relational data at all (corresponding to the case where $h= 0$), the first term in (ref), bias, is negligible, while the second term, variance, becomes dominant as the data is limited. As the excess risk of a single task is of order $(C(\mathcal H)/n)^{1/2}$, our result implies that when $T$ is sufficiently large such that $T> \big(\frac{n}{C(\mathcal H)}\big)^{r/2}$, our proposed method will overcome the potential bias by incorporating similar (but still different) tasks and better than learning with only one single-source task. On the other hand, if we simply use the standard ERM to pool all the data together (corresponding to $h=\infty$), although the variance becomes small, the bias would dominate in this case. The second part of the theorem suggests that one can efficiently incorporate the proxy data with a carefully chosen threshold. The proof of Theorem (ref) is deferred to Appendix (ref).

The theoretical perspective we discussed is particularly pertinent to the context of demand prediction. Given the limited data available from high-stakes sales events, relying solely on this data for prediction (akin to $h=0$) can result in outcomes with substantial variance. Conversely, utilizing the entire historical dataset (corresponding to $h=\infty$) can introduce significant bias, given the marked differences between regular and high-stakes sales events. Our method harnesses GNNs to understand the relationships within historical data. This approach strikes an optimal balance in the bias-variance trade-off, leading to improved prediction accuracy.

Experiment

In this section, we conduct extensive experiments to evaluate the efficacy of our proposed F-FOMAML for peak-period demand prediction, focusing on two key research questions:

itemize• How does F-FOMAML's prediction performance compare to various baselines? • To what extent do the components we introduce, such as the proxy data selection method (GNN versus MQCNN), impact the model's predictive capabilities?

By addressing these questions, we provide a comprehensive evaluation of F-FOMAML, highlighting its performance relative to existing approaches and analyzing the contributions of individual components to the model's overall predictive power.

Experimental Setups

In this section, we detail the experimental setups, focusing on two real-world datasets and the evaluation criteria for our method's performance.

For brevity, the main text covers the data description, experimental setup, and results for the JD.com dataset, while the details for the vending machine dataset are provided in the Appendix (ref).

\paragraph{Datasets.} We validate our methodology using transactional records from JD.com \footnote{Dataset available at: \url{https://connect.informs.org/msom/events/datadriven2020}}, which include both static and dynamic features related to products (SKUs) and order details for March 2018.

The goal is to predict the demand at the promotional price given the demand at the regular price. We use the category information (3 categories in total) for product features, and region (63 regions) information for location features. We use the last 15 days as testing, and the second to last 15 days as training. The detailed data description and dataset construction are deferred to the Appendix (ref).

table[table omitted — 2,796 chars of source]

\paragraph{Baselines.} Our evaluation encompasses a diverse range of baseline techniques for comparative analysis. This includes traditional regression techniques like Linear Regression, along with ensemble strategies such as Random Forest and the well-regarded XGBoost algorithm chen2016xgboost. In the realm of neural-network-based methods, we consider the Multi-Layer Perceptron network, Gated Recurrent Unit (GRU) chung2014empirical, Dipole ma2017dipole, and LSTNet lai2018modeling. Additionally, advanced transfer methods like Model-Agnostic Meta-Learning (MAML) finn2017model, Reptile Nichol2018OnFM, Meta-SGD li2017meta, TSA zhou2020task and MUMOMAML vuorio2019multimodal are included. Consistency in the feature set is maintained across all baseline models, aligning them with our proposed method, and ensuring a fair comparison.

\paragraph{Model Evaluation and Training.} With the meta-learning framework in place, we train the base learners on the proxy data and evaluate their performances using evaluation metrics such as mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). The meta-learner, which could be a neural network goodfellow2016deep, support vector machine cortes1995support, or decision tree breiman1984classification, selects the best base learners and their corresponding hyper-parameters based on the evaluation results. Next, the selected base learners are fine-tuned on the available historical sales data from the regular sales period, if any, to adapt the model to the peak period. This fine-tuning step allows our model to better capture the unique relationships between features and sales in the target vending machine, leading to more accurate predictions and improved generalization to new tasks.

Analysis of Results

Table (ref) presents a detailed comparison of various machine learning methods applied to real-world e-commerce sales data from JD.com, evaluating their performance through three metrics. The methods encompass traditional regression, ensemble strategies, neural network-based approaches, transfer learning methods, and some advanced meta-learning algorithms, with the inclusion of proxy data features generated by either MQCNN or Graph Neural Networks (GNN). Linear regression, serving as a baseline, shows moderate performance, which slightly deteriorates when combined with MQCNN but improves with GNN, indicating GNN's effectiveness in feature enhancement. Random Forest and XGBoost, both ensemble methods, exhibit higher errors compared to linear regression, with their performance variably impacted by MQCNN and GNN additions, suggesting a complex interaction between ensemble methods and proxy data features. Among neural network-based methods, the addition of MQCNN generally does not significantly alter performance, whereas GNN integration shows mixed results. Notably, advanced methods like MAML, Reptile, and MetaSGD show varied outcomes, with some combinations leading to increased errors. Particularly, Reptile demonstrates a substantial error reduction when combined with MQCNN, highlighting the potential of integrating advanced algorithms with proxy data feature generation techniques. The performance of TSA and MUMOMAML, with their respective enhancements, underscores the importance of selecting appropriate proxy data feature generation methods to improve prediction accuracy. MUMOMAML combined with MQCNN achieves the best MAPE score across all methods, emphasizing the strength of multimodal meta-learning techniques when optimized with suitable proxy data features.

The impact of incorporating different proxy data selection methods, particularly the comparison between GNN and other methods like clustering, is profound. The integration of GNN with various machine learning models, including our proposed F-FOMAML, consistently improved performance across metrics (MSE, MAE, MAPE), highlighting the effectiveness of GNN in enhancing the model's ability to predict demand accurately. This improvement is notably apparent in the substantial performance leap observed when F-FOMAML is combined with GNN, which yields the best results.

\paragraph{Ablation study.} To better understand the effect of proxy data, we perform an ablation study by varying the k parameter in the k-shot proxy data selection and evaluating the performance metrics as the value of k changes. As illustrated in Figure (ref), we observed that initially increasing k leads to a rise in the error metric, suggesting a decline in model performance due to less relevant data. This trend reaches a plateau, after which further increases in k result in decreased error, indicating improved performance from a larger proxy data set. These findings highlight a critical threshold where the quantity of proxy data begins to enhance model performance, emphasizing the potential benefits of utilizing larger proxy data sets. Detailed analyses and additional studies on algorithm convergence are provided in the Appendix (ref).

Our analysis conclusively demonstrates that F-FOMAML, especially when enhanced with Graph Neural Network (GNN) proxy data, outshines traditional regression models, ensemble strategies, neural networks, and other advanced meta-learning algorithms in predicting e-commerce sales on JD.com. This method achieves the lowest MSE and MAE, evidencing its superior ability to capture complex data patterns. Moreover, the integration of GNN as a proxy data selection method significantly boosts F-FOMAML's performance across various metrics, including MSE, MAE, and MAPE, underscoring the pivotal role of advanced proxy data techniques in improving demand prediction models. The comparison with other proxy data methods, such as MQCNN, further illustrates GNN's unique capability in effectively capturing complex data relationships, enhancing F-FOMAML's predictive accuracy. These findings highlight the critical impact of combining GNN with state-of-the-art prediction models, offering insights into the development of more precise demand prediction algorithms.

Conclusion

This paper presents a novel approach to the challenging task of predicting demand during promotional events characterized by special buying behaviors. Traditional sales data often falls short due to the limited availability of historical data for such events. To address this, we framed demand prediction within the graph-augmented meta-learning paradigm. Utilizing the GNN-enhanced F-FOMAML algorithm, which integrates the generalizability of meta-learning with the adaptability of FiLM layers, we developed a robust forecasting model particularly effective in data-sparse scenarios.

Our method is grounded in solid theoretical foundations, demonstrating the algorithm's ability to optimize predictive risk by skillfully managing bias-variance trade-offs. Empirical evaluations highlight our model's superiority over conventional forecasting techniques and underscore its applicability beyond retail, with potential uses in fields such as online banking security and digital marketing. Empirically, F-FOMAML achieves significant improvements, reducing prediction MAE by 26.24% on the vending machine dataset and 1.04% on the JD.com dataset, with a notable 10.18% enhancement over GNN-based benchmarks. Further discussion on the strengths, limitations, and future research directions is provided in the Appendix (ref).