is obtained by updating the functions $T_{3,\lambda}(\cdot,\cdot)$ and
$g_{\kappa,\lambda}(\cdot,\cdot)$ as follows

$\displaystyle
T_{3,\lambda}(\boldsymbol{t},\boldsymbol{\tau})=t_{1}^{2}\mathbb{E}\Big{[}\frac{\widetilde{\mu}_{1}^{2}\kappa+\mu_{2}^{2}}{g_{\kappa,\lambda}(\boldsymbol{t},\boldsymbol{\tau})}\Big{]},~{}g_{\kappa,\lambda}(\boldsymbol{t},\boldsymbol{\tau})=\frac{t_{1}}{\tau_{1}}\Big{(}\widetilde{\mu}_{1}^{2}\kappa+\mu_{2}^{2}\Big{)}+\frac{t_{2}}{\tau_{2}}\Big{(}\widehat{\mu}_{1}^{2}\kappa+\mu_{3}^{2}\Big{)}+\lambda.$

The convergence result in Lemma 10 follows using [38, Theorem 2.1].
Specifically, we use the strong convexity property in Lemma 7. Also, we use
the pointwise convergence of the cost functions based on Assumptions 4 and 5
and the dominated convergence theorem. This shows that all the assumptions in
[38, Theorem 2.1] are satisfied by the formulation in (76) and its asymptotic
formulation mentioned in Lemma 10. Next, we refer to the asymptotic limit
obtained in Lemma 10 as the asymptotic deterministic formulation.

Performing a similar analysis as in Sections VI-B1, VI-B2 and VI-B3, it can be
checked that the asymptotic deterministic formulation obtained in Lemma 10 is
the asymptotic limit of the following formulation

$\displaystyle\min_{\boldsymbol{w}\in\mathbb{R}^{k}}$
$\displaystyle\frac{1}{2n}\sum_{i=1}^{n}\Big{(}y_{i}-\boldsymbol{w}^{\top}\widehat{\sigma}(\boldsymbol{F}^{\top}\boldsymbol{a}_{i})\Big{)}^{2}+\tfrac{1}{2}\mathinner{\\!\left\lVert\boldsymbol{R}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}^{2}+\tfrac{\lambda}{2}\mathinner{\\!\left\lVert\boldsymbol{w}\right\rVert}^{2}.$
(77)

Here, the regularization matrix $\boldsymbol{R}$ is defined as follows

$\displaystyle\boldsymbol{R}=\widehat{\mu}_{1}^{2}\boldsymbol{F}^{\top}\boldsymbol{F}+\mu_{3}^{2}\boldsymbol{I}_{k},$
(78)

and the new activation function $\widehat{\sigma}(\cdot)$ satisfies the
following properties

$\displaystyle\mathbb{E}[\widehat{\sigma}(z)]=\mathbb{E}[\sigma(x_{1})],~{}\mathbb{E}[z\widehat{\sigma}(z)]=\mathbb{E}[z\sigma(x_{1})]$
(79)
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\mathbb{E}[\widehat{\sigma}(z)^{2}]=\mathbb{E}[\sigma(x_{1})\sigma(x_{2})],$

where $x_{1}=z+\Delta v_{1}$, $x_{2}=z+\Delta v_{2}$ and $z$, $v_{1}$ and
$v_{2}$ are independent standard Gaussian random variables. Now, note that the
norm of any vector $\boldsymbol{x}\in\mathbb{R}^{p}$ can be expressed as
follows

$\displaystyle\frac{1}{2}\mathinner{\\!\left\lVert\boldsymbol{x}\right\rVert}^{2}$
$\displaystyle=\max_{\boldsymbol{u}\in\mathbb{R}^{p}}-\frac{\mathinner{\\!\left\lVert\boldsymbol{u}\right\rVert}^{2}}{2}+\boldsymbol{u}^{\top}\boldsymbol{x}=\max_{t\geq
0}-\frac{t^{2}}{2}+t\mathinner{\\!\left\lVert\boldsymbol{x}\right\rVert}$
$\displaystyle=\max_{t\geq
0}\inf_{\tau>0}-\frac{t^{2}}{2}+\frac{t\tau}{2}+\frac{t}{2\tau}\mathinner{\\!\left\lVert\boldsymbol{x}\right\rVert}^{2}.$
(80)

We can see that the optimal solution of the max-min problem in (VI-C), denoted
by $t^{\star}$ and $\tau^{\star}$, satisfies $t^{\star}=\tau^{\star}$. This
trick can be used in the CGMT framework to show that the asymptotic limit of
the formulation in (77) can also be expressed as follows

$\displaystyle\max_{\begin{subarray}{c}0\leq{t_{1}}\leq\overline{C}_{t_{1}}\end{subarray}}\min_{\begin{subarray}{c}\overline{c}_{\tau_{1}}\leq{\tau_{1}}\leq\overline{C}_{\tau_{1}}\end{subarray}}~{}\frac{\tau_{1}t_{1}}{2}-\frac{t_{1}^{2}}{2}+\frac{(q_{t,\tau,\infty}^{\star})^{2}}{2T_{2,\lambda,\infty}(t_{1},\tau_{1})}-\frac{\eta
T_{3,\lambda,\infty}(t_{1},\tau_{1})}{2}$ (81)
$\displaystyle+\frac{t_{1}}{2\tau_{1}}\Big{(}\gamma_{1}-2\widetilde{\mu}_{1}T_{1}q_{t,\tau,\infty}^{\star}\gamma_{2}+\widetilde{\mu}_{1}^{2}T_{1}^{2}(q_{t,\tau,\infty}^{\star})^{2}+\mu_{0}^{2}(\vartheta^{\star})^{2}-2\mu_{0}\vartheta^{\star}\gamma_{3}\Big{)},$

where the constant $\vartheta^{\star}$ satisfies $\vartheta^{\star}=0$ if
$\mu_{0}=0$ and $\vartheta^{\star}=\gamma_{3}/\mu_{0}$ otherwise. Moreover,
$q_{t,\tau,\infty}^{\star}$ is defined as follows

$\displaystyle
q_{t,\tau,\infty}^{\star}=\frac{\gamma_{2}t_{1}\widetilde{\mu}_{1}T_{1}T_{2,\lambda,\infty}(t_{1},\tau_{1})}{\tau_{1}+t_{1}\widetilde{\mu}_{1}^{2}T_{1}^{2}T_{2,\lambda,\infty}(t_{1},\tau_{1})}.$
(82)

Here, the functions $T_{2,\lambda,\infty}(\cdot,\cdot)$,
$T_{3,\lambda,\infty}(\cdot,\cdot)$ and
$g_{\kappa,\lambda,\infty}(\cdot,\cdot)$ can be expressed as follows

$\displaystyle
T_{2,\lambda,\infty}(t_{1},\tau_{1})=\frac{\delta}{T_{1}^{2}}\mathbb{E}\Big{[}\frac{\kappa}{g_{\kappa,\lambda,\infty}(t_{1},\tau_{1})}\Big{]}/\Big{(}1-\frac{\widetilde{\mu}_{1}^{2}t_{1}\delta}{\tau_{1}}\mathbb{E}\Big{[}\frac{\kappa}{g_{\kappa,\lambda,\infty}(t_{1},\tau_{1})}\Big{]}\Big{)}$
(83) $\displaystyle
T_{3,\lambda,\infty}(t_{1},\tau_{1})=t_{1}^{2}\mathbb{E}\Big{[}{(\widetilde{\mu}_{1}^{2}\kappa+\mu_{2}^{2}})/{g_{\kappa,\lambda,\infty}(t_{1},\tau_{1})}\Big{]}$
$\displaystyle
g_{\kappa,\lambda,\infty}(t_{1},\tau_{1})=\frac{t_{1}}{\tau_{1}}\Big{(}\widetilde{\mu}_{1}^{2}\kappa+\mu_{2}^{2}\Big{)}+\Big{(}\widehat{\mu}_{1}^{2}\kappa+\mu_{3}^{2}\Big{)}+\lambda.$

The property in (VI-C) can also be used to show that the optimal solution
$t_{2}^{\star}$ and $\tau_{2}^{\star}$ of the asymptotic deterministic
formulation obtained in Lemma 10 satisfy $t_{2}^{\star}=\tau_{2}^{\star}$.
This then leads to the formulation in (LABEL:scprob1_asy_pf).

Now, define the asymptotic training and generalization errors stated in
Theorem 1 as $\mathcal{E}_{\text{train},\infty}$ and
$\mathcal{E}_{\text{test},\infty}$, respectively. Then, the asymptotic
training error converges as follows

$\displaystyle\mathcal{E}_{\text{train},\infty}\xrightarrow{~{}\ell\to+\infty~{}}C^{\star}(\Delta,\lambda)-\frac{\lambda}{2}\left((q^{\star})^{2}+h_{\infty}^{\prime}(\lambda)\right),$
(84)

where $C^{\star}(\Delta,\lambda)$ is the optimal cost of the deterministic
problem in (LABEL:scprob1_asy_pf). Here, the function $h_{\infty}(\cdot)$ is
defined as follows

$\displaystyle
h_{\infty}(\lambda)=-(q^{\star})^{2}\Big{(}\lambda-\frac{1}{T_{2,\lambda,\infty}(t_{1}^{\star},\tau_{1}^{\star})}\Big{)}-\eta
T_{3,\lambda,\infty}(t_{1}^{\star},\tau_{1}^{\star}).$

Moreover, the asymptotic generalization error converges as follows

$\displaystyle\mathcal{E}_{\text{train},\infty}\xrightarrow{~{}\ell\to+\infty~{}}\frac{1}{4^{\upsilon}}\mathbb{E}\left[\left(\varphi(g_{1})-\widehat{\varphi}(g_{2})\right)^{2}\right],$
(85)

where $g_{1}$ and $g_{2}$ have a bivariate Gaussian distribution with mean
vector $[0,\mu_{0s}\vartheta^{\star}]$ and covariance matrix $\boldsymbol{C}$,
defined as follows

$\displaystyle\boldsymbol{C}=\begin{bmatrix}1&\mu_{1s}\rho T_{1}q^{\star}\\\
\mu_{1s}\rho
T_{1}q^{\star}&\mu_{1s}^{2}\beta_{\infty}^{\star}+\mu_{2s}^{2}\left((q^{\star})^{2}+h_{\infty}^{\prime}(\lambda)\right)\end{bmatrix}.$

The constant $\vartheta^{\star}$ satisfies $\vartheta^{\star}=0$ if
$\mu_{0}=0$ and $\vartheta^{\star}=\gamma_{3}/\mu_{0}$ otherwise. Here, the
constants $\mu_{0s}$, $\mu_{1s}$ and $\mu_{2s}$ are defined as
$\mu_{0s}=\mathbb{E}[\sigma(z)]$, $\mu_{1s}=\mathbb{E}[z\sigma(z)]$ and
$\mu_{2s}^{2}=\mathbb{E}[\sigma(z)^{2}]-\mu_{0s}^{2}-\mu_{1s}^{2}$, where $z$
is a standard Gaussian random variable. Additionally, the constant
$\beta_{\infty}^{\star}$ can be computed via the following expression

$\displaystyle\beta_{\infty}^{\star}$
$\displaystyle=\frac{1}{V_{1}+V_{3}}\Big{(}V_{1}T_{1}^{2}-V_{2}-V_{4}-\lambda+\frac{1}{T_{2,\lambda,\infty}(t_{1}^{\star},\tau_{1}^{\star})}\Big{)}(q^{\star})^{2}$
$\displaystyle+\frac{\eta
T_{3,\lambda,\infty}(t_{1}^{\star},\tau_{1}^{\star})}{V_{1}+V_{3}}-\frac{V_{2}+V_{4}+\lambda}{V_{1}+V_{3}}h_{\infty}^{\prime}(\lambda),$
(86)

where the constants $V_{1}$, $V_{2}$, $V_{3}$ and $V_{4}$ are defined as
follows

$\displaystyle
V_{1}=\frac{t_{1}^{\star}\widetilde{\mu}_{1}^{2}}{\tau_{1}^{\star}},~{}V_{3}=\widehat{\mu}_{1}^{2},~{}V_{2}=\frac{t_{1}^{\star}\mu_{2}^{2}}{\tau_{1}^{\star}},~{}V_{4}=\mu_{3}^{2}.$

Here, $q^{\star}=q^{\star}_{t^{\star},\tau^{\star},\infty}$ satisfies the
expression in (82). Moreover, $t_{1}^{\star}$ and $\tau_{1}^{\star}$ denote
the optimal solution of the problem defined in (LABEL:scprob1_asy_pf). Also,
we treat $q^{\star}$, $t_{1}^{\star}$ and $\tau_{1}^{\star}$ as constants
independent of $\lambda$ when we compute the derivative of the function
$h_{\infty}(\cdot)$. The results in (84) and (85) can be proved using a
similar analysis as in Section VI-B4. Performing a similar analysis as in
Sections VI-B1, VI-B2, VI-B3 and VI-B4, it can be checked that the training
and generalization errors corresponding to the formulation in (77) converge in
probability to the limiting functions obtained in (84) and (85), respectively.

Note that the analysis in this Section is valid for any bounds that satisfy
the theoretical results in Lemmas 2, 3 and 6. Moreover, observe that the cost
functions of both deterministic problems in (61) and (LABEL:scprob1_asy_pf)
diverge when $t_{1}$, $t_{2}$, $\tau_{1}$ or $\tau_{2}$ grows to infinity or
when $\tau_{1}$ or $\tau_{2}$ goes to $0$. This means that the solution of the
unconstrained version of the formulations in (61) and (LABEL:scprob1_asy_pf)
should satisfy the feasibility constraints in (61) and (LABEL:scprob1_asy_pf).
This means that the optimization problems in (61) and (LABEL:scprob1_asy_pf)
can be equivalently formulated as in (IV-A) and (18). This completes the proof
of Theorem 1, Theorem 2 and Lemma 1.

##  VII Conclusion

In this paper, we precisely analyzed a random perturbation method used to
regularize machine learning problems. Specifically, we provided an accurate
characterization of the training and generalization errors corresponding to
the noisy feature formulation. Our predictions are based on a correlated
Gaussian equivalence conjecture and an extended version of the CGMT, referred
to as the multivariate CGMT. Moreover, our analysis shows that Gaussian noise
injection in the input data has the same effects of a weighted ridge
regularization when the number of noise samples grows to infinity.
Additionally, it provides the explicit dependence of the introduced
regularization on the feature matrix, the activation function and the noise
variance. Simulation results validate our predictions and show that inserting
noise during training moves the interpolation threshold and can mitigate the
double descent phenomenon in the generalization error.

##  VIII Appendix: Additional Technical Details

In this part, we provide additional technical details to prove the results
stated in Theorem 1, Theorem 2 and Lemma 1. Specifically, we provide a
rigorous proof of the theoretical results stated in Lemma 5 and Lemma 6.

###  VIII-A Proof of Lemma 5: High–dimensional Equivalence I

The optimization problems given in (38) and (39) share the same feasibility
set $\mathcal{D}$ which we define as follows

$\displaystyle\mathcal{D}=\\{(\boldsymbol{w},t_{1},t_{2})\mathrel{\mathop{\mathchar
58\relax}}\mathinner{\\!\left\lVert\boldsymbol{w}\right\rVert}\leq C_{w},0\leq
t_{1}\leq C_{t_{1}},0\leq t_{2}\leq C_{t_{2}}\\}.$ (87)

Define $\widehat{f}_{p,1}$ as the cost function of the optimization problem
given in (38) and define $\widehat{f}_{p,2}$ as the cost function of the
optimization problem given in (39). Note that the following inequality
$\mathinner{\\!\left\lvert\sqrt{x}-\sqrt{y}\right\rvert}\leq\sqrt{\mathinner{\\!\left\lvert
x-y\right\rvert}}$ is true for any $x\geq 0$ and $y\geq 0$. Therefore, we have
the following inequality

$\displaystyle\sup_{(\boldsymbol{w},t_{1},t_{2})\in\mathcal{D}}\mathinner{\\!\left\lvert\widehat{f}_{p,2}(\boldsymbol{w},t_{1},t_{2})-\widehat{f}_{p,1}(\boldsymbol{w},t_{1},t_{2})\right\rvert}\leq\sup_{(\boldsymbol{w},t_{1},t_{2})\in\mathcal{D}}\Big{\\{}\sqrt{\frac{2t_{1}^{2}}{\ell^{2}n}\mathinner{\\!\left\lvert
Z_{p,1}\right\rvert}}+\sqrt{\frac{2t_{2}^{2}}{\ell^{2}n}\mathinner{\\!\left\lvert
Z_{p,2}\right\rvert}}\Big{\\}}.$ (88)

where we perform the change of variable $t_{1}=t_{1}/\sqrt{n}$ and
$t_{2}=t_{2}/\sqrt{n}$. Here, $Z_{p,1}$ is defined as follows

$\displaystyle Z_{p,1}$
$\displaystyle=\sqrt{\ell}\mathinner{\\!\left\lVert\boldsymbol{\Sigma}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}\mathinner{\\!\left\lVert\boldsymbol{\Gamma}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}\boldsymbol{h}_{1}^{\top}\widehat{\boldsymbol{h}}_{2}+\sqrt{\ell}\mathinner{\\!\left\lVert\boldsymbol{\Sigma}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}\boldsymbol{h}_{1}^{\top}(-\boldsymbol{V}_{1}^{\top}\widehat{\boldsymbol{y}}+\mu_{0}\vartheta\boldsymbol{V}_{1}^{\top}\boldsymbol{1}_{\ell
n}+\widetilde{\mu}_{1}T_{p,1}q\boldsymbol{V}_{1}^{\top}\widehat{\boldsymbol{s}})$
$\displaystyle+\mathinner{\\!\left\lVert\boldsymbol{\Gamma}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}\widehat{\boldsymbol{h}}_{2}^{\top}(-\boldsymbol{V}_{1}^{\top}\widehat{\boldsymbol{y}}+\mu_{0}\vartheta\boldsymbol{V}_{1}^{\top}\boldsymbol{1}_{\ell
n}+\widetilde{\mu}_{1}T_{p,1}q\boldsymbol{V}_{1}^{\top}\widehat{\boldsymbol{s}}),$
(89)

and $Z_{p,2}$ is defined as follows

$\displaystyle Z_{p,2}$
$\displaystyle=\mathinner{\\!\left\lVert\boldsymbol{\Gamma}^{\frac{1}{2}}\boldsymbol{w}\right\rVert}\widetilde{\boldsymbol{h}}_{2}^{\top}(-\boldsymbol{V}_{2}^{\top}\widehat{\boldsymbol{y}}+\mu_{0}\vartheta\boldsymbol{V}_{2}^{\top}\boldsymbol{1}_{\ell
n}+\widetilde{\mu}_{1}T_{p,1}q\boldsymbol{V}_{2}^{\top}\widehat{\boldsymbol{s}}).$
(90)

Given that the set $\mathcal{D}$ is bounded and based on Assumptions 4 and 5,
$Z_{p,1}$ and $Z_{p,2}$ can be bounded by a constant independent of the
optimization variables. Combining this with the weak law of large numbers, one
can see that the right hand side of (88) converges in probability to zero.
Then, we obtain the following convergence in probability

$\displaystyle\sup_{(\boldsymbol{w},t_{1},t_{2})\in\mathcal{D}}\mathinner{\\!\left\lvert\widehat{f}_{p,2}(\boldsymbol{w},t_{1},t_{2})-\widehat{f}_{p,1}(\boldsymbol{w},t_{1},t_{2})\right\rvert}\xrightarrow{p\to+\infty}0.$
(91)

Moreover, the following two properties are true for bounded functions

$\displaystyle\begin{cases}\mathinner{\\!\left\lvert\sup_{\boldsymbol{x}}f(\boldsymbol{x})-\sup_{\boldsymbol{x}}g(\boldsymbol{x})\right\rvert}\leq\sup_{\boldsymbol{x}}\mathinner{\\!\left\lvert
f(\boldsymbol{x})-g(\boldsymbol{x})\right\rvert}\\\
\mathinner{\\!\left\lvert\inf_{\boldsymbol{x}}f(\boldsymbol{x})-\inf_{\boldsymbol{x}}g(\boldsymbol{x})\right\rvert}\leq\sup_{\boldsymbol{x}}\mathinner{\\!\left\lvert
f(\boldsymbol{x})-g(\boldsymbol{x})\right\rvert}.\end{cases}$ (92)

Given that the functions $\widehat{f}_{p,1}$ and $\widehat{f}_{p,2}$ are
bounded in the set $\mathcal{D}$ and the result in (91), we get the following
convergence in probability

$\displaystyle\mathinner{\\!\left\lvert\widehat{O}^{\star}_{p,1}-\widehat{O}^{\star}_{p,2}\right\rvert}\overset{p\to+\infty}{\longrightarrow}0,$
(93)

where $\widehat{O}^{\star}_{p,1}$ and $\widehat{O}^{\star}_{p,2}$ are the
optimal objective values of the optimization problems given in (38) and (39),
respectively. Now, define $\widehat{\mathcal{S}}^{\star}_{p,1}$ and
$\widehat{\mathcal{S}}^{\star}_{p,2}$ as the set of optimal solutions of the
minimization problems in (38) and (39), respectively. Next, the objective is
to show that

$\mathbb{D}(\widehat{\mathcal{S}}^{\star}_{p,1},\widehat{\mathcal{S}}^{\star}_{p,2})\overset{p}{\longrightarrow}0.$
(94)

Moreover, define the functions $\widetilde{f}_{p,1}$ and $\widetilde{f}_{p,2}$
as follows

$\displaystyle\begin{cases}\widetilde{f}_{p,1}(\boldsymbol{w})=\max\limits_{\begin{subarray}{c}0\leq
t_{1}\leq C_{t_{1}}\\\ 0\leq t\leq
C_{t_{2}}\end{subarray}}\widehat{f}_{p,1}(\boldsymbol{w},t_{1},t_{2})\\\
\widetilde{f}_{p,2}(\boldsymbol{w})=\max\limits_{\begin{subarray}{c}0\leq
t_{1}\leq C_{t_{1}}\\\ 0\leq t\leq
C_{t_{2}}\end{subarray}}\widehat{f}_{p,2}(\boldsymbol{w},t_{1},t_{2}).\end{cases}$
(95)

Note that the set $\widehat{\mathcal{S}}^{\star}_{p,1}$ is the set of
minimizing $\boldsymbol{w}$ of the first function in (95). Based on Lemma 4,
the function $\widetilde{f}_{p,2}$ is strongly convex in the feasibility set
where $\lambda$ is a strong convexity parameter. This means that it has a
unique minimizer denoted by $\boldsymbol{w}_{p,2}^{\star}$. Now, assume that
$\boldsymbol{w}_{p,1}^{\star}$ is a minimizer of the function
$\widetilde{f}_{p,1}$. Moreover, assume that there exists $\gamma>0$
independent of $p$ such that the following convergence holds true

$\displaystyle\mathbb{P}\Big{(}\sup_{\boldsymbol{w}^{\star}\in\widehat{\mathcal{S}}^{\star}_{p,1}}\mathinner{\\!\left\lVert\boldsymbol{w}^{\star}-\boldsymbol{w}_{p,2}^{\star}\right\rVert}_{2}\geq\gamma\Big{)}\overset{p\to\infty}{\longrightarrow}1.$
(96)

Given the strong convexity of the function $\widetilde{f}_{p,2}$, we have the
following inequality

$\displaystyle\widetilde{f}_{p,2}(\beta\boldsymbol{w}_{1}+(1-\beta)\boldsymbol{w}_{2})$
$\displaystyle\leq\beta\widetilde{f}_{p,2}(\boldsymbol{w}_{1})+(1-\beta)\widetilde{f}_{p,2}(\boldsymbol{w}_{2})$
$\displaystyle-\frac{\lambda}{2}\beta(1-\beta)\mathinner{\\!\left\lVert\boldsymbol{w}_{1}-\boldsymbol{w}_{2}\right\rVert}^{2}_{2},$
(97)

where this is valid for any $\beta\in[0,1]$ and feasible $\boldsymbol{w}_{1}$
and $\boldsymbol{w}_{2}$. Take
$\boldsymbol{w}_{1}=\boldsymbol{w}_{p,1}^{\star}$,
$\boldsymbol{w}_{2}=\boldsymbol{w}_{p,2}^{\star}$ and $\beta=1/2$. Based on
the fact that $\boldsymbol{w}_{p,2}^{\star}$ is a minimizer of the function
$\widetilde{f}_{p,2}$, there exists $\gamma>0$ independent of $p$ such that

$\displaystyle\mathbb{P}\Big{(}\sup_{\boldsymbol{w}^{\star}\in\widehat{\mathcal{S}}^{\star}_{p,1}}\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}^{\star})\right\rvert}\geq\frac{\lambda\gamma^{2}}{4}\Big{)}\overset{p\to\infty}{\longrightarrow}1.$
(98)

Next, we use the convergence in probability established in (91) and (93) to
show that the result in (98) produces a contradiction. To this end, note that
the following inequality is always valid

$\displaystyle\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}_{n,1}^{\star})\right\rvert}$
$\displaystyle\leq\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,1}(\boldsymbol{w}_{p,1}^{\star})\right\rvert}+\mathinner{\\!\left\lvert\widetilde{f}_{p,1}(\boldsymbol{w}_{p,1}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}_{p,1}^{\star})\right\rvert},$
(99)

which means that the following inequality is always true

$\displaystyle\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}_{p,1}^{\star})\right\rvert}$
$\displaystyle\leq\mathinner{\\!\left\lvert
O^{\star}_{p,2}-O^{\star}_{p,1}\right\rvert}+\sup_{\mathinner{\\!\left\lVert\boldsymbol{w}\right\rVert}\leq
C_{w}}\mathinner{\\!\left\lvert\widetilde{f}_{p,1}(\boldsymbol{w})-\widetilde{f}_{p,2}(\boldsymbol{w})\right\rvert}.$
(100)

Observe that the inequality derived in (100) implies that the following
inequality holds true

$\displaystyle\sup_{\boldsymbol{w}^{\star}\in\widehat{\mathcal{S}}^{\star}_{p,1}}$
$\displaystyle\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}^{\star})\right\rvert}\leq\mathinner{\\!\left\lvert
O^{\star}_{p,2}-O^{\star}_{p,1}\right\rvert}+\sup_{\mathinner{\\!\left\lVert\boldsymbol{w}\right\rVert}\leq
C_{w}}\mathinner{\\!\left\lvert\widetilde{f}_{p,1}(\boldsymbol{w})-\widetilde{f}_{p,2}(\boldsymbol{w})\right\rvert}.$
(101)

Now, based on (91), (92) and (93), the right hand side of (100), converges in
probability to zero. This means that the following convergence in probability
holds

$\displaystyle\sup_{\boldsymbol{w}^{\star}\in\widehat{\mathcal{S}}^{\star}_{p,1}}\mathinner{\\!\left\lvert\widetilde{f}_{p,2}(\boldsymbol{w}_{p,2}^{\star})-\widetilde{f}_{p,2}(\boldsymbol{w}^{\star})\right\rvert}\overset{p\to+\infty}{\longrightarrow}0.$
(102)

This contradicts with the result in (98). This means that for any
$\epsilon_{1}>0$ and $\epsilon_{2}>0$, there exists $p_{0}\in\mathbb{N}$ such
that for any $p\geq p_{0}$, we have that

$\displaystyle\mathbb{P}\Big{(}\sup_{\boldsymbol{w}^{\star}\in\widehat{\mathcal{S}}^{\star}_{p,1}}\mathinner{\\!\left\lVert\boldsymbol{w}^{\star}-\boldsymbol{w}_{p,2}^{\star}\right\rVert}_{2}<\epsilon_{1}\Big{)}\geq
1-\epsilon_{2}.$ (103)

This means that the following convergence in probability is true

$\mathbb{D}(\widehat{\mathcal{S}}^{\star}_{p,1},\widehat{\mathcal{S}}^{\star}_{p,2})\overset{p\to+\infty}{\longrightarrow}0,$
(104)

where $\mathbb{D}(\mathcal{A},\mathcal{B})$ denotes the deviation between the
sets $\mathcal{A}$ and $\mathcal{B}$ and is defined as
$\mathbb{D}(\mathcal{A},\mathcal{B})=\sup_{\boldsymbol{x}_{1}\in\mathcal{A}}\inf_{\boldsymbol{x}_{2}\in\mathcal{B}}\mathinner{\\!\left\lVert\boldsymbol{x}_{1}-\boldsymbol{x}_{2}\right\rVert}_{2}$.
This completes the proof of Lemma 5.

###  VIII-B Proof of Lemma 6: Additional Compactness

We start our prove by analyzing the feasibility sets of the primal formulation
in (28). Note that the optimal solution of the formulation given in (28) can
be expressed in closed form as follows

$\displaystyle\widehat{\boldsymbol{w}}_{p}=\left[\frac{1}{n\ell}\boldsymbol{K}^{\top}\boldsymbol{K}+\lambda\boldsymbol{I}_{k}\right]^{-1}\left(\frac{\boldsymbol{K}^{\top}\bar{\boldsymbol{y}}}{n\ell}\right),$
(105)

for a sufficiently large $C_{w}$. Here, the matrix
$\boldsymbol{K}\in\mathbb{R}^{n\ell\times k}$ is defined as follows

$\displaystyle\boldsymbol{K}=\widetilde{\mu}_{1}\bar{\boldsymbol{s}}\boldsymbol{\xi}^{\top}\boldsymbol{F}+\bar{\boldsymbol{G}}\boldsymbol{\Sigma}^{\frac{1}{2}}+\boldsymbol{T}\boldsymbol{\Gamma}^{\frac{1}{2}}.$
(106)

The matrices $\boldsymbol{\Sigma}$ and $\boldsymbol{\Gamma}$ are defined in
(34). Moreover, $\bar{\boldsymbol{y}}$, $\bar{\boldsymbol{s}}$ and
$\bar{\boldsymbol{G}}$ are formed by performing $\ell$ times concatenation of
$\widetilde{\boldsymbol{y}}=\boldsymbol{y}-\mu_{0}\vartheta\boldsymbol{1}_{n}$,
$\boldsymbol{s}$ and $\boldsymbol{G}$. Here,
$\boldsymbol{y}=\varphi(\boldsymbol{s})$ and $\boldsymbol{s}$,
$\boldsymbol{G}$ and $\boldsymbol{T}$ have independent standard Gaussian
components. Now, based on the results in [34] and Assumptions 4 and 5, there
exists a positive constant $C_{1}>0$ such that

$\displaystyle\mathinner{\\!\left\lVert\boldsymbol{K}\right\rVert}/\sqrt{n}\leq
C_{1},$ (107)

with probability going to $1$ as $p$ grows to $+\infty$. Therefore, there
exists a positive constant $C_{2}>0$ such that

$\displaystyle\sigma_{\text{min}}\Big{(}\big{[}\frac{1}{n\ell}\boldsymbol{K}^{\top}\boldsymbol{K}+\lambda\boldsymbol{I}_{k}\big{]}^{-1}\Big{)}\geq\frac{1}{C_{2}+\lambda},$
(108)

where $\sigma_{\text{min}}(\cdot)$ denotes the minimum eigenvalue. Now,
observe that

$\displaystyle\mathinner{\\!\left\lVert\boldsymbol{K}^{\top}\bar{\boldsymbol{y}}\right\rVert}^{2}=\widetilde{\mu}_{1}^{2}(\bar{\boldsymbol{s}}^{\top}\bar{\boldsymbol{y}})^{2}\boldsymbol{\xi}^{\top}\boldsymbol{F}\boldsymbol{F}^{\top}\boldsymbol{\xi}+\bar{\boldsymbol{y}}^{\top}\boldsymbol{B}\boldsymbol{B}^{\top}\bar{\boldsymbol{y}}+2\widetilde{\mu}_{1}(\bar{\boldsymbol{s}}^{\top}\bar{\boldsymbol{y}})\boldsymbol{\xi}^{\top}\boldsymbol{F}\boldsymbol{B}^{\top}\bar{\boldsymbol{y}},$
(109)

where
$\boldsymbol{B}=\bar{\boldsymbol{G}}\boldsymbol{\Sigma}^{\frac{1}{2}}+\boldsymbol{T}\boldsymbol{\Gamma}^{\frac{1}{2}}$.
Given that the random quantities $\boldsymbol{s}$, $\boldsymbol{G}$ and
$\boldsymbol{T}$ have independent standard Gaussian components, we have the
following

$\displaystyle\frac{1}{\ell
n}\boldsymbol{\xi}^{\top}\boldsymbol{F}\boldsymbol{B}^{\top}\bar{\boldsymbol{y}}\overset{p\to+\infty}{\longrightarrow}0.$
(110)

Moreover, using the weak law of large numbers and Assumptions 3 and 5, we
obtain the following asymptotic results

$\displaystyle\frac{\bar{\boldsymbol{s}}^{\top}\bar{\boldsymbol{y}}}{\ell
n}\overset{p\to+\infty}{\longrightarrow}\mathbb{E}[z\varphi(z)],~{}\boldsymbol{\xi}^{\top}\boldsymbol{F}\boldsymbol{F}^{\top}\boldsymbol{\xi}\overset{p\to+\infty}{\longrightarrow}\delta\mathbb{E}[\kappa].$
(111)

Combining this with Assumptions 3, 4 and 5, we obtain the following inequality

$\displaystyle\frac{1}{(\ell
n)^{2}}\mathinner{\\!\left\lVert\boldsymbol{K}^{\top}\bar{\boldsymbol{y}}\right\rVert}^{2}\geq\frac{1}{2}\widetilde{\mu}_{1}^{2}\delta\mathbb{E}[z\varphi(z)]^{2}\mathbb{E}[\kappa],$
(112)

valid with probability going to $1$ as $p$ grows to infinity. This shows that
there exists a positive constant $c_{w}>0$ such that

$\displaystyle\mathinner{\\!\left\lVert\widehat{\boldsymbol{w}}_{p}\right\rVert}\geq
c_{w},$ (113)

with probability going to $1$ as $p$ grows to infinity. Then, we can apply the
multivariate CGMT framework with the additional constraint in (113). Based on
this result and Assumption 4, there exists positive constants
$c_{\tau_{1}}>0$, $C_{\tau_{1}}>0$, $c_{\tau_{2}}>0$ and $C_{\tau_{2}}>0$,
such that the following convergence in probability holds

$\displaystyle\mathbb{P}(c_{\tau_{1}}\leq\widehat{\tau}_{1}\leq
C_{\tau_{1}})\xrightarrow{n\to\infty}1,~{}\mathbb{P}(c_{\tau_{2}}\leq\widehat{\tau}_{2}\leq
C_{\tau_{2}})\xrightarrow{n\to\infty}1,$ (114)

where $\widehat{\tau}_{1}$and $\widehat{\tau}_{2}$ are the optimal solutions
of the formulation in (LABEL:ana_fm7). This completes the proof of Lemma 6.

