Inferensys

Glossary

Concept Subspace Projection

The mathematical operation of decomposing an activation vector into components that align with a concept vector and components that are orthogonal to it, used for analysis or manipulation.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
ACTIVATION DECOMPOSITION

What is Concept Subspace Projection?

The mathematical operation of decomposing an activation vector into components that align with a concept vector and components that are orthogonal to it, used for analysis or manipulation.

Concept Subspace Projection is the mathematical operation of decomposing a neural network's activation vector into a component parallel to a Concept Activation Vector (CAV) and a component orthogonal to it. This linear algebra technique isolates the specific contribution of a high-level concept within the model's representational space.

By projecting activations onto a concept subspace, practitioners can quantify concept alignment or perform concept erasure by retaining only the orthogonal residual. This decomposition is foundational for techniques like Testing with CAVs (TCAV) and causal intervention, enabling precise manipulation of semantic information encoded in the network's latent representations.

MATHEMATICAL FOUNDATIONS

Key Properties

The core mathematical operations and properties that define how activation vectors are decomposed relative to a concept direction for analysis and manipulation.

01

Vector Decomposition

The fundamental operation of splitting an activation vector v into two orthogonal components: v_parallel (the projection onto the concept vector c) and v_orthogonal (the residual). This is computed as:

  • v_parallel = (v · c / ||c||²) * c
  • v_orthogonal = v - v_parallel This decomposition allows analysts to isolate the exact contribution of a concept to a network's internal state.
02

Orthogonality Guarantee

A defining property of subspace projection is that the parallel and orthogonal components are guaranteed to be orthogonal, meaning their dot product is zero: v_parallel · v_orthogonal = 0. This ensures a clean, lossless separation of information. The concept-aligned component captures all variance in the direction of c, while the residual contains everything else, enabling precise concept erasure without affecting unrelated information.

03

Projection Matrix Formulation

The projection operation can be expressed as a linear transformation using a projection matrix P:

  • P = c cᵀ / (cᵀ c) for a single concept vector
  • v_parallel = P v This matrix formulation is computationally efficient and generalizes naturally to projecting onto multi-dimensional concept subspaces spanned by multiple concept vectors, enabling analysis of composite semantic directions.
04

Concept Score Extraction

The scalar coefficient (v · c) / ||c||² represents the activation strength of the concept in the input. This score quantifies how strongly the concept is encoded at that layer. When tracked across a dataset, these scores form a distribution that can be analyzed for:

  • Concept prevalence in specific classes
  • Concept drift between training and production data
  • Spurious correlation detection when concepts appear unexpectedly
05

Causal Intervention via Projection

Subspace projection enables concept intervention by modifying the activation vector and re-injecting it into the forward pass:

  • Concept Removal: Set v_new = v_orthogonal to erase a concept
  • Concept Amplification: Set v_new = v + α * v_parallel to boost a concept
  • Concept Replacement: Project onto a different concept vector entirely This provides a causal test of whether a concept drives downstream predictions.
06

Distance Metrics in Subspace

The decomposition enables precise measurement of geometric relationships:

  • Concept Alignment: The cosine similarity cos(θ) = (v · c) / (||v|| ||c||) measures how aligned an activation is with a concept
  • Projection Residual Norm: ||v_orthogonal|| quantifies how much information is unexplained by the concept
  • Subspace Overlap: The principal angles between two concept subspaces measure their semantic similarity
CONCEPT SUBSPACE PROJECTION

Frequently Asked Questions

Answers to the most common technical questions about decomposing activation vectors into concept-aligned and orthogonal components for neural network analysis and manipulation.

Concept subspace projection is the mathematical operation of decomposing an activation vector into two components: one that aligns with a concept vector and one that is orthogonal to it. The operation works by taking the dot product of the activation vector with a unit concept vector to measure the scalar projection, then multiplying this scalar by the concept vector to obtain the aligned component. The orthogonal component is computed by subtracting this aligned component from the original activation. This decomposition enables precise analysis of how much a specific concept contributes to a representation and allows for targeted manipulation, such as concept erasure or concept amplification, without affecting unrelated information encoded in the orthogonal subspace.

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.