Finding Islands of Predictability in Action Forecasting

We address dense action forecasting: the problem of predicting future action sequence over long durations based on partial observation. Our key insight is that future action sequences are more accurately modeled with variable, rather than one, levels of abstraction, and that the optimal level of abstraction can be dynamically selected during the prediction process. Our experiments show that most parts of future action sequences can be predicted confidently in fine detail only in small segments of future frames, which are effectively ``islands'' of high model prediction confidence in a ``sea'' of uncertainty. We propose a combination Bayesian neural network and hierarchical convolutional segmentation model to both accurately predict future actions and optimally select abstraction levels. We evaluate this approach on standard datasets against existing state-of-the-art systems and demonstrate that our ``islands of predictability'' approach maintains fine-grained action predictions while also making accurate abstract predictions where systems were previously unable to do so, and thus results in substantial, monotonic increases in accuracy.


Introduction
Dense action forecasting aims to understand and anticipate future action sequences before they occur given an initial observation period. This is vital for a broad spectrum of problems. Robots collaborating with humans, for example, must be able to anticipate actions in order to safely work with their partners [1,2]. Long term action sequences, in particular, are often very unpredictable, and predictors must adapt to the fundamental uncertainties of the video [3,4,5,6]. One solution is to use coarser-grained labels to "hedge a bet" and predict an action abstraction when a concrete, fine-grained prediction is impossible. [7]. We propose a system to find and replace inaccurate, fine-grained future action sequence predictions with accurate coarse-grained ones. This system ex-(a) The activity diagram from which action sequences were sampled for 50 Salads demonstrates that many action sequences are, to a degree, random by design [8] (b) We can use uncertainty estimation (1) to find the predictable areas (2) and predict correct coarse-grained actions elsewhere to improve forecasting accuracy (3).
tends uncertainty estimation to dense action forecasting and leverages temporal convolutional networks to select the correct level of abstraction at each time step to maintain high prediction accuracy. Our experiments show that most parts of future action sequences can be predicted confidently in fine detail only in small segments of future frames, which are effective "islands" of high model prediction confidence in a "sea" of uncertainty. This we contrast with existing methods which try to make fine-grained predictions at every point in the future [9,3]. In the standard 50 Salads dataset, for example, ingredients can be chopped in many different orders; however, dressing is almost always poured on the salad at the end. Thus, predicting what ingredients will be chopped next is often impossible (see Fig. 1a), but it is almost certain that the dressing will be poured onto the salad near the end of the video.
Our system gives "partial credit" for guesses where correct coarse actions are substituted for fine. Since the relative value of coarse or fine predictions varies depending on the specific use case, and so, there is a need to bias the system towards coarse or fine-grained guesses depending on which preference will ultimately maximize performance. To this end, we introduce Granularity Loss, which further tunes predictions to the data and evaluation scheme. We perform extensive testing across all possible evaluation schemes with standard metrics on benchmark datasets and demonstrate that our method substantially improves performance on state-of-the-art systems. Fig. 1b demonstrates that substantial gains in accuracy can be made using our system. Our primary contributions are (1) a novel system that leverages uncertainty estimation and hierarchical temporal segmentation to find the predictable sections ("islands") of future action sequences and substitute accurate, coarse-grained predictions where none such exist. (2) a novel loss function, Granularity Loss, for tuning the system to specific evaluation schemes. (3) The introduction of uncertainty estimation to the dense action forecasting problem domain. (4) Extensive experimentation on standard datasets demonstrates that our method substantially improves dense action forecasting for state-of-the-art systems.

Related work
Future action prediction has seen explosive growth in recent years. Our work deals with dense action forecasting: the prediction of long-term (on the order of several minutes), action sequences and their durations [10,3,11,12,13].
Despite significant gains, dense action forecasting remains very difficult, rarely exceeding 30% accuracy for the longest term predictions on standard data sets [4,14,11]. Some datasets are known to be highly unpredictable and were designed as such (see Fig. 1a) [8,6]. Recent work has shown that often coarser-grained actions can be reliably predicted even when fine-grained actions cannot [7]. This motivates accurate prediction of coarser-grained activity labels outside of the "islands." In this work, we posit a method to estimate such predictable "islands" and make multiple-granularity predictions to accurately estimate the future.

