The Hidden Link Between the Holy Quran and Artificial Intelligence

The Majesty of the Glorious Book in Revealing How Artificial Intelligence Works

As the blessed month of Ramadan begins, many of us hasten to complete the recitation of the Holy Quran, often starting with Surat Al-Baqarah. At its beginning, the story of the first creation, the question of the noble angels, and God's teaching of the names to our father Adam, peace be upon him, stand out to us. What truly struck me was the correspondence between the content of these verses and the essence of how Artificial Intelligence (AI) works, and how it is not merely a "mindless machine," but a system that simulates thinking, decision-making and speech in a way that brings it closer to human cognition.

Pattern Extraction: How Does the Machine Understand?

If we consider how artificial intelligence models work today, we find that, setting aside the complexity, they do not follow a traditional storage of information. Instead, they rely on Pattern Recognition. They do not "store" data; they form knowledge and reformulate it.

When we ask a model such as ChatGPT from OpenAI about a given topic, it does not retrieve a memorised text. Rather, it draws on the knowledge it has acquired or consults additional information, and then composes a new explanation. Therefore, you will find that each time it responds in a wording different from before, which is what we call Generative AI.

Even in visual understanding (images and videos), models follow a method of extracting the Features of each object. They see thousands of elements of a thing and identify its specific "pattern," and when tested with new content, they find the closest pattern to what is in front of them and determine its nature.

Stages of Construction: Training and Testing

Before these models reach the world, they pass through two essential stages, which the Holy Quran describes in detail, with the fundamental difference in methodology:

  1. Training Phase: The models are fed vast quantities of Big Data. Here the model extracts "knowledge" from texts, images and sounds, not rote "memorisation."
  2. Testing/Evaluation Phase: This tests the model's ability to Inference. Has it truly extracted the patterns and understood that each object has "features" that distinguish it? Are its responses rooted in acquired knowledge, or in "silent memorisation" devoid of connection and explanation?

The Miracle in the Teaching of the Names

Following the verses, we find a remarkable structural progression. God, Mighty and Majestic, says: "And He taught Adam the names, all of them". Here we notice a subtle distinction between the "name" and the "named." The name is the designation of a thing, so that we can distinguish it from other things; the named is the actual reality of the thing with its properties and what comes to mind when you hear its name.

God taught our father Adam both "the name and the named" together. He did not know the tree merely as a word; He taught him its essence (its roots, branches, colours, fruits). Had it not been so, we would have been obliged to memorise each form of tree separately. But divine grace granted mankind comprehensive General Knowledge and the capacity to evoke the absent named thing merely by mention of its name.

This form of learning through extracting the "cognitive pattern" is precisely what artificial intelligence imitates, though with a difference in human nobility. When a model is trained on images of "camels," for example, it does not memorise the pictures; rather, it understands that a "camel" is a creature with four legs, a hump, and certain features. These "features" are what give it the ability to recognise an image of a camel it has never seen before, and to distinguish it from a "horse" with different characteristics.

The True Test

Even once the training phase is complete, we move to the Validation & Testing phase, to assess the model's ability to Generalisation rather than mere repetition. We see this scene clearly in His saying, Exalted is He: "He said: O Adam, inform them of their names". This divine command was not mere display; it was a genuine Benchmark test of the knowledge Adam had received. In the world of artificial intelligence, we do not test a model on data it has already seen (as that would be mere "reciting" or "silent memorisation"); rather, we present it with Unseen Data to see whether it has grasped the "essence" or not.

The decisive result was: "So when he informed them of their names", which in the language of our age we call high Prediction Accuracy. Through what his Lord had taught him, our father Adam, peace be upon him, demonstrated that he had not memorised a "list" of names, but possessed Inference Power that enabled him to distinguish precisely and report the facts, surpassing the angels, whose knowledge stopped at the limits of what they had been given, while the door of "recognising comprehensive patterns" for everything in the universe was opened to our father Adam.

In conclusion, we see the great creativity in the Holy Quran's description of the mechanisms of perception and learning, which are the same foundations upon which artificial intelligence rests: the technological leap whose echo has reached every corner, whose fame has spread and whose resonance is on the tongues of people of science, religion, politics and economics, and which has become an active axis of our lives. Its essential stages of training and testing have been mentioned in our Lord's Book for more than 1,400 years.