Skip to main content

State-of-the-art RegTech and Cybersecurity Python library for KYC/AML automation, data security, and AI-driven risk analysis

Project description

Ununseptium

State-of-the-Art RegTech and Cybersecurity Python Library

CI Docs Quality Security Build Release Publish CodeQL Scorecard License PyPI version Python versions Coverage Code style: ruff Checked with pyright PRs Welcome Issues Last Commit Commit Activity Downloads SLSA 3


Table of Contents


Overview

Ununseptium is an enterprise-grade Python library providing comprehensive tooling for:

Domain Capabilities
KYC Automation Identity verification, document processing, sanctions screening, entity resolution
AML Monitoring Transaction analysis, typology detection, case management, regulatory reporting
Data Security PII detection/masking, encryption, access control, tamper-evident audit logs
AI Risk Engine Feature engineering, ensemble models, explainability, model governance
Scientific ML Physics-Informed Neural Networks, Neural ODEs, Neural Operators
Math/Stats Conformal prediction, EVT, Hawkes processes, copulas, graph statistics

Scope

Ununseptium provides computational primitives and frameworks for building compliance systems. It is designed for:

  • Financial institutions implementing AML/KYC programs
  • RegTech vendors building compliance platforms
  • Research teams developing risk quantification methods
  • Auditors requiring tamper-evident data trails

Non-Goals

  • Ununseptium is NOT a turnkey compliance solution
  • It does NOT provide legal advice or regulatory interpretation
  • It does NOT replace human judgment in compliance decisions
  • It is NOT a database or case management system (integrate with your own)

Installation

Requirements

  • Python 3.11 or higher
  • NumPy, SciPy, Pydantic v2

From PyPI

pip install ununseptium

From Source

git clone https://github.com/olaflaitinen/ununseptium.git
cd ununseptium
pip install -e ".[dev]"

Optional Dependencies

# Cryptography extras
pip install ununseptium[crypto]

# Full ML stack
pip install ununseptium[ml]

# All optional dependencies
pip install ununseptium[all]

Quick Start

Identity Verification

from ununseptium.kyc import Identity, IdentityVerifier

identity = Identity(
    full_name="John Doe",
    date_of_birth="1985-03-15",
    nationality="US",
    document_number="AB123456",
)

verifier = IdentityVerifier()
result = verifier.verify(identity)

print(f"Status: {result.status}")
print(f"Risk Level: {result.risk_level}")
print(f"Reason Codes: {result.reason_codes}")

Transaction Monitoring

from ununseptium.aml import Transaction, TypologyDetector

transactions = [
    Transaction(sender="ACC001", receiver="ACC002", amount=9500),
    Transaction(sender="ACC001", receiver="ACC003", amount=9600),
    Transaction(sender="ACC001", receiver="ACC004", amount=9400),
]

detector = TypologyDetector()
alerts = detector.detect(transactions)

for alert in alerts:
    print(f"Typology: {alert.typology_type}, Score: {alert.score}")

Tamper-Evident Audit

from ununseptium.security import AuditLog

log = AuditLog()

log.append({"action": "identity_verified", "identity_id": "ID-001"})
log.append({"action": "risk_assessed", "score": 0.72})

# Verify integrity
assert log.verify() is True

# Save with hash chain
log.save("audit.log")

Architecture

graph TB
    subgraph "Public API"
        CLI[CLI Interface]
        SDK[Python SDK]
    end

    subgraph "Domain Modules"
        KYC[KYC Module]
        AML[AML Module]
        SEC[Security Module]
    end

    subgraph "Intelligence Layer"
        AI[AI Module]
        MATH[MathStats Module]
        ZOO[Model Zoo]
    end

    subgraph "Infrastructure"
        CORE[Core Module]
        PLUG[Plugin System]
    end

    CLI --> KYC
    CLI --> AML
    SDK --> KYC
    SDK --> AML
    SDK --> SEC

    KYC --> AI
    AML --> AI
    AML --> MATH

    AI --> ZOO
    AI --> CORE
    MATH --> CORE

    SEC --> CORE
    PLUG --> CORE

Module Summary

Module Purpose Key Components
core Foundation Configuration, errors, logging, schemas
kyc Identity Verification, documents, screening, entity resolution
aml Transactions Monitoring, typologies, cases, reporting
security Protection PII, crypto, access control, audit logs
mathstats Statistics Conformal, EVT, Hawkes, copulas, graphs
ai Intelligence Features, models, explainability, governance
model_zoo Pretrained Catalog, download, verification
cli Interface Commands for all operations
plugins Extensibility Plugin discovery and loading

See docs/architecture/overview.md for detailed architecture documentation.


Security Posture

Ununseptium implements defense-in-depth security:

