intermediate extraction-knowledge-graphs 35 min read

Relation Extraction and Distant Supervision

Labeling sentences by what a knowledge base already knows teaches a classifier the knowledge base's opinion of each entity pair. Bags, aggregation, and positive-unlabeled corrections recover facts, not sentences.

Prerequisites: Named Entity Recognition

Overview & Motivation

A filing says “Martin Hollis has spoken publicly about Pellucid Software.” The named entity recognition topic finds the two names. Relation extraction asks the next question: does this sentence say how they are related? It does not. It mentions a person and a company and states nothing between them. Yet Hollis is Pellucid’s chief financial officer, and the corpus’s knowledge base knows it.

That gap is the subject of this page. Labeling sentences by hand is expensive, so the standard shortcut, distant supervision, labels them with the knowledge base instead: any sentence that mentions two entities is taken to express whatever the knowledge base holds between them. Our sentence gets the label CFO_OF. A classifier trained on such labels reads it as CFO_OF with probability 0.3800.380, ahead of NA at 0.3510.351. The same classifier trained on what each sentence actually states reads it as NA with probability 0.9950.995.

On this corpus the second classifier is perfect: with sentence-level gold labels it scores F1 1.0001.000 on both test sets, because the corpus is templated and its features read the templates exactly. So everything on this page is about supervision: what each way of labeling teaches. In order:

  1. What distant supervision learns. We prove it learns the expected distant label, which on a sentence that states nothing is a property of the corpus, not of the sentence, and does not shrink with data.
  2. At least one witness. Multi-instance learning labels bags of mentions. We prove what its gradient does to each mention and which mentions its labels can determine.
  3. From mentions to facts. How to aggregate, and why the right aggregator depends on how the model was trained.
  4. An incomplete knowledge base. Missing facts make distant supervision positive-unlabeled learning; we prove how the optimum shrinks and how evaluation against the same knowledge base misreports precision.

Then the finance case study: the named entity recognition topic’s tagger on companies held out from training, feeding the extractor, and the knowledge base that the next topic embeds.


Relation mentions and distant supervision

The corpus’s knowledge base, WORLD, holds 254254 facts over ten relations among companies, subsidiaries, officers, cities, regions, and sectors: CEO_OF, CFO_OF, IN_SECTOR, COMPETES_WITH, SUBSIDIARY_OF, PARENT_OF, ACQUIRED, HQ_IN, LOCATED_IN, and BASED_IN. Its documents are rendered from it. A fact sentence states a relation (“Martin Hollis, chief financial officer of Pellucid Software, reviewed …”). A co-mention sentence mentions a pair and states nothing; by the generator’s design, the knowledge base relates the pair 60%60\% of the time.

Definition 1 (Relation mentions and facts).

A sentence’s mentions are its entity spans, each linked to a knowledge-base entity when it names one. A candidate is an ordered pair (i,j)(i, j) of distinct linked mentions in one sentence, with entities hh and tt. Its gold label is the relation r∈Rr \in R that the sentence states from ii to jj, or NA. A fact is a triple (h,r,t)(h, r, t) of knowledge-base entities. Sentence-level extraction labels candidates; fact-level extraction outputs facts.

Definition 2 (Distant supervision).

Label each candidate with L=KB(h,t)L = \mathrm{KB}(h, t), the set of relations the knowledge base holds from hh to tt, or with {NA}\{\mathrm{NA}\} when it holds none. As a target distribution, ℓ(r)=1[r∈L]/∣L∣\ell(r) = \mathbf 1[r \in L]/|L|.

Mintz, Bills, Snow, and Jurafsky (2009) put the assumption this way: any sentence containing both entities might express the relation. Every relation a sentence states is a knowledge-base fact, so distant supervision never misses one. What it adds is the problem.

Proposition 1 (Three sources of distant-supervision error).

A distant label r∈Lr \in L that the sentence does not state falls into exactly one of three classes:

  • entailed: r(h,t)r(h, t) follows from what the sentence states by the knowledge base’s own rules (BASED_IN == HQ_IN ∘\circ LOCATED_IN, ACQUIRED ⇒\Rightarrow PARENT_OF, PARENT_OF and SUBSIDIARY_OF inverse, COMPETES_WITH symmetric);
  • overlap: it is not entailed, and the sentence states a different relation for the same ordered pair;
  • co-mention: the sentence states nothing that yields rr.
