Between bits and emotions, affective computing is technological frontier
Between bits and emotions, affective computing is technological frontier

Feec research group develops resources that expand the possibility of communication between people and machines

One of the most intriguing characters in cinema is a machine with artificial intelligence (AI). Created by Stanley Kubrick and Arthur C. Clarke as the antagonist in the film 2001: Uma Odisseia no Espaço (1968), the HAL 9000 computer is responsible for commanding the Discovery One spacecraft towards Jupiter, as well as communicating with crew members in a more natural way than we do today with devices like Alexa, Amazon's virtual assistant. At a certain point, an error by HAL causes the two astronauts on board to question his operational capabilities and plan to replace him. The computer senses the distrust of his fellow missionaries and, cornered, begins to sabotage them.
What makes this computer such a memorable character is its ability to drive the plot forward by using its ability to understand the astronauts' emotions and make decisions based on that. In the film, HAL loses the contest and ends up shutting down. In the real world, however, AI systems have been gaining more and more ground.
According to a 2024 survey by McKinsey consulting, conducted with 1.363 representatives from different business sectors, 72% of companies claim to already adopt AI to perform tasks and 65% plan to invest in generative AI systems, which create new content based on patterns identified in training data, as is the case with ChatGPT, launched in 2022 by OpenAI.
In the search for AIs that increasingly resemble the human capacity to make decisions, scientists and developers are dedicated to creating computational resources capable of identifying, expressing and simulating emotions. “Historically, AI has developed based on logical models. For a long time, the role of emotions in decision-making and in building social engagements, an aspect of fundamental importance for learning new skills, was disregarded. Affective computing is our last frontier,” says Paula Dornhofer, a professor at the School of Electrical and Computer Engineering (Feec) at Unicamp and coordinator of one of the research lines at the Hub of Artificial Intelligence and Cognitive Architectures (H.IAAC).
One of the team's work fronts is the development of systems capable of recognizing patterns of personality and human emotions expressed in speech, facial expressions and gestures. Using machine learning, the technology can reproduce these emotions in different modalities.
The aim is for technologies of this type to make AI systems more autonomous and effective in their communication – not to the point of taking control of a spaceship, as in the case of HAL 9000, but in a way that revolutionizes computing and the interaction between humans and machines, as 2001: Uma Odisseia no Espaço revolutionized science fiction.

Training emotions
AI systems work by using algorithms to identify patterns in databases, which serve as an initial repertoire. The training of these systems aims to enable them to perform a specific task, such as identifying colors or shapes in images, or reproducing a type of sound. As the process progresses, the systems begin to perform these same tasks autonomously, with new data, not previously presented.
In the case of generative AIs, the systems go further, creating texts, images, music, and other content, also based on the data framework provided. The more sophisticated the task to be performed or the content to be created, and the greater the autonomy desired for the system, the larger the repertoire of data offered and the more extensive the training to be performed with the algorithms must be.
In the case of affective computing, the new feature is the recognition and expression of emotions, which are now one of the tasks of AI. Therefore, it is necessary to provide algorithms with databases that allow this work. If a system needs to recognize facial expressions related to emotions, the training data must inform this, just as in the case of recognizing a harsher or gentler tone of speech, or a pattern of gestures that indicate a more extroverted or introspective personality.
The challenge is to deal with the complexity involved in human communication. “Emotions and expressiveness have multiple layers, and human beings combine all of these,” Dornhofer reflects. According to the professor, unlike other AI systems in which it is possible to isolate the skills for performing tasks in different applications, communication processes combine several elements – voice, facial expression, gestures – that complement each other and also inform each other. Thus, researchers seek to build systems capable of synthesizing human expression in the most complete way possible. “We want to develop systems that have coherent nonverbal communication.”

Speech, expressions and gestures
O Journal of Unicamp learned about three of the research projects developed by H.IAAC aimed at emulating aspects of human personality and expressiveness. The first is dedicated to creating virtual characters that express gestures related to extroverted, introverted and neutral personalities, in an autonomous and natural way, based on the sound of the voice. “We thought about creating a virtual assistant or a game character with whom it would be possible to interact in a more realistic way”, comments Rodolfo Tonoli, a doctoral student who is part of the group.
The first step was to build a database of body movements combined with speech. To do this, the researchers recorded professional actors performing a script that included aspects of the three personality patterns. In order to capture the range of body movements, sensors were attached to the hands, elbows, heads and other parts of the actors' bodies.
“We guided the actors according to a protocol, so that the algorithm would not be biased,” he explains. The images were processed and converted into training data, so that the AI could begin to generate synthetic movements in a kind of virtual model from recorded audio,” said Tonoli.
The researcher says that, at first, the system performed random movements. However, as more data was input, the AI began to learn the dynamics of human movement and its correlation with voice, delivering more energetic gestures in emphatic speech or a restrained posture in more neutral speech. To confirm the results, volunteers watched the synthetic gestures and indicated which type of personality they identified. According to the researcher, the impression corresponded to what was expressed by the system. “The great success is that we can achieve the same perception results in synthetic and real movements,” he said.
Another project focuses on expressive speech synthesis, that is, reproducing human speech not only with intonations that express emotions or mood, but also autonomously, to adapt to the speaker's mood, making communication more efficient. The researchers give the example of a customer service system that informs about flight delays at airports, with the ability to recognize possible frustration from the passenger's tone of voice. "An intelligent system needs to make the decision to communicate, but knowing that the message may be unwanted and identifying the emotion of the person listening to it," explains Dornhofer.

Here, the algorithms are trained in the same way, by identifying speech patterns – tone, rhythm and emphasis – expressed in previously provided data. One advantage of the research, carried out in partnership with the Telecommunications Research and Development Center (CPQD), is that it contributes to increasing diversity in AI systems by enabling the reproduction of accents from different regions of the country.
“There are few databases of Brazilian Portuguese speech. Our research helps fill this gap,” says Leonardo Boulitreau, a master’s student in the group, who emphasizes the care taken to provide the system with typical everyday speech, so that the algorithm is not restricted to archetypes.
The third research study is dedicated to the production of synthetic facial expressions from audio in Portuguese. In this case, two algorithms with complementary action are used: the first processes recorded images of an actress to transform into data the relationship between speech sounds and corresponding facial movements, called visemes.
In a second step, another algorithm converts new speech audios into synthetic faces that reproduce the facial movements and expressions corresponding to the emotion used in the speech. The technique is similar to that used in so-called deep fakes, in which someone is attributed speech in a realistic way. The study, on the other hand, aims to expand the possibilities of communication between users and machines, in addition to spreading the necessary caution with scams and disinformation actions. “With these technologies, our yardstick for judging whether something is real or not needs to be increased,” says Brayan Bernardo, a master and researcher in the group.

SMART FUTURE
The combination of emotions and computation may seem counterintuitive from a traditional scientific perspective. The Western philosophical tradition itself recommends an objective view of scientific questions, attributing a negative value to emotions, seeing them as an obstacle to rational truth.
“It is common for us to view emotions as something pejorative. We attribute to emotional action the idea of not making a good decision,” comments Dornhofer. In his book Affective Computing (The MIT Press, 1997), Rosalind Picard, a researcher at the Massachusetts Institute of Technology (MIT) in the United States and a precursor of the concept of affective computing, also questions whether emotions should not be separated from computing.
Picard, however, points out that research in the field of neuroscience has already proven the participation and importance of the limbic system, the region of the brain that controls our emotions, in decision-making processes. In other words, humans do not make decisions independently of their emotions. Therefore, as they aim to approach the human capacity to think and make decisions, making interactivity more natural, AI systems need to learn to recognize and express emotions.
In addition to promoting technological advancement, research mobilizes new knowledge that enriches the training of professionals in the field. “We study not only how computers can model emotions, but we also create the basis for other studies, including cultural ones,” recalls Tonoli.
According to the researchers, contact with other areas also draws attention to the need to make AI an everyday issue. “Technologies advance very quickly and public debate moves slowly. Other areas of knowledge, such as philosophy and sociology, need to focus on this,” reflects Bernardo.
In this sense, it is essential that universities conduct research on the subject, since the sector is currently under the control of large technology companies. The scenario differs from that of other periods, when academia represented the state of the art in technology, a role now played by the so-called big tech, which monopolize both access to research data and the computing power to develop them.
“The academy has become a place to open the black boxes of models developed by big tech, investigate countermeasures for tools that create fake news, make AI explainable and think about ways of regulating it”, Dornhofer points out. Another benefit for the sector comes from ethical care when carrying out studies. “Many research projects big tech are extremely closed, or do not follow strictly scientific protocols”, recalls Boulitreau.
Faced with so many possibilities and in a scenario in which research points to increasingly autonomous AI systems, it becomes inevitable not to think about the future and the role that emotions will play in the evolution of these technologies. For the group's researchers, the answer lies in the fundamentals of the systems.
“AI will be whatever we build it to be,” says Dornhofer, recalling that the data responsible for ensuring machine learning is provided by human beings themselves. Both our qualities and our imperfections can be reflected in and replicated by algorithms. “As it [AI] evolves, human beings can revisit themselves, develop critical thinking in relation to it. Like any disruptive technology, AI will make us rethink ourselves.”
