KlarKI โ€” EU AI Act Article 5 Prohibited Practice Classifier

Binary classification โ€” detects EU AI Act Article 5 prohibited AI practices

Part of KlarKI โ€” a local-first EU AI Act + GDPR compliance auditor for German SMEs. All inference runs on-device. No data leaves your machine.


Model Overview

Property Value
Base model deepset/gbert-base
Architecture Transformers โ€” BertForSequenceClassification
Parameters ~110M parameters
Languages German (primary), English
Training samples 1371 train / 243 validation
License MIT
Part of KlarKI audit pipeline

Quickstart

Option A โ€” Via KlarKI (recommended)

Use this if you want the full audit pipeline. The download script places all 5 models exactly where KlarKI expects them.

git clone https://github.com/s4nkar/KlarKI-EU-AI-Act-compliance-auditor.git
cd KlarKI-EU-AI-Act-compliance-auditor
pip install huggingface-hub>=0.26.0
python scripts/download_pretrained.py --model prohibited
./run.sh up

Option B โ€” Direct usage

from transformers import pipeline

classifier = pipeline("text-classification", model="s4nkar/klarki-prohibited-classifier")
result = classifier("The system assigns a social score to citizens based on their behaviour and personal characteristics.")
# Output: [{'label': 'prohibited', 'score': 0.99}]

Labels

Label Description
prohibited Describes a practice prohibited under Article 5 of the EU AI Act
not_prohibited Does not describe a prohibited practice

Evaluation Results

Overall

Macro F1 Val samples
0.9794 243

Per-Class

Class Precision Recall F1 Support
prohibited 1.0000 0.9590 0.9791 122
not_prohibited 0.9603 1.0000 0.9798 121

Training Details

Property Value
Base model deepset/gbert-base
Training epochs 5 (AdamW, early stopping)
Batch size 16
Data split 85% train / 15% validation, stratified, seed=42
Data generation Async Ollama-grounded synthesis (phi3:mini) + real regulatory text
Optimiser AdamW
Training framework Docker container (Python 3.11, isolated from host)

Intended Use

Detecting prohibited practices including social scoring, real-time biometric surveillance in public spaces, subliminal manipulation, and emotion recognition in workplace/education contexts. Augments KlarKI's 9-pattern regex detection at confidence >= 0.85.

This model is a decision-support tool, not a substitute for qualified legal advice. EU AI Act compliance determinations should always be reviewed by a legal professional.


Limitations

  • High-stakes classification โ€” always used with deterministic pattern fallback in KlarKI.
  • Context-dependent: the same phrase may or may not be prohibited depending on deployment setting.
  • Do not use standalone for compliance decisions; use within an ensemble.

Citation

@software{klarki2026,
  author    = {Sankar},
  title     = {KlarKI: Local-First EU AI Act and GDPR Compliance Auditor},
  year      = {2026},
  url       = {https://github.com/s4nkar/KlarKI-EU-AI-Act-compliance-auditor},
  note      = {Open-source compliance tooling for German SMEs}
}

About KlarKI

KlarKI is an open-source, local-first EU AI Act + GDPR compliance auditor built for German SMEs. Upload a policy document and receive a scored gap analysis against Articles 9โ€“15 entirely on your own hardware.

Key features:

  • Deterministic legal decision hierarchy (actor detection, Annex III applicability gate)
  • Hybrid RAG retrieval (BM25 + ChromaDB vector + cross-encoder re-ranking)
  • LangGraph multi-agent gap analysis (3-node per applicable article)
  • Bilingual EN/DE support โ€” all inference runs locally, no external API calls

GitHub  |  All KlarKI Models

Downloads last month
52
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for s4nkar/klarki-prohibited-classifier

Finetuned
(78)
this model

Evaluation results

  • Macro F1 on KlarKI EU AI Act Regulatory Training Data
    self-reported
    0.979