## References

  * [1] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: A simple way to prevent neural networks from overfitting,” _Journal of Machine Learning Research_ , 2014.
  * [2] C. M. Bishop, “Training with noise is equivalent to tikhonov regularization,” _Neural Computation_ , 1995.
  * [3] C. Gulcehre, M. Moczulski, M. Denil, and Y. Bengio, “Noisy activation functions,” ser. Proceedings of Machine Learning Research, 2016.
  * [4] D. LeJeune, H. Javadi, and R. Baraniuk, “The implicit regularization of ordinary least squares ensembles,” ser. Proceedings of Machine Learning Research, 2020.
  * [5] D. Kobak, J. Lomond, and B. Sanchez, “Optimal ridge penalty for real-world high-dimensional data can be zero or negative due to the implicit ridge regularization,” _arXiv:1805.10939_ , 2020.
  * [6] C. Gong, T. Ren, M. Ye, and Q. Liu, “Maxup: A simple way to improve generalization of neural network training,” _arXiv:2002.09024_ , 2020.
  * [7] A. S. Rakin, Z. He, and D. Fan, “Parametric noise injection: Trainable randomness to improve deep neural network robustness against adversarial attack,” _arXiv:1811.09310_ , 2018.
  * [8] B. Poole, J. Sohl-Dickstein, and S. Ganguli, “Analyzing noise in autoencoders and deep networks,” _arXiv:1406.1831_ , 2014.
  * [9] A. Rahimi and B. Recht, “Random features for large-scale kernel machines,” in _Advances in Neural Information Processing Systems 20_ , 2008.
  * [10] C. Thrampoulidis, E. Abbasi, and B. Hassibi, “Precise error analysis of regularized M-estimators in high-dimensions,” _arXiv:1601.06233_ , 2016\.
  * [11] C. Thrampoulidis, S. Oymak, and B. Hassibi, “Regularized linear regression: A precise analysis of the estimation error,” in _Proceedings of The 28th Conference on Learning Theory_ , Paris, France, 2015.
  * [12] M. Belkin, S. Ma, and S. Mandal, “To understand deep learning we need to understand kernel learning,” in _Proceedings of the 35th International Conference on Machine Learning_ , 2018.
  * [13] M. Belkin, D. Hsu, S. Ma, and S. Mandal, “Reconciling modern machine-learning practice and the classical bias–variance trade-off,” _Proceedings of the National Academy of Sciences_ , 2019.
  * [14] S. Mei and A. Montanari, “The generalization error of random features regression: Precise asymptotics and double descent curve,” _arXiv:1908.05355_ , 2019.
  * [15] F. Gerace, B. Loureiro, F. Krzakala, M. Mézard, and L. Zdeborová, “Generalisation error in learning with random features and the hidden manifold model,” _arXiv:2002.09339_ , 2020.
  * [16] O. Dhifallah and Y. M. Lu, “A precise performance analysis of learning with random features,” _arXiv:2008.11904_ , 2020.
  * [17] H. Hu and Y. M. Lu, “Universality laws for high-dimensional learning with random features,” _arXiv:2009.07669_ , 2020.
  * [18] A. Montanari, F. Ruan, Y. Sohn, and J. Yan, “The generalization error of max-margin linear classifiers: High-dimensional asymptotics in the overparametrized regime,” _arXiv:1911.01544_ , 2019.
  * [19] M. Mezard, G. Parisi, and M. Virasoro, _Spin Glass Theory and Beyond: An Introduction to the Replica Method and Its Applications_ , ser. World Scientific Lecture Notes in Physics. World Scientific, Nov. 1986, vol. 9.
  * [20] M. Stojnic, “A framework to characterize performance of lasso algorithms,” _arXiv:1303.7291_ , 2013.
  * [21] Y. Gordon, “On milman’s inequality and random subspaces which escape through a mesh in $\mathbb{R}^{n}$,” in _Geometric Aspects of Functional Analysis_ , 1988\.
  * [22] O. Dhifallah, C. Thrampoulidis, and Y. M. Lu, “Phase retrieval via polytope optimization: Geometry, phase transitions, and new algorithms,” _arXiv:1805.09555_ , 2018.
  * [23] F. Salehi, E. Abbasi, and B. Hassibi, “The impact of regularization on high-dimensional logistic regression,” in _Advances in Neural Information Processing Systems 32_ , 2019.
  * [24] H. Sifaou, A. Kammoun, and M. Alouini, “Phase transition in the hard-margin support vector machines,” in _2019 IEEE 8th International Workshop on Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP)_ , 2019, pp. 415–419.
  * [25] F. Mignacco, F. Krzakala, Y. M. Lu, and L. Zdeborová, “The role of regularization in classification of high-dimensional noisy gaussian mixture,” _arXiv:2002.11544_ , 2020.
  * [26] O. Dhifallah and Y. M. Lu, “Phase transitions in transfer learning for high-dimensional perceptrons,” _arXiv:2101.01918_ , 2021.
  * [27] G. An, “The effects of adding noise during backpropagation training on a generalization performance,” _Neural Computation_ , vol. 8, no. 3, pp. 643–674, 1996.
  * [28] V. Zantedeschi, M.-I. Nicolae, and A. Rawat, “Efficient defenses against adversarial attacks,” _arXiv:1707.06728_ , 2017.
  * [29] H. Kannan, A. Kurakin, and I. Goodfellow, “Adversarial logit pairing,” _arXiv:1803.06373_ , 2018.
  * [30] C. Wei, S. Kakade, and T. Ma, “The implicit and explicit regularization effects of dropout,” _arXiv:2002.12915_ , 2020.
  * [31] S. Kolouri, K. Nadjahi, U. Simsekli, R. Badeau, and G. K. Rohde, “Generalized sliced wasserstein distances,” _arXiv:1902.00434_ , 2019.
  * [32] S. Goldt, B. Loureiro, G. Reeves, F. Krzakala, M. Mézard, and L. Zdeborová, “The gaussian equivalence of generative models for learning with shallow neural networks,” _arXiv:2006.14709_ , 2020.
  * [33] S. Goldt, M. Mézard, F. Krzakala, and L. Zdeborová, “Modelling the influence of data structure on learning in neural networks: the hidden manifold model,” _arXiv:1909.11500_ , 2020.
  * [34] M. Rudelson and R. Vershynin, “Non-asymptotic theory of random matrices: extreme singular values,” _arXiv:1003.2990_ , 2010.
  * [35] R. T. Rockafellar and R. J.-B. Wets, _Variational Analysis_. Springer-Verlag Berlin Heidelberg, 1998.
  * [36] M. Sion, “On general minimax theorems.” _Pacific J. Math._ , vol. 8, no. 1, pp. 171–176, 1958.
  * [37] M. Debbah, W. Hachem, P. Loubaton, and M. de Courville, “MMSE analysis of certain large isometric random precoded systems,” _IEEE Transactions on Information Theory_ , vol. 49, no. 5, pp. 1293–1311, 2003.
  * [38] W. K. Newey and D. McFadden, “Chapter 36 large sample estimation and hypothesis testing,” ser. Handbook of Econometrics. Elsevier, 1994, vol. 4, pp. 2111 – 2245.
  * [39] C. Thrampoulidis, W. Xu, and B. Hassibi, “Symbol error rate performance of box-relaxation decoders in massive MIMO,” _IEEE Transactions on Signal Processing_ , vol. 66, no. 13, p. 3377–3392, Jul 2018.
  * [40] R. L. Schilling, _Measures, Integrals and Martingales_. Cambridge University Press, 2005.


# Online Fashion Commerce: Modelling Customer Promise Date††thanks: Supported
by GSF grants ABC123, DEF456, and GHI789.

Preethi V Myntra Designs, India. Nachiappan Sundaram Ericsson, India. Ravindra
Babu Tallamraju Myntra Designs, India.

###### Abstract

In the e-commerce space, accurate prediction of delivery dates plays a major
role in customer experience as well as in optimizing the supply chain
operations. Predicting a date later than the actual delivery date might
sometimes result in the customer not placing the order (lost sales) while
promising a date earlier than the actual delivery date would lead to a bad
customer experience and consequent customer churn. In this paper, we present a
machine learning-based approach for penalizing incorrect predictions
differently using non-conventional loss functions, while working under various
uncertainties involved in making successful deliveries such as traffic
disruptions, weather conditions, supply chain, and logistics. We examine
statistical, deep learning, and conventional machine learning approaches, and
we propose an approach that outperformed the pre-existing rule-based models.
The proposed model is deployed internally for Fashion e-Commerce and is
operational.

Keywords— LightGBM, asymmetric loss, quantile regression, breach control
model, fbprophet, lstm

##  1 Introduction.

The outbound supply chain consists of various stages such as procurement from
the vendor, warehouse processing, linehaul shipping, and delivery from the
last-mile center. The supply chain and logistics-related findings from PwC[2]
show that 39% of the customers want their goods delivered within 2 days, while
50% consider 3-5 days as acceptable. However, it is important to have better
predictability over speed[2]. Predicting delivery dates accurately at the time
of order placement is one of the biggest challenges in the e-commerce space,
given the uncertainties involved in each of the supply-chain legs. Once an
order is placed, a promise date for delivery is given to a customer based on
the expected time taken at every leg. The uncertainties at various stages
include traffic, weather conditions, curfew, etc. The additional factors that
can be modeled include delays due to holidays, weekends, pendency from an
increased load, office location deliveries on weekends. A shipment delivered
after a promised date leads to a breach resulting in a bad customer
experience.

In a large developing country like India, building a strong supply chain
network capable enough to reach all remote parts of the country on time is a
challenge due to limited infrastructure availability in certain parts of the
country, unexpected traffic, road blockages, weather conditions, and variable
holiday patterns. PwC study showed that retailers are moving from large
distribution centers in the heartland to smaller ones close to population
centers[2]. Myntra has also strategically located the last-mile centers based
on demand concentration, thereby ensuring that the majority of delivery
requirements are met by myntra logistics (ML). However, support from third-
party logistics (3pl) is imperative to reach the remote parts of the country
and places where the demand is less. This adds to the uncertainties, as we do
not have clear visibility into the 3pl partners’ network in terms of transit
hub111A hub is the distribution center where shipments are collected, sorted,
and reloaded. and last-mile center locations, manpower, and their load from
other vendors. There are also challenges arising from limited data
availability for low-demand regions and operational variability during fixed
and flexible holidays, and weekends at the pick-up, transit, and last-mile
locations.

In the fashion industry, since it is necessary to have a variety of products
to meet a varied set of customers with differing needs, the individual stock-
keeping-unit (SKU) depth (stock available for each item) tends to be low. The
demand needs to be met by a small number of warehouses where goods are stored
as well as processed and also by fulfillment centers to cover regional demand.
Strategically distributing the SKUs across them is challenging. Thus, there
might be cases where the fulfillment cannot be done from the nearest
fulfillment center or warehouse. This leads to a longer linehaul and
subsequently more uncertainties resulting from traffic congestion, hub wait
times, and regional holidays in transit hubs.

Promised delivery times are also affected by hard-to-decipher customer
addresses, as the addresses may not follow a predefined structure. Incomplete
addresses, spell variations, and avoidable additional text such as directions
to reach the address, times of their availability pose challenges in automated
address clustering models[1] designed to ease delivery. Thus quick and
successful delivery depends on address validity.

Predicting delivery times during high revenue days (HRD) is another big
challenge, as the variability in delivery times would be relatively higher and
the shipping cutoffs at the transport and dispatch hubs may not be adhered to.
The prediction has to be made based on past HRD events, which typically happen
only a couple of times in a year. There would be changes happening in the
supply chain since past events’ occurrence, for instance, opening, merging,
and closing of delivery centers, dispatch hubs, process changes, change in
revenue targets, etc. Thus, planning data such as volume and capacity plans at
various supply chain touchpoints play a major role in predicting delivery time
accurately in case of HRD. Delivery time accuracy is thus also influenced by
the accuracy of plan numbers.

In this paper, we briefly describe how accurately predicted times could help
in examination of unexpected delays and processing rate changes thus enabling
optimisation of the supply chain operations. We compare time series, deep
learning and machine learning-based approaches for the current problem. We
also examine asymmetric loss functions to meet the business constraint of
keeping breaches under control as the cost of a breach is higher than the cost
of promising a date much later than the actual delivery date. We also
demonstrate the effectiveness of this solution for a large-scale Indian
e-commerce company.

In the next section, we briefly describe research work related to the current
problem. Section 3 contains problem description and challenges. Section 4
discusses various methodologies applied to solve the problem and concludes on
the proposed solution. We present the results of various modeling approaches
and real-world deployments in Section 5 and, conclusions and further work in
Section 6.

##  2 Related Work.

In this section, we briefly review the existing work on delivery time
prediction. Ravindra Babu, et al.[1] describe a classification approach to
assign addresses to area-codes, based on the address-text. They describe the
impact of unstructured, incorrect, or incomplete addresses on the accuracy of
classification. Such addresses can impact the on-time delivery of products,
especially in India, where addresses do not follow a regular format like in
the Western-world. Jeff Berman[2], discusses customer expectations. Customers
have become accustomed to getting products as and when they want them, which
creates challenges for the supply chain. Faster deliveries need a high degree
of alignment at the supplier, storage, transport, and manpower levels, which
can be expensive. Predictions from models, whether rule-based or data-driven,
can be erroneous. The predicted delivery date can fall before or after the
actual delivery date. The former error is more detrimental for the company
(late deliveries) and should be penalized more as compared to the latter
error. Models that we build should capture this asymmetry[3].

In [4], authors talk about predicting lead times for made-to-order industrial-
grade equipment. Here, numerous categorical variables affecting times were
reduced using the PCA technique. The random forest model gave the best
accuracy. In [5], shipping time between factory to port in two continents is
predicted using the Random forest model by taking into account port congestion
and a major holiday. In this study, it is shown that as the shipment gets
closer to the destination, MAE reduces and random forest performs similar to
traditional approaches. In almost all the problems, the value lies in the
ability to make correct predictions right at the origin time, as customers
would not prefer to see updated times at every stage. In [8], the authors
predict purchase order fulfillment times using random forest and quantile
regression forests. In this paper, dimension reduction technique has been
applied to identify the most influential levels of categorical variables
similar to [4]. This paper explores tree-based models, time series and deep-
learning based approaches to model delivery times end-to-end, while also
demonstrating the use of custom loss functions and feedback-based breach
control model to handle asymmetry.

##  3 Problem Description and Challenges.

The objective of the current problem is to accurately predict delivery dates
at the time of order placement. Once an order is placed, the item has to
traverse through various touchpoints in the supply chain before reaching the
customer’s location.

The order processing starts from getting the goods from the vendors in case
items are not available in the warehouse. The order fulfillment time from the
vendor would vary based on the item availability, vendor processing speed,
transportation time and related delays, use of co-loader vehicles, and weekend
delays due to reduced manpower. It would also depend on the designated times
at which the purchase order could be issued and goods can be picked up in a
day. Further processing is done at the warehouse.

The order processing starts at the warehouse for items available in the
warehouse and there is no vendor processing leg involved for such items. It
broadly involves the activities of picking, consolidation, and packing. An
uncertain delay is introduced because of wait times for multi-item packets,
cascading effect resulting from occasional choking in one or more previous
stages, pendencies due to warehouse closure, delays due to working-shift
changes, variable manpower during weekends and flexible holidays, etc.

Figure 1: Order processing stages

Subsequently, a shipment traverses through a sequence of hubs where transit
time is influenced by traffic congestion, weather conditions, hub wait times
until shipping cutoff, regional holidays in transit hubs, etc.

When the packet reaches the last-mile hub, one of the factors causing delay is
variable manpower on holidays and weekends. Each holiday duration depends on
the nature of the holiday such as religious festivals. The delay in packet
delivery is a function of current pendency, available manpower, customer
availability, and deliverability of an address. However, it is difficult to
localize which packets would be delivered late as it depends on customer
availability and delivery re-attempt. The order processing stages are
summarized in Figure 1.

##  4 Proposed Solution.

We propose to solve this problem in three stages. The following is the set of
models built for predicting the processing time involved in various supply-
chain legs:
Vendor procurement model: The time taken from order placement to shipping is
predicted using this model. This is applicable only for items not stored in
the warehouse. This time is modeled using LightGBM[6] and explained in Section
4.8.
Warehouse model: This model predicts the time taken from order placement to
shipping only for items stored in the warehouse. This time is modeled using
time series (fbprophet[9]) and LightGBM as described in Section 4.6.2.
Shipping time model: This model predicts the time taken to reach customer
location after shipping referred to as the shipping time. This constitutes the
linehaul and last-mile times as indicated in Figure 1. The shipping time for
ML during Business As Usual(BAU) days is predicted using tree-based models,
time-series, and deep learning-based approaches. Tree-based models, namely,
LightGBM, Random forest, and XGBoost are described in Section 4.2. The time
series modeling approach using fbprophet is described in Section 4.6.1. The
Deep-learning based approach (LSTM) is explained in Section 4.7. The shipping
time for HRD is modeled using LightGBM and explained in Section 4.3. Shipping
time for 3pl partners is modeled using LightGBM and explained in Section 4.4.
The various methods used to control breaches such as asymmetric custom loss
function, quantile regression, and feedback-based breach control model are
discussed in Section 4.5.

At the time of order placement, we propose to give the delivery date to the
customer by adding the outputs from the Warehouse model and Shipping time
model to the order placement time for items stored in the warehouse. In case
of items not stored in the warehouse, the outputs from the Vendor procurement
model and Shipping time model will be added to the order placement time.

In this section, we initially present the rule-based model which was
operational before the proposed model. Subsequently, we discuss tree-based
models for predicting the shipping time of ML and 3pl. The modeling approach
for HRD is also described. We then describe ways to control breaches. We
discuss time series models to predict shipping time and warehouse time.
Subsequently, we present the LSTM model to predict shipping time and the tree-
based model to predict vendor procurement time. Then, we briefly discuss
applications in supply-chain optimization.

###  4.1 Rule-based model to predict delivery time.

In the past, a rule-based model was used to predict delivery times. At the
level of vendor-warehouse, vendor processing times are configured. Similarly,
at a warehouse level, processing times are configured for each of the
warehouse legs. In the case of linehaul, the hop-to-hop times are configured
and static last-mile center processing time is added. Each of these times is
mapped to the nearest shipping cutoffs wherever appropriate. Fixed additional
processing times are added for weekends and holidays. Thus, rule-based model
doesn’t adapt based on recent performance changes and is designed based on
heuristics.

###  4.2 Tree-based models to predict shipping time for Business As Usual(BAU)
days.

####  4.2.1 Model choice.

We examined LightGBM[6]. It has the ability to represent categorical features
with a large set of levels. The current problem involves categorical features
with up to hundreds of levels, which blow up the feature space when one-hot
encoded. The selection of optimal split points in tree-based models would thus
consume a large amount of time and we may not be able to meet the latency
requirements. LightGBM uses exclusive feature bundling to optimally bundle
mutually-exclusive features. This works especially when the feature space is
sparse as in the case of one-hot encoded features.

Time consumed for the selection of optimal split points is also directly
proportional to the number of training examples. Given the huge number of
orders placed in the last few weeks before prediction, it is necessary to
reduce the number of training examples without hurting accuracy. Gradient-
based one-side sampling[6] achieves this by randomly-sampling instances with
smaller gradients while not changing the data distribution (using weights).
Thus, the instances with larger gradients are majorly used to determine the
split points. Random forest and XGBoost models were also built on the dataset.

####  4.2.2 Model features.

Following are the broad list of features considered to take into account
various factors affecting shipping time:
Historical times and pendencies: The pendency in the linehaul and last-mile
plays a major role in determining accurate times. The performance would vary
for each logistic lane and last-mile center, which is modeled using
statistical measures. Pendency is modeled using the recent inflow and outflow
of shipments.
Geographical features: The geographical location level features of customer
addresses such as city tier, address type (home or office), area to name a few
play an important role in determining delivery time. This helps the model to
learn the patterns in time by aggregating geographical locations and thus
generate near-accurate predictions for locations with limited training data.
Load features: The expected load at various touchpoints plays a key role in
determining delays. The on-ground order and ship volumes from the past days
play a major role in determining pendencies at all further stages in the
supply chain process.
Manpower features: Various manpower types available at the last-mile center
are modeled individually to capture productivity and process differences.
Last-mile performance features: Arrival, delivery volumes and performance at
the last-mile center on the past days are modeled taking into account
cumulative pendency from past days.
Holiday type and seasonality features: The transit hub and last-mile center
holidays are captured using these features. Sudden change in the manpower,
arrival, and delivery volumes at the last-mile center might occur due to full
or partial closures on holidays/weekends or varied outflow on some weekdays.
Hence, the holiday and weekday types are included as features so that the
model can effectively learn the relationships between variables.

####  4.2.3 Model tuning.

The examples are weighted using a decaying weighting function as the most
recent supply chain operations have a greater impact on current delivery
times. As the LightGBM model tends to overfit, we tuned various parameters as
indicated in Table 1. The validation set has to be carefully chosen in a time
series context as it should be similar to the test set in terms of order day
and also meet the recency criteria in this case.

Table 1: Parameter tuning for LightGBM Metric |  | Final
---
Value
| Default
---
Value
| Parameter value
---
list
| Boosting
---
iterations
1000 | - |  | [1000, 1500, 2000, 2500]
---
| Tree
---
depth
-1 | -1 | [4, 5, 8, -1]
| Number
---
of leaves
15 | 31 | [15, 31, 63, 127]
| Data
---
fraction
0.6 | 1.0 | [0.6, 0.7, 0.8, 1.0]
| Feature
---
fraction
0.6 | 1.0 | [0.6, 0.7, 0.8, 1.0]

####  4.2.4 Holiday and weekend handling times.

Weekends and holidays play a major role in determining delivery times. Every
last-mile center behaves differently on different holidays based on the
holiday type(fixed or flexible), the intensity of the holiday in that region,
and the adjacency of the holiday to a weekend. Weekend behavior also differs
for every last-mile center. The effect of holiday or weekend is modeled by
selecting the most recent similar holidays(based on absenteeism rates) or
weekends. The proxy holidays/weekends are then compared with BAU days that lie
close to them. The chosen BAU days are subjected to outlier treatment.
Statistical measures that are robust against outliers are used to compare and
subsequently derive holiday and weekend handling times.

