---
title: 1-D CNN Feature Extractor
url: https://www.emergentmind.com/topics/1-d-cnn-feature-extractor
type: topic
---

# 1-D CNN Feature Extractor

A 1-dimensional convolutional neural network (1-D CNN) feature extractor is a hierarchical neural architecture designed to learn and extract meaningful representations from univariate or multivariate sequential data, such as time series, audio, vibration signals, or other 1-D signals. It employs stacked convolutional layers and channel-wise operations to progressively distill raw input sequences into lower-dimensional, semantically salient features suitable for downstream supervised or unsupervised tasks. The 1-D CNN paradigm enables the discovery of localized and hierarchical patterns across the input domain, holding significant utility in domains ranging from condition monitoring to signal processing and function approximation.

## 1. Formal Structure and Architectural Variants

A generic 1-D CNN feature extractor processes an input vector $x \in \mathbb{R}^d$ through a sequence of convolutional, activation, and pooling modules. Each convolutional layer applies a set of $n_j$ 1-D kernels $W^{(j)}_{\ell,i} \in \mathbb{R}^{s_j}$ (with kernel size $s_j$ and stride $t_j$) across the channel outputs of the preceding layer, interleaved with nonlinearities (typically ReLU) and optional channel-wise biases $B^{(j)}_\ell$. This mechanism is formalized as:
$$
h_j(x)_\ell = \sigma\left( \sum_{i=1}^{n_{j-1}} W^{(j)}_{\ell,i} *_{t_j} h_{j-1}(x)_i + B^{(j)}_\ell \right)
$$
where $*_{t_j}$ denotes 1-D convolution with stride $t_j$, and $\sigma$ is typically ReLU activation. Spatial dimensionality $d_j$ and channel number $n_j$ evolve with depth, with typical practice employing downsampling (stride equal to kernel size), causing $d_j$ to halve at each layer, and channel counts $n_j$ that grow then contract for parameter efficiency [2210.09041].

The A2CNN architecture exemplifies a concrete 1-D CNN feature extractor for bearing fault diagnosis, operating on FFT amplitude vectors $x \in \mathbb{R}^{2048 \times 1}$ through a hierarchy of five convolutional+ReLU+max-pooling blocks and two fully connected layers:
- Conv1: 8 filters, kernel=32, stride=2, output $1009 \times 8$
- Pool1: pool=2, stride=2, output $504 \times 8$
- Conv2: 16 filters, kernel=16, stride=2, output $245 \times 16$
- Pool2: pool=2, stride=2, output $122 \times 16$
- Conv3: 32 filters, kernel=8, stride=2, output $58 \times 32$
- Pool3: pool=2, stride=2, output $29 \times 32$
- Conv4: 32 filters, kernel=8, stride=2, output $11 \times 32$
- Pool4: pool=2, stride=2, output $5 \times 32$
- Conv5: 64 filters, kernel=3, stride=2, output $2 \times 64$
- Pool5: pool=2, stride=2, output $1 \times 64$
- FC1: 500 units, ReLU
- FC2: $K$ units (softmax label outputs) [1805.00778]

## 2. Theoretical Foundations and Feature Extraction Guarantees

Rigorous analysis demonstrates that deep 1-D multi-channel CNNs, with appropriate layer depths, kernel sizes (=stride), and channel allocation, have the expressivity to serve as exact linear feature extractors. For an input $x \in \mathbb{R}^{2^J}$ and a dictionary of $m$ target feature vectors $\{v^{(\ell)}\}$, a $J$-layer network can realize $h_J(x)_{\ell} = \langle x, v^{(\ell)} \rangle$ via multi-resolution convolutions. Intermediate layers yield all $2^j$-length patch features of the target vectors, and the parameter count is bounded by $O(md)$, considerably more efficient than fully-connected layers [2210.09041]. This reveals a theoretical equivalence between deep 1-D CNNs and certain classical transforms (e.g., wavelets, SVD factorizations) in their capacity for structured linear feature extraction.

