Rank-Fused Entity Centers for Few-Shot Recognition of Heterogeneous Classes

Few-shot named entity recognition asks a model to find mentions of new categories, such as "song title" or "disease", from one or two labeled examples. It fails most on two kinds of category. The first is the background class, "everything that is not an entity", which lumps verbs, punctuation and ordinary nouns into one label. The second is the loose target class, such as creative works or miscellaneous, whose members share almost no surface or contextual pattern. Both break the standard recipe of averaging the labeled examples into one "prototype" vector and labeling nearby text as that class, because the members of these classes do not sit near any single point. We propose to borrow two ideas that already avoid this failure in other fields. From anchor-free object detection, which finds objects by predicting a heatmap of object centers, we take the practice of never modeling the background at all. From information retrieval we take reciprocal rank fusion, which combines several ranked lists using only rank positions. Each labeled example is treated as its own search query that ranks candidate entity centers in the test text. The rankings are then fused.

In two sentences: we detect one center point per candidate entity, let every support example and a class-agnostic "is this an entity?" detector each rank those centers, and combine the rankings by reciprocal rank so that a scattered class is recognized through any of its diverse examples instead of through their average. The accept/reject decision is a threshold in rank space. Because ranks do not depend on the scale of any particular encoder or episode, we expect such a threshold to transfer across domain shift better than a threshold on cosine similarity.

Core Claim

The claim is that three choices fit together: one center per candidate, no background representation, and one ranked list per support example. For classes with high internal spread, this combination should beat both averaged prototypes and span enumeration with suppression of overlapping spans. The gain should grow with how dispersed a class's examples are, and should be largest when test types are disjoint from training types.

Each ingredient has a precedent.

  • No background vector. Among the prior work that motivates this, Classifying Relations by Ranking with Convolutional Neural Networks drops the embedding of the catch-all Other relation. It predicts Other only when no target class scores high enough, which gained 1.4 F1 on SemEval-2010 Task 8. Center-heatmap detectors make the same move in space: each class has its own peak map and background is simply the absence of a peak.
  • Consensus across differently phrased queries. RALI@TREC iKAT 2024 shows that fusing retrieval results from several reformulated queries filters out spurious matches. This is exactly what a heterogeneous class with diverse support examples needs.
  • Ranks survive uncalibrated scores. Out-of-Domain Semantics to the Rescue! shows rank fusion helping under severe domain shift, including on TREC-COVID, where a dense retriever alone fell below BM25.

What is new is joining these three into a detector whose background is never represented, whose candidates are de-duplicated by construction, and whose decisions live in rank space.

Relation to Prior Work

The closest existing systems are span-based few-shot recognizers. They constrain the design as much as they motivate it.

SpanProto separates two stages:

  • it first finds entity boundaries with a matrix scoring every start–end pair;
  • it then types each candidate against prototypes, pushing non-target spans away with a margin.

Its authors flag the memory cost of that matrix. SSF also enumerates spans. It does represent the background: it splits it into three sub-classes by how a span overlaps true entities. It resolves overlapping candidates with an adaptive soft suppression step during beam search.

Our proposal differs from both in three ways:

  • it produces one center per mention instead of many overlapping spans;
  • it keeps no background representation;
  • it replaces averaged prototypes with fused per-example rankings.

The first difference matters for more than memory. A ranked list polluted by ten overlapping spans of the same entity makes rank fusion meaningless. Peak extraction on a heatmap, which Spiking CenterNet uses to run with no suppression step at all, gives one entry per entity.

MUCO argues the opposite of CR-CNN. It mines the background into coherent sub-classes, and its authors report that the automatic mining lets spurious tokens into the sub-classes. We take the CR-CNN side of this disagreement and test it directly against a MUCO-style background decomposition.

MVRE spreads each relation over several learned virtual tokens. Its authors state that representing "no relation" in this multi-view scheme is unsolved. Our design sidesteps that problem instead of solving it, which is a claim the experiments must earn.

The extent regression reuses the anchor-free recipe of predicting size from the center feature. In CenterMask that size is a box plus a shape; in CircleNet it is a radius. In our case it is the distance to the left and right boundaries.

Research Program

Components. On top of a shared BERT-style encoder we train two class-agnostic heads on the base (training) entity types:

  • a 1D center heatmap, trained with a focal-style loss and Gaussian targets at mention midpoints;
  • a head that regresses left and right extents from each center.

At test time we take local maxima of the heatmap over each query sentence. Every peak in the episode's query set becomes one candidate $i$, represented by its token embedding.

Ranked lists. For target class $c$ with support mentions $s_1,\dots,s_K$, each support mention ranks all candidates by cosine similarity to its own center embedding, giving rank $r_j(i)$. We add one extra list:

  • $r_0(i)$ ranks candidates by the class-agnostic heatmap value.
  • We add a list from a second encoder layer only if our planned ablation shows it helps; this also matters in 1~2 shot episodes, where there are few support lists.

Fused score. The score of candidate $i$ for class $c$ is

$$F_c(i) = \frac{1}{K+1}\sum_{j=0}^{K} \frac{1}{k + r_j(i)},$$

where $k$ is the usual smoothing constant (we sweep it, starting from 60). The normalization by $K+1$ keeps scores comparable across episodes with different shot counts.

