I still remember the first time I used a chatbot on an airline company's website years ago. Let me just say, it was not a fun experience. The bot didn’t seem to follow any of my questions, and I found myself repeating the same information over and over again. It almost felt like I was shouting my complaints at a wall with no response.
Luckily, it’s now fair to say that those days are far behind us in the rear-view mirror. The AI chatbots of the present are way better than the chatbots of the past. They can write code, tell jokes, and even help with customer service needs, such as the one I once had. Although I (thankfully) haven’t had to use one on an air travel website yet, it’s clearly not an unresponsive wall anymore. A good chatbot seems more like an actual human being—or even an expert in their respective field.
But unlike humans who learn from a variety of sources—including role models like parents and teachers, materials like books and educational websites, and especially their own personal experiences—many chatbots learn from one source alone: the internet. This approach to training chatbots is what’s known as transformer architecture, or, more simply, a “transformer.” Like anyone else conducting machine learning research in the computer science domain, I could have never imagined a world where AI would become as sophisticated as it is today. Thanks to transformers, we are now in an era where AI and humans feel remarkably similar, at least as far as understanding context is concerned.
To no one’s surprise, marketing is taking advantage of this technology. It has traditionally been very difficult to extract signals from large volumes of text or images since this data is so context-dependent—meaning information can make big differences for one user but not for another. Transformer architectures, however, can compress such knowledge and unpack understanding across all data in a way that makes such differences apparent for marketing. Now, experts can easily identify elements that influence the likelihood of consumers paying attention to certain details.
In this article, we shall discuss how transformers are making waves in the world of marketing and consumer behavior, exploring the behavioral economics behind how to approach ethical dilemmas with best practices.
The Transformer: AI Inspired By How Humans Understand Context
Before we dive into the connection between marketing and consumer behavior, let's better understand how transformers function first.
Imagine someone playing an action-adventure video game. As the player navigates the world trying to complete their quest, they must use key pieces of information in their environment—like hidden tools or conversations with NPCs—to help them along their way. The player can temporarily enjoy the scenery, but ultimately, they must focus on the quest at hand and complete the game without getting too distracted.
This is how a transformer operates. It’s basically a gamer who’s determined to complete their task (such as generating text) while being super-aware of their surroundings (that is, the context from previous sentences or words). In this sense, the main idea behind a transformer is its ability to pay attention to different parts of the input data efficiently while generating text, much like how a gamer would track multiple elements while playing and ultimately completing their quest.
The transformer methodology was initially introduced by Ashish Vaswani and colleagues in their 2017 paper, “Attention is all you need,” with the title alone already hinting at the mechanisms behind these algorithms.1 Drawing inspiration from how humans focus attention on a task while leveraging the information in the background (without getting distracted by it), transformers can move from the beginning to the end of pretty much any given problem, appreciating and leveraging its context to reach a solution.
Since attention is so critical to transformers, why isn’t “attention” in the name? Well, it actually almost was. The original term was meant to be “Attention Net,” but the authors felt it wasn’t exciting enough. Since these models transform representations, they went with the fitting title of “transformer,” and the rest is history.
What this technology means for behavioral economics and marketing, however, remains to be seen. One great advantage about a significantly improved ability to understand context is that transformers open new doors for companies and other organizations to better understand their customers than ever before. For example, transformers could help consumers navigate the shopping experience by putting itself in their shoes. In this way, we can think of transformers as being an “online shopping assistant” who’s determined to help shoppers check out without abandoning their cart while being super-aware of the context from shopping advice it gave to consumers in the past, along with how they initially responded.
Algorithms for Unpacking Marketing and Consumer Behavior Context
When it comes to consumerism, what takes transformers one step further than traditional algorithms is that they are able to pin down what we humans think of as “meaning” or “context.”
Economists and marketing experts understand that we do not make decisions in a vacuum, but are influenced by our surroundings as we make choices. This concept is called choice architecture—and transformers are basically how algorithms are similarly influenced by their environments, but on steroids. With their ability to handle data at the level of the entire internet, transformers are in a position to pay attention to many data points at the same time, while analyzing consumer behavioral patterns and market trends that might be very hard for a human to handle in real-time. This ability could help many organizations make hyper-personalized marketing strategies.
Most of the time, we make choices for reasons that we don’t spend that much time thinking about, or what psychologists refer to as system 1 thinking. For instance, a retail store may have a hard time figuring out why someone bought their more expensive item, but it’s obviously a question they are highly motivated to answer to replicate such purchases. That’s why companies sometimes run surveys to ask customers why they bought something or why, in other cases, a newer store will often have its staff ask shoppers about how they heard of them in the first place. In both scenarios, marketers know that context matters. However, given their consumers’ busy lives, a mall customer could easily forget why they bought that specific product or how they ended up shopping at that specific store.
The payoff of using transformers is that they can understand this context in real time as it arises. Being trained on everything online means that the best AI models using transformers transcend what the human brain is physically capable of. A transformer is not limited to a customer's memory or even their willingness to share at all. By continuously collecting and analyzing real-time data, a transformer can identify patterns such as a customer frequently visiting a product website, for example. The transformer can infer the consumer’s interest long before the purchase is made, while cross-referencing data from many visitors and the internet to uncover uncommon contextual behaviors. All these abilities have the power to really sharpen the marketing strategies of firms, enabling them to adapt their offerings and make adjustments that guarantee impact.
Human Segmentation Through AI Personalization
At Machine Learning X Doing—the AI research company I founded to solve economic, business, and social problems—we are very interested in certain common attributes our customers may share. A high-end fashion brand, for instance, may care more about wealthy, upscale, and older consumers, since this group may be most willing to pay for their products. A nonprofit charity, on the other hand, may be more concerned about certain social issues than others. How can organizations divide stakeholders into categories in ways that make the most sense for their needs?
Segmentation is the process of splitting people into groups based on similar demographics, mostly so we can more easily personalize our marketing campaigns to them.4 Transformers speed up this logic to lightning speed. I could segment some users of an app by wealth, age, and other demographic characteristics. Additionally, behavioral segmentation would allow me to target purchase behavior, brand loyalty, or usage of a product.
However, AI made with transformers focuses on personalizing campaigns in ways that even the smartest, most perceptive, and intuitive investigator would have a hard time dreaming up. Since these algorithms can work with data covering billions or even trillions of interactions without breaking a sweat, they obviously have a significant advantage.
Anecdotally, a streaming platform may use a transformer-based model to segment customers based on user histories, viewing session durations, cancellations, and other variables at scale. The model might identify segments like “users likely suffering from content fatigue” or “habitual listeners who respond strongly to promotions,” and so on. What makes transformers especially helpful here is that the sheer size of user populations on major digital entertainment platforms may be too large for traditional segmentation approaches.
Ethical Concerns Posed by Transformers in Marketing
As powerful as transformers are, our discussion on behavioral economics reveals that such monumental abilities could be a double-edged sword for the future of human agency and social impact.
Perhaps, the biggest concern is that AI can influence our choices without our awareness. As models become more and more powerful with transformer architectures, there is now a growing number of calls for an equal focus on AI ethics. After all, it’s one thing to give consumers exactly what they want when they may not necessarily realize they want it yet. It’s another thing entirely to take the choice out of their hands and choose for them instead.
One way that transformers might coerce consumers is through their ability to predict not only what customers want, but also when and how they’re most likely to act on these desires. By enabling marketers to craft nudges that provoke impulse buying, for example, consumers may feel taken advantage of, and rightfully so. What matters, first and foremost, is the well-being of the customers. For example, some elderly people may be easily deceived by dark patterns. This also has downsides from a business perspective, since even if an unhappy customer is persuaded into making a short-term purchase, they may not necessarily return in the long-term. Worse, they may have unkind things to say publicly, which is the exact opposite of what a marketer wants to happen.
Behavioral economists, marketers, and enterprises alike must navigate the fine line that separates knowing what consumers want and allowing them to make their own choices. Thankfully, they are poised to be ahead of the curve. From the classic behavioral economics book Nudge,5 the concept of “libertarian paternalism” makes it clear that it’s quite possible to influence choices for people without making those choices for them. That is, we can guide consumers with nudges while respecting and preserving their freedom to choose.
Let’s return to our anecdotal example of a streaming service using a transformer to analyze viewing habits and time spent on the platform. Some users may have a bad habit of watching shows very late at night. A new feature could nudge customers so they can benefit from better time management. Perhaps, after a long viewing session, the user could receive a message asking them to consider a break, allowing them to choose whether or not they wish to continue watching. Here, the nudge encourages better viewing habits, but it doesn’t force the user and thus preserves their right to choose. The use of transformers ensures that the nudge is personalized and at the appropriate time, making it effective. The nudge would also be good for the business as well, promoting user retention through healthier streaming habits.
As behavioral economists and marketers, we need to grapple with these ethical and behavioral implications. With this in mind, my research company was part of a collaboration with faculty from several top universities to come up with a relevant framework that we believe could help in this endeavor, called “Computational Ethics.”11 Our framework focuses on how the ethical hurdles that AI faces can be overcome by incorporating the study of how humans make moral decisions while designing algorithms. One of our goals is to help engineer AI systems that are more ethical. It's not enough to instinctively jump to use next-level AI technologies in certain ways; we must also ask how best to do so—and whether or not we even should.
Although AI technologies can perform an ever-increasing number of tasks, human workers are not going anywhere anytime soon in the marketing industry. Transformers still need oversight, so organizations like ours run sessions on incorporating transformers into the marketing world as tools for workers rather than as workers themselves.
behavior change 101
Start your behavior change journey at the right place
Transformed by Transformers?
Transformers are undoubtedly the next big thing in machine learning and AI marketing. I fully expect them to be increasingly common in campaigns, but we must be careful not to put them on too high a pedestal, as they are just as imperfect as the individuals using and designing them. Despite how “human” transformers may seem, we must keep in mind that, at the end of the day, these are algorithms—unfeeling and rational formulas, robotically completing tasks that users assign to them. At the same time, the people using them are just that: people, subject to the emotions and complexities that are part of the human condition.
To strike a balance between human and AI in marketing, collaboration is key. Marketers can use transformers to analyze large text, image, and behavioral data to better understand consumer needs, while ensuring that the final decisions on marketing campaigns and other deliverables are made by human experts. Having consistent and transparent rules about when and how to use algorithms could also help marketing team efforts benefit from data-driven personalization without losing consumer trust. By collaborating in such ways, AI and humans can team up to build a future for marketing that maximizes both economic and social impact.




















