Skip to main content
This guide provides a quick introduction to using the MultiMind Compliance Framework. For detailed documentation, see the Compliance Framework Guide.

Installation

The regulation managers used below (GovernanceConfig, PrivacyCompliance, the domain managers, and the advanced classes) are gated behind the compliance extra; the runtime PII guard and evidence reporting work on a core install. Install with pip (Python 3.10+):

Basic Setup

  1. Import the required modules:
  1. Configure the governance settings:

Common Use Cases

1. Privacy Compliance

2. AI System Compliance

3. Cross-Border Data Transfer

4. Accessibility Compliance

5. Supply Chain Compliance

6. Corporate Compliance

Advanced Compliance Features

The classes in multimind.compliance.advanced (re-exported from multimind.compliance) each take a plain dict configuration, but most of them are fail-closed stubs in 1.0.0: rather than fabricate a proof, patch, watermark, or explanation, they raise NotImplementedError until a real backend is integrated. The status below was verified by calling each method; see compliance.md for the full table.

1. Federated Compliance — unavailable

FederatedCompliance(config).verify_global_compliance(data) always raises NotImplementedError (no coordinator or consensus backend ships), and ComplianceShard.verify_compliance raises because local rule evaluation is not implemented. Do not build on these yet.

2. Regulatory Change Detection — use RegulatoryWatcher

RegulatoryChangeDetector(config={}) fails on construction in 1.0.0 (AttributeError: '_initialize_regulatory_sources'), and its patch validation is unimplemented. The working alternative is the hash-based watcher, which needs no extras and makes no legal interpretation:

3. Zero-Knowledge Compliance Proofs — unavailable

multimind.compliance.advanced.ZeroKnowledgeProof is a fail-closed stub: without a real ZKP backend installed, prove and verify raise NotImplementedError rather than fabricating a proof. HomomorphicEncryption.encrypt likewise raises. Treat these as unavailable until a backend integration ships.

4. Differential Privacy — works

5. Model Fingerprinting — partial

watermark_model and verify_watermark raise NotImplementedError (no watermarking backend), so there is no actual watermark embedding or verification in 1.0.0.

6. Self-Healing Policies — unavailable

SelfHealingCompliance(config).check_and_heal(state) returns the state unchanged (with patches_applied: []) when it detects nothing, and raises NotImplementedError as soon as a vulnerability is detected (for example {"status": "needs_healing"}), because automatic patch application is not implemented.

7. Explainable Compliance — unavailable

ExplainableDTO(config).explain_decision(decision) raises NotImplementedError (no explanation model backend is configured).

Model Training with Compliance

multimind.compliance.model_training wraps a PyTorch training loop with compliance metrics. It needs torch (not part of the compliance extra; install multimind-sdk[finetune] or torch directly): train() iterates DataLoader batches and expects each batch to be a dict with "input" and "target" keys. The bias/privacy/transparency/fairness scores are heuristic and the trainer never stops training on a violation (_should_stop_training always returns False).

1. Basic Setup

2. Dataset Compliance

3. Training with Monitoring

4. Compliance Evaluation

5. Saving Results

Best Practices

  1. Start with Core Regulations
    • Begin with GDPR and AI Act
    • Add more regulations as needed
    • Keep configurations up to date
  2. Regular Assessments
    • Schedule regular compliance checks
    • Monitor for violations
    • Document all assessments
  3. Error Handling
    • Implement proper error handling
    • Log compliance violations
    • Set up alerts for critical issues
  4. Documentation
    • Keep records of all assessments
    • Document compliance decisions
    • Maintain audit trails

Best Practices for Advanced Features

  1. Regulatory Monitoring (RegulatoryWatcher)
    • Keep state_path on durable storage so diffs span runs
    • Review raw diffs yourself; the watcher does not interpret them
  2. Differential Privacy (AdaptivePrivacy, DPMechanism, PrivacyBudget)
    • Choose epsilon deliberately and track spend with PrivacyBudget
    • Validate that the noise scale fits your data’s sensitivity
  3. Model Fingerprinting (ModelWatermarking.track_fingerprint)
    • Remember the fingerprint is derived from repr(model), not weights
    • Store fingerprint records alongside your audit trail
The federated, zero-knowledge, self-healing, and explainable-DTO classes are fail-closed stubs in 1.0.0 (see above); there is nothing to configure for them yet.

Best Practices for Model Training

  1. Data Preparation
    • Ensure data meets privacy requirements
    • Check for bias in training data
    • Document data sources and processing
  2. Compliance Monitoring
    • Set appropriate thresholds
    • Monitor metrics during training
    • Handle violations promptly
  3. Evaluation
    • Use comprehensive metrics
    • Test across different scenarios
    • Document evaluation results
  4. Documentation
    • Keep detailed training logs
    • Document compliance decisions
    • Maintain audit trails

Next Steps

  1. Review the Compliance Framework Guide for detailed documentation
  2. Explore specific compliance modules based on your needs
  3. Set up monitoring and alerting
  4. Implement regular compliance checks

Support

For help: