Skip to content
schindl1Public

About

tau_A: Adaptive Reintegration Time Constant extraction for consciousness research. Python package implementing the Phase-State Theory of Consciousness (PSTC) biomarker pipeline. Supports TMS-EEG, tFUS, auditory, visual, and nociceptive perturbation paradigms.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Proof of concept demonstration

python examples/pstc_proof_of_concept.py --save# taua — Adaptive Reintegration Time Constant (tau_A) extraction

Python 3.8+ License: MIT bioRxiv

tau_A is a consciousness and cognitive state biomarker defined within the Phase-State Theory of Consciousness (PSTC) as the time required for mean-field neural coherence to be restored following a precisely timed perturbation.

The PSTC consciousness function is:

C = k · H · I · M · B

where H is neural entropy, I is integration, M is metastability, and B is biological regulatory infrastructure. tau_A is the empirically accessible measure of M, related to the dominant eigenvalue of the reintegration network by tau_A ~ 1/|Re(λ_max)|, and to conscious-state richness by:

C(tau_A) = exp(−(tau_A − tau_c)² / 2σ_τ²)

Values within the metastable window (tau_min ≤ tau_A ≤ tau_max) are the diagnostic signature of conscious metastability. Departures in either direction — solid-like (tau_A < tau_min) or gas-like (tau_A > tau_max) — indicate pathological phase-state displacement.


Installation

pip install taua

With MNE-Python integration (recommended for TMS-EEG data):

pip install taua[mne]

From GitHub (latest):

pip install git+https://github.com/mschindler-msu/taua.git

Quickstart

import numpy as np
from taua import TauAExtractor
from taua.classifier import PhaseStateClassifier

# Load your TMS-EEG epochs: (n_epochs, n_channels, n_times), µV
epochs = np.load("my_tms_eeg.npy")
times  = np.linspace(-0.1, 0.7, epochs.shape[2])  # seconds

# Extract tau_A
ext    = TauAExtractor(sfreq=1000)
result = ext.fit(epochs, times, perturbation_onset=0.0)

# Classify against normative PSTC window
clf = PhaseStateClassifier(population="healthy_adult", modality="tms")
clf.classify(result)

print(result.summary())
# ======================================================
#   tau_A Extraction Result
# ======================================================
#   tau_A:           178.4 ms  (95% CI: 152.1–198.7 ms)
#   Phase state:     metastable
#   Complexity:      0.6124
# ======================================================

Loading data

from taua.io import from_mne_epochs, load_tms_eeg

# From MNE Epochs object (any TMS-EEG dataset)
import mne
epochs_mne = mne.read_epochs("my_data-epo.fif")
data, times, sfreq = from_mne_epochs(epochs_mne)

# From .npz, .fif, .set, .vhdr, or .csv
data, times, sfreq = load_tms_eeg("my_data.npz")

C(tau_A) function

from taua import compute_c_taua, c_taua_curve
import numpy as np

# Conscious-state richness at a given tau_A
print(compute_c_taua(0.175))   # 1.0   — at tau_c, maximum C
print(compute_c_taua(0.080))   # 0.42  — at tau_min
print(compute_c_taua(0.040))   # 0.17  — SWS / deep anesthesia (solid-like)
print(compute_c_taua(0.600))   # ~0.0  — MCS / absent response (gas-like)

# Full C(tau_A) curve for plotting
tau_vals, c_vals = c_taua_curve()

Perturbation modalities

Modality modality= parameter Description
TMS-EEG "tms" Gold standard; Massimini / Casali paradigm
Transcranial focused ultrasound "tFUS" Sub-therapeutic, EEG detection
Auditory FMSS "auditory" FM steady-state phase reversal
Visual SSVEP "visual" Photic steady-state phase reversal
Nociceptive "nociceptive" Von Frey / thermode evoked response

Lock-in method for periodic paradigms (FMSS, SSVEP)

result = ext.fit_lockin(
    signal=eeg_channel,
    times=times,
    drive_frequency=40.0,       # Hz
    phase_reversal_time=2.5,    # seconds
)

Phase-state classification

from taua.classifier import PhaseStateClassifier

# Using normative defaults
clf = PhaseStateClassifier(population="healthy_adult", modality="tms")

