Image credit: InfoSys Blogs (Research @ Infosys Labs)

Interpretable-AI: Where Supervised Learning Might Fail

Raveena
The Startup
5 min readJul 30, 2020

--

Disclaimer: I’ll be briefly mentioning logistic-regression and basic feed-forward neural networks, so its helpful to have programmed with those 2 models before reading this piece.

OK — before machine learning folks come running after me after reading the title, I’m not talking about linear regression, for example. Yes, in linear regression, you can use the R-squared (or adjusted R-squared statistic) to talk about explained variance, and since linear regression only involves addition between independent variables (or predictors), they’re pretty interpretable. If you were doing a linear regression to predict, say the price of a car Car_Price, based on the number of seats, mileage, maximum-speed, and battery life, your linear model could be –– say Car_Price = c1*Seats + c2*Mileage + c3*Speed + c4*Battery_Power –– the fact that variables are only added makes it pretty interpretable. But when it comes to more complex prediction models like Logistic Regression and neural networks, everything about the predictors (or called “features” in ML) becomes more confusing. And logistic-regression & neural networks fall under supervised learning, because they basically just estimate a complicated black-box function from data -> labels.

People use logistic regression to predict whether something is true or not; for example, if patient X has a disease or not. It’s an example of a nonlinear classifier, because instead of just adding the features together, the features are mapped through the nonlinear sigmoid function, which squishes all inputs into the range between 0 and 1, since logistic regression is supposed to represent a probability. (Technically, if you search logistic-regression on Wikipedia, the “decision boundary” is linear, but that’s not the point.) TO me at least, logistic-regression already seems a bit less interpretable than linear-regression because of the nonlinear part. And neural networks are logistic regression chained together! (It’s a rough analogy, but it helps explain a point.) Neural nets, are by definition, made to be nonlinear so it would find non-linear connections between features and be a better predictor for say, image recognition –– why? Because the pixels are considered features, and the pixels making up a recognizable image are related in a non-linear way since images are complex.

But neural networks are often described as an unexplainable black box, and you do NOT want a neural network making important decisions about employment, loans, health-data, and so on if you can’t explain the reasons for the model’s decision. And given at least a. few self-driving fatal car accidents whose software runs on deep learning, a neural network’s decisions that led to a injury or death can’t even be explained in a principled way!

Neural networks are based on the idea of approximating functions, or mappings, between data and its label (example: image of a cat, cat-label). But in the 1989 original paper proving that neural networks can do this, the author, Cybenko, stated at the end: “At this point, we can only say that the majority of [mapping/function] approximation problems will require astronomical numbers of terms [neural nodes].” So while neural networks can create any function mapping between, say images (or predicting the next-word, with recurrent nets), they often have to have hundreds-of-thousands to millions of parameters (also called “weights”, same as “terms” that Cybenko says), with no principled way of interpreting and explaining the nonlinear connections. And human brains don’t need to see thousands of examples to generalize as neural nets do. For example, AlexNet, a famous neural network trained to classify cats, houses, cars, and real-life objects, has 60 million parameters, and had to be trained on 15 million images with almost 700 images for each label. And it sucked up an immense computational energy with multiple GPUs –– technologies that mostly large companies and research groups with tons of money have access to.

Personally, I believe that AI could use a dose of two things to make itself interpretable: inference, and unsupervised learning. Why? Well, I believe it comes down to the following equation:

This is Bayes’ Theorem, but with 2 hypothesis. Basically it says that the belief we give to hypothesis 1 over hypothesis 2 after seeing data, is just the product of how likely the data is assuming our hypotheses, times what we thought about the hypotheses before seeing the data. There’s evidence our brain computes probabilistic inference subconsciously in a similar way. But where does unsupervised learning play in, you say? Well, precisely in the “likelihood” piece of the equation. If you’ve heard of unsupervised learning related to “clustering”, or “finding patters in data without labels” –– that’s all true. But unsupervised learning is fundamentally about density-estimation, a fancy of way of saying “data description”. Density estimation gives us more power than just clustering. It can generate new data all on its own! And crucially, if we can use it to generate new data, then assuming either hypothesis, we can compare the distribution of generated data, to what we see in our test data. And if the test data is more likely to be generated with our estimated density by assuming Hypothesis 1 over 2, we can decide to choose one over the other. That kind of decision, I believe at least, is explainable and understandable because human brains are already wired to understand likelihood and reason with uncertainty. Generating new data in our mind is an important part of human intelligence –– so it should definitely be a key part of Interpretable-AI.

Density estimation to model a histogram (“data description”). Image Credit: machinelearningmastery.com

In my next article, I’ll be going over a use case of this. I’ll be analyzing the “Hepatocellular Carcinoma” dataset from the free online UCI Learning Repository , and show the code and results for classifying whether a patient with certain medical features survives or dies from the carcinoma. We’ll get to see differences in interpretability using 1) logistic-regression model to predict survival, and 2) a unsupervised, generative model, like above, to predict survival. See you then!

EDIT: My follow-up article, “Interpretable-AI: Use-Case with Health Data” is out on my Medium profile now! Any readers here who finished this piece, feel free to check it out!

Feel free to contact me at my LinkedIn!

References:

  1. G, Sybenko, (1989). Approximation by Superpositions of a Sigmoidal Function
  2. G. Marcus, (2017). Deep Learning: A Critical Appraisal
  3. Pitkow, X., & Angelaki, D. E. (2017). Inference in the Brain: Statistics Flowing in Redundant Population Codes. Neuron, 94(5), 943–953.

--

--

Raveena
The Startup

Hey I’m Raveena, a trans woman who’s a semester away from a B.A. in Mathematics. I’m into data-science that can explain why it made the decisions it did.