TECHNOLOGY

Geneformer rank encoding depends on the matching gene medians and token dictionary

In this article
THE QUICK TAKE

Rank order is a transformed expression representation tied to model-specific normalization resources, not raw abundance order.

Ranking genes is not simply sorting raw counts

A transcriptome encoder may represent a cell as an ordered list of gene tokens. A naive adapter can sort the largest raw counts first and assume it reproduced Geneformer input. The documented preparation includes normalization resources that can change relative ordering.

The Geneformer model card identifies the model family and its transcriptome setting. Record the actual model version instead of assuming every checkpoint uses a universal tokenization recipe.

Normalization resources define rank meaning

The tokenizer implementation normalizes expression using the supplied gene-related resources before ranking encoded genes. A rank therefore describes the transformed representation, not a direct physical quantity and not an unchanged raw-count ordering.

Keep the gene median resource, token dictionary, and model version linked. Substituting a different reference resource can change which tokens appear early in the cell sequence without changing the original count matrix.

Raw inputs and gene identifiers matter

The tokenizer documentation specifies raw counts without prior feature selection and describes required gene identifiers and cell totals. These are model-preparation requirements, not generic defaults for every single-cell analysis method.

A matrix already normalized for a different workflow should not silently pass through the same preparation as raw counts. Preserve the source layer and identifier conversion. Missing or duplicated identifier mappings require an explicit resolution rather than positional guesswork.

Version changes can alter the representation boundary

The documentation distinguishes model-series settings, including special tokens and maximum input size. A weight file alone is therefore insufficient to define an inference-compatible transcriptome tokenizer.

The artifact validation guide provides a general bundle principle: related resources and configuration need the same provenance discipline as parameters. Confirm the selected version rules rather than copying constructor settings from a notebook using another model series.

Validate ranks and retained metadata together

Inspect a small cell example from counts through transformed values, ranked genes, and final token IDs. Keep cell identifiers and custom metadata aligned when filtering removes cells from the output collection.

The data identity guide helps explain that join boundary. A reproducible rank encoding supports computational analysis, but its position in a sequence is not a causal importance measurement or experimental evidence that a gene controls the observed cell state.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles