Practical overview
When it fits
Use it when a Python workflow needs language-model-based embeddings for hierarchical entities or needs to explore subsumption scoring in hyperbolic space.
Who it is for
- Developers building hierarchy-aware representation workflows with language models.
- Researchers working with taxonomies, entity hierarchies or subsumption prediction.
- Sentence-transformers users who want to explore hierarchy encoders or train HiT models.
Documented uses
- Encode entity names as hierarchy-aware embeddings.
- Compare child and parent embeddings to calculate subsumption scores.
- Train or evaluate hierarchy encoder models using the project’s scripts and customized HiT trainer.
- Extract hierarchies from source data and construct datasets with the documented DeepOnto dependency.
Requirements & limits
The repository is public and states an Apache-2.0 license. The README documents installation through PyPI or GitHub and requires Python 3.9 or later.
- HiT represents hierarchy structure in a Poincaré ball using hyperbolic geometry.
- The main model extends the sentence-transformers architecture, and the project describes alignment with sentence-transformers.
- The documented dependencies include DeepOnto for hierarchy extraction and dataset construction, and Geoopt for hyperbolic arithmetic.
- The README flags an evaluation issue with sentence-transformers 3.3.1 and describes 3.4.0.dev0 as the fix in its dependency guidance.
- Subsumption scoring uses a validation-set-derived weighting and threshold rather than fixed general-purpose values.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Probe subsumption between encoded entities
Calculate subsumption scores for paired child and parent entity embeddings.
Before you start
- A loaded HierarchyTransformer model
- Child and parent entity names to compare
- A validation-set-derived centri_score_weight and overall threshold
Steps
Encode the child and parent entity names separately with convert_to_tensor=True.
Calculate hyperbolic distances between the paired embeddings using model.manifold.dist.
Calculate each embedding’s distance from the origin using model.manifold.dist0.
Apply the documented empirical score: -(distance + centri_score_weight * (parent norm - child norm)).
Expected outcome
Subsumption scores for the entity pairs, using the empirical function described in the project documentation.
Guide limitations
- The weighting and overall threshold are determined on a validation set; the README does not supply universal values.
- The example demonstrates scoring and does not establish accuracy for a particular hierarchy.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- KRR-Oxford/HierarchyTransformers · Official homepage title · retained in its source language

