Yolo 비전 선전
선전
지금 참여하기
용어집

정규화

L1, L2, 드롭아웃, 조기 종료와 같은 정규화 기술을 사용하여 과적합을 방지하고 모델 일반화 성능을 향상시키세요. 자세히 알아보기!

Regularization is a set of techniques used in machine learning to prevent models from becoming overly complex and to improve their ability to generalize to new, unseen data. In the training process, a model strives to minimize its error, often by learning intricate patterns within the training data. However, without constraints, the model may begin to memorize noise and outliers—a problem known as overfitting. Regularization addresses this by adding a penalty to the model's loss function, effectively discouraging extreme parameter values and forcing the algorithm to learn smoother, more robust patterns.

핵심 개념과 기법

The principle of regularization is often compared to Occam's Razor, suggesting that the simplest solution is usually the correct one. By constraining the model, developers ensure it focuses on the most significant features of the data rather than accidental correlations.

Several common methods are used to implement regularization in modern deep learning frameworks:

  • L1 and L2 Regularization: These techniques add a penalty term based on the magnitude of the model's weights. L2 regularization, also known as Ridge Regression or weight decay, penalizes large weights heavily, encouraging them to be small and diffuse. L1 regularization, or Lasso Regression, can drive some weights to zero, effectively performing feature selection.
  • Dropout: Specifically used in neural networks, a dropout layer randomly deactivates a percentage of neurons during training. This forces the network to develop redundant pathways for identifying features, ensuring no single neuron becomes a bottleneck for a specific prediction.
  • Data Augmentation: While primarily a preprocessing step, data augmentation acts as a powerful regularizer. By artificially expanding the dataset with modified versions of images (rotations, flips, color shifts), the model is exposed to more variability, preventing it from memorizing the original static examples.
  • Early Stopping: This involves monitoring the model's performance on validation data during training. If the validation error begins to increase while training error decreases, the process is halted to prevent the model from learning noise.

실제 애플리케이션

Regularization is indispensable in deploying reliable AI systems across various industries where data variability is high.

  1. Autonomous Driving: In AI for automotive solutions, computer vision models must detect pedestrians and traffic signs under diverse weather conditions. Without regularization, a model might memorize specific lighting conditions from the training set and fail in the real world. Techniques like weight decay ensure the detection system generalizes well to rain, fog, or glare, which is critical for safety in autonomous vehicles.
  2. Medical Imaging: When performing medical image analysis, datasets are often limited in size due to privacy concerns or the rarity of conditions. Overfitting is a significant risk here. Regularization methods help models trained to detect anomalies in X-rays or MRIs remain accurate on new patient data, supporting better diagnostic outcomes in healthcare AI.

Python 구현

Modern libraries make applying regularization straightforward via hyperparameters. The following example demonstrates how to apply dropoutweight_decay when training the YOLO26 모델입니다.

from ultralytics import YOLO

# Load the latest YOLO26 model
model = YOLO("yolo26n.pt")

# Train with regularization hyperparameters
# 'dropout' adds randomness, 'weight_decay' penalizes large weights to prevent overfitting
model.train(data="coco8.yaml", epochs=100, dropout=0.5, weight_decay=0.0005)

Managing these experiments and tracking how different regularization values impact performance can be handled seamlessly via the Ultralytics Platform, which offers tools for logging and comparing training runs.

정규화 대 관련 개념

정규화를 다른 최적화 및 전처리 용어와 구별하는 것이 도움이 됩니다:

  • 정규화 대 정규화: 정규화에는 입력 데이터를 표준 범위로 확장하여 수렴 속도를 높이는 것이 포함됩니다. 다음과 같은 기술은 배치 정규화는 약간의 정규화 효과가 있을 수 있지만, 정규화의 주된 목적은 학습 역학을 안정화시키는 것이지만, 정규화는 명시적으로 복잡성에 불이익을 줍니다.
  • Regularization vs. Hyperparameter Tuning: Regularization parameters (like the dropout rate or L2 penalty) are themselves hyperparameters. Hyperparameter tuning is the broader process of searching for the optimal values for these settings, often to balance the bias-variance tradeoff.
  • 정규화 대 앙상블 학습: 앙상블 방법은 여러 모델의 예측을 결합하여 분산을 줄이고 일반화를 개선합니다. 반면 정규화와 비슷한 목표를 달성하지만, 단일 모델의 학습을 제한하는 대신 다양한 모델을 통합하여 단일 모델의 학습을 제한하지 않습니다.

Ultralytics 커뮤니티 가입

AI의 미래에 동참하세요. 글로벌 혁신가들과 연결하고, 협력하고, 성장하세요.

지금 참여하기