AI Glossary / AI and machine learning / Advanced
Connectionist temporal classification
Definition
Connectionist temporal classification, or CTC, is a training method for sequence models that learn from unaligned data, where the input and output sequences have different lengths and no known matching between them.
What it means
Some tasks refuse to line up. In speech, a three-second recording contains the word hello, but nobody marked which slice of audio holds the h. In handwriting, the strokes for a word come as one long trace.
Ordinary training needs aligned examples: this input piece, that output piece. CTC trains without alignment by considering every possible way the output could line up with the input, and favoring the ones that fit.
The model outputs, at each time step, a guess over characters plus a blank symbol meaning nothing here. CTC's mathematics sums over all alignments of those guesses that spell the target word.
Once trained, the model can transcribe new audio or handwriting end to end, emitting characters when it is confident and blanks elsewhere, with no need for slicing.
For a business, CTC is inside speech-to-text and handwriting systems you buy. You will never configure it, but it explains why those systems train on whole recordings and transcripts without someone marking timings by hand.
The name is historical: connectionist is an old term for neural networks, temporal points at sequences, and classification refers to the per-step character decisions.
How it works
Take pairs of input sequences and target transcripts: audio with its text, handwriting images with their words.
The model processes the input and, at each step, outputs a probability over characters and the blank symbol.
CTC computes the total probability of all alignments that collapse to the target, merging repeats and dropping blanks, and training pushes that total up.
Because summing over every alignment is expensive, an efficient algorithm does it exactly, which is the mathematical heart of the method.
At prediction time, the model decodes its guesses into text, often with a language model helping choose between plausible spellings.
Three practical examples
- Speech recognition trained on recordings and transcripts with no word-level timing labels.
- Handwriting recognition for forms and notes, where letters are never sliced apart.
- Keyword spotting in audio streams, where the word's position is unknown during training.
Think of it this way
Think of teaching someone to transcribe songs by playing whole tracks and giving them the lyrics sheet, never saying which line starts when. They must figure out the lining-up themselves.
The limit: if the lyrics sheet is wrong, every alignment built on it is wrong too. CTC removes the need for timings, not the need for good transcripts.
Worked example
training voice notes without a single timestamp
Suppose a clinic has 5,000 dictated visit notes as audio, plus their typed transcripts, and wants a bespoke speech model.
Marking word timings by hand would take months. With CTC, the audio-transcript pairs are enough as they are. The example is illustrative.
Training treats every possible lining-up of transcript to audio, and the model gradually learns where words tend to land.
The clinic's vendor handles the machinery; the clinic's job is supplying clean pairs and checking transcripts, since CTC trusts them completely.
Illustrative case study
A fictional logistics firm wants drivers to log deliveries by voice. Off-the-shelf speech models fail on dock noise and regional accents.
A supplier fine-tunes a CTC-based model on the firm's own recordings. Accuracy improves because the training used whole noisy clips with their transcripts, exactly the conditions of use.
The invented lesson: methods like CTC make custom speech models practical, because nobody can afford to hand-align thousands of hours of audio.
The firm's bigger lesson was about scoping: the vendor's quote hinged on how many hours of paired audio and transcripts existed. Knowing that CTC needs pairs, not timings, kept the quote honest and the project feasible.
Common misconceptions and mistakes
- CTC aligns the data for you as a deliverable. It sidesteps alignment during training; the trained model does not owe you timings.
- It works with wrong transcripts. Bad transcripts poison it, since every alignment assumes the transcript is true.
- It is the latest method. It is an established workhorse; many systems now combine it with attention-based approaches.
Business use
When buying speech or handwriting AI, ask what training data the vendor needs. CTC-based training needing only pairs, not timings, is the norm and changes what you must supply.
If you commission a custom speech model, budget effort for transcript quality, because the training method cannot forgive transcript errors.
The practical legacy: custom speech and handwriting projects need recordings plus transcripts, not expensive time-aligned annotations, when scoping vendor quotes.
People also ask
What does unaligned mean?
The input and output are both sequences, but which input pieces produce which output pieces is not marked.
Is CTC only for speech?
No; it fits any sequence-to-sequence task without alignments, including handwriting and some video tasks.
Do modern systems still use CTC?
Yes, often combined with attention or used as one component of larger speech models.
Does CTC give word timings at prediction time?
Rough ones can be derived from the character outputs, but that is a by-product, not the design goal.
Check your understanding
What problem does CTC solve that ordinary training cannot?
Answer: Ordinary training needs input pieces aligned to output pieces; CTC trains on unaligned sequences by considering every possible alignment that yields the target.
Related terms
- Sequence model
- Alignment
- Handwriting recognition
- speech recognition
- blank symbol
Learn next
AI for Business Owners helps you scope custom AI projects, including what data suppliers will really need: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]
More in AI and machine learning
- Configuration - Configuration is the set of choices and settings that control how an AI system runs, from model options and thresholds to file paths, limits and...
- Confusion matrix - A confusion matrix is a table that lays a classifier's predictions against the true classes, showing not just how often it is right but exactly which...
- Connectionist expert system - A connectionist expert system uses a neural-style network to represent and apply knowledge for a specialized task.
- Consensus clustering - Consensus clustering combines information from several clustering results to identify patterns of agreement.
- Consistency regularization - Consistency regularization is a training principle for semi-supervised learning: a model's prediction for an example should stay the same when that example...
- Constituency parsing - Constituency parsing is the analysis of a sentence's grammatical structure as a tree of nested phrases, such as noun phrases and verb phrases, showing how...
Sources
[S8] Jurafsky and Martin, Speech and Language Processing (3rd ed. draft); [S25] Hugging Face, Transformers Glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Connectionist expert system Next: Connotation frame