HomeArticlesComputer Science

Machine Learning — Algorithms, Neural Networks & AI

Learn machine learning: supervised/unsupervised learning, neural networks, deep learning, NLP, computer vision, reinforcement learning, transformers, and MLOps.

mysimulator teamUpdated June 2026≈ 4 min read▶ Open the simulation

Foundations of Machine Learning

Machine learning (ML) is a subset of artificial intelligence where systems learn from data without being explicitly programmed (Arthur Samuel, 1959). Supervised learning : labeled data → learn mapping f(x) = y. Regression (continuous y: linear regression, polynomial). Classification (discrete y: logistic regression, SVM, decision trees, random forest, gradient boosting). Unsupervised learning : unlabeled data → find structure. Clustering (k-means, DBSCAN, hierarchical), dimensionality reduction (PCA, t-SNE, UMAP), anomaly detection (isolation forest). Key concepts : bias-variance tradeoff, overfitting/underfitting, cross-validation, regularization (L1/L2), feature engineering, model evaluation (accuracy, precision, recall, F1, AUC-ROC).

Neural Networks & Deep Learning

Artificial neural networks are inspired by biological neurons. A neuron: z = Wx + b, a = σ(z) where σ is an activation function. Activation functions : sigmoid, tanh, ReLU (most common: max(0,x)), GELU, Swish. Architecture : input → hidden layers → output. Training: forward pass, compute loss (MSE, cross-entropy), backward pass (backpropagation = chain rule), update weights (SGD, Adam, AdamW). CNNs (convolutional neural networks): convolution layers, pooling, feature extraction for images. RNNs/LSTMs : sequential data, vanishing gradient problem addressed by gating. Regularization : dropout, batch normalization, weight decay, data augmentation.

Transformers & Large Language Models

The Transformer architecture (Vaswani et al., "Attention Is All You Need", 2017) uses self-attention: Attention(Q,K,V) = softmax(QKᵀ/√dₖ)V. Multi-head attention enables parallel focus on different sequence positions. Encoder-decoder structure; positional encoding for sequence order. BERT (2018): bidirectional encoder pre-training for NLU. GPT series (2018–2024): decoder-only autoregressive LLMs. GPT-4 (2023): multimodal (text + images), >1T parameters. Fine-tuning : LoRA (low-rank adaptation), RLHF (reinforcement learning from human feedback). Scaling laws : model performance improves predictably with compute, data, and parameters (Chinchilla scaling). Emergent abilities appear at scale: chain-of-thought reasoning, in-context learning, tool use.

жива демонстрація · пов'язана симуляція● LIVE

Computer Vision & NLP

Computer Vision : image classification (ResNet, EfficientNet, ViT), object detection (YOLO, Faster R-CNN), semantic segmentation (U-Net, DeepLab), generative models (GANs, diffusion models — Stable Diffusion, DALL-E, Midjourney). NLP : tokenization (BPE, WordPiece), word embeddings (Word2Vec, GloVe), contextual embeddings (BERT, RoBERTa), text generation (GPT), machine translation (mBART), question answering, named entity recognition. Multimodal AI : vision-language models (CLIP, GPT-4V, Gemini), text-to-image (Stable Diffusion XL), text-to-video (Sora), and embodied AI (robotics + language understanding).

MLOps & Production AI

MLOps bridges ML development and deployment. Pipeline: data collection → preprocessing → feature store → training → evaluation → deployment → monitoring. Tools: Data : DVC (version control), Great Expectations (quality). Training : PyTorch, TensorFlow, JAX, W&B (experiment tracking), MLflow. Deployment : ONNX Runtime, TensorRT, vLLM (LLM serving), Docker/K8s. Monitoring : data drift detection (Evidently AI), model performance tracking. Hardware : GPUs (NVIDIA H100: 4 petaflops FP8), TPUs (Google v5p), custom ASICs. Training costs: GPT-4 reportedly $100M+; inference optimization (quantization, pruning, distillation) reduces deployment costs.

📚 Computer science

All Computer science articles

Home

Physics

Chemistry

Biology

Mathematics

Computer Science

🌐 Languages

🇺🇦 Українська

🇬🇧 English (current)

❓ Frequently Asked Questions

What is the difference between AI, ML, and deep learning?

AI is the broadest concept: any system exhibiting intelligence. ML is a subset: learning patterns from data. Deep learning is a subset of ML: using multi-layer neural networks (deep architectures). Relationship: AI ⊃ ML ⊃ DL. Not all AI is ML (rule-based systems); not all ML is DL (random forests, SVMs are ML but not deep learning).

How does gradient descent work?

Gradient descent minimizes a loss function by iteratively updating parameters in the direction opposite to the gradient: θ ← θ – α∇L(θ), where α is the learning rate. Variants: batch GD (full dataset), stochastic GD (one sample), mini-batch GD (subset). Adaptive optimizers (Adam, AdamW) adjust learning rates per parameter using momentum and second moment estimates.

What is a transformer model?

A transformer uses self-attention to process entire sequences in parallel (unlike RNNs which process sequentially). Self-attention computes weighted relationships between all tokens. This enables capturing long-range dependencies efficiently. Transformers are the foundation of modern LLMs (GPT, BERT, LLaMA, Claude) and have been adapted for vision (ViT), speech (Whisper), and multimodal tasks.

What is overfitting?

Overfitting occurs when a model learns noise/patterns specific to training data and fails to generalize to unseen data. Signs: high training accuracy but low test accuracy. Prevention: cross-validation, regularization (L1/L2, dropout), early stopping, data augmentation, simpler model architecture, more training data. The bias-variance tradeoff frames this: overfitting = low bias + high variance.

What hardware is needed for deep learning?

GPUs are essential: NVIDIA RTX 4090 (~$1,600, 24GB VRAM) for personal use, A100/H100 (40–80GB) for production training. Cloud options: AWS (p5), Google Cloud (A3, TPU v5), Lambda Labs. For LLM fine-tuning: 8×H100 (640GB VRAM) for full-precision, or consumer GPU with QLoRA (quantized LoRA). Inference: optimized runtimes (TensorRT, vLLM) can serve on smaller GPUs.

Try it live

Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Hash Function Avalanche Visualizer simulation

What did you find?

Add reproduction steps (optional)