Knowledge graph embeddings score typed relationships. Work through TransE vector translation, negative examples, one-to-many limits and point-in-time financial facts.
Knowledge graph embedding and TransE
A knowledge graph embedding represents entities and their relationships with learned vectors or other numerical parameters so that a model can score candidate facts. TransE is a simple example: it represents each relation as a translation from a head entity toward a tail entity. For a quant working with issuers, securities and counterparties, this supplies a way to rank missing relationships while preserving what each edge means.
The edge label is part of the question
Consider the fictional facts “Company A issues Bond B” and “Company A supplies Company C”. Both connect entities, but their directions and relation types differ. A knowledge graph commonly records an entity-to-entity fact as a triple (h,r,t): head, relation, tail. This resembles the subject–predicate–object structure described in W3C's RDF data model, although a knowledge graph need not use RDF storage.
For a missing-tail query, “Company A, issues, ?”, sensible candidates are securities. For “Company A, supplies, ?”, they may be companies. Entity types and each relation's permitted head and tail types can restrict the candidate set. They are part of the data design; a basic TransE distance does not automatically enforce them. Collapsing every relation into “connected to” changes the task.
This also distinguishes relation-aware scoring from DeepWalk, which builds node representations from random-walk contexts. A pair can be close in an undirected network without satisfying a particular directed financial relation.
TransE: add the relation vector
In Bordes et al.'s TransE model, a plausible triple should have h+r≈t. Each entity and relation has a vector of the same dimension. A common energy is
E(h,r,t)=∥h+r−t∥2.
Lower energy is better. If an implementation uses a higher-is-better score, one explicit convention is s(h,r,t)=−E(h,r,t). Check the sign before sorting candidates. The original paper considers both L1 and L2 distance; the example here uses L2.
Take stipulated, dimensionless vectors
h=(1,2),r=(2,−1),t=(3,1).
Adding coordinate by coordinate gives h+r=(3,1). The residual for this tail is (0,0), so its L2 distance is 0. Now replace the tail with t′=(4,1). Its residual is (−1,0), giving distance 1. Under the negative-distance convention, the scores are 0 and −1: the first candidate ranks above the second.
Stipulated head (1,2) plus relation (2,-1) reaches tail (3,1), with L2 distance 0 and score 0. Replacing the tail by (4,1) gives distance 1 and score minus 1.
The relation moves the head to the target location; the distance measures the candidate tail's mismatch. Coordinates are stipulated, not learned.
These coordinates illustrate the scoring algebra. They are not the result of training, and they do not reproduce the original paper's unit-norm constraint on entity vectors. A zero residual does not establish a real-world fact. Neither score is a probability, and passing the score through a sigmoid would not by itself establish probability calibration.
Learning requires contrasts, not just positive facts
TransE's original training objective compares observed triples with corrupted triples, created by replacing either the head or the tail. Its margin-ranking loss favours observed facts having smaller distances than these contrasts. Learning only to make observed distances small would omit this separation pressure. Bordes et al., Section 2.
A corrupted triple is a constructed negative example, not necessarily a false statement. A supplier database may record one customer and omit another genuine customer. Treating that missing edge as definitively false can train the wrong distinction. Known-positive filtering and relation-aware sampling help address this, but incomplete coverage remains a problem. The TransH authors explicitly discuss false negative labels and relation cardinality.
Candidate sampling matters for interpretation too. Replacing the tail of “issues” with a country may create an easy type mismatch; replacing it with another bond tests a finer distinction. A model that excels on the first task has not thereby demonstrated the second. Report the candidate universe and sampling rules with ranking results.
One translation has a structural limit
Suppose a company issues two distinct bonds. For both facts to fit exactly under one relation vector, TransE would require
h+r=t1,h+r=t2,hencet1=t2.
The two tails are forced to the same location. With approximate fitting they can occupy a nearby region, but the pressure can obscure distinctions needed by other relations. Many-to-one relations create the corresponding pressure on heads. This is a limitation of the translation geometry, not a claim that TransE cannot produce any useful rankings on such data. Wang et al.'s TransH paper motivates relation-specific projections to address these mapping properties.
A financial fact needs an information date
“Company A owns Company B” can be valid during one interval and false later. A conventional static triple does not say when ownership held or when the researcher could have known it. W3C similarly distinguishes a static graph from the temporal information it can explicitly represent.
For historical research, retain the fact's effective interval, source, disclosure time and the time it became usable by the research system. These are different clocks. A fictional acquisition effective on 1 March but first disclosed on 8 March must not appear as known information in a 5 March graph. The observation, event and availability timestamp lesson develops this distinction (public preview; full lesson requires membership).
Apply the cutoff to entity resolution, graph construction, embedding fitting and downstream prediction. A graph fitted once on today's ownership history can leak later disclosures even if the final prediction model uses chronological splits. This is an application of the general data-leakage rule: information unavailable at prediction time must not enter model building.
Finally, separate fact completion from a trading target. Ranking a plausible missing issuer or supplier link does not estimate a bond's default probability, identify causal contagion or demonstrate a profitable signal. Each downstream use needs its own target, dated evaluation and simpler baseline.