You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -246,7 +246,12 @@ After a decision has been made for each class independently, the consistency of
246
246
and disjointness axioms is checked. This is
247
247
done in 3 steps:
248
248
- (1) First, the hierarchy is corrected. For each pair of classes $A$ and $B$ where $A$ is a subclass of $B$ (following
249
-
the is-a relation in ChEBI), we set the ensemble prediction of $A$ to $0$ if the _absolute value_ of $B$'s score is large than that of $A$. For example, if $A$ has a net score of $3$ and $B$ has a net score of $-4$, the ensemble will set $A$ to $0$ (i.e., predict neither $A$ nor $B$).
249
+
the is-a relation in ChEBI), we set the ensemble prediction of $A$ to that of $B$ if $B$ is the more
250
+
_confident_ of the two, and $B$ to that of $A$ otherwise. Confidence is the distance from the decision
251
+
threshold, scaled separately on each side of it so that a maximally confident negative and a maximally
252
+
confident positive both count $1$ — the same measure `wmv-conf` weights its votes by. For example, if
253
+
$A$ scores $0.6$ and $B$ scores $0.1$ at a threshold of $0.5$, $B$ is the more confident one
254
+
($0.8$ against $0.2$), so $A$ is lowered to $0.1$ and neither class is predicted.
250
255
- (2) Next, we check for disjointness. This is not specified directly in ChEBI, but in an additional ChEBI module ([chebi-disjoints.owl](https://ftp.ebi.ac.uk/pub/databases/chebi/ontology/)).
251
256
We have extracted these disjointness axioms into a CSV file and added some more disjointness axioms ourselves (see
252
257
`data>disjoint_chebi.csv`and `data>disjoint_additional.csv`). If two classes $A$ and $B$ are disjoint and we predict
@@ -273,12 +278,11 @@ operating point the ensemble reports as `decision_threshold`, which is not alway
273
278
Gödel is winner-take-all (it raises the parent to the child, and zeroes the weaker side of a
274
279
disjoint pair), whereas Łukasiewicz shares the correction — a disjointness violation with scores
275
280
$0.8$ and $0.7$ becomes $0.55$ and $0.45$ rather than $0.8$ and $0$.
276
-
- `hex`, `hex-legacy` — **HEX graphs**
281
+
- `hex`— **HEX graphs**
277
282
([Deng et al. 2014](https://doi.org/10.1007/978-3-319-10590-1_4)). A CRF over binary label
278
283
vectors in which hierarchy edges forbid $(B, A) = (0, 1)$ and exclusion edges forbid
279
284
$(1, 1)$. Illegal states have probability zero, so the marginals satisfy
280
285
$P(A) \le P(B)$ for $A \subseteq B$ and $P(A) + P(B) \le 1$ for disjoint $A, B$ by construction.
281
-
The two variants differ only in how they cope with the intractability described below.
282
286
283
287
`ilr-godel`and `ilr-lukasiewicz` are tuned with `alpha`, `max_iter` and `tol`, passed as
284
288
`-irp alpha=0.5`. `scripts/calibrate_resolution.py` grid-searches resolution parameters against a
@@ -293,8 +297,8 @@ $O(\min(|V|2^w, |V|2^{\Omega}))$, and on a 2117-class ChEBI label set the maximu
293
297
$\Omega = 2115$ and the junction tree width is $\le 62$, with over 5 million legal states in the
294
298
largest cliques — the paper's efficiency argument assumes labels are mostly mutually exclusive,
295
299
whereas ChEBI labels overwhelmingly overlap (~25 classes hold per molecule). Exact junction-tree
296
-
inference is therefore not an option at this scale, and both variants deviate from the published
297
-
method; this should be reported as such.
300
+
inference is therefore not an option at this scale, so `hex` deviates from the published method;
301
+
this should be reported as such.
298
302
299
303
`hex`(`chebifier/hex_bounded.py`) replaces exact inference with a **branch-and-bound over partial
300
304
assignments**. Each search node fixes some labels on and some off, leaving the rest free, and
@@ -311,10 +315,3 @@ therefore decided negative — ties go against predicting the class — and the
311
315
labels is accumulated in `n_uncertified`. Pass `budget` and `processes` (molecules are bounded in
312
316
parallel across a worker pool) with `-irp budget=4000`. `threshold` defaults to the ensemble's
313
317
operating point and only needs to be set explicitly to override it.
314
-
315
-
`hex-legacy` (`chebifier/hex_graph.py`) instead *clamps*: classes whose score is further than
316
-
`delta`from the boundary, and which are not involved in a violation, are fixed to their sign; that
317
-
assignment is propagated to a fixpoint; and exact inference runs only on the connected components
318
-
of what remains (typically fewer than 30 classes). Components above `max_component_size` fall back
319
-
to `score-based`, counted in `n_fallbacks`. Unlike `hex`, it gives no guarantee about how far the
0 commit comments