BBest24
ENPL

AI vs ML: how do they differ, and where is the boundary?

From Deep Blue to language models: what separates AI from ML (machine learning), what learning actually changes, and why 99% accuracy can conceal a useless detector.

Nested outlines: a larger region contains branching paths and a smaller region filled with a mesh of points. An unlabelled metaphor of ML as one family of AI methods.

The same decision, three different mechanisms

A camera inspects a component. The screen displays “reject”. One supplier calls this automation, another ML (machine learning), and a third artificial intelligence. The output alone cannot distinguish them: we need to examine its mechanism and how that mechanism was created.

In the first version, a programmer specified the maximum acceptable area of a dark patch. In the second, a learning algorithm selected a decision boundary from labelled images of acceptable and defective components. In the third, a trained model evaluates the image while separate rules account for product type, image quality and the option of sending the component for manual inspection. The interfaces could look identical, although their data requirements and evaluation procedures would differ.

Asking “do we need AI, or would ML be enough?” mixes levels of description. AI (artificial intelligence) covers a broad field of problems and methods. ML (machine learning) concerns ways of developing behaviour from experience. In the conventional map of computer science, ML belongs within AI. A product, however, also contains data pipelines, software, an interface, operating rules and error handling. A category label does not describe how those parts fit together.

We will follow these distinctions through concrete cases. The inspection system and all its numbers in this article are hypothetical, not BBest24 project results or measurements. Historical systems provide documented reference points. They do not imply that an industrial problem needs the architecture of a championship chess program.

AI includes more than learning

AI encompasses knowledge representation, reasoning, action planning, searching for solutions and perception, among other areas. A system can solve a particular problem using knowledge supplied by people and a search procedure, without training a model on examples. A planner might work from a description of states, permissible transitions and a goal. Its competence then comes from the problem representation and the procedure for finding a plan.

John McCarthy described AI as the science and engineering of making intelligent machines, while explaining that it need not reproduce human biological mechanisms. A system can solve a task without using the same process as a person. Conversely, success at one task does not establish a human understanding of the world. These are separate claims that require different evidence.

There is no universal boundary test separating AI from ordinary automation, such as “more than ten rules”. A temperature threshold is usually described as control logic. An expert system combining a knowledge representation with inference belongs to the historical applications of AI. Both may contain conditional instructions. The presence of an if statement, the number of lines of code and unattended operation do not settle the classification.

Artificial general intelligence, or AGI, concerns the ambition of much broader competence and transfer across tasks. It is not a prerequisite for calling a specialised system AI. Consciousness is another question again: recognising defects, carrying on a conversation and scoring well in a game do not, by themselves, test subjective experience.

For engineering purposes, a useful description specifies the task and operating conditions. “The system identifies these surface defects under this lighting” says more than “the camera understands the product”. The first statement can become an acceptance procedure.

ML means machine learning: what actually learns

In Tom Mitchell’s classic formulation, learning connects experience, a task and measurable improvement. Here, the task is component classification, the experience consists of images and their assessments, and performance might mean the proportion of defects found under a limit on false alarms. Until those three elements are specified, “the model improved” is an incomplete claim.

A model represents a relationship used to produce an output. It might be a linear function, a decision tree, an ensemble of trees or a neural network. A learning algorithm is the procedure that selects or modifies that representation. Training data provides examples; the designer chooses their meaning, the model family and the fitting criterion. Learning therefore shifts some engineering effort from writing individual decisions to designing an experiment.

A common formulation for supervised learning of a parametric model is:

θ = arg min θ [ (1/N) Σᵢ L(fθ(xᵢ), yᵢ) + λR(θ) ]*

Here xᵢ is an input, such as an image representation, yᵢ is its label and N is the number of examples. The function fθ produces a prediction using parameters θ. Loss L measures disagreement with the label. Regularisation R, weighted by λ, discourages unwanted fitting behaviour, such as excessive complexity. The arg min notation asks for parameters minimising the expression; an actual training procedure may find only an approximate solution.

This is an example of a common learning formulation, not a definition of all ML. Not every method optimises this objective or stores its learned information in a single vector of weights. A nearest-neighbour method can compare a new input with retained examples. A tree contains selected splits and leaf values. The shared question is how experience influences subsequent answers.

