Backward-Compatible Prediction Updates: A Probabilistic Approach

1 Introduction . The machine learning ( ML ) community develops new models at a fast pace : for example , just in the past year , the state-of-the-art on ImageNet has changed at least five times [ 9 , 10 , 31 , 50 , 51 ] . As reproducibility has increasingly been scrutinized [ 33 , 34 , 42 ] , it is now common practice to release pre-trained models upon publication . In this work we take the perspective of an owner of an unlabelled data set who is interested in keeping the best possible predictions at all times . When a new pre-trained model is released , we face what we refer to as the Prediction Update Problem : ( i ) decide which points in the data set to re-evaluate with the new model , and ( ii ) integrate the new , possibly contradicting , predictions . For this task , we postulate the following three desiderata : 1 . The prediction updates should improve overall accuracy . 2 . The prediction updates should avoid introducing new errors . 3 . The prediction updates should be as cheap as possible since the target data set could be huge . ∗Work done while FT and JvK were interning at Amazon . †Correspondence to : frederik.traeuble @ tuebingen.mpg.de and pgehler @ amazon.com 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . We consider the setting in which the target data set for which we wish to maintain predictions is fully unlabelled ( i.e. , the ground-truth labels are unknown ) and may come from a different distribution than the one on which models have been pre-trained , but with overlap in the label space . This is a transductive or semi-supervised problem , but , due to computational constraints , we avoid any model fitting or fine-tuning and rely solely on the predictions of the pre-trained models that are released over time . Typically , these models exhibit increased performance on their labelled training domain ( e.g. , the ImageNet validation or test set ) as evidence for being good candidates for re-evaluation . Clearly , one goal of updating the predictions stored for the target data set is to improve overall performance , e.g. , top-k accuracy for classification . At the same time , the stored predictions may form an intermediate step in a larger ML pipeline or are accessible to users . This is the reason for our second desideratum : we would like to be backward-compatible , i.e. , new predictions should not flip previously correct predictions ( negative flips ) . Finally , we aim to reduce computational cost during inference and to avoid evaluating the entire data set which may be prohibitive in practice and unnecessary if we are already somewhat certain about a prediction . In this paper , we motivate and formalize the Prediction Update Problem and describe its relation to various relevant research areas like ensemble learning , domain adaption , active learning , and others . We propose a probabilistic approach that maintains a posterior distribution over the unknown true labels by combining all previous model re-evaluations . Based on these uncertainty estimates , we devise an efficient selection strategy which only chooses those examples with highest posterior label entropy for re-evaluation in order to reduce computational cost . Furthermore , we consider different predictionupdate strategies to decide whether to change the stored predictions , taking asymmetric costs for negative and positive flips into account . Using the task of image classification as a case study , we perform extensive experiments on common benchmarks ( ImageNet , CIFAR10 , and ObjectNet ) and demonstrate that our approach achieves competitive accuracy and introduces much fewer negative flips across a range of computational budgets , thus showing that our three desiderata are not necessarily at odds . Contributions We highlight the following contributions : • We introduce the Prediction Update Problem which addresses some common , but previously unaddressed challenges faced in real world ML systems ( § 2 ) . • We propose a probabilistic , model-agnostic approach for the Prediction Update Problem , based on Bayesian belief estimates of the true label combined with an efficient selection and different prediction-update strategies ( § 3 ) . • We contextualise this understudied problem setting as well as our method with related work ( § 4 & § 5 ) and discuss several extensions and limitations ( § 4 ) . • We demonstrate that our approach successfully outperforms alternative approaches and accomplishes all our desiderata in experiments across multiple common benchmark datasets ( CIFAR-10 , ImageNet , and ObjectNet ) and practically relevant scenarios ( § 6 ) .3 1.1 Backward-Compatible Prediction Systems . In real world ML applications , empirical performance is only one of several requirements . When humans interact with automatic predictions , they will start to build mental models of how these models operate and whether and when their predictions can be trusted . This is described as Human-AI teams by [ 1 ] who argue to “ make the human factor a first-class consideration of AI updates ” . An example from [ 1 ] is autopilot functionality in cars for which drivers will build expectations in which driving situations the autopilot is safe to engage . It is important not to violate these assumptions when updating the models over the air . AI assisted medical decision processes are another example of a high stake application where medical professionals need to understand when systems can be trusted . Consider the example of automatically tagging images in a user ’ s photo collection . Those tags are used for example in photo search . As models progress , the overall accuracy on all uploaded images may increase , but for any single user the experience can deteriorate if previously correct searches now show wrong results . Even worse , if errors fluctuate over the user ’ s photo collection as the result of prediction-updates , the user ’ s trust will be eroded . This “ cost ” is asymmetric and the negative experience may outweigh the benefit of better predictions on other images . 3All software and assets we use are open source and under MIT , Apache or Creative Commons Licenses . In contrast to carefully curated and labelled ML benchmarks , many real-world data sets are magnitudes larger ( up to billions of samples ) and entirely unlabelled . Having no feedback which predictions are correct is a common scenario : consider any type of private data such as health data , photo collections , or personal information . Because the data is private , we can neither train on it , nor collect feedback , nor observe the effect of predictions . On the other hand , such data is valuable to an individual : she has an interest to keep it up to date with the best possible predictions . Since it is of little consolation to her if an update of the model improves predictions on average but on her data it gets worse , the update costs are asymmetric . Service providers often rely on models pre-trained on a different data set , and the desire to be backward-compatible arises naturally in this setting [ 1 , 39 , 43 , 53 ] . This is an understudied problem where progress will have large impact . ML systems are becoming pervasive , and their accuracy will continue to increase . Being able to seamlessly transfer them to existing data will be crucial for real-world ML systems . 2 The Prediction Updates Problem Setting . Target Data Set We are given a large , unlabelled target data set Dtarg = { xn } Nn=1 comprising N independent and identically distributed ( i.i.d . ) observations xn ∈ X ⊆ Rd drawn from a target distribution PtargX . The ground-truth labels yn ∈ Y = { 1 , ... , K } distributed according to P targ Y |X are not observed . Note that we are particularly interested in a scenario where N may be extremely large . Models Over time t = 0 , 1 , ... , T we successively gain access to classifiers C0 , C1 , . . . , CT : X → Y which have been trained on a labelled data set Dsrc from a potentially different source distribution PsrcX , Y over X × Y . For simplicity , we assume that the observation space X and label space Y are shared . We consider both the standard scenario where the models { Ct } Tt=0 are trained on a labelled set from the same domain ( Psrc = Ptarg ) ; and the transfer scenario where we deploy a model trained on a labelled ML benchmark to a different data set ( Psrc 6= Ptarg ) . We assume that { Ct } Tt=0 are improving in performance on the training data set . Therefore , denoting by At the estimated accuracy of Ct on PsrcX , Y , we have A t ≤ At+1 ∀t . As motivating example , consider an object recognition task in the wild and let Ct be the winning entry of the ImageNet competition in year t. Labelling To relate the source and target distributions and to justify applying { Ct } Tt=0 to our target data set Dtarg , we make the commonly used covariate shift assumption PtargY |X = P src Y |X , i.e . the conditional label distribution is shared across source and target distributions [ 40 , 45 ] .4 We denote the predicted label by Ct for xn by ŷtn = C t ( xn ) and the stored prediction for xn after time step t by ltn . The target data set is then initially fully labelled by C0 , i.e. , l0n : = ŷ 0 n. Objective As new classifiers { Ct } t≥1 become available , our main objective is to maintain the best estimates { ltn } Nn=1 on our target data set at all times and improve overall accuracy , while , at the same time , maintaining backward compatibility by minimising the number of negative flips , i.e. , the number of previously correctly stored predictions that are incorrectly changed . The key challenge is that no ground truth labels for our target data set are available , so that we have no feedback on which predictions are correct and which are wrong . For each test sample xn and each time step t ≥ 1 , we thus need to decide whether or not to update the previously stored prediction lt−1n based on the current and previous model predictions ŷtn and ŷ 0 : t−1 n , respectively . Limited Evaluation Budget Re-evaluating all samples ( so-called backfilling ) can be very costly and requires significant resources . Since we consider N to be very large , we also consider a limited budget of at most Bt ≤ N sample re-evaluations for step t. We thus additionally need to decide how to allocate this budget and select a subset of samples to be re-evaluated by Ct at every step . 3 Our Method . Having specified the setting , we next describe our proposed method for the Prediction Update Problem . We start by providing a Bayesian approach for maintaining and updating our beliefs about the unknown true labels as new predictions become available ( § 3.1 ) , followed by describing strategies for selecting candidate samples for re-evaluation ( § 3.2 ) and for updating the stored predictions based on our changed beliefs ( § 3.3 ) . Our framework is summarised in Figure 1 . 3.1 Bayesian Approach . Since the true labels { yn } Nn=1 are unknown to us , we treat them as random quantities over which we maintain uncertainty estimates . We then perform Bayesian reasoning to update our beliefs as new evidence in the form of predictions ŷtn from newly-available classifiers C t arrives over time t = 1 , ... , T . In standard Bayesian notation , the true labels yn thus take the role of unknown parameters θ and the predictions ŷtn of data x . Since Dtarg is sampled i.i.d. , we reason about each label yn independently of the others , i.e. , the following is the same for all n. Prior Lacking label information on the target data set , we choose a uniform prior over Y for all yn , i.e. , p ( yn = k ) = 1/K , ∀k ∈ Y . If ( estimates of ) the class probabilities on Dtarg are available , we may instead use these as a more informative prior . Likelihood Next , we need to specify a likelihood function p ( ŷ0 : Tn |yn = k ) for the observed model predictions ŷ0 : Tn given a value k of the true label yn . We make the following simplifying assumption . Assumption 1 ( Conditionally independent classifiers ) . The different classifiers ’ predictions ŷ0 : Tn are conditionally independent given the true label yn , i.e. , the likelihood factorises as p ( ŷ0 : Tn |yn = k ) = ∏T t=0 p ( ŷ t n|yn = k ) . ( 1 ) In a standard Bayesian setting , this corresponds to the assumption of conditionally independent observations given the parameters ; we refer to § 4 for further discussion . The main advantage of Assumption 1 is that the factors p ( ŷtn|yn = k ) on the RHS of ( 1 ) have a natural interpretation : these are the ( normalised ) confusion matrices πt of the classifiers Ct , i.e. , we denote by πt ( i , k ) : = p ( ŷt = i|y = k ) , the probability that Ct predicts class i given that the true label is k , which is the same for all n ; see below and § 4 for more details on how we estimate πt in practice . 4In the context of image classification , this means that images of the same object under different environmental conditions ( i.e. , different PX ) will always share the same label ( i.e. , same PY |X ) . Note that such covariate shift may also lead to changes in PY ( label/target shift ) and/or PX|Y ( conditional shift ) [ 44 , 55 ] . Posterior At every time step t ≥ 0 , we can then compute our posterior belief about the true label yn given model predictions ŷ0 : tn according to Bayes rule , p ( yn = k|ŷ0 : tn ) = πt ( ŷtn , k ) p ( yn=k|ŷ 0 : t−1 n ) ∑ i∈Y π t ( ŷtn , i ) p ( yn=i|ŷ 0 : t−1 n ) ( 2 ) where we have used Assumption 1 to write p ( ŷtn|yn = k , ŷ0 : t−1n ) = p ( ŷtn|yn = k ) = πt ( ŷtn , k ) . The posterior at step t− 1 acts as prior for step t , so we do not have to store all previous predictions . Estimating Confusion Matrices In practice , πt are generally not known and we instead use their ( maximum likelihood ) estimates π̂t from the source distribution . If the number of classes K is large compared to the amount of labelled source data,5 we only estimate the diagonal elements π̂tkk ( i.e. , the class-specific accuracies ) and set the K ( K − 1 ) off-diagonal elements to be constant , π̂t ( i , k ) = 1−π̂ t ( k , k ) K−1 ∀i 6= k , so that ∑K i=1 π̂ t ( i , k ) = 1 ∀k ∈ Y . We refer to § 4 for further discussion on the estimation of πt .

Summary: This paper formulates the “Prediction Update Problem”: as new (better) models are trained, you want to integrate them into your system, and improve accuracy. However, you want to do so without making too many previously correct predictions incorrect (negative flips), as this would reduce user trust. The authors provide a natural Bayesian procedure for doing this. Additionally, they consider the case where the dataset may be too large to evaluate each model on the full dataset, and propose an entropy-based subset selection procedure. Experimentally, they show that this method can beat simple baselines at keeping negative flips low without losing too much in accuracy.