Research explainer · 01Artificial intelligence

How does AI actually work?

A rigorous guide to learning machines—and to the precise sense in which even their creators cannot fully explain what happens inside them.

Academic level12 min readUpdated July 2026
DATArepresentationPREDICTION
↓ Begin with the central distinction

00 / THESIS

We know the machinery.
We do not yet possess a complete theory of its learned organization.

Modern AI is not supernatural, sentient by default, or literally a digital brain. It is a family of mathematical systems that use data to adjust parameters so that inputs are mapped to useful outputs. Every multiplication can be recorded. Yet the resulting computation is distributed across billions of interacting numerical parameters, making a faithful human-scale explanation extraordinarily difficult.

01 / THE MECHANISM

From examples
to capability.

01

Encode

Text, images or sound are converted into numbers. A language model divides text into tokens; each token becomes a vector—an ordered list of numerical features.

02

Predict

A neural network transforms those vectors layer by layer. During pretraining, a language model commonly estimates a probability distribution for the next token: P(xₜ | x₁…xₜ₋₁).

03

Measure

A loss function quantifies prediction error. Cross-entropy penalizes low probability assigned to the observed answer. The objective is not “understanding” directly; it is minimizing this measurable error.

04

Update

Backpropagation applies the chain rule to compute how each parameter affected the loss. An optimizer nudges parameters in directions expected to reduce future error.

THE LEARNING LOOPθ ← θ − η∇θL(θ)

θ parameters · η learning rate · ∇L loss gradient

02 / INSIDE A TRANSFORMER

Attention makes context computational.

The Transformer, introduced by Vaswani and colleagues in 2017, lets each token calculate which other tokens are relevant to its current representation.

Thebankraiseditsinterestrate.
Illustrative attention weights—not an explanation of the full model.
Query

What information is this position seeking?

Key

What information does each position advertise?

Value

What content should be retrieved if relevant?

Multi-head attention repeats this operation in parallel, while feed-forward layers transform each position. Residual connections and normalization stabilize information flow. Repetition across many layers yields context-sensitive representations.

03 / THREE PHASES

Prediction is trained.
Usefulness is shaped.

A

Pretraining

Exposure to large corpora teaches statistical regularities: syntax, associations, styles, facts and some reusable procedures. Knowledge is compressed into parameters rather than stored as a conventional database.

B

Post-training

Instruction examples, preference feedback and reinforcement learning shape behavior: following requests, refusing unsafe ones and presenting answers more helpfully.

C

Inference

Given a prompt, the trained parameters are usually fixed. The model repeatedly computes token probabilities and selects a continuation. Temperature and sampling rules affect variability.

04 / THE INTERPRETABILITY GAP

Why can’t we say exactly why it answered that way?

Because “knowing how a system works” has several levels—and neural networks are transparent at some levels but opaque at others.

KNOWN IN PRINCIPLE

Mechanistic specification

  • Architecture and operations
  • Parameter values
  • Training objective
  • Exact forward computation
NOT FULLY KNOWN

Human-level causal account

  • Which internal features implement a concept
  • Why a capability emerges at scale
  • Which training examples caused a behavior
  • How a novel answer is composed internally
01

Distributed representation

A concept is rarely located in one neuron. It can be encoded as a pattern across many units; one unit may also participate in many concepts. This “superposition” makes clean decomposition difficult.

02

Scale and nonlinearity

Billions of parameters interact through repeated nonlinear transformations. Local inspection does not readily reveal global function—just as listing every synaptic weight would not explain a human belief.

03

Learning discovers its own features

Engineers specify the architecture and objective, but do not hand-code the internal abstractions. Optimization finds representations that work, without requiring them to match human categories.

04

Explanation is itself underspecified

“Interpretability” can mean simulating a model, identifying influential inputs, finding internal circuits, or giving a causal account. These goals differ, and a plausible story is not necessarily a faithful explanation.

05 / CONSEQUENCES

Fluency is not a certificate of truth.

A language model is optimized to produce probable or preferred continuations—not to maintain a guaranteed, continuously verified world model. It may therefore generate a fluent falsehood, inherit bias from data, fail under unfamiliar conditions, or offer a persuasive post-hoc rationale.

HallucinationBiasPrompt sensitivityDistribution shiftUncalibrated confidenceGoal misspecification

06 / HOW SCIENCE INVESTIGATES THE BLACK BOX

Opacity is a research problem,
not an admission of magic.

Feature attribution

Estimates which input components most affected a prediction. Useful, but often local and method-dependent.

Probing

Tests whether information—such as syntax or geography—can be decoded from internal activations.

Mechanistic interpretability

Searches for features and circuits that causally implement computations inside a network.

Counterfactual intervention

Changes inputs or activations and observes the effect, moving from correlation toward causal evidence.

Sparse autoencoders

Attempt to decompose dense activations into more interpretable features; promising, but incomplete.

Behavioral evaluation

Maps capabilities and failure modes through controlled tests, red-teaming and out-of-distribution trials.

07 / SYNTHESIS

AI is engineered mathematics whose detailed computation is visible, but whose learned conceptual organization is only partially understood.

It learns
by adjusting parameters to reduce error over examples.

It represents
information as distributed, context-sensitive numerical patterns.

It generates
by iteratively predicting outputs conditional on prior context.

It remains opaque
because scale, nonlinearity and emergent features resist compact causal explanation.

08 / ESSENTIAL VOCABULARY

Model +

A parameterized mathematical function that maps inputs to outputs.

Parameter +

A learned numerical value—often called a weight—that shapes the model’s computation.

Embedding +

A vector representation in which geometrical relations can encode useful similarities and distinctions.

Emergence +

The appearance of system-level behavior not transparently described by inspecting individual components. The term does not imply the behavior is inexplicable or supernatural.

Interpretability vs explainability +

Usage varies. Interpretability often concerns understanding internal mechanisms; explainability often includes post-hoc accounts of individual outputs. Neither guarantees causal faithfulness.

09 / SELECTED REFERENCES

  1. 01LeCun, Bengio & Hinton (2015) · Deep learning ↗
  2. 02Vaswani et al. (2017) · Attention Is All You Need ↗
  3. 03Ribeiro, Singh & Guestrin (2016) · Why Should I Trust You? ↗
  4. 04Lipton (2018) · The Mythos of Model Interpretability ↗
  5. 05Gao et al. (2024) · Scaling and evaluating sparse autoencoders ↗

This explainer distinguishes settled mechanisms from active research questions. It uses “AI” primarily for contemporary machine-learning systems and language models; symbolic AI, robotics and other paradigms operate differently.