---
title: "The Most Probable CTC Path Can Return a Different Label Sequence"
description: "Leviathan Systems — Technical content Published 2026-10-21; updated 2026-10-21."
canonical: "https://www.leviathansystems.co/articles/ai-ctc-frame-paths-collapsed-label-probability"
last-updated: "2026-10-21"
---

# The Most Probable CTC Path Can Return a Different Label Sequence

Leviathan Systems — Technical content
Published 2026-10-21; updated 2026-10-21.

With fixed probabilities blank = 0.40, A = 0.35 and B = 0.25 at each of two CTC frames, the most probable individual path is (blank, blank), with probability 0.16. It collapses to an empty output. The label sequence A instead receives 0.4025 by summing its three compatible paths, making A the most probable output. A supplier's best-path return and its most-probable-label return therefore answer different questions under the same probability model.

## CTC45 starts with two fixed frame distributions

At each of two frames, stipulate probabilities 0.40 for blank, 0.35 for A and 0.25 for B. Each distribution sums to 1. A and B are individual label symbols; AB denotes the ordered two-label sequence. The blank is an extra frame-level no-label class. These invented probabilities define CTC45, an exact arithmetic example without a model run or measured recognition result.

Under the CTC product model in Graves and colleagues' 2006 paper, a path's probability is the product of its chosen frame probabilities, conditioned on the fixed input. Here, p((u, v) | input) = p1(u) × p2(v). The product is the stipulated CTC factorization; it does not assert that the original input observations are independent.

CTC then maps frame paths to output labels. Merge consecutive repetitions in the path, then remove blanks. Thus (blank, A), (A, blank) and (A, A) all collapse to the one-label output A. This many-to-one mapping creates the distinction between the probability of one path and the total probability of its output. Hold these distributions and this collapse rule fixed throughout the comparison.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf)

## Nine paths expose the best individual path

Three symbol choices at each of two frames give 3 × 3 = 9 paths. The table lists every path, its product probability and its collapsed output. Empty means a sequence containing zero output labels.

Blank is the unique largest-probability choice at both frames. Selecting it at each frame gives the unique most probable path, (blank, blank), at 0.40 × 0.40 = 0.16. Best-path decoding collapses that path to empty.

The nine path probabilities sum to 0.16 + 0.14 + 0.10 + 0.14 + 0.1225 + 0.0875 + 0.10 + 0.0875 + 0.0625 = 1. This is the complete path population for CTC45.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf)

CTC45: every two-frame path and its collapsed labels
| Frame 1 | Frame 2 | Path probability | Collapsed output | Source |
| --- | --- | --- | --- | --- |
| blank | blank | 0.40 × 0.40 = 0.16 | empty | Planning analysis |
| blank | A | 0.40 × 0.35 = 0.14 | A | Planning analysis |
| blank | B | 0.40 × 0.25 = 0.10 | B | Planning analysis |
| A | blank | 0.35 × 0.40 = 0.14 | A | Planning analysis |
| A | A | 0.35 × 0.35 = 0.1225 | A | Planning analysis |
| A | B | 0.35 × 0.25 = 0.0875 | AB | Planning analysis |
| B | blank | 0.25 × 0.40 = 0.10 | B | Planning analysis |
| B | A | 0.25 × 0.35 = 0.0875 | BA | Planning analysis |
| B | B | 0.25 × 0.25 = 0.0625 | B | Planning analysis |
The probabilities are stipulated exact decimals. Each row is one mutually exclusive path for the same fixed input.

## A wins when compatible path probabilities are summed

An output occurs whenever any path collapsing to it occurs. Those paths are mutually exclusive alternatives, so their probabilities add. For A, sum (blank, A), (A, blank) and (A, A): p(A | input) = 0.14 + 0.14 + 0.1225 = 0.4025.

Likewise, B receives (blank, B), (B, blank) and (B, B): p(B | input) = 0.10 + 0.10 + 0.0625 = 0.2625. Empty receives only (blank, blank), giving 0.16. AB receives only (A, B), giving 0.0875; BA receives only (B, A), also giving 0.0875.

These are all five outputs with nonzero probability. Their probabilities sum to 0.4025 + 0.2625 + 0.16 + 0.0875 + 0.0875 = 1. The unique most probable output is A, even though each individual path contributing to A has lower probability than the best individual path.

Maximizing over paths retains one largest term. Maximizing over outputs first gathers all terms belonging to each output, then compares those totals. The largest single term need not belong to the largest group total. Maximization and this aggregation do not generally commute. CTC45 changes no weights or frame probabilities: its different winners follow entirely from the different events being compared.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf)

## A blank separates repeated output labels

The collapse order matters. The two-frame path (A, A) contains one consecutive run of A and collapses to A. In the three-frame path (A, blank, A), the two A symbols occupy separate runs. Removing the intervening blank after merging runs leaves AA.

Removing blanks first and then merging the newly adjacent A symbols would incorrectly erase that distinction. An intervening different nonblank label would survive too, giving a different output such as ABA.

