Inferensys

Glossary

Individual Conditional Expectation (ICE) Plot

An Individual Conditional Expectation (ICE) plot is a visualization that graphs the functional relationship between a feature and the model's prediction for each individual instance, disaggregating the global average shown in a Partial Dependence Plot to reveal heterogeneous effects.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
MODEL EXPLAINABILITY

What is an Individual Conditional Expectation (ICE) Plot?

An ICE plot visualizes how a model's prediction for a single instance changes as a specific feature varies, revealing heterogeneous effects masked by global averages.

An Individual Conditional Expectation (ICE) Plot is a visualization that disaggregates the global average of a Partial Dependence Plot (PDP) by plotting the functional relationship between a target feature and the predicted outcome for each individual instance in a dataset. While a PDP shows a single average curve, an ICE plot displays one line per instance, exposing heterogeneous treatment effects and interactions that averaging would otherwise obscure.

ICE plots are constructed by holding all other features constant for a specific instance and systematically varying the feature of interest across its range, recording the model's changing prediction. This reveals whether different subgroups respond in opposing directions—a critical insight for algorithmic fairness and causal inference. A centered ICE plot, which subtracts each instance's baseline prediction, further clarifies divergent trends by aligning all curves at a common origin.

DISAGGREGATING PREDICTIONS

Key Characteristics of ICE Plots

Individual Conditional Expectation (ICE) plots reveal the heterogeneous relationships hidden by global averages, plotting the prediction for each instance as a function of a single feature.

01

Instance-Level Disaggregation

Unlike a Partial Dependence Plot (PDP), which shows a single global average curve, an ICE plot visualizes one line per instance. This disaggregation reveals heterogeneous effects where the direction of a feature's impact differs across subgroups. If all ICE curves follow a similar shape, the PDP is a reliable summary. If curves diverge or intersect, it signals complex interactions that a PDP would mask.

02

Centered ICE (c-ICE) for Comparison

A standard ICE plot can be difficult to read when instances have vastly different baseline predictions. Centered ICE (c-ICE) normalizes all curves to start at zero at a specific feature value, isolating the differential effect of the feature. This makes it easier to visually identify clusters of instances that respond similarly, even if their absolute predicted values differ.

03

Derivative ICE (d-ICE) for Interaction Detection

Derivative ICE (d-ICE) plots the partial derivative of the prediction with respect to the feature for each instance. This reveals where and for whom the feature has a strong influence. If d-ICE curves are flat and identical, no interaction exists. Significant variation in the derivatives across instances is a direct visual indicator of feature interactions in the model.

04

Computational Mechanism

To generate an ICE plot for a feature (x_S):

  • Select a grid of values for (x_S).
  • For each instance (i), create a set of synthetic copies where all features except (x_S) are held constant at their observed values, and (x_S) is set to each grid value.
  • Predict on all synthetic copies.
  • Plot the predicted value against the grid values for each instance. This brute-force approach is model-agnostic but computationally linear in the number of instances and grid points.
05

Diagnosing Model Behavior

ICE plots are a primary diagnostic tool for uncovering non-linear relationships and subgroup effects. For example, an ICE plot of age against predicted health risk might reveal that risk increases with age for most patients but decreases for a specific subgroup with a particular genetic marker. This granular insight is critical for auditing fairness and validating domain logic before deployment.

06

Limitations and Visual Clutter

ICE plots suffer from overplotting when the number of instances is large, making individual curves indistinguishable. They also visualize the effect of only one or two features at a time and assume feature independence during the perturbation process, which can generate unrealistic synthetic data points in regions of the feature space with zero density. Subsampling and transparency are common mitigation strategies.

ICE PLOT DEEP DIVE

Frequently Asked Questions

Explore the mechanics, use cases, and diagnostic power of Individual Conditional Expectation plots for uncovering heterogeneous effects hidden by global averages.

An Individual Conditional Expectation (ICE) plot is a visualization that graphs the functional relationship between a specific input feature and the predicted outcome for each individual instance in a dataset. Unlike a Partial Dependence Plot (PDP), which shows a single global average effect, an ICE plot disaggregates this average by drawing one line per instance. The algorithm works by holding all other features constant for a given instance and systematically varying the target feature across its range, recording the model's prediction at each step. This process is repeated for every instance, generating a series of curves. The result reveals heterogeneous effects—situations where the direction or magnitude of a feature's impact differs across subgroups—that would otherwise be invisible in the averaged PDP curve.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.