long read | en français

How AI works

Let me show you the motors: motivations and engines.

Let us take a pathway: reasoning → socialization → methods.

Logic or generalization

We can assess a proposal with logic or generalization; deduction or induction:

  • Deduction is inference from premises known or assumed to be true. The laws of valid inference are studied in logic.
  • Statistical "inference" is induction: from particular evidence to a universal plausibility.
Severity scale of water core in apples
Severity scale of water core in apples – left: mild; right: severe (Source: M. Farcuh)

"Sometimes it’s best to explain a concept through a concrete example:

Imagine you grab an apple, take a bite from it and it tastes sweet. Will you conclude based on that bite that the entire apple is sweet? If yes, you will have inferred that the entire apple is sweet based on a single bite from it.

[Statistical] inference is the process of using the part to learn about the whole.

How the part is selected is important in this process: the part needs to be representative of the whole. In other words, the part should be like a mini-me version of the whole. If it is not, our learning will be flawed and possibly incorrect.

Why do we need inference? Because we need to make conclusions and then decisions involving the whole based on partial information about it supplied by the part."

Isabella Ghement, 2020

Intellectual history

Cybernetics is: "the study of systems of any nature which are capable of receiving, storing, and processing information so as to use it for control" (Andrey Kolmogorov, a Soviet mathematician). Cybernetics was founded in 1943.

A recurring theme in cybernetics is feedback. Feedback is a process where the observed outcomes are captured and input for further processing. An example is chatBots.

'AI is an ideological project to shift authority and autonomy away from individuals, towards centralized structures of power. Projects that claim to “democratize” AI routinely conflate “democratization” with “commodification”.'

Ali Alkhatib, 2024

In 1955, John McCarthy, then a young Assistant Professor of Mathematics at Dartmouth College, New Hampshire, decided to organize a group to clarify and develop ideas about "thinking machines". He picked the name "Artificial Intelligence" for the new field. He chose the name partly to:

  • avoid cybernetics which already had an assertive influencer in the person of Norbert Wiener;
  • obtain funds from the Rockefeller Foundation for a summer workshop at Dartmouth at about ten participants.

The only AI that since works:

  • has no learning rules (structure, logic, Aristotle, René Descartes),
  • instead "learning" through experiment from observations (empirical, Immanuel Kant, Elizabeth Loftus)

Hybrids or third ways are not working.

Coefficients and input 🧩

Let’s define a coefficient b. It serves to translate the result so that the output of the model lands where appropriate:

algebra: y = ax + b is deterministic if input x is fixed.

Now, suppose that we do not not know the value of b: it still is a coefficient but its value is to be determined. The program will assign a working value to b depending on calculations:

linear regression: y = Xß + b is probabilistic where X is a matrix of unknown variables (to be instanciated by samples).

A graph of a sigmoid function shows a spillway curve from zero to one
Figure 2: a graph of a sigmoid function, showing a spillway curve from zero to one

in classification and generative AI, we repeatedly assess the probability of truth via ̂a, the activation, the result of the sigmoid function sigmoid(wᵀX + b). Our output is in the range of 0 to 1; with sigmoid showing a spillway curve, w being a column of "weights" (unknown coefficients).

Applications of Data Science

  • Data analysis, content-based
  • Regression, image compression, "you might like", click on ad
  • Interpretable AI, expectations, "also liked"
  • "Supervised Learning": image search, speech recognition, translation, driverless car, recommendation concierge

Generative AI

The method of generative AI is to confabulate; to make up stories. Not hallucinations or lies.

Chatbots are based on LLMs (large language models) and are convenient: ChatGPT, DeepSeek, Copilot.

Applications of inventive artificial intelligence: feature design (no consistency, more bugs), materials discovery, AI war (improvisational military robots, military intelligence and planning), self-organizing control systems for robots and space vehicles, entertainment.

'I believe code is a uniquely dangerous deployment site for "AI", because in programming, the most dangerous thing is code which is almost correct. The human brain has a significant tendency toward seeing what it expects to see and a person can sometimes look directly at something that’s mostly correct but wrong without noticing it. However, creating this almost correct code is exactly what "AI" is best at. The purpose of the content generators people now call "AI" is to create something which can plausibly fool a human into believing they are looking at a real picture, real paragraph of text, or real computer program code. So Copilot might as well be designed to generate bugs a human cannot catch.'

mcc, 2025

Business case

our 2030 ambition
Every job, every network, every customer interaction is super-powered by AI
that is ethical and responsible.
a communication slide: 'our 2030 ambition Every job, every network, every customer interaction is super-powered by AI that is ethical and responsible.'

Generative AI and LLMs are efficient to industrialize intellectual production. (While degrading quality.)

Organizations need output and prefer to reduce cost. There is a multibillion-dollar case for productivity gains. "The AI jobs crisis is here, now"

Python/Numpy now has built-in ease of use and parallelism: vectorization

Generative AI and ethics 🌱

AI does not ‘know’ anything. It generates ‘artefacts’ called ‘responses’ on the basis of ‘models’ chosen by engineers according to their context. This is mass production, not statistics.

Bias is everywhere:

  1. The software does not tell a ‘truth’ but produces an impressive result: the wow effect!
  2. Before that, people designed the software with an engineer culture in mind: we make things up, we don’t do ethics.
  3. Even before that, people had chosen the data set: double bias: engineers pick what they want and it only is a record of a past.

If we wanted to illustrate the three moments:

  • The audience should understand that the result is a fabrication: the machine is inventing a tale.
  • The technicians should be trained to incorporate explainability.
  • The technicians should be trained to improve the data set.
  • A representative of vulnerable groups can be brought on board at any time.

A demonstration could consist in taking an official dataset (of population or activities) and generating a shocking result. First disasters

A bayesian method

"Data Science" is science in that a person comes up with an hypothesis and tests it. Its structure is made of intuition and credibility:

By design, the engineer starts from a "prior" belief, prepares data, chooses a probability function, triggers machine so-called "learning". The output is not a probability but a likelihood, an "updated prior" belief, a function that "seems" "plausible" in the context.

The Bayes' Theorem can then be explicitated in English:
a “Posterior” Belief that a thing Θ will happen | after considering event É, can be estimated by: (Likelihood of event É appearing | given Θ happened) times (“Prior” Belief that Θ will happen, before considering event É) divided by (Probability of event É in any circumstances)

How to use a Bayesian Belief Network:
The software performs "inference": from an event that sets variables in known states, it subsequently computes beliefs of interest, conditioned on this event.

Practical examples of the use of Bayesian belief networks include medicine (symptoms and diseases), bioinformatics (traits and genes) and speech recognition (utterances and time).

If wrong prior belief, then wrong outputs. It is a feature of bayesian statistics, not a bug.

Machine learning 🤓

"Prediction" is the calculation of a likely outcome depending on new data.

"Data models" consider outcomes as mathematical functions of "explanatory variables".

An example of a program sequence is:

  1. Quantify nature
  2. Represent similarities: constrain "distance" between predicted and observed.
  3. Iterate? (neural network)

Efficiency vs interpretability 🧐

Transform coordinates ? A linear space is a set whose elements, often called vectors, can be added together and multiplied ("scaled") by numbers called scalars. Changing linear space allows the program to take the place of the researcher to manage filling, quality, learning, balance and noise.

Black box or interpretable?

  • Precision is offered to the general public: only 20% of the time is devoted to statistics. ‘Five PhDs is not compatible with our business’ (said my teacher to the class).
  • Accuracy could be sought for craftsmanship: 80% of the time is spent on statistics. (Ethics.)

We may want to enable our clients to understand how the model works. This is known as ‘interpretability’. Allow practitioners some space to look at what the programme does. This involves maintaining a relationship with the occupation represented by the data. To achieve this, we need to:

  • preserve variables ;
  • artisanally manipulate at each stage.

Reference for everyone: The explanations can be difficult to convey to end users and line-of-business teams

Reference for engineers: "Interpretable and explainable machine learning"

My mathematical justification: Regression redress

Feature engineering for ML

An "eigenvector", 𝑣 of a linear transformation, 𝐴, is scaled by a constant factor, 𝜆, when the linear transformation is applied to it: 𝐴𝑣 = 𝜆𝑣.

The corresponding "eigenvalue", or characteristic root is the multiplying factor 𝜆 (possibly negative). For each eigenvector, solve the equation 𝐴𝑣 = 𝜆𝑣

Wikipedia: "The eigenvectors and eigenvalues of a linear transformation serve to characterize it, and so they play important roles in all the areas where linear algebra is applied, from geology to quantum mechanics. In particular, it is often the case that a system is represented by a linear transformation whose outputs are fed as inputs to the same transformation (feedback). In such an application, the largest eigenvalue is of particular importance, because it governs the long-term behavior of the system after many applications of the linear transformation, and the associated eigenvector is the steady state of the system."

Perspective

AI is a means of power. It is leveraged by capital, the military, California, Washington, Tel Aviv Jaffa, Beijing, Hangzhou.

Other references

https://hachyderm.io/@maugendre/110612110892399309
https://social.coop/@eric/112036902181141453
https://en.wikipedia.org/wiki/Linear_regression
http://data.yt/kit/regression-redress.html

Attribution

The present document is authored Eric Maugendre and is available to re-use if under the CC BY-SA licence.