###  4.3 Tree-based model to predict shipping time for HRD.

Delivery times of orders placed on both HRD and post-HRD days are influenced
by huge pendencies at various supply chain touchpoints. Accurate delivery time
prediction lies in the ability to accurately project pendencies into the
future, apart from modeling other factors such as manpower, capacity, volume,
holiday, weekend effects, etc.

####  4.3.1 Modeling approach.

LightGBM model is trained using sale and post-sale data on the proxy and pre-
proxy days taken from the recent sale event. The proxy day is chosen based on
the number of days elapsed from the start of the sale until the prediction
date. The planning data for the upcoming event is fed as input to the model
along with the on-ground performance features derived from the past days of
the sale. This enables the model to correct itself based on recent data in
case of deviation from the plan.

####  4.3.2 Model features.

Apart from the features considered for a BAU day, the following are the
additional set of features considered to take into account various factors
affecting shipping time during HRD
Planned volume and capacity features: The planned ship volume is modeled by
combining sources appropriately to project landings at subsequent supply chain
touchpoints. The planned last-mile capacity is indicative of the processing
capability or cumulative outflow.
Pendency features: Three major components contribute to the delivery time once
shipments arrive at the delivery center – arrival volume on the predicted
landing date, pendency accumulated from the days prior to the predicted
landing date, and delivery center outflow modeled using capacity plan data.
These features are modeled using three different data sources or methods. In
addition to modeling using plan data, most recent delivery center performance
is captured as the event progresses and arrival volume and pendency at the
delivery center is projected on the landing day using recent order and ship
volume data, in order to combat any deviation from the plan.

###  4.4 Tree-based model to predict 3pl shipping time.

LightGBM is used to model the shipping time for 3p courier partners. The
holiday and weekend behavior at the pickup location as well as at the 3pl
last-mile center was handled using the methodology described earlier based on
the regional holiday calendar of the courier partners. However, some of the
factors influencing shipping time as described above cannot be explicitly
captured in the case of 3pl as we are not aware of the last-mile center
locations, corresponding pincode mapping and arrival times. Pincode decoding
is used to predict times for low-demand regions where limited or no recent
data is available.

###  4.5 Methods to control breaches.

####  4.5.1 Asymmetric loss functions.

Most machine learning models operate by default on loss functions that are
minimized by central tendencies, either the mean or the median. The sum of
squared residuals has its minimum at the mean, while the sum of absolute
residuals is minimized by the median. Here, the goal is to penalize
underestimations, that is when the predicted time is less than the actual
time. A penalization factor is applied for the negative residuals on the
default MSE (mean square error) loss[3]. The minimization of this loss
function is indicated in equation(4.5.1).

$\displaystyle
e_{i}(\beta)=\begin{cases}\alpha(y_{i}-f(\beta,X_{i})),&\text{if
}y_{i}>f(\beta,X_{i})\\\ (y_{i}-f(\beta,X_{i}))&\text{otherwise}\end{cases}$
(4.1)
$\displaystyle\beta^{*}=\operatorname*{argmin}_{\beta}\left(\frac{1}{n}\sum_{i}{e_{i}}^{2}(\beta)\right)$

The problem in using any asymmetric loss function of the above type is that
predictions are still aimed at the expected value. We need to get at a
prediction that is greater than the true value by a specified probability,
that is, the breach cut-off. Multiplying the prediction obtained using MSE
loss by a factor does not help us get at the desired result, as the central
tendencies and higher percentiles are not linearly related.

####  4.5.2 Quantile regression.

To maintain breaches below a specified percentage, we need to be able to
predict the quantile of the probability distribution of future times. One way
would be to get the full predictive densities and pick the desired quantile.
However, the more powerful algorithms only give point predictions.

Quantile regression[7] is a modeling approach that aims to predict the
percentiles by optimizing an objective that has its minimum at the specified
quantile. The quantile loss function is the sum of asymmetrically weighted
absolute residuals. The minimization of this loss function is shown in
equation(4.2) and the loss function is visualized in Figure 2. The solution to
the below equation is the estimate of the conditional quantile function.
LightGBM supports quantile regression which can be specified using the
objective parameter.

(4.2)
$\beta^{*}=\operatorname*{argmin}_{\beta}\sum_{i}\rho_{\tau}(y_{i}-f({X_{i}},\beta))$

Figure 2: Quantile loss function[7]

####  4.5.3 Feedback-based Breach control model design.

In this approach, we built a feedback mechanism to correct the output from the
LightGBM model (with default MSE loss function). We feed the predictions made
in the last few days as input to a breach control model, along with the
corresponding weekend, holiday handling times, holiday, seasonal features, and
statistical measure-based features used to capture variations in linehaul and
last-mile time. The target is constructed as a weighted combination of
linehaul standard deviation, the mean and standard deviation of packet inflow
and outflow at the last-mile. These weights are tuned based on past model
performance to get the breaches below the specified percentage at a delivery
date level. Model training is done on this dataset with ideal additional times
as the target to predict the optimal time required to get breaches just below
the desired level.
The output from this model is added to the predictions made by the LightGBM
model.

###  4.6 Time-series modeling approach.

####  4.6.1 Time series model to predict shipping time.

In order to model time-dependencies, we used the time series approach. The
Fbprophet model handles trend, seasonality, and holiday effects that occur on
irregular schedules as indicated in equation(4.3). It can be seen from the
weekly seasonality plot shown in Figure 3222The y-axis numbers are hidden to
not reveal internal business numbers. that the shipping times are higher for
orders shipped on Thursday, in case of short lanes, and for orders shipped on
Monday and Tuesday, in case of longer lanes. This pattern is seen as these
shipments would typically land in the last-mile center on a weekend. The
changepoint prior scale parameter helps determine how flexible the trend
should be. This parameter was tuned to avoid overfitting. Cap and floor
parameters were set to specify the range within which the predictions can lie.
Regional holiday list was inputted. The data were sampled based on hourly
frequency. Predictions were made at an hourly level and the upper end of the
prediction interval was used as the final result to control breaches. The
model fitting is shown in Figure 42. Black dots indicate training data/known
target values. The blue line indicates the predictions made on the train and
test data. The blue shaded region indicates the interval for the predictions.

(4.3) $y(t)=g(t)+s(t)+h(t)+\epsilon_{t}$

Figure 3: Trend, weekly and daily seasonality plots for short and long lanes
Figure 4: Fbprophet model fitting for a short versus long lane.

####  4.6.2 Time series model to predict warehouse time.

Fbprophet model was used to predict the warehouse processing time. The time
taken from order placement to pick is shown in Figure 52. The periodic
patterns are seen due to shift timings. Models were built separately for
single-item and multi-item orders as multi-item packets have an additional
wait time involved to consolidate all items. The seasonal effects by the hour
and day of the week are captured by the fbprophet model as the model is built
on the past few weeks of data. The time-series data was resampled based on
minute-level frequency. Re-training is done every hour to capture the recent
changes and predictions are made at a minute level for the next hour.

Figure 5: Time series for Warehouse processing leg (Order placement to pick)

As the warehouse processing time is small even when compared to a short lane,
the model was able to capture recent changes effectively and provide accurate
real-time predictions. A LightGBM model was also built using the projected
load, multi-item based, seasonal and performance-based features.

###  4.7 Deep-learning based approach.

####  4.7.1 LSTM model to predict shipping time.

LSTM is a powerful recurrent neural network that handles sequence dependence
among input variables. The network was designed to have 7 LSTM blocks in the
hidden layer to capture seasonality. This LSTM network was trained for 300
epochs using a batch size of 100. The lookback value was chosen to cover few
weeks after tuning. The other relevant features affecting shipping time were
also included. From Figure 6, we can see that the model is able to fit the
dataset well.

Figure 6: LSTM loss and performance on the validation set

###  4.8 Tree-based model to predict vendor procurement time.

LightGBM was used to model the time taken to procure the items not available
in the warehouse from the vendor and subsequently ship the items. Several
features were built including vendor type, features based on designated hours
at which purchase order is generated and the times at which pick up happens,
location and route-based features, seasonality features, the maximum time
allowed to process a purchase order, and pick up in coloader vehicles.

###  4.9 Supply-chain optimization.

Modeling delivery times accurately not only helps in improving customer
experience and reducing customer churn but also in providing business insights
to optimize the supply chain operations. When the on-ground processing time
shows deviation from the predicted time, it can be used to flag and
subsequently correct unexpected pendencies or delays at an early stage.
Analysis on last-mile center processing speed showed that making all delivery
attempts within a fixed time duration post arrival would help in reducing
breach. This further enables us to provide more accurate times.

##  5 Experimental Results.

In this section, we discuss the experimental results, where we considered a
large dataset for training and evaluation. We examine various models such as
variants of LightGBM, XGBoost, Random forest, LSTM, and time series models,
and compare the performance with the current baseline of rule-based models. We
also present results for HRD and different linehauls. We summarise the results
for various supply chain legs such as Warehouse, Shipping(3pl), and Vendor
procurement.

###  5.1 Data.

The training data constitutes deliveries made in the last few weeks prior to
the prediction date amounting to more than a million training examples and the
testing is done on the orders placed on the subsequent day.

###  5.2 Evaluation metrics.

Accuracy is measured as the percentage of total packets ordered in a day that
get delivered on the same day(0) as the promise date or the previous day(-1)
and is denoted as Accuracy(0 to -1). Breaches refer to the percentage of total
packets ordered in a day that get delivered after the promised date. These are
delivery date-based metrics measured at an order-day level.

