hif-standard

Hypergraph Interchange Format (HIF) Schema Definition and Tutorials

https://github.com/pszufe/hif-standard

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, scholar.google, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Hypergraph Interchange Format (HIF) Schema Definition and Tutorials

Basic Info
  • Host: GitHub
  • Owner: pszufe
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 14.2 MB
Statistics
  • Stars: 21
  • Watchers: 9
  • Forks: 6
  • Open Issues: 0
  • Releases: 1
Created over 1 year ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

Logo

DOI

The Hypergraph Interchange Format (HIF) standard

The Hypergraph Interchange Format (HIF) is a standard for higher-order network data to facilitate seamless data exchange between higher-order network libraries.

Repository structure

This repository is organized into the following folders:

  • figures: This folder contains all the figures used in the preprint corresponding to this project.
  • logo: This folder contains the HIF logo in several different formats.
  • requirements: This folder contains a list of all dependencies used in this project.
  • schemas: This folder contains all schemas used for specifying the HIF standard. For details of what has changed with each version, see the CHANGELOG.
  • tests: This folder contains all of the unit tests used for validating the schema against known compliant and non-compliant datasets.
  • tutorials: This folder contains tutorials detailing how each library uses the HIF standard and how the HIF standard allows seamless integration between libraries. For details of its contents, see the README.

HIF Standard

Structure

The HIF standard specifies the following JSON file structure:

  • "network-type" (optional): "asc", "directed", or "undirected"
  • "metadata" (optional): A dictionary-like set of network-level attributes
  • "incidences" (required): A list of records, where each record is an incidence. Each incidence is a dictionary-like oject which may contain the following fields:
    • "node" (required): the node ID
    • "edge" (required): the edge ID
    • "weight" (optional): the incidence weight as an integer or floating point number
    • "direction" (optional): "head" or "tail" if the hyperedge is a directed hyperedge
    • "attrs" (optional): a dictionary-like object of all the miscellaneous incidence properties
  • "nodes" (optional): A list of records, where each record is an node entry. Each entry is a dictionary-like object which may contain the following fields:
    • "node" (required): the node ID
    • "attrs" (optional): a dictionary-like object of all the miscellaneous nodal properties
  • "edges" (optional): A list of records, where each record is an edge entry. Each entry is a dictionary-like object which may contain the following fields:
    • "edge" (required): the edge ID
    • "attrs" (optional): a dictionary-like object of all the miscellaneous edge properties

Notes

  • All fields are optional except for "incidences".
  • If a hypergraph is directed, the edge direction will be contained in the incidences record with keyword "direction".
  • Isolated nodes and empty edges can be specified with entries in "nodes" and "edges" which are not present in the incidences.
  • This schema explicitly describes all items in the schema using JSON objects and typing. This is a verbose presentation making it faster to instantiate than list-based schemas requiring a parser.

Validate files against HIF standard

Python

```python import fastjsonschema import json import requests

url = "https://raw.githubusercontent.com/pszufe/HIF-standard/main/schemas/hif_schema.json" schema = requests.get(url).json() validator = fastjsonschema.compile(schema) hiftext = json.load(open(filename,'r')) try: validator(hiftext) print("HIF-Compliant JSON.") except Exception as e: print(f"Invalid JSON: {e}") ```

R

```R library(jsonvalidate) library(jsonlite)

url = "https://raw.githubusercontent.com/pszufe/HIF-standard/main/schemas/hif_schema.json"

schema <- paste(readLines(url, warn = FALSE)) validator <- json_validator(schema) if (validator(filepath)) { print("HIF-Compliant JSON.") } else { print("Invalid JSON.") } ```

Julia

```julia using HTTP using JSON3 using JSONSchema

url = "https://raw.githubusercontent.com/pszufe/HIF-standard/main/schemas/hif_schema.json"

schema = String(HTTP.get(url).body) validator = Schema(schema) hiftext = JSON3.read(filepath) result = JSONSchema.validate(validator, hiftext) println( result === nothing ? "HIF-Compliant JSON." : "Invalid JSON: " * "$result" ) ```

