Transform vs. older NLP models

What Transformer fundamentally changes

  • Central mechanism:self-attention
    → The model “looks” at all the words in parallel and learns which relationships are important, even at long distance.

  • Massive parallelization: no strictly sequential processing as in Recurrent Neural Networks (RNN ) → much faster training on Graphics Processing Units(GPU) and Tensor Processing Units(TPU).

  • Long context: handles large contextual windows (thousands of tokens), where RNN and variants lose remote memory.

  • Scale (scalability): scales very well (parameters, data, computation) → hence modern Large Language Models(LLMs).

  • Flexibility: extends to multimodal (text, image, audio), in-context learning in-context learning and efficient refinement/fine-tuning.

Limits still true on the Transformer side

  • Quadratic cost with context length (“classic” attention) → high memory and computation.

  • High data and computation requirements for very large models.

  • Less local inductive bias than Convolutional Neural Networks (CNN), which naturally capture local patterns.


Older models (and what they did)

Sequential networks

  • RNN – Recurrent Neural Networks: word-by-word processing; difficulty with long-term memory(vanishing/exploding gradients).

  • LSTM – Long Short-Term Memory: adds gates for better memory → long the state of the art in translation and speech.

  • GRU – Gated Recurrent Unit: a lighter variant of the LSTM.

  • Seq2Seq – Sequence-to-Sequence with attention (Bahdanau/Luong): the first big leap in translation;attention is a module, not the entire architecture.

Convolutions for language

  • CNN/ConvS2S – Convolutional Neural Networks / Convolutional Sequence-to-Sequence: locally parallelizable, good on local patterns, less at ease with very long dependencies.

  • (WaveNet for audio: generative convolutional architecture).

Pre-deep” statistical methods

  • n-gram models (counting language models),

  • HMM – Hidden Markov Models for sequence labeling,

  • CRF – Conditional Random Fields for structured labeling,

  • PCFG – Probabilistic Context-Free Grammars.
    → Little semantic understanding, strong feature engineering, limited performance.


Key differences (overview)

Dimension Transformer RNN/LSTM/GRU CNN/ConvS2S n-gram/HMM/CRF/PCFG
Processing Parallel (self-attention) Sequential (recurrent hidden state) Local parallel (filters) Counting/statistics
Long outbuildings Excellent Difficult (gradients) Medium Weak
Drive speed High (GPU/TPU-friendly) Slower High High
Long context Large window (↑ tokens) Limited Limited-medium Very limited
LLM Scalability Very good Limited Average N/A
Data requirements High Lower Low Low
Memory/compute cost High (attention) Moderate Moderate Low
Local inductive bias Weaker – Stronger –

Or do we still prefer the old ones?

  • Strong resource constraints (embedded/edge, small datasets) → GRU/LSTM remain relevant.

  • Dominant local patterns (small sequences, regular patterns) → CNN/ConvS2S efficient, simple and fast.

  • Historical labeling pipelines (little data, need for interpretability) → CRF/HMM still useful.

Share

Other articles

Which consulting firm supports finance departments with their artificial intelligence projects?

Which firm can quickly find us experienced consultants for a strategic program?

Are you looking for a senior PMO to lead a transformation program? Why choose PALMER?

jQuery(function ($) { var SOURCE = '.custom-cta'; var CIBLE = '.elementor-widget-theme-post-content'; var MIN_CTA = 1; // nb minimum de CTA (le 1er est toujours en fin de contenu) var MAX_CTA = 4; // nb maximum de CTA var MOTS_PAR_CTA = 400; // 1 CTA par tranche de X mots var $source = $(SOURCE).first(); var $contenu = $(CIBLE).first(); if (!$source.length || !$contenu.length) return; function creerCta() { var $clone = $source.clone(); $clone.removeAttr('id').find('[id]').removeAttr('id'); $clone.addClass('cta-clone').removeAttr('hidden').show(); return $clone; } // 1. Conteneur du texte (le parent qui contient le plus de

) var $texte = null; var maxP = 0; $contenu.find('p').parent().each(function () { var nb = $(this).children('p').length; if (nb > maxP) { maxP = nb; $texte = $(this); } }); var $blocs = $texte ? $texte.children().not($source).not('.cta-clone') : $(); var n = $blocs.length; // 2. Mots cumulés à la fin de chaque bloc var cumul = []; var total = 0; $blocs.each(function () { var t = $.trim($(this).text()); total += t ? t.split(/\s+/).length : 0; cumul.push(total); }); // 3. Nombre de CTA proportionnel à la longueur, borné entre MIN et MAX var nbCta = Math.floor(total / MOTS_PAR_CTA); nbCta = Math.max(MIN_CTA, Math.min(MAX_CTA, nbCta)); console.log('[CTA] mots :', total, '| CTA :', nbCta); if (nbCta === 0) return; // 4. CTA de fin, toujours présent $contenu.append(creerCta()); // 5. Autres CTA placés à leur proportion exacte du texte try { if (nbCta === 1 || n === 0) return; var $h2 = $blocs.filter('h2'); var tolerance = total / (nbCta * 4); // écart max (en mots) pour se caler sur un h2 var utilises = []; for (var i = 1; nbCta > i; i++) { var cible = (total * i) / nbCta; // position idéale en nombre de mots // Bloc où l'on atteint cette position var idx = 0; while (idx !== n - 1 && cible > cumul[idx]) idx++; // h2 dont le début est le plus proche de la position idéale var $titre = null; var ecart = Infinity; $h2.each(function () { if (utilises.indexOf(this) !== -1) return; var j = $blocs.index(this); var d = Math.abs((j ? cumul[j - 1] : 0) - cible); if (ecart > d) { ecart = d; $titre = $(this); } }); if ($titre && tolerance >= ecart) { utilises.push($titre[0]); $titre.before(creerCta()); } else if ($blocs.eq(idx).is('h1, h2, h3, h4, h5, h6')) { $blocs.eq(idx).before(creerCta()); } else { $blocs.eq(idx).after(creerCta()); } } } catch (e) { console.error('[CTA] erreur :', e); } });