8. The HED ontology¶
This chapter defines the HED ontology and its relationship to the HED schema. HED maps all of its entities (i.e., standard schema, library schemas, structural elements, properties) into a single namespace with unique IRI (International Resource Identifier) identifiers as explained in 8.3 HED global identifiers.
The GitHub source repository for the HED ontologies is hed-ontology. The GitHub source repository for the HED schemas is hed-schemas.
8.1. HED views and representations¶
8.1.1. The annotator’s view¶
HED (Hierarchical Event Descriptors) has a standard hierarchically-organized vocabulary (the HED standard schema) and additional community-specific vocabularies (HED library schemas) that can be used to annotate and analyze experimental data. The HED vocabularies and the supporting HED ecosystem are designed to support these activities.
The data annotator’s natural view is top-down – identifying a general category and then filling out the details with more specific tags in that category or grouping with descriptive tags from other categories. As illustrated in the following diagram, the HED schema hierarchy is organized in a top-down manner to support this work-flow.

In the diagram, top-level tags S1, S4, and L6 represent general categories and are roots of subtrees organized so that child nodes are more specific terms. HED supports “search generality”, so searches may specify an exact match or matches to any term in a particular subtree. In the latter case, a search for Event may also match any of its descendents (e.g., Sensory-event or Agent-action).
The HED schema viewer, allows users to focus on top-level categories or expand the hierarchy view to any specified level of detail.
8.1.2. The ontologist’s view¶
A second view of HED — the HED ontology — provides a mapping between HED schemas and classical ontologies in order to support semantic analysis and reasoning.
The following diagram shows the ontology view of HED. The nodes of the HED schema are embedded in the HED ontology, but the view is “term-centric” or “bottom-up” with links from the given term to its parent class (yellow arrows) and as well links between the given term and other terms (gray arrows).

The ontology represents a complex network of interrelationships among the terms in the HED hierarchy and terms in other ontologies. The HED ontology and its mapping have been made explicit starting with HED standard schema 8.3.0. The goal is to include links to additional information including provenance and examples during annotation and to leverage AI tools during annotation and analysis.
8.1.3. HED information space¶
The HED schema is embedded in a larger information space that includes additional information such as sources, provenance, and links to other ontologies. This HED information space is illustrated schematically in the following diagram.

