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

기울기 소실

딥러닝에서 기울기 소실 문제, 신경망에 미치는 영향, ReLU, ResNet 등과 같은 효과적인 해결 방법을 알아보세요.

The Vanishing Gradient problem is a significant challenge encountered during the training of deep artificial neural networks. It occurs when the gradients—the values that dictate how much the network's parameters should change—become incredibly small as they propagate backward from the output layer to the input layers. Because these gradients are essential for updating the model weights, their disappearance means the earlier layers of the network stop learning. This phenomenon effectively prevents the model from capturing complex patterns in the data, limiting the depth and performance of deep learning architectures.

The Mechanics of Disappearing Signals

To understand why this happens, it is helpful to look at the process of backpropagation. During training, the network calculates the error between its prediction and the actual target using a loss function. This error is then sent backward through the layers to adjust the weights. This adjustment relies on the chain rule of calculus, which involves multiplying the derivatives of activation functions layer by layer.

If a network uses activation functions like the sigmoid function or the hyperbolic tangent (tanh), the derivatives are often less than 1. When many of these small numbers are multiplied together in a deep network with dozens or hundreds of layers, the result approaches zero. You can visualize this like a game of "telephone" where a message is whispered down a long line of people; by the time it reaches the start of the line, the message has become inaudible, and the first person doesn't know what to say.

솔루션 및 현대적 아키텍처

인공지능 분야는 소실되는 기울기를 완화하기 위한 여러 강력한 전략을 개발하여 Ultralytics 같은 강력한 모델의 생성을 가능케 했습니다.

  • ReLU 및 변형: 정류 선형 단위(ReLU) 와 그 후속 변형들(예: 누설 ReLU, SiLU)은 양수 값에서 포화되지 않습니다. 이들의 미분값은 1 또는 작은 상수이므로 깊은 레이어를 통과할 때도 기울기 크기를 보존합니다.
  • 잔여 연결: 잔여 네트워크(ResNet)에서 도입된 이 연결은 "스킵 연결"로, 기울기가 하나 이상의 레이어를 우회할 수 있게 합니다. 이는 기울기가 방해받지 않고 이전 레이어로 흐를 수 있는 "초고속도로"를 생성하며, 현대적 물체 탐지에 필수적인 개념입니다.
  • 배치 정규화: 각 레이어의 입력을 정규화함으로써, 배치 정규화는 네트워크가 미분값이 지나치게 작지 않은 안정적인 영역에서 작동하도록 보장하여, 신중한 초기화에 대한 의존도를 줄입니다.
  • 게이트드 아키텍처: 순차적 데이터의 경우, 장단기 기억(LSTM)네트워크와 GRU는 특화된 게이트를 사용하여 유지하거나 잊어야 할 정보의 양을 결정함으로써, 긴 시퀀스에서 기울기가 사라지는 현상을 효과적으로 차단합니다.

사라지는 그라디언트 vs. 폭발하는 그라디언트

비록 동일한 근본적 메커니즘(반복적 곱셈)에서 비롯되지만, 소멸하는 기울기는 폭발하는 기울기와는 구별된다.

  • 사라지는 기울기: 기울기가 0에 가까워져 학습이 중단되는 현상. 시그모이드 활성화 함수를 사용하는 심층 신경망에서 흔히 발생한다.
  • 폭발하는 그라디언트: 경사가 누적되어 지나치게 커져서 모델 가중치 격변하거나 도달하다 NaN (Not a Number). This is often fixed by gradient clipping.

실제 애플리케이션

사라지는 기울기 문제를 극복하는 것은 현대 AI 애플리케이션의 성공을 위한 필수 조건이었다.

  1. Deep Object Detection: Models used for autonomous vehicles, such as the YOLO series, require hundreds of layers to differentiate between pedestrians, signs, and vehicles. Without solutions like residual blocks and batch normalization, training these deep networks on massive datasets like COCO would be impossible. Tools like the Ultralytics Platform help streamline this training process, ensuring these complex architectures converge correctly.
  2. Machine Translation: In Natural Language Processing (NLP), translating a long sentence requires understanding the relationship between the first and last words. Solving the vanishing gradient problem in RNNs (via LSTMs) and later Transformers allowed models to maintain context over long paragraphs, revolutionizing machine translation services like Google Translate.

Python

현대적인 프레임워크와 모델은 이러한 복잡성 대부분을 추상화합니다. YOLO26과 같은 모델을 훈련할 때, 아키텍처는 자동으로 SiLU 활성화 함수나 배치 정규화 같은 구성 요소를 포함하여 경사도 소멸을 방지합니다.

from ultralytics import YOLO

# Load the YOLO26 model (latest generation, Jan 2026)
# This architecture includes residual connections and modern activations
# that inherently prevent vanishing gradients.
model = YOLO("yolo26n.pt")

# Train the model on a dataset
# The optimization process remains stable due to the robust architecture
results = model.train(data="coco8.yaml", epochs=10)

Ultralytics 커뮤니티 가입

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

지금 참여하기