Uncertainty estimation in video action prediction
Predicting the correctness of forecast actions requires uncertainty estimation. More generally, uncertainty estimation is an important area of research in computer vision. Equipping a model with confidence about its prediction allows a system to understand and cope with sensor and model error. Classification logits do not necessarily reflect model confidence, and thus more sophisticated methods are necessary [15]. Generalized methods for uncertainty estimation in computer vision have made great strides in recent years, and there have been many attempts to model dense action forecasting systems with probability distributions [3,11,16,17]; However, no such techniques exist for dense action forecasting [15,18]. There is a need to develop uncertainty estimation for this problem, as prediction confidence is essential to "hedging bets" as to how precise a prediction should be [7].
3 Finding islands of predictability 3

.1 Problem statement
Given per-frame action predictions for multiple action granularities, our system selects the ones that both maximize accuracy and granularity. Formally, given a video of T frames with t 0 observed frames, g ∈ G levels of granularity, and a prediction for each granularity level in data point n at frame tâ t,n g , the goal is to design a Granularity Selector system H with parameters θ which maximizes A is a weighted accuracy metric [7]. It is parameterized by β, which determines the accuracy weight or "partial credit" given to correct coarser levels of granularity if the fine-grained actions are not predicted. H is the Granularity Selector which selects a final granularity for each frame from options at different levels H :â 1 . . .â G →â g * (2) Figure 2: An overview of our approach. Video features serve as input to the Prediction Module, which makes future action predictions across multiple levels of granularity. The probabilities for each action serve as input to the Granularity Selector, which ultimately decides at what level of abstraction each frame will be labeled.

Discovering islands of predictability
We present a two-part system for finding islands of predictability, where we first a Prediction Module predicts action labels and durations across different granularity levels, and then a Granularity Selector chooses final granularities from these. We show an overview of our system in Fig. 2.
The Prediction Module is a dense action forecaster which predicts future actions over long periods (on the order of several minutes). Formally, given a series of t 0 observed frames x 1 . . . x t0 , which correspond to a list of activities a 1 . . . a n , we want to predict the remaining actions a n+1 . . . a N as well as the time lengths for these actions n+1 . . . N . The predictions then serve as input to the Granularity Selector.
Any classifier can have its outputs converted into confidence measurements with ensembling [15,18]. We improve upon this notion by designing a novel Bayesian neural network Prediction Module that outputs confidence scores for each prediction. This represents the output layer f (x) as a probability distribution f (x; θ) ≡ p(·, x). The action output for each class in each step is a Gaussian distribution representing a probabilistic distribution for each class. a t,n c ∼ N (µ t,c , σ t,c ) t ∈ T, c ∈ C, n ∈ N (3) whereâ t,n c is the logit value of class c at time step t for data point n. This allows the logits to be treated as true measures of prediction certainty. Our RNN also must take into account the fact that the probability distribution at prediction m becomes not only a function of the input data, but previous predictions as well f (x, m; θ) ≡ p(·, x,â 1,n , . . .â m−1,n ) (4) After replacing the output classifier with the Bayesian modification, it can be trained as a BNN with a simple probabilistic modification to the loss function [18].
This network is trained not on the outputs of each action step, altered to be a Dirichlet distribution Dir(y|α) with concentration parameters αj > 0, a categorical distribution [19]. Our network is the first of its kind to allow for confidence measurements of long-term action predictions. Not only is this essential for selecting what level of granularity to use, but, more fundamentally, it allows for informed estimations of the predictability of the future.
The Granularity Selector then selects the final granularity. It is most important to select fine-grained predictions when the system has high confidence in its guesses and coarse otherwise. The input of this network is the predicted mean probabilities for each fine-grained class c f ∈ C f and each coarse-grained Picking hierarchy labels should be as follows: A system should select the finegrained label whenever correct, and the coarse label otherwise. Formally, we choose labels y as such: Where a tn 1 is the ground truth fine-grained label. This allows labels to be derived quickly and intuitively from any existing dataset and Prediction Module. This corresponds to action segmentation in that it takes, as input, video frame features and labels each with an action. Any feed-forward classifier can be used for the Granularity Selector, but the temporal context has shown itself to be invaluable in video segmentation [20,21]. We, therefore, use a temporal convolutional segmentation network to gather features over both temporal and hierarchical dimensions to make a more refined Granularity Selector. To train the network we use standard cross entropy loss: Whereŷ n,t g * is the probability for the true granularity. Ideally, all correct guesses should have high confidence, but, in practice, the correlation between confidence and accuracy is not perfect. There is, therefore, a need to bias the system towards coarse guesses or fine guesses depending on their relative value when such decisions are unclear. To this end, we introduce the novel Granularity Loss, L G , which penalizes coarse action selection.
−log(ŷ t,n g * )I(ŷ t,n = 0) Where I is the identity function mapping to 1 when the statement within is true and 0 otherwise, and y n,t is the true label.Ĥ is a variation of H that takes the probability features O and outputs the correct granularity level This brings the total optimization function to where γ is the granularity penalty i.e. the additional weight placed on the fine-grained actions versus coarse.