Hypergraph tools and packages represented

The authors, co-authors, or contributors of the following software libraries are represented: * HypergraphX (Python) * HyperNetX (Python) * HAT (Python) * SimpleHypergraphs.jl (Julia) * XGI (Python)

Contributors

This project is an ongoing colaborative work of the following people (alphabetical order): * Martín Coll (University of Buenos Aires) * Cliff Joslyn (Pacific Northwest National Laboratory) * Nicholas Landry (University of Virginia) * Francesco Lotito (University of Trento) * Audun Myers (Pacific Northwest National Laboratory) * Joshua Pickard (University of Michigan) * Brenda Praggastis (Pacific Northwest National Laboratory) * Przemysław Szufel (SGH Warsaw School of Economics)

How to Cite

You can cite the Hypergraph Interchange Format paper arXiv:2507.11520 by copying the following BibTeX entry: bibtex @misc{coll2025hifhypergraphinterchangeformat, title={HIF: The hypergraph interchange format for higher-order networks}, author={Martín Coll and Cliff A. Joslyn and Nicholas W. Landry and Quintino Francesco Lotito and Audun Myers and Joshua Pickard and Brenda Praggastis and Przemysław Szufel}, year={2025}, eprint={2507.11520}, archivePrefix={arXiv}, primaryClass={physics.soc-ph}, url={https://arxiv.org/abs/2507.11520}, }

Owner

  • Name: Przemysław Szufel
  • Login: pszufe
  • Kind: user
  • Location: Poland
  • Company: Warsaw School of Economics

Associate Professor at SGH Warsaw School of Economics. Researcher in optimization modelling (operations research - OR), HPC, simulations and machine learning.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "Hypergraph Interchange Format (HIF)"
authors:
  - family-names: Coll
    given-names: Martín
  - family-names: Joslyn
    given-names: Cliff A.
  - family-names: Landry
    given-names: Nicholas W.
  - family-names: Lotito
    given-names: Quintino Francesco
  - family-names: Myers
    given-names: Audun
  - family-names: Pickard
    given-names: Joshua
  - family-names: Praggastis
    given-names: Brenda
  - family-names: Szufel
    given-names: Przemysław
date-released: 2025-07-07
version: "0.1.0"
license: "MIT"
repository-code: "https://github.com/pszufe/HIF-standard"

GitHub Events

Total
  • Create event: 11
  • Release event: 1
  • Issues event: 16
  • Watch event: 12
  • Delete event: 10
  • Issue comment event: 84
  • Push event: 56
  • Pull request review event: 9
  • Pull request event: 30
  • Fork event: 4
Last Year
  • Create event: 11
  • Release event: 1
  • Issues event: 16
  • Watch event: 12
  • Delete event: 10
  • Issue comment event: 84
  • Push event: 56
  • Pull request review event: 9
  • Pull request event: 30
  • Fork event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 16
  • Total pull requests: 35
  • Average time to close issues: 2 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 5
  • Total pull request authors: 6
  • Average comments per issue: 3.69
  • Average comments per pull request: 2.23
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 30
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 6 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 4.75
  • Average comments per pull request: 1.97
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • colltoaction (3)
  • nwlandry (3)
  • brendapraggastis (2)
  • FraLotito (1)
  • pszufe (1)
Pull Request Authors
  • nwlandry (16)
  • colltoaction (11)
  • myersau3 (5)
  • brendapraggastis (4)
  • Jpickard1 (3)
  • Cobord (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/check-urls.yml actions
  • actions/checkout v4 composite
  • urlstechie/urlchecker-action master composite
requirements/tests.txt pypi
  • fastjsonschema * test
  • pytest * test
requirements/tutorials.txt pypi
  • hypergraphx *
  • hypernetx *
  • networkx *
  • requests *
  • xgi *
.github/workflows/test-notebooks.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite