---
title: "Hidden Markov Models for Sequence: Profiles, States and Decoding"
description: "A profile hidden Markov model represents a whole family by position-specific emission and transition probabilities rather than by one representative sequence. This stop covers the decoding step that a"
canonical: https://lightmysky.com/learn/science/hidden-markov-models-for-sequence-profiles-states-and-decoding-mt_nk14IaZTcw
source: https://lightmysky.com/learn/science/hidden-markov-models-for-sequence-profiles-states-and-decoding-mt_nk14IaZTcw.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Hidden Markov Models for Sequence: Profiles, States and Decoding

A profile hidden Markov model represents a whole family by position-specific emission and transition probabilities rather than by one representative sequence. This stop covers the decoding step that assigns states to a new sequence and what it buys.

Subject: Science · Area: Genetics & Evolution · Ages 22 to 23
Page: https://lightmysky.com/learn/science/hidden-markov-models-for-sequence-profiles-states-and-decoding-mt_nk14IaZTcw

## Ready when they can

- Describe the match, insert and delete states of a profile model and what each one emits
- Explain what a single most probable path gives that per-position posteriors do not
- Say why a profile search recovers remote homologues that a pairwise search misses

## Lesson: One model for a whole protein family

A profile hidden Markov model represents a whole family by position-specific emission and transition probabilities rather than by one member sequence. It trains on a multiple alignment and learns which positions are conserved and where gaps tend to occur. Conserved columns reward the expected residue strongly, while variable columns accept almost anything. You already know substitution matrices price single pairs; this model prices every column on its own terms.

**Example.** Suppose a new sequence arrives with extra residues between two consensus columns and one column missing. The model walks it through states: match states stand for consensus columns and emit the aligned residue, insert states absorb the extra residues between columns, and delete states silently skip the missing column. That walk is an alignment plus annotation in one pass.

Decoding means choosing a path through these states, and two answers serve different needs. The Viterbi algorithm returns the single most probable full path: one coherent global story. Posterior decoding instead reports, for each position, the probability of each state summed over all possible paths: per-position confidence. One commits, the other hedges with numbers.

**Tip.** To argue for a remote homologue that pairwise search misses, point at the adding up. Weak but consistent signals across many positions accumulate under position-specific scoring until the family verdict turns confident. Say which decoding you used and why: Viterbi for one annotation to act on, posteriors where each position's confidence matters.

**Recap.** Profiles score each column separately, Viterbi commits to one path, and posteriors grade every position.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Joint, Marginal and Conditional Probability](https://lightmysky.com/learn/computing/joint-marginal-and-conditional-probability-mt__Rj-hOSMEw)
- [Alignment Scoring: Substitution Matrices, Gap Penalties and Significance](https://lightmysky.com/learn/science/alignment-scoring-substitution-matrices-gap-penalties-and-significance-mt_k--A8iF5SC)
