Digital Economy Dispatch #196 -- A Software Engineering Perspective of AI

Digital Economy Dispatch #196 -- A Software Engineering Perspective of AI
11th August 2024

I’ve been spending a lot of time lately reading about AI. Yet, the more I read, the less certain I am about what the term means.

Definitions and descriptions of AI vary dramatically from the narrow focus on neural networks powered by super-fast computing advocated by people such as Geffrey Hinton to Jaron Lanier’s view that what we see today, particularly as highlighted in Generative AI tools, is better seen as a clever way to create mash ups of artefacts created by humans. More broadly, Marvin Minsky describes AI simply as “a suitcase word” to hold a wide variety of different technologies and techniques. Kenneth Payne goes one step further by saying that an individual’s view of what is or isn’t AI is a philosophical choice, not a technical distinction.

However it is viewed, AI has become a ubiquitous term in business and society. And while it often evokes images of sentient machines and futuristic scenarios, the reality of AI is far more deeply rooted in fundamental principles of computer science and software engineering. For most practical purposes, the nature of AI can be more effectively understood by focusing on the software architecture that underlies it, and the engineering mindset required to implement AI at scale. By reviewing these aspects, we can better understand the reality of AI adoption in today's complex digital technology landscape.

What is AI?

AI, in its broadest sense, refers to the development of computer systems capable of performing tasks that typically require human intelligence. These tasks include visual perception, speech recognition, decision-making, and language translation. However, this definition only scratches the surface of what AI encompasses.

At its core, AI is a multidisciplinary field that combines elements of computer science, mathematics, cognitive psychology, and linguistics. It employs various techniques to mimic human cognitive functions, ranging from rule-based systems to machine learning algorithms. The latter has gained significant prominence in recent years, particularly with the advent of deep learning and neural networks that power popular tools such as ChatGPT, Gemini, and Claude.

The heart of AI in most cases is machine learning: A set of techniques for developing algorithms that can learn from and make predictions or decisions based on data. This approach marks a significant departure from traditional programming paradigms, where explicit instructions are provided for every possible scenario. Instead, machine learning models are trained on large datasets, allowing them to identify patterns and make inferences autonomously. Based on their initial training and with constant updates through feedback from their use, they adapt their behaviour to new circumstances and contexts.

The distinction between AI and traditional software becomes apparent when considering the nature of the problems AI-based systems address. While conventional software engineering often deals with deterministic problems with well-defined solutions, AI's adaptability makes it well-suited to tackle probabilistic challenges where the optimal solution may not be immediately apparent or easily codified.

 

Aspect

AI Solutions

Traditional Software

Problem Nature

 Probabilistic challenges

 Deterministic problems

Solution Approach

 Learns from data, adapts behaviour

 Follows explicit instructions

Programming Paradigm

 Machine learning algorithms

 Predefined rules and logic

Decision Making

 Makes inferences autonomously

 Executes predefined logic

Data Handling

 Requires large datasets for training

 Typically uses structured, limited data

Adaptability

 Can adapt to new circumstances and contexts

 Generally static, requires manual updates

Core Technology

 Neural networks, deep learning

 Conventional programming languages

Outcome Predictability

 Less predictable, probabilistic outcomes

 More predictable, deterministic outcomes

Problem Complexity

 Well-suited for complex, ambiguous problems

 Better for well-defined, structured problems

Behaviour

 Can exhibit human-like behaviour

 Typically exhibits programmed behaviour

Architecture

 Layered (Data, Model, Inference, Application, Monitoring)

 Traditional software architecture

Continuous Learning

 Often improves with more data and usage

 Typically static unless manually updated

 

Human-like Behaviour is Not Human-like Intelligence

While such differences are important, they mask an important reality. The challenge here is to make a major distinction between two distinct concepts:

Human-like Behaviour ó Human-like Intelligence

Much of what we see today described as AI are software-based systems that can demonstrate human-like behaviour. The outcomes we see in most AI use cases (such as image generation, language translation, or question-response systems) provide a similar experience to those we would expect to receive by interacting with a human. However, this should not be confused with the system exhibiting human-like intelligence. The outcome is the result of applying well-designed engineering principles and not because the system is demonstrating human intelligence.

This distinction matters. A lot. Rather than seeing AI as some form of alchemy, where its tools hold some kind of mythical powers, organizations would be much better placed if they keep reminding themselves that AI solutions are engineering artefacts, and those involved in delivering AI are first and foremost described, managed, measured, and rewarded as engineers.

The Magic Behind the Curtain -- Software Architecture

Despite the seemingly magical capabilities of AI systems, the underlying architecture is firmly grounded in software engineering principles. The "magic" of AI is largely a product of sophisticated software design and implementation.

At the heart of many AI systems lies a layered architecture that separates concerns and promotes modularity. This architecture typically consists of:

  • Data Layer: Responsible for data ingestion, preprocessing, and storage. This layer handles the vast amounts of data required to train and operate AI models.

  • Model Layer: Contains the AI algorithms and models. This is where the core "intelligence" resides, often implemented using frameworks like TensorFlow or PyTorch.

  • Inference Layer: Manages the process of using trained models to make predictions or decisions on new data.

  • Application Layer: Integrates AI capabilities into user-facing applications or business processes.

  • Monitoring and Feedback Layer: Tracks the performance of AI models and collects feedback for continuous improvement.

This architecture is not dissimilar to traditional software systems, employing principles such as separation of concerns, abstraction, and modularity. However, the implementation details and specific challenges within each AI layer are adapted to the probabilistic nature of the problems they address.

The Engineering Dimension

Understanding AI requires looking beyond the hype and recognizing it as a complex field rooted in software engineering and computer science. While AI systems can exhibit human-like behaviour, it's crucial to distinguish this from human-like intelligence. By focusing on the underlying software architecture and engineering principles, we can better appreciate the reality of AI and its practical applications in today's digital landscape.