GUIA de fundamentos

Overfitting e Underfitting

Overfitting describes fitting training-specific patterns that generalize poorly, while underfitting describes failing to capture useful structure even in the training data.

Ouça este guiaNarrado por IA · ~3 min

Nesta página3 minutos de leitura
  1. Visão geral
  2. Mergulho profundo
  3. Implementação no mundo real
  4. O futuro do overfitting e underfitting
  5. Colocando em prática
  6. Continue explorando
  7. Perguntas frequentes

Visão geral

These are fitting diagnoses to investigate, not conclusions guaranteed by model size or one accuracy number.

Mergulho profundo

A trained model should be evaluated beyond the examples used to fit it. Under comparable training and held-out conditions, high training performance with much weaker held-out performance can indicate overfitting to training-specific patterns. Poor performance on both sets can be consistent with underfitting, although failed optimization, unsuitable data, and other causes also need consideration. The labels therefore guide diagnosis rather than substitute for it. Changing relevant features or model capacity can be worth testing when the representation is too limited, while regularization and data choices can affect how flexibly a model fits. Bias and variance describe another view of prediction error: bias concerns systematic deviation of the estimated predictor, and variance concerns sensitivity to the sampled training data. Small models are not automatically biased, and large models are not automatically high-variance in every task. The data-generating relationship and fitting procedure matter. Validation and final testing also have different roles. Validation data can help choose a model, hyperparameters, or stopping point. Repeatedly using the final test set for those choices can make the reported final estimate optimistic, so final testing should remain separate when possible. Modern research includes double-descent curves where test error rises near an interpolation regime and falls again as capacity increases. Such observations do not make that curve universal. Assess the actual task, information available, data splits, and fitting procedure rather than infer reliability solely from parameter count.

Implementação no mundo real

Um filtro de spam que sinaliza todos os e-mails contendo o nome de um remetente específico porque esse remetente enviou muitos spams nos dados de treinamento, ignorando totalmente os novos spammers (overfitting).

Um modelo de preço de casa que usa apenas a metragem quadrada e ignora a localização, os quartos e as condições, por isso falha muito em bairros caros (underfitting).

Um classificador de imagens médicas que aprende a detectar a marca d'água do scanner de um hospital em vez da doença, e falha em outros hospitais (ajuste excessivo a um recurso espúrio).

Traçando perda de treinamento versus perda de validação durante o treinamento e parando quando a perda de validação começa a aumentar enquanto a perda de treinamento continua caindo (detectando overfitting precocemente).

O futuro do overfitting e underfitting

Research can examine fitting behavior across architectures, optimization methods, sample sizes, and data conditions. Results should identify the setup in which a curve or diagnostic was observed. Larger models and richer features can be candidates for evaluation, while they do not guarantee improved generalization. Reports should distinguish validation used for selection from final testing and explain the available information, so an apparent improvement can be assessed alongside sampling uncertainty and possible distribution changes.

Colocando em prática

Por que isso importa

  • Decisões mais claras. Ajuda a separar afirmações técnicas claras da linguagem de marketing.
  • Custo e orçamento. Você pode fazer perguntas melhores sobre implementação antes de gastar dinheiro ou tempo.
  • Equipe e fluxo de trabalho. Equipes com entendimento compartilhado tomam melhores decisões sobre produtos, políticas e aprendizado.

Cuidado com

  • Equipes diferentes podem usar o mesmo termo de maneira diferente, portanto, defina o escopo com antecedência.
  • Os benchmarks podem parecer fortes, enquanto o desempenho no mundo real é irregular.
  • Ignorar a qualidade dos dados e os planos de avaliação cria frequentemente resultados frágeis.

Próximas etapas

  1. Comece com uma definição em linguagem simples do resultado que você precisa.
  2. Escolha uma métrica de sucesso e uma condição de falha antes de testar.
  3. Execute um pequeno piloto com dados representativos, não um conjunto de demonstração sofisticado.
  4. Documente onde o Overfitting e o Underfitting ajudam e onde os métodos mais simples são melhores.

Continue explorando

Boletim informativo gratuito

Receba o resumo diário de IA

Três histórias verificadas de IA a cada manhã de dia útil, escritas em linguagem simples. Gratuito para sempre, sem anúncios.

Um e-mail a cada dia útil. Cancele a inscrição com um clique. Nunca vendemos ou compartilhamos seu endereço.

Teste você mesmo

Take the Overfitting and Underfitting quiz

Feedback instantâneo sobre cada resposta e um certificado compartilhável com um ID verificável assim que você concluir um curso.

Iniciar teste

Apoie a educação gratuita em IA. O AI Understanding é uma organização sem fins lucrativos 501(c)(3) — sem anúncios, sem paywall, nunca. Faça uma doação

Perguntas frequentes

What is Overfitting and Underfitting?

Overfitting describes fitting training-specific patterns that generalize poorly, while underfitting describes failing to capture useful structure even in the training data. These are fitting diagnoses to investigate, not conclusions guaranteed by model size or one accuracy number.

Under comparable train and held-out conditions, an illustrative model scores 98% on training and 71% on held-out data. Which fitting concern is consistent with that gap?

The gap is consistent with overfitting, while a complete diagnosis should also check evaluation and data conditions.

Which performance pattern can be consistent with a model underfitting useful structure?

Underfitting concerns inadequate fitting of useful structure, but the pattern should be investigated alongside other possible causes.

In a bias-variance analysis, what does high estimator variance concern?

Estimator variance concerns changes across sampled training sets, not a universal outcome of parameter count.

A house-price model has too limited a representation of relevant inputs and fits poorly. Which candidate change should be evaluated?

Testing a better representation can address an underfitting hypothesis; it is not a guaranteed improvement.

Por que uma validação prolongada ou um conjunto de testes é essencial para detectar overfitting?

O overfitting é invisível se você observar apenas a precisão do treinamento. Avaliar com base em dados invisíveis expõe a lacuna entre a memorização e a generalização genuína.