TransEEmbedding<T>
Models & Types · AiDotNet.RetrievalAugmentedGeneration.Graph.Embeddings
TransE embedding model: entities and relations are vectors in the same space, with the scoring function d(h, r, t) = ||h + r - t||.
Inheritance: KGEmbeddingBase<T> → TransEEmbedding<T>
For Beginners
Imagine entities as points on a map and relations as directions. “Paris” + “capital_of” should point to “France”. If the model learns good vectors, you can predict that “Berlin” + “capital_of” ≈ “Germany”.
How It Works
TransE (Bordes et al., 2013) models relations as translations in embedding space. For a valid triple (h, r, t), the model learns embeddings such that h + r ≈ t. Training uses the margin-based ranking loss max(0, margin + d_pos - d_neg) with d the L2 norm, relations normalized once at initialization and entities renormalized before every mini-batch.
Constructors
| Constructor | Summary |
|---|---|
TransEEmbedding() |
Properties
| Property | Summary |
|---|---|
bool IsDistanceBased { get; } |