Experiments and results
In this section, we will demonstrate the performance gains of this methodology across multiple action Prediction Modules and Granularity Selector versus stateof-the-art dense action forecasting.

Datasets and metrics
We evaluate our model on Breakfast and 50 Salads, two leading benchmarks for action prediction [22,8]. The Breakfast dataset contains 712 videos, each several minutes in length and shot with multiple camera angles. Each video belongs to one out of ten activities, such as making coffee or scrambling eggs. The frames are annotated with fine-grained labels like "pour cream" and "grab cup". There are 48 actions total. For evaluation, we use the standard 4 splits as proposed.
The 50 Salads dataset contains 50 videos showing people preparing salads. The average duration is 6.4 minutes, and 20 actions per video. In addition, to start and end action labels, there are 17 fine-grained action labels such as "cut cucumber" and "add oil." For evaluation, we use five-fold cross-validation and report the average where ten videos are held out for a test in each split. We design coarse label sets for 50 Salads and Breakfast of five and three labels each. These action sets are designed to be highly predictable and non-trivial. By finding and substituting inaccurate fine-grained labels for these accurate, coarsegrained labels, we demonstrate that our methodology allows for monotonic, often substantial, gains in accuracy, regardless of the value of substituted coarse labels versus fine.
The standard metric for dense action forecasting is mean over class accuracy [9]. When coarse granularity is allowed for substitute predictions, it is generally interpreted as "hierarchical" action recognition or prediction, where coarser granularity measures are allowed to count as "partial credit" instead of finer-grained guesses [7,23]. For our experiments, we parameterize the weighted accuracy with β which represents the weight of coarser-grained predictions. As with previous work, we experiment with valuing coarse less than fine grained (β < 1), equal to fine grained (β = 1), and more than fine grained (β > 1) [7,24].

Finding islands of predictability for dense action forecasting
Tab 1 shows state of the art dense forecasting performance. Without ground truth observation labels at test time, few exceed 20% accuracy, and none can exceed 40% accuracy. This underscores the difficulty of this task. We note that with access to ground truth observations at test time, prediction accuracy does increase [14,9]. However, in real scenarios, these labels will not be present, and so we argue that it is of paramount importance to focus on non-ground-truth based systems. Accordingly, we emphasize non-ground-truth-based experiments in this work. We demonstrate that our system can identify these inaccurate segments ahead of time and substitute far more accurate coarse-grained labels in their place to improve performance. At the same time, we show that our system does not reduce performance. Thus, we show that finding the islands of predictability leads to substantial monotonic gains in performance. We show our results in Fig. 3 efficacy of three action prediction systems. Bayes is our BNN predictor. Cycle Consistency is the action predictor from [25]. This system uses segmentation to extract features and a GRU with cycle consistency to make future action predictions. Temporal Aggregation implements a multi-granular encoder to make predictions [10]. Unlike the other baselines, we implement the version that takes ground-truth labels as input to demonstrate the effectiveness of our framework on ground-truth input as well as non-ground-truth. For both baselines, prediction uncertainty is estimated via the ensembling of three separately trained classifiers. In the graphs, the blue bar shows the baseline system accuracy, while the green bar represents additional accuracy gained from the Granularity Selector. Note that as β approaches zero, accuracy approaches the fine-grained accuracy. Similarly, as β approaches infinity, it approaches the coarse-grained accuracy. Results demonstrate that finding islands of predictability adds increased accuracy, often substantially. This is especially true for benchmark values of β (0.5, 1, and 2) [7]. Across four of six systems, our proposed system doubles at least one accuracy value. The two exceptions, Temporal Aggregation-Breakfast and Cycle consistency-Breakfast, still have double-digit improved accuracy scores. The proposed Bayesian network achieves the largest increase in accuracy, the highest overall accuracy for both datasets, as well as top accuracy for β = 0.5 on 50 Salads.
In only one experiment, Temporal Aggregation-50 Salads, does the Granularity Selector reduce performance slightly. We notice that 50 Salads has a higher relative improvement from the Granularity Selector, which is to be expected since its fine-grained labels are more unpredictable and can thus benefit more from coarse-grained labels [6].

