Researchers who study disparities in voter rolls, health records or author lists usually do not have self-reported race or ethnicity, so they estimate it from names. The standard recipe uses Bayes' rule. It takes a census table giving how often each surname occurs within each racial group, multiplies by the racial mix of the person's neighborhood, and normalizes. The weak point is the table. It assigns nothing useful to names it has never seen, it cannot share evidence between related spellings or transliterations, and it assumes a surname says the same thing about race in every county. That assumption is false badly enough that standard Bayesian Improved Surname Geocoding (BISG) underestimates Hispanic populations in 88% of Florida counties (A calibrated BISG for inferring race from surname and geolocation).
We propose to replace the table with a small language model trained on name strings. It reads a name character by character and assigns it a probability given a demographic group, a place and an era. The model is first pre-trained on a large multilingual corpus of names paired with metadata, then adapted with labeled records. It is then plugged back into the same Bayes formula. The bet has two parts. Domain-specific pre-training, meaning training a model mainly on one specialized kind of data, should give smooth and calibrated name probabilities on rare and foreign names where tables and per-group character statistics run out. Keeping the Bayesian structure, rather than training a classifier that outputs a label directly, should preserve what classical methods do well: correct population-level estimates when the group mix of the target population differs from the training data.
Core Claim
Neural name classifiers have so far lost to counting. The interpretable logistic regression EthnicIA reaches 76.27% balanced accuracy on North Carolina voters, against 65.30% for the LSTM tool ethnicolr. Its authors read this as evidence that frequency features beat learned letter patterns (The Importance of Being Ernest, Ekundayo, or Eswari).
We think the comparison mixed up two separate things. The first is model family. The second is whether the model outputs a label or a likelihood. A discriminative classifier absorbs the group mix of its training set, so it drifts toward the majority class on uninformative names. That is exactly the erasure documented in Stop! In the Name of Flaws. A likelihood model keeps the group mix separate, so it can be swapped for the right census prior.
Our claim is that a pre-trained, metadata-conditioned character model, used only as the likelihood term inside BISG, will match tables on common names. It should beat them, and beat EthnicIA, on rare names, on names from groups with scarce labels, and under shifts from one state to another. Because it can condition the name probability on county, it should also fix the surname–geography dependence that currently requires post-hoc raking (iterative rescaling of estimates to match known totals).
Research Program
Standard BISG computes $P(r \mid s, g) \propto P(s \mid r)\,P(r \mid g)$. Here $r$ is a race or ethnicity category, $s$ the surname, $g$ the census geography, $P(s \mid r)$ the census surname table, and $P(r \mid g)$ the neighborhood racial mix. We replace this with
$$P(r \mid s, f, g) \propto p_\theta(s, f \mid r, g)\,\pi(r \mid g),$$
where $f$ is the first name and $p_\theta$ is a character-level autoregressive model with parameters $\theta$. The model scores the full name string after a prefix of metadata tokens for group, county, country of origin and birth decade, whichever are available. The prior $\pi$ is the census or American Community Survey prior for the target population, and it can still be raked to known totals. Because $p_\theta$ conditions on $g$, the conditional-independence assumption that A calibrated BISG repairs afterwards becomes something the model can learn. Raking then serves as an optional final step rather than a necessity.
Training has two stages. Stage one is self-supervised and uses no race labels. A byte-level transformer of roughly 50–100M parameters is trained to generate full names from metadata prefixes. It reads raw bytes rather than subword pieces, because subword tokenizers break non-Western names into arbitrary fragments, as shown in What's in a Name?. The training data come from two sources. The first is Wikidata persons with citizenship, birthplace and birth year, across all countries. This is the same source Enabling disaggregation of Asian American subgroups reduces to frequency tables for six countries; we keep the full strings and model them. The second is name strings from voter files, with county as metadata. Following the evidence from MonoCoder that an isolated domain corpus beats dilution in web text, we train on names only. We do not continue training a general language model, whose name representations are shaped by celebrities and political figures (You are grounded!).
Stage two adds the race token to the prefix. It fine-tunes on labeled voter records from the training states only, giving $p_\theta(s, f \mid r, g)$. We will also study which corruption and ordering choices help. One example is whether to model surname before or after given name, given that order conventions differ across cultures. This is motivated by BioBART's finding that a standard denoising objective, sentence shuffling, hurt performance in the biomedical domain (BioBART).
The deliverable is the model and an analysis of where it beats tables and where it does not. Following the validity critique in Stop! In the Name of Flaws, we treat the primary output as population-level share estimates with uncertainty. We do not treat it as individual labels. Results are reported per group so that high misrecognition rates for particular groups remain visible. The model inherits the registry categories and cannot represent non-binary or self-described identities. We state this as a scope limit rather than claim to solve it.
Baselines
The naive reference point is the census prior alone: assign every person their county's racial mix. Any name model must improve on it. The classical reference is standard BISG with the Census surname table. On 2020 voter files it reports 10% county-level mean absolute error (MAE) in Florida and 7% in North Carolina (A calibrated BISG).
The strongest population-level competitor is raked BISG from the same paper, at 4% MAE in Florida and 3% in North Carolina. We will reproduce it on identical 2020 files and identical county splits. Matching it without raking, and beating it with raking, counts as success. It relies on a joint surname-by-county table, so it also defines an upper bound in settings where such tables exist.
The strongest individual-level competitor is EthnicIA, at 76.27% balanced accuracy on 2017 North Carolina test data, with ethnicolr at 65.30% (The Importance of Being Ernest, Ekundayo, or Eswari). We will retrain it on the same training states and records. We will then compare both on the full test set and on a slice of names unseen or rare in training. Beating it means a statistically significant gain on the rare slice without a loss on common names.
The classical baseline that most directly threatens our claim is a class-conditional character n-gram language model with Kneser–Ney smoothing, a standard technique for estimating probabilities of unseen character sequences. One such model is trained per group and county band and plugged into the same Bayes formula. It is a generative name likelihood without pre-training, close in spirit to the character n-gram features of Name-Ethnicity Classification and Ethnicity-Sensitive Name Matching.
Two ablations isolate our ingredients, and both use the same architecture, data and tuning budget as the full system. The first trains the byte transformer from scratch on stage-two labeled data only, which tests whether stage-one pre-training matters. The second fine-tunes the pre-trained model as a direct classifier with post-hoc prior correction, which tests whether generative inversion matters. A third ablation removes county from the prefix to test whether learned surname–geography dependence substitutes for raking. Every neural variant gets the same hyperparameter search budget, and EthnicIA gets its published feature set.
Why not just…?
Why not just use the census surname table or a smoothed lookup? For common US surnames this will likely be nearly as good, and we expect to show it. Lookups have nothing to say about names they have not indexed. Western registries collapse abroad: SSA, IPUMS and Sexmachine reach 0–11% gender accuracy on South Korean names (Inferring Gender from Names on the Web). Lookups also cannot split names shared across subgroups (Enabling disaggregation). The rare-name and cross-cultural slices are where the proposal must earn its cost.
Why not just use per-group character n-gram language models? This is the real threat. It already gives smooth likelihoods for unseen names and plugs into BISG at almost no cost. If it matches our model on the rare-name and Asian-subgroup slices, then pre-training is not the active ingredient, and the contribution shrinks to "use generative character likelihoods in BISG." We would report exactly that. Pre-training can help only where label-free multilingual data supply evidence the labeled voter records lack, such as transliteration families and names common abroad but rare in US registries. The cross-state and Wikidata-held-out experiments test this directly.
Why not just fine-tune EthnicIA-style or neural classifiers with a prior adjustment? A discriminative model with a Bayes prior correction can in principle adapt to new group mixes. The correction is only exact when the classifier is well calibrated, and balanced-accuracy training distorts calibration. Jain et al. themselves report misclassifying a wealthy donor because of their reweighting (The Importance of Being Ernest, Ekundayo, or Eswari). Our discriminative ablation runs this alternative on the same pre-trained backbone, so the comparison isolates inversion from pre-training.
Why not just prompt a general LLM? General web-trained models ground names in prominent people (You are grounded!). They fragment unfamiliar names into subwords (What's in a Name?). They give no calibrated probability over groups that can be combined with a census prior. We include a zero-shot open-weight model as a reference row on the test sets but do not expect it to be competitive on calibration.
Proposed Experiments
The first experiment is race and ethnicity estimation on voter files, which carry self-reported race. We train on Georgia and Florida records and test on North Carolina, a cross-state shift. We also hold out Florida counties within the state, for comparability with the raking results. Metrics are county-level MAE of group shares, mean bias per group, individual balanced accuracy, expected calibration error, and per-group misrecognition rates. Each metric is reported on the full set and on rare or unseen-name slices. Vintages match the cited baselines: 2020 files for the raking comparison and 2017 North Carolina for EthnicIA.
The second experiment is cross-cultural gender inference on the 1,416-academic, 15-country benchmark of Inferring Gender from Names on the Web. Here the best name-only tool, Genderize, reports 82% overall and name tools peak at 58% in South Korea. We condition on country, and the test removes the 1,416 benchmark academics from pre-training. Matching or exceeding 82% overall, with large gains in South Korea and Brazil, would show the multilingual pre-training is doing work; the benchmark is small, so we report confidence intervals.
The third experiment is Asian subgroup disaggregation. We hold out Wikidata individuals by country and compare against the reweighted frequency tables of Enabling disaggregation. We found no reported numerical accuracy for those tables on Lacuna, so we will reproduce them ourselves. We caution that Wikidata notables are not the US population.
The decisive checks are as follows. If the from-scratch ablation matches the pre-trained model on rare names, the pre-training claim fails. If the n-gram likelihood matches it, the neural claim fails. If county conditioning without raking does not close most of the gap between standard and raked BISG, the claim that the model learns the surname–geography dependence fails. Each outcome is informative, and together they answer the open question of whether neural name models lost to counting because of the model family or because of how they were trained and used.
References
- A calibrated BISG for inferring race from surname and geolocation
- The Importance of Being Ernest, Ekundayo, or Eswari: An Interpretable Machine Learning Approach to Name-Based Ethnicity Classification
- Stop! In the Name of Flaws: Disentangling Personal Names and Sociodemographic Attributes in NLP
- What's in a Name? Are BERT Named Entity Representations just as Good for any other Name?
- Enabling disaggregation of Asian American subgroups: a dataset of Wikidata names for disparity estimation
- MonoCoder: Domain-Specific Code Language Model for HPC Codes and Tasks
- "You are grounded!": Latent Name Artifacts in Pre-trained Language Models
- BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model
- Name-Ethnicity Classification and Ethnicity-Sensitive Name Matching
- Inferring Gender from Names on the Web: A Comparative Evaluation of Gender Detection Methods