Compliance Ontology
The compliance ontology is a directed graph encoding the relationships between regulatory frameworks, categories, articles, risk factors, mitigations, action types, data classifications, and resource types. It powers both the forward-chaining engine (rule-to-article mapping) and the Memgraph co-processor (graph traversal for RAG).Graph Statistics
| Metric | Value |
|---|---|
| Total nodes | 1,948 |
| Total edges | 1,075 |
| Frameworks | 7 |
| Categories | 43 |
| Articles | 259 |
| Risk Factors | 12 |
| Mitigations | 1,068 |
| Action Types | 34 |
| Data Classifications | 6 |
| Resource Types | 6 |
Node Types
Framework
Framework
Top-level regulatory frameworks.Supported: GDPR, HIPAA, SOC2, PCI-DSS, PII (general), OWASP (including LLM Top 10), ISO27001Properties:
id, label, jurisdictionCategory
Category
Groupings within frameworks. E.g.,
gdpr:consent_management, hipaa:phi_safeguards.Properties: id, label, framework, pagerank, community_idArticle
Article
Specific regulation text. E.g., GDPR Art. 5(1)(c), HIPAA §164.312(a)(1).Properties:
id, label, description, text (full regulatory text), pagerank, betweenness, community_idRiskFactor
RiskFactor
Abstract risk concepts that link actions to articles. E.g.,
rf:data_exfiltration, rf:gdpr_consent_violation.Properties: id, label, description, severity_weight, pagerankMitigation
Mitigation
Recommended controls and remediation steps.Properties:
id, text, effectiveness_score, community_idActionType
ActionType
Action taxonomy entries. E.g.,
at:email_send, at:database_query.Properties: id, label, risk_weightDataClass
DataClass
Data sensitivity classifications:
public, internal, pii, pii_sensitive, financial, health, auth, legal.Properties: id, label, sensitivity_levelResourceType
ResourceType
Resource categories for target classification.Properties:
id, labelEdge Types
| Edge Type | Source → Target | Description |
|---|---|---|
has_category | Framework → Category | Framework contains this category |
governed_by | Category → Article | Category governed by this article |
triggers | RiskFactor → Article | Risk factor triggers this article’s applicability |
mitigated_by | RiskFactor → Mitigation | Risk factor addressed by this mitigation |
implies_risk | ActionType → RiskFactor | Action type implies this risk |
accesses | ActionType → DataClass | Action type accesses this data class |
has_policy | Framework → Policy | Framework defines this policy |
subscribes_to | Tenant → Framework | Tenant subscribes to this framework |
Graph Traversal Patterns
Article Discovery for Risk Factors
Mitigation Coverage
Cross-Framework Impact
Storage
The ontology is stored as a JSON file atgraph/src/quint_graph/data/compliance_ontology.json (~558 KB) and loaded as a networkx.DiGraph at startup:
scripts/load_ontology_memgraph.py for graph-native queries.