Optimizing hierarchy selection
We run experiments to optimize the Granularity Selector given a pretrained action Prediction Module. As a baseline here, we consider a simple multilayer perceptron model and contrast it with the temporal convolutional segmentation model. The results are shown in Fig. 4. Results indicate that the temporal convolutional network achieves superior performance, which indicates, by extension, that temporal context is important for hierarchy selection. The temporal convolutional network tends to heavily favor either coarse or fine-grained classes. The MLP tends to guess granularity more proportionally with γ, however, it is still less accurate.

The impact of Granularity Loss
To train an effective system, we must understand the relationship between the performance of that system and Granularity Loss. Fig. 5 shows how accuracy measurements (coarse, fine, and hierarchical) change with β and γ. Values for fine-grained accuracy peak when γ is maximized with little influence from β, and coarse-grained accuracy similarly peaks when γ is minimized. Despite only being an evaluation metric, β has a non-zero impact on weighted accuracy as validation weighted accuracy is used as a stopping criterion during training. Results indicate intuitively that accuracy is maximized when the network is trained to have γ proportional to the inverse of the weighted accuracy's β value.  In all experiments, this is the value of γ used unless otherwise stated.

Qualitative results
We analyze qualitative results in Fig. 6. Each shows the ground truth actions (top), the best possible selection of coarse and fine labels as per Alg. 6 (middle), and hierarchies selected per frame over each value γ (bottom). Most of the optimal actions predicted for each frame are coarse-grained, with "islands" of predictability where fine-grained actions are the best choice. This trend is not absolute, however, as the second Breakfast example shows an instance where most of the frames are classified as fine-grained. Considering that this example is dominated by one long fine-grained action, it is the result of this action being correctly guessed by the dense action forecaster.
The bottom bar for each example shows which frames the Granularity Selector labels as "fine-grained" as γ increases; the shade of color determines at what value γ the selector begins selecting the fine-grained label for the frame. We see that as γ increases, the selector classifies more frames as "fine-grained." In other words, the "islands" expand until they occupy the entirety of the predicted sequence. This behavior is similar to islands in a shallow sea becoming "larger and larger" as water levels recede. This is important behavior, as the Granularity Loss is designed to encourage the system to favor fine-grained predictions over coarse at higher values of γ.

Prediction confidence for dense action forecasting
For uncertainty estimation, we evaluate three novel uncertainty estimation systems: ensemble, dropout ensemble, and Bayesian. The ensemble method trains an ensemble of classifiers, dropout repeatedly sampling from logits in a network with test-time dropout [15].
We utilize the long-term action prediction protocols from previous works [25] (a) 50 Salads (b) Breakfast Figure 6: Qualitative Results demonstrating ground truth fine-grained actions (top), best possible distribution of coarse and fine labels (middle), and hierarchies selected per frame as γ increases (bottom). Results demonstrate not only evidence for the existence of "Islands of Predictability" in future action sequences, but also that increasing granularity penalty increases the bias towards classifying frames as fine-grained.  but use NLL (negative log-likelihood) instead of MoC accuracy as the metric. NLL is the standard metric for predictor uncertainty, and the smallest predicted value is best [15,18,19]. Measurements were taken from the 20% observed and 50% predicted experiment to best gauge effectiveness over long durations. However, because of the inherent unpredictability of the future, there is arguably a need to also make diverse predictions, and thus not minimize NLL [3]. We also, therefore, minimize the difference between the predicted NLL and the perframe NLL of the entire dataset. This first involves using linear interpolation to increase the length of all predicted and ground-truth actions to the length of the longest video. This ensures that all videos can be compared despite differing lengths. Then the NLL is calculated for each frame for both the ground truth and predicted sequences. After this, we take the mean squared error between probability distributions of predictions (p a ) and ground truth (p a ) over time:

Method
(p a n,t − p n,t a ) 2 The results for 50 Salads are shown in Tab. 2. Results indicate that our novel Bayes network performs the best in terms of minimizing NLL, but that the ensemble network performs best in terms of minimizing M SE N LL . This means that while the Bayes network optimizes certainty, the ensemble network best reflects the uncertainty of the ground truth data. Fig. 7 shows the qualitative results of NLL over time, and shows evidence for the existence of islands of predictability with drastic dips in predicted NLL.

Conclusion
By estimating the uncertainty of future predictions, we show that future actions are largely difficult to foresee in fine detail, with "islands of predictability" punctuating this sea. By finding these islands and substituting coarse labels in other places, we substantially improve accuracy versus state-of-the-art systems.