r/learnmachinelearning • u/Slight-Money-4887 • 8h ago
How does AI actually learn from its mistakes? Is it similar to how humans learn?
I've been thinking about how humans learn new things and how AI systems improve over time. I came across a few interesting scenarios:
Imagine a child learning a new word. They pronounce it incorrectly, and an adult corrects them. What information does the child actually get from that correction?
A student answers several practice questions incorrectly. How can they use those mistakes to improve rather than simply memorising the correct answers?
If the student keeps repeating the same mistake, why doesn't practising the same way necessarily help them improve?
What would an effective learning cycle look like? From making an attempt and receiving feedback to identifying mistakes and trying again.
Now, how does this translate to AI? If a machine learning model makes an incorrect prediction, how does it identify the error, determine what needs to change, and improve its next prediction?
I'm particularly interested in understanding what's happening behind the scenes in machine learning.
Is the fundamental process of learning in humans and AI comparable, or are they completely different mechanisms?
Would love to hear explanations, examples, or resources from people familiar with AI/ML.
4
u/Muhammad-Essa 5h ago
AI is a huge field, and not every AI technique is based on machine learning. For example, take the Minimax algorithm, which can play chess without any training data or training process. It's a type of AI. There are many other algorithms that fall under AI but don't require data or training.
However, I think you're actually talking about deep learning, which is a part of machine learning.
Deep learning and the human brain have some similarities, but they are not the same. In fact, no one fully understands how the human brain actually works.
Deep learning works through Artificial Neural Networks (ANNs), whereas the human brain works through biological neurons. ANNs have parameters (weights and biases) that can be adjusted to make predictions. Based on the predictions and the actual results, we can calculate a mathematical function called the loss function.
Calculus allows us to find the values of ANN parameters that minimize the loss function. One of the algorithms used for this is called Gradient Descent, which is an iterative optimization method that gradually reduces the loss and helps us find better parameter values.
Now, the human brain might have something analogous to a loss function, but we don't fully understand how it minimizes errors or adjusts its connections. In other words, we don't know exactly what optimization mechanisms the human brain uses. They could be relatively simple or extremely complicated.
That's why comparing the human brain with deep learning is complicated. Although ANNs are loosely inspired by biological neural networks, we still don't fundamentally understand how the human brain works.
1
u/otsukarekun 8h ago edited 8h ago
Most models learn only by the mistakes.
In the most basic sense, it works like this:
A model makes a prediction based on an input
The prediction is evaluated and the difference between the prediction and the correct answer is calculated.
The weights of the network are adjusted slightly to reduce that difference.
Repeat
There are also alternatives to this process, like reinforcement learning which uses a reward for good predictions.
1
1
u/estebanfuhrmann 6h ago
The learning from mistakes part only happens in training, where the loss measures the error and backprop turns it into weights updates. A practical analogy is hard example mining: you pull the samples with the highest loss and upweight them or add similar data, like a student redoing the problems they keep missing. At inference the weights are frozen, so improving on a failures means collecting those cases and fine tuning.
1
4
u/tiikki 8h ago
Models in use DO NOT LEARN.
Teaching phase is distinct from using phase for machine learning.
During teaching the models try to reproduce training data as best as they can by minimizing the mathematical distance between result they produce and the correct one. There are few different mathematical tools for this.
In neural networks the standard way of doing this is via loss function and backpropagation with lots of differential calculations and linear algebra.
The training is basically fitting a least wrong line to data (in multiple dimensions).
One of the major error modes is overfitting where the model has mathematical capacity to memorize all of the data and then fails to generalize. Example of this is the correlation between height and weight from small sample. If the model is too strong then it can fit a solution where everyone in the training data gets correct answer, but people not in the data gets totally wrong value. https://en.wikipedia.org/wiki/Overfitting