Decision rule. A candidate gets class $c^* = \arg\max_c F_c(i)$ if $F_{c^*}(i) > \tau$, and is background otherwise. The threshold $\tau$ is a single number fitted once on training episodes. Because $F$ depends only on ranks, we expect $\tau$ to mean the same thing in a news episode and a biomedical one. A cosine threshold does not have this property.

Small $k$ makes the fusion behave like "best single support wins". Large $k$ makes it reward agreement. The sweep over $k$ therefore tells us directly whether heterogeneous classes want a max-like or a consensus-like rule.

Analyses. We measure each test class's dispersion as the mean pairwise cosine distance among its gold mention embeddings in the evaluation data. We then regress per-class F1 gain on dispersion. We also report peak memory and throughput against sequence length, comparing the center head with span enumeration.

Secondary test. Relation extraction lets us test the rank-space "Other" rule in isolation. On SemEval-2010 Task 8 we keep a relation encoder and replace its Other decision with the fused-rank threshold, in the low-resource regime studied by MVRE.

Baselines

Naive reference. Same encoder, same center head, but each class is represented by the mean of its support embeddings, and background is decided by a raw cosine threshold tuned on training episodes. This isolates everything we add. If the full system does not clearly beat it on high-dispersion classes, the proposal has no content.

Strongest existing competitor: SSF. SSF reports F1 83.21 on Few-NERD INTER, 5-way 1~2 shot, and an average gain of about 12 F1 over earlier methods on Few-NERD. We run its released configuration where possible, on the same encoder size and the same episodes, with the same hyperparameter search budget as ours. Beating it means exceeding its F1 on INTER averaged over episode seeds, with confidence intervals that do not overlap.

  • For INTRA, where test coarse types are disjoint from training ones, we found no SSF number in the material. There we will rerun SSF ourselves.
  • The only INTRA figure we have is the Few-NERD paper's best model, StructShot, at F1 23.95 on 5-way 1~2 shot (Few-NERD).

Second-strongest: SpanProto. SpanProto reports 75.25% average F1 on Few-NERD INTER and a 3–5 F1 margin on CrossNER. We run it under the same controls.

Ablations isolating the key ingredients. - Replace rank fusion with max-over-supports cosine (nearest-example classification). - Replace it with per-list z-normalized score averaging. - Replace the center head with length-capped span enumeration plus SSF's suppression step, feeding the same fusion. - Add a MUCO-style mined background prototype. - Move the threshold from rank space back to score space while keeping everything else fixed.

Relation extraction. The references are CR-CNN's supervised F1 of 84.1 and MVRE's 1-shot F1 of 54.6 on SemEval-2010 Task 8.

Why not just…?

Why not just classify each candidate by its nearest support example instead of fusing ranks? This is the most serious threat, because nearest-example classification already avoids averaging a scattered class into one point. The two rules differ in two ways.

  • Ranks cancel "hub" examples, whose embeddings are similar to everything and so dominate a max over raw cosines.
  • The smoothing constant lets agreement among supports count.

If max-cosine matches rank fusion within noise on high-dispersion classes, we will report that the benefit comes from one-list-per-support and the rank-space threshold, not from the reciprocal form. The $k$ sweep and this ablation settle the question together.

Why not just calibrate scores and average them, or learn a small blender? A learned blender needs in-domain tuning data, which few-shot episodes do not have. The file's evidence is that score averaging is unstable across models with different output scales (Factor Models for Tag Recommendation in BibSonomy) and that rank fusion beat confidence averaging when combining visual and OCR signals (The SESAME MED System). Neither result is about entity recognition. The z-normalized averaging ablation, evaluated on INTRA and CrossNER where calibration drift should hurt most, is the direct test.

Why not just enumerate spans up to a maximum length, which is already roughly linear in sentence length? This is a fair objection to any memory argument, and memory is not our main one. The real reason is de-duplication. Span enumeration puts many overlapping spans of the same entity into every ranked list, and that corrupts rank fusion unless a suppression heuristic runs first. The span-enumeration-plus-suppression ablation measures whether this matters in practice. If it matches the center head, the anchor-free component should be dropped from the claim.

Why not just prompt a large language model? Chenran Cai et al. report that in-context learning degrades on catch-all classes, so this does not obviously remove the problem. We include a prompted model as an unmatched-compute reference only, and do not treat it as the target to beat.

Proposed Experiments

Main evaluation. Few-NERD INTER and INTRA across all N-way K-shot configurations the benchmark provides. We expect gains to grow with shot count, since more supports mean more ranked lists. Secondary evaluations are CrossNER, SNIPS and SemEval-2010 Task 8. Metrics are micro-F1 averaged over episode seeds, per-coarse-type F1, and peak memory and throughput against sequence length.

Decisive checks.

  • Gain tracks dispersion. Per-class gain over the mean-prototype reference must increase with class dispersion, with a positive regression slope. If gains are flat across dispersion, the heterogeneity story is wrong even if average F1 improves.
  • Rank threshold transfers under shift.
  • The drop in F1 from INTER to INTRA should be smaller for the rank-space threshold than for the score-space threshold.
  • A threshold fitted on Few-NERD should hold up when applied unchanged to CrossNER.
  • No background vector is enough. The CR-CNN-style rule should match or beat adding a mined background prototype. A clear loss here would side with MUCO and force us to revise the design.