Data Protection

Layer Mechanism Implementation
Detection PII Scanner Regex patterns with configurable rules
Masking Tokenization Replace PII with reversible tokens
Encryption Fernet/AES Symmetric encryption with key rotation
Access RBAC Role-based permission enforcement

Integrity Assurance

The audit subsystem uses cryptographic hash chains:

$$H_n = \text{SHA256}(H_{n-1} | \text{entry}_n)$$

Where each entry is linked to its predecessor, making tampering detectable.

Threat Model

Threat Mitigation
PII Exposure Detection + masking pipeline
Unauthorized Access RBAC with audit logging
Data Tampering Hash-chain verification
Model Manipulation Checksums + provenance tracking

See docs/security/security-overview.md for the complete threat model.


Auditability

Every operation in ununseptium can be traced through the audit subsystem:

from ununseptium.security import AuditLog, AuditVerifier

# Create verifiable audit trail
log = AuditLog()
log.append({"action": "screening_completed", "matches": 0})

# Later: verify integrity
verifier = AuditVerifier()
result = verifier.verify_file("audit.log")

if not result.is_valid:
    raise SecurityError(f"Tamper detected at entry {result.failed_index}")

Audit Entry Schema

Field Type Description
id string Unique entry identifier
timestamp ISO-8601 Entry creation time
action string Action performed
actor string Who performed the action
resource string Affected resource
prev_hash string Hash of previous entry
entry_hash string Hash of this entry

Mathematical Foundations

Ununseptium provides statistically rigorous methods:

Conformal Prediction

Coverage-guaranteed prediction sets:

$$P(Y \in C(X)) \geq 1 - \alpha$$

from ununseptium.mathstats import ConformalPredictor

predictor = ConformalPredictor(alpha=0.1)
predictor.calibrate(y_cal, y_pred_cal)

pred_set = predictor.predict(y_new)
print(f"Interval: [{pred_set.lower}, {pred_set.upper}]")

Extreme Value Theory

Tail risk via Generalized Pareto Distribution:

$$F(x) = 1 - \left(1 + \xi \frac{x}{\sigma}\right)^{-1/\xi}$$

Sequential Detection

Real-time change detection with CUSUM, SPRT, and ADWIN algorithms.

See docs/mathstats/mathstats-overview.md for complete mathematical documentation.


Model Zoo

Pretrained models for common AML/KYC tasks:

Model ID Domain Architecture AUC-ROC
aml-transaction-risk-v1 AML Gradient Boosting 0.92
anomaly-detector-v1 Anomaly Ensemble 0.88
entity-resolution-v1 KYC Neural Network 0.91
sar-priority-v1 AML Transformer 0.87
graph-risk-v1 AML GNN 0.90
from ununseptium.model_zoo import PretrainedModel

model = PretrainedModel.load("aml-transaction-risk-v1")
result = model.predict(features)

See docs/model-zoo/model-zoo.md for the complete model catalog.


CLI Reference

# Display library information
ununseptium info

# Run diagnostics
ununseptium doctor

# Verify identity from JSON
ununseptium verify identity data.json --output result.json

# Screen a name
ununseptium screen name "John Doe" --threshold 0.8

# Verify audit log integrity
ununseptium audit verify audit.log

# Show audit entries
ununseptium audit show audit.log --limit 20

# Validate model card
ununseptium model validate model_card.json

Documentation

Comprehensive documentation is available in the docs/ directory:


Contributing

We welcome contributions. Please read CONTRIBUTING.md for:

  • Development setup
  • Code style guidelines
  • Testing requirements
  • Pull request process

License

Ununseptium is licensed under the Apache License 2.0. See LICENSE for details.


Citation

If you use ununseptium in academic work, please cite:

@software{ununseptium2025,
  author = {Laitinen, Olaf},
  title = {Ununseptium: RegTech and Cybersecurity Library},
  year = {2025},
  url = {<https://github.com/olaflaitinen/ununseptium>},
  version = {1.0.0}
}

See CITATION.md for additional citation formats.


Support


Disclaimer: Ununseptium provides computational tools only. It does not constitute legal, compliance, or regulatory advice. Users are responsible for ensuring their implementations meet applicable regulatory requirements. Consult qualified legal and compliance professionals for guidance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ununseptium-1.0.0-py3-none-any.whl (137.4 kB view details)

Uploaded Python 3

File details

Details for the file ununseptium-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ununseptium-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 137.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ununseptium-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7e9dd83c3914c26bb87979e2264998249598646a5b365fd47d783055fa4673
MD5 49995d0d167912c15d7023e082da6df9
BLAKE2b-256 3e62979db2fe4cb242da0c38681b326f7bd08726c59f6d189611b89fee093144

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page