Testing with Concept Activation Vectors (TCAV) is an interpretability algorithm that measures the influence of a human-defined concept—such as 'stripes' or 'wheels'—on a model's output class by computing the directional derivative of the class probability toward a vector representing that concept in the model's activation space. Unlike per-pixel saliency maps, TCAV produces a single, quantitative score called the TCAV score, which indicates the fraction of a target class's inputs that are positively sensitive to the concept.
Glossary
TCAV (Testing with Concept Activation Vectors)

What is TCAV (Testing with Concept Activation Vectors)?
A method for quantifying how sensitive a trained neural network's predictions are to user-defined, high-level concepts, providing explanations in human-friendly terms rather than raw input features.
The technique works by first training a linear classifier to distinguish between examples of a concept and random counterexamples within a chosen layer's activations, yielding a Concept Activation Vector (CAV). It then computes the sensitivity of the model's predictions to perturbations along this CAV direction, enabling domain experts to test whether a model has learned spurious correlations or relies on meaningful, domain-relevant features for its decisions.
Key Features of TCAV
Testing with Concept Activation Vectors (TCAV) provides a high-level, human-friendly lens into neural network decisions by quantifying sensitivity to user-defined concepts rather than low-level pixels or features.
Concept Activation Vectors (CAVs)
The core mathematical object of TCAV. A CAV is a direction in a neural network's activation space that represents a human-defined concept (e.g., 'stripes', 'wheels', 'doctor').
- Derivation: A linear classifier is trained to distinguish between example inputs representing the concept and random counterexamples. The vector orthogonal to the decision boundary becomes the CAV.
- Role: Acts as a probe to measure how aligned the network's internal representations are with the concept.
- Key Property: CAVs are post-hoc and do not require retraining the original model.
Conceptual Sensitivity
TCAV produces a quantitative metric called the TCAV score, which measures the sensitivity of a model's prediction for a specific class to a given concept.
- Calculation: The fraction of inputs for which the directional derivative of the class logit with respect to the CAV is positive.
- Interpretation: A score of 0.8 for 'stripes' on the 'zebra' class means that for 80% of zebra images, making the representation more 'striped' increases the probability of predicting 'zebra'.
- Statistical Rigor: Scores are validated using a two-sided t-test against random vectors to ensure the sensitivity is not accidental.
Layer-Agnostic Probing
Unlike many attribution methods that only work on the input layer, TCAV can probe any hidden layer of a deep neural network.
- Mechanism: CAVs are generated from the activations of the target layer, allowing analysis of how concepts are represented at different levels of abstraction.
- Practical Use: An engineer can discover that low-level concepts like 'texture' dominate in early convolutional layers, while high-level concepts like 'gender' or 'profession' only emerge in fully connected layers.
- Benefit: Enables hierarchical debugging of the feature learning process.
Relative Concept Importance
TCAV enables direct comparison of multiple concepts to understand which ones are most influential for a model's decision-making.
- Example: For a 'doctor' classifier, TCAV can quantify whether the model relies more on the concept of a 'stethoscope' or on spurious correlations like 'male'.
- Fairness Auditing: This is a critical tool for detecting unwanted bias. If the TCAV score for a protected attribute (e.g., 'female') is high and statistically significant, it reveals a dependency the model should not have.
- Output: Generates a ranked list of concepts by their TCAV score for a target class.
Domain-Agnostic Framework
The TCAV methodology is not limited to image data. It applies to any modality where you can define a concept through a set of examples.
- Image Domain: Concepts like 'curved lines' or 'red color' using example image patches.
- Text Domain: Concepts like 'formal tone' or 'sarcasm' using example sentences or embeddings.
- Reinforcement Learning: Concepts like 'enemy proximity' or 'low health' using example state representations to explain an agent's policy.
- Requirement: Only needs access to a set of positive and negative examples for the concept.
Integration with RL Policies
In the context of Explainable Reinforcement Learning (XRL), TCAV is used to test whether a trained policy has learned to recognize human-relevant game concepts.
- Process: A CAV is built for a concept like 'enemy in sight' using game frames. The TCAV score then quantifies how sensitive the policy's action selection (e.g., 'attack') is to that concept.
- Debugging: If a policy has a high TCAV score for 'ally proximity' when choosing 'attack', it may have learned a dangerous, unintended behavior.
- Validation: This bridges the gap between scalar reward signals and semantic understanding of an agent's strategy.
Frequently Asked Questions
Clear, technical answers to the most common questions about Testing with Concept Activation Vectors (TCAV) and its role in making neural network policies interpretable through human-friendly concepts.
Testing with Concept Activation Vectors (TCAV) is a model-agnostic interpretability method that quantifies the sensitivity of a trained neural network's predictions to user-defined, high-level concepts. It works by first defining a concept (e.g., 'stripes' or 'professional attire') using a set of example images or input representations. A linear classifier, called a Concept Activation Vector (CAV), is trained to distinguish between activations produced by concept examples and random counterexamples in a chosen hidden layer. The TCAV score, specifically the TCAV sensitivity, is then computed as the fraction of a target class's inputs for which the directional derivative of the class probability with respect to the CAV is positive. This measures how strongly the concept influences the model's decision for that class, providing explanations in terms that align with human domain knowledge rather than raw pixel or feature importance.
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.
Related Terms
Key techniques and frameworks that complement TCAV for interpreting the policies, representations, and decision boundaries of reinforcement learning agents.
Saliency Map
A heatmap that highlights the regions of an input state—such as pixels in a game frame or sensor readings—that most strongly influence a reinforcement learning agent's action selection. Unlike TCAV, which tests for high-level concepts, saliency maps provide fine-grained spatial attribution at the input level.
- Computed via gradient backpropagation to the input layer
- Reveals where the agent is 'looking' when making a decision
- Commonly used with Deep Q-Networks (DQN) and policy gradient methods
Feature Ablation
A causal interpretability method that systematically removes or occludes input features to measure the resulting change in policy output. While TCAV measures sensitivity to concepts, ablation directly tests feature necessity by observing performance degradation.
- Removes one feature or group of features at a time
- Measures drop in expected return or action probability
- Provides ground-truth causal evidence, not just correlation
Contrastive Explanations
An explanation format that answers 'Why action A instead of action B?' by highlighting the minimal state differences that caused the policy to diverge. This complements TCAV by providing counterfactual reasoning at the action level rather than concept-level sensitivity.
- Identifies minimal sufficient causes for decision changes
- Useful for debugging near-boundary states
- Often generated via perturbation analysis or generative models
Reward Decomposition
The process of breaking down a scalar reward signal into constituent sub-rewards to explain which objectives are driving an agent's behavior. While TCAV explains what concepts influence a policy, reward decomposition explains why those concepts matter in terms of the agent's optimization goals.
- Decomposes reward into semantically meaningful components
- Reveals trade-offs between competing objectives
- Enables credit assignment to specific sub-goals
Integrated Gradients
A model-agnostic attribution method that computes the path integral of gradients from a baseline state to the actual input. This satisfies the completeness axiom (attributions sum to the output difference), providing a principled alternative to TCAV's directional derivative approach for feature-level explanations.
- Uses a black-to-white baseline for image inputs
- Satisfies sensitivity and implementation invariance axioms
- Applicable to any differentiable policy network
Decision Tree Extraction
A technique for distilling a neural network policy into a structurally interpretable decision tree that mimics the original policy's input-output mapping. This provides a globally interpretable surrogate that can be audited directly, complementing TCAV's concept-level sensitivity analysis with explicit logical rules.
- Produces if-then rules for action selection
- Trades fidelity for interpretability
- Enables formal verification of extracted policy logic

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