Evaluating Extreme Hierarchical Multi-label Classification
Paper · 2022 · Enrique Amigo and Agustín Delgado
Summary
A classification system can be wrong in several ways at once. It can miss a rare medical code, assign a common code that does not apply, or choose a code that belongs to the right family but describes the wrong condition. Many discharge reports in the authors’ case study have no adverse-event code at all, so a system can also agree with most reports by returning an empty answer every time. The paper asks how evaluation should distinguish these outcomes when documents can take several labels and the labels come from a large, unevenly populated hierarchy.
Amigó and Delgado compare measures that count correct decisions by label, measure overlap by document, or give partial credit for agreement within a hierarchy. They specify what they want an evaluation measure to do in controlled situations, such as rewarding recovery of an uncommon true label or penalizing a wrong label less when it is closely related to the reference. They then adapt the Information Contrast Model, or ICM, to evaluate sets of predicted labels. ICM uses the frequency of a category and its descendants to estimate how much information the category conveys. It rewards information shared with the reference and charges for information that occurs on only one side. A common ancestor can supply some shared information even when the predicted and reference labels differ.
On synthetic data, the authors compare pairs of predictions created by introducing different kinds of errors into the same reference. ICM favors the intended better output in 96.10% of the error-rate comparisons, with ties counted as stipulated by the experiment. It scores 100% on each of the tests for omitted rare labels, incorrect rare labels and hierarchical proximity. It scores 74.77% on the test that varies how errors are distributed across documents with different numbers of labels. The authors show formally why ICM cannot guarantee the desired preference in that last case. When labels are unrelated, its gains can add up the same way whether the correct predictions are spread across documents or concentrated in one.
The medical case study covers 36,264 anonymized Spanish hospital discharge reports. The corpus contains 671 of the 4816 adverse-event codes in the coding scheme, and 84% of reports have no adverse-event annotation. Several measures rank the baselines in the same order, but ICM gives the keyword-matching baseline a much lower relative score than the baseline that always returns an empty set. The comparison illustrates what the metric changes in practice. A large number of wrong assignments can carry a substantial penalty even when the system occasionally recovers a useful code, and related or uncommon labels can affect the score in ways that an exact count of decisions cannot express.
Deep dive: Evaluating Extreme Hierarchical Multi-label Classification
How the Information Contrast Model scores rare labels, related mistakes and multiple predictions in extreme hierarchical classification. · about 36 minutes to read
The problem and its context
A document can have several correct answers
In text classification, a system assigns categories to an input. A single-label task asks for one category per item. A multi-label task accepts a set, which can contain several categories or be empty. The authors cite social-media tagging and topic identification as examples. Assigning tags to a post involves deciding how many tags it needs as well as choosing their identities. A classification measure must therefore say how to compare a system that returns too few labels with one that returns too many.
The number of true labels varies from item to item. A system that finds a correct label on a heavily annotated document may leave much of its content unaccounted for. A system that finds a single label on a different document may recover everything the reference records for that item. A count of correct assignments treats those hits alike. A per-document overlap score can distinguish them, but its treatment of the extra or missing assignments depends on how it normalizes overlap. That choice also affects how gains on different documents accumulate into an overall score.
Extreme classification adds a large category inventory with a highly uneven frequency distribution. A few labels can account for many assignments, while some available categories occur very rarely or have no observations in the reference. The paper begins with a simpler illustration of why this matters. Predicting the majority class can do well on ordinary accuracy and poorly on a measure that averages performance across classes. Both scores describe the same predictions. They assign different weight to the categories under which those predictions are examined.
An extreme multi-label task brings these imbalances together. The total number of possible document–category decisions can be large even when each document has few positive assignments. An evaluator that rewards correctly rejecting an absent category can accumulate considerable credit without recovering much of the positive annotation. At the same time, an ordinary overlap measure can treat a missed ubiquitous label exactly like a missed rare one. The authors want a measure whose treatment of the latter distinction applies to false assignments as well as true ones.
A wrong label may still describe the right branch
In a hierarchy, a specific label implies more general categories above it. The paper uses the example of a person named entity, which also belongs to the wider named-entity category. It cites A Hierarchically-Labeled Portuguese Hate Speech Dataset as another example of a task in which categories of interest have finer subdivisions.
A system that names a neighboring category and a system that selects a distant one both fail an exact-label test. Their outputs can convey different amounts of relevant information. A nearby label may identify the right branch and make a mistake at a finer level. An evaluator can recognize that agreement by looking for a common ancestor, the category from which both labels descend. The most specific ancestor that the labels share gives a way to describe the part of the classification they have in common.
Position in the hierarchy supplies only part of the information the authors want. A long path can describe categories that happen to occur frequently in the corpus. A category near the top can cover a branch with very few observed members. The depth of a node tells a reader how the category scheme is organized. The number of observed items that fall under it tells a reader how selective that category is in the data. A measure designed for both hierarchy and imbalance needs a way to use both facts.
This distinction is especially pertinent to a coding scheme where the available codes outnumber those observed in a corpus. The hierarchy still identifies how an unused code relates to other codes. The reference cannot directly supply a positive frequency estimate for that unused code. A rule for handling an unseen category therefore affects the behavior of any evaluation that bases its penalties on frequency.
What earlier evaluation measures count
The paper describes ranking as one approach to multi-label evaluation. A system returns candidate labels in order, and the evaluator asks whether appropriate labels appear early. Ranking loss examines ordering, while one-error focuses on the first choice. Average precision provides another way to summarize where correct labels appear. The authors also discuss propensity-weighted variants that adjust the influence of labels with different frequencies. Ranking can be an appropriate representation for a large label inventory, but the authors study outputs that already commit to which labels to assign. A ranked list alone leaves the decision about how many tags to apply unresolved.
For committed label sets, the paper distinguishes label-based evaluation from example-based evaluation. Label-based measures treat each category as a binary decision across items, then average category scores. This gives each category a place in the evaluation regardless of how often it appears. It also means the definition of the label inventory influences the result. The contribution of an individual category to the average has a cap determined by the number of categories, and hits are assessed without reference to how many labels the corresponding item carries.
Example-based measures begin with the reference and prediction sets for an individual item. Jaccard similarity divides the number of shared labels by the number of distinct labels appearing on either side. Precision uses the predicted set as its denominator, while recall uses the reference set. Their harmonic combination is an example-based F-measure. Subset accuracy requires complete set agreement. Hamming loss counts disagreed label assignments against the available label space. These measures let the unit of evaluation be the item, although their different denominators lead to different responses to items with many annotations.
Ordinary versions of these example-based scores use label identity to determine a match. Their basic overlap counts give the same weight to different labels. Propensity weighting introduces a frequency-dependent weight. The version discussed in the paper originally applies those weights to hits. The authors also evaluate a modified version in which the weights enter the denominators, allowing incorrect assignments to influence the score according to their specificity.
Earlier hierarchical measures follow another distinction. Pair-based measures compare individual categories. Some count steps along a path, some incorporate depth, and some use information derived from category frequencies. Wu and Palmer’s work is among the earlier approaches to category similarity discussed in this context. The paper gives particular attention to the information-based similarities of Jiang and Conrath and of Lin. Applying a similarity defined for pairs of labels to sets raises a further question. There can be several plausible counterparts for a predicted label, and a single shared ancestor may account for some of the agreement among several labels.
Set-based hierarchical evaluation handles multiple labels by collecting their ancestors. Hierarchical precision measures what share of the predicted closure is also found on the reference side, and hierarchical recall makes the corresponding comparison from the reference side. Hierarchical F-measure combines them. A prediction that shares ancestors with the reference can then earn partial credit even if the exact labels differ. The frequency of an ancestor contributes no separate weight in this counting procedure. Two branches with comparable structures can produce comparable overlap even if their observed frequencies differ considerably.
The authors organize these alternatives around the distinctions an evaluator may need to make. An item-based score can account for the rest of an item’s labels when valuing a hit. A hierarchy-aware score can credit partial agreement. A frequency-aware score can distinguish a prediction with a broad, frequent meaning from one that is highly specific in the corpus. The problem the paper takes on is how to put these considerations into one comparison of predicted and reference sets, and how to check which of the desired behaviors that comparison actually delivers.
The method, step by step
What the evaluator receives
The evaluator receives a reference set and a predicted set for each item. The reference, also called the gold standard, records the assignments against which the predictions are judged. For the medical example, an item is a discharge report and a label is an adverse-event code. Both the reference and the prediction can be represented as collections of item–category pairs. Grouping the pairs by item recovers the two sets that ICM compares.
The evaluator also needs a hierarchy and evidence about category frequency. The hierarchy says which more general categories apply when a specific category applies. The reference provides observations of how many items fall under a category. In the authors’ construction, the frequency of a parent reflects items in its descendants as well as items directly assigned to it. A parent can therefore have a substantial number of supporting items even when annotators seldom assign the parent itself.
The method assigns information content to a category. A category that covers many items conveys relatively little information about which items are being described. A category that applies rarely conveys more. Then it estimates the information in the full reference set, the full prediction set, and the union of those sets. The last of these brings agreement and disagreement into one calculation. If the sides describe much the same thing, the union adds comparatively little information. If each describes distinct categories, the union contains more information and the score falls.
Scoring a predicted label set with ICM
The steps in order.
This is a procedure for evaluating fixed predictions. Its parameters govern how strongly shared and distinct information count toward the score. The real-data classifiers have their own training procedures, while the synthetic outputs are generated directly from the references. Neither procedure is required to produce predictions in an ICM-specific format beyond giving a set of labels for each item.
Estimating how much a category says
The authors use a negative logarithm of the reference probability as the information content of a category. They estimate the probability by gathering distinct items beneath the category, including the category itself, and comparing their count with the number of distinct items in the reference assignment sets.
IC(c) = −log₂(P(c)) ≃ −log₂(|⋃_{d∈{c}∪Desc(c)} I_d| / |⋃_{d∈C} I_d|)
Here IC(c) is the information content of category c, and P(c) is its probability under the reference. log₂ is the base-two logarithm, − changes its sign, and ≃ denotes estimation. Desc(c) is the set of descendants of c, including c under the paper’s convention. The braces around c denote its singleton set. d ranges over categories, I_d is the set of items assigned to category d, and C is the category inventory. ∈ indicates membership, ∪ and ⋃ combine sets, and the vertical bars count their distinct elements.
The unions over items matter. Imagine a report assigned several codes below the same parent. It appears in several descendant assignment sets, but it contributes only once to the estimate of how frequently that parent applies. That feature distinguishes an item probability from a simple sum of code counts. It also means that the evaluation data influence the information content of a branch through the documents that fall within it, including documents that have several closely related annotations.
The denominator and the treatment of an empty reference set deserve attention. The formula is written using the union of the category assignment sets. In the hospital application, the hierarchy explicitly includes an empty root with information content of 0. That root represents the general case against which more informative assignments are contrasted. A document lacking an adverse-event code can be represented without giving its empty answer the information content of a particular adverse event.
A category absent from the reference can nevertheless appear in a prediction. Treating an unobserved probability as zero would make the negative logarithm undefined as a finite score. The authors instead use a minimum probability based on the size of the item collection.
P_min = 1 / |I|
P_min denotes the minimum probability used for smoothing, I is the set of items, and |I| counts those items. The 1 is the numerator of the minimum-probability expression. The rule gives an unseen category a finite information value while still treating it as highly specific. The resulting penalty for proposing such a category can depend on the size of the collection used to establish that minimum.
Combining information across labels
To compare labels in a hierarchy, ICM needs an estimate of the information they share. The authors treat the deepest common ancestor as the common feature of the two categories. If two labels fall in the same narrow branch, that branch can supply shared information. If their only common ancestor is the root, the overlap carries the root’s information value. When a category is compared with itself, the category itself represents the common information.
{cᵢ} ∩ {cⱼ} = lso(cᵢ, cⱼ)
cᵢ and cⱼ are the two categories, and i and j identify their positions in a list of labels. The braces denote sets containing one category each. ∩ means intersection, and lso denotes the common ancestor of greatest depth. = expresses the authors’ identification of feature overlap with that ancestor. The left side represents overlap in the hierarchical features implied by the labels. Two distinct category identifiers would have an empty intersection if they were treated as ordinary singleton sets without those implied features.
The authors then assume information additivity with a correction for overlap. The information in a joint description is the sum of the separate descriptions after subtracting their common information.
IC({cᵢ} ∪ {cⱼ}) = IC(cᵢ) + IC(cⱼ) − IC({cᵢ} ∩ {cⱼ})
IC denotes information content, and cᵢ and cⱼ are the categories being combined. The braces form singleton sets. ∪ forms their union, and ∩ denotes their common hierarchical information as defined above. The + adds the separate category values and the − subtracts the overlapping value. The equation estimates joint information from category information and the hierarchy. It does not require an observed reference frequency for every possible combination of labels.
That distinction is important in an extreme category inventory. The data may establish that individual labels are unusual while offering little evidence about how often a particular combination occurs. An estimate based on the separate labels remains available in that situation. Its correction comes from how the labels are related in the hierarchy. If several labels share an informative ancestor, treating all their information as separate would count the description provided by that branch repeatedly.
For a larger set, the calculation separates one category from the rest. It adds that category’s information to the information in the remaining set, then subtracts what the separated category shares with the set. The authors obtain that shared part by collecting its deepest common ancestor with each remaining label. They evaluate the information of the resulting ancestor set in the same way.
IC({c₁, …, cₙ}) = IC(c₁) + IC(⋃_{i=2…n} {cᵢ}) − IC(⋃_{i=2…n} {lso(c₁, cᵢ)})
c₁ is the category separated from the set, cᵢ is a category at position i, and n is the size of the set. The ellipsis lists the intervening positions. Each ⋃ combines the indicated singleton sets from position 2 to n. The first union contains the remaining categories. The second contains their deepest common ancestors with c₁, obtained through lso. IC is the information calculation for a category or a set of categories. The subtraction removes the information that the separated category and the remaining set already share.
For an item with codes from different branches, the shared ancestors can be very general. The information in that item’s label set can then be close to the accumulation of the separate code contributions. For an item with several codes in a narrow branch, the shared ancestors can contribute considerably more overlap. The information estimate distinguishes these cases even when the items have the same number of labels. This is how hierarchy can soften the accumulation of score on an item that has many related labels.
Turning information into a similarity score
For a particular item, the evaluator uses its reference and predicted category sets as the two feature sets in ICM. The score takes a weighted sum of their individual information values and subtracts a weighted joint value.
ICM(A, B) = α₁ IC(A) + α₂ IC(B) − β IC(A ∪ B)
A and B are the category sets being compared. IC(A) and IC(B) are their information contents, and IC(A ∪ B) is the information content of everything asserted on either side. ∪ combines the sets. α₁ and α₂ weight the separate terms, β weights the joint term, and ICM(A, B) is the resulting similarity. The positive terms give value to specific descriptions. The negative term puts a cost on making the combined description contain information that the two sides do not share.
The paper relates this construction to earlier work on similarity. It identifies ICM as a generalization of pointwise mutual information and of Tversky’s linear contrast approach. Here the terms have a concrete interpretation in classification. Given the same joint information, increasing the information on one side gives a higher score. When the sides remain individually comparable but have less information in common, the union becomes more informative and reduces the score.
The parameter condition comes from the authors’ earlier work on similarity axioms.
α₁, α₂ < β < α₁ + α₂
α₁ and α₂ are the individual weights, and β is the joint weight. The comma indicates that each individual weight must satisfy the first comparison. < means strictly less than, and + forms the sum of the individual weights. The classification experiments use α₁ = α₂ = 2 and β = 3. Here = assigns the values, 2 is the common individual weight, and 3 is the weight of the union.
The paper derives simpler expressions to show what this choice does. For a single predicted label and a single reference label in a hierarchy, the general calculation reduces to a contribution from the common ancestor and a charge for each individual label.
ICM(c₁, c₂) = −IC(c₁) − IC(c₂) + 3 IC(lso(c₁, c₂))
c₁ and c₂ denote the labels, IC gives their information contents, and lso(c₁, c₂) is their deepest common ancestor. ICM is their similarity under the chosen weights. The minus signs charge the separate information, and the positive coefficient 3 weights the information shared through the ancestor. With equally informative labels, the score comparison is driven by the common-ancestor term. A more informative shared node gives greater credit for the relationship.
In a flat hierarchy there is no informative ancestral overlap between different categories. For multiple labels, the computation becomes a signed sum over matching and unmatched categories.
ICM(C, C′) = ∑_{c∈C∩C′} IC(c) − ∑_{c∈(C∖C′)∪(C′∖C)} IC(c)
C and C′ are the two flat label sets for the item in this expression. c is a category being summed over, ∑ indicates summation, and IC(c) is its information content. ∩ keeps categories present in both sets. ∖ removes the elements of the set on its right from the set on its left. ∪ joins the two groups of unmatched categories, covering omissions and extra predictions. ICM(C, C′) rewards the first sum and subtracts the second.
For the flat case with one label on each side, the authors give the following specialization.
ICM(c₁, c₂) = { IC(c₁) if c₁ = c₂
{ −IC(c₁) − IC(c₂) otherwise
c₁ and c₂ are the single labels and IC is category information. The brace introduces the two cases. The equality on the first line tests whether both labels name the same category. If they do, the score is the information content of that category. Otherwise, the minus signs give a penalty for the information in both labels. Thus a correct rare label can earn a larger score than a correct common one, while a wrong rare prediction can incur a greater charge than a common prediction against the same reference.
The article’s real-data comparison reports average ICM over items. The component scores measure information agreement and can be negative. The perfect contribution also depends on the information content of the correct labels. ICM therefore has a different numerical interpretation from a proportion of correct assignments. The authors use a separate normalization when comparing the spacing of baseline scores in the medical case study.
The behavior the authors ask of the score
The formal tests use simplified settings so that the desired behavior can be considered on its own. Strict monotonicity starts with a flat, single-label task. It asks whether supplying a correct assignment that the system had left out strictly improves the overall score.
Eff(s ∪ {(i, c)}) > Eff(s), when (i, c) ∈ g∖s
Eff is the effectiveness measure under examination. s is the set of system assignments, g is the set of reference assignments, i is an item, and c is a category. The pair (i, c) denotes an assignment. ∈ marks membership, ∖ is set difference, and ∪ adds the pair to the predictions. The > sign represents a strict improvement. The authors use the same kind of inequality to state multi-label monotonicity in a flat task, where an item can already have other correct labels.
True category specificity asks for a greater reward when a missing correct assignment is rare. Wrong category specificity asks for a larger penalty when an added false assignment is rare. The authors state these requirements in a flat single-label setting to separate the frequency issue from the hierarchy and from interactions among several labels on an item. The comparison for wrong specificity holds the starting predictions fixed. It asks how much the scores change when the additional prediction carries the information associated with a rarer or a more frequent category.
Hierarchical proximity sets aside differences in the frequencies of the candidate categories. With an initially empty output for an item, it compares adding a candidate close to the true category and adding one further away. The location of the common ancestor expresses that relation. For ICM the mechanism is visible directly in the single-label formula. When the candidates have equal information values, any gain comes from an increase in the information carried by the ancestor they share with the truth.
The remaining property compares different distributions of correct assignments. The same collection of labels can be recovered on separate items or on one heavily annotated item. The authors ask the metric to prefer gains spread across items. Their medical motivation is that recovering a symptom for several patients can be more valuable than accumulating many correct symptom codes on a single report. They frame the property as a preference for settings where breadth of coverage matters. Their formal analysis finds that the flat multi-label expression for ICM cannot guarantee it. Each category in that expression contributes additively, so an identical collection of restored labels can produce identical gains under both arrangements.
A frequency-aware comparison measure
For the propensity-weighted F-measure baseline, the authors start from a weighting scheme in which the score counts correct labels using their inverse propensities. The original precision and recall divide by the unweighted size of the prediction and reference, respectively. When the propensity of a correct label is very small, its inverse can be large. The resulting ratio does not have the usual upper bound of ordinary precision or recall.
The paper uses the following propensity for a category.
p_c = 1 / (1 + C e^(−A log₂(N_c + B)))
p_c denotes the propensity for category c. N_c counts the observations with that label in the reference data. A and B are application parameters, C is a scale factor, e is the base of the exponential, and log₂ denotes the logarithm written in the propensity expression. The 1 terms enter the reciprocal construction, + adds the offset or combines terms, and the minus sign makes the exponent decrease as the logarithm increases.
C = (log(N) − 1)(B + 1)^A
C is the scale factor in the propensity formula, here distinct from the category-set notation used above. N is the size of the observed reference dataset, log is the logarithm in the scale expression, and A and B are the same application parameters. − and + adjust the two terms by 1, juxtaposition multiplies them, and ^A raises the second parenthesis to the power A. The experimental settings are A = 0.55 and B = 1.5.
In the modified baseline, the denominator is the total inverse propensity on the side being measured. An empty class is also added on both sides for every item. This class supplies a common contribution and lets frequency affect the score even when the item carries a single substantive label.
PropP(i) = (∑_{c∈s′(i)∩g′(i)} 1/p_c) / (∑_{c∈s′(i)} 1/p_c)
PropP(i) is weighted precision for item i. s′(i) and g′(i) are its predicted and reference sets after adding the common empty category. c is a category, p_c is its propensity, and 1/p_c is its weight. ∑ accumulates weights, ∈ indicates membership, and ∩ selects the categories shared by the two sets. The fraction divides the shared weight by the predicted weight.
PropR(i) = (∑_{c∈s′(i)∩g′(i)} 1/p_c) / (∑_{c∈g′(i)} 1/p_c)
PropR(i) is weighted recall for item i. The shared categories in s′(i) ∩ g′(i) contribute the same inverse propensity 1/p_c for each c as in weighted precision. The denominator sums those weights across the augmented reference set g′(i). The F-measure, called PROP-F in the comparisons, is the harmonic mean of weighted precision and recall. Because the extra predicted category contributes to the precision denominator even when it is false, its frequency can affect the penalty.
Experiments and results
Synthetic references with uneven labels and items
The synthetic experiment builds a hierarchy with 700 categories. Categories 1 through 10 are parents at different places in the structure, and categories 11 through 700 are leaves. The reference assignments are drawn with a probability that factors into an item term and a category term.
P(assign i to c) = pᵢ · p_c
P is the probability of an assignment, i denotes the item, and c denotes the category. pᵢ is the item-specific factor and p_c is the category-specific factor for the synthetic generator, distinct from the propensity weight used for the comparison measure. The dot multiplies the two factors. Varying the item factor makes some items likely to carry several labels and others likely to carry few. Varying the category factor makes some categories frequent and others sparse.
The authors illustrate the resulting imbalance with counts that include 300, 150 and 40 items per category at the more populated end and 0.6 at the sparse end. Their reported labels-per-item figures include 22.5, 22, 21.6 and 21.1 at the more heavily annotated end and 0.5 at the low end. These are distribution summaries, which explains why they can include fractional values. The authors generate 1000 gold standards by permuting category identifiers in the assignment probabilities. Frequent labels can consequently occupy different parts of the hierarchy across references. The experiment varies how frequency and position coincide while retaining an uneven assignment process.
The accounts of the item population in the generation paragraph are internally inconsistent. Its prose says that 100 items are distributed across categories, while the item index in the probability specification runs through 1000. The categories, the assignment probability’s factorization, the stated number of reference variants and the reported comparison results identify the main design. The conflicting item counts prevent a unique reconstruction of the sampling population from that paragraph.
The comparison includes label-based accuracy and label-based F-measure, abbreviated LB-ACC and LB-F. The example-based group comprises Jaccard, Hamming, subset accuracy and F-measure, abbreviated EB-JACC, EB-HAMM, EB-SUBACC and EB-F. The other comparison scores are the modified PROP-F and hierarchical F-measure, abbreviated HF. For HF the authors include the common empty root when measuring ancestor overlap, which supplies a defined comparison when both sets would otherwise be empty. Pairwise ontological similarities and ranking metrics are outside this comparison because the test outputs are ungraded sets that can contain several labels.
How to read the synthetic comparisons
Each test produces a pair of deliberately degraded predictions from a gold standard. The authors choose the degradations so that one member of the pair should be preferable under the particular criterion. The reported score is how often the metric agrees with that ordering over the comparisons, with an exact tie counting as 0.5. A value of 50% can therefore arise from systematic indifference. It can also result from a mixture of preferences and ties. These percentages measure the behavior of evaluation measures on controlled pairs, as opposed to the accuracy of a trained classifier on documents.
The error-rate experiment removes reference assignments at probabilities of 0.09 for the intended better output and 0.1 for the other output. The paper reports 9 and 10 removals on average, respectively, and describes running the corruption procedure 1,000 times. The test gives a direct view of how strongly a measure follows the number of missing assignments when the selected assignments vary.
Synthetic data, sensitivity to error rate
Label-based accuracy and Hamming are the most sensitive to assignment counts, and ICM leads the remaining measures.
The numbers
| System or setting | Expected ordering % |
|---|---|
| Label-based accuracy | 100% |
| Example-based Hamming | 100% |
| ICM (this paper) | 96.10% |
| Example-based subset accuracy | 91.79% |
| Example-based Jaccard | 86.59% |
| Propensity F-measure | 85.64% |
| Label-based F-measure | 84.98% |
| Hierarchical F-measure | 81.03% |
| Example-based F-measure | 79.43% |
All measures favor the less corrupted output overall in this test. Label-based accuracy and Hamming respond directly to errors counted over the category space and obtain the strongest results. The authors find ICM’s sensitivity relatively high given that frequency and hierarchy can also affect its score. They leave the reason for its particular result open.
The tests for true and wrong category specificity both use an error rate of 0.05. LB-F, PROP-F and ICM each score 100% on both tests. The unweighted flat overlap measures and label-based accuracy score 50% in both. Hierarchical F-measure scores 46.55% when the experiment varies which true labels are omitted and 42.04% when it varies the frequency of the wrong replacement. An evaluation measure can therefore have a strong result for hierarchical relationships while showing little support for the desired frequency ordering.
The hierarchical proximity test also uses an error rate of 0.05. It compares a replacement by a sibling leaf with a replacement by a randomly chosen wrong label. HF and ICM both score 100%. PROP-F scores 53.15% and LB-F scores 52.65%, while the other flat comparators score 50%. The strong effects line up with whether the evaluator explicitly inspects the relation of the proposed category to the true one.
The last test varies the distribution of errors across items, again at an error rate of 0.05. Jaccard, example-based F-measure and PROP-F each score 100%, with HF at 99.90% and subset accuracy at 96.80%. ICM favors the intended ordering in many comparisons, with a weaker result than the measures whose per-item normalization directly reflects the number of labels. LB-F favors the opposing ordering overall.
Synthetic data, sensitivity to where item errors fall
Several item-based measures strongly favor concentrating errors on more heavily labeled items, while ICM shows a weaker preference.
The numbers
| System or setting | Expected ordering % |
|---|---|
| Example-based Jaccard | 100% |
| Example-based F-measure | 100% |
| Propensity F-measure | 100% |
| Hierarchical F-measure | 99.90% |
| Example-based subset accuracy | 96.80% |
| ICM (this paper) | 74.77% |
| Label-based accuracy | 50% |
| Example-based Hamming | 50% |
| Label-based F-measure | 26.38% |
Discharge reports and the baselines
The real-data study evaluates automatic adverse-event coding for reports from a Spanish hospital. The CIE-10-ES coding scheme used for the work is the Spanish version of ICD-10. The paper places its application in the context of earlier medical coding and extraction work, including Detecting Adverse Drug Events from Swedish Electronic Health Records using Text Mining. The present comparison uses the Spanish discharge reports and their expert annotations.
The hierarchy contains 4816 codes associated with adverse events. It has six levels, starting with an empty root and then moving from categories designated by three characters to nested subcategories with as many as seven characters. The root’s information content is 0. A report can describe several adverse events, and their corresponding codes can occur in different parts of that hierarchy. The authors describe the frequencies as following a power-law distribution, with many available labels occurring rarely or never.
The corpus consists of 36,264 anonymized discharge reports labeled by experts. The training, development and test proportions are 50%-30%-20%, respectively. Across the corpus, 671 of the 4816 possible adverse-event codes occur, and 84% of discharge reports have no adverse-event annotation. These figures describe both the large unobserved part of the code inventory and the predominance of empty reference sets. A baseline can get many decisions right simply by leaving categories unassigned.
The authors choose baselines that make different kinds of predictions. ALL NONE returns the empty set on every report. MOST FREQ. returns the adverse-event code that appears most frequently in the training data, T45.1X5A, on every report. The paper gives its occurrence in the test set as 68 items of 7253. The comparison between these rules puts systematic silence and systematic repetition of a single common category on the same data.
MATCH 75% breaks a report into sentences and checks whether a sentence contains 75% of the words in a candidate code description after excluding stop words. It can propose a code even when the code was absent from training. The support-vector-machine baselines instead build binary classifiers for adverse-event codes that occur in training. SVM DESCR. uses the presence of words from adverse-event descriptions, again excluding stop words. SVM CODES uses the other annotated medical codes as features, allowing the baseline to use relationships between adverse-event and non-adverse-event coding. The two trained baselines have a label inventory limited by training observations.
The purpose of this setup is to compare what the metrics reward when faced with empty predictions, indiscriminate predictions and predictions with different sources of evidence. It also supplies a contrast in possible outputs. The description-matching rule can make guesses beyond the vocabulary learned by the trained baselines. When one of those guesses is wrong, a measure that uses rarity can respond strongly. The study does not isolate this capability from the other differences between the systems.
What changes on the medical test set
Several absolute scores show how the empty-answer baseline benefits from the distribution. ALL NONE receives a test label-based accuracy of 0.9999. So do SVM DESCR. and SVM CODES at the precision reported in the table. The example-based Jaccard score for ALL NONE is 0.8395, against 0.8409 for SVM DESCR. and 0.8644 for SVM CODES. On hierarchical F-measure the same three scores are 0.8902, 0.8913 and 0.9080, respectively. With empty reference sets common, getting those sets right is an appreciable source of example-based agreement as well. The remaining distinctions depend on how the metric values positive predictions and their errors.
Example-based subset accuracy behaves differently in what it requires. On a report with several true codes, a partial set earns no exact-set match. The test scores are 0.8395 for ALL NONE and 0.8573 for SVM CODES. Example-based F-measure accepts partial overlap, with test scores of 0.8395 for ALL NONE and 0.8670 for SVM CODES. The distinctions between these score scales matter when comparing systems that recover some of the labels on an item while missing others.
The authors found the baseline rankings too similar to reveal much about differences in relative score. They rescale each measure’s scores using that measure’s own minimum and maximum across the baselines. On this scale, the lowest observed system score is 0.00 and the highest is 1.00. Intermediate values give the position of each baseline between those endpoints. A normalized value applies to the chosen group of systems. Adding another baseline with a new minimum or maximum would change the scale.
Spanish discharge-report test set, normalized average ICM
The sentence-matching baseline falls below the empty output, and the classifier using other medical codes leads the comparison.
The numbers
| System or setting | Normalized average ICM |
|---|---|
| MOST FREQ. | 0.00 |
| MATCH 75% | 0.43 |
| ALL NONE | 0.92 |
| SVM DESCR. | 0.94 |
| SVM CODES (this paper) | 1.00 |
The relative placement of MATCH 75% is the clearest distinction the authors identify. Its normalized test score is 0.83 under Jaccard, 0.83 under hierarchical F-measure and 0.67 under PROP-F. ICM places it still lower relative to ALL NONE. The authors attribute this behavior to the many wrong code assignments made by the rule. Empty output supplies no affirmative information about an adverse event. A positive but wrong assignment supplies information that conflicts with the reference. The chart shows the relative cost that ICM assigns to the latter behavior in this comparison.
The raw ICM averages convey a different aspect of the result. The test average is -8.6158 for MOST FREQ., -5.5761 for MATCH 75%, -2.2062 for ALL NONE and -2.1107 for SVM DESCR. These negative values are consistent with a measure that charges for specific information found on only one side. An empty prediction can still incur a penalty when the reference contains a code. Across this test set, it fares better on average than the baseline that asserts the same code across all reports or the baseline that makes many false assignments using descriptions.
The authors report 269 hits for SVM CODES and 77 hits for SVM DESCR. They also observe that ICM gives SVM CODES slightly greater separation from the other baselines. The hit counts establish that the code-feature baseline recovers more correct assignments in the comparison. The metric results capture the combined effect of its agreements and disagreements, including their specificity and overlap within the hierarchy. The normalized comparison alone cannot isolate how much of the separation comes from each of those ingredients.
What the ablations show
Controlled changes to the outputs
The paper does not remove individual ICM components and rerun the experiments. It instead controls which kinds of errors are introduced into predictions and compares how the evaluation measures react. These comparisons test whether a proposed preference appears under a specified distribution of label assignments. The formal analysis complements them by showing what the score can guarantee in simpler cases.
The error-rate test deliberately starts with the most basic question. Given two outputs that recover different amounts of the reference, will a measure typically favor the one with fewer omissions? Accuracy and Hamming perform strongly because they respond to the number of changed assignments without considering which labels are missing or where they occur. A metric that gives different errors different weights may occasionally prefer an output with more omissions because those omissions affect less informative labels or less consequential parts of an item’s label set. The test shows that ICM remains responsive to the simple error count under this generator. It does not apportion that behavior to a particular term in its formula.
The true-category specificity test keeps the corruption rate fixed while changing what is sampled. One procedure chooses from all correct assignments and removes the chosen assignment. A frequent category has more assignments available to be selected under this procedure. The other chooses a category first and then removes an assignment from that category. This makes omissions in uncommon categories more prominent than they would be under assignment-level sampling. The intended better output is the one whose omissions are more concentrated in the frequent categories.
The distinction matters because both corrupted predictions can omit the same number of labels. An evaluator has to value those omissions differently to support the expected ordering. In the authors’ formal comparison, LB-F can reflect class specificity through recall, because the loss of a hit affects the proportion recovered within the corresponding class. The modified PROP-F makes frequency matter through its inverse-propensity weights. ICM charges for the information in the omitted categories. The agreement of these measures on the test shows that different constructions can make the same distinction.
The wrong-category specificity test changes a true label on an item selected from those with a single reference label. In the intended better output, the true label is replaced with the most frequent available wrong category. In the competing output, its replacement is sampled from all wrong categories. Each output loses the original correct assignment. The contrast concerns the information in the false assertion that takes its place. A rare wrong label is more specific in the sense used by the paper and should incur a greater penalty under this criterion.
The result also explains why the authors modify propensity F-measure. Weighting only correctly predicted labels changes the reward for hits. A wrong category never contributes as a hit, so its weight would have no direct role under that version of the measure. Putting inverse propensity into the predicted denominator makes a rare false assignment count differently from a common one. The synthetic results for PROP-F apply to this modified formulation with the shared empty class.
Shared branches and crowded label sets
The hierarchical comparison selects single-labeled items whose reference categories are leaves. One corruption replaces the reference with a sibling category. The other chooses a wrong category at random. A sibling typically preserves a branch that a random replacement might lose. This test keeps the number of labels at the item level simple and makes the relation between the true and false categories the main change.
Both HF and ICM recognize the sibling replacement. HF measures the resulting ancestor overlap. ICM estimates the information common to the sibling and the reference. Their agreement on this benchmark shows that the controlled change is detectable by both hierarchy-aware designs. The measure of shared ancestry differs between them. The test establishes the direction of their preference under these replacements, while the underlying formulas describe how they can assign different amounts of credit to particular branches.
The item-specificity comparison returns to multi-label items. Choosing an assignment uniformly gives heavily annotated items more opportunities to be selected. Choosing the item first gives an item with few labels the same initial chance of selection as a heavily annotated item. A wrong replacement is introduced after selection in both cases. The first procedure tends to spend more of the error budget on items that already have many labels, leaving more lightly annotated items intact. The test assigns that output the preferred position, in line with giving individual assignments more influence when they concern sparsely labeled items.
Normalizing per item gives this difference a direct route into the score. A replacement can change a large share of a short reference set and a smaller share of a long one. Hamming uses a category-inventory denominator and does not vary the change in this way with the number of labels on the item. Jaccard and example-based F-measure do vary it. Subset accuracy has a separate mechanism because it counts whether the entire reference set is recovered. Concentrating errors on some items can leave more other items with exact matches.
LB-F tends to prefer the output the authors designate as worse in this test. They explain that heavily labeled items tend to contain a diversity of labels. Corrupting those items can damage performance across a range of categories. Averaging label-specific F-measures makes that damage consequential even when the underlying errors are concentrated on relatively few items. The comparison shows how averaging first over categories and averaging first over documents can favor different distributions of errors.
ICM shows a preference in the intended direction even though it fails the strict formal property about spreading hits. The authors explain this by the overlap among related categories. Several correct predictions on one item can share information in the hierarchy. When that shared part is counted together, the score gain is softer than a simple accumulation of all the individual label contributions. This mechanism depends on the category sets. A flat set of unrelated labels has no corresponding informative overlap, which is why the empirical preference does not establish a general guarantee.
How the two kinds of evidence fit together
The formal comparisons ask for strictly ordered scores under deliberately restricted conditions. The synthetic tests use a richer distribution and count agreement with an expected ordering across many trials. These are related measurements with different interpretations. A metric can express a preference that is visible in the synthetic setting while failing to guarantee the preference for every possible input. ICM’s item-specificity result illustrates that relationship. Conversely, a proximity rule operating under equal category frequencies does not determine the ordering for every comparison in which frequency also changes.
The discharge-report experiment adds another kind of evidence. It holds the systems fixed and examines how the metrics place them on their respective scales, especially when a system issues an empty set or asserts many codes. The authors identify broad agreement in ranking among several measures, alongside differences in the size of the penalties and rewards. That makes the case study informative about score interpretation. The result does not provide a controlled comparison of alternative ICM parameters or isolate the effect of smoothing, category frequency or hierarchical overlap on the performance of a particular baseline.
Limitations
Limits stated by the authors
The authors explicitly leave the label-versus-item quantity property unresolved. Under the flat multi-label specialization, the effect of hits adds across categories. Spreading a given set of correct assignments across multiple items can yield the same score gain as putting them on one item. The observed preference in the hierarchical synthetic setting relies on overlap between related categories. Adapting ICM to guarantee the full set of proposed properties is the direction the authors identify for future work.
The properties describe evaluation goals that can matter in particular tasks. The authors do not require every application to value all of them. Their example about giving greater value to recovery spread across patients supplies a reason to care about breadth of coverage. Another evaluation may place different value on accuracy within a densely annotated item. The formal framework makes the preference explicit so that a reader can see which scores implement it.
The authors also say it is difficult to draw conclusions about rankings from the small set of medical baselines. They normalize the scores to examine relative separation because many rankings coincide. The amount of separation reported in that study depends on the range covered by those baselines. The paper additionally leaves ICM’s comparatively strong error-rate sensitivity unexplained. Its experimental result establishes that the behavior occurred under the test, without identifying an independent cause.
Limits of the evidence and specifications
The synthetic tests define the preferred prediction through the corruption procedure. A score of 100% for the hierarchy test means consistent agreement with the expected comparison between those corruptions under that generator. It is not a measurement of clinical relevance or of the reliability of arbitrary partial matches. The same qualification applies to rare errors. The test treats rarity as the reason to prefer one error over another. It does not establish that frequency represents the practical cost of every error in a medical application.
There is also a tension in how the paper describes the item-specificity test. Its opening intuition says a mistake on an item with many labels should matter more. The preferred output and sampling procedure do the opposite at the level of the experimental comparison. The better output is the one that concentrates errors among heavily labeled items. The procedure, the reported interpretation of the results and the formal preference for spreading hits give a consistent basis for reading the test in that latter direction. The inconsistent item counts in the generation account are a separate obstacle to reconstructing the experiment exactly.
The strict statement of hierarchical proximity needs care at the boundary where candidate labels share the same deepest ancestor with the truth. The paper’s descendant convention includes the node itself, while its stated conclusion is a strict inequality. If the common ancestor is identical for both candidates and the candidates are equiprobable, the single-label ICM formula gives identical scores. Strict credit follows when the shared ancestor becomes more informative. An equal ancestor contributes equal information to both comparisons.
Information content here is a statistical property of a reference collection. A category’s frequency can vary between collections, and the smoothed value for an unobserved one depends on the number of items. The medical data come from a single hospital corpus with a particular inventory of observed codes and a high proportion of empty annotations. The reported study does not quantify how the same outputs would score under different reference frequencies or alternative smoothing. The values describe this corpus and the authors’ scoring choices.
The recursive estimate also gives the hierarchy a particular role in explaining shared information. It uses the deepest common ancestor to account for overlap and combines category information additively after that correction. Labels can co-occur in the reference for reasons other than a common taxonomic branch. The procedure does not estimate those co-occurrence relationships directly. Its advantage is that it can give a value to label sets that have no reliable joint count. The tradeoff is that the result depends on how well common ancestry represents the dependencies relevant to the task.
Finally, the medical case study compares systems that differ in features, output behavior and the set of codes they can propose. The description-matching system can propose codes the trained systems cannot learn from the available training assignments. The code-feature baseline also receives annotated non-adverse-event codes. These differences are useful for eliciting a range of metric responses. They do not constitute an isolated comparison of feature sources, a measure of clinical benefit, or a demonstration that optimizing a classifier for ICM improves its predictions.
What came after
The paper closes with the open problem of making ICM strictly prefer correct assignments spread across items while preserving its treatment of rarity and hierarchical overlap. No later study is identified that implements or evaluates that extension. The findings for it therefore stop at the paper’s formal result for flat labels and its observed preference in the hierarchical synthetic experiment.
Cite
Cite as Enrique Amigo and Agustín Delgado. 2022. Evaluating Extreme Hierarchical Multi-label Classification. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
@inproceedings{amigo2022evaluating,
title = {{Evaluating Extreme Hierarchical Multi-label Classification}},
author = {Enrique Amigo and Agustín Delgado},
booktitle = {Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
year = {2022},
doi = {10.18653/v1/2022.acl-long.399},
url = {https://doi.org/10.18653/v1/2022.acl-long.399}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/amigo-2022-evaluating-extreme-hierarchical-multi-label/