# Hierarchical Event Descriptors

Hierarchical Event Descriptors (HED) is a conceptual and software framework that includes a family of controlled vocabularies for annotating experimental metadata and experienced events on the timeline of neuroimaging and behavioral experiments. The goal of HED is to standardize annotations and the mechanisms for handling these annotations to enable searching, comparing, and extracting data of interest for analysis. HED is the event annotation mechanism used by the Brain Imaging Data Structure (BIDS) standard for describing events.
HED development is open, and source for all HED resources is housed in the hed-standard organization GitHub repository. HED has a base controlled vocabulary called the standard schema that contains terms applicable to most experiments. Recognizing that many fields require specialized terms not of general interest, HED also allows user communities to develop specialized vocabularies termed library schemas that can be combined with the standard schema and with other library schemas to provide a controlled vocabulary for experiments in a subfield. An online HED schema browser is available for viewing all available vocabularies.

## History
### Generation 1 (2010-2013)

HED-1G was initially proposed by Nima Bigdely-Shamlo and released in 2010 as the event annotation mechanism for HeadIT an early public repository of EEG data hosted at the UCSD Swartz Center for Computational Neuroscience of the Institute for Neural Computation at the University of California San Diego (UCSD). Event annotation was organized around a single vocabulary hierarchy (tree) rooted at Time-Locked Event/. The initial vocabulary also contained elements of the COGPO vocabulary. Users could extend the hierarchy to its deepest (leaf) nodes to provide more details. Several EEG studies were successfully annotated for open-source distribution on HeadIT and the first analyses applying HED tools were demonstrated. During this period, the concept of event-annotation using HED was also adopted by the CANCTA (Cognition and Neuroergonomics Collaborative Technology Alliance, a ten-year basic science research and technology transition program sponsored by the U.S. Army Research Laboratory (ARL), to better understand interactions of brain and body at work.

### Generation 2 (2014-2019)

As researchers began to annotate their data, HED infrastructure design limitations and vocabulary gaps became apparent. The HED vocabulary was reorganized in a multi-tree (forest) structure where the individual subtrees each represented a subclass hierarchy. Supporting tools were developed, including a GUI for annotation, online validation, and integration of HED-based event-related analysis in the MATLAB environment, in particular within EEGLAB. The use of tag-grouping parentheses was introduced to group related tags in annotations. A large corpus of EEG data was annotated as part of the CANCTA repository, and several studies were published demonstrating the efficacy of HED annotation in facilitating event-related mega-analyses

### Generation 3 (2020- )

In 2020, the HED Working Group was formed with the goal of enhancing HED to address the significant challenges of event annotation in neuroimaging (and beyond). The release of the 3rd-generation standard HED schema version 8.0.0 (in August 2021) gave HED an orthogonal, duplication-free vocabulary tree with significant enhancements in schema structure, including the addition of value classes and schema properties. HED schema terms are now required to be unique and self-explanatory so that annotators can use single (leaf) terms in place of full path annotations (that HED tools can fill in when performing event search and analysis). For example, annotators can use the single tag /Smile in place of its full-term path: Action/Communicate/Communicate-gesturally/Smile. Tools can automatically convert single leaf terms (Smile) so that event annotations involving the term Communicate-gesturally will find event annotations, including Smile and other facial and limb gestures.
HED is used in BIDS for event annotations and HED annotations are automatically validated as part of the BIDS dataset validation.

## Features
### Library vocabularies

The recent addition of library schemas to the HED (gen-3) system architecture allows any user community to develop a HED vocabulary extension schema (glossary) to use in annotating events in their data, typically in conjunction with terms from the standard schema. The HED-SCORE library, version 1.0.0, released in January, 2023, translates the SCORE (Standardized Computer-based Organized Reporting of EEG, 2nd Ed.) standard for clinical EEG annotation into a HED schema. Specialized schemas for language and movie annotation are under development.

### Event processes

HED (gen-3) is based on and supports the conceptual framework that Events are processes with temporal extent having distinct onset and offset times. By contrast, event markers (or event phase markers) designate time points. Markers associated with Onset and Offset tags, as well markers of intermediate time point(s) of interest (associated with Inset tags) allow tools to extract event processes as they unfold. For example, if a sound begins to play at (Onset) time point 1 and ceases to play at (Offset) time point 3, tools can infer that the sound is playing at intermediate time points as well.
Inset tags may be used to mark intermediate time points of interest - for example, the sound's moment of maximum amplitude or other types of phase transition. The more complete HED (gen-3) conceptual framework makes possible the development of syntax to build and to compute on detailed event annotations for complex experiences (of speech, music, video, and in virtual-reality (VR) and/or augmented-reality (AR), etc.).

### Search and summary

HED (gen-3) requires that vocabulary terms used in a schema are unique and uses their location within the schema hierarchies to define subclasses. Thus tools are required to treat Action/Communicate/Communicate-gesturally/Smile and Smile as equivalent and users can can annotate events using path end terms (leaves) with no need to quote the full paths, and can request that a search for a term higher in the term path also return all its children. This approach is also used in tools to summarize dataset HED annotations.