In this article
A BPE token can cover several nucleotides; a per-token tensor is not automatically a per-base prediction.
A feature row does not necessarily identify a nucleotide
A genome-annotation experiment may obtain DNABERT-2 hidden states and attach each row to the next nucleotide in the source interval. That correspondence is invalid when the tokenizer groups variable-length substrings. The tensor has a sequence axis, but its positions belong to the tokenized representation.
The DNABERT-2 paper motivates BPE in place of fixed k-mer tokenization. Coordinate interpretation must change with that representation choice.
Variable-length tokens define spans
The official checkpoint supplies the tokenizer used with the model. Preserve the mapping from each ordinary token to the covered input substring using the actual tokenizer interface and verified offsets.
Special tokens and padding need separate treatment because they do not denote ordinary genomic spans. A numeric token index should never be added directly to a chromosome start coordinate unless the conversion has explicitly established that relationship.
Per-base projection is an application operation
An application can choose to distribute a token feature over its covered bases, aggregate several token features, or train an additional prediction head. Those are different downstream definitions. Repeating a vector across a span does not create independently learned predictions at every nucleotide.
Label the resulting artifact as a projection and record the chosen rule. The span-integrity guide explains the general need to preserve correspondence between transformed model input and source coordinates.
Cropping can change token boundaries
The DNABERT-2 implementation guide identifies BPE as part of the released workflow. Independently tokenizing adjacent genomic windows can produce different boundary segmentation from tokenizing a longer combined interval.
Store window boundaries and tokenizer revision with features. Do not assume that concatenating window feature arrays reconstructs the same token sequence as a full-interval pass. Even equal total coverage does not establish equal model context or equal segmentation.
Verify a mapping before biological interpretation
Inspect short inputs with several token lengths and confirm that recovered ordinary-token spans cover the intended sequence without treating markers as bases. Then test any annotation join against known source intervals.
The tensor-axis guide helps keep token and genomic axes separate. A correct coordinate projection establishes computational alignment, not experimental evidence that a highlighted base controls a biological effect or a validated explanation of a model prediction.
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.