Consequently, target AA needs at least three frames under this contract: A, blank, A is its shortest compatible path. With only two frames, AA has no compatible path and therefore probability zero, even though its two-label length does not exceed the frame count. Blank supplies a separation within a path; it is neither an output target label nor a generic padding position.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf), [PT1](https://docs.pytorch.org/docs/2.14/generated/torch.nn.CTCLoss.html)

## CTCLoss evaluates a supplied target

PyTorch 2.14 documents CTCLoss as summing alignment probabilities for a target while accepting log-probability inputs. Its input shapes are (T, N, C) or (T, C), where T is the array's frame extent, N is batch size and C counts classes including blank. Targets exclude blank. Separate input_lengths and target_lengths identify the valid per-sequence lengths when storage is padded; storage padding and a predicted CTC blank have different meanings.

For an ordinary feasible nonempty target with positive probability q, the unreduced negative-log loss is -ln(q). The documented default mean reduction divides losses by target lengths and then averages over the batch; sum adds the losses. These returned loss quantities are different from q itself.

CTC45's 0.4025 is the summed probability of output A. Calling a reduced loss a label probability would change the quantity being reported. Moreover, evaluating a supplied target's loss does not itself select the most probable label sequence across possible outputs. Keep probability evaluation, loss reduction and the final label-selection claim distinct.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf), [PT1](https://docs.pytorch.org/docs/2.14/generated/torch.nn.CTCLoss.html)

## Identify which event the supplier's return represents

Consider two fictional reports for exactly CTC45. Report P returns empty and identifies its selected path as (blank, blank), with path probability 0.16. Report Q returns A and identifies its aggregated label probability as 0.4025. Each can accurately describe its stated calculation. If the requirement is to return the most probable label sequence under the fixed model, Q supplies that result in this exhaustive example; P supplies the collapse of the best path.

A useful supplier description connects the returned labels and score to the frame vocabulary, blank symbol, valid frame length and collapse rule. It identifies whether the score belongs to one path or sums all compatible paths for a label sequence. For a claim about the most probable output, it also explains the selection scope and any approximation or additional scoring objective. Summing alignments for one supplied candidate alone does not establish that it outranks every other output.

Keep the underlying frame-probability basis fixed when comparing those claims. A language-model contribution or another score adjustment would introduce a different objective from CTC45. The related beam-score guide addresses length-normalized sequence ranking, while the softmax guide addresses normalization within a frame's score population.

Finally, 0.4025 expresses probability assigned by this stipulated model. It supplies no assessment of transcript correctness or application acceptance. The buyer's immediate decision is whether the delivered object fulfills the promised path or aggregated-label contract.

References: [CTC1](https://www.cs.toronto.edu/~graves/icml_2006.pdf)

## Connect separately needed equipment to physical deployment

If the selected application independently needs equipment receiving, rack integration, onsite installation or IT cabling, Leviathan's Complete Physical Deployment service and related project inquiry provide a route to discuss that physical work. Share a nonconfidential equipment list, site, rack arrangement and connection outline to establish scope, requirements and availability. The appointed application team retains the CTC output and model-evaluation decisions.

References: [L1](https://www.leviathansystems.co/services/turnkey-gpu-deployment)

## Primary sources

- [CTC1 — Graves et al. — Connectionist Temporal Classification, ICML 2006](https://www.cs.toronto.edu/~graves/icml_2006.pdf). Checked 2026-10-21. Sections 3.1–3.2 define path products, many-to-one collapse, summed label probabilities and the best-path limitation. Section 4.2, equation 12, defines the negative-log objective. CTC45 applies these definitions to invented probabilities.
- [PT1 — PyTorch 2.14 — CTCLoss](https://docs.pytorch.org/docs/2.14/generated/torch.nn.CTCLoss.html). Checked 2026-10-21. Documents target-specific alignment summation, log-probability inputs, blank exclusion from targets, separate sequence lengths and loss reductions. This is the named loss interface, rather than a specification of a supplier's returned labels.
- [L1 — Leviathan Systems — Complete Physical Deployment](https://www.leviathansystems.co/services/turnkey-gpu-deployment). Checked 2026-10-21. Defines physical receiving, rack integration, onsite deployment, IT cabling and agreed handoff scope for a separately identified equipment project.

## Related Leviathan resources

- [Beam sequence scores and length normalization](/articles/llm-beam-sequence-score-length-normalization)
- [Softmax axes and the normalized score population](/articles/ai-softmax-class-batch-axis-normalization)
- [Speech inputs: seconds, samples and mel features](/articles/speech-audio-samples-padded-mel-feature-workload)
- [Complete Physical Deployment for selected equipment](/services/turnkey-gpu-deployment)
- [Discuss a physical equipment installation and IT cabling project](/contact?service=turnkey-gpu-deployment&from=%2Farticles%2Fai-ctc-frame-paths-collapsed-label-probability)

## Does selected equipment need physical deployment?

Share a nonconfidential equipment, site, rack and IT connection outline to discuss physical scope, requirements and availability.

[Discuss the scope](/contact?service=turnkey-gpu-deployment&from=/articles/ai-ctc-frame-paths-collapsed-label-probability)