# Or specify window directly
clf = PhaseStateClassifier(tau_min=0.080, tau_max=0.350)

# Single result
clf.classify(result)
print(result.phase_state)  # 'metastable', 'solid_like', or 'gas_like'

# Batch — DoC patient cohort
results = [ext.fit(e, times) for e in patient_epochs_list]
clf.classify_batch(results)
print(clf.group_summary(results))

Normative database

from taua.norms import NormativeDatabase
import numpy as np

db = NormativeDatabase()
print(db.available_populations())
# ['healthy_adult', 'elderly', 'sws', 'rem_sleep',
#  'clinical_mcs', 'clinical_uws', 'light_anesthesia', 'deep_anesthesia']

# Add your own empirical normative data
db.add_empirical(
    population="my_cohort",
    modality="tms",
    tau_values=np.array([0.14, 0.17, 0.19, 0.21, ...]),
    source="My Lab (2026)",
)

# Z-score an individual result
z = db.z_score(result.tau_A, population="healthy_adult", modality="tms")

Visualisation

from taua.viz import plot_result, plot_group

# Single result: grand avg + envelope + phase diagram + summary table
fig, axes = plot_result(result, save_path="result.png")

# Group: tau_A distribution with phase-state bands
fig, ax = plot_group(results, labels=subject_ids, save_path="group.png")

Command-line interface

# Extract tau_A from a .npz file
taua extract data.npz --onset 0.0 --method envelope \
    --population healthy_adult --modality tms --plot result.png

# Print version and normative database summary
taua info

Cogitate dataset re-analysis

The examples/ directory includes a complete template for re-analysing the Cogitate adversarial collaboration TMS-EEG dataset (publicly available at OSF):

python examples/cogitate_reanalysis_template.py /path/to/cogitate_data.npz

This tests five pre-registered PSTC predictions against the Cogitate data:

  1. tau_A within metastable window in conscious perception trials
  2. tau_A solid-like in non-conscious suppression trials
  3. tau_A(conscious) > tau_A(non-conscious)
  4. Greater complexity in conscious than non-conscious trials
  5. IIT- and GWT-inconsistent trials correspond to opposite tau_A failure modes

Pre-registration

The predictions testable with taua are pre-registered on OSF:

DOI: [to be added on registration]

Pre-registration includes quantitative falsification criteria for all predictions. Any group running these analyses is encouraged to file results — confirming or disconfirming — as a comment on the OSF registration.


Contributing normative data

If you extract tau_A from your TMS-EEG dataset, please contribute normative values to expand the reference database. Open an issue or pull request at:

https://github.com/mschindler-msu/taua

Include: modality, population (clinical category), n, mean tau_A (ms), SD, tau_min, tau_max, perturbation protocol.


Citation

If you use taua in your research, please cite the PSTC core paper:

@article{schindler2026pstc,
  title   = {{Phase-State Theory of Consciousness (PSTC):
              Consciousness as Metastable Entropic Criticality}},
  author  = {Schindler, Melvin},
  journal = {bioRxiv},
  year    = {2026},
  doi     = {[to be added on posting]}
}

And the taua software:

@software{schindler2026taua,
  title   = {{taua: Adaptive Reintegration Time Constant extraction}},
  author  = {Schindler, Melvin},
  year    = {2026},
  url     = {https://github.com/mschindler-msu/taua},
  version = {0.1.0}
}

Licence

MIT © Melvin Schindler, Michigan State University


Related papers

All five Wave 1 PSTC papers are available as preprints:

  • Core theory: Schindler M. (2026). Phase-State Theory of Consciousness (PSTC). bioRxiv.
  • Cell to consciousness: Schindler M. (2026). The Corralling Principle. bioRxiv.
  • AI application: Schindler M. (2026). PSTC Applied to Artificial Intelligence. arXiv.
  • Circadian corralling: Schindler M. (2026). Circadian Corralling of Metastability. bioRxiv.
  • Recursive corralling: Schindler M. (2026). Recursive Corralling. bioRxiv.

About

tau_A: Adaptive Reintegration Time Constant extraction for consciousness research. Python package implementing the Phase-State Theory of Consciousness (PSTC) biomarker pipeline. Supports TMS-EEG, tFUS, auditory, visual, and nociceptive perturbation paradigms.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages