top of page

Stay Connected

facebook icon.png
X icon.png
linkedin icon.png

Stay Connected - Get our latest news and updates

  • LinkedIn
  • Youtube
  • X
  • Facebook

Artificial intelligence: A FirstPrinciples Primer

  • Writer: FirstPrinciples
    FirstPrinciples
  • 2 days ago
  • 9 min read

What is AI? From symbolic logic to large-scale neural networks, we're unpacking how today’s systems learn, generate, and reason alongside the the misconceptions and challenges of applying AI in science and society.


Artificial Intelligence is no longer confined to science fiction or niche applications. It writes, translates, designs, and performs tasks once considered the exclusive domain of biological intelligence. But despite these capabilities, AI does not "reason" like a person. It does not independently form goals, understand meaning, or possess intention. Instead, it processes data in ways that, under certain conditions, produce outputs that resemble intelligent behavior.


In this primer, we trace AI from its conceptual roots to its modern implementations in large models, explaining how systems learn from data, represent knowledge, and generate outputs. Like past scientific revolutions, AI is redefining our understanding of computation and cognition, but its capabilities are still far from human thought.


The foundations of AI: Pattern recognition over rules

Early AI systems relied on symbolic reasoning involving hand-built structured rules and decision trees in an attempt to mirror human logic. These ‘expert systems’ worked in tidy domains but failed in the messy real-world complexity of language and vision. 

Glowing orbs connected by lines in a pyramid shape; orange at the top, blue and green below, on a dark starry background.

The early limitations led researchers to a new idea: what if we let the computer independently learn the rules from the data rather than follow hard-coded logic? By showing a model many examples, it can spot patterns humans would struggle to pick up on. This data-driven approach is today referred to as machine learning (ML).

 

At its core, machine learning involves training a model by adjusting its internal parameters to reduce error on a given task. One of the most common approaches is supervised learning, where the model is shown many examples along with the correct answers, for instance, images labelled “apple” or “not apple.” After each prediction, the model receives feedback based on how far off it was from the correct answer. This difference is quantified by an objective function, which measures the model’s error and guides how the internal parameters (or weights) should be updated. Over time—and often millions or billions of examples—the model gradually improves. Instead of writing rules by hand, we let the model optimize itself to learn representations that generalize beyond the data it has seen.


Red apple with a green check mark and orange with a red X on a dark background, suggesting a preference for the apple.

A branch of ML, deep learning, involves training mathematical structures called neural networks. These networks are made up of layers of simple units (referred to as ‘nodes’ or ‘neurons’) which are inspired by the structure of the brain. While the complexity of the human brain is beyond reach of modern software, neural networks take on a simplified approach by organizing neurons in layers. Each neuron receives inputs from the previous layer, multiplies them by adjustable values called weights, applies a non-linear function, and passes the result forward. The weight of a connection between two neurons dictates how strongly one neuron affects the next, and they are updated during training using a method called backpropagation, which adjusts them to reduce prediction error.


This structure provides neural networks the ability to be flexible and adapt in much more powerful ways than traditional machine learning techniques. By adjusting how neurons and layers interact with each other, we can create neural networks that specialize, for example, a Convolutional Neural Network for images. As we will see later, transformers are very sophisticated neural networks that are particularly good for the tasks of language.


Glowing nodes in neural network visualization, with orange, blue, and green circles connected by curved lines against a dark starry background.

The transition from symbolic systems to statistical models marked a turning point. It allowed machines to operate effectively without needing formal definitions of knowledge, meaning, or logic. But it also introduced a new kind of opacity, where systems could outperform humans in some tasks, yet remain fundamentally uninterpretable.


Large models and the transformer revolution

Progress accelerated in 2017 with the introduction of the Transformer architecture. Unlike earlier models such as Recurrent Neural Networks (RNNs), which processed sequences one token at a time, Transformers introduced a way to handle sequences in parallel, dramatically improving computational efficiency. This architectural change was made possible by using positional embeddings to encode the order of tokens, allowing the model to process the entire input sequence simultaneously without losing information about token position.


Additionally, while attention mechanisms had already been developed, it was implemented only within the context of recurrent learning models. At the core of the transformer architecture is the transformer, but by removing the need to rely on recurrence, transformer-based models were suddenly able to scale in depth and size, and to handle much longer input sequences with greater flexibility.


These innovations laid the foundation for today’s large language models. Systems like GPT-4, LLaMA-3, Claude, and Gemini build on this architecture and demonstrate strong capabilities in generating language, translating text, writing code, and more. As researchers scaled up parameters, training data, and compute, the performance of these models improved dramatically, even though the underlying design remained largely unchanged.


Yet these models are not intelligent in the human sense. They are pattern completion engines predicting the next token in a sequence based on statistical regularities in their training data. They do not reason, understand, or form goals. Their outputs are coherent not because of comprehension, but because of correlation.


How AI learns: Pre-training, fine-tuning, and alignment


Pre-training: Predicting the next token

The first phase of large model training is pre-training. Here, the model is fed a massive corpus (books, articles, websites) and tasked with predicting the next token in a sequence. Through billions of such predictions, the model adjusts its weights to minimize error. This gradually forms a contextual embedding space (similar to a map), where related words and concepts are represented close to each other.


Pre-training is typically unsupervised: there are no labels, no tasks, just the raw structure of language. Yet this process enables the model to absorb grammar, idioms, logical patterns, and even factual knowledge, just by learning to compress and predict the structure of language. The result of this process is a Base Model—a language model that has learned a broad, task-agnostic representation of the world as captured in text.


Fine-tuning: Task specialization

After pre-training, models may be fine-tuned on curated datasets for specific tasks, like question answering, document classification, or code synthesis. This phase is usually supervised, meaning labelled examples guide the model to produce more specific outputs.


More efficient methods, such as LoRA (Low-Rank Adaptation) and adapter tuning, allow developers to update only small subsets of a model’s parameters, making it possible to specialize models on modest hardware without retraining the entire system. Beyond efficiency, these techniques also help mitigate what's known as catastrophic forgetting—a phenomenon where a model loses previously learned knowledge when fine-tuned on new tasks. By restricting updates to a small portion of the network, these methods help preserve the base model’s original capabilities while layering on new behaviour, though some degree of forgetting can still occur.


Diagram comparing weights during and after training. Left: blue and orange blocks labeled Pretrained weights and B=0. Right: orange block titled Merged weights.
This diagram illustrates the LoRA (Low-Rank Adaptation) method, where low-rank matrices A and B are trained during fine-tuning while keeping the pretrained weights frozen. After training, the matrices are merged into a single weight matrix, enabling efficient inference without additional computation. (Credit: IBM)

Another technique is instruction tuning, where models are trained to follow human instructions in natural language, helping them become more interactive and aligned with user intent.


Alignment: Making models useful and safe

Even a well-trained model can produce outputs that are nonsensical, biased, or unsafe. Alignment refers to the process of adjusting models so their behaviour reflects a prescribed set of values, preferences, and expectations.


The most widely used method is Reinforcement Learning from Human Feedback (RLHF). In this approach, human evaluators rank outputs, and a secondary “reward model” is trained to prefer higher-ranked responses. This model then guides further fine-tuning.


Alignment is crucial for deploying models in user-facing contexts, but it is not sufficient. RLHF can introduce mode collapse (where outputs become repetitive or overly safe), and models can still hallucinate facts or reflect biases present in training data. Alignment efforts also raise deeper ethical questions of whose values are being encoded, and how we define “safe” or “harmless” in global, pluralistic contexts.


Another growing challenge in improving these models is the diminishing availability of high-quality training data. As existing datasets are exhausted, researchers face both data scarcity and signs of performance saturation, with some instances showing that adding more data can lead to higher rates of hallucination rather than better results.


Extending AI capabilities: Retrieval, multimodality, and reasoning


Retrieval-Augmented Generation (RAG)

Large models are constrained by the limits of their training data, which is fixed at the time of training and cannot be updated dynamically. Retrieval-Augmented Generation (RAG) extends their usefulness by allowing the model to retrieve relevant documents from external sources at inference time, injecting fresh and domain-specific knowledge. 


The system uses embedding-based search to find semantically related content, then weaves those retrieved snippets into its response, effectively refreshing the model’s memory with up-to-date, task-specific information.  


Just as crucially, RAG helps reduce hallucinations—a common issue where models invent plausible-sounding but false information, such as nonexistent articles or fake web links. By grounding responses in retrieved evidence, RAG systems make outputs more accurate, verifiable, and trustworthy.


Multimodal Models

