You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v2 LinkML model (linkml/openlabel-v2/openlabel-v2.yaml) re-models the ASAM
OpenLABEL v1.0.0 scenario-tagging hierarchy as a hybrid of classes + enum-ranged
slots + enum values. This does not preserve the uniform rdfs:subClassOf
taxonomy that v1 uses. As a result, 24 of 256tag.type values (the ODD/Behaviour category classes and the structural roots) validate against the generated JSON
Schema but cannot be represented as v2 JSON-LD instance data — the converter
emits _unmapped_tags and SHACL validation fails (return code 210) — and the v1
leaf→category inference is lost.
This is a pre-existing v2 design characteristic that PR #81 surfaced: PR #81
added the category classes to the vocabulary so that v1 files using them validate;
that change is correct for validating v1 files, but it exposed that v2 has no instance-data representation for those tags.
Background: v1 vs v2 representation
v1 (authoritative ASAM ontology, submodules/.../ontologies/openlabel_ontology_scenario_tags.ttl) — every tag is an rdfs:Class in a single subsumption chain:
You can tag at any level, and rdfs inference rolls a leaf up to all of its
ancestors. Spec §8.2 ("Scenario tagging"): tag the most specific applicable tag;
the more general tags are inferred and need not be stored.
v2 (linkml/openlabel-v2/openlabel-v2.yaml) fragments the same hierarchy into
three different mechanisms:
v1 concept
v1
v2
SceneryJunction (category)
rdfs:Class
owl:Class (subClassOf OddScenery)
JunctionIntersection (mid-level)
rdfs:Class
slot (range: JunctionIntersectionEnum)
IntersectionCrossroad (leaf)
rdfs:Class
enum value
The subsumption chain is severed at the slot/enum boundary: enum values are
not rdfs:subClassOf the category classes.
The gap (evidence)
No category-level assertion. There is no slot to record "scenario has a
junction (type unspecified)". scripts/convert_openlabel_v1_to_v2.py routes
such tags to a _unmapped_tags property, which violates the closed v2 SHACL
shape:
Broken category inference. Tagging the leaf IntersectionCrossroad does not infer SceneryJunction, because the enum value is not a subclass of
the category class. v1's roll-up (§8.2) is lost.
openlabel_v2:SceneryJunction a owl:Class ; rdfs:subClassOf openlabel_v2:OddScenery — a floating category; none of its v1 children link back to it.
openlabel_v2:IntersectionCrossroad a owl:Class ; owl:unionOf ( … ) ; linkml:permissible_values … — modelled as an enumeration, not subClassOf JunctionIntersection.
Impact
24 / 256 vocabulary tag.type values are affected — every class-type tag:
These validate against the generated JSON Schema (correct for validating v1
files) but cannot round-trip to v2 JSON-LD / SHACL.
The other 232 leaf/enum/admin tags round-trip correctly (schema → convert →
SHACL all pass).
Search use case (ontology-based-nl-search): "find scenarios with any junction"
cannot use a single SceneryJunction query point; callers must enumerate and OR
all junction leaf-slots. v1 resolves this via subClassOf inference.
Possible solutions
Option A — v1-faithful class taxonomy (highest fidelity, largest change)
Model every tag as an is_a class with subClassOf, mirroring v1. Tagging becomes
uniform (any level) and rdfs inference rolls up natively.
Pros: exact v1 parity; clean inference; category assertion works; single mechanism; best for ASAM WG upstreaming.
Cons: large remodel of openlabel-v2.yaml; loses closed-enum JSON-LD ergonomics; significant OWL/SHACL/context regeneration; converter rewrite.
Option B — bridge enums to categories (incremental)
Keep enum-ranged slots for leaves, but (1) add rdfs:subClassOf/skos:broader from
each enum value's meaning IRI to its category class, and (2) add a SHACL-accepted
representation for category presence (e.g. a hasTag / category-membership construct);
teach the converter to emit it.
Pros: preserves enum ergonomics; restores inference; smaller than A.
Cons: dual representation (enum value + subclass link) is redundant; SHACL must be opened for category membership; converter changes; two mechanisms coexist.
Option C — leaf-only by design (smallest change, documents the boundary)
Accept v2 as a leaf-tag model: category-level tags are not assertable v2 data;
category search is done by OR-ing leaf slots. Scope category classes to schema-validation-only (valid tag.type for v1 files, not v2 instance data).
Make the converter skip category tags with a warning instead of emitting an
invalid _unmapped_tags, and document the boundary in SCHEMA_MODELING.md.
Summary
The v2 LinkML model (
linkml/openlabel-v2/openlabel-v2.yaml) re-models the ASAMOpenLABEL v1.0.0 scenario-tagging hierarchy as a hybrid of classes + enum-ranged
slots + enum values. This does not preserve the uniform
rdfs:subClassOftaxonomy that v1 uses. As a result, 24 of 256
tag.typevalues (the ODD/Behaviourcategory classes and the structural roots) validate against the generated JSON
Schema but cannot be represented as v2 JSON-LD instance data — the converter
emits
_unmapped_tagsand SHACL validation fails (return code 210) — and the v1leaf→category inference is lost.
This is a pre-existing v2 design characteristic that PR #81 surfaced: PR #81
added the category classes to the vocabulary so that v1 files using them validate;
that change is correct for validating v1 files, but it exposed that v2 has no
instance-data representation for those tags.
Background: v1 vs v2 representation
v1 (authoritative ASAM ontology,
submodules/.../ontologies/openlabel_ontology_scenario_tags.ttl) — every tag is anrdfs:Classin a single subsumption chain:You can tag at any level, and rdfs inference rolls a leaf up to all of its
ancestors. Spec §8.2 ("Scenario tagging"): tag the most specific applicable tag;
the more general tags are inferred and need not be stored.
v2 (
linkml/openlabel-v2/openlabel-v2.yaml) fragments the same hierarchy intothree different mechanisms:
SceneryJunction(category)rdfs:Classowl:Class(subClassOf OddScenery)JunctionIntersection(mid-level)rdfs:Classrange: JunctionIntersectionEnum)IntersectionCrossroad(leaf)rdfs:ClassThe subsumption chain is severed at the slot/enum boundary: enum values are
not
rdfs:subClassOfthe category classes.The gap (evidence)
junction (type unspecified)".
scripts/convert_openlabel_v1_to_v2.pyroutessuch tags to a
_unmapped_tagsproperty, which violates the closed v2 SHACLshape:
IntersectionCrossroaddoesnot infer
SceneryJunction, because the enum value is not a subclass ofthe category class. v1's roll-up (§8.2) is lost.
OWL evidence (
artifacts/openlabel-v2/openlabel-v2.owl.ttl):openlabel_v2:SceneryJunction a owl:Class ; rdfs:subClassOf openlabel_v2:OddScenery— a floating category; none of its v1 children link back to it.openlabel_v2:IntersectionCrossroad a owl:Class ; owl:unionOf ( … ) ; linkml:permissible_values …— modelled as an enumeration, notsubClassOf JunctionIntersection.Impact
tag.typevalues are affected — every class-type tag:Tag, AdminTag, Odd, Behaviour, RoadUser, ScenarioOddScenery, OddEnvironment, OddDynamicElements, SceneryJunction, SceneryDrivableArea, EnvironmentWeather, EnvironmentIllumination, EnvironmentConnectivity, DynamicElementsTraffic, DynamicElementsSubjectVehicle, BehaviourMotion, DrivableAreaGeometry, DrivableAreaLaneSpecification, DrivableAreaSigns, DrivableAreaSurface, GeometryHorizontal, GeometryLongitudinal, IlluminationDayfiles) but cannot round-trip to v2 JSON-LD / SHACL.
SHACL all pass).
cannot use a single
SceneryJunctionquery point; callers must enumerate and ORall junction leaf-slots. v1 resolves this via
subClassOfinference.Possible solutions
Option A — v1-faithful class taxonomy (highest fidelity, largest change)
Model every tag as an
is_aclass withsubClassOf, mirroring v1. Tagging becomesuniform (any level) and rdfs inference rolls up natively.
openlabel-v2.yaml; loses closed-enum JSON-LD ergonomics; significant OWL/SHACL/context regeneration; converter rewrite.Option B — bridge enums to categories (incremental)
Keep enum-ranged slots for leaves, but (1) add
rdfs:subClassOf/skos:broaderfromeach enum value's
meaningIRI to its category class, and (2) add a SHACL-acceptedrepresentation for category presence (e.g. a
hasTag/ category-membership construct);teach the converter to emit it.
Option C — leaf-only by design (smallest change, documents the boundary)
Accept v2 as a leaf-tag model: category-level tags are not assertable v2 data;
category search is done by OR-ing leaf slots. Scope category classes to
schema-validation-only (valid
tag.typefor v1 files, not v2 instance data).Make the converter skip category tags with a warning instead of emitting an
invalid
_unmapped_tags, and document the boundary inSCHEMA_MODELING.md.Recommendation
_unmapped_tags; documentthe v1↔v2 boundary. This makes the pipeline self-consistent immediately.
for the NL-search use case.
becomes a goal (e.g. upstreaming the model to the ASAM working group).
Acceptance criteria
SCHEMA_MODELING.mddocuments the v1↔v2 hierarchy difference and the chosen boundary.SceneryJunction).References
submodules/asam-openx-standards/standards/asam-openlabel/08-scenario-tagging.md§8.2 — tag hierarchy & inference semantics.submodules/asam-openx-standards/standards/asam-openlabel/ontologies/openlabel_ontology_scenario_tags.ttl— v1 class taxonomy.linkml/openlabel-v2/openlabel-v2.yaml,artifacts/openlabel-v2/openlabel-v2.owl.ttl,scripts/convert_openlabel_v1_to_v2.py.