The embedding is anchored by the hedId schema attribute introduced with HED standard schema 8.3.0. The hedId values are of the form HED_xxxxxxx and resolve to IRIs (International Resource Identifiers) in the https://purl.org/hed/hed.owl file. This file is currently hosted on GitHub and does not have a mechanism to address individual IDs defined within the file. The ontology files are versioned by release date. Releases are located in the releases subdirectory of the hed-ontology repository on GitHub.
The extended information space is completely represented by the HED ontology in OWL format. In this document we use OWL Manchester format (.omn) for readability.
8.1.4. HED representations¶
The HED vocabularies have 4 different formats as shown in the following table:
Format |
Content |
Uses |
Editing |
|---|---|---|---|
MediaWiki |
Schema |
Schema development |
Manual editing |
XML |
Schema |
Annotation tools |
Generated from MediaWiki |
Spreadsheet |
Complete |
Schema development |
Manual editing |
OWL |
Complete |
Ontology updating |
Manual editing |
The HED schema, which contains the core HED vocabulary and captures the “annotator’s view” of HED, can be completely represented in the HED MediaWiki, XML, or spreadsheet formats. The HED schema is used for annotation, validation, searching, and most analyses. Tools access the HED schema in its XML format, but schema developers usually create and update the schema in MediaWiki format, which is easier to read and displays as formatted MarkDown on GitHub. Alternatively schema developers may opt to create or update schemas from the HED spreadsheets.
8.1.4.1. The MediaWiki format¶
The MediaWiki format is line-oriented with each non-blank line corresponding to a HED tag or other HED entity such as a unit class or schema attribute definition. See A.2. MediaWiki file format for a detailed description of the MediaWiki format.
8.1.4.2. Spreadsheet files¶
The spreadsheet format consists of 13 tab-separated value (tsv) files (10 for schema versions < 8.4.0, which lack the three extras files) each containing the information for one type of HED entity as summarized in the following table.
tsv filename |
Contents |
|---|---|
|
These correspond to schema attributes that are not inherited. |
|
Rows of the |
|
Definitions of the schema attribute properties corresponding |
|
Schema attributes whose value is a literal such as boolean, string or numeric. |
|
Schema attributes whose value is another schema entity such as a HED tag. |
|
Rows of the |
|
Rows of the |
|
Structural entities including the header, prologue, and epilogue. |
|
Definitions of the HED tags (vocabulary) in the schema. |
|
Definitions of the HED unit entities. |
|
Definitions of the HED unit classes. |
|
Definitions of the HED unit modifiers. |
|
Definitions of the HED value classes. |
The xxx_ prefix identifies the schema version. For example, the prefix for standard schema version 8.3.0 is HED8.3.0_ and the prefix for SCORE library schema 2.0.0 is HED_score_2.0.0_.
Most schema developers will only edit the xxx_Tag.tsv file or the xxx_Structure.tsv file.
8.1.4.3. Spreadsheet format¶
Each HED spreadsheet must start with a 1-line header containing the column names of the file. The first two column names are always hedId and rdfs:label, except in the three extras files (xxx_Sources, xxx_Prefixes, and xxx_AnnotationPropertyExternal), whose rows are not schema elements and have no hedId.
tsv filename |
Required column names |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The prefixes on column names have the following meanings:
Column name prefix |
Meaning |
|---|---|
|
from RDF Schema (i.e., the Resource Description Framework Schema). |
|
from DublinCore Ontology. |
|
translated directly to OWL Manchester Format. |
Users may add additional columns corresponding to annotation properties from the Dublin Core or the RDF schema (e.g., dc:comment) and the HED ontology framework will include them in the ontology. However, these columns do not impact the HED schema.
8.1.4.4. Spreadsheet <–> MediaWiki¶
Each non-blank line in a HED MediaWiki file corresponds to a single HED entity such as a HED tag. Similarly, each row in a HED spreadsheet file corresponds to a single HED entity. The fields of the HED MediaWiki format have a specific mapping to columns in a HED spreadsheet as illustrated in the following example:

Note: The information about a single tag in the MediaWiki file must be on a single line, but the above diagram has formatted the information so that it will fit within image boundaries.
The mapping of the spreadsheet row and column values to a line in the MediaWiki is further explained in the following table:
Spreadsheet |
Row value |
MediaWiki format |
|---|---|---|
hedId |
xxx |
{hedId=xxx, … other attributes in comma separated list} |
rdfs:label |
yyy |
The tag’s unique name is yyy. |
Level |
0 |
This row corresponds to a top-level HED tag. EX: |
Level |
n |
For level n > 0, n asterisks appear in front of |
omn:SubClassOf |
zzz |
The tag’s parent tag in the HED hierarchy is zzz. |
Attributes |
uuu, vvv, … |
List appearing in curly braces: {hedId=xxx, uuu, vvv, …} |
dc:description |
www |
The contents of the square braces: [www]. |
Note: Attributes that have boolean values are true if the attribute is present and false if absent. Non-boolean attributes are specified using “attribute-name=value”.
HED schema developers can develop in either HED MediaWiki or HED spreadsheet (tab-separated-value) file format and can use tools to update the representations. Users may NOT assign or modify the hedId. When creating a new entity such as a tag, leave the hedId column blank. If adding a new tag to the MediaWiki file, schema developers should omit the hedId. Tools will assign and validate the hedId during the update process.
8.1.4.5. Tag spreadsheet <–> Ontology¶
HED spreadsheets have been expanded to include additional columns to capture all the information contained in the HED ontology as illustrated in the following example. Notice that while the spreadsheet always refers to the entities by name (e.g., rdfs:label), the ontology uses the hedId.

