CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
  • Week 1
    • 1.The ML Lifecycle (from a Specialty Perspective)
    • 2.Data Storage for ML: S3, EFS, FSx for Lustre, and Data Formats
    • 3.Data Ingestion: Kinesis, Glue, Batch vs. Streaming
    • 4.Data Labeling: SageMaker Ground Truth, Active Learning, Label Quality
    • 5.Week 1 Comprehensive Review: ML Overview & Data Engineering 1
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
    • 1.Neural Network Basics: From the Perceptron to Backpropagation
    • 2.CNN: Convolutional Neural Networks and Computer Vision
    • 3.RNNs and Sequence Models: From LSTM to Transformer
    • 4.Training Techniques and Transfer Learning
    • 5.Week 7 Synthesis: Deep Learning Summary
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← MLS-C01/Week 7/Day 5

Based on the MLS-C01 exam guide·Report an error

MLS-C01· AssociateWeek 7 · Day 5~31 min read

Day 5 - Week 7 Synthesis: Deep Learning Summary

📌 Key Takeaways

  • Data shape determines architecture: tabular = tree ensembles, images = CNN, sequences = RNN/LSTM/GRU or Transformer.
  • Task type determines the output layer and loss: regression = linear + MSE, binary = Sigmoid + BCE, multi-class = Softmax + cross-entropy.
  • Deep learning is not always the best choice. On small structured datasets, XGBoost is usually better.
  • You should be able to pull out the remedy immediately from learning-curve symptoms alone (divergence = lower the learning rate, overfitting = regularization, underfitting = more capacity).
  • When you see a clue that data is scarce, the answer is not a bigger architecture but transfer learning + data augmentation.

Week 7 on One Page

Week 7 progressed from neural network basics (Day 1) → CNN (Day 2) → RNN/sequences and Transformer (Day 3) → training techniques and transfer learning (Day 4). Today we tie this flow into a single decision map and build a mental framework for narrowing down answers quickly when you meet a deep learning question on the exam.

Choose the architecture by data shape
  ├─ Structured/tabular data      → Usually XGBoost first, DNN second
  ├─ Images/video                 → CNN (ResNet/SSD/U-Net)
  ├─ Sequences (time series, text) → RNN/LSTM/GRU, or Transformer
  └─ Large-scale language/generation → Transformer (BERT/GPT/T5)
 
Choose the output and loss by task type
  ├─ Regression            → Linear output + MSE/MAE
  ├─ Binary classification → Sigmoid + BCE
  └─ Multi-class classification → Softmax + categorical cross-entropy
                 ┌──────────────── Week 7 Overall Map ──────────────┐
                 │                                                  │
  [Day 1 Basics] Perceptron → Activation → Loss → Backprop → Gradient descent
                 │              │                       │
                 │              │ (extend to images)    │ (extend to order)
                 ▼              ▼                       ▼
  [Day 2 CNN]   Convolution/Pooling   [Day 3 Sequences] RNN → LSTM/GRU → seq2seq
                 Backbone + head                         → Attention → Transformer
                 │                                      │
                 └──────────────┬───────────────────────┘
                                ▼
  [Day 4 Training] Optimizer · Learning rate · Regularization · Transfer learning · SageMaker integration
                                ▼
                  Whatever the architecture, "how to run training" is common

Deep learning is not always the answer. On structured tabular data, when data is limited and training time is short, tree ensembles such as XGBoost often perform better. Deep learning shines with unstructured data (images, text, audio) and when data is abundant. On the exam, a "small structured dataset" passage asks for the restraint not to push a neural network where it does not belong.

Data Shape → Architecture Decision Table

Data shapeFirst choiceAlternativeWhen to avoid this choice
Structured (tabular), smallTree ensembles such as XGBoostShallow MLPApplying it to image or sequence data
Structured (tabular), large with complex interactionsTree ensembleDNNWhen interpretability is the top priority
Image classificationCNN (ResNet, etc.)Transfer learning + augmentationTraining from scratch with only a few dozen training images
Image location/countObject detection (SSD/YOLO)—When pixel-level precision is needed
Image pixel levelSemantic segmentation (U-Net/FCN)—When only a simple category is needed
Many time seriesDeepAR / Amazon ForecastLSTMWhen there is only a single, very short time series
Text classification (traditional)BlazingTextComprehend (managed)Generation tasks where word order is key
Text generation/summarization/QATransformer (JumpStart/Bedrock)—When simple keyword extraction is enough

Task Type → Output Layer · Loss · Metric

TaskOutput layerLossMetrics usually watched
RegressionLinear (no activation)MSE / MAERMSE, MAE
Binary classification (balanced)Sigmoid, 1 nodeBCEAccuracy, F1, ROC-AUC
Binary classification (imbalanced)Sigmoid, 1 nodeBCE (or Focal family)Recall, PR-AUC
Multi-class (mutually exclusive)Softmax, K nodesCategorical cross-entropyAccuracy, macro F1
Multi-labelSigmoid, K nodesPer-label BCEPer-label precision/recall

⚠️ Trap: On imbalanced data, accuracy is a trap. If positives are 1%, predicting "all negative" already gives 99%. When the passage says "defects are rare" or "fraud is 0.x% of the total," discard the accuracy option first and look at recall and PR-AUC.

Recap of Days 1–4

Day 1 — Neural Network Basics

  • Perceptron = weighted sum + bias + activation. A single perceptron can only separate data linearly.
  • Without a nonlinear activation, stacking depth is no different from a linear model.
  • Default hidden-layer activation = ReLU (mitigates vanishing gradients; watch out for dying ReLU).
  • Output activation: binary = Sigmoid, multi-class = Softmax, regression = linear.
  • Forward pass (prediction) → loss (error) → backpropagation (gradients) → gradient descent (update).
  • Epoch, batch, iteration: iterations per epoch = number of samples ÷ batch size.

Day 2 — CNN

  • Three core principles: local receptive fields, weight sharing, translation invariance.
  • Convolution = pattern extraction, pooling = downsampling (no learnable parameters).
  • ResNet's residual connection = the solution for training very deep networks.
  • Task distinction: classification (label) / detection (box + class) / segmentation (pixel).
  • SageMaker: Image Classification, Object Detection (SSD), Semantic Segmentation; labeling with Ground Truth.

Day 3 — RNN and Sequences

  • An RNN processes a sequence through a hidden state but suffers from long-term dependency and gradient problems.
  • LSTM (gates + cell state) / GRU (simpler, faster) mitigate this.
  • seq2seq (encoder-decoder) + attention removes the information bottleneck.
  • Transformer = self-attention, parallel, long-range, the modern NLP standard (BERT/GPT/T5).
  • AWS: time series = DeepAR/Forecast, text = BlazingText/Comprehend, generation = JumpStart/Bedrock.

Day 4 — Training Techniques and Transfer Learning

  • Loss: regression = MSE, classification = cross-entropy.
  • Default optimizer = Adam; simple and robust = SGD (+ Momentum).
  • The learning rate comes first: too large diverges, too small is slow → scheduling and warmup.
  • Overfitting prevention: dropout, weight decay, batch normalization, augmentation, early stopping.
  • Transfer learning: little data → freeze (feature extraction), more data → fine-tune with a low learning rate.
  • SageMaker: Script Mode, DLC, distributed training, and JumpStart to integrate TensorFlow/PyTorch.

Commonly Confused Pairs

PairDecisive differenceWhich to pick
CNN vs RNNSpatial structure vs sequential structureImages = CNN, time series/text = RNN family
LSTM vs GRU3 gates + cell state vs 2 gatesLong-term memory matters and resources are ample = LSTM, lightweight = GRU
RNN vs TransformerSequential processing vs fully parallel processingParallel training/long-range dependencies = Transformer
Batch normalization vs dropoutTraining stability/speed vs overfitting suppressionUnstable = BatchNorm, overfitting = Dropout
Transfer learning vs training from scratchReusing prior knowledge vs random initializationLittle data = transfer learning; very large data and a different domain = consider scratch
Feature extraction vs fine-tuningFrozen backbone vs training together at a low learning rateTiny data = freeze, a moderate amount = fine-tune
Adam vs SGDAdaptive step size vs fixed rateDefault starting point = Adam, final fine-tuning of large models = SGD
Classification vs detection vs segmentationLabel vs box vs pixelThe passage's "what / where and how many / pixel level"
Attention vs self-attentionDecoder referring to encoder vs referring within the same sequenceImproving seq2seq = attention, foundation of Transformer = self-attention
MSE vs cross-entropyFor regression vs for probabilistic classificationMSE for classification is the wrong answer

