No contexto de aprendizado de máquina and inteligência artificial, logits refer to the camada de saída of a rede neural before any função de ativação, such as softmax or sigmoid, is applied. These raw scores represent the model’s confidence for each class in classification tasks. The term is commonly used in the field of deep learning, particularly in tarefas de classificação multiclasse problemas.
Quando uma rede neural processa dados de entrada, ela produz um conjunto de logits que podem ser considerados como pontuações de valores reais não limitados. Por exemplo, em uma tarefa de classificação com três classes, a rede pode gerar logits como [2.0, -1.5, 0.5]. Esses valores não representam probabilidades; podem ser positivos ou negativos, e não há uma relação inerente entre eles.
To convert these logits into probabilities that sum to one—making them interpretable as the likelihood of each class occurring—we typically apply the softmax function. The softmax function exponentiates each logit and normalizes the results to produce a probability distribution. In our example, applying softmax to the logits [2.0, -1.5, 0.5] will yield a set of probabilities that indicates how confident the model is about each class.
Logits are essential for understanding how a model makes predictions, as they provide insight into the decision-making process of the network. By analyzing the logits, researchers and practitioners can better diagnose model behavior, tune hyperparameters, and improve desempenho geral.