The crucial outcome is generalisation: performance on cases that were not used for fitting. A model that memorises scratches on a hundred particular housings may reproduce their labels perfectly and fail on the next batch. A small training error does not establish whether it learned features of a defect, the photographic background or markings added by an inspector.

A map of terms, not a ladder of progress

ML and machine learning are two names for the same thing. AI is the broader field. This map shows relationships between families of methods; it is neither a timeline nor a complete partition of the field.

ML (machine learning) within AI, with deep learning inside ML and other AI methods alongside
ML (machine learning) is one family of AI methods. Deep learning belongs within ML. Knowledge, search and learning can be combined in one system; content generation describes a use, not another level of this map.

Scroll horizontally if needed.

Term What it describes What it does not guarantee
AI (artificial intelligence) A field concerned with systems performing tasks associated with intelligence Learning from data or general competence
ML (machine learning) Methods that learn behaviour or representations from experience Neural networks or continuous retraining
Deep learning Learning with deep networks and multiple representation layers Content generation or reliability
Generative AI Applications producing content such as text or images Factual correctness
LLM A large language model, typically a deep neural network today A complete product, current documents or independent agency

The relationship between AI, ML and deep learning helps organise families of methods. Generation describes a different dimension: the kind of task or modelling being performed. Not every deep network generates content; an image classifier may return a single label. Generative statistical models also existed before today’s large networks. Adding ever more nested circles to a diagram can obscure these distinctions and suggest a necessary progression that does not exist.

The boundary between ML and statistics is similarly not a division between two disjoint collections of algorithms. Logistic regression may support an analysis of relationships or prediction on new cases. The questions, assumptions and evaluation can change while the equations remain the same. An Introduction to Statistical Learning places regression, trees and deep learning within one practical toolkit for working with data.

A small decision tree is a revealing boundary case. After training, its behaviour can be written as a handful of conditional instructions. It remains a learned model even though inference is deterministic. The relevant distinction is how its structure and thresholds were obtained. Manually writing similar conditions does not become machine learning merely because the resulting code looks the same.

Neither randomness nor program size is therefore a useful diagnostic for ML. Cloud deployment tells us little either. A small trained model may run on a microcontroller, while a complex rule system may require a server. Compute requirements belong to a particular model and workload, not to the label placed on the product.

Why the names get mixed up

History helps explain this. The 1955 Dartmouth proposal, written for a project in summer 1956, already discussed learning alongside other aspects of intelligence. Arthur Samuel’s 1959 paper examined machine learning in a checkers program. Machine learning (ML) was not invented as a new name for chatbots, nor is it a successor field that replaced AI.

Another reason is the level of conversation. A researcher describes a learning algorithm, an engineer describes a model and a user describes an application feature. Each can be correct while referring to a different object. An assistant using a language model may also contain search, permissions, a document store and code that calls tools. Calling the whole assistant AI does not explain which components actually learn.

There is also a communication incentive. AI is a short name associated with a visible product capability. A classifier, a training dataset and a decision threshold are harder to fit into a presentation. This is an interpretation of terminology in use, not a scientific law of technological development. The practical problem arises when a convenient abbreviation replaces an explanation of the mechanism or its responsibilities.

Ask what “it learns” means in the specific product. Does it update a model, add a document to a database, save a preference or incorporate a manually revised rule? All four operations might improve the experience. They require different controls and leave different evidence when someone later needs to reconstruct an error.

Deep Blue and AlphaGo resist simple labels

Deep Blue defeated Garry Kasparov in a match in 1997. Its play relied heavily on searching possible continuations and evaluating positions. It was not a modern deep network learning an entire strategy from scratch. Yet describing it as “pure AI with no ML whatsoever” also simplifies the history.

In section 7.3 of the team’s paper, the authors describe automated analysis tools. Comparison training helped assess weights concerning the king’s pawn shelter; the results suggested that manually selected values were too low, and these were increased before the match. Most features and weights were still created or tuned by hand. This shows a limited learning contribution to the development of a larger system, not architectural equivalence between Deep Blue and a contemporary neural model.

