기본 가이드

손실 함수

A loss defines the objective used to assess predictions or another training target.

이 가이드를 들어보세요AI 내레이션 · ~3 min

이 페이지에서3분 읽기
  1. 개요
  2. 심층 분석
  3. 실제 구현
  4. 손실 함수의 미래
  5. 실천에 옮기기
  6. 계속 탐색하세요
  7. 자주 묻는 질문

개요

Individual loss values are often combined into a scalar for optimization, and the chosen objective is a proxy that may differ from the application's evaluation metric.

심층 분석

A prediction loss compares outputs with training targets according to a specified rule. Those targets can be labels or values constructed for the learning task; they should not automatically be called unquestionable truth. Implementations may produce per-example losses and then sum or average them for an optimization step. Choosing the rule matters. Mean squared error averages squared residuals, giving large residuals more influence than mean absolute error, which averages their absolute values. For residuals one and three, mean squared error is five, while mean absolute error is two. These are illustrative calculations rather than performance results from a dataset. Classification commonly uses cross-entropy. With a one-hot target and a predicted probability p for its class, the loss is minus log p. A lower probability for the target class gives a larger loss, so confident wrong predictions can incur high loss. The logarithm base determines the units: base-two loss is in bits, while a natural logarithm gives nats. For a target probability of one-quarter, minus log-base-two p is two bits. Gradient-based optimization needs usable derivative information, but differentiability requirements should not be generalized to every learning algorithm. Some losses have nondifferentiable points handled by an appropriate subgradient or surrogate. Accuracy is a discrete evaluation metric and is generally not directly useful as a gradient-training objective. A suitable training loss supplies an optimization signal; final task quality needs evaluation using the relevant metrics.

실제 구현

교차 엔트로피 손실을 사용하여 확실한 오분류에 처벌을 가하는 이메일 스팸 분류기를 훈련합니다.

주택 가격 예측을 위한 평균 절대 오차를 선택하여 몇 개의 극단적인 저택이 훈련을 지배하지 않도록 합니다.

얼굴 인식 모델이 동일한 사람의 이미지를 통합할 수 있도록 대비 손실 적용

보다 유용하고 정직한 응답을 유도하기 위해 보상 모델 손실을 설계합니다.

손실 함수의 미래

Objective design can combine prediction terms, regularization, and other task requirements. Comparisons should state the target definition, formula, reduction, units, and evaluation metric. An objective can decrease while an application metric remains unchanged or worsens, so improvement should be measured rather than inferred from training loss alone. Custom losses need examination of the behavior they encourage as well as their numerical and optimization properties.

실천에 옮기기

왜 중요한가요?

  • 더 명확한 결정들. 이는 명확한 기술적 주장과 마케팅 언어를 구분하는 데 도움이 됩니다.
  • 비용 및 예산. 돈이나 시간을 들이기 전에 더 나은 구현 질문을 할 수 있습니다.
  • 팀과 워크플로우. 이해를 공유한 팀은 더 나은 제품, 정책 및 학습 결정을 내립니다.

조심하세요

  • 팀마다 동일한 용어를 다르게 사용할 수 있으므로 범위를 조기에 정의하세요.
  • 벤치마크는 강력해 보이지만 실제 성능은 고르지 않을 수 있습니다.
  • 데이터 품질 및 평가 계획을 무시하면 취약한 결과가 발생하는 경우가 많습니다.

다음 단계

  1. 필요한 결과에 대한 일반 언어 정의부터 시작하세요.
  2. 테스트하기 전에 하나의 성공 지표와 하나의 실패 조건을 선택하세요.
  3. 세련된 데모 세트가 아닌 대표 데이터를 사용하여 소규모 파일럿을 실행하세요.
  4. 손실 함수가 도움이 되는 부분과 더 간단한 방법이 더 나은 부분을 문서화하세요.

계속 탐색하세요

무료 뉴스레터

일일 AI 브리핑 받기

매주 평일 아침마다 3개의 검증된 AI 스토리를 일반 영어로 작성합니다. 무료이며, 광고 없음.

매주 평일마다 한 번 이메일을 받습니다. 한 번 클릭으로 구독 해지. 주소를 판매하거나 공유하지 않습니다.

자신을 테스트해 보세요

Take the Loss Functions quiz

모든 답변에 즉각적인 피드백과, 과정을 통과하면 검증 가능한 ID가 있는 공유 가능한 인증서를 제공합니다.

퀴즈 시작

무료 AI 교육을 지원합니다. AI Understanding는 501(c)(3) 비영리 단체입니다 — 광고 없음, 유료 장벽 없음, 영원히. 기부하기

자주 묻는 질문

손실 함수란 무엇입니까?

A loss defines the objective used to assess predictions or another training target. Individual loss values are often combined into a scalar for optimization, and the chosen objective is a proxy that may differ from the application's evaluation metric.

For a prediction task, what does its selected loss quantify against the training target?

A loss defines a training objective; it does not automatically measure every aspect of application quality.

분류 작업에 가장 일반적으로 사용되는 손실 함수는 무엇입니까?

교차 엔트로피는 예측된 확률 분포를 실제 레이블과 비교하며 분류를 위한 표준 선택입니다.

평균 제곱 오차와 비교하여 평균 절대 오차를 선택하는 이유는 무엇입니까?

평균 절대 오차는 모든 오차를 제곱하는 대신 비례적으로 처리하므로 몇 가지 극단적인 이상값은 영향력이 적습니다.

Why does gradient-based training need a usable loss derivative or suitable substitute?

This concerns gradient-based training, not a claim that every possible learning algorithm requires a differentiable loss.

How does one-hot class cross-entropy change as probability assigned to the target class becomes very small?

The term minus log p grows as the target-class probability shrinks. This does not guarantee a particular gradient magnitude for every model weight.