Machine Learning Model Architectures

Overview of major ML model families: feedforward neural networks, CNNs, RNNs/LSTMs, Transformers, GANs, and when to use each.

  • JSON13,620 B
  • YAML9,356 B · −31%
  • TOON8,029 B · −41%

Machine-learning model architectures with type, structure, layers, uses, pros, cons and notes: feedforward networks, CNNs, RNNs, LSTMs, transformers, GANs and autoencoders, with a selection guide by data type.

Use it when

  • You are choosing an architecture for a data type such as images, text or time series.
  • You need the strengths and weaknesses of each.

Watch out for

  • Guidance is general; strong results often come from architecture, data and training choices together.
  • Architectures are combined in practice (convolutional layers feeding transformers, for example).

The data

Architectures

NameTypeStructureLayersUse casesProsConsNotesKey layersVariantsGatesCore mechanismTraining
Feedforward Neural Network (FNN)Dense / MLPInput → Hidden layers (dense) → Output. No cycles or feedback connections.
  • Input layer
  • One or more hidden layers (ReLU/common)
  • Output layer (linear/softmax/sigmoid)
  • Tabular data classification/regression
  • Simple pattern recognition
  • Baseline model
  • Simple to implement
  • Universal approximator (with enough width/depth)
  • Fast inference
  • Ignores spatial/temporal structure
  • Parameter count grows quickly with input size
Also called Multi-Layer Perceptron (MLP); foundation for all deep netsnullnullnullnullnull
Convolutional Neural Network (CNN)Spatial hierarchyConvolutional layers (filters) → pooling → fully connected. Local receptive fields, weight sharing.null
  • Image classification
  • Object detection
  • Medical imaging
  • Time series (1D conv)
  • Parameter sharing (efficient)
  • Spatial invariance
  • Detects hierarchical features
  • Fixed receptive field (unless dilated)
  • Not inherently good for sequential data
Architecture depth (ResNet, Inception) matters more than width for vision
Convolution
Applies filters/kernels to detect local patterns (edges, textures)
Pooling
Downsampling (max/avg) for translation invariance
Fully connected
Final classification/regression layers
nullnullnullnull
Recurrent Neural Network (RNN)Sequential / temporalRecurrent connections; hidden state carries information across time steps.null
  • Language modeling
  • Time series prediction
  • Speech recognition
  • Sequence tagging
  • Handles variable-length sequences
  • Theoretically infinite memory (with LSTM/GRU)
  • Sequential processing (hard to parallelize)
  • Vanishing/exploding gradients (vanilla RNN)
  • LSTM/GRU complex
LSTM/GRU gates mitigate vanishing gradients; still largely superseded by Transformers for NLPnull
  • Vanilla RNN (simple recurrence)
  • LSTM (Long Short-Term Memory)
  • GRU (Gated Recurrent Unit)
nullnullnull
Long Short-Term Memory (LSTM)Recurrent with gatesCell state + forget/input/output gates. Controls information flow over long sequences.null
  • Machine translation (legacy)
  • Speech synthesis
  • Text generation (pre-Transformer)
  • Can learn long-range dependencies (~100s steps)
  • Robust to vanishing gradients
  • Still sequential (slow training)
  • Many parameters (4× vanilla RNN)
  • Requires more data than simpler models
LSTM superior to vanilla RNN but slower; Transformer now standard for sequencenullnull
Forget gate
Decide what to discard from cell state
Input gate
Decide what new information to store
Output gate
Decide what to output based on cell state
nullnull
TransformerAttention-basedEncoder-decoder or encoder-only/decoder-only. Self-attention + feed-forward. Positional encoding.null
  • NLP (all major tasks)
  • Computer vision (Vision Transformer)
  • Audio (Whisper)
  • Multimodal (CLIP)
  • Parallelizable (no recurrence)
  • Long-range dependencies (attention)
  • Scalable with data/model size
  • Quadratic memory in sequence length
  • Requires massive data for training from scratch
  • Positional encoding limits context
Dominant architecture since 2017 (Attention Is All You Need). Sparse attention variants handle long sequences.null
Encoder only
BERT (masked attention, pre-training)
Decoder only
GPT (causal attention, autoregressive)
Encoder decoder
T5, original Transformer (translation)
nullSelf-attention: each token attends to all others; O(n²) complexitynull
Generative Adversarial Network (GAN)GenerativeGenerator (creates fake samples) + Discriminator (distinguishes real vs fake). Min-max game.null
  • Image synthesis (StyleGAN)
  • Image-to-image translation
  • Super-resolution
  • Data augmentation
  • High-quality, sharp samples
  • No explicit likelihood modeling (flexible)
  • Training unstable (mode collapse, vanishing gradients)
  • Hard to evaluate
  • No explicit density
Diffusion models now dominate image generation; GANs still used for specific tasks (style transfer)nullnullnullnullAlternating: train D on real/fake, then train G to fool D. No explicit likelihood.
AutoencoderRepresentation learningEncoder (compress to latent) → bottleneck → Decoder (reconstruct). Reconstruction loss trains end-to-end.null
  • Dimensionality reduction
  • Anomaly detection
  • Denoising
  • Generative modeling (VAE)
  • Unsupervised pre-training possible
  • Learns compact representations
  • VAE samples blurry
  • Simple AE doesn't learn useful latent space
  • Reconstruction loss not always semantic
Contrastive learning (SimCLR) often superior for representation learningnull
  • Vanilla AE (dense layers)
  • Variational Autoencoder (VAE) — probabilistic latent
  • Denoising AE — robust features
nullnullnull

Selection guide

Tabular data
FNN or Gradient Boosting (XGBoost/LightGBM)
Images
CNN (ResNet, EfficientNet) or Vision Transformer
Sequences short
LSTM/GRU or Transformer (if enough data)
Sequences long
Transformer with sparse attention or linear attention
Text nlp
Transformer (BERT for understanding, GPT for generation)
Time series
Temporal CNN, LSTM, or Transformer (Informer, PatchTST)
Image generation
Diffusion model (Stable Diffusion) or GAN (legacy)
Anomaly detection
Autoencoder or isolation forest

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
architecturesnamestringFeedforward Neural Network (FNN)
architecturestypestringDense / MLP
architecturesstructurestringInput → Hidden layers (dense) → Output. No cycl…
architectureslayersarray[3 items]
architecturesuse_casesarray[3 items]
architecturesprosarray[3 items]
architecturesconsarray[2 items]
architecturesnotesstringAlso called Multi-Layer Perceptron (MLP); found…
architectureskey_layersobject{convolution,pooling,fully_connected}
architecturesvariantsarray|object[3 items]
architecturesgatesobject{forget_gate,input_gate,output_gate}
architecturescore_mechanismstringSelf-attention: each token attends to all other…
architecturestrainingstringAlternating: train D on real/fake, then train G…
selection_guide*object{tabular_data,images,sequences_short,sequences_long}

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.yunusemrevurgun.com/api/dataset/ml-model-architectures?format=toon"
const res = await fetch(
  "https://yjtoon.yunusemrevurgun.com/static-data/dataset/ml-model-architectures.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • machine-learning
  • neural-networks
  • architectures
  • cnn
  • rnn
  • transformer
  • gan

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets