Papers
Topics
Authors
Recent
Search
2000 character limit reached

CNN–RNN–CTC: End-to-End Sequence Labeling

Updated 10 February 2026
  • CNN–RNN–CTC is an end-to-end deep learning architecture that integrates convolutional feature extraction, recurrent sequence modeling, and CTC for alignment-free labeling.
  • It employs CNNs to extract spatial or time-frequency features, followed by bidirectional RNNs to capture temporal dependencies while using CTC loss to map variable-length inputs to target sequences.
  • The method achieves state-of-the-art results in domains like audio tagging and handwritten digit recognition by eliminating the need for explicit segmentation.

A Convolutional Neural Network–Recurrent Neural Network–Connectionist Temporal Classification (CNNRNNCTC) system is an end-to-end deep learning architecture designed for sequence labeling tasks in which explicit alignment between input frames and output symbols is unknown or variable. It combines a feature-extracting convolutional network, a sequence-modeling recurrent network, and a CTC objective that enables direct optimization of entire label sequences given only global ordering constraints. This class of model has yielded state-of-the-art results in diverse domains including audio tagging and handwritten digit string recognition, particularly when explicit segmentation or temporal boundary annotations are unavailable (Hou et al., 2018, Zhan et al., 2017).

1. Model Architecture

CNN–RNN–CTC systems are structured in three main stages:

  1. Convolutional Neural Network (CNN): The CNN module processes structured inputs (e.g., spectrograms, images) to extract time-frequency or spatial features. In audio tagging (Hou et al., 2018), a stack of four 2D convolutional layers (3×3 kernels, stride 1, no padding, 32 filters each) is applied to log-Mel spectrograms. In handwritten string recognition (Zhan et al., 2017), residual blocks (ResNet-style) form a deeper feature extractor, beginning with a 5×5 convolution and proceeding through four blocks with channel depth increasing from 64 to 512. Downsampling is achieved by max pooling (audio) or stride-2 convolutions and projection shortcuts (image).
  2. Dense/Bottleneck Layer: This optional component reduces the feature dimension before sequence modeling. For audio tagging, a fully connected layer compresses per-frame features to a 32-dimensional embedding (Hou et al., 2018).
  3. Recurrent Neural Network (RNN): Sequence information is modeled using stacked bidirectional recurrent layers. Bidirectional GRU layers (2×128 hidden units, audio (Hou et al., 2018)) or LSTM layers (2×100 hidden units, handwriting (Zhan et al., 2017)) are employed, with outputs combined via summation or concatenation.
  4. CTC-Softmax Output: The RNN outputs are passed through a time-distributed dense layer with softmax activation over an “extended alphabet”: event classes or characters plus a specialized blank symbol.

Table 1. Example Layer Specifications in CRNN–CTC Audio Tagging (Hou et al., 2018)

Layer Output Parameters
Input T×FT \times F (498×62) log-Mel spectrogram
Conv2D (×4) 32 filters, 3×3, stride 1, pad 0 BatchNorm + ReLU after each, no padding
MaxPool2D + Dropout 246×28×32 Pool 2×2, stride 2, dropout p=0.5
Fully Connected 246×32 Linear activation
BGRU Layer 1 246×128 Outputs summed across directions
BGRU Layer 2 246×256 Outputs concatenated across directions
Time-Distributed Softmax 246×17 16 labels + 1 blank

2. Connectionist Temporal Classification (CTC) Loss

The CTC objective directly addresses sequence labeling under alignment uncertainty. For input sequence XX and target sequence YY (length QTQ \leq T), CTC defines a set of possible alignment paths π\pi (allowing label repetitions and blanks), with the loss given as:

LCTC=logPCTC(YX)=logπB1(Y)t=1TP(πtxt)L_{CTC} = - \log P_{CTC}(Y|X) = - \log \sum_{\pi \in \mathcal{B}^{-1}(Y)} \prod_{t=1}^T P(\pi_t|x_t)

where B\mathcal{B} collapses repeated labels and removes blanks (e.g., B(,C,C,,A,T,T,)=CAT\mathcal{B}(-,C,C,-,A,T,T,-)=CAT; - denotes blank). The blank symbol absorbs any input frame not aligned to a label.

Efficient computation of PCTC(YX)P_{CTC}(Y|X) uses dynamic programming via forward (α\alpha) and backward (β\beta) recursions over an "extended" label sequence Yˉ\bar{Y} in which blanks interleave target labels:

Yˉ=[ϕ,y1,ϕ,y2,...,ϕ,yQ,ϕ]\bar{Y} = [\phi, y_1, \phi, y_2, ..., \phi, y_Q, \phi]

Here, ϕ\phi is the blank symbol and L=2Q+1L=2Q+1.

Decoding strategies include greedy best-path (collapsing the highest-probability alignment) and beam search to marginalize over multiple likely paths (Hou et al., 2018, Zhan et al., 2017).

3. Data Preparation and Training Regimes

Audio tagging applications with CRNN–CTC employ sequential labeled data (SLD), where each input clip is annotated with an ordered list of event labels, without onset/offset information. For digit string recognition, inputs are grayscale images and targets are full sequence string labels without spatial or character-level segmentation (Zhan et al., 2017).

Typical regimes include:

  • Optimizer: Adam (audio), ADADELTA (image).
  • Batch size: 16–32 for audio; unspecified batch size for image but small batch training is noted to be stable with residual CNNs.
  • Regularization: Dropout after pooling, batch normalization after convolutions (audio); batch normalization only (image).
  • Early stopping: Based on validation folds.

The CTC loss enables end-to-end training, as gradient signals from the global sequence loss are backpropagated through the RNN and CNN (Hou et al., 2018, Zhan et al., 2017).

4. Comparative Performance and Application Results

In audio tagging (Hou et al., 2018), CRNN–CTC is evaluated on a synthesized 7.1 h dataset (16 event types, SLD), compared to pooling-based CRNNs. Quantitative results are as follows:

Model Precision Recall F₁ AUC
Baseline CRNN 0.687 0.371 0.482 0.669
CRNN+AvgPool 0.847 0.647 0.733 0.815
CRNN+MaxPool 0.933 0.827 0.877 0.908
CRNN–CTC 0.983 0.975 0.980 0.986

The CRNN–CTC model demonstrates both improved event order recovery and substantially increased accuracy (AUC 0.986), outperforming pooling-based alternatives.

For handwritten digit string recognition (Zhan et al., 2017), the CNN–RNN–CTC system achieves:

  • ORAND-CAR-A: 89.75%
  • ORAND-CAR-B: 91.14%
  • G-Captcha (string length up to 11): 95.15%

On character permutation-limited datasets, such as CVL HDS (27.07%), the approach is less effective, reflecting limited label diversity and the reliance of CTC on full label permutation coverage for generalization.

5. Implementation Notes and Computational Properties

  • Complexity: Convolutional operations scale as O(TFK2CinCout)O(T \cdot F \cdot K^2 \cdot C_{in} \cdot C_{out}) per layer (K=3K=3), while the forward–backward CTC algorithm is O(TL)O(T \cdot L) with L=2Q+1L=2Q+1 (audio: Q3Q \leq 3). The convolutional and RNN passes dominate computational cost for moderate-length inputs (Hou et al., 2018).
  • Memory and Runtime: Batch normalization and small kernel sizes control memory consumption. The CTC layer adds negligible overhead for short target sequences. For datasets discussed, training times range from minutes to hours on a single GPU.
  • End-to-End Differentiability: All three stages are trainable as a single computational graph. No frame-level or segmented supervision is required.

6. Practical Extensions and Limitations

Potential extensions suggested include:

  • Substituting GRUs with LSTMs or stacking deeper recurrent layers.
  • Incorporating overlapping pooling or increased stride to reduce sequence length at earlier stages.
  • Enhancing the CTC framework with attention mechanisms, particularly as event counts or sequence lengths grow (Hou et al., 2018).

A plausible implication is that these architectures generalize to any sequential labeling scenario where only the global ordering is required, and not segment-aligned annotation. However, their performance diminishes when training data do not adequately cover sequence permutations, as seen in the character-level recognition on CVL HDS (Zhan et al., 2017).

7. Context and Impact

The CNN–RNN–CTC framework provides a flexible and general pipeline for sequence labeling tasks across audio and vision domains. Its primary impact is the removal of the need for explicit segmentations or alignments, with demonstrated superiority to traditional pooling or local maximum methods in audio tagging (Hou et al., 2018) and strong results in unconstrained string recognition (Zhan et al., 2017). This architecture has influenced subsequent developments in end-to-end learning for speech, handwriting, and event sequence modeling.


References:

  • Audio Tagging With Connectionist Temporal Classification Model Using Sequential Labelled Data (Hou et al., 2018).
  • Handwritten digit string recognition by combination of residual network and RNN-CTC (Zhan et al., 2017).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Convolutional Neural Network–Recurrent Neural Network–Connectionist Temporal Classification (CNN–RNN–CTC).