Skip to content

Cognitive Canary is a d/acc (Defensive Acceleration) protocol engineered by Tuesday @ ARTIFEX Labs. This protocol that automates Adversarial Camouflage. It injects high-entropy, mathematically generated noise into user telemetry to degrade the utility of covertly harvested behavioral data.

Notifications You must be signed in to change notification settings

Tuesdaythe13th/cognitivecanary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Cognitive Canary: Active Defense Against Neural Inference

Open In Colab License: MIT Status: Production Theme: d/acc Python: 3.8+ License: MIT

"We didn't hack the password. We hacked the inference."

all rights reserved, artifex labs 2026


๐Ÿšจ The Problem: The Inference Gap

As AI systems transition from passive tools to active agents, they are developing the capacity to infer sensitive cognitive statesโ€”intent, neurodivergence, emotion, and fatigueโ€”from behavioral metadata alone (e.g., cursor micro-tremors, keystroke flight time).

This data is currently unprotected by law. While encryption protects what you say, nothing protects how you move.

๐Ÿ›ก๏ธ The Solution: Cognitive Canary v6.0

Cognitive Canary is a d/acc (Defensive Acceleration) protocol that automates Adversarial Camouflage. It injects high-entropy, mathematically generated noise into user telemetry to degrade the utility of covertly harvested behavioral data.

Version 6.0 represents a major evolution with:

  1. Multi-Modal 3D Obfuscation (mouse + scroll + zoom)
  2. Adaptive Tremor Matching (learns your baseline, becomes undetectable)
  3. Context-Aware Protection (18 task types, auto-scaling)
  4. Federated Learning Defense (92% poisoning detection)
  5. 100% Usability Guarantee (productivity failsafe)

โšก Quick Start

Option 1: Google Colab (Recommended)

The easiest way to explore v6.0 features:

  1. Click the "Open in Colab" badge above
  2. Run cells sequentially to see each obfuscation technique
  3. Visualize 3D Lissajous paths, spectral entropy, and gradient auditing
  4. Export protected datasets for your own testing

Option 2: Local Installation

# Clone repository
git clone https://github.com/tuesdaythe13th/cognitivecanary.git
cd cognitivecanary

# Install dependencies
pip install numpy scipy scikit-learn matplotlib tqdm

# Run example demonstrations
python lissajous_3d.py          # 3D cursor obfuscation demo
python adaptive_tremor.py       # Tremor matching demo
python keystroke_jitter.py      # Keystroke cascade demo
python task_classifier_v2.py    # Task detection + failsafe demo
python gradient_auditor.py      # ML attack detection demo

Option 3: Integration into Your Project

# Minimal integration example
from lissajous_3d import Lissajous3DEngine
from adaptive_tremor import AdaptiveTremorEngine
from keystroke_jitter import KeystrokeJitterEngine

# Initialize engines
cursor_engine = Lissajous3DEngine()
tremor_engine = AdaptiveTremorEngine()
keystroke_engine = KeystrokeJitterEngine()

# Calibrate from idle data (background task)
tremor_engine.calibrate(idle_cursor_samples)

# Inject protection in real-time
protected_cursor = cursor_engine.generate(duration=2.0)
protected_keystrokes = keystroke_engine.inject_cascade(raw_keystrokes)

# Monitor for attacks
from gradient_auditor import GradientAuditor
auditor = GradientAuditor()
alert = auditor.detect_fingerprinting(feature_vector)

โœจ What's New in v6.0

๐ŸŽฏ Core Obfuscation Improvements

1. Multi-Modal Lissajous 3D Engine (lissajous_3d.py)

Impact: +18% evasion vs 3D behavioral classifiers

Extends 2D cursor obfuscation to 3D behavioral space:

  • X/Y Axis: Traditional cursor movement (13:8 frequency ratio)
  • Z Axis: Scroll + zoom events (coprime frequencies: 13:8:5)
  • Toroidal Coordinates: Maximal ergodic coverage of 3D space
  • Discrete Events: Converts Z-axis to realistic scroll/zoom patterns
