Mastercard launches Shopping Muse, an AI-powered shopping assistant

Mastercard launches Shopping Muse, an AI-powered shopping assistant Aisha Malik 9 hours

Mastercard is launching a new generative AI shopping tool called “Shopping Muse” that is designed to help users get personalized product recommendations. The tool is powered by Dynamic Yield, a personalization company that was acquired by Mastercard in April 2022. Mastercard says the idea behind Shopping Muse is to “revolutionize how customers search for and discover products in a retailer’s digital catalogue.”

The tool can take users’ colloquial language and turn it into tailored product recommendations. Shopping Muse is able to understand modern trends and phrases like “cottagecore” or “beach formal.” You can ask the tool questions like “What should I wear for a summer wedding?” or “Can you recommend pieces for a minimalist capsule wardrobe?”

In order to provide personalized recommendations, Shopping Muse looks at the context of the user’s shopping experience, the direct question(s) it is being asked and the content of the conversation. The algorithms use data from the retailer’s product catalog, along with the shopper’s on-site behavior, such as clicking certain products and adding products to carts. The algorithms also look at real-time and known preferences the consumer demonstrates.

If a user is logged-in, the algorithms may consider their past purchase and browsing history with that retailer, including any purchases made in-person that they connected to their account by providing the cashier their phone number or email, for example.

Image Credits: Mastercard

In addition to being able to help users search by phrase, Shopping Muse can also recommend items even when the user can’t find the words to describe what they’re looking for. Mastercard explains that “using integrated advanced image recognition tools, retailers can recommend relevant products based on visual similarities to others, even if they lack the right technical tags.”

Although fashion is the first use case for Mastercard’s new tool, the company says this technology could extend into other categories, like furniture and grocery.

“Personalization gives people the shopping experiences they want, and AI-driven innovation is the key to unlocking immersive and tailored online shopping,” said Ori Bauer, the CEO of Dynamic Yield by Mastercard, in a statement. “By harnessing the power of generative AI in Shopping Muse, we’re meeting the consumer’s standards and making shopping smarter and more seamless than ever.”

Mastercard says that retailers must adapt to changing demands by embracing technology, noting that more than one in four retailers already use generative AI solutions, while another 13% plan to adopt them in the next year.

The new tool is one of many generative AI shopping tools released in the past year. For instance, Google now lets users receive AI-generated gift recommendations on Search, while Microsoft’s Bing can automatically generate buying guides when you use a query like “college supplies.” We’ll likely see more similar tools in the future, as Gartner recently released a report that predicts that 80% of customer service and support organizations will be applying generative AI technology in some form by 2025.

Taming generative AI for enterprise-grade automation

An interview podcast with Dave Duggal, founder of EnterpriseWeb

technology-5917370_1280-1024×1024

In 2009, as the Cloud was starting to emerge, Dave Duggal founded EnterpriseWeb to address the challenges of an increasingly fragmented enterprise IT estate. He saw that siloed software stacks were becoming roadblocks to end-to-end interoperability, automation and management. Duggal recognized the need for an abstraction layer that provides “shared understanding” across business silos, partner ecosystems and clouds to enable a composable and agile enterprise.

The implication here is that meaningful interoperation across heterogeneous distributed systems has been rare and difficult to achieve at enterprise scale. Still is, in fact.

Duggal spent years independently researching the subject, reading hundreds of academic papers and working with his chief architect to design a system that made sense from the point of view of abstracting and managing the stack scalably in an automated fashion via a high-level graph model of an organization and its systems environments (i.e., an ontology of concepts, types and policies).

“As a business person, I wanted to look down on the organization and see all the elements that are constructing it: the people, information sources and capabilities so I can flexibly connect them for a variety of use-cases and manage my business,” Duggal said.

14 years later, Duggal and company have yet another telecom industry innovation award to add to those on his shelf: EnterpriseWeb (EWEB) recently won Light Reading’s 2023 Leading Lights “Outstanding AI/ML Use Case” award for its groundbreaking work on enterprise-grade generative AI for intelligent service orchestration.

Duggal gave an example of how its platform leverages generative AI as a conversational interface, while EnterpriseWeb’s ontology provides the domain knowledge to ground the interaction for safe, contextual, deterministic automation.

A telco enterprise customer can make a high-level verbal request, “I want a secure 5G gateway, configured this way, deployed in this cloud or on this edge node, and I want it to meet these SLAs.” without having to care about the technical details. EWEB’s ontology abstracts the complexity and the platform’s runtime fulfills and assures the service. EWEB is the backend. It leverages the ontology to interpret the customer requests, automate decision making and optimize system responses.

In this example, the platform generates a telco-grade service topology, which is a graph of the relevant service elements. The platform presents it to the customer and asks, “is that what you wanted?” The customer can then modify it to their liking – again, verbally, with no code – and EWEB updates the topology accordingly.

Once the customer is happy they can direct EWEB to deploy and manage the service per their SLAs so it is self-scaling, healing and optimizing. All the inherent complexity is abstracted and automated away so the customer can focus on their business needs without worrying about technical details. The demo can be viewed online.

In EWEB’s approach, processing is shifted to EWEB as the backend. EnterpriseWeb leverages the strengths of generative AI as a natural language interface, while mitigating generative AI’s known weaknesses (accuracy, consistency, security, latency, cost, resource and energy consumption). It’s a practical approach that enables organizations to rapidly operationalize generative AI, without compromising on their mission-critical automation systems.

EnterpriseWeb’s ontology is implemented as a hypergraph, which runs in memory, and is persisted in a key-value database. The design is lightweight (the platform is only 50mb) and provides low-latency and high-performance. The cloud-native, event-driven platform deploys as a cluster of pods and can run on-premise, in the cloud, at the edge or on a laptop.

Hope you find the interview as illuminating as I have.

Interview podcast with Dave Duggal, founder of EnterpriseWeb

StyleTTS 2: Human-Level Text-to-Speech with Large Speech Language Models

Owing to an increase in natural and synthetic speech synthesis approaches, one of the major achievements the AI industry has achieved in the past few years is to effectively synthesize text-to-speech frameworks with potential applications across different industries including audiobooks, virtual assistants, voice-over narrations and more, with some state of the art modes delivering human-level performance and efficiency across a wide array of speech-related tasks. However, despite their strong performance, there is still room for improvement for tasks thanks to expressive & diverse speech, requirement for a large amount of training data for optimizing zero-shot text to speech frameworks, and robustness for OOD or Out of Distribution texts leading developers to work on a more robust and accessible text to speech framework.

In this article, we will be talking about StyleTTS-2, a robust and innovative text to speech framework that is built on the foundations of the StyleTTS framework, and aims to present the next step towards state of the art text to speech systems. The StyleTTS2 framework models speech styles as latent random variables, and uses a probabilistic diffusion model to sample these speech styles or random variables thus allowing the StyleTTS2 framework to synthesize realistic speech effectively without using reference audio inputs. Owing to the approach, the StyleTTS2 framework is able to deliver better results & shows high efficiency when compared to current state of the art text to speech frameworks, but is also able to take advantage of the diverse speech synthesis offered by diffusion model frameworks. We will be discussing the StyleTTS2 framework in greater detail, and talk about its architecture and methodology while also having a look at the results achieved by the framework. So let’s get started.

StyleTTS2 for Text to Speech Synthesis: An Introduction

StyleTTS2 is an innovative Text to Speech synthesis model that takes the next step towards building human-level TTS frameworks, and it is built upon StyleTTS, a style-based text to speech generative model. The StyleTTS2 framework models speech styles as latent random variables, and uses a probabilistic diffusion model to sample these speech styles or random variables thus allowing the StyleTTS2 framework to synthesize realistic speech effectively without using reference audio inputs. Modeling styles as latent random variables is what separates the StyleTTS2 framework from its predecessor, the StyleTTS framework, and aims to generate the most suitable speech style for the input text without needing a reference audio input, and is able to achieve effective latent diffusions while taking advantage of the diverse speech synthesis capabilities offered by diffusion models. Additionally, the StyleTTS2 framework also employs pre-trained large SLM or Speech Language Model as discriminators like the WavLM framework, and couples it with its own novel differential duration modeling approach to train the framework end to end, and ultimately generating speech with enhanced naturalness. Thanks to the approach it follows, the StyleTTS2 framework outperforms current state of the art frameworks for speech generation tasks, and is one of the most efficient frameworks for pre-training large-scale speech models in zero-shot setting for speaker adaptation tasks.

Moving along, to deliver human-level text to speech synthesis, the StyleTTs2 framework incorporates the learnings from existing works including diffusion models for speech synthesis, and large speech language models. Diffusion models are usually used for speech synthesis tasks thanks to their abilities to fine-grain speech control, and diverse speech sampling capabilities. However, diffusion models are not as efficient as GAN-based non-iterative frameworks and a major reason for this is the requirement to sample latent representations, waveforms, and mel-spectrograms iteratively to the target duration of the speech.

On the other hand, recent works around Large Speech Language Models have indicated their ability to enhance the quality of text to speech generation tasks, and adapt well to the speaker. Large Speech Language Models typically convert text input either into quantized or continuous representations derived from pre-trained speech language frameworks for speech reconstructing tasks. However, the features of these Speech Language Models are not optimized for speech synthesis directly. In contrast, the StyleTTS2 framework takes advantage of the knowledge gained by large SLM frameworks using adversarial training to synthesize speech language models’ features without using latent space maps, and therefore, learning a speech synthesis optimized latent space directly.

StyleTTS2: Architecture and Methodology

At its core, the StyleTTS2 is built on its predecessor, the StyleTTS framework which is a non-autoregressive text to speech framework that makes use of a style encoder to derive a style vector from the reference audio, thus allowing expressive and natural speech generation. The style vector used in the StyleTTS framework is incorporated directly into the encoder, duration, and predictors by making use of AdaIN or Adaptive Instance Normalization, thus allowing the StyleTTS model to generate speech outputs with varying prosody, duration, and even emotions. The StyleTTS framework consists of 8 models in total that are divided into three categories

  1. Acoustic Models or Speech Generation System with a style encoder, a text encoder, and a speech decoder.
  2. A Text to Speech Prediction System making use of prosody and duration predictors.
  3. A Utility System including a text aligner, a pitch extractor, and a discriminator for training purposes.

Thanks to its approach, the StyleTTS framework delivers state of the art performance related to controllable and diverse speech synthesis. However, this performance has its drawbacks like degradation of sample quality, expressive limitations, and reliance on speech-hindering applications in real-time.

Improving upon the StyleTTS framework, the StyleTTS2 model results in enhanced expressive text to speech tasks with an improved out of distribution performance, and a high human-level quality. The StyleTTS2 framework makes use of an end to end training process that optimizes the different components with adversarial training, and direct waveform synthesis jointly. Unlike the StyleTTS framework, the StyleTTS2 framework models the speech style as a latent variable, and samples it via diffusion models thus generating diverse speech samples without using a reference audio. Let’s have a detailed look into these components.

End to End Training for Interference

In the StyleTTS2 framework, an end to end training approach is utilized to optimize various text to speech components for interference without having to rely on fixed components. The StyleTTS2 framework achieves this by modifying the decoder to generate the waveform directly from the style vector, pitch & energy curves, and aligned representations. The framework then removes the last projection layer of the decoder, and replaces it with a waveform decoder. The StyleTTS2 framework makes use of two encoders: HifiGAN-based decoder to generate the waveform directly, and an iSTFT-based decoder to produce phase & magnitude that are converted into waveforms for faster interference & training.

The above figure represents the acoustic models used for pre-training and joint training. To reduce the training time, the modules are first optimized in the pre-training phase followed by the optimization of all the components minus the pitch extractor during joint training. The reason why joint training does not optimize the pitch extractor is because it is used to provide the ground truth for pitch curves.

The above figure represents the Speech Language Model adversarial training and interference with the WavLM framework pre-trained but not pre-tuned. The process differs from the one mentioned above as it can take varying input texts but accumulates the gradients to update the parameters in each batch.

Style Diffusion

The StyleTTS2 framework aims to model speech as a conditional distribution through a latent variable that follows the conditional distribution, and this variable is called the generalized speech style, and represents any characteristic in the speech sample beyond the scope of any phonetic content including lexical stress, prosody, speaking rate, and even formant transitions.

Speech Language Model Discriminators

Speech Language Models are renowned for their general abilities to encode valuable information on a wide range of semantics and acoustic aspects, and SLM representations have traditionally been able to mimic human perceptions to evaluate the quality of the generated synthesized speech. The StyleTTS2 framework uses an adversarial training approach to utilize the ability of SLM encoders to perform generative tasks, and employs a 12-layer WavLM framework as the discriminator. This approach allows the framework to enable training on OOD or Out Of Distribution texts that can help improve performance. Furthermore, to prevent overfitting issues, the framework samples OOD texts and in-distribution with equal probability.

Differentiable Duration Modeling

Traditionally, a duration predictor is used in text to speech frameworks that produces phoneme durations, but the upsampling methods these duration predictors use often block the gradient flow during the E2E training process, and the NaturalSpeech framework employs an attention-based upsampler for human-level text to speech conversion. However, the StyleTTS2 framework finds this approach to be unstable during adversarial training because the StyleTTS2 trains using differentiable upsampling with different adversarial training without the loss of extra terms due to mismatch in the length due to deviations. Although using a soft dynamic time warping approach can help in mitigating this mismatch, using it is not only computationally expensive, but its stability is also a concern when working with adversarial objectives or mel-reconstruction tasks. Therefore, to achieve human-level performance with adversarial training and stabilize the training process, the StyleTTC2 framework uses a non-parametric upsampling approach. Gaussian upsampling is a popular nonparametric upsampling approach for converting the predicted durations although it has its limitations thanks to the fixed length of the Gaussian kernels predetermined. This restriction for Gaussian upsampling limits its ability to accurately model alignments with different lengths.

To encounter this limitation, the StyleTTC2 framework proposes to use a new nonparametric upsampling approach without any additional training, and capable of accounting varying lengths of the alignments. For each phoneme, the StyleTTC2 framework models the alignment as a random variable, and indicates the index of the speech frame with which the phoneme aligns with.

Model Training and Evaluation

The StyleTTC2 framework is trained and experimented on three datasets: VCTK, LibriTTS, and LJSpeech. The single-speaker component of the StyleTTS2 framework is trained using the LJSpeech dataset that contains roughly 13,000+ audio samples split into 12,500 training samples, 100 validation samples, and nearly 500 testing samples, with their combined run time totalling to nearly 24 hours. The multi speaker component of the framework is trained on the VCTK dataset consisting of over 44,000 audio clips with over 100 individual native speakers with varying accents, and is split into 43,500 training samples, 100 validation samples, and nearly 500 testing samples. Finally, to equip the framework with zero-shot adaptation capabilities, the framework is trained on the combined LibriTTS dataset that consists of audio clips totaling to about 250 hours of audio with over 1,150 individual speakers. To evaluate its performance, the model employs two metrics: MOS-N or Mean Opinion Score of Naturalness, and MOS-S or Mean Opinion Score of Similarity.

Results

The approach and methodology used in the StyleTTS2 framework is showcased in its performance as the model outperforms several state of the art TTS frameworks especially on the NaturalSpeech dataset, and enroute, setting a new standard for the dataset. Furthermore, the StyleTTS2 framework outperforms the state of the art VITS framework on the VCTK dataset, and the results are demonstrated in the following figure.

The StyleTTS2 model also outperforms previous models on the LJSpeech dataset, and it does not display any degree of quality degradation on OOD or Out of Distribution texts as displayed by prior frameworks on the same metrics. Furthermore, in zero-shot setting, the StyleTTC2 model outperforms the existing Vall-E framework in naturalness although it falls behind in terms of similarity. However, it is worth noting that the StyleTTS2 framework is able to achieve competitive performance despite training only on 245 hours of audio samples when compared to over 60k hours of training for the Vall-E framework, thus proving StyleTTC2 to be a data-efficient alternative to existing large pre-training methods as used in the Vall-E.

Moving along, owing to the lack of emotion labeled audio text data, the StyleTTC2 framework uses the GPT-4 model to generate over 500 instances across different emotions for the visualization of style vectors the framework creates using its diffusion process.

In the first figure, emotional styles in response to input text sentiments are illustrated by the style vectors from the LJSpeech model, and it demonstrates the ability of the StyleTTC2 framework to synthesize expressive speech with varied emotions. The second figure depicts distinct clusters form for each of the five individual speakers thus depicting a wide range of diversity sourced from a single audio file. The final figure demonstrates the loose cluster of emotions from speaker 1, and reveals that, despite some overlaps, emotion-based clusters are prominent, thus indicating the possibility of manipulating the emotional tune of a speaker regardless of the reference audio sample and its input tone. Despite using a diffusion based approach, the StyleTTS2 framework manages to outperform existing state of the art frameworks including VITS, ProDiff, and FastDiff.

Final Thoughts

In this article, we have talked about StyleTTS2, a novel, robust and innovative text to speech framework that is built on the foundations of the StyleTTS framework, and aims to present the next step towards state of the art text to speech systems. The StyleTTS2 framework models speech styles as latent random variables, and uses a probabilistic diffusion model to sample these speech styles or random variables thus allowing the StyleTTS2 framework to synthesize realistic speech effectively without using reference audio inputs.The StyleTTS2 framework uses style diffusion and SLM discriminators to achieve human-level performance on text to speech tasks, and manages to outperform existing state of the art frameworks on a wide array of speech tasks.

Small But Mighty: Small Language Models Breakthroughs in the Era of Dominant Large Language Models

In the ever-evolving domain of Artificial Intelligence (AI), where models like GPT-3 have been dominant for a long time, a silent but groundbreaking shift is taking place. Small Language Models (SLM) are emerging and challenging the prevailing narrative of their larger counterparts. GPT 3 and similar Large Language Models (LLM), such as BERT, famous for its bidirectional context understanding, T-5 with its text-to-text approach, and XLNet, which combines autoregressive and autoencoding models, have all played pivotal roles in transforming the Natural Language Processing (NLP) paradigm. Despite their excellent language abilities these models are expensive due to high energy consumption, considerable memory requirements as well as heavy computational costs.

Lately, a paradigm shift is occurring with the rise of SLMs. These models, characterized by their lightweight neural networks, fewer parameters, and streamlined training data, are questioning the conventional narrative.

Unlike their larger counterparts, SLMs demand less computational power, making them suitable for on-premises and on-device deployments. These models have been scaled down for efficiency, demonstrating that when it comes to language processing, small models can indeed be powerful.

Evolution and Capabilities of Small Language Models

An examination of the capabilities and application of LLMs, such as GPT-3, shows that they have a unique ability to understand context and produce coherent texts. The utility of these tools for content creation, code generation, and language translation makes them essential components in the solution of complex problems.

A new dimension to this narrative has recently emerged with the revelation of GPT 4. GPT-4 pushes the boundaries of language AI with an unbelievable 1.76 trillion parameters in eight models and represents a significant departure from its predecessor, GPT 3. This is setting the stage for a new era of language processing, where larger and more powerful models will continue to be pursued.

While recognizing the capabilities of LLMs, it is crucial to acknowledge the substantial computational resources and energy demands they impose. These models, with their complex architectures and vast parameters, necessitate significant processing power, contributing to environmental concerns due to high energy consumption.

On the other hand, the notion of computational efficiency is redefined by SLMs as opposed to resource-intensive LLMs. They are operating on substantially lower costs, proving their effectiveness. In situations where computational resources are limited and offer opportunities for deployment in different environments, this efficiency is particularly important.

In addition to cost-effectiveness, SLMs excel in rapid inference capabilities. Their streamlined architectures enable fast processing, making them highly suitable for real-time applications that require quick decision-making. This responsiveness positions them as strong competitors in environments where agility is of utmost importance.

The success stories of SLM further strengthen their impact. For example, DistilBERT, a distilled version of BERT, demonstrates the ability to condense knowledge while maintaining performance. Meanwhile, Microsoft's DeBERTa and TinyBERT prove that SLMs can excel in diverse applications, ranging from mathematical reasoning to language understanding. Orca 2, that is recently developed through fine-tuning Meta’s Llama 2, is another unique addition to the SLM family. Likewise, OpenAI's scaled-down versions, GPT-Neo and GPT-J, emphasize that language generation capabilities can advance on a smaller scale, providing sustainable and accessible solutions.

As we witness the growth of SLMs, it becomes evident that they offer more than just reduced computational costs and faster inference times. In fact, they represent a paradigm shift, demonstrating that precision and efficiency can flourish in compact forms. The emergence of these small yet powerful models marks a new era in AI, where the capabilities of SLM shape the narrative.

Applications and Breakthroughs of SLMs

Formally described, SLMs are lightweight Generative AI models that require less computational power and memory compared to LLMs. They can be trained with relatively small datasets, feature simpler architectures that are more explicable, and their small size allows for deployment on mobile devices.

Recent research demonstrates that SLMs can be fine-tuned to achieve competitive or even superior performance in specific tasks compared to LLMs. In particular, optimization techniques, knowledge distillation, and architectural innovations have contributed to the successful utilization of SLMs.

SLMs have applications in various fields, such as chatbots, question-answering systems, and language translation. SLMs are also suitable for edge computing, which involves processing data on devices rather than in the cloud. This is because SLMs require less computational power and memory compared to LLMs, making them more suitable for deployment on mobile devices and other resource-constrained environments.

Likewise, SLMs have been utilized in different industries and projects to enhance performance and efficiency. For instance, in the healthcare sector, SLMs have been implemented to enhance the accuracy of medical diagnosis and treatment recommendations.

Moreover, in the financial industry, SLMs have been applied to detect fraudulent activities and improve risk management. Furthermore, the transportation sector utilizes them to optimize traffic flow and decrease congestion. These are merely a few examples illustrating how SLMs are enhancing performance and efficiency in various industries and projects.

Challenges and on Going Efforts

SLMs come with some potential challenges, including limited context comprehension and a lower number of parameters. These limitations can potentially result in less accurate and nuanced responses compared to larger models. However, ongoing research is being performed to address these challenges. For instance, researchers are exploring techniques to enhance SLM training by utilizing more diverse datasets and incorporating more context into the models.

Other methods include leveraging transfer learning to utilize pre-existing knowledge and fine-tuning models for specific tasks. Additionally, architectural innovations such as transformer networks and attention mechanisms have demonstrated improved performance in SLMs.

In addition, collaborative efforts are currently being performed within the AI community to enhance the effectiveness of small models. For example, the team at Hugging Face has developed a platform called Transformers, which offers a variety of pre-trained SLMs and tools for fine-tuning and deploying these models.

Similarly, Google has created a platform known as TensorFlow, providing a range of resources and tools for the development and deployment of SLMs. These platforms facilitate collaboration and knowledge sharing among researchers and developers, expediting the advancement and implementation of SLMs.

The Bottom Line

In conclusion, SLMs represent a significant advancement in the field of AI. They offer efficiency and versatility, challenging the dominance of LLMs. These models redefine computational norms with their reduced costs and streamlined architectures, proving that size is not the sole determinant of proficiency. Although challenges persist, such as limited context understanding, ongoing research and collaborative efforts are continuously enhancing the performance of SLMs.

Can DALL-E 3 in ChatGPT read and modify images? Come see for yourself

steam-santa.png

I've been exploring the use of DALL-E 3 inside of ChatGPT Plus. I'm doing this because it's my job, not because I have some kind of unhealthy little addiction to describing something in my mind and see it manifest in mere minutes on the screen. I can stop at any time. Sure, that's the ticket, I can stop at any time.

But not today. Today, I found a new toy. DALL-E 3 inside of ChatGPT can read and modify images. Sort of. You see, it's a bit fussy. But I'm getting ahead of myself. Let's start this story at the beginning…

Also: How to get a perfect face swap using Midjourney AI

I've been using Midjourney to customize uploaded images for a while. The problem is that it's very convoluted. You have to be running Midjourney in Discord, and then you have to go through a number of steps to upload an image into Discord, get a URL, yada, yada, yada…

In ChatGPT Plus, you simply have to click on the paperclip icon and upload your image. One and done.

That makes it a lot easier to use, and also a lot more fun. But how well does it work? To test it out, I tried three images: a picture of my car, a picture of me, and the ZDNET logo. Let's look at the results.

My car

Here's a picture of my car, a 2013 Dodge Challenger.

Once the image was uploaded, I instructed DALL-E 3:

Put car in city

The results were promising. DALL-E 3 successfully reproduced a likeness of the car, in a city scene:

Then, because I have a definite steampunk fascination, I asked DALL-E to:

Make it steampunk

Here's what we got. It still retained the overall body style of the Dodge Challenger:

DALL-E keeps breaking

One thing to note is that I couldn't get DALL-E to do too many iterations without failure. Every two or three requests (and never more than four), I got this message:

My workaround was to take the last successfully created image and upload it into a new ChatGPT Plus session, and work from that.

Also: The best AI art generators: DALL-E 2 and fun alternatives to try

Flying car

So, I uploaded the last image, the steampunk version of my car, and told DALL-E to:

Make the car fly

Here's what I got back. The representation of my original car was gone, and we got back a very cool Chitty Chitty Bang Bang-style vehicle, in the air:

It was cool, but it was no longer my car. But that's OK, let's see where we can go.

The Santa Clause

My next attempt, given the season, was to try to put Santa in the driver's seat. Here, I ran into a rather over-zealous guardrail, with ChatGPT telling me, "I'm sorry, but I can't assist with that request."

Yes, we have arrived at that time in the future when an AI says the precise equivalent of, "I'm sorry Dave. I'm afraid I can't do that." Life imitates art.

As you can see, the reasoning was a bit bizarre. But it seemed to hinge on the fact that I was asking it to modify an uploaded picture. So I gave it the above prompts as a single request:

Put car in city. Make it steampunk. Make the car fly. Put Santa in the driver's seat.

I got this:

It was a nice picture, but it missed the whole Victorian aesthetic that the previous images had. There's a fix for that, though.

Also: How to use Bing Image Creator (and why it's better than ever)

DALL-E with ChatGPT essentially rewrites every prompt into a more detailed instruction. So, for example, "Make it steampunk" got rewritten into:

Image of a steampunk-themed street scene with vintage architecture, featuring a classic muscle car modified with steampunk elements like brass pipes, gears, and steam exhausts. The car is parked on a cobblestone street with ambient street lamps and a backdrop of old-fashioned buildings that blend Victorian and industrial revolution influences. There are people dressed in steampunk attire, with goggles and Victorian clothing, walking on the sidewalks. The overall atmosphere is that of a retro-futuristic city from an alternate history where steam power is the primary technology.

So I grabbed portions of the descriptive material from both "make it steampunk" and "make the car fly" and combined them for this prompt:

Put car in city. Make it steampunk. Make the car fly. Put Santa in the driver's seat. Below, the cobblestone streets are lined with gaslight street lamps, and people in Victorian attire look up in amazement. The sky is a dusk orange with a hint of smog and the buzz of smaller steampunk drones and airships in the distance. The overall atmosphere is that of a retro-futuristic city from an alternate history where steam power is the primary technology.

Here's what I got back:

Strictly speaking, it's not a flying car, but it's cool. Unfortunately, there's no connection at all to the original car image I started with.

Stop, Dave. Will you stop, Dave? Stop, Dave.

I had another HAL moment when I asked ChatGPT to put this picture of me in an office setting:

It told me, "I'm sorry, but I can't assist with that request." At least ChatGPT didn't say, "Look Dave, I can see you're really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over."

Also: Thanks to my 5 favorite AI tools, I'm working smarter now

Fine. And now for something completely different.

Leaving on a jet train

Here's the ZDNET logo, which I uploaded to DALL-E:

First, I tried to get it to put it on a jet:

Put this logo on the side of a jumbo jet

At least it got the color right:

Then I tried to get it to put the logo on a building.

Put this logo on the side of a brick building

It remembered green, but not the right green:

So I tried to get DALL-E to move the building onto a model railroad.

Put the building on a model railroad

The result is something resembling a model railroad (although the track in the foreground is likely to cause a derailment).

There is a brick building, but it's not the same brick building, and any pretense of the ZDNET logo is gone. Not even the ZDNET green remains.

Also: Generative AI can easily be made malicious despite guardrails, say scholars

So, of course, I asked it to do this:

Also put the jumbo jet on a model railroad

I got this. I just want to know if those are planes or missiles in the water.

What have we learned?

After tinkering with this DALL-E feature, I think we can conclude the following:

  • You can upload images to DALL-E.
  • You can ask it to modify them, but with mixed results.
  • DALL-E fails a lot.
  • ChatGPT may not be demonstrating Artificial General Intelligence, but it's got abstract expressionism down.
  • Its responses are uncomfortably close to those of the HAL-9000.

And there you go. Have you uploaded images to DALL-E? How has it done for you? Let us know in the comments below.

You can follow my day-to-day project updates on social media. Be sure to subscribe to my weekly update newsletter on Substack, and follow me on Twitter at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

Artificial Intelligence

AssemblyAI lands $50M to build and serve AI speech models

AssemblyAI lands $50M to build and serve AI speech models Kyle Wiggers 9 hours

Companies are betting big on generative AI to gain a competitive edge. But adoption challenges remain. According to a recent survey from EY, a significant portion of businesses looking to embrace generative AI say that the field’s rapid progress — and the surge in vendors claiming to have AI expertise — is complicating their deployment prospects.

You wouldn’t know it from their spending, though. Per an IDC forecast, worldwide investments in “AI-centric” systems could reach $154 billion by the end of the year. And an MIT Tech Review poll found that 50% of firms plan to boost budgets on data infrastructure and AI by over 25% in the coming year.

The boom is benefitting startups like AssemblyAI (which TechCrunch has covered thrice before), a self-styled “applied AI” venture that researches, trains and deploys AI models for developers and product teams to integrate into their apps and services.

AssemblyAI claims that its paying customer base grew 200% from last year to 4,000 brands and that its AI platform is now handling around 25 million API calls per day. Moreover, over 200,000 developers are building on the platform, AssemblyAI says — using it to process more than 10 terabytes of data a day.

“AI models are rapidly improving and evolving,” AssemblyAI co-founder and CEO Dylan Fox told TechCrunch in an email interview. “Enterprises that leverage AssemblyAI’s API platform are able to focus on building new AI products, applications and workflows without having to focus on model development, training and keeping up with the rapid pace of model innovation. Nor do they need to worry about deploying AI models at scale themselves, which is extremely challenging to do for low cost and with high availability.”

AssemblyAI

The AssemblyAI dev platform.

AssemblyAI’s success has caught the attention of big-name investors, some of whom recently contributed to a new funding tranche for the startup. Accel led a $50 million round in AssemblyAI, announced today, with participation from former Salesforce co-CEO Keith Block, GitHub ex-CEO Nat Friedman and Daniel Gross, Insight Partners and Y Combinator. AssemblyAI’s total capital raised now stands at $115 million.

Fox, a machine learning engineer by trade, founded AssemblyAI in late 2017. He says he was inspired by the Amazon Echo, which Fox argues is one of the first great examples of products made possible by better AI systems for voice.

“As I started to explore building my own products with various speech AI models available at the time, I was disappointed that most companies were still offering legacy, inaccurate speech AI models through hard-to-use developer products,” Fox said. “This motivated me to start AssemblyAI — with the vision to create superhuman … AI models, available through an easy-to-use developer platform, that would unlock entirely new classes of AI applications to be built.”

Today, AssemblyAI offers AI models — specifically speech-focused models — designed to perform tasks like speech-to-text, identifying speakers, moderating content and summarizing speech through an API. Customers like Fireflies, a meeting transcription app, run content ranging from phone calls and Zoom meetings to podcasts and videos through the models, Fox says.

Now, there’s no shortage of both open and proprietary speech models out there, from rival startups such as Deepgram, Rev and Speechmatics as well as tech giants like Google Cloud, Azure and AWS. But Fox makes the case — rightly or wrongly — that AssemblyAI’s models are more “advanced,” “accurate,” “capable” and “feature rich” than the competition.

“Big cloud companies have similar product offerings … but they’re infrequently updated, less accurate, come with way fewer features and are much harder to integrate,” he continued.

AssemblyAI isn’t resting on its laurels, that said. A slice of the new funding will be put toward a “universal” speech model that the company’s training on over a petabyte of voice data, set to launch later this year,” Fox says. AssemblyAI is also expanding its headcount, aiming to grow its 115-person workforce by 50% to 75% next year.

“We’re working toward building the ‘Stripe for AI models’ — where developers and product teams will be able to easily access state-of-the-art AI through a simple API,” Fox said. “By providing these things to customers, they can focus on building more vertical applications and internal workflows that leverage our proprietary data and AssemblyAI’s ever-improving speech AI models … We have years of runway thanks to the new funding round, and are seeing an incredible amount of demand and product adoption given the mainstream push around AI.”

Introduction to Multithreading and Multiprocessing in Python

Introduction to Multithreading and Multiprocessing in Python
Image by Author

This tutorial will discuss leveraging Python’s capability to execute multithreading and multiprogramming tasks. They offer a gateway to perform concurrent operations within a single process or across multiple processes. Parallel and concurrent execution increases the speed and efficiency of the systems. After discussing the basics of multithreading and multiprogramming, we will also discuss their practical implementation using Python libraries. Let’s first briefly discuss the benefits of parallel systems.

  1. Improved Performance: With the capability to perform tasks concurrently, we can reduce the execution time and improve the system's overall performance.
  2. Scalability: We can divide a large task into various smaller sub-tasks and assign a separate core or thread to them for their independent execution. It can be helpful in large-scale systems.
  3. Efficient I/O Operations: With the help of concurrency, the CPU doesn’t have to wait for a process to complete its I/O operations. The CPU can immediately start executing the following process until the previous process is busy with its I/O.
  4. Resource Optimization: By dividing the resources, we can prevent a single process from taking up all the resources. This can avoid the problem of Starvation for smaller processes.

Introduction to Multithreading and Multiprocessing in Python
Benefits of Parallel Computing | Image by Author

These are some common reasons for which you require concurrent or parallel executions. Now, move back to the main topics, i.e., Multithreading and Multiprogramming, and discuss their primary differences.

What is Multithreading?

Multithreading is one of the ways to achieve parallelism in a single process and able to execute simultaneous tasks. Multiple threads can be created inside a single process and perform smaller tasks parallel within that process.

The threads present inside a single process share a common memory space, but their stack traces and registers are separate. They are less computationally expensive due to this shared memory.

Introduction to Multithreading and Multiprocessing in Python
Single Threaded & Multi Threaded Env. | Image by GeeksForGeeks

Multithreading is primarily used in performing I/O operations, i.e., if some part of the program is busy in I/O operations, then the remaining program can be responsive. However, in Python’s implementation, multithreading cannot achieve true parallelism due to Global Interpreter Lock (GIL).

In short, GIL is a mutex lock that allows only one thread at a time to interact with the Python bytecode, i.e., even in the multithreaded mode, only one thread can execute the bytecode at a time.

It is done to maintain thread safety in CPython, but this limits the performance benefits of multithreading. To address this issue, python has a separate multiprocessing library, which we will discuss afterward.

What are Daemon Threads?

The threads which constantly run in the background are called the demon threads. Their main job is to support the main thread or the non-daemon threads. The daemon thread does not block the main thread from execution and even keeps running if it has completed its execution.

In Python, the daemon threads are mainly used as a garbage collector. It will destroy all the useless objects and free the memory by default so that the main thread can be used and executed properly.

What is Multiprocessing?

Multiprocessing is used to perform the parallel execution of multiple processes. It helps us achieve true parallelism, as we execute separate processes simultaneously, having their own memory space. It uses separate cores of the CPU and is also helpful in performing inter-process communication to exchange data between multiple processes.

Multiprocessing is more computationally expensive as compared to multithreading, as we are not using a shared memory space. Still, it allows us for independent execution and overcomes Global Interpreter Lock's limitations.

Introduction to Multithreading and Multiprocessing in Python
Multiprocessing Environment | Image by GeeksForGeeks

The above figure demonstrates a multi-processing environment in which a main process creates two separate processes and assigns separate work to them.

Multithreading Implementation

It’s time to implement a basic example of multithreading using Python. Python has an inbuilt module threading used for the multithreading implementation.

  1. Importing Libraries:
import threading  import os
  1. Function to Calculate the Squares:

This is a simple function used to find the square of numbers. A list of numbers is given as input, and it outputs the square of each number of the list along with the name of the thread used and the process ID associated with that thread.

def calculate_squares(numbers):      for num in numbers:          square = num * num          print(              f"Square of the number {num} is {square} | Thread Name {threading.current_thread().name} | PID of the process {os.getpid()}"          )
  1. Main Function:

We have a list of numbers and we will divide that list equally and name them as fisrt_half and second_half respectively. Now we will assign two separate threads t1 and t2 to these lists.

Thread function creates a new thread, which takes a function with a list of arguments to that function. You can also assign a separate name to a thread.

.start() function will start executing these threads and .join() function will block the execution of the main thread until the given thread is not executed completely.

if __name__ == "__main__":      numbers = [1, 2, 3, 4, 5, 6, 7, 8]      half = len(numbers) // 2      first_half = numbers[:half]      second_half = numbers[half:]        t1 = threading.Thread(target=calculate_squares, name="t1", args=(first_half,))      t2 = threading.Thread(target=calculate_squares, name="t2", args=(second_half,))        t1.start()      t2.start()        t1.join()      t2.join()

Output:

Square of the number 1 is 1 | Thread Name t1 | PID of the process 345  Square of the number 2 is 4 | Thread Name t1 | PID of the process 345  Square of the number 5 is 25 | Thread Name t2 | PID of the process 345  Square of the number 3 is 9 | Thread Name t1 | PID of the process 345  Square of the number 6 is 36 | Thread Name t2 | PID of the process 345  Square of the number 4 is 16 | Thread Name t1 | PID of the process 345  Square of the number 7 is 49 | Thread Name t2 | PID of the process 345  Square of the number 8 is 64 | Thread Name t2 | PID of the process 345

Note: All the threads created above are non-daemon threads. To create a daemon thread, you need to write t1.setDaemon(True) to make the thread t1 a daemon thread.

Now, we will understand the output generated by the above code. We can observe that the process ID (i.e., PID) will remain the same for both threads, which means that these two threads are part of the same process.

You can also observe that the output is not generated sequentially. In the first line, you will see the output generated by thread1, then in the 3rd line, the output generated by thread2, then again by thread1 in the fourth line. This clearly signifies that these threads work together concurrently.

Concurrency doesn’t mean these two threads are executed parallelly, as only one thread is executed at a time. It doesn’t reduce the execution time. It takes the same time as sequential execution. CPU starts executing a thread but leaves it midway and moves to another thread, and after some time, comes back to the main thread and starts its execution from the same point it left last time.

Multiprocessing Implementation

I hope you have a basic understanding of multithreading with its implementation and its limitations. Now, it’s time to learn about multiprocessing implementation and how we can overcome those limitations.

We will follow the same example, but instead of creating two separate threads, we will create two independent processes and discuss the observations.

  1. Importing Libraries:
from multiprocessing import Process  import os

We will use the multiprocessing module to create independent processes.

  1. Function to Calculate the Squares:

That function will remain the same. We have just removed the print statement of threading information.

def calculate_squares(numbers):      for num in numbers:          square = num * num          print(              f"Square of the number {num} is {square} | PID of the process {os.getpid()}"          )
  1. Main Function:

There are a few modifications in the main function. We have just created a separate process instead of a thread.

if __name__ == "__main__":      numbers = [1, 2, 3, 4, 5, 6, 7, 8]      half = len(numbers) // 2      first_half = numbers[:half]      second_half = numbers[half:]        p1 = Process(target=calculate_squares, args=(first_half,))      p2 = Process(target=calculate_squares, args=(second_half,))        p1.start()      p2.start()        p1.join()      p2.join()

Output:

Square of the number 1 is 1 | PID of the process 1125  Square of the number 2 is 4 | PID of the process 1125  Square of the number 3 is 9 | PID of the process 1125  Square of the number 4 is 16 | PID of the process 1125  Square of the number 5 is 25 | PID of the process 1126  Square of the number 6 is 36 | PID of the process 1126  Square of the number 7 is 49 | PID of the process 1126  Square of the number 8 is 64 | PID of the process 1126

We have observed that a separate process executes each list. Both have different process IDs. To check whether our processes have been executed parallelly, we need to create a separate environment, which we will discuss below.

Calculating Runtime With and Without Multiprocessing

To check whether we get a true parallelism, we will calculate the algorithm's runtime with and without multiprocessing.

For this, we will require an extensive list of integers that contain more than 10^6 integers. We can generate a list using random library. We will use the time module of Python to calculate the runtime. Below is the implementation for this. The code is self-explanatory, although you can always look at the code comments.

from multiprocessing import Process  import os  import time  import random    def calculate_squares(numbers):      for num in numbers:          square = num * num    if __name__ == "__main__":      numbers = [          random.randrange(1, 50, 1) for i in range(10000000)      ]  # Creating a random list of integers having size 10^7.      half = len(numbers) // 2      first_half = numbers[:half]      second_half = numbers[half:]        # ----------------- Creating Single Process Environment ------------------------#        start_time = time.time()  # Start time without multiprocessing        p1 = Process(          target=calculate_squares, args=(numbers,)      )  # Single process P1 is executing all list      p1.start()      p1.join()        end_time = time.time()  # End time without multiprocessing      print(f"Execution Time Without Multiprocessing: {(end_time-start_time)*10**3}ms")        # ----------------- Creating Multi Process Environment ------------------------#        start_time = time.time()  # Start time with multiprocessing        p2 = Process(target=calculate_squares, args=(first_half,))      p3 = Process(target=calculate_squares, args=(second_half,))        p2.start()      p3.start()        p2.join()      p3.join()        end_time = time.time()  # End time with multiprocessing      print(f"Execution Time With Multiprocessing: {(end_time-start_time)*10**3}ms")

Output:

Execution Time Without Multiprocessing: 619.8039054870605ms  Execution Time With Multiprocessing: 321.70287895202637ms

You can observe that the time with multiprocessing is almost half as compared to without multiprocessing. This shows that these two processes are executed simultaneously at a time and show a behavior of true parallelism.

You can also read this article Sequential vs Concurrent vs Parallelism from Medium, which will help you to understand the basic difference between these Sequential, Concurrent and Parallel processes.

Aryan Garg is a B.Tech. Electrical Engineering student, currently in the final year of his undergrad. His interest lies in the field of Web Development and Machine Learning. He have pursued this interest and am eager to work more in these directions.

More On This Topic

  • Introduction to Clustering in Python with PyCaret
  • Multilabel Classification: An Introduction with Python's Scikit-Learn
  • Introduction to __getitem__: A Magic Method in Python
  • Introduction to Python Libraries for Data Cleaning
  • Introduction to Statistical Learning, Python Edition: Free Book
  • An Introduction to Reinforcement Learning with OpenAI Gym, RLlib,…

How AI-assisted code development can make your IT job more complicated

software developers and IT workers talk at work

Artificial intelligence (AI) is already recognized as a powerful productivity tool for developers, but its potential also goes much deeper and impacts career aspirations. The rise of AI-assisted code development is opening opportunities for technology managers and IT professionals to assume more expansive roles on the business side.

"IT pros can be expected to wear a number of new hats," says Preeti Lobo, practice director for business integration and automation at Apps Associates. People can now pump out code on demand in an abundance of languages, from Java to Python, along with helpful recommendations. Already, 95% of developers in a recent survey from Sourcegraph report they use Copilot, ChatGPT, and other generative AI tools this way.

The rise of these tools raises an interesting question. Despite the potential for vast productivity gains from generative AI tools, will technology professionals' jobs actually grow more complicated in an age of increased automation?

After all, the ability to generate new code automatically means someone somewhere will have to ensure code across the organization meets tight business and governance requirements. Managing all this code will require high levels of cohesion, accountability, and security. And those demands mean new roles and responsibilities for developers.

Also: How to use ChatGPT to write code

For starters, security and quality assurance tasks associated with software jobs aren't going to go away anytime soon. "For programmers and software engineers, ChatGPT and other large language models help create code in almost any language," says Andy Thurai, an analyst with Constellation Research, before talking about security concerns.

"However, most of the code that is generated is security-vulnerable and might not pass enterprise-grade code. So, while AI can help accelerate coding, care should be taken to analyze the code, find vulnerabilities, and fix it, which would take away some of the productivity increase that AI vendors tout about."

Then there's the issue of code sprawl. An analogy to the rollout of generative AI in coding is the introduction of cloud computing, which seemed to simplify application acquisition when on-demand IT first rolled out, and now means there are a tangle of services that need to be managed.

Research already suggests the relative ease of generating code via AI will contribute to an ever-expanding codebase. A majority of the 500 developers in the Sourcegraph survey are concerned about managing all the new code that comes with generative AI, along with dealing with the issue of code sprawl and its contribution to technical debt.

The Sourcegraph survey authors refer to this growth in demands as "Big Code." Even before the rise of generative AI, close to eight in 10 developers said their codebase grew five times over the last three years, and a similar number struggled with understanding existing code that is generated by others.

Also: Why your ChatGPT conversations may not be as secure as you think

Faster delivery of code also brings greater expectations from the business for applications that adapt more readily to changing requirements. "We are evolving toward a modeling-based approach and away from coding based on if-then-else rules," Lobo says.

IT professionals should expect an increased emphasis on design thinking, which will become a bigger part of developers' jobs — and this shift will lead to new responsibilities, too. "Someone working with AI can differentiate their technical capabilities by focusing on softer skills in the areas of design and design thinking," says James Fairweather, chief innovation officer at Pitney Bowes.

"Increasing their capabilities in these areas can help improve a developer's ability to communicate and present data science and artificial intelligence insights. It can also help in the redesign of processes and the way humans interact with technology to maximize the benefit that AI can bring to improving results."

Also: Bard vs. ChatGPT: Can Bard help you code?

Increased use of AI will also mean personalization becomes an important skill for developers. Today's applications "need to be more intuitive and built with the individual user in mind versus a generic experience for all," says Lobo. "Generative AI is already enabling this level of personalization, and most of the coding in the future will be developed by AI."

Despite the rise of generative technology, humans will still be required at key points in the development loop to assure quality and business alignment. "Traditional developers will be relied upon to curate the training data that AI models use and will examine any discrepancies or anomalies," Lobo adds.

Also: I used ChatGPT to write the same routine in 12 top programming languages

Technology managers and professionals will need to assume more expansive roles within the business side to ensure that the increased use of AI-assisted code development serves its purpose. We can expect this focus on business requirements to lead to a growth in responsibility via roles such as "ethical AI trainer, machine language engineer, data scientist, AI strategist and consultant, and quality assurance," says Lobo. Technology professionals will also need to engage in "creating AI strategic roadmaps, as well as identifying anomalies in data structures and results."

On the more technical side, the increased use of generative AI will push natural language processing (NLP) skills front and center, says Lobo. "Professionals should aim to master programming languages like Python, Java, and C++, and learn more about libraries and frameworks such as NumPy, Keras, TensorFlow, Matplotlib, and Seaborn," she says.

"But they should also look to hone strong analytical, problem-solving, and critical-thinking skills, as well as linguistics. Skills such as these can help exponentially in the world of NLP, a foundational factor when working with AI."

Also: Implementing AI into software engineering? Here's everything you need to know

Another additional role that technology professionals are assuming is coaching and supporting more people in developing and deploying their own apps. "In the past, the art of possible was limited because of the technical limitations or by the limitations of the IT departments," says Thurai.

"Now, the sky is the limit. Anyone can figure out a way to improve either the top or bottom line of any business, which can be implemented using AI to improve the business as they imagined in a faster pace than you imagined."

Finally, it's worth noting that generative AI could also assist with the productivity of some technology workers. Thurai says specifically for IT teams based at the maintenance and support end of the software stack, AI likely helps more than complicates.

"AI can also impact incident responders, site reliability engineers, and support personnel," he adds. "In their case, they can use AI to find out any precedence, how it was fixed, whether it can be automated so it won't happen again, and help with automating some of the mundane fixes to avoid constant alerting and wasting many hours in fixing things that are rudimentary. For customer service folks, it can help personalize service for individuals based on their needs, problems they faced, and the impact that was created."

Artificial Intelligence

Generative AI Key Terms Explained

Generative AI Key Terms Explained
Image by Author

In the past few years, and especially since the appearance of ChatGPT just over 12 months ago, generative AI models for creating realistic synthetic text, images, video, and audio have emerged and have been rapidly advancing since. What began as humble research quickly developed into systems with the capacity to generate high-quality, human-like outputs across the various mediums mentioned above. Propelled in particular by key innovations in neural networks and massive increases in computational power, more and more companies now offer free and/or paid access to these models that increase in ability at a remarkable pace.

Generative AI isn't all rainbows and puppy dogs, however. While holding great promise to augment human creativity in a wide variety of applications, concerns remain about how to properly evaluate, test, and responsibly deploy these generative systems. There is particular unease related to the spread of misinformation, along with concerns of bias, truthfulness, and social impacts introduced by this technology.

However, the first thing to do with any new technology is to attempt to understand it before we either harness or criticize it. Getting a start at doing so is what we have planned for this article. We intend to lay out some key generative AI terms and do our best to make them understandable at an intuitive level for beginners, in order to provide an elementary foundation and pave the way for more in-depth learning ahead. In that vein, for each key term below you will find links to related material to begin to investigate further as desired.

Now let's get started.

Natural Language Processing

Natural Language Processing (NLP) is an AI subfield focusing on enabling machines to understand, interpret, and generate human language, by programmatically providing these machines with the tools required to do so. NLP bridges the gap between human communication and computer understanding. NLP first employed rule-based methods, followed by "traditional" machine learning approaches, while most cutting edge NLP today relies on a variety of neural network techniques.

Neural Networks

Neural networks are machine learning computational models inspired by (not replicas of) the human brain, used for learning from data. Neural networks consist of layers (many layers = deep learning) of artificial neurons processing and transmitting small individual pieces of data, fitting this data to function, and repetitively updating the weights associated with the processing neurons in an attempt to "better fit" the data to the function. Neural networks are essential for the learning and decision-making capabilities of today's AI. Without the deep learning revolution started a little over a decade ago, much of what we refer to as AI would not have been possible.

Generative AI

Generative AI is a category of artificial intelligence, powered by neural networks, which is focused on the creation of new content. This content can take many forms, from text to images to audio and beyond. This differs from "traditional" types of AI which focus on classifying or analyzing existing data, embodying the capability to "imagine" and produce novel content based on training data.

Content Generation

Content generation is the actual process where trained generative models generate synthetic text, images, video, and audio, doing so with learned patterns from their training data, producing contextually relevant output in response to user input or prompts. These prompts can be in any of these mentioned forms as well. For example, text could be used as a prompt to generate more text, or to generate an image based on the text description, or a piece of audio or video instead. Likewise, an image could be used as a prompt to generate another image, or text, or video, etc. Multi-modal prompting is also possible, in which, for example, text and an image could be used to generate audio.

Large Language Models

Large Language Models (LLMs) are specialized machine learning models which are tailored to process and "understand" human language. LLMs are trained on vast amounts of text data, which enables them to analyze and replicate complex language structures, nuances, and contexts. Regardless of the exact LLM model and techniques being used, the entire essence of these models is to learn and predict what the next word, or token (group of letters) follows the current, and so on. LLMs are essentially incredibly complex "next word guessers," and improving the next word guess is a very hot research topic at the moment, as you have likely heard.

Foundation Models

Foundational models are the AI systems that have been designed with broad capabilities that can then be adapted for a variety of specific tasks. Foundational models provide a base for building more specialized applications, such as tweaking a general language model for specific chatbot, assistant, or additional generative functionalities. Foundational models are not limited to language models, however, and exist for generation tasks such as image and video as well. Examples of well-known and relied-upon foundational models include GPT, BERT, and Stable Diffusion.

Parameters

In this context, parameters are numerical values that define a model's structure, operational behavior, and capacity for learning and predicting. For example, the billions of parameters in OpenAI's GPT-4 influence its word prediction and dialogue creation abilities. More technically, connections between each neuron in a neural network carry weights (mentioned above), with each of these weights being a single model parameter. The more neurons → the more weights → the more parameters → the more capacity for a (well-trained) network to learn and predict.

Word Embeddings

Word embeddings are a technique in which words or phrases are converted into numerical vectors of a predetermined number of dimensions, in an attempt to capture their meaning and contextual relationships in a multidimensional space of a size much smaller than what would be required to one-hot encode each word (or phrase) in a vocabulary. If you were to create a matrix of 500,000 words where each row was created for a single word, and every column in that row was set to "0" except for a single column representing the word in question, the matrix would be 500,000 x 500,000 rows x columns, and be incredibly sparse. This would be a disaster for both storage and performance. By setting columns to various fractional values between 0 and 1, and reducing the number of columns to, say, 300 (dimensions), we have a much more focused storage structure, and inherently increase operation performance. As a side effect, by having these dimensional embedding values learned by a a neural network, like terms will be "closer" in dimensional values than unlike terms, providing us with insights into relative word meanings.

Transformer Models

Transformer models are AI architectures that simultaneously process entire sentences, which is crucial for grasping language context and long-term associations. They excel in detecting relationships between words and phrases, even when far apart in a sentence. For example, when "she" is established early in a chunk of text as a noun and/or pronoun referencing a particular individual, transformers are able to "remember" this relationship.

Positional Encoding

Positional encoding refers to a method in transformer models that helps to maintain the sequential order of words. This is a crucial component for understanding the context within a sentence and between sentences.

Reinforcement Learning From Human Feedback

Reinforcement learning from human feedback (RLHF) refers to a method of training LLMs. Like traditional reinforcment learning (RL), RLHF trains and uses a reward model, though this one comes directly from human feedback. The reward model is then used as a reward function in the training of the LLM by use of an optimization algorithm. This model explicitly keeps humans in the loop during model training, with the hopes that human feedback can provide essential and perhaps otherwise unattainable feedback required for optimized LLMs.

Emergent Behavior

Emergent behavior refers to the unexpected skills displayed by large and complex language models, skills which are not displayed in simpler models. These unexpected skills can include abilities like coding, musical composition, and fiction writing. These skills are not explicitly programmed into the models but emerge from their complex architectures. The quesiton of emergent abilities can go beyond these more common skills, however; for example, is theory of mind an emergent behavior?

Hallucinations

Hallucinations is the term given to when LLMs produce factually incorrect or illogical responses due to constraints in data and architecture. Despite whatever advanced capabilities the model possesses, these errors can still occur both when queries are encountered that have no grounding in the model's training data, and when a model's training data consists of incorrect or nonfactual information.

Anthropomorphism

Anthropomorphism is the tendency to attribute human-like qualities to AI systems. It is important to note that, despite their ability to mimic human emotions or speech and our instinct to think of the models or as "he" or a "she" (or any other pronoun) as opposed to an "it," AI systems do not possess feelings or consciousness.

Bias

Bias is a loaded term in AI research, and can refer to a number of different things. In our context, bias refers to the errors in AI outputs caused by skewed training data, leading to inaccurate, offensive, or misleading predictions. Bias arises when algorithms prioritize irrelevant data traits over meaningful patterns, or lack meaningful patterns altogether.

Matthew Mayo (@mattmayo13) holds a Master's degree in computer science and a graduate diploma in data mining. As Editor-in-Chief of KDnuggets, Matthew aims to make complex data science concepts accessible. His professional interests include natural language processing, machine learning algorithms, and exploring emerging AI. He is driven by a mission to democratize knowledge in the data science community. Matthew has been coding since he was 6 years old.

More On This Topic

  • Database Key Terms, Explained
  • Descriptive Statistics Key Terms, Explained
  • Machine Learning Key Terms, Explained
  • Deep Learning Key Terms, Explained
  • Natural Language Processing Key Terms, Explained
  • Genetic Algorithm Key Terms, Explained

Is GPT-4 Really Better than Radiologists?

There is a dearth of radiologists in the country. Data shows that there are approximately 20,000 radiologists for a population of over 1.4 billion people. That makes it one radiologist for every 1,00,000 individuals — a ratio significantly below the recommended benchmarks by global healthcare organisations.

This shortage, coupled with physician burnout, continues to plague the industry emphasising an urgent need to deliver scalable and practical solutions to improve process efficiency amid the growing demand for diagnostic imaging.

GPT-4 to the Rescue

Microsoft recently published a paper ‘Exploring the Boundaries of GPT-4 in Radiology‘, which assesses the performance of GPT-4 in text-based applications for radiology reports.

One of the primary applications of GPT-4 in radiology lies in its ability to process and comprehend medical images, ranging from X-rays to MRIs. The paper said, “The radiology report summaries created by GPT-4 are comparable, and in some cases, even preferred over those written by experienced radiologists.”

GPT-4 for radiology. Far from perfect, but state-of-the-art performance on some tasks: “Surprisingly, we found radiology report summaries generated by GPT-4 to be comparable and, in some cases, even preferred over those written by experienced radiologists”https://t.co/bi6RwqgeHw

— Greg Brockman (@gdb) November 28, 2023

Microsoft collaborated with AI healthcare startup Nuance for this study and found that for some tasks, GPT-4 achieved about a 10 percent improvement over existing models. One of Nuance’s generative AI products is PowerScribe Smart Impression. This product uses natural language processing (NLP) to automatically draft radiology reports.

Now, with the incorporation of GPT Vision, GPT-4 is truly multimodal, boosting its capabilities and broadening its range of applications. The ChatGPT app is currently available on both Android and iOS. Radiologists only need to scan the radiology reports, and GPT-4 interprets them, offering summaries, medication suggestions, and diagnoses. Alternatively, medical professionals using the ChatGPT app can also leverage the GPT-4 Vision API.

Another encouraging aspect of GPT-4 is its ability to automatically structure patient reports. These reports, based on the radiologist’s interpretation of medical images like X-rays and the patient’s clinical history, are often complex and unstructured making them difficult to interpret.

Moreover, research suggests that organising these reports can make it easier for healthcare professionals to understand and improve the searchability of information for research and quality improvement.

Additionally, using GPT-4 to structure and standardise radiology reports can further support efforts to augment real-world data (RWD) and its use for real-world evidence (RWE). This can complement more robust and comprehensive clinical trials and, in turn, accelerate the application of research findings into clinical practice.

Interestingly, Microsoft is not the only one experimenting with generative AI in radiology. Recently, Jama Open Network conducted a study and found that chest radiograph reports, created by a generative AI, matched the quality and accuracy of reports by in-house radiologists in a retrospective study. Utilising an open-source model from Hugging Face, the study included 500 chest radiographs that the AI model decoded.

Challenges and Limitations

GPT-4 can function as a valuable assistant to radiologists, but it shouldn’t be viewed as a total replacement for human judgment. Ultimately, it’s a language model trained on vast amounts of data and is not immune to errors, biases, or manipulation. Radiologists shouldn’t blindly rely on GPT-4’s outputs without verifying them. They must check the sources, references, and evidence behind its texts.

Moreover, effective prompting plays a key role when utilising GPT-4, especially in healthcare. Microsoft recently published a report stating that with proper prompting, a generalist GPT-4 model can perform comparably to a specialist on medical challenge problem benchmarks.

No doubt GPT-4 is an asset in radiology but beyond radiology, the capabilities of GPT-4 stretch into translating medical reports into more empathetic and comprehensible formats for patients and other healthcare professionals.

A user on X shared, “GPT-4 is reading scans and creating radiology reports — sometimes better than experienced doctors! Imagine this being applied to blood tests and all other kinds of diagnostic tests. Medicine is going to change forever.”

The post Is GPT-4 Really Better than Radiologists? appeared first on Analytics India Magazine.