## 3. Feature Map Dimensions and Downsampling

At each layer, the output feature map length $m_{i+1}$ is determined by the input length $m_i$, kernel size $k_i$, stride $s_i$, and padding $p_i$:
$$
m_{i+1} = \left\lfloor \frac{m_i + 2p_i - k_i}{s_i} \right\rfloor + 1
$$
For max-pooling with pool size $r$:
$$
m' = \left\lfloor \frac{m_{i+1} - r}{r} \right\rfloor + 1
$$
Channels per layer match the number of filters. Stride equaling kernel size yields rapid downsampling, consistent with practical approaches where spatial dimension is halved per layer, concentrating high-level receptive fields at depth [1805.00778][2210.09041].

## 4. Partial Layer Untying and Domain Adaptation

In domain adaptation scenarios, e.g., A2CNN, feature extractors are instantiated per domain (source $M_S$, target $M_T$). The lower layers (up to $L_{\text{shared}} = 7-l$) are shared across domains, enforcing basic filter consistency, while the upper $l$ layers are "untied" (domain-specific weights), allowing target-specific high-level feature adaptation. This yields a compromise between domain invariance (via tied layers) and adaptation flexibility (via untied layers), supporting robust transfer learning under covariate shift [1805.00778].

## 5. Adversarial Training and Objective Functions

The 1-D CNN feature extractor can be integrated into an adversarial training scheme that enforces extracted features to be both discriminative for source labels and invariant across domains. Key loss terms are:
- Source label cross-entropy: 
  $$
  L_{c} = -\frac{1}{N_S} \sum_{i=1}^{N_S} \sum_{j=1}^{K} 1\{y^i_S=j\} \log[\mathcal{C}_j(M_S(x^i_S))]
  $$
- Domain discriminator loss (binary cross-entropy): 
  $$
  L_d = -\frac{1}{N_S} \sum_{i=1}^{N_S} \log D(M_S(x^i_S)) - \frac{1}{N_T} \sum_{i=1}^{N_T} \log[1-D(M_T(x^i_T))]
  $$
- Adversarial loss for target extractor:
  $$
  L_{adv}^{M_T} = -\frac{1}{N_T} \sum_{i=1}^{N_T} \log D(M_T(x^i_T))
  $$
The overall objective combines $L_c$ and $\lambda L^{M_T}_{adv}$ for balance. Training follows pre-training on source, then alternating domain discriminator and adversarial feature extractor updates. Gradient reversal layers can implement adversarial updates efficiently [1805.00778].

## 6. Practical Implementation Notes and Computational Considerations

1-D CNN feature extractors admit efficient implementation:
- Layer depth $J = \lceil \log_2 d \rceil$ suffices to extract $m$-dimensional features with $O(md)$ parameters [2210.09041].
- Pooling and strides are matched for maximal downsampling and parameter efficiency.
- Channel counts double then halve, peaking at $\sqrt{md}$, minimizing memory and computation cost.
- Post-convolutional features can be fed directly into any fully-connected network, ResNet module, or classifier head for supervised tasks.
- ReLU activations can be effectively linearized via large positive biases where needed [1805.00778][2210.09041].

## 7. Extensions and Analytical Perspectives

Recent analysis establishes deeper connections between 1-D and 2-D CNN architectures, using vectorization to show that multi-layer 2-D convolutions can be reformulated as 1-D convolutions with appropriately structured filters. This provides insights on how CNNs extract singular values and enables novel theoretical guarantees on their function approximation rates, which surpass those of shallow or fully-connected architectures under certain regularity conditions. Open directions include generalizing these results to stride-1 architectures, grouped/dilated convolutions, and quantifying the effects of finite precision and stochastic optimization [2210.09041].

Source: https://www.emergentmind.com/topics/1-d-cnn-feature-extractor