Monitoring the Errors of Discriminative Models with Probabilistic Programming

Christina Curlette Probabilistic Computing Project Massachusetts Institute of Technology [email protected]

Ulrich Schaechtle Probabilistic Computing Project Massachusetts Institute of Technology [email protected]

Vikash K. Mansinghka Probabilistic Computing Project Massachusetts Institute of Technology [email protected]

Machine learning algorithms produce predictive models whose patterns of error can be difficult to summarize and predict. Specific types of error may be non-uniformly distributed over the space of input features, and this space itself may be only sparsely and non-uniformly represented in the training data. This abstract shows how to use BayesDB, a probabilistic programming platform for probabilistic data analysis, to simultaneously (i) learn a discriminative model for a specific prediction of interest, and (ii) build a non-parametric Bayesian generative “monitoring model” that jointly models the input features and the probable errors of the discriminative model. Because it is hosted in a probabilistic programming system, the generative model can be interactively queried to (i) predict the pattern of error for held-out inputs, (ii) describe probable dependencies between the error pattern and the input features, and (iii) generate synthetic inputs that will probably cause the discriminative model to make specific errors. Unlike approaches based purely on optimizing error likelihood — including recently proposed approaches for finding "optical illusions" for neural nets — the generative monitor also accounts for the typicality of the input under a generative model for the training data. This biases synthetic results towards plausible feature vectors. Figure 1 shows a schematic of the overall approach. This abstract illustrates these capabilities using the problem of classifying the orbits of Earth satellites. The underlying data source is maintained by the Union of Concerned Scientists; three representative satellites are shown in Table 1. An autonomous system that makes predictions for self-driving cars or makes decisions in a medical context cannot function as a black box; rather, it needs to be explainable and reliable (e.g. Holdren and Smith, 2016; DARPA, 2016). Many recent research efforts aim to understand what impairs the reliability of machine learning systems and how they can be improved. Hand (2006) pointed out that some common assumptions made when using discriminative, predictive models render them unreliable. For example, training data is often not uniformly drawn from the distribution of the data that the predictive model will be applied to. Additionally, false certainty about the correctness of the training data’s labels can further lead to suboptimal performance. Sculley et al. (2014) explain such suboptimal performance as a kind of technical debt caused by a machine learning system’s dependence on training and test data. The authors describe the ability to monitor a machine learning system as “critical.” Some recent work has focused on building monitoring models for machine learning systems; for example, Ribeiro et al. (2016) introduced a monitoring system that infers explanations by observing and analyzing the input-output behavior of an arbitrary opaque predictive model. Our approach, outlined in Figure 1, makes use of probabilistic programming to jointly model input features and the types of errors made by discriminative black box machine learning models, which we call error pattern. We define error pattern as a function of the true class of an input and the predicted class of an input, whose output could be, e.g., a tuple of true class and predicted class or a Boolean value representing whether the predicted class is correct. One key component of our system is BayesDB, a probabilistic programming platform for probabilistic data analysis (Mansinghka et al., 2015b). A second key component is CrossCat, a Bayesian non-parametric method for learning the joint distribution over all variables in a heterogeneous, high-dimensional population (Mansinghka et al., 2015a).

Presented at the Workshop on Reliable Machine Learning in the Wild (NIPS 2016), Barcelona, Spain.

(a)

Use the BayesDB Meta-Modeling Language to train a discriminative model and an associated generative monitoring model: Training data {(~xi , yi )}

Monitoring data: input features, annotations and error patterns

Predictive model

ML algorithm

fθ (~x)

Generative monitoring model

CrossCat