The HED ontology represents the entire HED information space in OWL (Web Ontology Language). The HED ontology is available in both OWL/RDF format and OWL Manchester format, but the examples in this specification use OWL Manchester format for readability. Developers must use the HED spreadsheets to create or update a HED ontology.
Most HED entities (i.e., tags, unit classes, units, unit modifiers, and value classes) map to classes in the HED ontology. The HED schema attributes, which describe properties and behavior, are mapped to ontology properties as described in 8.2.3. Schema attributes section. The HED schema properties, which describe the schema attributes, determine the type of property mapping and are implicitly mapped.
The mapping of the spreadsheet row and column values to a class in the HED ontology is further explained in the following table:
Spreadsheet |
Row value |
Ontology format |
|---|---|---|
hedId |
xxx |
|
rdfs:label |
yyy |
|
Level |
n |
Redundant information – can be recovered using class hierarchy. |
omn:SubClassOf |
zzz |
The tag is either a |
Attributes |
uuu, vvv, … |
If non-empty, then these appear as restrictions |
dc:description |
www |
|
omn:EquivalentTo |
A combination of the information in omn:SubClassOf and Attributes. |
The next section describes the ontology structure in more detail.
8.2. HED schema to ontology¶
Each element of a HED schema (i.e., tag, unit, unit class, unit modifier, value class, schema attribute, schema attribute property, schema header, epilogue, and prologue) is assigned a unique persistent globally unique identifier (GUID). This GUID appears as the entity identifier in the ontology and as the hedId attribute value in the HED schema. In addition to the HED elements the HED ontology also has some overall structural elements that are also assigned hedId values.
The examples in this section use the hed: prefix to represent schema-specific elements.
8.2.1. Overall ontology structure¶
HED requires that child tags of tags in the HED schema satisfy the is-a relationship. This requirement is satisfied in HED ontology using subclass relationship. The HED requirement of orthogonality between tags in different top-level subtrees can be captured in the HED ontology by imposing disjointness on the top-level trees, but this is not currently being enforced.
The following table summarizes how the HED schema and HED ontology are mapped.
Schema |
Ontology |
|---|---|
Header |
Class with
|
Tag |
Class representing HED tags:
|
Unit class |
Defined in the
|
Unit |
|
Unit modifier |
|
Value class |
|
Schema attribute |
Maps as a property in the HED ontology:
|
Schema property |
|
8.2.3. Schema attributes¶
The purpose of HED schema attributes is to specify characteristics and/or behavior of HED schema elements, including tags, unit classes, units, unit modifiers, and value classes. These attributes map schema elements into values or into other schema elements.
8.2.3.1. Attribute ontology types¶
A given HED schema attribute’s representation in the HED ontology is determined by its domain, its range, and whether the attribute is inherited. The mapping strategy is summarized in the following table.
Ontology |
Domain |
Range |
Inherited? |
|---|---|---|---|
|
HED entity |
string, numeric, boolean |
No |
|
HED entity |
string, numeric, boolean |
Yes |
|
HED entity |
HED element |
Yes |
DataProperty and ObjectProperty are inherited by subclasses, and reasoners can check their consistency. AnnotationProperty is not inherited by subclasses, and reasoners ignore them.
8.2.3.2. Schema attribute properties¶
Schema attribute properties appear in the Properties section of a HED schema. Schema attribute properties determine how schema attributes behave and described in the following table.
Attribute name |
Description |
|---|---|
|
The value is not inherited by child nodes. |
|
The value can be true or false. This property was formerly named |
|
The attribute can apply to any type of element (tag, unit, unit class, unit class, or value class). This property was formerly named |
|
The attribute can apply to node (tag-term) elements. This property was formerly named |
|
The value can be a node (tag). |
|
The value can be numeric. |
|
The value can be a string. |
|
The attribute can apply to unit classes. This property was formerly named |
|
The value can be a unit class. |
|
The attribute can apply to unit modifiers. This property was formerly named |
|
The attribute can apply to units. This property was formerly named |
|
The value can be units. |
|
The attribute can apply to value classes. This property was formerly named |
|
The value can be a value class. |
Each schema attribute property is translated to an AnnotationProperty in the ontology.
8.2.3.3. Attribute representation¶
The following table lists schema attributes with their types (A=AnnotationProperty, D=DataProperty, and O=ObjectProperty), domains and ranges.
Attribute |
Type |
Domain |
Range |
Handling |
|---|---|---|---|---|
|
D |
|
string |
|
|
D |
|
|
|
|
O |
|
|
|
|
D |
|
|
|
|
D |
|
|
|
|
A |
|
|
Tools: Assign and verify. |
|
D |
|
|
|
|
O |
|
|
|
|
O |
|
|
|
|
A |
|
|
Tools: Verify. |
|
D |
|
|
|
|
A |
|
|
Tools: make tag subclass of tag in range. |
|
D |
|
|
|
|
D |
|
|
|
|
D |
|
|
|
|
O |
|
|
|
|
D |
|
|
|
|
A |
|
|
Only placeholders |
|
D |
|
|
|
|
D |
|
|
|
|
O |
|
|
|
|
D |
|
|
|
|
D |
|
|
|
|
O |
|
|
8.2.3.4. MediaWiki attribute format¶
In the MediaWiki format, schema attributes appear in the Schema Attributes section of the schema.
Example HED MediaWiki representation of a schema attribute.
* extensionAllowed <nowiki>{hedId=HED_0010307,tagDomain, boolRange}[Users can add unlimited levels of child nodes
under this tag. This tag is propagated to child nodes except for
hashtag placeholders.]</nowiki>
Note: this example has line breaks added to fit on the page. Each element in MediaWiki must appear on one line.
The extensionAllowed attribute has a unique hedId value HED_0010307. The tagDomain attribute indicates that extensionAllowed is only a schema attribute of HED tags. The boolRange attribute indicates that extensionAllowed is true if present and false if absent.
8.2.3.5. XML attribute format¶
Schema attribute definitions are nested in the <schemaAttributeDefinitions> section of the schema’s XML file. The format of an individual schema attribute is shown here.
Example HED XML representation of a schema attribute.
<schemaAttributeDefinition>
<name>extensionAllowed</name>
<description>Users can add unlimited levels of child nodes under this tag.
This tag is propagated to child nodes except hashtag placeholders.
</description>
<property>
<name>hedId</name>
<value>HED_0010307</value>
</property>
<property>
<name>tagDomain</name>
</property>
<property>
<name>boolRange</name>
</property>
</schemaAttributeDefinition>
8.2.3.6. OWL format for attributes.¶
The Manchester Owl syntax for schema attributes is similar to that of classes above. The following example shows the OWL definition for the HED extensionAllowed dataProperty:
Example HED Manchester OWL syntax for DataProperty extensionAllowed.
DataProperty: hed:HED_0010307
Annotations:
dc:description "A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes except for hashtag placeholders.",
rdfs:label "extensionAllowed",
hed:HED_0010704 true,
hed:HED_0010702 true
Domain:
heds:HED_0000005
Range:
xsd:boolean
The HED DataProperty entities map an entity (Domain) into a value (Range) as specified by the Domain and Range fields. The heds:HED_0000005 ID is the HedTag class. In the HED schema, the domain and range of a schema attribute are conveyed by the schema properties, which are also given as annotation properties. The hed:HED_0010704 true annotation corresponds to the tagDomain schema property being true, while the hed:HED_0010702 true annotation corresponds to the boolRange schema property being true.
Similarly, the HED ObjectProperty entities map an entity (Domain) into another entity (Range) specified by the Domain and Range fields as illustrated in the following example:
Example HED Manchester OWL syntax for rooted.
ObjectProperty: hed:HED_0010106
Annotations:
dc:description "A tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.",
rdfs:label "suggestedTag",
hed:HED_0010704 true,
hed:HED_0010705 true
Domain:
hed:HED_0000005
Range:
hed:HED_0000005
The heds:HED_0000005 ID is the HedTag class, indicating that suggestedTag maps one HED tag into another. The hed:HED_0010704 true and hed:HED_0010705 true provide this information as annotations.
Unlike DataProperty and ObjectProperty attributes, AnnotationProperty attributes are not inherited and do not use domain and range specifications. These must be handled individual by tools as flagged by the HED schema annotationProperty property. In the OWL representation, information about the handling should be provided in an rdfs:comment field.
Example HED Manchester OWL syntax for rooted.
AnnotationProperty: heds:HED_0010502
Annotations:
dc:description "This top-level library schema node should have a parent which is the indicated node in the partnered standard schema.",
rdfs:label "rooted",
hed:HED_0010704 true,
hed:HED_0010705 true
8.2.4. Other auxiliary sections¶
The schema-ontology mapping for HED schema units, unit classes, unit modifiers, and value classes is similar to that of HED tags. However, each of these auxiliary items should inherit from a superclass tied to the schema in which they are defined.
For example the value classes that are defined in the standard schema should inherit from StandardValueClass (hed:HED_0010009) not directly from HedValueClass (heds:0000009).
8.3. HED global identifiers¶
8.3.1. Schema namespaces versus the ontology namespace¶
HED uses the word namespace in two different senses, and the two must not be confused.
A schema namespace (see Namespace and 3.1.2. Version combinations) is a mechanism for combining several schemas into a unified vocabulary for a particular application. The annotator chooses a namespace name for each additional schema in the dataset’s HED version specification and writes the corresponding namespace prefix (e.g., sc:) in front of the tags drawn from that schema. Schema namespaces are dynamic: they are chosen per dataset, are not part of any schema, and say nothing about the identity of the tags they qualify. The same tag may appear with different prefixes in different datasets, much as the same Python module may be imported under different names with import ... as.
The ontology namespace is the set of global identifiers of the form HED_xxxxxxx, where xxxxxxx is a 7-digit integer. Every element of a HED schema (tag, unit class, unit, unit modifier, value class, schema attribute, and property) is assigned an identifier of this form when the schema is released, and the identifier is recorded in the element’s hedId schema attribute. The identifiers are allocated by schema, not by schema version: common schema structural elements occupy HED_0000001 to HED_0009999, the standard schema occupies HED_0010000 to HED_0039999, and each library schema is assigned its own range when it is first created, as recorded in library_data.json in the hed-standard/hed-schemas repository. Within each schema’s range, every type of element has a fixed subrange, so the hedId alone reveals both the schema an element came from and what type of element it is. The subranges are listed in 8.3.2. Ontology namespace.
A hedId assignment is permanent. Once an element has been given an identifier, that identifier represents the element in the ontology through all later schema versions, even if the element is renamed, moved, or deprecated, and the identifier is never reassigned to another element. The hedId values are used to construct a valid ontology in OWL format from the schema, as described in 8.3.3. HED IRIs.
In short, the ontology namespace fixes what an element is, independent of any schema version or dataset, while a schema namespace fixes how an annotator refers to an element’s tag in one dataset’s version specification. Tools resolve a prefixed tag through the version specification to a schema element, and from there through hedId to its ontology identifier and its IRI.
8.3.2. Ontology namespace¶
The HED ontology uses GUIDs (Global Universal Identifiers) of the form HED_xxxxxxx for all entities of HED schemas.
All HED standard and library schema entities are mapped to the HED_xxxxxxx namespace using the range assignments described in the following table.
HED ID |
Owl type |
Description |
|---|---|---|
HED_0000001- |
|
HED schema structure (EX: |
HED_0000100- |
|
Common object function (EX: |
HED_0000300- |
|
Common data function (EX: |
HED_0000500- |
|
Currently not used. |
HED_0010001- |
|
Standard schema structure (EX: |
HED_0010100- |
|
Standard schema object function (EX: |
HED_0010300- |
|
Standard schema data function (EX: |
HED_0010500- |
|
Standard schema property not inherited (EX: |
HED_0010700- |
|
Standard schema attribute property (EX: |
HED_0011300- |
|
Standard schema value class (EX: |
HED_0011400- |
|
Standard schema unit modifier (EX: |
HED_0011500- |
|
Standard schema unit class (EX: |
HED_0011600- |
|
Standard schema unit (EX: |
HED_0012000- |
|
Standard schema HED tag (EX: |
HED_0042000- |
|
SCORE schema HED tag (EX: |
HED_0062000- |
|
LANG schema HED tag. |
8.3.3. HED IRIs¶
HED IRIs (International Resource Identifiers) are mapped to https://purl.org/hed/hed.owl.