Proof.

The three conditions are tested in this order, and the third is the complement of the first two, so each label lands in exactly one class.

∎

The proposition is bookkeeping, but each class is a different failure. On the training corpus distant supervision makes 1,6291{,}629 labels, of which 1,1251{,}125 are stated: precision 0.6910.691. Of the 504504 errors, 338338 are co-mentions, 137137 entailed, and 2929 overlaps (an acquisition sentence also labeled PARENT_OF, or the reverse). Entailed labels are the debatable ones. “From its head office in Toronto, Canada, Quillon Systems manages …” implies that Quillon is based in Canada, but the corpus’s annotation guideline marks it unstated, and we follow the guideline: those labels are errors for the sentence and true facts for the knowledge base. LOCATED_IN is the only relation with precision 1.0001.000, since cities and regions are never co-mentioned. ACQUIRED has the lowest, 0.4930.493. The DS labels tab of the lab shows the split.


What a distantly supervised classifier learns

The classifiers on this page are softmax logistic regressions over NA and the ten relations, on entity-blind features: the two entities’ types, which comes first, the words between them joined into one string and conjoined with that order, the between words and bigrams, and one word on each side (Mintz et al.’s lexical features). No feature names an argument’s own words. The conjunction matters. Which argument is the subsidiary depends on the template (“X, a subsidiary of Y” against “Y owns X”) as well as on the order, an interaction no sum of separate weights can represent: the XOR of the linear classifiers topic again. Without the conjunction, the gold-trained classifier scores 0.9520.952 on the seen test and 0.9780.978 on the held-out one, instead of 1.0001.000.

Write φ\varphi for the features and q(r∣φ)q(r \mid \varphi) for a classifier’s output.

Theorem 1 (Distant supervision learns the expected distant label).

Let R(q)=E[−∑rℓ(r)log⁡q(r∣φ)]\mathcal R(q) = \mathbb E\big[-\sum_r \ell(r) \log q(r \mid \varphi)\big] be the distant-supervision risk. Over all conditional distributions, R\mathcal R is minimized, uniquely for almost every φ\varphi, by

q∗(r∣φ)=E[ℓ(r)∣φ].q^*(r \mid \varphi) = \mathbb E[\ell(r) \mid \varphi].

Because every stated relation is in LL,

q∗(r∣φ)=E[ℓ(r) 1[r stated]∣φ]+E[ℓ(r) 1[r not stated]∣φ]:q^*(r \mid \varphi) = \mathbb E\big[\ell(r)\, \mathbf 1[r \text{ stated}] \mid \varphi\big] + \mathbb E\big[\ell(r)\, \mathbf 1[r \text{ not stated}] \mid \varphi\big]:

the chance that the sentence states rr, plus the chance that the knowledge base holds rr unstated.

Proof.

Condition on φ\varphi and write mφ=E[ℓ∣φ]m_\varphi = \mathbb E[\ell \mid \varphi], a distribution over labels. Then R(q)=E[∑rmφ(r) (−log⁡q(r∣φ))]\mathcal R(q) = \mathbb E\big[\sum_r m_\varphi(r)\,(-\log q(r \mid \varphi))\big], and for each φ\varphi

∑rmφ(r) (−log⁡q(r∣φ))=H(mφ)+KL(mφ ∥ q(⋅∣φ)),\sum_r m_\varphi(r)\,(-\log q(r \mid \varphi)) = H(m_\varphi) + \mathrm{KL}\big(m_\varphi \,\big\|\, q(\cdot \mid \varphi)\big),

which by Gibbs’ inequality (formalML: KL divergence) is minimized exactly at q(⋅∣φ)=mφq(\cdot \mid \varphi) = m_\varphi. The decomposition splits ℓ(r)=ℓ(r)1[r stated]+ℓ(r)1[r not stated]\ell(r) = \ell(r)\mathbf 1[r \text{ stated}] + \ell(r)\mathbf 1[r \text{ not stated}] and takes conditional expectations.

