Instruction Stack Audit Framework

ISAF Logger

Automatic compliance logging for AI systems. Add 3 lines of code, get EU AI Act-ready documentation with deterministic SHA-256 hash chain verification. Works with PyTorch, TensorFlow, JAX, and scikit-learn.

Why ISAF Logger?

AI regulations are here. EU AI Act, Colorado AI Act, NYC Local Law 144 all require documentation of how your AI systems were trained. ISAF automates this.

3 Lines of Code

Add compliance logging to any ML training pipeline with minimal code changes. Works with your existing workflow.

Full Stack Coverage

Automatically logs Layer 6 (Framework), Layer 7 (Data), and Layer 8 (Objectives) of the instruction stack.

Cryptographic Verification

SHA-256 hash chains prove lineage integrity. Tamper-evident audit trails that regulators trust.

Compliance Ready

Maps directly to EU AI Act Article 10 & 11, NIST AI RMF, ISO 42001, and Colorado AI Act requirements.

Framework Agnostic

Works with PyTorch, TensorFlow, JAX, and scikit-learn. Auto-detects your ML framework.

Flexible Storage

SQLite for local development, MLflow integration for production. Export to JSON anytime.

Quick Start

Get compliance logging in under 5 minutes

1Install

pip install haiec-isaf-logger

2Add to Your Code

import isaf

# Initialize ISAF (one line)
isaf.init()

# Add decorators to your training functions
@isaf.log_data(source="customer_data", version="3.2.1")
def load_training_data():
    return pd.read_csv("data.csv")

@isaf.log_objective(
    name="binary_crossentropy",
    constraints=["fairness < 0.05"]
)
def train_model(data):
    model = create_model()
    model.fit(data)
    return model

# Run training as normal
data = load_training_data()
model = train_model(data)

# Export compliance report (one line)
isaf.export("compliance_report.json")

3What Gets Logged

Layer 6: ML Framework

Framework versions, CUDA availability, default parameters, numerical precision

Layer 7: Training Data

Data source, version, shape, dtypes, missing values, preprocessing operations

Layer 8: Objective Function

Loss function, mathematical form, constraints, hyperparameters, justification

Cryptographic Hash Chain

Every layer is linked with SHA-256 hashes. Tamper-evident audit trail.

Regulatory Compliance Mappings

ISAF automatically maps your logged data to specific regulatory requirements

EU AI Act

Article 10 - Data Governance
Article 11 - Technical Documentation

NIST AI RMF

MEASURE-2.2 - Evaluation metrics
GOVERN-1.1 - AI policies

ISO 42001

Section 8.4 - Control of externally provided AI

Colorado AI Act

SB24-205 - Impact Assessment Documentation

CLI Tools

Inspect and verify lineage files from the command line

isaf inspect

View formatted report of lineage file with audit ID, timestamp, and logged layers.

isaf verify

Deterministic SHA-256 hash chain verification. Recomputes the chain and compares root hashes. Confirms data has not been tampered with.

isaf export-from-db

Export lineage from SQLite database to ISAF-compliant JSON format.

Deterministic Verification

How the hash chain works and why it is reproducible

SHA-256 Hash Chain

Each layer is serialized with canonical JSON (sorted keys, compact separators). The previous layer hash is prepended to the canonical payload, then SHA-256 is computed. This makes the chain deterministic: the same input always produces the same root hash.

Verification Process

isaf.verify_lineage() reloads the exported JSON, rebuilds the hash chain from the stack trace, and compares the computed root hash to the stored root hash. If any layer was modified after export, the root hashes will not match.

API Surface

isaf.init() - start session
@isaf.log_data - Layer 7
@isaf.log_objective - Layer 8
@isaf.log_framework - Layer 6
@isaf.log_all - all layers
isaf.export() - JSON + hash chain
isaf.verify_lineage() - verify chain
isaf.get_lineage() - retrieve data

Research Foundation

ISAF is based on a technical methodology published as a preprint on Zenodo with a registered DOI

Published Whitepaper

The Instruction Stack Audit Framework (ISAF): A Technical Methodology for Tracing AI Accountability Across Nine Abstraction Layers

KC, S. (2025). Version 1.0. Zenodo. DOI: 10.5281/zenodo.18080355

This framework addresses the fundamental traceability gap in AI governance by providing technical specifications for documenting the full instruction stack from hardware substrate to emergent behavior. Includes a 127-checkpoint audit protocol and cryptographic verification methodology.

Ready to Add Compliance Logging?

ISAF Logger is open source and free to use. Get started in minutes.

Built by HAIEC - Holistic AI Ethics & Compliance

Discuss AI →