[KongchangAI]
· 2 min read· 1,462 words

FERN: Cross-Benchmark Table Retrieval with Frozen Retrievers + Learned Ranking

FERN: Cross-Benchmark Table Retrieval with Frozen Retrievers + Learned Ranking

FERN achieves cross-database table retrieval with frozen retrievers and LightGBM ranking, no generative LLM needed.

FERN is a table retrieval study for pooled Text-to-SQL. It fuses three frozen retrievers into 100 candidates, describes each with up to 120 features, and re-ranks with a LightGBM model fitted once on BIRD—no generative LLM involved. On unfitted Spider it matches RASL's 15-table recall (98.0) and lifts complete@5 from 83.9% to 95.6%. BIRD 5-table recall is 96.6 with evidence hints, 89.3 without. Real BEAVER recall of 82.1 sits between two trained retrievers, but complete@15 is only 49.6. Median latency on A100 for BIRD dev is 208 ms; non-retrieval features add 7.7 points to complete@5.

Text-to-SQL systems operating over a pooled set of multiple databases often don't start by generating SQL—they first need to find the handful of tables the question actually requires from a large pool of candidates. The quality of this retrieval step directly determines the ceiling for the subsequent generation stage. A recent study called FERN attempts to perform table retrieval using a "frozen retriever + learned ranking" approach, without invoking generative LLMs, and provides comparative results across three benchmarks: BIRD, Spider, and Fiben.

FERN research source illustration

Background: Why Table Retrieval Is Hard

In single-database Text-to-SQL, the model faces a fixed schema and only needs to locate tables within that database. But in a pooled catalog setting, datasets like BIRD, Spider, and Fiben are merged into a unified table pool, dramatically increasing the number of candidate tables and making retrieval much harder.

The representative existing approach, RASL, relies on generative models like Claude 3.5 to extract keywords and select tables. This works well but requires calling hosted models, incurring non-trivial latency and cost. FERN attempts to answer: if we completely avoid generative LLMs and rely solely on frozen retrievers plus feature engineering and learned ranking, can we approach or even match the recall levels of comparable systems?

Pooled catalog refers to merging the schemas of multiple independent databases into a unified table collection, increasing the number of tables a retriever faces from dozens in a single database to thousands. This approach aims to train and evaluate a model's generalization ability in heterogeneous, open-domain environments, but also introduces new problems such as table name conflicts and cross-database semantic ambiguity. Benchmarks like BIRD, Spider, and Fiben originally maintained separate database collections; after merging, the scale and diversity of the table pool increases significantly, and retrievers must locate relevant tables in a much larger candidate space, placing higher demands on both recall and ranking precision.

FERN's Method Design

FERN stands for Feature-Engineered Ranking with No generative LLM. Its core pipeline can be broken into three steps.

Three-Way Frozen Retriever Fusion

FERN fuses three frozen retrievers to first construct 100 candidate tables. "Frozen" means these retrievers undergo no additional fine-tuning and directly reuse their existing capabilities, which both reduces training cost and avoids overfitting risks in cross-benchmark scenarios.

Frozen retriever refers to a retrieval model that uses pretrained weights directly without any parameter updates on the target dataset, such as BM25, dense vector retrievers, or encoders based on pretrained language models. Compared to fine-tuning approaches, frozen retrievers avoid the risk of overfitting on specific benchmarks, making them especially suitable for cross-benchmark transfer; they also eliminate training overhead, making the system easier to deploy. FERN's choice to fuse the outputs of three frozen retrievers leverages their different inductive biases to broaden candidate pool coverage, which is then refined by the downstream ranker.

120-Dimensional Feature Description

Each candidate table is described by up to 120 features, which include both retrieval signals themselves and non-retrieval structured information. As the data below will show, it is precisely these non-retrieval features that deliver significant gains.

Non-retrieval features are structured signals not directly derived from retriever similarity scores, such as lexical features of table names, type distributions of column names, exact match degrees between tables and entity words in the question, and table size and sparsity. These features matter because pure similarity signals are easily affected by the vocabulary gap—there is often a semantic shift between the natural language phrasing in the question and table/column names. Structured features provide another judgment path, helping the ranker distinguish "superficially similar but actually irrelevant" candidates from "differently phrased but semantically relevant" ones. FERN's ablation experiments show that such features contribute up to 7.7 points to complete@5.

LightGBM Ranker

Candidate tables are finally re-ranked by a LightGBM ranker. The key detail is that the ranker is fitted only once on BIRD training questions, then directly transferred to other benchmarks without targeted retraining. This forms the basis for the cross-benchmark evaluation below.