###  5.3 Results.

Table 2 shows order-day level metrics averaged over a period of one week in
the month of September, thus covering weekend effects. The results cover all
possible lanes amounting to around thousands and correspond to only items
stored in the warehouse. The models mentioned in the table were used to
predict shipping time. The time from order placement to shipping is taken from
the rule-based model.

Table 2: Comparison of model performance covering all possible lanes on Business As Usual(BAU) days Model |  | Accuracy
---
Breach
| LightGBM (Quantile
---
regression)
68.10% | 4.68%
| LightGBM (Asymmetric
---
loss function)
61.54% | 5.50%
| LightGBM
---
(with breach control model)
58.30% | 3.90%
| XGBoost
---
(with breach control model)
58.13% | 3.82%
| LSTM
---
(with breach control model)
57.25% | 6.20%
| Random forest
---
(with breach control model)
55.45% | 3.85%
| Time series model
---
(fbprophet)
40.30% | 2.74%
| Rule-based model
---
(Baseline)
36.56% | 5.63%

It can be seen from Table 2 that the quantile regression approach achieved the
highest accuracies, almost doubling the accuracy achieved using the baseline
model, while also reducing the breaches. LightGBM trained with asymmetric loss
function resulted in relatively higher breach, next to the rule-based model.
Though the penalization factor was tuned, breaches could not be
deterministically controlled using this approach. LightGBM in conjunction with
the breach control model has achieved relatively a lower breach while taking a
slight hit on accuracy. The breach control model is trained based on breaches
at a delivery date level to meet recency criteria. For every order date, the
factors are tuned to meet breach constraints at all the delivery dates when
those shipments landed. The factor tuning is thus also influenced by
performance on other order dates. Therefore, this method gives a more
conservative breach result. LightGBM model accuracy is slightly higher than
that achieved using XGBoost, while model training with LightGBM was 8x times
faster. The Random forest model provided lower accuracies when compared to
both LightGBM and XGBoost models.

Table 3: Comparison of model performance covering all possible lanes on HRD and post-HRD days Model |  | Accuracy
---
Breach
| LightGBM - HRD
---
65.15% | 7.86%
| LightGBM - Post-HRD
---
74.58% | 4.82%
| Rule-based model - HRD
---
44.23% | 5.44%
| Rule-based model - Post-HRD
---
54.48% | 3.06%

Table 3 shows order-day level metrics averaged over the HRD and post-HRD days
in the month of December. Accuracy(0 to -2) is the performance metric measured
in the case of HRD as predictability is more challenging compared to BAU days.
The results cover all possible lanes and correspond to both items stored in
the warehouse as well as those procured from the vendor. The models mentioned
in the table were used to predict shipping time. The time from order placement
to ship is assumed to be known to indicate the performance of the shipping
time model without considering the inaccuracies resulting from the pre-ship
leg. Note that since the breaches at the warehouse side are controlled during
HRD, the breaches at the time of order placement were still under control
despite a slightly higher breach percentage on the shipping leg. It can be
seen from Table 3 that the best LightGBM implementation achieved an
improvement of more than 20 percentage points over the baseline model in the
case of both HRD and post-HRD days.

Table 4: Comparison of model performance for a short versus long lane Model |  | Short Lane
---
(Delhi - Gurugram)
| Long lane
---
(Delhi - Kolkata)
| Accuracy
---
Breach |  | Accuracy
---
Breach
| Time-
---
series
83.55% | 0.52% | 50.34% | 2.54%
LSTM | 83.55% | 0.52% | 70.65% | 7.24%
| Light-
---
GBM
83.55% | 0.43% | 75.26% | 5.28%

The comparison of LSTM (in conjunction with breach control model), fbprophet
(Time series model), and LightGBM (Quantile regression implementation) models
was carried out for a short versus long lane as shown in Table 4. It describes
order-day level metrics averaged over a period of one week in the month of
September and corresponds to only items stored in the warehouse. LSTM and
fbprophet worked on par with LightGBM in the case of shorter lanes. While for
longer lanes, the time series model has to predict much farther into the
future due to non-availability of recent target values. This can be seen in
Figure 42. This leads to reduced confidence in the predictions. Fbprophet
picked up recent trend changes and made predictions much ahead into the future
based on these changes, thus resulting in overfitting. In the supply chain
problem, the recent past has an impact only on the immediate future but the
effect fades away as we go into the future. The LightGBM model tends to
average out the effects while taking into account the potential effect from
other factors on the prediction day. In the case of LSTM as well, predictions
much ahead into the future are made based on existing predictions. However, it
performed much better than the time series model. The results follow a similar
pattern across all lanes as shown in Table 2.

Table 5: Comparison of Model Performance for the various supply chain legs | Supply
---
chain leg
Metrics |  | Rule-
---
based
| Time
---
series
| Light-
---
GBM
Ware- house |  | Accuracy
---
82.23% | 88.19% | 86.20%
Breach | 3.79% | 6.54% | 5.32%
Shipping (3pl) |  | Accuracy
---
9.41% | - | 55.52%
Breach | 1.24% | - | 3.70%
Vendor - customer |  | Accuracy
---
8.65% | - | 40.84%
Breach | 1.34% | - | 5.06%

The results shown in Table 5 are also reported at an order-day level by
averaging over a period of one week. In the case of 3pl, the models mentioned
in the table were used to predict shipping time. The time from order placement
to shipping is taken from the rule-based model, similar to the reporting done
in Tables 2 and 4. For the warehouse leg, the accuracy and breaches are
reported for the predicted ship date (time from order placement to ship is
predicted by the models mentioned in the table). These results correspond to
only items stored in the warehouse. The results reported against vendor -
customer are accuracies and breaches for the predicted delivery date. These
results correspond to only items not stored in the warehouse as the vendor
procurement stage is applicable only for such items. The models mentioned in
the table are used to predict the time taken from order placement to shipping
and the time taken after shipping to reach the customer is taken from the best
LightGBM implementation. As the warehouse and vendor procurement models are in
the early stages, we have reported the metrics in Tables 2 and 4 by taking the
time until shipping from the rule-based model.

It can be seen that the fbprophet model has resulted in an accuracy
improvement of 6 percentage points over the rule-based model. The breaches are
slightly higher as no breach control mechanism is applied at the warehouse
processing leg, it is compensated for when combined with predicted times of
other order processing legs. It also performed slightly better than the
LightGBM model in this case, as the recent changes in performance could be
captured to give accurate predictions. The LightGBM model for 3pl has achieved
a 45% jump in accuracy while working under the constraints imposed by 3pl
data. Again in the case of vendor processing time where we do not have
complete control, accuracy has improved by 31%, with a breach percentage
slightly above the cutoff level.

##  6 Summary.

Promise time computation is a challenging problem in e-commerce given
uncertainties at various stages such as variability in vendor processing time,
consolidation wait time, pendencies and additional uncertainties at the
warehouse, traffic disruptions, weather conditions and hub wait times during
linehaul, pendency, manpower variation, and customer availability at last-
mile, regional holiday and weekend effects at all of the above legs. We
propose a solution that integrates all these aspects. The solution is deployed
and operational for Myntra. In the paper, we discuss the challenges in detail
and provide empirical evidence through data analysis. We have considered a
number of models before zeroing on the final solution such as multiple
variants of LightGBM, XGboost, Random forest, time series model (fbprophet),
and deep learning approaches. We have carried out elaborate experiments on
more than a million patterns and compared a range of approaches covering these
models, while also specifying methods to meet the business constraints using
asymmetric loss functions and a feedback-based breach control model. The
LightGBM implementation of quantile regression gave the best results among the
chosen models, almost doubling the accuracy achieved with the baseline model.
We have proposed a model for handling high revenue days, where predictability
is more challenging due to higher variability in times, deviation from the
plan, and process changes. We also built a promise time prediction model for
3pl. As future work, we propose to enhance vendor procurement and warehouse
models and comprehensively provide end-to-end predictability.

## References

  * [1] T. Ravindra Babu, Abhranil Chatterjee, Shivram Khandeparker, A. Vamsi Subhash, and Sawan Gupta.  Geographical address classification without using geolocation coordinates.  In Proceedings of the 9th Workshop on Geographic Information Retrieval, GIR ’15, New York, NY, USA, 2015. Association for Computing Machinery.
  * [2] Jeff Berman.  Logistics management.  2017\.
https://www.logisticsmgmt.com.

  * [3] Peter F Christoffersen and Francis X Diebold.  Further results on forecasting and model selection under asymmetric loss.  Journal of applied econometrics, 11(5):561–571, 1996.
  * [4] Halim Douglas, Hartman Alexander, Jariwala Aditya, Mohan Rishabh, and Matthew A. Lanham.  Delivery time estimation for industrial equipment.  2018\.
https://krannert.purdue.edu.

  * [5] Antoine Jonquais and Florian Krempl.  Predicting shipping time with machine learning.  2019\.
  * [6] Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu.  Lightgbm: A highly efficient gradient boosting decision tree.  In Advances in neural information processing systems, pages 3146–3154, 2017.
  * [7] Roger Koenker and Kevin F Hallock.  Quantile regression.  Journal of economic perspectives, 15(4):143–156, 2001.
  * [8] Jundi Liu, Steven Hwang, Walter Yund, Linda Ng Boyle, and Ashis G Banerjee.  Predicting purchase orders delivery times using regression models with dimension reduction.  In ASME 2018 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference. American Society of Mechanical Engineers Digital Collection, 2018.
  * [9] Sean J Taylor and Benjamin Letham.  Forecasting at scale.  The American Statistician, 72(1):37–45, 2018.