# luisreygarciafigueroa-creator/iom architecture

> Architecture diagram of the GitHub repository luisreygarciafigueroa-creator/iom, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/luisreygarciafigueroa-creator/iom
- Repository: https://github.com/luisreygarciafigueroa-creator/iom

## Overview

IOM is a research demonstration for assessing whether its semantic framework can be applied interpretably to real-world concepts and pairs, not a general-purpose software product. The central workflow is blind annotation of relation pairs followed by independent agreement scoring. Separate branches examine formal consistency, RDF/SHACL conformance, synthetic rule recovery, and empirical-domain alignment; guided ingestion and ontology generation support the framework’s data representation. Relationships below follow README descriptions and shown source behavior; unsampled subsystems are included only where the README documents them.

Main entry points: [`ontology/io_ontology.ttl`](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/ontology/io_ontology.ttl) (RDF ontology), [`experiments/pi_hgat_t.py`](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/pi_hgat_t.py) (PI-HGAT-T model), [`experiments/domain_mapping/validate_examples.py`](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/domain_mapping/validate_examples.py) (Domain mapping validation), [`data/iom_spec.json`](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/data/iom_spec.json) (IOM specification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_evaluation["Semantic evaluation"]
  node_real_pairs["Evaluation pairs<br/>[annotations.json]"]
  node_agreement["Agreement scoring"]
end

subgraph group_formal["Formal framework"]
  node_spec["IOM specification<br/>[iom_spec.json]"]
  node_lean["Lean formal rules<br/>[FormalRules.lean]"]
  node_lean_core["Lean core<br/>[Core.lean]"]
  node_ontology_gen["Ontology generation"]
  node_ontology["RDF ontology<br/>[io_ontology.ttl]"]
  node_shapes["SHACL shapes<br/>[io_shapes.ttl]"]
  node_shacl_validation["SHACL validation<br/>[validate_shacl.py]"]
end

subgraph group_experiments["Model experiments"]
  node_model["PI-HGAT-T model<br/>[pi_hgat_t.py]"]
  node_baselines["Baseline classifiers<br/>[baselines.py]"]
  node_experiment_results["Experiment results"]
end

subgraph group_domain["Domain alignment"]
  node_ingestion["Guided data ingestion"]
  node_aligned["Aligned domain data"]
  node_domain_validation["Domain mapping validation"]
  node_domain_examples["Mapping examples<br/>[examples.json]"]
  node_canonical_nodes["Canonical triad nodes<br/>[triad_nodes.csv]"]
  node_relation_candidates["Relation candidates"]
end

node_annotators(("Blind annotators"))

node_annotators -->|"label pairs"| node_real_pairs
node_real_pairs -->|"score annotations"| node_agreement
node_spec -->|"generates from"| node_ontology_gen
node_ontology_gen -->|"writes ontology"| node_ontology
node_spec -.->|"formalizes rules"| node_lean
node_lean -.->|"uses core"| node_lean_core
node_ontology -->|"validates RDF"| node_shacl_validation
node_shapes -->|"checks conformance"| node_shacl_validation
node_ingestion -->|"produces alignment"| node_aligned
node_domain_examples -->|"validates examples"| node_domain_validation
node_canonical_nodes -->|"checks node IDs"| node_domain_validation
node_relation_candidates -->|"checks relations"| node_domain_validation
node_ontology -.->|"supplies rule labels"| node_model
node_relation_candidates -.->|"evaluates pairs"| node_model
node_model -->|"reports metrics"| node_experiment_results
node_baselines -->|"reports comparison"| node_experiment_results

click node_real_pairs "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/independent_eval/annotations.json"
click node_agreement "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/score_independent_eval.py"
click node_spec "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/data/iom_spec.json"
click node_lean "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/IOM/FormalRules.lean"
click node_lean_core "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/IOM/Core.lean"
click node_ontology_gen "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/generate_ontology.py"
click node_ontology "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/ontology/io_ontology.ttl"
click node_shapes "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/ontology/io_shapes.ttl"
click node_shacl_validation "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/validate_shacl.py"
click node_ingestion "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/importar_datos_personalizados.py"
click node_aligned "https://github.com/luisreygarciafigueroa-creator/iom/tree/main/datasets/ingestion/aligned"
click node_domain_validation "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/domain_mapping/validate_examples.py"
click node_domain_examples "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/domain_mapping/examples.json"
click node_canonical_nodes "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/triad_nodes.csv"
click node_relation_candidates "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/relation_candidates.csv"
click node_model "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/pi_hgat_t.py"
click node_baselines "https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/baselines.py"
click node_experiment_results "https://github.com/luisreygarciafigueroa-creator/iom/tree/main/experiments/results"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_real_pairs,node_agreement toneBlue
class node_spec,node_lean,node_lean_core,node_ontology_gen,node_ontology,node_shapes,node_shacl_validation toneAmber
class node_model,node_baselines,node_experiment_results toneMint
class node_ingestion,node_aligned,node_domain_validation,node_domain_examples,node_canonical_nodes,node_relation_candidates toneRose
class node_annotators toneIndigo
```

## Components

### Semantic evaluation

- [Evaluation pairs](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/independent_eval/annotations.json): `datasets/independent_eval/annotations.json`
- [Agreement scoring](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/score_independent_eval.py): `scripts/score_independent_eval.py`

### Formal framework

- [IOM specification](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/data/iom_spec.json): `data/iom_spec.json`
- [Lean formal rules](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/IOM/FormalRules.lean): `IOM/FormalRules.lean`
- [Lean core](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/IOM/Core.lean): `IOM/Core.lean`
- [Ontology generation](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/generate_ontology.py): `scripts/generate_ontology.py`
- [RDF ontology](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/ontology/io_ontology.ttl): `ontology/io_ontology.ttl`
- [SHACL shapes](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/ontology/io_shapes.ttl): `ontology/io_shapes.ttl`
- [SHACL validation](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/validate_shacl.py): `scripts/validate_shacl.py`

### Model experiments

- [PI-HGAT-T model](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/pi_hgat_t.py): `experiments/pi_hgat_t.py`
- [Baseline classifiers](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/baselines.py): `experiments/baselines.py`
- [Experiment results](https://github.com/luisreygarciafigueroa-creator/iom/tree/main/experiments/results): `experiments/results`

### Domain alignment

- [Guided data ingestion](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/scripts/importar_datos_personalizados.py): `scripts/importar_datos_personalizados.py`
- [Aligned domain data](https://github.com/luisreygarciafigueroa-creator/iom/tree/main/datasets/ingestion/aligned): `datasets/ingestion/aligned`
- [Domain mapping validation](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/domain_mapping/validate_examples.py): `experiments/domain_mapping/validate_examples.py`
- [Mapping examples](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/experiments/domain_mapping/examples.json): `experiments/domain_mapping/examples.json`
- [Canonical triad nodes](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/triad_nodes.csv): `datasets/triad_nodes.csv`
- [Relation candidates](https://github.com/luisreygarciafigueroa-creator/iom/blob/main/datasets/relation_candidates.csv): `datasets/relation_candidates.csv`

### Other components

- **Blind annotators**

## Connections

- Blind annotators → Evaluation pairs: label pairs (evidence: `README.md`)
- Evaluation pairs → Agreement scoring: score annotations (evidence: `README.md`)
- IOM specification → Ontology generation: generates from (evidence: `scripts/generate_ontology.py`)
- Ontology generation → RDF ontology: writes ontology (evidence: `scripts/generate_ontology.py`)
- IOM specification → Lean formal rules: formalizes rules
- Lean formal rules → Lean core: uses core
- RDF ontology → SHACL validation: validates RDF (evidence: `README.md`)
- SHACL shapes → SHACL validation: checks conformance (evidence: `README.md`)
- Guided data ingestion → Aligned domain data: produces alignment (evidence: `scripts/importar_datos_personalizados.py`)
- Mapping examples → Domain mapping validation: validates examples (evidence: `experiments/domain_mapping/validate_examples.py`)
- Canonical triad nodes → Domain mapping validation: checks node IDs (evidence: `experiments/domain_mapping/validate_examples.py`)
- Relation candidates → Domain mapping validation: checks relations (evidence: `experiments/domain_mapping/validate_examples.py`)
- RDF ontology → PI-HGAT-T model: supplies rule labels
- Relation candidates → PI-HGAT-T model: evaluates pairs
- PI-HGAT-T model → Experiment results: reports metrics (evidence: `README.md`)
- Baseline classifiers → Experiment results: reports comparison (evidence: `README.md`)