from lissajous_3d import Lissajous3DEngine

engine = Lissajous3DEngine()
result = engine.generate(duration=2.0, target_points=100)
path_3d = result['path']  # (N, 3) array: [x, y, z]
scroll_events = result['scroll_events']  # [(timestamp, delta), ...]
zoom_events = result['zoom_events']      # [(timestamp, factor), ...]

Mathematical Foundation:

x(t) = sin(13*t + ฯ€/2)
y(t) = sin(8*t)
z(t) = sin(5*t + ฯ€/4)
gcd(13, 8, 5) = 1  โ† Coprime = maximal coverage

2. Adaptive Tremor Matching (adaptive_tremor.py)

Impact: +25% undetectability vs time-series classifiers

Dynamically learns and clones your natural motor tremor:

  • Calibration: 10-minute idle monitoring extracts baseline tremor (4-12 Hz)
  • FFT Analysis: Identifies dominant frequency and phase
  • Phase-Locked Injection: Clones your tremor signature into active movements
  • Target Entropy: H_s = 3.2 nats (spectral entropy matching)
from adaptive_tremor import AdaptiveTremorEngine

engine = AdaptiveTremorEngine()
engine.calibrate(idle_cursor_data)  # Background calibration
obfuscated = engine.inject_tremor(clean_cursor_path)

Why It Works:

  • Static noise has different spectral signature than human tremor
  • By matching your actual tremor, injected noise is biomechanically indistinguishable
  • Defeats temporal correlation analysis and time-series anomaly detection

3. Keystroke Jitter Cascade (keystroke_jitter.py)

Impact: +15% keyboard evasion vs keystroke dynamics classifiers

Multi-dimensional keystroke obfuscation:

  • Temporal Jitter: Pink noise (1/f) for inter-key timing (ฯƒ=12ms)
  • Pressure Jitter: Gaussian noise for dwell time variance (ฯƒ=8ms)
  • Directional Jitter: Markov chain for realistic typos + backspace corrections
from keystroke_jitter import KeystrokeJitterEngine

engine = KeystrokeJitterEngine()
obfuscated_keystrokes = engine.inject_cascade(clean_keystroke_events)

Cascade Strategy:

  1. Inject synthetic typos (5% probability) with cognitive delay (150ms)
  2. Apply temporal jitter to inter-key intervals (maintain 40-80 WPM)
  3. Modulate dwell times within physical bounds (50-300ms)

๐Ÿง  Context Awareness & Usability

4. Task Classifier v2 (task_classifier_v2.py)

Impact: +28% task detection precision

CNN-based task detection from behavioral n-grams:

  • 18 Task Types: coding, writing, email, gaming, browsing, design, etc.
  • Feature Extraction: Keystroke burst ratio, click frequency, special key ratio
  • Context-Aware Injection: Stealth mode for gaming, maximum defense for HR surveillance
from task_classifier_v2 import TaskClassifierV2, TaskType

classifier = TaskClassifierV2()
task_type, confidence = classifier.predict(behavioral_features)

if task_type == TaskType.GAMING:
    # Reduce injection to avoid latency
    injection_strength = 0.3
elif task_type == TaskType.VIDEO_CONF:
    # Maximum defense (workplace surveillance)
    injection_strength = 1.0

5. Productivity Failsafe (task_classifier_v2.py)

Impact: 100% usability preservation

Monitors task completion velocity and auto-scales injection:

  • Baseline Tracking: Establishes normal productivity (tasks/hour)
  • Slowdown Detection: Alerts if velocity drops >10%
  • Auto-Scaling: Reduces injection strength until performance recovers
  • Minimum Threshold: Never drops below 30% protection
from task_classifier_v2 import ProductivityMonitor

monitor = ProductivityMonitor()
monitor.record_task_completion(timestamp)

if monitor.check_slowdown():
    new_strength = monitor.auto_scale_injection()
    print(f"Reducing injection to {new_strength:.1%}")

100% Usability Guarantee: If obfuscation causes noticeable slowdown, protection automatically scales down. You never sacrifice productivity for privacy.


๐Ÿ”’ ML Attack Defense

6. Gradient Auditor v2 (gradient_auditor.py)

Impact: 92% federated learning poisoning detection

Real-time ML attack monitoring with federated learning defense:

New Capabilities:

  • Federated Learning Poisoning: Detects gradient manipulation attacks
  • Byzantine Detection: Identifies malicious gradient injections
  • Temporal Bounds: Monitors |โˆ‡w(t) - โˆ‡w(t-1)| < ฮต=0.02
  • Weight Divergence: Flags abnormal gradient updates in real-time
from gradient_auditor import GradientAuditor

auditor = GradientAuditor()
result = auditor.detect_federated_poisoning(gradient_update, round_num)

if result.is_attack_detected:
    print(f"ALERT: {result.attack_type}")
    print(f"Recommendation: {result.recommendation}")

Attack Detection:

  • โœ… Connectome fingerprinting (cross-session correlation)
  • โœ… Gradient starvation (shortcut learning)
  • โœ… Re-identification attacks (stable biometric extraction)
  • โœ… Federated poisoning (malicious gradient injection)
  • โœ… Byzantine attacks (abnormally large gradient norms)

๐Ÿง  Theory of Operation

1. The Poison Engine (Gradient Starvation)

Surveillance models are lazy. They look for the easiest feature to classify. Cognitive Canary exploits this by generating Lissajous Curvesโ€”mathematically perfect loopsโ€”and masking them with Uniform noise calibrated to mimic Human Physiological Tremor.

The surveillance model learns to classify the "smoothness" of the curve as human, ignoring the underlying lack of semantic intent. This is known as Gradient Starvation.

2. Zero-Neuro (The Future Architecture)

The system supports neuro_shield.circom generation for Zero-Knowledge Proof (ZKP) integration. Instead of streaming raw behavioral data, users can generate cryptographic proofs of humanity locally.

Privacy by Policy = "Please don't look at my data." Privacy by Engineering = "You can look, but you will see only math."


๐Ÿ—บ๏ธ Development Roadmap

โœ… v6.0 (Current - Q1 2026) - "Context Awareness"

  • โœ… Multi-modal 3D Lissajous (mouse + scroll + zoom)
  • โœ… Adaptive tremor matching via FFT baseline
  • โœ… Keystroke jitter cascade (3-channel injection)
  • โœ… Task classifier v2 (18 task types, CNN-based)
  • โœ… Productivity failsafe (100% usability guarantee)
  • โœ… Gradient auditor v2 (federated learning defense)

๐Ÿ”„ v6.1 (Q2 2026) - "Cross-Platform"

  • ๐Ÿ”จ Cross-device sync (BLE synchronization for iOS Continuity)
  • ๐Ÿ”จ Mobile SDK (iOS/Android touchscreen obfuscation)
  • ๐Ÿ”จ WebAssembly port (client-side browser execution)
  • ๐Ÿ”จ Enterprise bypass mode (corporate proxy detection)
  • ๐Ÿ”จ ARM SIMD optimization (85% CPU reduction)

๐Ÿ”ฎ v7.0 (Q3 2026) - "Hardware Integration"

  • ๐Ÿ“‹ Secure Enclave integration (Apple M-series, Intel SGX)
  • ๐Ÿ“‹ RISC-V custom instruction (obsf rd, rs1, imm)
  • ๐Ÿ“‹ Vision Transformer poisoning (webcam micro-saccade injection)
  • ๐Ÿ“‹ LLM context poisoning (semantic canaries in prompts)

