Inferensys

Glossary

TCAV

Testing with Concept Activation Vectors (TCAV) is an interpretability method that quantifies the sensitivity of a neural network's predictions to user-defined, high-level concepts by measuring directional derivatives in the model's activation space.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
CONCEPT-BASED EXPLAINABILITY

What is TCAV?

Testing with Concept Activation Vectors (TCAV) is a technique that quantifies the sensitivity of a genomic model's predictions to user-defined, high-level biological concepts, providing interpretability in terms a human can understand.

Testing with Concept Activation Vectors (TCAV) is an interpretability method that measures how strongly a user-defined concept—like 'GC-rich promoter' or 'splice donor site'—influences a neural network's classification of a genomic sequence. Instead of producing a per-nucleotide saliency map, TCAV generates a single numerical score, the TCAV score, which represents the fraction of a target class's predictions that are positively sensitive to that concept across a set of test inputs.

The method works by first training a linear classifier, the Concept Activation Vector (CAV), to distinguish between examples of a concept and random counterexamples in the model's activation space. TCAV then computes the directional derivative of the model's output toward this CAV, quantifying conceptual sensitivity. This allows a CTO or regulatory officer to ask direct questions like, 'Is my variant pathogenicity model relying on the biological concept of a polyadenylation signal?' and receive a statistically rigorous, quantifiable answer.

CONCEPT-BASED EXPLAINABILITY

Key Characteristics of TCAV

Testing with Concept Activation Vectors (TCAV) provides a human-friendly, high-level interpretation of neural network logic by quantifying how sensitive predictions are to user-defined concepts, rather than just individual input features.

01

Concept Activation Vectors (CAVs)

The core mathematical tool of TCAV. A CAV is a vector in the direction of a user-defined concept (e.g., 'promoter region', 'splice site') within a model's activation space. It is derived by training a linear classifier to distinguish between examples of the concept and random counter-examples. The CAV is the vector orthogonal to the decision boundary of this classifier, representing the axis of that concept in the network's internal representation.

02

Conceptual Sensitivity Testing

TCAV measures the TCAV score, which quantifies the sensitivity of a model's prediction for a specific class to a high-level concept. It is calculated as the fraction of inputs for which the directional derivative of the class prediction, with respect to the CAV, is positive. A high TCAV score indicates the model's prediction is strongly influenced by the presence of that concept, providing a quantitative, human-interpretable explanation.

03

Domain-Specific Concept Definition

The power of TCAV lies in its ability to test for expert-defined, high-level concepts that are meaningful in a specific domain. In genomics, concepts are not raw nucleotides but biological entities like:

  • CpG Islands
  • Transcription Factor Binding Sites
  • Exon-Intron Boundaries
  • Chromatin States This bridges the gap between low-level model features and high-level biological understanding.
04

Model-Agnostic Interpretability

TCAV is a post-hoc, model-agnostic method. It does not require any modification to the model's architecture or training process. It operates by probing the activations of any layer in a pre-trained network, making it applicable to a wide range of architectures, from convolutional neural networks (CNNs) for sequence motifs to transformer-based genomic language models, without needing access to model internals beyond forward-pass activations.

05

Statistical Significance via Randomization

To ensure the discovered concept sensitivity is not a random artifact, TCAV employs a rigorous statistical validation. It generates random CAVs by training classifiers on random permutations of the concept labels. A two-sided t-test then determines if the TCAV score from the true concept is significantly different from the distribution of scores from these random, meaningless vectors, ensuring only statistically valid, non-spurious concepts are reported.

06

Multi-Level Concept Hierarchies

TCAV can be applied across different layers of a deep network to understand the hierarchical nature of learned representations. A concept like 'promoter' might be encoded in earlier layers, while a more abstract concept like 'gene regulation logic' emerges in later layers. By testing for concepts at multiple depths, TCAV reveals how a model progressively builds complex, high-level biological understanding from raw nucleotide sequences.

CONCEPT-BASED VS. FEATURE-BASED EXPLAINABILITY

TCAV vs. Other Interpretability Methods

A comparative analysis of Testing with Concept Activation Vectors against dominant attribution and saliency methods for genomic sequence models.

CapabilityTCAVIntegrated GradientsSHAPIn-silico Mutagenesis

Granularity of Explanation

Concept-level (e.g., 'TATA box', 'GC-rich region')

Nucleotide-level attribution

Nucleotide-level Shapley values

Nucleotide-level effect size

Requires User-Defined Concepts

Model-Agnostic

Captures Non-Linear Interactions

Satisfies Completeness Axiom

Computational Cost (Relative)

Medium (requires concept dataset and directional derivatives)

High (requires path integral approximation)

Very High (requires sampling and model refitting)

Low (requires N forward passes for sequence length N)

Output Type

TCAV score (sensitivity to concept)

Saliency map over input sequence

Additive importance scores per nucleotide

Prediction delta per mutated nucleotide

Primary Use Case in Genomics

Testing if model learned known biology (e.g., splice sites)

Identifying critical regulatory nucleotides

Explaining individual variant effect predictions

Scanning for functional elements via saturation mutagenesis

TCAV EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Testing with Concept Activation Vectors (TCAV) and its application in genomic model interpretability.

Testing with Concept Activation Vectors (TCAV) is an interpretability method that quantifies the sensitivity of a neural network's predictions to user-defined, high-level concepts. It works by first defining a concept through a set of example inputs (e.g., sequences containing a specific transcription factor binding motif) and a set of random counterexamples. A linear classifier, known as a Concept Activation Vector (CAV), is then trained to distinguish between the activations of a network layer produced by these two sets. The TCAV score is computed as the directional derivative of the model's prediction logit for a target class with respect to this CAV direction. This score, ranging from -1 to 1, indicates how strongly the concept influences the prediction, providing a global, quantitative measure of concept importance across an entire dataset without requiring per-sample attribution maps.

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.