The AlphaGo described in 2016 combined networks evaluating positions and proposing moves with tree search. Training used expert games and self-play. Learned predictions guided the search rather than replacing the entire move-selection procedure. The January paper reports the victory over Fan Hui; that result should not be confused with the subsequent match against Lee Sedol.

AlphaGo Zero, published in 2017, dispensed with training on human games and learned through self-play. It still received the game rules and a designed learning and search procedure. “Without human knowledge” did not mean without assumptions, an objective or engineering work.

These cases show the limits of a product label. Ask which parts were specified, learned or calculated during operation. Game performance does not automatically transfer to inspection, with disputed labels and changing conditions. The lesson concerns combining mechanisms, not universal performance guarantees.

Four learning settings in ML, different sources of information

Supervised learning uses examples with target answers: an image and a defect label, or a measurement history and a later outcome. Unsupervised learning looks for structure without those target answers, perhaps grouping similar signal patterns. An unusual group need not represent failure. It could correspond to a new but perfectly acceptable product variant.

Self-supervised learning constructs its training task from the data itself. A model might predict a missing portion or the next token from preceding context. There is still a learning signal: the target needed to calculate error is derived from the available material. The procedure does not automatically establish that a training text is true. Predicting what occurs in data and verifying a claim about the world are different objectives.

Reinforcement learning uses interaction and reward. Behaviour is adjusted to improve an outcome, often one that depends on a sequence of actions. A reward need not identify the correct action at every step. Engineers must also check whether the optimised outcome matches their actual purpose. Maximising the number of components passed would be a poor objective if missed defects carried no penalty.

These settings can coexist. A model may first learn representations without manually assigned labels, then be adapted using labelled examples and undergo further optimisation. The more useful engineering question is which signal changed behaviour and what that signal can justify about performance outside training.

Training does not happen with every answer

Training constructs or changes a model. Inference uses a selected model version to calculate an output. In a typical deployed classifier, parameters stay fixed during inference. Running it a thousand times is not equivalent to a thousand learning updates. Online learning exists, but updates must be part of the system design; they do not follow automatically from calling something ML.

A trained model as one of four parts in the process from new data to an operational decision
Using a trained model within a system: new data, model, product rules and decision. Training and evaluation take place separately.

Product rules translate a model output into an action: pass, reject or refer to a person. They may also block a decision when the input is invalid. The diagram omits training and evaluation to show one inference path. It does not claim that every system needs precisely four modules or that this separation alone ensures safe operation.

Language models make the distinction less obvious because conversation context affects their responses. Supplying examples can change an answer without changing the weights. The 2020 study of few-shot learning documents task performance in this setting. Responding differently to an instruction is not the same process as persistent fine-tuning. An application may separately store a preference and include it in the next request.

Retrieval-augmented generation, or RAG, adds material retrieved for use during generation. The original RAG paper combined a model with external memory and included training. Later adding a document to an index, however, does not itself update the generator’s weights. Available information can change without retraining that model.

This matters when diagnosing errors. An incorrect answer may come from an inaccurate document, retrieval of the wrong passage, omission of necessary context or unsupported generation. Having RAG does not guarantee correctness. Evaluation should examine both the selection of evidence and whether the answer is supported by that evidence, rather than accepting a citation-shaped output as proof.

Why 99% accuracy can mean failure

Assume a test set of 10,000 components that was used neither for training nor for threshold selection. Reliable reference inspection found 100 defective items and 9,900 acceptable ones. At a fixed threshold, the model detects 90 defects, misses 10 and incorrectly flags 198 acceptable components. It correctly passes the remaining 9,702 acceptable items.

Scroll horizontally if needed.

Actual condition Defect alarm No alarm Total
Defective 90 10 100
Acceptable 198 9702 9900
Total 288 9712 10,000

Recall, or sensitivity to defects, is 90/100 = 90%. Nine out of ten defective items trigger an alarm. Precision, the proportion of alarms that correspond to defects, is 90/288 = 31.25%. Most alarms are false despite the high recall. The false-positive rate among acceptable items is 198/9900 = 2%. Precision and the false-positive rate use different denominators; treating them as interchangeable produces misleading conclusions.

Accuracy, the proportion of all correct classifications, is (90 + 9702)/10,000 = 97.92%. A program passing every component would score 99%, because it would correctly handle all acceptable items. It would detect no defects. Ranking by accuracy alone would therefore favour a solution contrary to the detection objective. With no alarms, precision is not 100%: its denominator is zero, requiring an explicit reporting convention.

Prevalence also changes interpretation. If defects hypothetically rose to 10% while recall stayed at 90% and the false-positive rate stayed at 2%, there would be 900 true alarms and 180 false alarms. Precision would rise to 83.33%. This is a conditional calculation. A real production change could also alter recall and the false-positive rate, so those values cannot be promised merely because the proportions changed.

The conclusion is not a universal verdict on the model. If a person reviews all 288 alarms, the relevant questions include inspection workload and the cost of ten missed defects. If an alarm automatically discards the item, 198 acceptable components become losses. The same model can have different value under different operating rules.

From a demonstration to defensible evidence

Select the decision threshold on validation data using the costs of both types of error. Use the test set afterwards to evaluate the fixed solution. Repeatedly changing the model after inspecting test results gradually turns that test into another part of selection. A fresh, independent sample is then needed for a final assessment.

A random split does not necessarily provide independence. If ten photographs of one housing are distributed between training and testing, the model may encounter the same physical item in both sets. Split the units that represent novelty in future operation: individual items, batches, devices or time periods. The appropriate unit depends on what kind of unfamiliar situation the deployed system is expected to handle.

The definition of a defect also deserves inspection. Would two inspectors label the case identically? Is the label determined from the photograph or from a later examination unavailable to the camera? If two physical states are indistinguishable in the input, a better algorithm cannot create the missing information. Improving lighting, optics or the measurement procedure may be more effective than increasing model complexity.

Define what happens with blurred images, an obstructed camera and a new product variant. A high model score need not be a calibrated probability. A value of 0.9 should not automatically be interpreted as a guarantee that nine in ten such decisions are correct. Measure performance in the relevant operating conditions and observe how inputs change after deployment.

One hundred defective examples also provide limited evidence. Ten misses do not determine the exact future production error rate. The sample may omit rare defect types, and images from the same batch may be strongly dependent. Report counts and collection methods alongside percentages. Two decimal places in a calculation do not create two decimal places of certainty about the next batch.

The learning objective and the operating rule also need to be separated. An algorithm may minimise average loss while the process owner cares about the maximum number of missed defects per shift. Representative data, error weighting and threshold selection must connect those requirements. A falling training loss alone does not demonstrate compliance.

A practical experiment can freeze the images and label definitions, then compare a manual threshold, a small model and a more complex candidate on the same cases. Record per-item results: if every candidate fails on reflections, investigate imaging first. An average across production may conceal failure on one surface type.

Keep versions of the dataset, model, image preparation and decision rules. Changing resolution or normalisation can change predictions with identical weights. Reproducibility requires the whole computation path, not just a network name. This makes the model-product distinction an everyday maintenance issue.

A successful demonstration should lead to precise questions. Does performance survive a new batch? Does shorter exposure hide fine scratches? Can operators review the alarms in time? Answers may justify further development, a narrower scope or another method. None requires deciding whether the product looks sufficiently intelligent.

More images do not invariably improve a model. Near-duplicates may increase dataset size without broadening experience. Incorrect labels can reinforce the wrong relationship, and an overrepresented batch can skew results. New data is valuable when it improves or tests behaviour in relevant conditions, with its effect assessed independently.

Questions more useful than the label

Before choosing a solution, agree what it must predict, which experience produced the model, which data remained independent and what operational action follows its output. Then ask about missed defects, false alarms, operating limits and reverting a faulty version. Comparison with a simple baseline can establish whether extra complexity brings a measurable benefit.

AI and ML share an application space, but they are not interchangeable descriptions of a complete product. A model can learn a useful relationship while the surrounding product makes poor decisions. It can also perform well within a narrow scope without general understanding. A competent assessment reconstructs the mechanism and examines the evidence supporting its use under particular conditions.

Sources

All notes →