The Consumer Price Index (CPI) is a measure of the average change over time in the prices paid by the common consumer for a known basket of goods and services. The CPI attempts to quantify and measure the average cost-of-living in a given country by estimating the purchasing power of a single unit of currency. Therefore, it is the key macroeconomic indicator for measuring inflation (or deflation). As such, the CPI is a major driving force in the economy that influences a plethora of market dynamics.
The ability to accurately estimate the upcoming inflation rate is of key interest to a variety of different financial players: Central banks, for example, try to predict future inflation trends in order to control it within a predefined range. As such, inflation forecasting is a critical tool in adjusting monetary policies across the world (Friedman, ) . Another example are investors in fixed income assets that desire to estimate future inflation in order to foresee upcoming trends in discounted real returns. Finally, government and private debt levels and interest payments depends heavily on the expected path of inflation. These are just few examples that emphasize the importance of inflation forecasting.
In the US, the consumer price index (CPI) is calculated and reported by the Bureau of Labor Statistics (BLS). It represents the cost of a basket of goods and services across the country on a monthly basis. The CPI is a hierarchical composite index system that partition all consumer goods and services into a hierarchy of increasingly detailed categories. In the US, the top CPI headline is composed of eight major sector indexes: ( ) Housing, ( ) Food and Beverages, ( ) Medical Care, ( ) Apparel, ( ) Transportation, ( ) Energy, ( ) Recreation, and ( ) Other goods and services. Each sector is composed of finer and finer sub-indexes until the entry levels or "leaves" are reached. These entry level indexes represent concrete measurable products or services whose price levels are being tracked. For example, the White Bread entry is characterized under the following eight level hierarchy: All Items → Food and Beverages → Food at Home → Cereals and Bakery Products → Cereals and Cereal Products → Bakery products → Bread → White Bread.
In the mid-s, many advanced economies began a major process of disinflation known as the "great moderation". This period was characterized by steady low inflation and moderate yet steady economic growth (Faust and Wright, ) . Later, the financial crisis of , and more recently the economic effects of the Covid-pandemic, were met with unprecedented monitory policies, potentially altering the underlying inflationary dynamics worldwide (Woodford, ; Gilchrist et al., ; Bernanke et al., ) . While economists still debate about the underlying forces that drive inflation, all agree on the importance and value of contemporary inflation research, measurements and estimation. Moreover, the CPI is a composite index comprised of an elaborate hierarchy of sub-indexes each with its own dynamics and driving forces. Hence, in order to better understand inflation, it is useful to deconstruct the CPI index and look into the specific disaggregated components "underneath" the main headline.
Most existing inflation forecasting models attempt to predict the CPI headline while implicitly assuming the same approach can be effectively applied to its disaggreagated components (Faust and Wright, ) . However, as we show later, and in line with the literature, the disaggregated components are more volatile and harder to predict. Moreover, changes in the CPI components are more prevalent at the lower levels than up at the main categories. As a result, lower levels of the hierarchy often have less historical measurements for training modern machine learning algorithms.
In this work, we present the Hierarchical Recurrent Neural Network (HRNN) modela novel model based on Recurrent Neural Networks (RNNs) that utilizes the CPI's inherent hierarchy for improved predictions at its lower levels. HRNN is a hierarchical arrangement of RNNs analogous to the CPI's hierarchy. This architecture allows for information to propagate from higher levels over to lower levels in order to mitigate volatility and information sparsity that otherwise impedes advanced machine learning approaches. Hence, a key advantage of the HRNN model stems from its superiority at inflation predictions at lower levels of the CPI hierarchy. Our evaluations indicate that HRNN outperforms many existing baselines at inflation forecasting of different CPI components below the top headline and across different time horizons.
Finally, in order to enable reproducibility and facilitate future evaluations of new methods, we make all our code and data publicly available on GitHub . By doing so, we comply with the call to make data and algorithms more open and transparent to the community (Makridakis et al.,
The code and data are available at: https://github.com/AllonHammer/CPI_HRNN.git
While inflation forecasting is a challenging task of high importance, the literature indicates that significant improvement upon basic time-series models and heuristics is hard to achieve. Indeed, Atkeson et al. ( ) found that forecasts based on simple averages of past inflation were more accurate than all other alternatives including the canonical Phillips curve and other forms of structural models. Similarly, Stock and Watson ( , ) provide empirical evidence for the superiority of univariate models in forecasting inflation during the great moderation period ( to ) as well as during the recovery ensuing global financial crisis. More recently, Faust and Wright ( ) conducted an extensive survey of inflation forecasting methods and found that a simple "glide path" prediction from the current inflation rate performs as well as model-based forecasts for long-run inflation rates and often outperforms them.
Recently, an increasing amount of effort have been directed towards the application of machine learning models for inflation forecasting. For example, a recent work by Medeiros et al. ( ) compared inflation forecasting with several machine learning models such as lasso regression, random forests, and deep neural networks. However, Medeiros et al. ( ) are mostly focused on using exogenous features such as cash and credit availability, online prices, housing prices, consumer data, exchange rates, interest rates, etc. When exogenous features are considered, the emphasis shifts from learning the endogenous time series patterns to effectively extracting the predictive information from the exogenous features. Different from Medeiros et al. ( ), in this work we preclude the use of any exogenous features and focus on harnessing the internal patterns of the CPI series. Moreover, unlike previous works that dealt with estimating the main headline, this work is focused on predicting the disaggregated indexes that comprise the CPI.
In general, machine learning methods flourish in data abundant environments where many training examples are available. Unfortunately, this is not the case with CPI inflation data. While a large amount of relevant exogenous features exist, there are only twelve monthly readings annually. Hence, the amount of available training examples is very limited. Furthermore, Stock and Watson ( ) show that statistics such as inflation mean rate, conditional volatility, and persistency levels are shifting in time. Hence, inflation is a non-stationary process which further limits the amount of relevant historical data points.
We do not attempt to cover the plethora of research employing machine learning to economical prediction tasks. Instead, in the remainder of this Section, we will cover previous models that applied neural networks for the task of CPI forecasting. The reader is referred to Coulombe et al. ( ), Mullainathan and Spiess ( ), Athey and Susan ( ) and Chakraborty and Joseph ( ) for more comprehensive surveys of general machine learning applications in economics.
This research joins several studies that apply neural network methods to the specific task of inflation forecasting: Nakamura ( ) employed a simple feed forward network in order to predict quarterly CPI headline values. Special emphasis is placed on early stopping methodologies in order to counter over-fitting. Evaluations are based on US CPI data during -and predictions are compared against several Auto-regressive (AR) baselines. Our evaluations, presented in Section , agree with Nakamura ( ) that a fully connected networks are indeed effective at predicting the CPI headline. However, when the disaggregated components are considered, the model in this paper demonstrated superior accuracy across all time horizons.
Choudhary and Haider ( ) employed a diverse set of neural networks for predicting monthly inflation rates in countries in the Organisation for Economic Co-operation and Development (OECD). Their findings showed that on average, neural network models were superior in % of the countries while simple AR models of order one (AR ) performed better in % of the countries. They also proposed to arithmetically combine an ensemble of multiple networks for further accuracy.
Chen et al. ( ) explored semi-parametric nonlinear auto-regressive models with exogenous variables (NLARX) based on neural networks. Their investigation covered a comparison of different non-linear activation functions such as the Sigmoid activation, radial basis activation, and Ridgelet activation.
McAdam and McNelis ( ) explored Thick Neural Network models that represent "trimmed mean" forecasts from several models . By combining the network with a linear Phillips Curve model, they predict the CPI of the US, Japan and Europe at different levels.
In contrast to the aforementioned works, our model predicts monthly CPI values in all hierarchy levels. We utilize information patterns from higher levels of the CPI hierarchy in order to assist the predictions at lower levels. Such predictions are more challenging due to the inherit noise and information sparsity at the lower levels. Moreover, the HRNN model in this work is better equipped to harness sequential patterns in the data by employing Recurrent Neural Networks. Finally, in order to focus on modelling internal CPI patters on their own, we exclude the use of exogenous variables and rely solely on historical CPI data.
Zahara et al. ( ) employed long-short term memory (LSTM) units for CPI predictions based on exogenous daily online prices of foods staples in Indonesia. Zahara et al. ( ) were first to apply Recurrent Neural Networks (RNNs) for the task of CPI prediction. Unfortunately, Zahara et al. ( ) did not report a comparison of their approach to alternative baselines.
Recently, Almosova and Andresen ( ), employed LSTMs for inflation forecasting and compared them to multiple baselines such auto-regressive models, random walk models, seasonal auto-regressive models, Markov switching models, and fullyconnected neural network. At all horizons, the root mean squared forecast of their LSTM model was approximately one third of that of a random walk model and significantly more accurate compared to the the other baselines.
As we explain next, the model in this work employs Gated Recurrent Networks (GRUs) which are very similar to LSTMs. However, unlike Zahara et al. ( ) and Almosova and Andresen ( ), a key contribution of our model stems from its ability to propagate useful information from higher levels in the hierarchy down to the nodes at lower levels. By ignoring the hierarchical relations, our model is reduced to a set of simple unrelated GRUs. This set-up is similar to that of Almosova and Andresen ( ) as the difference between LSTMs and GRUs is negligible. In Section , we perform an ablation study in which HRNN ignores the hierarchical relations and reduced to a collection of independent GRUs very similar to the model in Almosova and Andresen ( ). Our evaluations indicate that this approach is actually not optimal at any level of the CPI hierarchy.
Before describing our novel HRNN model, we wish to discuss different approaches in Recurrent Neural Networks (RNNs). RNNs are neural networks that model sequences of data in which each value is assumed to be dependent on previous values. More specifically, RNNs are feed forward networks augmented by the inclusion of a feedback loop Mandic and Chambers (
). As such, RNNs introduce a notion of time to the to standard feed-forward neural networks and excel at modelling temporal dynamic behavior Chung et al. 
Let { } =1 be the model's input time series consisting of samples. Similarly, let { } =1 be the model's out time series consisting of samples. Namely, at timestamp the model's input is and its output (prediction) is . A basic RNN unit is defined by the following set of equations:
where , and are the model's parameters and tanh( ) = − − + − is the hyperbolic tangent function. Namely, at time , the output from the previous timestamp −1 is used as an additional input to the model along with the current input . The linear combination + −1 + is fed into a hyperbolic tangent activation function that permits the unit to model nonlinear relations between inputs and outputs. Different implementations may employ other activation functions e.g., the Sigmoid function, other logistic functions, or a Rectified Linear Unit (ReLU) function Ramachandran et al. ( ). An illustration of a basic RNN unit is depict in Figure . .
Recurrent Neural Networks suffer from the "short-term memory" problem: The basic RNN unit utilizes data from recent history in order to make its predictions, but if a sequence is long enough, it cannot carry relevant information from earlier time steps to later ones e.g., relevant patterns from the same month in previous years. Long Short Term Memory networks (LSTMs) deal with this problem by introducing gates that enable the preservation of relevant "long-term memory" and combining it with the most recent data Hochreiter and Schmidhuber ( ). The introduction of LSTMs paved the way for significant strides forward in various fields such as in natural language processing, speech recognition, robot control and more Yu et al. ( ). A LSTM unit has the ability to "memorize" or "forget" information through the use of a special memory cell state, carefully regulated by three gates: an input gate, a forget gate, and an output gate. The gates regulate the flow of information into and out of the memory cell state. A LSTM unit is defined by the following set of equations:
where ( ) = 1 1+ − is the sigmoid or logistic activation function. , and are the learned parameters that control the input gate , , and are the learned parameters that control the forget gate , and , and are the learned parameters that control the output gate .˜ is the new candidate activation for the cell state determined by the parameters , and . The cell state itself is updated by the linear combination = * −1 + * ˜ , where −1 is its previous value of the cell state. The input gate determines what parts of the candidate˜ should be used to modify the memory cell state and the forget gate determines what parts of the previous memory −1 should be discarded. Finally, the recently updated cell state is "squashed" through a non-linear hyperbolic tangent and the output gate determines what parts of it should actually be presented in the output . An illustration of a LSTM unit is depict in Figure . .
A Gated Recurrent Unit (GRU) is a newer improvement of the LSTM unit that dropped the cell state in favour of a more simplified unit that requires less learnable parameters Dey and Salemt ( ). Instead of three gates, GRU employs only two: an update gate and a reset gate. By using less parameters, GRUs are faster and more efficient especially when training data is limited such as in the case of inflation predictions (and 
A GRU unit is defined by the following set of equations:
where , and are the learned parameters that control the update gate , and , and are the learned parameters that control the reset gate . The candidate activation is a function of the input the previous output −1 and controlled by the learned parameters:
, and . Finally, the output is a combination of the candidate activation and the previous state −1 controlled by the update gate . An illustration of a GRU unit is depict in Figure . GRUs enable the "memorization" of relevant information patterns with significantly less parameters when compared to LSTMs. Hence, GRUs were chosen as the basic unit for our novel HRNN model described in Section .
The disaggregated components at lower levels of the CPI hierarchy (e.g., newspapers, medical care products, etc.) suffer from missing data as well as higher volatility in change rates. HRNN exhibits a network graph in which each node is associated with a Recurrent Neural Network (RNN) unit that models the inflation rate of a specific (sub)-index (node) in the "full" CPI hierarchy. HRNN's unique architecture allows it to propagate information from RNN nodes in higher levels to lower levels in the CPI hierarchy, in a coarse to fine-grained fashion, via a chains of hierarchical informative priors over the RNNs' parameters. As we shall see in Section , this unique property of HRNN is materialized in better predictions for nodes at lower levels of the hierarchy. 
Let ℐ = { } =1 be an enumeration of the nodes in the CPI hierarchy graph. In addition, we define ∈ ℐ as the parent node of the node . For example, if the nodes = 5 and = 19 represent the indexes of tomatoes and vegetables respectively, then 5 = 19 i.e. the parent node of tomatoes is vegetables.
For each node ∈ ℐ, we denote by ∈ R the observed random variable that represents the CPI value of the node at timestamp ∈ N. We further denote ( 1 , ..., ), where 1 ≤ ≤ and is the last timestamp for node . Let : R × Ω → R be a parametric function representing a RNN node in the hierarchy. Specifically, R is the space of parameters that control the RNN unit, Ω is the input time series space, and the function predicts a scalar value for the next value of the input series. Hence, our goal is to learn the parameters ∈ R s.t. for ∈ Ω, ( , ) = +1 , ∀ ∈ ℐ, and 1 ≤ < . We proceed by assuming a Gaussian error on 's predictions and receive the following expression for the likelihood of the observed time series:
where −1 ∈ R is the variance of 's errors.
Next, we define a hierarchical network of normal priors over the nodes' parameters that attach each node's parameters with those of its parent node. The hierarchical priors follow:
where is a configurable precision parameter that determines the "strength" of the relation between node 's parameters and the parameters of its parent . Higher values of , strengthen the attachment between and its prior .
The precision parameter can be seen as a global hyper-parameter of the model to be optimized via cross-validation. However, different nodes in CPI the hierarchy have varying degrees of correlation with their parent nodes. Hence, in HRNN the value of is given by:
where is a hyper-parameter and = ( , ) is the Pearson correlation coefficient between the time series of and its parent .
Importantly, Equation ( ) describes a novel prior relationship between the parameters of a node and its parent in the hierarchy that "grows" increasingly stronger according to the historical correlation between the two series. This ensures that a child node is kept close to its parent node in terms of squared Euclidean distance in the parameters space, especially if they are highly correlated. Note that in the case of the root node (the CPI headline),
does not exist and hence we set a normal non-informative regularization prior with zero mean and unit variance.
Let us now denote the aggregation of all series from all levels by = { } ∈ℐ . Similarly, we denote by = { } ∈ℐ and T = { } ∈ℐ the aggregation of all the RNN parameters and precision parameters from all levels, respectively. Note that (the data) is observed, are unobserved learned variables, and T are determined by Equation .
The hyper-parameter from Equation is set by a cross-validation procedure.
With these definitions at hand, we now proceed with Bayes rule. From Equation and Equation , we extract the posterior probability:
( ; ( , −1 ), −1 ) ∈ℐ ( ; , −1 I).
( ) HRNN optimization follows a Maximum A-Posteriori (MAP) approach. Namely, we wish to find optimal parameter values * such that: * = argmax log ( | , T). ( ) Note that the objective in Equation ( ) depends on the parametric function . HRNN is a general framework that can use any RNN e.g., Simple RNN, LSTM, GRU etc. In this work, we chose to be a scalar GRU because GRUs are capable of long-term memory but with less parameters than LSTMs. Hence, each node is associated with a GRU with its own parameters:
= [ , , , , , , , , ]. Then, ( , ) is computed by successive applications of the GRU to with 1 ≤ ≤ according to Equation ( ). Finally, the HRNN optimization proceeds with stochastic gradient ascent over the objective in Equation ( ). An illustration of the entire HRNN architecture is depict in Figure . .
In machine learning, after the model parameters have been estimated in the training process, it can be applied to make predictions in a process known as inference. In our Vegetables Fruits case, equipped with the MAP estimate * , inference with the HRNN model is achieved as follows: Given a sequence of historical CPI values for node , we predict the next CPI value +1 = ( , ) as explained in Section . . This type of prediction is for next month's CPI namely, horizon ℎ = 0. In this work, we also test the ability of the model to perform predictions for further horizons ℎ ∈ {0, .., 8}. The ℎ-horizon predictions are obtained by a recursive manner, whereby each predicted value is fed back as an input for the prediction of +1 . Expectedly, we shall see in Section that as horizon ℎ increases forecasting accuracy gradually degrades.
This work is based on monthly CPI data released by the US Bureau of Labor and Statistics (BLS). In what follows, we discuss the dataset's characteristics, and our preprocessing procedures. For the sake of reproducibility, the final version of the processed data is available together in our HRNN code.
The official CPI of each month is released by the BLS several days into the following month. The price tags are collected in urban areas throughout the US from about , retail and service establishments. the housing and rent rates are collected from about , landlords and tenants across the country. The BLS releases two measurements for different demographics:
. CPI-U: CPI for urban consumers (CPI-U) covers approximately % of the total population. The CPI items and their relative weights are derived from their estimated expenditure according to the Consumer Expenditure Survey. These items and their weights are updated on January of even years.
. CPI-W: CPI for urban wage earners and clerical workers (CPI-W) covers about % of the population. This index is focused on households with at least percent of income coming from clerical or wage paying jobs, and at least one of the household's earners must have been employed for at least % of the year. CPI-W reflects changes in the cost of benefits, as well as future contract obligations.
In this work, we focus on CPI-U, as it is generally considered the best measure for the average cost of living in the US. Monthly CPI-U data per product is available from , hence our samples span from January -March .
The CPI-U is an eight-level deep hierarchy comprising of different nodes (indexes). Level represents the CPI headline, or the aggregated index of all components. An index at any level is associated with a weight between -which represents its contribution to the CPI headline at level . Level consists of the main aggregated categories or sectors: ( ) "Food and Beverages", ( ) "Housing", ( ) "Apparel", ( ) "Transportation", ( ) "Medical Care", ( ) "Recreation", ( ) "Education and Communication", and ( ) "Other Goods and Services". Mid levels ( -) consist of more specific aggregations e.g., "Energy Commodities", "Household Insurance", etc. The lower levels ( -) consists of fine grained indexes e.g., "Apples", "Bacon and Related Products", "Eyeglasses and Eye Care", "Tiers", "Airline fares", etc. Tables and (in Appendix A) depict the first three hierarchies of the CPI (levels -).
We used publicly available data from the BLS website . However, the BLS releases hierarchical data on a monthly basis in separate files (per month). Hence, separate monthly files from January until March were processed and aggregated to create a single repository. Moreover, the format of these files has changed over the years (e.g., txt, pdf and csv formats were all in use) and a significant effort was put in order to parse the changing formats from different time periods.
The hierarchical CPI data is released in terms of monthly index values. We transformed the CPI values to monthly logarithmic change rates as follows: We denote by the CPI value (of any node) at month . The logarithmic change rate at month is denoted by ( ) and given by:
Unless otherwise mentioned, the remainder of the work relates to monthly logarithmic change rates as in Equation ( ). We split the data into a training dataset and a test dataset as follows: For each time series, we kept the first (early in time) % measurements for the training dataset. The Taken from: www.bls.gov/cpi ). When comparing the headline CPI with the full hierarchy, we see that at lower levels the standard deviation (STD) is significantly higher and the dynamic range is larger implying much more volatility. The average number of measurements per index decreases at the lower levels of the hierarchy as not all indexes are available for the entire period.
Figure depicts box plots of the CPI change rate distributions at different levels. The boxes depict the median value and the upper 'th and lower 'th percentiles. The whiskers indicate the overall minimum and maximum rates. Figure further emphasizes that as we go down the CPI hierarchy, the change rates are more volatile.
High dynamic range, high standard deviation, and less training data are all indicators for the difficulty of making predictions inside the hierarchy. Based on this information, we can expect that predictions of the disaggregated components inside hierarchy will be more difficult than at the headline.
Finally, Figure depicts a box plot of the of the CPI change rate distribution for different sectors. We notice that some sectors (e.g. apparel and energy) suffer from higher volatility than others. As expected, predictions at these sectors will be more difficult.
We evaluate HRNN and compare it with well known baselines for inflation prediction as well as some alternative machine learning approaches. In what follows, we use the following notation: Let be the CPI log-change rate at month . We consider models forˆ -an estimate for based on historical values. Additionally, we denote by the random estimation error at time . In all cases, the ℎ-horizon forecasts were generated by recursively iterating the one-step forecasts forward. Hyper-parameters were set 
through a -fold cross-validation procedure.
We compare HRNN with the following CPI prediction baselines:
. Autoregression (AR)-AR( ) estimatesˆ based the previous months as follows: . Random Walk (RW) -We consider the RW( ) model of Atkeson et al. ( ). RW( ) is a simple, yet effective, model that predicts next month's CPI as an average of the last months by:
.
The AR-GAP model subtracts a "fixed inflation trend" before predicting the "inflation in gap" Faust and Wright ( ). Inflation gap is defined as = − , where is the trend at time which represents a slowly-varying local mean. This trend value is estimated using RW( ) as follows: = 1 =1 − . By accounting for the local inflation trend , the model attempts to increase stationarity in and estimate it byˆ = 0 + =1 − + , where { } =0 are the model's parameters. Finally, is added back toˆ to achieve the forecast for the final inflation prediction:ˆ =ˆ + . 
HRNN is a complex model. In order to to demonstrate the specific contributions of each component of the HRNN model, we conducted an ablation study that considered "simpler" machine learning alternatives to HRNN as follows:
. Single (S-GRU)-S-GRU( ) is simply a single GRU unit that receives the last values as inputs in order to predict the next value. In GRU( ), a single GRU was used for all the time series that comprise the CPI hierarchy. This baseline utilizes all the benefits of a GRU but assumes that the different components of the CPI behave similarly and a single unit is sufficient to model all the nodes.
. Independent GRUs (I-GRUs)-In I-GRUs( ) we trained a different GRU( ) unit for each CPI node. The S-GRU and I-GRU approaches represent two extremes:
The first attempts to model all the CPI nodes with a single model, while the second treat each node separately. I-GRUs( ) is equivalent to a variant of HRNN that ignores the hierarchy by setting the precision parameter = 0; ∀ ∈ ℐ. Namely, this is a simple variant of HRNN that trains independent GRUs, one for each index in the hierarchy.
. K-Nearest Neighbours GRU (KNN-GRU)-In order to demonstrate the contribution of the hierarchical structure of HRNN, we devised the KNN-GRU( ) baseline. KNN-GRU attempts to utilize information from multiple Pearson-correlated CPI nodes, without employing the hierarchical informative priors. Hence, KNN-GRU presents a "simpler" alternative to HRNN that replaces the hierarchical structure with elementary vector GRUs as follows: First, the nearest neighbours of each CPI node were found using the Pearson correlation measure. Then, separate vector GRU( ) units were trained for each CPI aggregate along its most similar nodes using the last values of node and its -nearest nodes. By doing so, the KNN-GRU( ) baseline was able to utilize both the benefits of GRU units together with relevant information that comes from correlated nodes.
. Fully Connected Neural Network (FC)-FC( ) is a baseline based on a fully connected neural network with one hidden layer and a ReLU activation. The output layer employs no activation in order to formulate as a regression problem with a squared loss optimization. The inputs to the FC( ) model are the last samples and the output is the predicted value for the next month. Note that we have also experimented with "deeper" networks of more than one layer, but those did not yield a noticeable improvement. We attribute this to the relatively low number of training examples and features inherent to the CPI prediction problem.
We report results in terms of three evaluation metrics:
. Root Mean Squared Error (RMSE)-The RMSE is given by:
where are the monthly change rate for month , andˆ are the corresponding predictions.
. Pearson Correlation Coefficient-The Pearson correlation coefficient is given by:
where ( ,ˆ ) is the covariance between the series of actual values and the predictions, and , ˆ are the standard deviations of the actual values and the predictions respectively.
. Distance Correlation Coefficient-In contrast to Pearson correlation, which detects linear association between two random variables, the distance correlation measure can also detect non-linear correlations. The distance correlation is derived from the distance covariance and distance variance measures. Given andˆ , an actual and predicted CPI values across months respectively, we define two corresponding distance matrices and ˆ as follows:
where , = 1, 2, . . . , represent time steps, and · 2 is the Euclidean norm. The matrices and ˆ are centralized into¯ and¯ ˆ according to:
are the mean value of the the 'th row of and ˆ respectively. The distance co-variance is the arithmetic mean of the element-wise product of and¯ ˆ :
Similarly, the distance variance is defined by:
Finally, the distance correlation coefficient is given by:
The HRNN model is unique in its ability to utilize information from higher levels in the CPI hierarchy in order to make predictions at lower levels. Therefore, we provide results for each level of the CPI hierarchy -overall disaggregated indexes belonging to different hierarchies. For the sake of completion, we also provide results for the CPI headline index by itself. In this case however, the HRNN model cannot utilize its hierarchical mechanism and has no advantage over the alternatives. Results are reported for horizons , , , , and months. To test statistical significance, we performed the Diebold-Mariano statistical significance test which yielded p-value<0.05 for all results. . In HRNN we set = 1.5. The V-GRU( ) models were based on = 5 nearest neighbours. In Table we see that different versions of the HRNN model repeatedly outperform the alternatives at any horizon. Notably, HRNN is superior to I-GRU, which emphasizes the importance of using the hierarchical information and the superiority of HRNN over regular GRUs. Additionally, the HRNN is also superior to the different KNN-GRU models which emphasizes the specific way HRNN employs informative priors based on the CPI hierarchy.
For the sake of completion, we also provide results for predictions at the head of the CPI index. Table summarize these results. The results are relative to the (1) model and normalized according to its results i.e., . When considering only the headline, the hierarchy mechanism of HRNN is redundant and the model is similar to a single GRU( ) unit. Evidently, in this case we do not observe any advantage for the use of GRUs when compared to a simple AR model. We do however see an advantage of simple deep learning model such as fully connected networks (FC) that outperform the more "traditional" approaches including LSTAR. Table depicts the results of HRNN( ), the best model, across all hierarchies (1-8, excluding the headline). Results are averaged over all disaggregated components and normalized by the results of the AR( ) model as before. As evident from Table , the HRNN model shows best relative performance at the lower levels of the hierarchy, where the CPI indexes are more volatile and the hierarchical priors are most effective.
Table compares the results of HRNN( ) across different sectors. Again, the results are averaged over all disaggregated components and normalized by the results of the AR( ) as before. The best improvements of HRNN appears to be in the Food and Beverages group. This can be explained by the fact that the Food and Beverages sub-hierarchy is the deepest and most elaborate hierarchy in the CPI tree. When the hierarchy is deeper and more elaborate, HRNN advantages are emphasized.
Finally, Figure Medical Care, and Newspapers. These indexes, are located down at the bottom of the CPI hierarchy and suffer from relatively high volatility. The graphs in Figure present next month predictions on the test period only (i.e., months that were not used to train the model). The HRNN( ) model seems to accurately track and predict the trends of the real indexes. Figure 
In this work we presented the Hierarchical Recurrent Neural Network (HRNN) model for the task of disaggregated inflation change rate prediction. The hierarchical nature of the model enables information propagation from higher levels in the inflation hierarchy in order to improve predictions for the disaggregated components at lower levels. Extensive evaluations on the US CPI-U index against a wide array of baselines demonstrate the superiority of the HRNN model especially at lower levels of the CPI hierarchy.
This research was supported by the ISRAEL SCIENCE FOUNDATION (grant No. / ).