~ , ε) Pφ (~x, α

~ (~xi ), ε(yi , fθ (~x))} {(~xi , α

(b)

Query the generative monitoring model via the BayesDB Bayesian Query Language to summarize and predict error patterns of the discriminative model. Examples: Probable feature vectors n  and o annotations ~x ~ˆ ~x ~ˆ | ε = ε∗ ) ˆj , α ˆj ˆj , α ∼ Pφ (~x

Error pattern of interest ε∗ Generative monitoring model Input features ~x

Probable error pattern

~ , ε) Pφ (~x, α

Pφ (ε | ~x)

+ BayesDB BQL implementation

Query feature or annotation d

x or α

d

Probability of dependence with pattern  error   

Pφ I xd ; ε > δ or Pφ I αd ; ε > δ 



Figure 1: Reliability analysis with probabilistic programming. (a) BayesDB’s Meta-Modeling Language can be used to train a generative monitoring model. A generative monitoring model is a model for the joint distribution over input features, annotations, and error patterns. A black box machine learning (ML) algorithm is trained using a set of training data {(xi , yi )}, resulting in a predictive model fθ (~x) where θ is a set of parameters for the predictive ~ , and error pattern ε as a model. Monitoring data consist of input features ~x, a potentially sparse auxiliary signal α ~ , ε) using CrossCat, function of the predictive model and the true target. We model the generative monitor Pφ (~x, α where φ denotes the structure and parameters for CrossCat. (b) BayesDB’s Bayesian Query Language (BQL) can be used to query the generative monitoring model in order to explain error patterns, predict likely failures, and predict the likelihood that error pattern depends on other variables using mutual information; which above is written as I(xd ; ε).

Table 1 on the next page shows three representative entries in the dataset of satellites used for the monitoring model example in this abstract. In the example considered in this abstract, a black box random forest model is used to predict satellites’ type of orbit. The random forest model takes in a set of training data, fits decision tree classifiers on subsamples of the data, and uses an aggregate of the decision trees’ classifications to make predictions. For a size n set of training data {(~xi , yi )} and a total of B decision trees, n samples are drawn with replacement B times. Each set of samples drawn on step b = 1 . . . B is√used to train a decision tree fb using a standard tree learning algorithm. At each split in tree fb , a random subset of n of the total n features are used as predictors. The random forest then classifies a new ˆ j using the majority of the decision trees’ classifications, i.e. mode(fb (~x ˆ j )) for b = 1 . . . B. In this case, input ~x the random forest’s predictions are used to create a variable called classification error pattern, a string 2

Table 1: Satellites data table (Saad and Mansinghka, 2016). Variables in the satellites population and three representative satellites. The records are multivariate, heterogeneously typed, and contain arbitrary patterns of missing data. Name Country of Operator Operator Owner Users Purpose Class of Orbit Type of Orbit Perigee km Apogee km Eccentricity Period minutes Launch Mass kg Dry Mass kg Power watts Date of Launch Anticipated Lifetime Contractor Country of Contractor Launch Site Launch Vehicle Source Used for Orbital Data Inclination radians

International Space Station Multinational NASA/Multinational Government Scientific Research LEO Intermediate 401 422 0.00155 92.8 NaN NaN NaN 36119 30 Boeing Satellite Systems Multinational Baikonur Cosmodrome Proton www.satellitedebris.net 12/12 0.9005899

AAUSat-3 Denmark Aalborg University Civil Technology Development LEO NaN 770 787 0.00119 100.42 0.8 NaN NaN 41330 1 Aalborg University Denmark Satish Dhawan Space Center PSLV SC - ASCR 1.721418241

Advanced Orion 5 USA NRO Military Electronic Surveillance GEO NaN 35500 35500 0 NaN 5000 NaN NaN 40503 NaN NRL USA Cape Canaveral Delta 4 Heavy SC - ASCR 0

denoting both the true type of orbit and the type of orbit predicted by the random forest for each satellite in the training data. A monitoring model is then trained on the error pattern and the input features (see Table 1), excluding the target variable (Type of Orbit). Figure 2 shows how the random forest model and monitoring model were created and trained using BayesDB’s Meta-Modeling Language. Figure 3 shows how the monitoring model finds likely dependencies between the error pattern and input features. One important function of the generative monitoring model is to predict error pattern given a set of input features. Figure 4 (a) and (b) show an example of using the monitoring model to predict error pattern for a particular satellite. Predicted error pattern can also be distilled into a more coarse-grained prediction of whether the black box discriminative model is expected to be correct or incorrect. If the true classification and predicted classification in the predicted error pattern are the same, then the monitoring model predicts that the black box model will classify the input correctly. This is regardless of the input’s true class. For example, if the monitoring model predicts an error pattern denoting that a satellite’s true type of orbit is polar and that the discriminative model will classify it as polar, then the monitoring model predicts that the black box model will be accurate in its prediction. This is the case even if the satellite’s true type of orbit is sun-synchronous; it is independent of the satellite’s true type of orbit. In this way, the monitoring model’s predictions for error pattern can be used as a metric for confidence in the black box model’s prediction for a given input. Figure 4 (c) shows the probability that the discriminative black box model is predicted to be correct or incorrect based on a particular satellite’s predicted error pattern. In addition to being used to predict likely error patterns, the generative monitoring model can be used to simulate values of input features given a particular error pattern. Figure 5 shows the results of using the monitoring model to simulate purpose of satellites given a certain type of error pattern. Simulations from the monitoring model can also accept constraints on other input variables; in Figure 5, purpose is simulated both with and without an additional constraint. Current research is focused on (i) empirically studying the behavior of this monitoring strategy on a broader problem class; (ii) developing analyses of the CrossCat monitoring model that enable qualitative and quantitative characterizations of ‘safety margins’ and overall reliability of the black-box method; and (iii) identifying use cases where interactive, ad-hoc querying of the monitor model can yield meaningful insights as judged by domain experts. 3

(a)

%%mml CREATE POPULATION satellites FOR training_data WITH SCHEMA { MODEL Power_watts, Period_minutes, Apogee_km, Dry_Mass_kg, Perigee_km, Date_of_Launch, Eccentricity, Launch_Mass_kg AS NUMERICAL; MODEL Country_of_Operator, Operator_Owner, Users, Purpose, Class_of_Orbit, Type_of_Orbit, Contractor, Country_of_Contractor, Launch_Site, Launch_Vehicle, Source_Used_for_Orbital_Data AS NOMINAL; MODEL Inclination_radians AS CYCLIC; IGNORE Name }; CREATE METAMODEL random_forest FOR satellites WITH BASELINE crosscat( OVERRIDE GENERATIVE MODEL FOR Type_of_Orbit GIVEN Perigee_km, Apogee_km, Period_minutes USING random_forest (k=6)); INITIALIZE 25 MODELS FOR random_forest; ANALYZE random_forest FOR 1000 ITERATIONS;

(b)

%%bql INSERT INTO monitor_data (classification_error_pattern) (SELECT Type_of_Orbit FROM satellites WHERE Name = "Iridium 60") || "_" || (SIMULATE Type_of_Orbit FROM random_forest WHERE Name = "Iridium 60" LIMIT 1;)

(c)

%%mml CREATE POPULATION monitor_population FOR monitor_data WITH SCHEMA { MODEL classification_error_pattern, Power_watts, Period_minutes, Apogee_km, Dry_Mass_kg, Perigee_km, Date_of_Launch, Eccentricity, Launch_Mass_kg AS NUMERICAL; MODEL Country_of_Operator, Operator_Owner, Users, Purpose, Class_of_Orbit, Contractor, Country_of_Contractor, Launch_Site, Launch_Vehicle, Source_Used_for_Orbital_Data AS NOMINAL; MODEL Inclination_radians AS CYCLIC; IGNORE Name }; CREATE METAMODEL monitor_model FOR monitor_population WITH BASELINE crosscat; INITIALIZE 25 MODELS FOR monitor_model; ANALYZE monitor_model FOR 1000 ITERATIONS;

Figure 2: Predictive model and monitoring model with MML and BQL. The top box (a) shows the Meta-Modeling Language (MML) code used to create and train the random forest model. The middle box (b) shows Bayesian Query Language (BQL) code for creating and inserting error pattern into the monitor data for a particular satellite (Iridium 60). The bottom box (c) shows the MML code used to create and train the monitoring model.

4

(a)

%%bql .heatmap ESTIMATE DEPENDENCE PROBABILITY FROM PAIRWISE COLUMNS OF monitor_population;

P[I(xd; ε) > 0]

dry_mass_kg

launch_mass_kg

contractor

dry_mass_kg

source_used_for_orbital_data

date_of_launch

anticipated_lifetime

country_of_operator

operator_owner

country _of_contractor

users

launch_vehicle

purpose

power_watts

inclination_radians

perigee_km

classification_error_pattern

country_of_operator

launch_site

country _of_contractor

apogee_km

period_minutes

eccentricity

class_of_orbit

eccentricity class_of_orbit apogee_km period_minutes launch_site country _of_contractor country_of_operator perigee_km classification_error_pattern inclination_radians power_watts purpose users launch_vehicle operator_owner date_of_launch anticipated_lifetime contractor source_used_for_orbital_data dry_mass_kg launch_mass_kg

P[I(xd; ε) > 0]

(b) 1.0 0.8 0.6 0.4 0.2 class_of_orbit

apogee_km

eccentricity

period_minutes

launch_mass_kg

source_used_for_orbital_data

power_watts

launch_site

date_of_launch

contractor

anticipated_lifetime

operator_owner

purpose

launch_vehicle

users

perigee_km

inclination_radians

classification_error_pattern

0.0

(c) Figure 3: Dependence of error pattern on input features. The top box (a) shows BQL code to create a heatmap of the pairwise probabilities of dependence between input features and the error pattern, the results of which are displayed in (b). The heatmap (b) shows how CrossCat hierarchically clusters the error pattern with other variables on which it is likely dependent. The input variables’ probabilities of dependence on error pattern are displayed in histogram (c). Variables in blue boxes in both (b) and (c) have the highest likelihood of dependence on the error pattern, i.e. P [I(xd ; ε) > 0] >≈ 0.6. 5

(a)

%%bql SIMULATE classification_error_pattern FROM monitor_population GIVEN Name = "Iridium 60" LIMIT 1000;

(b)

Coarse-grained prediction of error pattern

Probability

True “coarse-grained” error pattern

Discriminative model is correct

Discriminative model is incorrect

(c) Figure 4: Predicting error pattern. The top box (a) depicts BQL code to simulate error pattern for the satellite Iridium 60 using the generative monitoring model. The simulations of probable error pattern can be described as ε ∼ Pφ (ε|~x = ~xs ), where ~xs denotes the set of input feature values for the satellite Iridium 60. The middle plot (b) illustrates the results of running the query: each error pattern is shown on the y-axis and its probability in a series of simulations is shown on the x-axis. In this case, the true error pattern for this satellite was "True: Intermediate, Predicted: Intermediate", highlighted in a green box. It was the second most likely error pattern predicted by the generative monitoring model, illustrating the monitoring model’s ability to produce reasonable predictions of error pattern given a set of input features. The bottom plot (c) divides error pattern ε into two components: true class εt and predicted class εp . It shows the probability that, based on the predicted error pattern for a satellite ε, the discriminative black box model was correct (εt = εp ) or incorrect (εt 6= εp ) in its prediction of orbit type for the satellite Iridium 60. Here, I[ ] denotes the indicator function. For comparison, the average true accuracy of the discriminative model was 37.5%.

6

(a)

(b)

%%bql SIMULATE purpose FROM monitor_population GIVEN classification_error_pattern = "True type of orbit: polar, Predicted type of orbit: intermediate" LIMIT 500;

%%bql SIMULATE purpose FROM monitor_population GIVEN classification_error_pattern = "True type of orbit: polar, Predicted type of orbit: intermediate" AND users = "military" LIMIT 500;

(c) Figure 5: Simulating inputs conditioned on error pattern. The probabilistic generative monitoring model allows for simulating input features given a particular error pattern. The top box (a) depicts BQL code for simulating purpose of a satellite given the error pattern "True type of orbit: polar, Predicted type of orbit: intermediate," and the second box (b) depicts BQL code for the same simulation with an additional input constraint setting users to military. The plot (c) shows side-by-side distributions of simulated purpose for satellites with both without any further constraints (red) and constraining the satellite’s users to be military (blue). Simulating purpose for this particular error pattern without additional constraints can be described as xi ∼ Pφ (xi |ε = ε∗ ), where xi denotes purpose and ε∗ is "True type of orbit: polar, Predicted type of orbit: Intermediate." With the additional input constraint, the simulations can be described as xi ∼ Pφ (xi |ε = ε∗ , xj = x∗j ), where xj denotes users and x∗j is military.

7

References DARPA (2016). DARPA-BAA-16-53: Explainable artificial intelligence (XAI). http://www.darpa.mil/ program/explainable-artificial-intelligence. Accessed: 2016-12-05. Hand, D. J. (2006). Classifier technology and the illusion of progress. Statistical science, 21(1):1–14. Holdren, J. P. and Smith, M. (2016). White house report on preparing for the future of artificial intelligence. https://www.whitehouse.gov/sites/default/files/whitehouse_files/microsites/ ostp/NSTC/preparing_for_the_future_of_ai.pdf. Accessed: 2016-12-05. Mansinghka, V., Shafto, P., Jonas, E., Petschulat, C., Gasner, M., and Tenenbaum, J. B. (2015a). Crosscat: A fully bayesian nonparametric method for analyzing heterogeneous, high dimensional data. arXiv preprint arXiv:1512.01272. Mansinghka, V., Tibbetts, R., Baxter, J., Shafto, P., and Eaves, B. (2015b). Bayesdb: A probabilistic programming system for querying the probable implications of data. arXiv preprint arXiv:1512.05006. Ribeiro, M. T., Singh, S., and Guestrin, C. (2016). "Why Should I Trust You?": Explaining the predictions of any classifier. arXiv preprint arXiv:1602.04938. Saad, F. and Mansinghka, V. K. (2016). A probabilistic programming approach to probabilistic data analysis. In Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I., and Garnett, R., editors, Advances in Neural Information Processing Systems 29, pages 2011–2019. Curran Associates, Inc. Sculley, D., Holt, G., Golovin, D., Davydov, E., Phillips, T., Ebner, D., Chaudhary, V., and Young, M. (2014). Machine learning: The high interest credit card of technical debt. In SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop).

8

Monitoring the Errors of Discriminative Models with ...

One key component of our system is BayesDB, a probabilistic programming platform for probabilistic data analysis. (Mansinghka et al., 2015b). A second key component is CrossCat, a Bayesian non-parametric method for learning the joint distribution over all variables in a heterogeneous, high-dimensional population ...

919KB Sizes 8 Downloads 211 Views

Recommend Documents

Monitoring memory errors: The influence of the veracity ...
Jan 11, 2012 - relative accuracy of monitoring is delaying JOLs for even a brief period of ... ing the availability and ease of retrieving informa- tion from LTM in ...

Discriminative Reordering Models for Statistical ...
on a word-aligned corpus and second we will show improved translation quality compared to the base- line system. Finally, we will conclude in Section 6. 2 Related Work. As already mentioned in Section 1, many current phrase-based statistical machine

Discriminative Models for Information Retrieval - Semantic Scholar
Department of Computer Science. University ... Pattern classification, machine learning, discriminative models, max- imum entropy, support vector machines. 1.

Discriminative Models for Semi-Supervised ... - Semantic Scholar
Discriminative Models for Semi-Supervised Natural Language Learning. Sajib Dasgupta .... text classification using support vector machines. In. Proceedings of ...

Discriminative Models for Semi-Supervised ... - Semantic Scholar
and structured learning tasks in NLP that are traditionally ... supervised learners for other NLP tasks. ... text classification using support vector machines. In.

Discriminative Training of Hidden Markov Models by ...
the training data is always insufficient, the performance of the maximum likelihood estimation ... our system, the visual features are represented by geometrical.

Mining Health Models for Performance Monitoring of ...
2Microsoft Center for Software Excellence, One Microsoft Way, Redmond, WA, ... database servers). ... two real system – Microsoft's SQL Server 2005 and IIS 7.0.

Coupling monitoring networks and regional scale flow models for the ...
and validation of regional flow models, as a strategy to complement data available in official ... continuously retrieving and analysing available head data.

Discriminative training for full covariance models
covariance models outperform our best diagonal covariance models. Moreover ... also show that systems utilizing full covariance models are less sensitive to the ... systems, [1, 2, 3, 4]. However, few state of ... such as feature space minimum phone

Semantic Smells and Errors in Access Control Models
Index Terms—code smells, access control models, security, ... is semantically unrelated to the download code it protects. .... following snippet of PHP code:.

RAIM with Non-Gaussian Errors
conducted under a space-‐based augmentation system. (SBAS) or ground-‐based .... Accounting for biases and unequal variances in the distribution of ε .... P , we conclude that VPL ≤ VAL and the precision approach may be executed. Implementatio

Scene Understanding with Discriminative Structured ...
Department of Computer Science and Technology, Tsinghua University ... Particularly, we adopt online Exponentiated Gradi- ent (EG) algorithm to solve ... M3N with online EG algorithm. Section 6 ...... Accelerated training of conditional ran-.

One-Cycle Correction of Timing Errors in Pipelines With Standard ...
correction of timing errors. The fastest existing error correction technique imposes a one-cycle time penalty only, but it is restricted to two-phase transparent ...

Monitoring with Zabbix agent - EPDF.TIPS
server cache, and two minutes until agent would refresh its own item list. That's better ...... You can look at man snmpcmd for other supported output formatting ...

Identification of Insurance Models with ...
Optimization Problem: max(t(s),dd(s)) ... Optimization Problem: max(t(s),dd(s)) .... Z: Car characteristics (engine type, car value, age of the car, usage, etc.). Aryal ...

Predicting Neuronal Activity with Simple Models of the ...
proposed by Brette and Gerstner therefore seems ide- ally suited to deal with these issues [6]. It includes an additional mechanism that can be tuned to model.

The effect of time synchronization errors on the ...
due to the clock jitter is independent of the number of transmit nodes and the penalty increases as the SNR increases. I. INTRODUCTION. In large wireless ...

The effect of time synchronization errors on the ...
In large wireless sensor networks, the distribution of nodes can be looked at in ...... tems with Rayleigh fading”, IEEE Transactions on Vehicular Technology,. Vol.

A COMPARATIVE STUDY OF DISCRIMINATIVE ...
Center for Signal and Image Processing, Georgia Institute of Technology. 75 Fifth ... we call cross-layer acoustic modeling in that the model discrimina- tion is often at ..... lated cross-layer error cost embedded on the WSJ0 LVCSR database.

Lead_DC_Env_Exposure_Detection-Monitoring-Investigation-of ...
... of the apps below to open or edit this item. Lead_DC_Env_Exposure_Detection-Monitoring-Investig ... l-and-Chronic-Diseases-regulations(6CCR1009-7).pdf.

Discriminative Unsupervised Learning of Structured Predictors
School of Computer Science, University of Waterloo, Waterloo ON, Canada. Alberta Ingenuity .... the input model p(x), will recover a good decoder. In fact, given ...

Monitoring of Temporal First-order Properties with ...
aggregations and grouping operations in our language mimics that of SQL. As ... We first compare the performance of our prototype implementation with the.

Measuring memory monitoring with judgements of
Most prior research has examined predictions of future memory performance by eliciting judgements of ... future memory performance commonly made on a ...... There was no. JUDGEMENTS OF RETENTION main effect for judgement condition, nor was there an I