Sequence

A sequence is an ordered string of tokens such as amino acids, nucleotides, or molecular text encodings.

A sequence model sees tokens, not the raw biological object:

where is a vocabulary such as amino acids, nucleotides, k-mers, SMILES tokens, or learned units.

Why It Matters

  • Protein sequence is a compact representation for protein modeling.
  • Sequence models can learn patterns without explicit 3D coordinates.
  • Sequence-derived features are often combined with structure or assay labels.
  • Tokenization, truncation, masking, and padding define what information reaches the model.

Sequence Contract

FieldQuestionExample
AlphabetWhat token vocabulary is used?amino acid, nucleotide, k-mer, SMILES, byte
UnitWhat does one example contain?chain, domain, region, MSA row, molecule string
BoundaryHow are chains, gaps, unknowns, and special tokens encoded?[UNK], gap, chain break, BOS/EOS
Length policyAre sequences cropped, padded, chunked, or filtered?max length, window stride, truncation side
Alignmentraw sequence, MSA, pair alignment, or structure alignment?sequence-only vs aligned columns
Contexttarget, organism, assay, structure, or family metadata?target-conditioned activity prediction

For a protein sequence:

For a k-mer representation:

The unit and tokenization decide which biological variation is visible to the model.

Sequence vs Structure Claim

ClaimSequence Evidence Is Enough?Extra Requirement
residue language modelingusually yestokenizer, masking, homolog split
protein family classificationoften yesfamily and sequence identity control
structure predictionnocoordinate/contact metric and template policy
binding or dockingnotarget, pocket, assay, or complex context
variant effectnot alonevariant definition, background sequence, label context

Do not infer structural or functional understanding from sequence loss alone unless transfer evidence supports it.

Leakage and Split

Sequence data leaks through near duplicates and homologs:

For transfer claims, the split should state whether it controls exact duplicates, sequence identity clusters, families, domains, or time.

Checks

  • What is the tokenization: residues, atoms, SMILES tokens, k-mers, or learned units?
  • Are sequence length limits, padding, and truncation affecting the task?
  • Does the split avoid homolog or near-duplicate leakage?
  • Is the model expected to recover structure, function, or only local sequence statistics?
  • Is the sequence aligned, raw, canonicalized, segmented, or paired with metadata?
  • Is sequence identity computed before or after filtering and preprocessing?
  • Is the sequence available at inference time without private or future context?