Testing with CAVs (TCAV) is an interpretability method that quantifies how sensitive a trained neural network's predictions are to high-level, human-defined concepts. It works by first deriving a Concept Activation Vector (CAV)—a direction in the model's activation space that separates examples of a concept from random counterexamples—and then computing the directional derivative of the class score with respect to that vector. This produces a numerical sensitivity score indicating the concept's influence.
Glossary
Testing with CAVs (TCAV)

What is Testing with CAVs (TCAV)?
Testing with CAVs (TCAV) is a technique that quantifies a model's sensitivity to a user-defined concept by measuring the directional derivative of a class prediction towards the Concept Activation Vector.
To ensure robustness, TCAV applies statistical significance testing using a two-sided t-test, comparing the sensitivity scores for the real concept against scores from random vectors. A concept is only considered valid if it passes this significance threshold. The technique is model-agnostic for differentiable networks, requires no architectural changes, and enables domain experts to audit internal representations using their own vocabulary of concepts.
Key Features of TCAV
Testing with Concept Activation Vectors (TCAV) provides a quantitative, human-centric framework for auditing neural network decisions. It moves beyond low-level feature attribution to measure a model's sensitivity to high-level, user-defined concepts.
Quantifying Conceptual Sensitivity
TCAV measures a model's sensitivity to a concept by computing the directional derivative of a class prediction score along the Concept Activation Vector (CAV). This scalar value represents how much the prediction changes as the input's activations are infinitesimally perturbed toward the concept. A high sensitivity score indicates the concept strongly influences the model's decision for that class.
Statistical Significance Validation
To ensure a concept is not an artifact, TCAV employs rigorous statistical significance testing. It performs a two-sided t-test comparing the sensitivity scores obtained from the true CAV against a null distribution of scores from random direction vectors. A concept is only considered valid if it passes this test, typically at a threshold like p < 0.01, confirming the model's genuine reliance on the concept.
Human-Interpretable Abstraction
Unlike saliency maps that highlight raw pixels, TCAV operates on concept activation vectors in the model's latent space. A CAV is derived by training a linear classifier to separate a set of positive examples of a concept from random negative examples. This allows users to define concepts in their own vocabulary—like 'stripes,' 'wheels,' or 'texture'—and test if the model has learned them.
Global and Local Explainability
TCAV provides both global and local insights. The TCAV score (the fraction of inputs where the concept positively influences the class) offers a global view of concept importance across a dataset. For local explanations, sensitivity scores can be computed for individual predictions, revealing which concepts drove a specific decision. This dual granularity supports both model auditing and individual prediction debugging.
Layer-Wise Concept Analysis
By extracting CAVs from different layers of a neural network, TCAV enables layer-wise concept analysis. This reveals the hierarchical abstraction process: lower layers may encode basic concepts like edges or colors, while deeper layers encode complex, composite concepts. This helps researchers understand how conceptual understanding emerges through the network's depth.
Automatic Concept Discovery with ACE
The Automatic Concept Extraction (ACE) algorithm extends TCAV by automatically discovering concepts. ACE clusters image patches that activate similar spatial patterns, generates visual concepts from these clusters, and then uses TCAV to test their significance. This removes the need for manual concept definition, enabling scalable, unsupervised auditing of a model's internal representations.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about Testing with Concept Activation Vectors, a method for quantifying a model's sensitivity to high-level, human-understandable concepts.
Testing with Concept Activation Vectors (TCAV) is an interpretability method that quantifies a neural network's sensitivity to a user-defined, high-level concept by measuring the directional derivative of a class prediction towards a Concept Activation Vector (CAV). The process works in three stages: first, a CAV is derived by training a linear classifier to distinguish between a set of example inputs representing a concept and a set of random counterexamples in a chosen layer's activation space. Second, for a target class, TCAV computes the directional derivative of the class score with respect to the input's activations, projected along the CAV direction. This measures how much moving the activations towards the concept changes the prediction. Finally, a statistical significance test (a two-sided t-test) compares these sensitivity scores against those from random vectors to ensure the concept is not an artifact. The final output is the TCAV score, the fraction of inputs for which the concept had a statistically significant positive influence on the class prediction.
Related Terms
The TCAV framework relies on a precise mathematical and statistical foundation. These concepts define how concept sensitivity is measured, validated, and interpreted within a model's activation space.
Concept Activation Vector (CAV)
A CAV is the fundamental unit of TCAV, representing a direction in a neural network's activation space that encodes a high-level, human-understandable concept. It is derived by training a linear classifier to distinguish between activations from examples of the concept and random counterexamples. The resulting vector normal to the decision boundary defines the concept's axis.
Directional Derivative
The directional derivative quantifies the instantaneous rate of change in a model's class prediction score as the input's activations are perturbed infinitesimally along the direction of a CAV. Mathematically, it is the dot product of the gradient of the class score with respect to activations and the unit CAV. This value forms the basis of the sensitivity metric.
Sensitivity
Sensitivity is the aggregate measure of how responsive a model's prediction for a specific class is to a given concept. It is computed as the fraction of inputs for which the directional derivative is positive, indicating that increasing the concept's presence in the activations increases the class prediction score. A score near 1.0 implies the concept is a strong positive driver.
Statistical Significance Testing
To ensure a concept is not an artifact, TCAV employs a two-sided t-test. The sensitivity scores obtained using the real CAV are compared against a null distribution of scores generated from hundreds of random direction vectors. A concept is considered statistically significant only if its sensitivity is meaningfully distinct from random noise, typically at a threshold of p < 0.05.
Activation Space
The activation space is the high-dimensional vector space formed by the outputs of a specific layer in a neural network. TCAV operates within this space, treating individual directions as potentially encoding semantically meaningful concepts. The choice of layer is critical: lower layers capture textures and edges, while higher layers encode more abstract, composite concepts.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us