Modern models like GPT-4V, Gemini, and open systems like LLaVA can handle not only text but also images, audio, and video. These multimodal systems typically combine multiple specialized components, such as vision encoders or speech transcribers, with a language model that integrates the outputs. This allows them to describe photographs, interpret diagrams, transcribe speech, and even reason across modalities, for example, summarizing a chart embedded in a document.


Multimodality brings us closer to general-purpose AI systems, but it also introduces new challenges in alignment and evaluation.


Reasoning: Emulated, not grounded

Recent advances like chain-of-thought prompting allow models to simulate multi-step logic by generating intermediate steps before arriving at an answer. Tool use (such as invoking calculators, code interpreters, or databases) can further enhance reasoning by offloading logical tasks.


However, this is not the same as symbolic reasoning or grounded inference. The model is copying or emulating the patterns it saw during training. It does not understand the concepts or maintain an internal world model.


Benchmarks like GSM8K and BIG-Bench show progress, but models still struggle with new or abstract questions.


AI in science: Promise, progress, and pitfalls

Green protein structure and pink DNA helix on a pink-blue gradient background, creating a scientific and abstract visual.
Digital rendering of protein structure prediction from Alphafold (Credit: Google DeepMind)

Artificial intelligence is already transforming the scientific process. Large models assist in protein structure prediction, automated theorem proving, data analysis in high-energy physics, and are accelerating materials discovery. In cases like AlphaFold, success has come not just from machine learning but from integrating statistical modelling with known physical and biochemical constraints. Generative models can propose novel molecular compounds, simulate physical systems, and even help write scientific code and documentation. Tools like SciQAG, Semantic Scholar’s TLDR model, and specialized agents for lab automation point to a future where AI acts not only as a research assistant but as a collaborator.


Yet we are far from autonomous scientific discovery. Current models lack causal reasoning, domain grounding, and the ability to generate testable hypotheses without human scaffolding. And while machine learning has enabled faster predictions in areas like materials science, failing to embed physical laws into these systems has led to high error rates and unrealistic outputs, such as the generation of millions of 'novel' materials that do not exist in practice. In many cases, pure statistical extrapolation is not enough: accurate and trustworthy scientific modelling requires the explicit incorporation of known constraints, conservation laws, and interpretability.


Today’s models are powerful compressors of existing knowledge, but they are not yet creators of new understanding. Their opacity makes scientific verification and reproducibility difficult, posing a fundamental challenge to the core principles of science itself.


Critical requirements for AI in scientific research

For AI to fully empower science, several challenges must be addressed. First is interpretability: scientists need to understand why a model arrived at a particular prediction or recommendation. On top of this, many scientific datasets are sparse, skewed, or incomplete, and AI systems trained on such data risk reinforcing gaps, errors, or biases. Integrating AI into research workflows also demands robust tooling, including support for version control, reproducibility, and compatibility with domain-specific software and data formats. Finally, there is the question of autonomy versus oversight. As models take on more exploratory roles, maintaining human judgment and ethical use becomes increasingly critical.


The frontier lies in building systems that can reason about physical laws, explore experimental constraints, and generate new theoretical insights. Doing so may require hybrid architectures that combine deep learning with symbolic tools, formal logic, or simulation engines.


In this sense, the role of AI in science is not just to accelerate discovery, but to reshape how discovery happens.


Why it matters: AI as a new tool of thought

Artificial intelligence is not just a computational breakthrough; it is a conceptual one. It challenges how we define intelligence, creativity, and understanding. These models expose the statistical skeleton beneath our expressions and raise unsettling questions: Can prediction approximate thought? Can compression stand in for comprehension? What responsibilities follow when we deploy non-human agents in health care, science, law, or education?


AI stretches our intellectual reach much like a telescope once extended our sight. But prediction is not the same as understanding. True insight still relies on people to pose good questions, judge answers, and link ideas across fields. 


These models are not minds. They are mirrors, polished by data, that reflect the patterns in our words and ideas. What we build next will decide whether the mirror distorts or clarifies. With the right oversight and human judgment, these systems can advance medicine, power science, and inspire art. Left unchecked, they can spread errors at an unprecedented speed. The frontier is open, and its shape depends on choices we make today.


This article was created with the assistance of artificial intelligence and thoroughly edited by FirstPrinciples staff and scientific advisors.

 
 
iStock-1357123095.jpg
bottom of page