Most pairs in this table are trade-offs of "what do you gain and what do you give up." GRU gives up a little expressiveness to gain speed, freezing gives up flexibility to gain overfitting defense, and Adam gives up a bit of final generalization to gain tuning convenience. Exam passages always drop clues about which side's cost is bigger — data volume, time constraints, and resource limits are those clues.

Symptom → Remedy Cheat Sheet

The exam presents learning curves or symptoms and asks for the remedy. You need to pair symptom and remedy instantly.

SymptomDiagnosisRemedy
Loss diverges / NaNLearning rate too highLower the learning rate
Very slow convergenceLearning rate too lowRaise the learning rate / scheduling, Adam
Training loss ↓, validation loss ↑OverfittingDropout, regularization, augmentation, early stopping
Both losses highUnderfittingIncrease model capacity, train longer, add features
OOM (out of memory)Batch/model too largeReduce batch size, model parallelism
Not enough dataFailure to generalizeTransfer learning, data augmentation
Deep network will not trainVanishing gradientsResNet (residual), batch normalization, ReLU
Loss suddenly explodesExploding gradientsGradient clipping, reduce learning rate
Adding GPUs does not speed it upSequential structure of RNNSwitch to the Transformer family
Hidden-layer outputs stay at 0Dying ReLUReplace with Leaky ReLU, etc.
Too many hyperparameter combinationsLimits of manual searchAutomatic Model Tuning

SageMaker Automatic Model Tuning (Bayesian optimization) automatically searches hyperparameters such as learning rate, batch size, number of layers, and dropout rate. Monitor the training loss curve with CloudWatch, and turning on early stopping saves time and cost. The phrase "efficiently find the optimal hyperparameters" is a signal pointing to AMT.

Passage Clue → Answer Mapping

If the passage saysIt points to
"Thousands of rows of tabular data, limited training time"Tree ensembles such as XGBoost
"Only a few hundred training images"Transfer learning + data augmentation
"Need to know the location and the count"Object detection
"Distinguish regions at the pixel level"Semantic segmentation
"Demand for many products at once"DeepAR / Forecast
"Quickly, without ML specialists"Managed AI services (Comprehend, etc.)
"Making the network deeper made training worse"Residual (skip) connections
"Defects/fraud are under 1% of the total"Recall · PR-AUC (not accuracy)
"Efficiently find the optimal hyperparameters"Automatic Model Tuning
"Run my own PyTorch script in a managed way"Script Mode

Frequent Wrong-Answer Patterns

Wrong-answer patternWhy it is wrongCorrect thinking
"The newest architecture is the best"Ignores data and time constraintsWith small structured data, use a tree ensemble
"Data is scarce, so let's enlarge the model"Pushes toward more overfittingTransfer learning + augmentation first
"Accuracy is low, so let's add epochs"It gets worse if the problem is overfittingDistinguish training/validation curves first
"MSE can be used for classification too"Slow and unstable learningCross-entropy is the standard
"Pooling increases expressiveness"It has no learnable parametersExpressiveness comes from convolution/Dense
"Adding GPUs makes an RNN faster"The sequential structure is the bottleneckIf you need parallelism, use a Transformer
"Transfer learning retrains everything"Destroys prior knowledgeFreeze or use a low learning rate
"High accuracy means a good model"Meaningless under imbalanceRe-check with recall · PR-AUC

⚠️ Trap: In a passage with several overlapping constraints, the answer is not the flashiest technology but the choice that satisfies all constraints at once. When "little data + no time + a similar domain" appear together, the answer is not a large model trained from scratch but a frozen pretrained backbone.