∎

Corollary 1 (A co-mention's label is its base rate).

If a context φ\varphi never states a relation, then q∗(NA∣φ)=1−ρ(φ)q^*(\mathrm{NA} \mid \varphi) = 1 - \rho(\varphi), where ρ(φ)\rho(\varphi) is the share of its pairs that the knowledge base relates. With r^\hat r the top relation and π=q∗(r^∣φ)/ρ\pi = q^*(\hat r \mid \varphi)/\rho its share of the relation mass, argmax predicts r^\hat r if and only if

ρ π>1−ρ.\rho\, \pi \gt 1 - \rho.

Neither quantity depends on the sample size.

Proof.

With nothing stated, ℓ(NA)=1\ell(\mathrm{NA}) = 1 exactly when L={NA}L = \{\mathrm{NA}\}, so q∗(NA∣φ)=P(L={NA}∣φ)=1−ρq^*(\mathrm{NA} \mid \varphi) = P(L = \{\mathrm{NA}\} \mid \varphi) = 1 - \rho, and the relations share the rest. Argmax compares the largest, ρπ\rho\pi, with 1−ρ1 - \rho.

∎

Distant supervision is therefore not noisy in the way a coin flip is noisy. Its errors are a deterministic function of the context: the classifier learns, correctly, how often the knowledge base relates the pairs that appear in each kind of sentence. On the finance corpus there are eleven frequent co-mention templates, with base rates from 0.5290.529 to 0.6850.685, and on each one the fitted classifier’s probability of some relation is within 0.050.05 of the template’s training rate. “X commented on conditions across banking” has ρ=0.685\rho = 0.685 and one candidate relation (π=1\pi = 1, IN_SECTOR), so the classifier labels it IN_SECTOR. Our overview sentence, “P has spoken publicly about X”, has ρ=0.646\rho = 0.646 split between CEO_OF and CFO_OF (π=0.595\pi = 0.595): 0.385>0.3540.385 \gt 0.354, a relation. “Analysts who cover X also follow Y” has ρ=0.600\rho = 0.600 and π=0.625\pi = 0.625: 0.375<0.4000.375 \lt 0.400, so NA, though its base rate is nearly as high.

The distantly supervised classifier scores sentence F1 0.8670.867 on the seen-company test (precision 0.7800.780, recall 0.9750.975) and 0.8870.887 on the held-out companies. It labels 0.2720.272 and 0.4390.439 of the related co-mentions with a relation, every entailed candidate, and only 0.0550.055 and 0.0390.039 of the unrelated ones. The What DS learns tab plots each template in the (ρ,π)(\rho, \pi) plane against the line ρπ=1−ρ\rho\pi = 1 - \rho. Its slider removes a share of the related co-mentions from training, which lowers each template’s ρ\rho: below κ=0.5\kappa = 0.5 no template crosses, and sentence F1 rises to 0.9300.930. Removing data helps because the removed data was teaching the base rate.


At least one witness

Riedel, Yao, and McCallum (2010) replaced the distant assumption with a weaker one: if two entities are related, at least one sentence mentioning them might express it. They found the distant assumption wrong for 31%31\% of sampled New York Times candidates. On our training corpus it is wrong for 0.3090.309 of distant labels, while the at-least-one assumption fails for 44 of the 177177 related (pair, relation) combinations (0.0230.023): pairs the knowledge base relates that the corpus never states.

Definition 3 (Bags and the at-least-one assumption).

A bag is every training mention of one ordered entity pair. At least one: if r∈KB(h,t)r \in \mathrm{KB}(h, t), some mention in the bag states rr; if not, none does. With instance probabilities pi=q(r∣φi)p_i = q(r \mid \varphi_i) treated as independent, the bag’s likelihood for rr is the noisy-OR

P(∃)=1−∏i(1−pi)P(\exists) = 1 - \prod_i (1 - p_i)

when r∈KB(h,t)r \in \mathrm{KB}(h, t), and ∏i(1−pi)\prod_i (1 - p_i) otherwise. Multi-instance learning (MIL) maximizes the sum of their logarithms over bags and relations.

This is Dietterich, Lathrop, and Lozano-Pérez’s (1997) multiple-instance problem, whose examples are positive when at least one of their instances is; “bag” is the later word. How does a bag’s label reach its mentions?

Theorem 2 (The bag gradient is an E-step).

Let yi∼Bernoulli(pi(θ))y_i \sim \mathrm{Bernoulli}(p_i(\theta)) independently and E={∃ i:yi=1}E = \{\exists\, i: y_i = 1\}. Then

∇log⁡P(E)=∑i[wi ∇log⁡pi+(1−wi) ∇log⁡(1−pi)],wi=P(yi=1∣E)=piP(E).\nabla \log P(E) = \sum_i \Big[w_i\, \nabla \log p_i + (1 - w_i)\, \nabla \log(1 - p_i)\Big], \qquad w_i = P(y_i = 1 \mid E) = \frac{p_i}{P(E)}.
Proof.

By Fisher’s identity (Dempster, Laird, and Rubin 1977, Section 3; formalStatistics: hidden Markov models, Remark 16), ∇log⁡P(E)=∑y∈EP(y∣E) ∇log⁡P(y)\nabla \log P(E) = \sum_{y \in E} P(y \mid E)\, \nabla \log P(y), because ∇P(E)=∑y∈EP(y)∇log⁡P(y)\nabla P(E) = \sum_{y \in E} P(y)\nabla \log P(y). Here log⁡P(y)=∑iyilog⁡pi+(1−yi)log⁡(1−pi)\log P(y) = \sum_i y_i \log p_i + (1 - y_i) \log(1 - p_i), so the conditional expectation acts term by term with weights E[yi∣E]\mathbb E[y_i \mid E]. Since yi=1y_i = 1 implies EE, P(yi=1∣E)=P(yi=1)/P(E)=pi/P(E)P(y_i = 1 \mid E) = P(y_i = 1)/P(E) = p_i/P(E).

∎

Each mention is pushed toward rr in proportion to the posterior that it is the bag’s witness. The coefficients have a closed form.

Corollary 2 (One witness silences the rest).

∂log⁡P(E)∂pi=∏j≠i(1−pj)P(E).\frac{\partial \log P(E)}{\partial p_i} = \frac{\prod_{j \ne i} (1 - p_j)}{P(E)}.

As any other pk→1p_k \to 1, this tends to 00, while the confident mention’s own coefficient tends to ∏j≠k(1−pj)\prod_{j \ne k}(1 - p_j).

Proof.

From Theorem 2, the coefficient of ∇pi\nabla p_i is wipi−1−wi1−pi\frac{w_i}{p_i} - \frac{1 - w_i}{1 - p_i}. With wi=pi/P(E)w_i = p_i/P(E) this is 1P(E)−P(E)−piP(E)(1−pi)=1−P(E)P(E)(1−pi)\frac{1}{P(E)} - \frac{P(E) - p_i}{P(E)(1 - p_i)} = \frac{1 - P(E)}{P(E)(1 - p_i)}, and 1−P(E)=∏j(1−pj)1 - P(E) = \prod_j (1 - p_j). If pk→1p_k \to 1 then P(E)→1P(E) \to 1 and the numerator, which contains the factor 1−pk1 - p_k for every i≠ki \ne k, tends to 00.

∎

The At least one tab opens the bag of our overview pair, Hollis and Pellucid, for CFO_OF. Four of its nine mentions state the relation (“Martin Hollis, chief financial officer of Pellucid Software, reviewed …”), and the MIL classifier gives them 0.7140.714 to 0.8450.845. The five co-mentions get 0.0010.001, and Corollary 2’s coefficient on each is 0.002520.00252: once the witnesses are confident, nothing pushes the co-mentions toward CFO_OF, and every bag in which the pair is unrelated pushes them toward NA. MIL labels no co-mention with a relation on either test. Zeng et al. (2015) train each bag on its single most probable mention, Corollary 2’s limit, where the other mentions receive nothing at all.

The same mechanism costs sentence recall. A stating mention whose bag already has a confident witness also stops learning, and if all its bags have one, nothing forces it to be labeled at all. Which mentions do the bag labels determine?

Proposition 2 (What the bag labels determine).

Let CC be a finite set of classes (here, templates), h:C→{0,1}h: C \to \{0, 1\} a hypothesis, and bags B⊆CB \subseteq C labeled by max⁡c∈Bh∗(c)\max_{c \in B} h^*(c), so at least one holds. Let NN be the set of classes that occur in some negative bag. Then:

  1. hmax⁡=1[c∉N]h_{\max} = \mathbf 1[c \notin N] is consistent with every bag label;
  2. it is the only consistent hypothesis if and only if every c∉Nc \notin N is the only non-NN class of some positive bag;
  3. in that case hmax⁡=h∗h_{\max} = h^*.
Proof.

(1) A negative bag holds only classes in NN, where hmax⁡=0h_{\max} = 0. A positive bag holds a class with h∗=1h^* = 1, which no negative bag can hold, so it holds a class outside NN. (2) Every consistent hh is 00 on NN, so h≤hmax⁡h \le h_{\max}; write h=hmax⁡−1Dh = h_{\max} - \mathbf 1_D with D∩N=∅D \cap N = \emptyset. If such an hh with D≠∅D \ne \emptyset is consistent, so is hmax⁡−1[c]h_{\max} - \mathbf 1[c] for any c∈Dc \in D, since it is pointwise larger. That hypothesis fails exactly at a positive bag whose only non-NN class is cc. So a second consistent hypothesis exists if and only if some c∉Nc \notin N is the sole non-NN class of no positive bag. (3) h∗h^* is consistent.

∎

The harness checks the proposition by brute force on 300300 random bag worlds. On the corpus, a stating template is forced for its relation when some training bag has it as its only template outside NN, and free otherwise. MIL’s recall on the seen test is 0.8920.892 on mentions of forced templates and 0.5340.534 on free ones (0.9400.940 and 0.4860.486 on the held-out test). The bag labels never ask for the free mentions, and Corollary 2 means the gradient does not either. Overall, MIL’s sentence precision is 0.9770.977 and its recall 0.7110.711: F1 0.8230.823, below distant supervision’s 0.8670.867.

From mentions to facts

A knowledge base needs facts, not sentence labels.

Definition 4 (Aggregating mentions into facts).

Score a fact (h,r,t)(h, r, t) by the max of q(r∣φ)q(r \mid \varphi) over the mentions of (h,t)(h, t) (Mintz et al.’s and Hoffmann et al.’s deterministic OR) or by the noisy-OR 1−∏(1−q(r∣φ))1 - \prod (1 - q(r \mid \varphi)) over them, and predict the facts that score above 1/21/2.

Proposition 3 (Noisy-OR dominates the max, and saturates).

For probabilities p1,…,pmp_1, \dots, p_m, 1−∏i(1−pi)≥max⁡ipi1 - \prod_i (1 - p_i) \ge \max_i p_i, and if every pi≥εp_i \ge \varepsilon then 1−∏i(1−pi)≥1−(1−ε)m1 - \prod_i (1 - p_i) \ge 1 - (1 - \varepsilon)^m.

Proof.

∏i(1−pi)≤1−pmax⁡\prod_i (1 - p_i) \le 1 - p_{\max}, since every other factor is at most 11, and ∏i(1−pi)≤(1−ε)m\prod_i (1 - p_i) \le (1 - \varepsilon)^m.

∎

Noisy-OR is MIL’s own likelihood, so MIL’s mention probabilities are trained for it. A classifier trained sentence by sentence has no such calibration, and a pair co-mentioned many times accumulates its weak probabilities toward 11. Scored against the world’s facts among the pairs each test co-mentions, the distantly supervised classifier’s fact precision is 0.8920.892 with the max and 0.7190.719 with noisy-OR on the seen test, and 0.7010.701 against 0.3310.331 on the held-out test, where six companies repeat many co-mentions. MIL keeps precision 1.0001.000 under noisy-OR. At the fact level MIL wins: F1 0.9350.935 against distant supervision’s 0.9280.928 (seen) and 0.9780.978 against 0.8250.825 (held out), each with its own aggregator. MIL gave up sentences it did not need to recover the facts.


An incomplete knowledge base is positive-unlabeled

So far the knowledge base has known every fact. Real ones do not, and Mintz et al. note that their held-out evaluation “suffers from false negatives”. A mention of a pair the knowledge base forgot is labeled NA, so the NA class holds unlabeled positives.

Definition 5 (An incomplete knowledge base).

Each unordered entity pair that the world relates is known, with all of its facts, independently with probability cc and independently of the text. The mentions of an unknown pair are labeled NA.

This is Elkan and Noto’s (2008) “selected completely at random” assumption, applied to pairs (Bekker and Davis 2020 call it SCAR).

Theorem 3 (Incompleteness scales the optimum by c).

Let q∗q^* be Theorem 1’s optimum for the complete knowledge base and qc∗q_c^* for the incomplete one. Then:

  1. qc∗(r∣φ)=c q∗(r∣φ)q_c^*(r \mid \varphi) = c\, q^*(r \mid \varphi) for every r∈Rr \in R, and qc∗(NA∣φ)=1−c (1−q∗(NA∣φ))q_c^*(\mathrm{NA} \mid \varphi) = 1 - c\,\big(1 - q^*(\mathrm{NA} \mid \varphi)\big);
  2. a template with q∗(r∣φ)=1q^*(r \mid \varphi) = 1 keeps rr under argmax if and only if c>1/2c \gt 1/2;
  3. Elkan and Noto’s estimator e1e_1, the mean of g=1−qc(NA∣φ)g = 1 - q_c(\mathrm{NA} \mid \varphi) over labeled positives, has expectation c E[1−q∗(NA∣φ)∣labeled]c\, \mathbb E[1 - q^*(\mathrm{NA} \mid \varphi) \mid \text{labeled}], which equals cc only if q∗q^* puts no mass on NA at the labeled positives.
Proof.

(1) Off NA, the incomplete label is ℓc(r)=s ℓ(r)\ell_c(r) = s\, \ell(r) with s∼Bernoulli(c)s \sim \mathrm{Bernoulli}(c), independent of φ\varphi given the pair. Conditioning on the pair, E[ℓc(r)∣φ]=c E[ℓ(r)∣φ]\mathbb E[\ell_c(r) \mid \varphi] = c\, \mathbb E[\ell(r) \mid \varphi], and Theorem 1 applies; NA takes the remaining mass. (2) Argmax compares cc with 1−c1 - c. (3) g=c (1−q∗(NA))g = c\,(1 - q^*(\mathrm{NA})) by (1), averaged over the labeled positives.

∎

Part (1) is Elkan and Noto’s Lemma 1, p(y=1∣x)=p(s=1∣x)/cp(y = 1 \mid x) = p(s = 1 \mid x)/c, at the level of pairs. Part (3) makes explicit what their proof assumes, that the labeled positives are certain positives. Distant supervision’s own target is not: on co-mention positives it is ρ\rho, below 11, so e1=0.910e_1 = 0.910 for the complete knowledge base. Elkan and Noto recommend e1e_1; here it runs low.

Part (2) predicts something surprising, and the Incomplete KB tab shows it. As cc falls, the classifier’s relation mass falls in step (0.8670.867 of the complete classifier’s at c=0.9c = 0.9, 0.3740.374 at c=0.4c = 0.4, slightly below cc because the L2 prior shrinks the rarer signal more). Co-mention templates sit near Corollary 1’s threshold and fall below it first, while stating templates hold until c=1/2c = 1/2. So a moderately incomplete knowledge base raises distant supervision’s sentence F1, from 0.8670.867 to 0.9320.932 at c=0.8c = 0.8, before recall collapses (0.6640.664 at c=0.6c = 0.6, 0.2490.249 at c=0.4c = 0.4). Dividing by the true cc restores recall to at least 0.9580.958 down to c=0.6c = 0.6, and with it the co-mention false positives: F1 returns to about 0.870.87.

Proposition 4 (Held-out evaluation reports c times the precision).

For a set SS of predicted facts chosen independently of which pairs the knowledge base knows, the expected precision measured against the incomplete knowledge base is cc times the precision against the world:

E[∣S∩KBc∣∣S∣]=c ∣S∩W∣∣S∣.\mathbb E\left[\frac{|S \cap \mathrm{KB}_c|}{|S|}\right] = c\, \frac{|S \cap W|}{|S|}.
Proof.

∣S∣|S| is fixed, and each true fact in SS lies in KBc\mathrm{KB}_c with probability cc, so linearity of expectation gives the result. False facts are never in KBc\mathrm{KB}_c.

∎

From c=0.8c = 0.8 down, every fact the incomplete-KB classifier predicts is true, yet scored against an independent knowledge base of the same rate its precision reads 0.7990.799 at c=0.8c = 0.8 and 0.6160.616 at c=0.6c = 0.6, as Proposition 4 predicts. Scored against the knowledge base it trained on, a case the proposition does not cover because the predictions depend on it, the readings are 0.7510.751 and 0.5980.598.


Names the extractor never saw

A co-mention template’s label is its base rate: argmax picks a relation iff ρπ > 1 − ρ
000.250.250.50.50.750.7511ρ: share of the template’s training pairs the KB relatesπ: top relation’s share (κ = 1)ρπ = 1 − ρ
DS labels the template with a relation (majority of its test candidates)DS labels it NACorollary 1’s threshold
κκ = 1.0
DS sentence F1 (seen test)
0.867
related co-mentions labeled
0.272
P / R
0.780 / 0.975
PERSON … has spoken publicly about … ORG
training candidates
65
ρ at κ = 1 / at this κ
0.646 / 0.646
π (CFO_OF)
0.595
fitted P(relation), κ = 1
0.649
test candidates labeled, this κ
1.000

Tap a point for its template. At κ = 1 the fitted P(relation) matches ρ within 0.05 on every template (Theorem 1). Moving κ left removes related co-mentions from training, which lowers each ρ; the decisions are refits, and π is drawn at its κ = 1 value. Removing data raises F1, because that data was teaching the base rate.


Where this sits

The named entity recognition topic returned spans; this page reads relations between them and aggregates the readings into facts. Its main theorem is a warning about the labels rather than the model: distant supervision teaches a classifier the knowledge base’s opinion of each pair (Theorem 1), multi-instance learning trades sentence recall for fact precision (Theorem 2, Proposition 2), and an incomplete knowledge base shrinks everything by its keep rate (Theorem 3). The output is a set of scored triples over companies, officers, places, and sectors, whose relations are symmetric (COMPETES_WITH), inverse (SUBSIDIARY_OF and PARENT_OF), and composed (BASED_IN from HQ_IN and LOCATED_IN). The next topic, knowledge-graph embeddings, asks which geometric models can represent those patterns.


Honest caveats


Implementation

The companion notebook (notebookPath) imports the topic’s Python module, which owns every number on this page. It imports the named entity recognition topic’s module for the test splits, the headline tagger and its predictions, and the masked-LM encoder’s states, and through it the linear classifiers topic’s softmax objective and the finance corpus with its knowledge base. Its harness checks:

  • Proposition 1’s three sources against the corpus’s own distant-supervision precision;
  • Theorem 1 on random finite worlds, and Corollary 1 on every frequent co-mention template;
  • Theorem 2 and Corollary 2 by complex step, the MIL objective’s analytic gradient by complex step, and Proposition 2 by brute force;
  • Proposition 3 on every classifier’s facts, Theorem 3 and Proposition 4 exactly on toys and across eight keep rates on the corpus;
  • Proposition 5’s bound on both tests for every classifier, and every comparison this page states.

The laboratory reads its data from a JSON file that one of the harness’s tests requires to equal the module’s viz_payload() exactly, so the figure cannot drift from the code.

Connections

  • Every classifier here is its softmax logistic regression; the order-conjoined between-string feature is its XOR lesson again, since which argument is the subsidiary depends on the template and the order together. linear-text-classifiers
  • Theorem 1 says a distantly supervised classifier is calibrated, but to the wrong target: its probabilities forecast the knowledge base's label, not whether the sentence states the relation. language-model-calibration

References & Further Reading