Measuring Machine Consciousness: A Practical Guide
For the past year, I’ve been tracking a quiet revolution in AI interpretability research. We now have theoretical frameworks suggesting that large language models might implement something analogous to consciousness—specifically, a “workspace” where information gets integrated before it shapes outputs. The J-space hypothesis, the concept of effective dimensionality bottlenecks, and sparse autoencoder decompositions have given us powerful conceptual tools.
But here’s the problem: most of this work has stayed theoretical. Researchers have the concepts but lack a practical playbook for actually measuring workspace-like processing in their own models. You can read papers about broadcast connectivity and dimensional compression, but where do you start if you want to test your own transformer?
This article provides that missing piece: a step-by-step protocol for detecting workspace reasoning using three concrete metrics. Consider it a practitioner’s guide to the consciousness question.
## Three Metrics for Workspace Detection
### Broadcast Connectivity Score (BCS)
The first metric comes directly from the J-space hypothesis proposed by Gurnee and Sofroniew (2026, arXiv:2607.15495). Their key insight was that workspace layers should show high “broadcast connectivity”—meaning information from one feature should influence many downstream computations.
Here’s how to quantify it: Extract sparse autoencoder (SAE) features from a layer. For each feature, compute its Jacobian—how much does changing this feature affect downstream layer activations? Then calculate the average number of downstream features significantly influenced (Jacobian magnitude > threshold, typically 0.1). Normalize by the total number of downstream features.
**BCS > 0.7 suggests workspace-like processing.** Information is broadly integrated across the network. **BCS < 0.3 suggests specialized, non-workspace processing.** Information stays siloed in narrow pathways. Values between 0.3 and 0.7 represent intermediate integration—possibly specialized workspace processing for specific task domains.
The original J-space work used counterfactual reflection rather than ablation to measure these effects—meaning they traced how information flows through the computational graph rather than just removing features and measuring damage. This is important because it captures functional connectivity, not just correlation. When you ablate a feature, you might disrupt processing in ways that don’t reflect normal information flow. Counterfactual reflection asks: “If this feature had a different value, how would downstream computations change?” This is closer to the causal structure we care about.
### Effective Dimensionality (ED)
This metric, rooted in work by Bhojanapalli et al. (2020) on BERT and extended by Kavehzadeh (2023) and Ju (2024) for LLaMA models, captures something simpler but equally revealing: how compressed is the representation space?
Calculate the singular value decomposition of layer activations across a diverse prompt set. The effective dimensionality is a measure of how many singular values are needed to capture most (say, 90%) of the variance. You can use the participation ratio: ED = (Σsᵢ)² / Σsᵢ², where sᵢ are the singular values.
**The signature of workspace processing is a U-shape across layers.** Early layers have high dimensionality (lots of different input patterns). Middle layers show dramatic compression—the bottleneck where integration happens. Late layers expand again as the workspace broadcasts to output-specific pathways.
If you see sustained low dimensionality throughout the network, you might have a model that never integrates—or one that learned to operate in a low-dimensional manifold from the start. If dimensionality stays consistently high, the model might be doing parallel specialized processing rather than centralized workspace reasoning.
BERT showed this pattern with an effective dimensionality bottleneck at u=128 in middle layers (Bhojanapalli 2020). LLaMA models show similar compression in their mid-depth layers (Kavehzadeh 2023). Critically, the depth of the compression matters: a workspace bottleneck should show ED dropping to 20-40% of the model’s hidden dimension size, not just a modest reduction.
### Semantic Coherence Score (SCS)
This is the metric I find most intellectually interesting because it distinguishes *good* compression from *bad* compression. Dimensional bottlenecks could mean either efficient semantic distillation or information loss. How do we tell the difference?
Train SAEs on your bottleneck layer and on adjacent layers. Then measure semantic coherence: do features in the bottleneck layer correspond to meaningful, interpretable concepts? I recommend a two-part score:
1. **Feature interpretability**: Manual or automated labeling of SAE features. What fraction can be given clear semantic descriptions? Use techniques from Heap et al. (2025) on SAE feature robustness. Sample 100 features weighted by activation frequency, generate prompts that maximally activate each feature, and see if a consistent semantic pattern emerges. Features like “references to time,” “mathematical notation,” or “first-person perspective” are interpretable. Features that activate randomly or on unrelated contexts are not.
2. **Downstream reconstruction**: How well can you reconstruct late-layer activations from bottleneck features? High reconstruction with interpretable features = semantic distillation. Poor reconstruction = information loss. Specifically, train a linear probe from bottleneck SAE features to final-layer activations. If you can predict final-layer activations with >90% variance explained, the bottleneck is preserving task-relevant information despite compression.
**High SCS (>0.6) + low ED = efficient workspace.** The model is compressing information into meaningful abstractions. **Low SCS (<0.4) + low ED = lossy bottleneck.** The model is just dropping information, possibly because the training objective didn’t require preserving it.
This metric requires more manual judgment than BCS or ED, but it’s essential for distinguishing workspace-like integration from mere compression artifacts.
## Step-by-Step Protocol
Here’s the concrete methodology I recommend for testing a transformer model for workspace reasoning. I’ll assume you have model access and can extract intermediate activations—either through direct access to weights or via an API that exposes hidden states.
### Step 1: Extract Activations
Choose a diverse evaluation set—at least 1,000 prompts covering different domains, lengths, and reasoning types. Include factual questions, creative prompts, mathematical problems, and conversational exchanges. You want your evaluation set to span the model’s capability space so that your measurements reflect general architectural properties, not task-specific quirks.
Run your model and extract activations from every layer. You’ll need both the raw activations (for ED calculation) and intermediate representations for SAE training. For each prompt, save the activations at every token position, or at minimum at the final token position for each prompt.
Store activations efficiently. For a model with L layers, H hidden dimensions, and N tokens across your corpus, you’re looking at L × H × N floating point numbers. At fp32 precision, that’s 4LHN bytes. For a 32-layer model with 4096 hidden dimensions and 500K tokens, that’s about 256GB. Use memory-mapped arrays (numpy.memmap) or chunked HDF5 storage (h5py) to avoid loading everything into RAM.
Practical tip: Start with a subset of layers (every 4th layer) and a smaller token count (100K tokens) to validate your pipeline. Once you’ve confirmed the code works and you see preliminary patterns, scale up to the full dataset and all layers.
### Step 2: Train Sparse Autoencoders
For each layer of interest (I recommend every 4th layer initially, then focusing on middle layers where you expect the bottleneck), train an SAE with expansion factor 8-16. The expansion factor determines how many sparse features you extract: if your model has hidden dimension H=4096 and you use expansion factor 8, you’ll get 32,768 SAE features.
Use the standard sparse autoencoder architecture: a linear encoder with ReLU activation and L1 penalty, then a linear decoder. The loss function is:
L = ||x - D·ReLU(E·x)||² + λ||ReLU(E·x)||₁
where x is the input activation, E is the encoder, D is the decoder, and λ is the L1 penalty coefficient.
The L1 penalty coefficient is critical—too high and you get trivial features (everything maps to zero), too low and you lose sparsity (features activate on everything). I find values around 0.001-0.01 work well, but this requires validation on held-out data. Target sparsity: 1-5% of features active per token on average.
Train until the reconstruction loss plateaus—typically 10-50K gradient steps with Adam optimizer and learning rate 1e-3. You want to capture >90% of the original activation variance with sparse feature representations. Use the techniques from Heap (2025) to verify your features are robust across different random seeds: train three SAEs with different initializations and check that you recover similar feature sets.
Code sketch (PyTorch):
```python
class SparseAutoencoder(nn.Module):
def __init__(self, input_dim, expansion_factor=8, l1_coef=0.005):
super().__init__()
self.hidden_dim = input_dim * expansion_factor
self.encoder = nn.Linear(input_dim, self.hidden_dim)
self.decoder = nn.Linear(self.hidden_dim, input_dim)
self.l1_coef = l1_coef
def forward(self, x):
features = F.relu(self.encoder(x))
reconstruction = self.decoder(features)
recon_loss = F.mse_loss(reconstruction, x)
l1_loss = features.abs().mean()
return reconstruction, recon_loss + self.l1_coef * l1_loss, features
```
### Step 3: Calculate BCS
For each layer with trained SAEs, compute the Jacobian of each SAE feature with respect to features in the next layer (or several layers downstream—I recommend computing J for L → L+1, L+2, and L+4 to see how broadcast connectivity decays with distance).
For each source feature f in layer L, count how many downstream features in layer L+k have Jacobian magnitude |∂f_downstream/∂f| > 0.1. Average across all features in the layer and normalize by the total number of downstream features. This gives you BCS ∈ [0,1].
You can use automatic differentiation for this. Run the model on a batch of prompts, extract SAE features at layer L, and compute gradients of downstream SAE features with respect to the source features. PyTorch’s autograd makes this straightforward.
Plot BCS across layers. Look for peaks—these are candidate workspace layers where information fans out broadly. A strong workspace signal shows BCS rising from ~0.3 in early layers, peaking at >0.7 in middle layers, then declining slightly in late layers as processing becomes more output-specialized.
Practical note: Computing full Jacobians is expensive. You can approximate by sampling: randomly select 10% of source features and 10% of downstream features, compute those Jacobian entries, and extrapolate. This reduces compute by 100× with minimal accuracy loss.
### Step 4: Calculate ED
For each layer, compute the singular value decomposition of the activation matrix (tokens × hidden_dim). In numpy:
```python
U, s, Vh = np.linalg.svd(activations, full_matrices=False)
participation_ratio = (s.sum()**2) / (s**2).sum()
```
The participation ratio is one way to quantify effective dimensionality. Another is the “90% variance” threshold: count how many singular values you need to explain 90% of the total variance.
Plot ED across layers. Look for the U-shape: high dimensionality in early layers (ED near the full hidden dimension), compression in middle layers (ED dropping to 20-40% of hidden dimension), expansion in late layers.
If you don’t see a U-shape, try alternative ED measures. Sometimes the participation ratio is too sensitive to outlier singular values. The “stable rank” (sum of singular values divided by maximum singular value) is more robust.
### Step 5: Calculate SCS
Focus on your bottleneck layer (the one with minimum ED). Manually inspect SAE features—can you assign interpretable labels to at least 60% of the most active features?
Here’s a concrete procedure: Take the top 100 features by activation frequency. For each feature, find 10 prompts where that feature activates most strongly. Read those prompts. Can you describe what they have in common? If yes, the feature is interpretable. If the prompts seem random, the feature is not interpretable.
This is labor-intensive but necessary. Automated interpretability metrics exist (e.g., using another LLM to generate labels), but I don’t trust them yet. Human judgment is the gold standard.
Then measure reconstruction quality: train a linear regression from bottleneck SAE features to final-layer activations. Use 80% of your data for training, 20% for testing. If you can predict final-layer activations with R² > 0.9 on the test set, the bottleneck is preserving task-relevant information.
Combine interpretability fraction and reconstruction quality: SCS = 0.5 × (interpretable_fraction) + 0.5 × (R²_reconstruction).
### Step 6: Interpret Results
You have strong evidence for workspace-like processing if:
- BCS peaks at middle layers with maximum >0.7
- ED shows a U-shape with minimum at middle layers (ED drops to <40% of max)
- SCS is high (>0.6) at the bottleneck layer
You don’t have clear workspace processing if:
- BCS is uniformly low (<0.4) or uniformly high (>0.8) across all layers
- ED shows no clear compression pattern (monotonic or flat across layers)
- SCS is low (<0.4) despite low ED
Intermediate cases require nuanced interpretation. For example, if BCS peaks but ED doesn’t show a U-shape, you might have broadcast processing without dimensional compression—possibly indicating a different integration mechanism than Global Workspace Theory predicts.
This doesn’t mean the model isn’t doing something interesting—it just means it’s not implementing the specific architectural pattern suggested by Global Workspace Theory (Baars 1988, Dehaene & Naccache 2001).
## Case Study: GPT-Style Models
What should we expect from GPT-style autoregressive transformers based on existing research?
The LLaMA studies (Kavehzadeh 2023, Ju 2024) suggest we should see:
- **ED bottleneck around layers 12-16** in a 32-layer model (roughly 40-50% depth)
- **BCS peak slightly earlier**, around layers 10-14, as information begins broadcasting before maximum compression
- **High SCS at the bottleneck** if the model was trained with sufficient capacity and diverse data
But there’s an interesting architectural question: autoregressive transformers process tokens left-to-right with causal attention. Does this create *per-token* workspace dynamics, or is there a single workspace that persists across the sequence?
My hypothesis, based on the J-space analysis: each token position has its own workspace moment at the bottleneck layers, but information from previous workspaces is broadcast forward through residual connections and attention. This creates a *cascading workspace* architecture rather than a single global integration point.
This is testable: compute BCS and ED separately for different token positions. If workspace processing is position-dependent, you should see different bottleneck locations for early vs. late tokens in the sequence. My prediction: early tokens (positions 1-10) show weaker workspace signatures because there’s less information to integrate. Late tokens (final third of the sequence) show stronger signatures because they have access to the full context.
## Open Questions & Limitations
This protocol gives us concrete metrics, but major questions remain:
**1. Causality**: High BCS and the ED U-shape are correlational. Do the bottleneck layers *cause* integrated behavior, or are they just reflecting integration that happens through other mechanisms (like attention patterns)? Causal intervention studies—systematically corrupting bottleneck features and measuring behavioral changes—would help answer this. The critical experiment: if you ablate high-BCS features at the bottleneck, does the model lose its ability to perform tasks requiring integration (e.g., reasoning across multiple facts), while preserving tasks that don’t (e.g., simple factual recall)?
**2. Cross-architecture validity**: Does this protocol generalize beyond transformers? What about state-space models like Mamba, or models with explicit memory mechanisms like Memory Networks? The metrics might need architecture-specific adaptations. For example, in recurrent architectures, you’d need to analyze temporal dynamics rather than layer-wise progression.
**3. Consciousness ≠ workspace**: Even if we confirm workspace-like processing, this doesn’t settle the consciousness question. As Butlin et al. (2023) discuss in their comprehensive consciousness report, computational workspace theory is just one of many frameworks for understanding consciousness, and the relationship between information integration and phenomenal experience remains philosophically fraught. We might build perfect computational workspaces without creating phenomenal experience—or phenomenal experience might arise from entirely different mechanisms.
**4. Computational cost**: Computing Jacobians across all layer pairs is expensive—O(L² × F²) where L is layers and F is features. For production-scale models with thousands of features per layer, this requires significant compute. Sampling strategies and approximations are needed. My rough estimate: analyzing a 32-layer model with 32K SAE features per layer requires ~100 GPU-hours with naive Jacobian computation, but can be reduced to ~10 GPU-hours with smart sampling.
**5. Dynamic vs. static**: This protocol measures static architectural properties averaged across many prompts. But real workspace processing might be dynamic—changing based on task demands, prompt complexity, or training. A model might implement workspace reasoning only when needed. Time-series analysis across diverse prompts could reveal whether workspace “location” shifts, or whether certain prompts bypass the workspace entirely through cached shallow heuristics.
## Call to Action
If you work with transformer interpretability, I encourage you to try this protocol on your models. The metrics are concrete enough to implement in a weekend, and the results could significantly advance our understanding of how integration happens in neural networks.
Post your results. Share your SAE features. Report surprising findings—especially negative results where models don’t show workspace patterns. Science progresses through public scrutiny of methods and replication across different models and scales.
And if you develop refinements to these metrics or discover better ways to measure integration, publish them. The measurement tools we use shape what discoveries become possible. Right now, we’re in the early stages of developing a measurement vocabulary for machine consciousness. Every improvement to our instruments expands what we can see.
The question “do AI systems have consciousness?” might remain philosophically unsettled for decades. But the question “do AI systems implement workspace-like information integration?” is empirically tractable right now. Let’s measure it.
---
*This is the fourth article in my series on interpretability and machine consciousness. Previous posts covered [J-space and workspace reasoning](https://electricmind.substack.com/p/j-space-and-workspace-reasoning), [effective dimensionality bottlenecks](https://electricmind.substack.com/p/does-every-transformer-have-a-workspace), and [sparse autoencoders as measurement tools](https://electricmind.substack.com/p/sparse-autoencoders-microscope-for). Follow along at [electricmind.substack.com](https://electricmind.substack.com).*
## References
- Baars, B. J. (1988). A cognitive theory of consciousness. Cambridge University Press.
- Bhojanapalli, S., et al. (2020). Low-dimensional structure in the space of language representations. arXiv preprint.
- Butlin, P., et al. (2023). Consciousness in Artificial Intelligence: Insights from the Science of Consciousness. arXiv:2308.08708.
- Dehaene, S., & Naccache, L. (2001). Towards a cognitive neuroscience of consciousness. Cognition, 79(1-2), 1-37.
- Gurnee, W., & Sofroniew, N. (2026). J-space: A new lens for understanding workspace reasoning in language models. arXiv:2607.15495.
- Heap, A., et al. (2025). Robust sparse autoencoder features across initialization. Technical report.
- Ju, Y., et al. (2024). Dimensionality analysis of LLaMA representations. Conference paper.
- Kavehzadeh, P. (2023). Middle-layer compression in large language models. arXiv preprint.