AWS Services Roundup

SituationChoice
Training image classification/detection/segmentationSageMaker built-in (Image Classification / Object Detection / Semantic Segmentation)
Labeled data is neededSageMaker Ground Truth
Time series forecastingDeepAR (built-in) or Amazon Forecast (managed)
Text embedding/classificationBlazingText
Entity/sentiment extraction without trainingAmazon Comprehend
Deploying/fine-tuning pretrained modelsSageMaker JumpStart
Using large language modelsAmazon Bedrock
Training your own TF/PyTorch scriptScript Mode + Deep Learning Containers
Automatic hyperparameter searchAutomatic Model Tuning
Distributing large-scale trainingData parallel / model parallel distributed training

Self-Check

Having finished Week 7, you should be able to answer the following with confidence.

Check itemCriterion
Can you pick the architecture from the data shape alone?Images = CNN, sequences = RNN/Transformer, tables = trees
Can you pair the output activation and loss with the task type?Binary = Sigmoid + BCE, multi-class = Softmax + cross-entropy, regression = linear + MSE
Can you diagnose learning-curve symptoms?Decide whether it is learning-rate adjustment / regularization / transfer learning
Can you tell the SageMaker options apart?The boundaries between built-in · JumpStart · Script Mode
Do you know when not to use deep learning?Tree ensembles on small structured data

📖 Glossary

  • Inductive bias: An assumption built into the model architecture itself. The translation invariance of a CNN is the classic example.
  • Backbone / head: The front part that extracts features / the back part that produces the final prediction. Transfer learning reuses the backbone.
  • Freeze: Fixing pretrained weights so they are not updated. The default strategy when data is very scarce.
  • Fine-tuning: Retraining pretrained weights together at a low learning rate.
  • Vanishing / exploding gradients: Gradients disappearing to zero or diverging during backpropagation. The remedies differ.
  • Residual (skip) connection: A structure that adds the input directly to the output, creating a shortcut for gradients. The key to very deep training.
  • Self-attention: A mechanism in which every pair of positions within a single sequence refers to each other. The foundation of the Transformer.
  • Global model: An approach that trains multiple time series together in one model. DeepAR is an example.
  • Automatic Model Tuning: A SageMaker feature that automatically searches hyperparameters using Bayesian optimization.
  • Script Mode: A way to run your own TensorFlow/PyTorch script in a SageMaker training container.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

You are doing binary classification on 5,000 rows of tabular structured data. Training time and data are limited. What is the most reasonable first approach to try?

Question 2

Both the training loss and the validation loss plateau at high values. What is the most appropriate diagnosis and response?

Question 3

You need to segment building regions pixel by pixel in satellite images, not handwriting. Which combination of task and service is MOST suitable?

Question 4

You want to automatically and efficiently search hyperparameters (learning rate, batch size, dropout). Which SageMaker feature is appropriate?

Question 5

While training a very deep neural network, training actually gets worse as layers get deeper. What is the MOST effective structural remedy?

PreviousTraining Techniques and Transfer LearningWeek 7 · Day 4Next SageMaker Training Jobs: Estimator, Input Modes, Distributed Training, SpotWeek 8 · Day 1

Official references

  • MLS-C01 official exam page(opens in a new tab)
  • Amazon SageMaker AI documentation(opens in a new tab)
  • Amazon Bedrock documentation(opens in a new tab)

On this page

  • Key Takeaways
  • Week 7 on One Page
  • Data Shape → Architecture Decision Table
  • Task Type → Output Layer · Loss · Metric
  • Recap of Days 1–4
  • Day 1 — Neural Network Basics
  • Day 2 — CNN
  • Day 3 — RNN and Sequences
  • Day 4 — Training Techniques and Transfer Learning
  • Commonly Confused Pairs
  • Symptom → Remedy Cheat Sheet
  • Passage Clue → Answer Mapping
  • Frequent Wrong-Answer Patterns
  • AWS Services Roundup
  • Self-Check
  • Glossary
  • Practice Questions