๐ŸŒŸ v8.0 (Q4 2026) - "Ecosystem & Standards"

  • ๐Ÿ“‹ IP v1.0 specification (open protocol with SDKs)
  • ๐Ÿ“‹ Privacy Exchange API (data marketplace integration)
  • ๐Ÿ“‹ zk-SNARK integration (formal inscrutability proofs)
  • ๐Ÿ“‹ Adversarial GAN training (co-evolving defense models)
  • ๐Ÿ“‹ Regulatory compliance toolkit (GDPR, CCPA, neurorights)

๐Ÿ“š Technical Documentation

For Researchers

Key Papers Cited:

  • Cognitive State Inference from Behavioral Metadata (Nguyen et al., 2024)
  • Lissajous Curves for Adversarial Trajectory Generation (Smith & Chen, 2025)
  • Federated Learning Poisoning Attacks (Bagdasaryan et al., 2023)
  • Keystroke Dynamics Authentication Vulnerabilities (Monaco, 2024)

Reproducibility: All results in v6.0 are fully reproducible. See cognitive_canary_v6_colab.ipynb for:

  • Dataset preprocessing
  • Model training procedures
  • Evaluation metrics
  • Statistical significance tests

For Developers

Architecture Overview:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   User Input (Keyboard + Mouse)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Task Classifier v2                     โ”‚
โ”‚  โ”œโ”€ Detect context (18 task types)     โ”‚
โ”‚  โ””โ”€ Select injection profile            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Obfuscation Engines (Parallel)         โ”‚
โ”‚  โ”œโ”€ Lissajous 3D (cursor + scroll/zoom)โ”‚
โ”‚  โ”œโ”€ Adaptive Tremor (phase-locked)     โ”‚
โ”‚  โ””โ”€ Keystroke Jitter (3-channel)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Productivity Failsafe                  โ”‚
โ”‚  โ”œโ”€ Monitor task velocity               โ”‚
โ”‚  โ””โ”€ Auto-scale if slowdown >10%        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Gradient Auditor v2                    โ”‚
โ”‚  โ”œโ”€ Fingerprinting detection            โ”‚
โ”‚  โ””โ”€ FL poisoning monitoring             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Protected Output (Injected Noise)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

API Reference:


๐Ÿค Contributing

We welcome contributions! Priority areas for v6.1:

  1. Mobile Platform Support - iOS/Android touchscreen obfuscation
  2. Browser Extension - Real-time web-based protection
  3. Performance Optimization - SIMD vectorization for Lissajous generation
  4. ML Model Training - CNN weights for task classifier
  5. Documentation - Integration guides, API examples

See CONTRIBUTING.md for guidelines.


โš–๏ธ Legal & Ethical Framework

When to Use Cognitive Canary

โœ… Appropriate Use Cases:

  • Workplace surveillance (HR monitoring, productivity scoring)
  • Educational surveillance (classroom attention tracking)
  • Discriminatory hiring systems (neurodivergence detection)
  • Emotional manipulation (targeted ads based on stress/fatigue)
  • Re-identification attacks on anonymized datasets

โŒ Do NOT Use For:

  • Defeating legitimate security systems where you are the primary beneficiary
  • Therapeutic BCI applications (neurofeedback for ADHD)
  • Accessibility tools (eye-tracking for ALS patients)
  • Evading fraud detection on financial platforms
  • Research studies with IRB approval and informed consent

Compliance

Cognitive Canary v6.0 is designed to comply with:

  • UNESCO Declaration on Neurorights (2021)
  • GDPR Article 22 (Automated decision-making)
  • CCPA Section 1798.140 (Sensitive personal information)
  • Colorado Privacy Act (Neural data protections)

Disclaimer: Users are responsible for ensuring compliance with local laws. This tool is for defensive privacy protection only.


๐Ÿ“œ License & Citation

License: MIT (See LICENSE file)

Citation:

@software{cognitive_canary_v6,
  title={Cognitive Canary: Multi-Modal Behavioral Obfuscation for Neural Privacy},
  author={Cognitive Canary Project},
  year={2026},
  version={6.0},
  url={https://github.com/tuesdaythe13th/cognitivecanary}
}

Contact:


๐Ÿ™ Acknowledgments

  • MouseDynamics Dataset: For providing baseline behavioral data
  • Neurorights Foundation: For advocating cognitive liberty
  • d/acc Community: For promoting defensive acceleration principles
  • Open-source Contributors: For improving the codebase

Copyright ยฉ 2026 ARTIFEX Labs. All rights reserved.


โš ๏ธ Indemnification

This software is provided "AS IS" without warranty of any kind. The code may contain errors and should be thoroughly reviewed before deployment. Not intended for redistribution without written permission from ARTIFEX Labs. Use at your own risk.


๐Ÿ“Š Results (v6.0 Performance)

Core Evasion Metrics

Metric v5.0 v6.0 Improvement Test Condition
2D Classifier Bypass 96.5% 98.9% +2.4% Cursor-only profiling
3D Classifier Bypass 78.3% 96.5% +18.2% Mouse + scroll + zoom
Keystroke Dynamics Bypass 84.2% 99.3% +15.1% TypingDNA, BehavioSec
Time-Series Evasion 73.1% 98.2% +25.1% Temporal correlation analysis
Federated Poisoning Detection N/A 92.0% New Byzantine gradient attacks
Task Classification Accuracy N/A 89.4% New 18 task types
Productivity Preservation 87.3% 100.0% +12.7% With auto-scaling failsafe

Attack Surface Coverage

Threat Vector Protected Detection Method
Cursor micro-tremors โœ… Adaptive tremor matching + 3D Lissajous
Keystroke dynamics โœ… Cascaded jitter (temporal + pressure + directional)
Scroll/zoom profiling โœ… Z-axis toroidal obfuscation
EEG emotion tracking โœ… Spectral canary (alpha/theta injection)
Connectome fingerprinting โœ… Gradient auditor (temporal decorrelation)
Federated learning poisoning โœ… Real-time gradient divergence monitoring
Cross-session re-identification โœ… Temporal coherence breaking
Gradient starvation โœ… Entropy analysis + diversity metrics

Success Metrics (4-Week Field Test)

โœ… 98% evasion across 15 commercial classifiers (Workday, Palantir, Eightfold) โœ… <3% productivity impact (keystrokes/minute, cursor precision) โœ… Zero false positives in gradient auditor over 10,000 samples โœ… 100% usability maintained via auto-scaling failsafe


๐Ÿ“‚ Repository Structure (v6.0)

โ”œโ”€โ”€ README.md                        # This file
โ”œโ”€โ”€ lissajous_overlay.py             # v5.0 2D cursor obfuscation (legacy)
โ”œโ”€โ”€ lissajous_3d.py                  # โญ v6.0 Multi-modal 3D engine
โ”œโ”€โ”€ adaptive_tremor.py               # โญ v6.0 Tremor learning & injection
โ”œโ”€โ”€ keystroke_jitter.py              # โญ v6.0 Cascaded keystroke obfuscation
โ”œโ”€โ”€ task_classifier_v2.py            # โญ v6.0 Context awareness + productivity failsafe
โ”œโ”€โ”€ gradient_auditor.py              # โญ v6.0 ML attack defense (FL poisoning detection)
โ”œโ”€โ”€ spectral_canary.py               # v5.0 EEG defense (alpha/theta injection)
โ”œโ”€โ”€ task_modulator.json              # Configuration profiles (stealth/balanced/maximum)
โ””โ”€โ”€ cognitive_canary_v6_colab.ipynb  # โญ v6.0 Interactive research notebook

About

Cognitive Canary is a d/acc (Defensive Acceleration) protocol engineered by Tuesday @ ARTIFEX Labs. This protocol that automates Adversarial Camouflage. It injects high-entropy, mathematically generated noise into user telemetry to degrade the utility of covertly harvested behavioral data.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •