Samuel Edusa MD

< Back to list of posts

Unraveling AI Lingo: No-Blush Guide to the Terms You've Been Secretly Curious About (Part 1)

Robot Teacher Robot teaching students (created using Stable Diffusion)

Artificial intelligence (AI) may seem like sorcery, but it's not. Grasping some essential concepts and terminology can enhance our comprehension and utilization of AI in our day to day conversations.

AI Hierarchy Diagram A simplified AI hierarchy diagram (created using Pixelmator Pro)

What is Artificial Intelligence?

Doctor analyzing an x-ray Radiologist using AI to help review x-ray (created using Stable Diffusion)

Artificial intelligence (AI) refers to the replication of human cognitive abilities in computer systems. AI allows machines to analyze situations and execute actions or generate predictions that optimize the chances of reaching a specific goal. For instance, AI can be applied in medical diagnosis, such as the detection of diseases through medical imaging. A computer is programmed to identify patterns in images, like X-rays or MRIs, with the aim of accurately diagnosing a patient's condition. The AI algorithm enables the computer to discern subtle anomalies in the images, determine if the irregularities are indicative of a specific illness, and then provide a diagnostic suggestion to the medical professional for further evaluation and treatment. While the terms AI and machine learning are frequently used interchangeably, they are not entirely synonymous. Machine learning is the driving force behind many AI advancements, but AI can exist without machine learning.

What is an algorithm?

An algorithm is a series of systematic instructions aimed at accomplishing a specific objective, such as diagnosing a medical condition from a patient's symptoms or predicting the effectiveness of a treatment. Algorithms form the basis of AI (and computers in general), and can be utilized to resolve issues, discern patterns, and automate tasks in the medical field. At the moment, the most prevalent techniques and algorithms for implementing AI in medicine involve machine learning approaches.

What is Machine Learning (ML)?

Machine learning Illustration of a machine [robot] learning (created using Stable Diffusion)

A machine learning model comprises a collection of data and methods that facilitate deriving outcomes from given input data. For instance, a diagnostic model in medicine might utilize data from patient symptoms and lab results to predict the likelihood of a specific disease. The model serves as a blueprint of the procedure through which input data is processed to generate output. Taking a pharmaceutical production model as an example, raw materials would be the input, and the final medication would be the output. The model would encompass the necessary steps to be executed on the inputs (measure, mix, compress, coat) along with parameters (explanation to follow) for each step (e.g., compress at 1000 psi for 5 minutes). The primary distinction between machine learning and other AI approaches lies in the fact that machine learning models are not directly programmed by humans. Instead, humans establish the process, provide training data (explanation to follow), and train the model (definition to follow) so that it can accomplish its intended task. When a model, such as Stable Diffusion or GPT3, is released, it represents the product resulting from the application of machine learning algorithms on training data. The model embodies the rules, values, and frameworks needed to process inputs and generate outputs.

What is training data?

Training data consists of numerous pairs of elements. Each training data element contains two components:

  • Input
  • Anticipated output

For instance, a collection of training data for medical images could comprise numerous images, each labeled with the corresponding diagnosis. To develop a model capable of identifying lung cancer in chest x-ray images, we would assemble a set of training data containing images of both cancerous and non-cancerous lungs. The model would then be trained (I explain this below) using this training data.

What is training in machine learning?

Training refers to the procedure of inputting labeled data into an algorithm, obtaining the output, and then guiding the model on how well its output aligns with the expected or desired outcome. This process is repeated continuously, with the computer performing calculations to determine how to modify internal settings or values. These settings or internal values are known as weights or parameters (explained below). The computer adjusts parameters in an attempt to get as close as possible to a specific goal.

Machines training Illustration of one robot training another robot (created using Stable Diffusion)

Suppose our objective is to accurately identify 99% of pneumonia cases in chest x-ray images. We configure our pneumonia detection model and then run all our training data through it. The model predicts which images represent pneumonia cases and which do not. We employ a mathematical function to evaluate the model's performance. A straightforward example is the number of correctly identified pneumonia cases divided by the total number of pneumonia images. Assume it correctly identified 50% of the pneumonia cases. The model then performs numerous calculations to determine how to tweak the parameters to enhance that result and trains again, processing all the training data through the model, attempting to identify pneumonia cases, and using the same mathematical function to assess its performance. Let's say it now correctly identifies 60% of the pneumonia cases. It has improved! Most importantly, no human was explicitly programming it to get better. The machine made adjustments and improved without direct human intervention. The machine learns to fine-tune the parameters of its model to become increasingly proficient at detecting pneumonia cases. When the model achieves 99% accuracy, it is considered trained, meaning it consists of various parameters that are integrated into numerous algorithms. We can input our data (an X-ray image) into these algorithms, and the output will indicate whether the image shows pneumonia, with a 99% accuracy rate.

What is a parameter?

Parameters, also known as weights and biases, represent the internal values within a machine learning model or neural network (this is explained below) that can be adjusted to modify the model's behavior. Think of a model as a medical device. Parameters are akin to the device's controls, which are fine-tuned to accomplish a particular function, such as accurately monitoring vital signs. Parameters are not established by the model's developer; instead, these values are automatically determined or learned through the training procedure.

What is a neural network?

Many distinct machine learning training techniques exist, with Neural Networks being a prevalent choice. Neural networks derive their name and architecture from the human brain, imitating the manner in which biological neurons communicate. A neural network consists of several layers, including an input layer, one or more hidden layers, and an output layer. Each artificial neuron, or node, connects to every neuron in the subsequent layer and has an associated weight/parameter and threshold/bias.

Neural network An artistic illustration of a neural network (created using Stable Diffusion)

The parameters stored in the neurons are altered during the training process to improve performance on a specific task. If the output of a single neuron exceeds a predetermined value, the neuron is activated, transmitting data to the following layer in the network. If not, no data is forwarded to the next layer. The neurons in the subsequent layer compute the weighted sum of input values and provide it as input to a mathematical function known as the activation function. If the resulting number surpasses a certain value, the data is passed on once more. Incorporating layers of neurons allows neural networks to incorporate more parameters into the model, which permits the model to fit more intricate functions and accomplish more interesting tasks.

What is deep learning?

Deep learning refers to artificial intelligence methods which rely on so-called 'deep' neural nets -- multi-layered systems inspired by how our brains process information. These nets can detect complex underlying patterns in the massive amounts of data they consume during training to make precise forecasts or automate various functions, making them an essential component of contemporary AI innovations.

What is a generative model?

A generative model refers to a computational framework that creates novel data by learning from a set of pre-existing training data. This model is frequently employed to produce new images or videos using a collection of training data. Various generative models exist, such as Generative Adversarial Networks (GAN), Variational Autoencoders (VAE), Flow-based models, and Diffusion models. Recently, Diffusion models have gained significant attention and popularity. To illustrate this concept, consider a medical example: using a diffusion model, researchers can generate realistic 3D models of human organs based on existing medical images.

Human heart Realistic 3D model of a human heart (created using Stable Diffusion)

This enables better visualization and understanding of complex anatomical structures, which can aid in surgical planning and medical education.

What is a diffusion model?

Diffusion Models represent a specific category within generative models. The functioning of Diffusion Models involves corrupting the training data by introducing Gaussian noise, followed by learning to restore the original data by reversing the noise application process. Once trained, Diffusion Models can generate novel data by inputting random noise and a fresh description of the desired outcome into the model.

Diffusion model illustration Explaining how diffusion models work (Source: https://www.leewayhertz.com/how-to-train-a-diffusion-model/)

An example of diffusion models are text-to-image models. In a medical context, a text-to-image diffusion model could be utilized to generate accurate images of anatomical structures based on textual descriptions, such as "human heart with an enlarged left ventricle." This can assist medical professionals in visualizing various conditions and enhance their understanding for diagnosis and treatment purposes.

If you want to gain a greater understanding of diffusion models (with lots of math) checkout this link: diffusion model clearly explained

What is GPT3?

Reviewing our understanding of GPT3:

  • GPT3 is an AI, imitating human behavior to achieve specific objectives.
  • GPT3 is a generative model, producing new text based on its training data.
  • GPT3 employs a deep learning model, utilizing multilayered neural networks.
  • GPT3 can generate text for various contexts, even those it hasn't been trained for, enabling it to create content for specific purposes without needing extensive labeled training data or parameter adjustments for a particular task.

GPT3's impressive capabilities:

  • Instead of being a single-task model, GPT3 is trained for a vast range of tasks, allowing it to generate text for multiple scenarios without retraining.
  • Researchers can use GPT3 for different purposes, such as writing blog posts or poems, without needing separate models for each task.

What is Stable Diffusion?

The description given by Wikipedia is:

‘Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt.’

  • Stable Diffusion is an AI system that simulates human intelligence to accomplish tasks, specifically converting text prompts into visually appealing images.

  • Instead of explicit programming, Stable Diffusion employs machine learning techniques, allowing the computer to learn from vast amounts of training data and develop its own programming.

  • The AI utilizes a deep neural network (with more than two layers), consisting of interconnected nodes that perform mathematical operations on inputs and generate outputs for subsequent layers of nodes.

  • As a generative model, Stable Diffusion incorporates data sets and procedures to produce new outputs based on given inputs. It uses algorithms and data to process text prompts and generate new images.

  • Stable Diffusion functions as a diffusion model by adding and subtracting noise to create images.

Now that you're armed with an understanding of these terms go wow your friends 😀.



References

  • A crash course in AI terms - https://mythicalai.substack.com/p/a-crash-course-in-ai-terms-machine
  • Diffusion model clearly explained - https://medium.com/@steinsfu/diffusion-model-clearly-explained-cd331bd41166