# Effects of padding on LSTMs and CNNs

arXiv: https://arxiv.org/abs/1903.07288 · HTML: https://mlsanity.com/paper/1903.07288/

## Key facts

- Cited by 22 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 18 Mar 2019.

## Built on by (most cited first, 22 of 22)

- [NTIRE 2024 Challenge on Short-form UGC Video Quality Assessment: Methods and Results](https://mlsanity.com/paper/2404.11313/) (2024)
- [Clustering in pure-attention hardmax transformers and its role in sentiment analysis](https://mlsanity.com/paper/2407.01602/) (2024)
- [Deep-Learning-based Vulnerability Detection in Binary Executables](https://mlsanity.com/paper/2212.01254/) (2022)
- [Table Tennis Stroke Detection and Recognition Using Ball Trajectory Data](https://mlsanity.com/paper/2302.09657/) (2023)
- [Similarity Learning based Few Shot Learning for ECG Time Series Classification](https://mlsanity.com/paper/2202.00612/) (2022)
- [Transformer-Based Power Optimization for Max-Min Fairness in Cell-Free Massive MIMO](https://mlsanity.com/paper/2503.03561/) (2025)
- [Influential Recommender System](https://mlsanity.com/paper/2211.10002/) (2022)
- [LSTM Hyper-Parameter Selection for Malware Detection: Interaction Effects and Hierarchical Selection Approach](https://mlsanity.com/paper/2109.11500/) (2021)
- [Short Paper: Static and Microarchitectural ML-Based Approaches For Detecting Spectre Vulnerabilities and Attacks](https://mlsanity.com/paper/2210.14452/) (2022)
- [Implementing Deep Learning-Based Approaches for Article Summarization in Indian Languages](https://mlsanity.com/paper/2212.05702/) (2022)
- [On Mini-Batch Training with Varying Length Time Series](https://mlsanity.com/paper/2212.06536/) (2022)
- [Q-fid: Quantum Circuit Fidelity Improvement with LSTM Networks](https://mlsanity.com/paper/2303.17523/) (2023)
- [Likelihood-Free Estimation for Spatiotemporal Hawkes processes with missing data and application to predictive policing](https://mlsanity.com/paper/2502.07111/) (2025)
- [Tiny Neural Networks for Multi-Object Tracking in a Modular Kalman Framework](https://mlsanity.com/paper/2504.02519/) (2025)
- [Linear Attention for Joint Power Optimization and User-Centric Clustering in Cell-Free Networks](https://mlsanity.com/paper/2512.17466/) (2025)
- [Linear Models, Variable Selection, Artificial Intelligence](https://mlsanity.com/paper/2604.27191/) (2026)
- [Artificial intelligence prediction of stock prices using social media](https://mlsanity.com/paper/2101.08986/) (2021)
- [User-click Modelling for Predicting Purchase Intent](https://mlsanity.com/paper/2112.02006/) (2021)
- [A new transformation for embedded convolutional neural network approach toward real-time servo motor overload fault-detection](https://mlsanity.com/paper/2304.04005/) (2023)
- [On the Shape of Latent Variables in a Denoising VAE-MoG: A Posterior Sampling-Based Study](https://mlsanity.com/paper/2509.25382/) (2025)
- [A Systematic Reproducibility Study of BSARec for Sequential Recommendation](https://mlsanity.com/paper/2512.17442/) (2025)
- [Cross-Domain Policy Optimization via Bellman Consistency and Hybrid Critics](https://mlsanity.com/paper/2603.12087/) (2026)

## Abstract (arXiv)

Long Short-Term Memory (LSTM) Networks and Convolutional Neural Networks (CNN) have become very common and are used in many fields as they were effective in solving many problems where the general neural networks were inefficient. They were applied to various problems mostly related to images and sequences. Since LSTMs and CNNs take inputs of the same length and dimension, input images and sequences are padded to maximum length while testing and training. This padding can affect the way the networks function and can make a great deal when it comes to performance and accuracies. This paper studies this and suggests the best way to pad an input sequence. This paper uses a simple sentiment analysis task for this purpose. We use the same dataset on both the networks with various padding to show the difference. This paper also discusses some preprocessing techniques done on the data to ensure effective analysis of the data.
