- Research Article
- 10.29284/ryks4174
A Signal-Based Comparative Analysis Of Transformer And Cnn Architectures For Natural Language Processing Applications
- Feb 10, 2026
- INTERNATIONAL JOURNAL OF ADVANCES IN SIGNAL AND IMAGE SCIENCES
- Jaiprakash Narain Dwivedi + 3 more +3
Transformer-based networks and convolutional neural networks are popular sequence modeling models in natural language processing and have not been fully studied in terms of their resistance to various linguistic perturbations. This study presents a comparative analysis of CNN and Transformer models using a diagnostic hate speech detection benchmark comprising 3,728 linguistically controlled test cases. A character-level CNN and a token-based Transformer were evaluated under identical experimental conditions. The Transformer achieved higher overall performance, with an accuracy of 76.9% and an F1-score of 0.80, while the CNN achieved an accuracy of 71.4% and an F1-score of 0.75. The Transformer also exhibited a lower false negative rate of 19.6%, whereas the CNN showed a false negative rate of 28.4%. Functional analysis indicated that the Transformer performed better on semantically complex constructions such as negation and quotation. In contrast, the CNN demonstrated greater robustness to spelling-based perturbations, attaining accuracy values of up to 84.6% under character-level noise. These findings indicate that architectural effectiveness depends on the dominant characteristics of the linguistic input and the nature of the perturbation. The results provide quantitative evidence to support informed architecture selection for NLP applications requiring robustness to linguistic variability.
Read more