Skip to main content

Crate tranz

Crate tranz 

Source
Expand description

§tranz

Point-embedding knowledge graph completion models.

Entities are points in vector space. Relations are transformations (translation, rotation, diagonal scaling). Lower distance between transform(head, relation) and tail indicates a more likely triple.

§Models

  • TransE: head + relation ~ tail (Bordes et al., 2013)
  • RotatE: head * relation ~ tail in complex space (Sun et al., 2019)
  • ComplEx: Hermitian dot product in complex space (Trouillon et al., 2016)
  • DistMult: diagonal bilinear in real space (Yang et al., 2015)
  • temporal::TComplEx: ComplEx over quads (h, r, t, τ) with timestamp embeddings (Lacroix et al., 2020)

§Feature flags

  • rand (default): enables random initialization via Model::new().
  • burn-ndarray: enables training via the burn_train module on the ndarray (CPU) backend.
  • burn-wgpu: training on the WGPU backend (Metal/Vulkan/WebGPU).

Modules§

burn_temporal
Burn trainer for crate::temporal::TComplEx.
burn_train
Burn-based training for KGE models.
dataset
Dataset loading for KGE benchmark triple files.
eval
Link prediction evaluation with filtered ranking.
io
Embedding import/export.
query
Fuzzy logic query answering (CQD-Beam).
temporal
Temporal knowledge graphs: quads (head, relation, tail, timestamp).

Structs§

ComplEx
ComplEx: complex bilinear model.
DistMult
DistMult: diagonal bilinear model in real space.
EnsembledScorer
Ensemble scorer that averages scores from multiple models.
RotatE
RotatE: rotation in complex space.
TransE
TransE: translational distance model.

Enums§

Error
Errors from tranz operations.

Traits§

Scorer
Trait for scoring knowledge graph triples.