Artificial Intelligence: An Engineer's Perspective
Design Trends and the Transformation of Everything
Read the full Design Trends eZine:
By M. Tim Jones for Mouser Electronics
Artificial Intelligence at a Glance
Artificial intelligence (AI) is one of the hottest technology topics around right now because of how rapidly it is becoming an essential part of applications and devices we interact with every day. It’s also an area of great interest for engineers, not only because of advances in AI and machine learning (ML) capabilities but also because of a growing trend in designing devices optimized for AI capabilities and function. Designing an AI solution, and especially a device that’s optimized to operate with AI capabilities, requires rethinking physical elements such as human interfaces and the hardware platform. It also requires engineering the data science and algorithmic aspects of the solution that ultimately make it “intelligent.” With all the interest in and wild claims about AI, this article takes a sober look at where the technology is, what’s involved in building an AI solution, and resources that can help you learn more.
Key Facts
- In 1958, the first implementation of a neural network was developed in software for the IBM 704. It was next implemented as a pure hardware design, with the neural network weights implemented as potentiometers.
- IDC predicts that by 2019, 100 percent of all functional Internet of Things solutions will be supported by AI capabilities.
- According to Forrester, 9 percent of all new jobs created by 2025 will be the result of technologies such as AI, ML, and automation.
- Analysts expect significant advances in AI in 2019, particularly in terms of natural language processing (NLP), AI-optimized devices, and AI-optimized silicon chips.
Artificial intelligence (AI) is an old idea rooted in the goal of building intelligent, conscious machines. Today’s AI systems contain many elements, but one of its key definitions is an embedded set of capabilities that enables a device that would otherwise require human-level intelligence to function independently. AI is inspired by human cognitive processes, but it’s difficult to compare the two. One of the first AI models was the neural network, initially called a perceptron—a simple network with a single layer of neurons that implemented a binary classifier to solve simple classification problems. Multilayer networks soon followed that could solve more complex problems. Fast-forward to today, and we have deep learning systems built from many layers of diverse neural network types, solving problems that seemed insurmountable a decade ago. Nature also provides inspiration for AI systems. Researchers have discovered optimization techniques by analyzing heating and controlled cooling in metallurgy (simulated annealing), Darwin’s theory of evolution (evolutionary algorithms), and the way ants build paths through their environment (swarm intelligence). While we may not be constructing algorithms that mirror human cognitive processes, we’ve built models for distributed processing that are both capable and evolve over time. Early AI focused on symbolic approaches to intelligence, but modern AI emphasizes machine learning (ML) and deep learning. ML uses statistical methods to give machines the ability to learn and adapt. Deep learning is a subset of ML that uses neural network architectures, which evolve far beyond multilayer networks into large numbers of specialized layers and new structures. Deep learning solves more complex problems, such as image processing and recognition. Most industries today are benefiting from advances in AI. From the financial sector to insurance, medicine, security, and beyond, AI helps predict trends, classify risks, and protects us in our physical and virtual lives. Deep learning has emerged as the new platform for AI applications used in self-driving cars, detection of cancer from images, language translation, face detection and recognition, voice-based Q&A, and many forecasting and prediction solutions.
Developing AI Solutions
One key question for solution designers is when to apply AI. AI solutions often work best for repetitive tasks that involve a lot of data, but a range of application scenarios exists that is as diverse as the problems being solved. In most cases, the solution is made up of software and firmware, with hardware assists and accelerators such as graphics processing units (GPUs). It’s possible to implement simple prediction algorithms by using neural network or clustering algorithms in microcontrollers. At the high end, a real-time facial-recognition system can reside in a cluster of enterprise class compute and storage nodes.
Mouser Manufacturers Leading the Way
- On November 14, Intel introduced the Intel Neural Compute Stick 2 (Intel NCS 2), which is designed to build smarter AI algorithms and computer vision prototypes at the network edge. Based on the Intel Movidius Myriad X vision processing unit and supported by the Intel Distribution of the OpenVINO toolkit, the Intel NCS 2 affordably speeds the development of deep neural network (DNN) inference applications.
- NXP Semiconductors has released EdgeScale, a suite of cloud-based tools and services for secure manufacturing and enrollment of IoT and edge computing devices. The solution provides a secure mechanism for developers to use popular cloud-computing frameworks in their applications and to remotely deploy and manage an unlimited number of edge devices.
- On September 12, 2018, Panasonic announced that it has partnered with Caspar to develop an AI smart home system.
A key job of the design engineer is to ensure that the hardware platform supports today’s requirements, with the flexibility to scale up to tomorrow’s applications. This platform work includes computing capabilities (involving processor speed and the right instruction sets), with memory and storage bandwidths to ensure that the processors are never starved of data. Engineers also need to recognize that AI systems are not magic solutions for every problem: AI systems have characteristics that, in some cases, may be problematic. For example:
- Although deep learning can outperform dermatologists in identifying skin cancer from images, the algorithm cannot explain why it came to its conclusion. Radiologists can offer evidence for why they believe a spot is cancerous or benign. Deep learning simply offers an answer with a degree of probability.
- ML algorithms typically focus on singular tasks and are unable to generalize their knowledge into other areas. Humans learn, and then apply that knowledge more broadly; ML is locked into its problem domain.
- In many cases, industries lack knowledge of where they can apply AI and ML. Design engineers with knowledge of AI algorithms, methods, and domains in their particular field will unlock new applications for deep learning and other ML approaches.
Implementing AI
Another design consideration is that AI systems must be trained. Training an AI model is a function of the algorithm and data set involved. A useful model relies on a diverse pool of data in the given problem domain: It involves collecting data (often aggregated from multiple sources) and then cleansing, normalizing, and optimizing it. Data science and data set management are key functions for training AI models.
A simple clustering algorithm or neural network can take minutes to train on a desktop computer, but it might take a deep learning network hours or weeks in a complex data set on a large cluster of servers. Part of the training includes a validation of the AI model. Training is first done with a training data set, and then validation tests use a portion of data, which the algorithm hasn’t seen, to determine the model’s accuracy. Testing a deployed model is crucial to ensuring that the model will remain accurate over its lifetime.
Once in production, inputs (involving audio, video, gestures, text, and other data) are presented to the model to generate an output (representing an identification, classification, prediction, control, etc.). Commonly, training and deployments are independent of one another, as a model is first trained then deployed to a population of devices. Once deployed, the model is static and doesn’t change on the device unless updates occur.
Federated learning is a new method for large populations of devices. In this approach, an AI model is delivered and refined at the target device (learning locally). The model’s refinements are sent to a centralized server where they average with refinements from other devices to update the model. The newly refined model then returns to the remote devices.
Looking Ahead
Given the growing popularity of approaches like deep learning, many changes are occurring in the engineering ecosystem. New processors with tailored instructions are accelerating the math behind neural networks and deep learning. Software frameworks are helping to train and deploy AI applications in the field. Existing products like GPUs are also evolving to help optimize deep learning flows. Deep learning algorithms themselves are also undergoing change. ML researchers are finding ways to shrink deep learning implementations to execute them on systems with fewer resources or lower latencies. SqueezeNet is one such implementation: Requiring five percent of the resources of competing approaches for certain problems.
Numerous skills are critical in designing and implementing AI solutions, including:
- Data science, which involves understanding not only algorithms but also end-to-end data flow, from gathering, cleansing, and training to validating an AI model
- Tools that are useful for prototyping, such as the R Language, and frameworks for AI model development and deployment, such as TensorFlow
- Python, with its massive library of AI modules, and C (the lingua franca of embedded developments), which are key building blocks
- Design engineers who understand the software/firmware and interactions with hardware that are a key part of the equation
These tools and environments provide useful resources and, combined with research from larger companies that are pushing the boundaries of ML (e.g., Google, Facebook, Microsoft, Apple), will help you get up to speed on AI and ML.
M. Tim Jones is a veteran embedded firmware architect with over 30 years of architecture and development experience. Mr. Jones is also the author of several books and many articles across the spectrum of software and firmware development. His engineering background ranges from the development of kernels for geosynchronous spacecraft to embedded systems architecture and protocol development.