Seeing the smoke
before the fire

Janith Wanniarachchi
janith.wanniarachchi@monash.edu Department of Econometrics and Business Statistics, Monash University
Supervised by Prof. Dianne Cook, Dr. Kate Saunders, Dr. Patricia Menendez, Dr. Thiyanga Talagala
IASC-ARS 2023, Macquarie University, Sydney

Let’s be honest here

Building a good model is hard

Explaining how a good model work is even harder


Exhibit A: The good model

What if you could
poke around and find out
how this model works?

Introducing

Explainable AI (XAI) methods!

XAI has a lot of facets

XAI can help you look at

How the model reacts to different features overall using Global Interpretability Methods

How the model gives a prediction to one single instance using Local Interpretability Methods

Explaining one prediction

There are several key local interpretability methods that are related to each other in how they approach the problem

  1. LIME (Local Interpretable Model agnostic Explanations)
  2. Anchors
  3. Counterfactuals

What is an Anchor ?

Formally

a rule or a set of predicates that satisfy the given instance and is a sufficient condition for \(f(x)\) (i.e. the model output) with high probability


Simply put

We are going to find a big enough boundary box in the feature space containing other points that would have the same model prediction as the anchoring point.

What is a predicate ?

Predicates are simple logical statements. In this context a predicate is made up of

A feature

Age

A logical operator

>

A constant value

42

Simply put

A predicate is a boundary line that divides a feature into two subsets.

How are Anchors made?

  • This is achieved by formulating the problem as a Multi Armed Bandit problem to purely explore the feature space

  • Multi-arm bandit problems are like playing different slot machines. You want to design a strategy to get the most rewards by choosing the best machines, even when you don’t know how likely they are to pay out.

The Multi-arm Bandit problem

Simply put

Imagine you are the local point and you are trying to make a wall of similar friends like yourself by changing the walls of the room.

Your options are to either change the north, east, west, or south walls to put all of your friends inside the walls.

When you have lots of space you get rewarded and when you find like minded friends you get rewarded as well.

Visualizing the way Anchors are built

  • Watch as our multi armed bandit solution makes a boundary box in a 2D space, seeking similar points.
  • Observe the agent’s journey through precision and coverage, trying to uncover the optimal solution.
  • Compare the agent on different instances

Instance 1 (Purple)

Instance 2 (Yellow)

What did we just observe

  • The direction of the boundary box tells us the direction of the decision boundary
    • Golden class predictions → Lower right quadrant
    • Purple class predictions → Upper left quadrant

Tip

In a practical setting we can redo this for multiple instances and get an understanding of the model’s decision boundary and get an approximate understanding of the high and low feature values that affect a model prediction.

Applying XAI to bushfire modeling

Why bushfires?

  • The Australian bushfires, notably during the 2019/2020 season, was devastating to animals and humans alike.

  • Objective : Build a model that can predict the cause of a possible bushfire and use explainable AI to uncover the decision process of the model

Bushfire ignition data

  • Data Period: 2000-2021
  • Data Type: Historic records of Victoria bushfires
  • Observation Content:
    • Location
    • Date
    • Descriptive label of fire cause
  • Label Refinement to 6 distinct causes:
    • Accidents
    • Arson
    • Burning off
    • Relight
    • Lightning
    • Other

Gathering predictors

  • Weather data has been collected from SILO database through the weatherOz package.
    • Temperature
    • Rainfall
    • Humidity
    • Sunlight
  • The distance to the nearest powerline for each bushfire ignition was also collected

Fitting the model

The problem is,

Given the location, the date, the weather and human activity data, predict the most likely cause for a bushfire.

As a baseline model, A Random forest model was fitted on a training set from 2000 to 2020 while the testing set contained data from 2021 to 2022 with an F1 score on the testing dataset of 0.83.

How can XAI help in this scenario?

  • Local interpretability methods are more useful in this setting
  • LIME can tell you, the importance of the features for a predicted bushfire cause
  • Counterfactuals can tell you, the feature value configuration that will give a different prediction
  • Anchors can tell you, the decision rule for the predicted cause.

Visualizing Explanations

The easiest to explain is Anchors , which gives explanations that are high dimensional.

Challenges

  • Data can be noisy
  • Model boundaries can be hard to see clearly

Possibilities

  • Use tours to explore the data globally and locally
  • Use interactivity to link high dimensional visualizations together.

Visualizing anchors for bushfires

It’s hard to see a pattern in this, as the data is noisy!

Visualizing anchors with penguins

The discovered anchor of 4 dimensions in a two dimensional space.
Purple dots refer to the Chinstrap species while the golden dots refer to the Adelie species.

Local View

Can you notice a clear separation and a majority of points being gold?

Contributions and Future work

  • This talk showed how to simplify and explain how anchors works to bring XAI tools closer to data scientists
  • This talk showed how to apply high dimensional visualization techniques for anchors and see the possible insights and limitations
  • I’ll be working on exploring high dimensional visualizations of counterfactuals for model explanation
  • I’ll be applying this work to bushfire modeling
  • These are a few proposed ideas to visualize explanations in high dimensions but it needs a lot more work to make the visualization help us understand the explanations. So stay tuned!

Thank you!

Have any suggestions or ideas?

Janith Wanniarachchi

janith.wanniarachchi@monash.edu
@janithwanni
janith-wanniarachchi
janithwanni.netlify.app