LightGBM is Microsoft's open-source gradient boosted decision tree (GBDT) framework, known for its histogram algorithm and leaf-wise growth strategy. It trains quickly and has low inference latency on small-to-medium feature engineering tasks, and is insensitive to feature scaling. In learning-to-rank scenarios, LightGBM supports ranking loss functions like lambdarank, which can directly optimize the relative order of candidate tables. FERN's choice of LightGBM over deep ranking models aligns with its overall design of "no generative LLM dependency, controlled latency": tree models can efficiently inference on CPU, and feature importance is interpretable, making it easy to analyze which signals actually drive ranking decisions.

Cross-Benchmark Performance: Recall and Completeness

FERN's evaluation compares against RASL's published table recall rates. It should be noted that the question sets of the two works are not entirely identical, so the comparison is more of an order-of-magnitude reference.

Spider: Improvement in Unfitted Scenario

Spider is a benchmark FERN was not fitted on. With just the candidate pool, it reaches RASL's published level on 15-table recall (98.0). The ranker further raises the proportion of "all gold tables appearing in the top five," i.e., complete@5, from 83.9% to 95.6%.

Under the strict 5-table setting, FERN's recall on Spider is 96.7, less than one point from RASL's 97.0.

BIRD: Impact of Evidence Hints

On BIRD, whether evidence hints are provided significantly changes results. With evidence hints, FERN's 5-table recall is 96.6 vs. RASL's 97.5; without evidence hints, FERN is 89.3, trailing by 8.2 points. This shows that external evidence information still has a substantive effect on retrieval, and FERN's feature system has not fully closed this gap.

Fiben: Clear Gap

On Fiben, FERN's 15-table recall is only 54.2 vs. RASL's 69.2, with different question sets. However, under the looser 50-table setting, FERN's 80.7 is numerically close to RASL's 79.4 using question-only retrieval. This suggests FERN has some compensatory ability when the candidate pool is enlarged, but still has shortcomings in high-precision small candidate set scenarios.

Real-World Questions and Latency

Beyond standard benchmarks, the study also tested on 121 real BEAVER questions without any fitting on BEAVER. FERN's 15-table recall is 82.1, falling between the two BEAVER-trained retrievers (80.8 and 84.5); but complete@15 is 49.6, lower than both (54.5 and 62.0). Recall is acceptable while completeness is low, indicating FERN is still not stable enough at "finding all" relevant tables.

On latency, on a single A100, BIRD dev median latency is 208 ms per question, with no hosted model calls involved. This figure has practical significance for retrieval scenarios requiring low latency and private deployment.

The Value of Non-Retrieval Features

The study provides a noteworthy ablation result: on BIRD dev with evidence, non-retrieval features improve complete@5 by 7.7 points compared to using retrieval signals alone. This means that in the ranking stage of table retrieval, relying solely on similarity signals is insufficient; structured descriptions such as table names and column structures provide additional judgment power. This also explains why FERN constructs as many as 120 features for each candidate table.

Analysis and Outlook

FERN's value proposition is clear: using frozen retrievers plus a lightweight ranker to achieve controllable cost and low latency without generative models, while approaching Claude 3.5-dependent approaches on some benchmarks. Its ability to match RASL's recall level on Spider without fitting is the strongest evidence for this approach.

Limitations are equally clear. On Fiben and BEAVER completeness metrics, FERN still lags behind specially trained retrievers, and stability in cross-benchmark transfer remains unsolved. The 8.2-point gap between with and without evidence hints also shows its high sensitivity to input information quality.

For engineering practice, FERN offers a pragmatic middle path: when the cost or compliance constraints of calling hosted models become bottlenecks, feature engineering plus learned ranking remains an option worth serious consideration. Future improvements may focus on making frozen retriever candidate pools more comprehensive and keeping the ranker stable across more diverse table distributions.

One-line Summary

FERN uses frozen retrievers plus LightGBM ranking to achieve cross-database table retrieval without calling generative LLMs.

Paragraph Summary

FERN is a table retrieval study for pooled Text-to-SQL scenarios. Its core idea is to fuse three frozen retrievers to generate 100 candidate tables, describe each candidate with up to 120 features, then re-rank with a LightGBM ranker fitted only once on BIRD—all without invoking generative LLMs. On unfitted Spider, the candidate pool alone matches RASL's published 15-table recall level (98.0), and the ranker raises complete@5 from 83.9% to 95.6%. On BIRD, 5-table recall is 96.6 with evidence hints and drops to 89.3 without, an 8.2-point gap. On real BEAVER questions, recall of 82.1 falls between two specially trained retrievers, but complete@15 is only 49.6, indicating insufficient completeness. On a single A100, BIRD dev median latency is 208 ms, and non-retrieval features improve complete@5 by 7.7 points.

#FERN#Text-to-SQL#table retrieval#frozen retriever#LightGBM#learning-to-rank#Spider benchmark#BIRD benchmark#cross-benchmark retrieval
Share:

Related articles