Text2Gestures: A Transformer-Based Network for Generating Emotive Body Gestures for Virtual Agents
Paper · 2021 · Uttaran Bhattacharya, Nicholas Rewkowski, Abhishek Banerjee et al.
Summary
A virtual storyteller can say the right words while moving in a way that makes the delivery feel stiff or emotionally out of place. Text2Gestures addresses that problem by generating a sequence of body poses for each sentence. Its inputs include the words, the intended emotion, whether the agent is narrating or conversing, and the agent’s assigned gender and dominant hand. The words can come directly from a transcript. The system learns from recorded human movement and can produce an animation without receiving a speech recording.
The authors use a Transformer to connect the words of the sentence with a moving skeleton. An encoder represents the sentence and combines that representation with the supplied attributes. A decoder uses the resulting information and the recent history of poses to predict how the joints should rotate next. During training, the network is penalized for errors in joint rotation, in the paths followed by the joints, and in geometric features related to expressive posture. Those features help distinguish such patterns as spreading the arms and drawing them close to the body. The skeleton covers the whole body, although the experiments use seated figures whose expressive movements are concentrated in the upper body.
On the held-out portion of the MPI Emotional Body Expressions Database, Text2Gestures achieved a normalized mean pose error of 0.05, compared with 1.57 for the retrained method from Yoon and colleagues. The comparison was restricted to the upper-body joints shared by the methods. Removing any of the three training losses increased pose error, and the authors’ examples showed different effects on smoothness, joint trajectories, and expression. The system generated animation frames at an average of 312.5 frames per second on the tested Nvidia GeForce GTX 1080Ti GPU.
The authors also asked viewers what emotion they saw and how natural the movements looked. Perceived and intended emotions had Pearson correlations of 0.77 for valence, 0.95 for arousal, and 0.82 for dominance. In the naturalness task, 91.33% of ratings for generated clips met the study’s threshold for plausibility, as did 86.67% of ratings for motion-captured clips. Those results describe judgments of seated animated figures with facial and vocal emotion withheld. The work shows how much expressive information this generation procedure can convey through body movement under those conditions.
Deep dive: Text2Gestures: A Transformer-Based Network for Generating Emotive Body Gestures for Virtual Agents
Text2Gestures turns written sentences into expressive movements for virtual agents using a Transformer trained on motion capture. · about 35 minutes to read
The problem and its context
Making the body part of the delivery
A virtual agent that narrates a story or takes part in a conversation has to do more than display a sequence of physically possible poses. A motion has to make sense alongside the current line. A pointing gesture can support what the agent is referring to, and the pace and extent of an arm movement can change the impression left by a sentence. Body posture also contributes to how the delivery is read. The problem is to connect those aspects of movement to words that may be supplied during an interaction.
The paper situates the problem in applications such as virtual classrooms, interviews, counseling, and social virtual reality. It describes communication as involving spoken content, a relationship or context, and subtler cues from the face and body. Once an interaction is under way, the agent’s words and its movements have to stay compatible as each line arrives. A system that can represent a moving human figure provides the means to display those cues. Choosing which movements to display at a given moment requires a separate mapping from the communication to the animation.
Hand-authored animation, rotoscoping, and motion capture all provide ways to create natural-looking movements. A designer can select or make a gesture for a known line, or transfer an existing movement from a recording. The difficulty grows when the next line is supplied by a person or generated during a live interaction. As the authors describe it, a rule-based system inherits the range of movements its designers specified. A collection of prerecorded animations similarly depends on finding something appropriate for new content. The aim of learning from paired sentences and movements is to make a new sequence available for a line that was never animated by hand.
Why the authors put emotion into the movement
The paper draws on research in psychology and affective computing that examines how people perceive emotion from the body. Its account emphasizes that the disposition of the arms, shoulders, and head, as well as the speed of their movement, can inform a judgment about what someone is expressing. An open upper body can accompany a display of pride. Shoulder collapse can accompany fear or sadness. Rapid arm action can be part of an angry delivery. These are tendencies the authors use to motivate their design, with the interpretation of any particular gesture depending on its other cues and context.
The distinction between different dimensions of emotion matters to the design. Arousal concerns the level of activity or excitement. Dominance concerns a sense of control. The paper cites studies that find bodily expression particularly informative about these dimensions. Valence concerns pleasantness, and the authors describe it as less consistently associated with a particular pattern of gesturing. The body can also help viewers resolve ambiguous expressions when face or voice provides another cue. The research question for Text2Gestures is how much of a specified emotion can come through the motion itself.
The paper calls measurable movement or posture characteristics associated with expression affective features. Studies of walking had already used such features to recognize or generate expressive gaits. A walking system can pay attention to movement properties such as stride and arm swing. An agent gesturing in a chair presents a different problem. The visible action may lie in the opening of the arms, a change in head position, or the arrangement of the upper body. The authors carry over the idea of supervising movement through affective features and choose features for the joints that matter to their gesture setting.
Earlier virtual agents also conveyed emotion through words, faces, gesture, and locomotion. The paper describes a system that used word-to-expression mappings to animate a face and a virtual counselor that selected bodily expressions from pre-established associations with mental states. Those examples show how a specified state can govern an agent’s behavior. The authors’ goal is to learn a wider mapping from text and associated emotion to body movement, so that the agent can deal with sentences beyond those it saw during training.
From speech-driven animation to written sentences
For gesture generation, the paper traces several ways earlier systems used speech recordings. Levine and colleagues used a hidden Markov approach to learn a latent association between speech and gesture. Hasegawa and colleagues used recurrent networks to predict sequences of poses from speech. Kucherenko and colleagues learned compact representations of speech and gesture and then mapped between them, with the aim of reducing sensitivity to noise. Alexanderson and colleagues learned reversible transformations between speech and gesture representations so that the system could generate several plausible movements for the speech.
The authors also describe work that brings individual movement style into gesture synthesis, employs adversarial training to make movement look more realistic, or adds recognizable behaviors such as nods and waves through rules informed by the discourse. These approaches illustrate that an input recording can supply several kinds of information, and that a gesture synthesizer can be designed to preserve particular aspects of the delivery. Text2Gestures starts with a different input. By taking a transcript directly, it avoids making a human or synthetic speech recording a prerequisite for animating the body. It can use the language of the sentence while taking the delivery conditions from separate inputs.
Text gives the system access to whether a line refers to something that might be pointed at, describes something that might be depicted, or expresses an idea that might be represented metaphorically. The paper discusses deictic, iconic, and metaphoric gestures in this connection. Those terms describe, respectively, gesture used to indicate something, to depict a property of what is being discussed, or to give physical form to an abstract idea. The proposed network learns from examples of words paired with movement. These gesture types motivate the choice of input and do not constitute separate labeled targets in its training procedure.
The closest earlier system identified by the authors is the work of Yoon and colleagues on gestures for a humanoid robot. It learned from transcripts of TED-talk videos, used a compact representation of upper-body movement, and mapped the resulting gestures onto an NAO robot. A follow-up in that line of work combined speech, transcripts, and speaker identity for upper-body gesture generation. Text2Gestures instead predicts relative rotations on a human-like skeleton and includes an explicit description of intended emotion and delivery. The comparison with the earlier text-based system asks how those overall designs perform under the same motion-capture data split.
The paper connects the task to work on lip movement, expressive faces, speech-driven head movement, and stylized walking. These tasks share an interest in how movement conveys content or style, but their outputs define different problems. For instance, a method for head motion can respond to the rhythm and intensity of speech while leaving the arms untouched. Here, head motion belongs to a coordinated pose that also includes the torso and limbs. The challenge is to generate changes over time that fit together on the skeleton and appear appropriate for a particular line and emotion.
The method, step by step
From a line of text to an animated skeleton
Imagine preparing a line for a seated virtual agent. The generation system receives the complete sentence, a choice between narration and conversation, and an emotion label. It also receives the agent’s gender and handedness settings. The system turns the words into numerical representations and combines information from across the sentence. A separate stage incorporates the attributes so that the same wording can be delivered under different conditions. During generation, the decoder consults that combined representation and the poses it has already seen to produce the next pose.
A pose is a set of rotations on a linked skeleton. Turning a shoulder affects where the elbow and wrist lie, even when their own rotations stay fixed. The authors take advantage of this structure during training. They compare the predicted and recorded rotations and also work out where the joints end up after those rotations have been applied. Finally they compare geometric features of the resulting poses, giving the network an explicit reason to recover the shape of an expressive movement as well as the path of the joints.
How Text2Gestures produces a gesture sequence
The steps in order.
The paper states its objective as a conditional choice over entire gestures.
Q∗ = arg max over Q of Prob[Q | W; A, E, G, H]
Here Q is a candidate sequence of relative joint rotations, and Q∗ is the sequence with the highest conditional probability. Prob denotes probability, and arg max identifies the candidate that maximizes it. The vertical bar indicates conditioning. W is the input word sequence. A gives the acting task, E the intended emotion, G the agent’s gender, and H its handedness. This expression describes what the authors want the prediction to depend on. The procedure that follows generates poses successively from a recent history, using a network trained on examples.
Representing the sentence and the conditions
The sentence is represented as an ordered sequence of word embeddings. An embedding gives the network a vector for a word, which it can transform alongside vectors for neighboring or distant words in that sentence. Text2Gestures uses pretrained GloVe embeddings from Common Crawl. The authors report that GloVe performed marginally better than Word2Vec and FastText in their preliminary comparisons with embeddings of similar size, and gave similar performance to the higher-dimensional BERT alternative they tried. They also use special vectors to mark the beginning and end of the sentence.
W = [w₁, …, wₛ, …, w_{T_sen}]
W denotes the ordered representation of the sentence. Each w is a word vector, with s identifying its position and T_sen denoting the maximum sentence length. The subscript 1 marks the first element, and the ellipses stand for intervening entries. Each wₛ has 300 components. This representation supplies information about the words. The encoder later adds information about their positions so that attention can use the order of the sentence.
The acting task, gender, and handedness are encoded as one-hot vectors. Each vector has a position for each supported choice, and only the position for the selected choice is active. The task vector distinguishes storytelling from conversation. The paper describes narration as generally more theatrical, with larger movements, and conversation as generally more restrained. The gender setting selects between female and male, and the handedness setting between left and right. The authors use handedness to account for the side favored in asymmetric movements, including cases where the agent indicates something with one hand.
The emotion input begins as a word naming the intended emotion. The authors look up its coordinates in the NRC Valence, Arousal, and Dominance Lexicon. This turns a label into a position along interpretable dimensions. An active expression can have high arousal whether it is pleasant or unpleasant, and a feeling of control can vary independently of how active the expression is. The values are provided along with the task and the agent attributes for every sentence.
E ∈ [0, 1]³
E is the emotion vector, ∈ means that it belongs to the stated set, and [0, 1] indicates the inclusive normalized range of each coordinate. The superscript ³ indicates the number of coordinates, which stand for valence, arousal, and dominance. An input sentence receives a single emotion under this scheme. A phrase can contain several words associated with different feelings, but the emotion supplied to the decoder’s conditioning path is the sentence’s assigned label after the lexicon lookup.
The mixture of categorical and continuous inputs serves a practical purpose. A change in handedness selects a different category, while an emotion label establishes levels along dimensions that can be shared across labels. The network sees those controls together with the text representation. Therefore, the words can establish what is being said, and the supplied settings specify the delivery that the learned mapping is asked to produce.
Representing movement with relative rotations
The skeleton used for the gestures is a directed tree with 23 joints. The root sits at the top of the tree, and each other joint is reached through its parent. The head, wrists, and toes are among the endpoints of this structure. A frame records joint rotations in the local coordinates of the skeleton. A wrist can move in space because the shoulder moves, because the joints farther down the arm move, or because those changes occur together. The tree determines how the transformations propagate.
Q = [q₁, …, qₜ, …, q_{T_ges}]
Q is the gesture sequence, qₜ is the pose at timestep t, and T_ges is the maximum gesture length. The subscript 1 identifies the first pose, and the ellipses stand for intervening poses. At each step the pose is a flattened collection, meaning that the separate joint rotations are laid out in a fixed order in a single vector.
qₜ = […, qⱼ,ₜᵀ, …]ᵀ ∈ ℍᴶ
In this expression, qⱼ,ₜ is the unit quaternion for joint j at time t. Each quaternion takes 4 entries and represents a rotation relative to the joint’s parent. The transpose sign ᵀ expresses how the joint entries are assembled into the pose vector. The ellipses stand for the other joints, ℍ denotes the quaternions, J is the joint count, and ∈ indicates membership in that quaternion representation. The authors choose quaternions to avoid gimbal lock, a problem in which an angle-based description of rotation loses an independent axis at certain orientations.
The animation has a start-of-sequence pose and an end-of-sequence pose. Both are based on sitting at rest, with small variations involving the root, wrists, and toes. The start pose supplies a history before any frames have been generated. The end pose also serves as padding in the training data. Putting it after a shorter recorded sequence gives training examples a common length and shows the network the pose expected after the sentence. The recorded sequence may end with the body still in the middle of a posture, which makes the quality of the transition a separate concern.
How attention combines words across the sentence
The encoder and decoder are based on the architecture introduced in Attention Is All You Need. Attention allows the representation at one position to draw on information at several positions. A query expresses what the current computation is looking for, keys determine how relevant the available entries are, and values hold the information to be combined. The paper describes relevance with a scaled dot product.
Att(Q, K, V) = softmax(QKᵀ / k) V
Att denotes the attention operation. Q here is a matrix of queries, a separate use of the letter Q from the gesture sequence. It has m rows and k columns, where m is the number of queries and k is the query and key width. K has n rows and k columns, with n giving the number of keys. V has n rows and v columns, where v is the width of each value. The superscript ᵀ transposes K so that QKᵀ contains the query–key dot products. The divisor k is the scale in the paper’s expression. Softmax normalizes the scores into weights for each query, and multiplication by V returns a weighted combination of values.
For encoder self-attention, the queries, keys, and values are learned projections from the same sentence sequence. Before the projections, positional encoding introduces a signal for the location of each word. This is important because the dot product compares the vectors it receives. The positions have to be represented in those inputs if word order is to influence the comparisons. The encoder can then decide how strongly the representation at one position should draw on the information at another.
SA_enc(W) = softmax((W W_Q,enc)(W W_K,enc)ᵀ / k) (W W_V,enc)
SA_enc denotes encoder self-attention, and W is the sentence representation entering the operation with position information included. W_Q,enc, W_K,enc, and W_V,enc are the learned encoder projections for queries, keys, and values, respectively. Adjacency indicates matrix multiplication. The transpose ᵀ, width k, and softmax have the roles described for attention. The separate projections let the system learn different numerical representations for assessing relevance and for passing forward content.
A multi-head operation repeats attention with different learned projections and gathers the resulting representations. A head can compute its own weighting pattern, so the system need not compress every relation between words into a single set of attention weights. The combined results go through learned fully connected layers, which transform the features into the form expected by the next block.
MH(W) = concat(SA_enc,1(W), …, SA_enc,h(W)) W_concat
MH means multi-head attention. W is the input sentence representation. SA_enc,1 through SA_enc,h are the encoder self-attention computations, with 1 marking the first head and h giving the number of heads. The ellipsis stands for the other head outputs. Concat joins those outputs along their feature dimension, and W_concat is the learned projection applied to the joined representation. Each head has its own query, key, and value projection parameters.
The encoder stacks blocks that contain attention and fully connected transformations. Residual connections pass a layer’s input around its transformation, giving the next computation access to the earlier representation as well as the update. The final encoder features summarize the sentence in a form that can be given to the pose decoder. At this stage the authors merge in the instructions for how the agent is supposed to deliver it.
F̄_W = FC([F_Wᵀ Aᵀ Eᵀ Gᵀ Hᵀ]ᵀ; W_FC)
F_W is the final encoded sentence representation, and F̄_W is the resulting conditioned representation. A, E, G, and H denote acting task, emotion, gender, and handedness. The brackets indicate the assembly of those inputs with the text features, and the transpose signs ᵀ express their arrangement. FC denotes the fully connected transformations, and W_FC denotes their learned parameters. The semicolon in the expression separates the assembled input from the parameters of its transformation. Conditioning takes place after sentence encoding, so the representation passed to the decoder brings together information about what is said and how it is meant to be delivered.
How the decoder uses recent poses
The pose decoder also introduces position information, this time for the sequence of poses it receives. It uses masked self-attention to take account of the ordering of available pose information. The mask prevents attention at a prediction position from reading subsequent poses. This matters during training because a recorded example contains the full sequence, while generation starts with a rest pose history and has to produce each subsequent frame from what is available at that point.
MMH(Q) = concat(SA_dec,1(Q), …, SA_dec,h(Q)) W_concat
MMH is masked multi-head self-attention. Q in this expression is the gesture sequence supplied to the decoder. SA_dec,1 through SA_dec,h are the masked decoder attention heads, with h the head count and the ellipsis indicating the intervening heads. Concat joins their outputs, and W_concat projects the resulting features. The masking is applied within the attention computations so that the representations used at each position respect the available gesture history.
A further attention operation couples the history representation to the encoded input. In the paper’s formulation, the conditioned encoder features serve as the queries, and the output of masked pose attention supplies the keys and values. The authors describe this additional operation as unmasked. Its input on the pose side comes from the history processed by the masked stage.
MH(F̄_W, Q) = concat(Att_dec,1(F̄_W, MMH(Q), MMH(Q)), …,
Att_dec,h(F̄_W, MMH(Q), MMH(Q))) W_concat
Here MH is multi-head attention between the conditioned sentence and pose representations. F̄_W is the encoder output with the attributes incorporated, and Q is the pose sequence used by the decoder. Att_dec,1 through Att_dec,h are the attention computations for the decoder heads, indexed from 1 through h. Each takes F̄_W as its query input and MMH(Q), the masked pose representation, as both key and value input. The ellipsis indicates the other heads, concat joins the outputs, and W_concat gives the learned projection of that joined result. The block finishes with fully connected transformations, with residual connections used around the layers.
Both the encoder and the decoder use N = 2 blocks, where N is the number of blocks in each stack. The attention operations use h = 2 heads, and the fully connected layers in the blocks give 200-dimensional outputs. At the final decoder output, the authors normalize the predicted rotations so that the quaternions are valid. The resulting pose is represented on the same joint tree used for the recorded examples.
At evaluation time, the decoder starts with T = 20 copies of the starting pose, where T is the number of timesteps in its history. It continues to use the past T = 20 steps as it produces new poses. The sentence and attributes supply a condition for the line, while the pose window changes from frame to frame. This arrangement gives the decoder a local record of how the agent has been moving as it predicts the next set of rotations.
Training for rotation, trajectory, and expression
Training compares generated gestures with motion capture. The authors use losses at several levels because a small difference in one representation can be significant in another. A local rotation error near the shoulder can move a wrist substantially. Joint paths can also agree reasonably well on average while a gesture misses the opening or closing of the upper body that helps convey the intended emotion. The losses give these aspects separate roles in training.
The angle loss has a framewise part and a temporal part. The authors use Euler angles in the comparison because it gives them a direct Euclidean measure of differences between angles, although the skeleton’s rotations are stored and predicted as quaternions. Before comparing a predicted quaternion with the recorded one, they correct its orientation where needed. The paper describes the angular comparisons as taken modulo π, so the comparison treats the angles as periodic.
L_ang = Σₜ Σⱼ (‖Eul(qⱼ,ₜ) − Eul(q̂ⱼ,ₜ)‖²
+ ‖[Eul(qⱼ,ₜ) − Eul(qⱼ,ₜ₋₁)]
− [Eul(q̂ⱼ,ₜ) − Eul(q̂ⱼ,ₜ₋₁)]‖²)
L_ang is the angle loss. The sums Σₜ and Σⱼ run over timesteps t and joints j. qⱼ,ₜ is the recorded quaternion, and q̂ⱼ,ₜ is the predicted one, with the hat marking prediction. Eul converts a quaternion to Euler angles, π specifies the period used in the paper’s description, and ‖·‖² indicates a squared Euclidean discrepancy. The subscript t−1 refers to the immediately preceding frame. The first term compares the orientations at the current frame. The second compares the change since the previous frame with the change in the recording. This trains the decoder to follow the reference’s motion from frame to frame, which can include quick movement when that movement belongs to the reference.
The pose loss moves the comparison into physical space. The authors calculate joint positions by forward kinematics, which applies the local rotations and offsets through the skeleton. For instance, the location of a wrist depends on where the shoulder and elbow have been placed and how their transformations are passed down the arm. The pose loss penalizes a prediction when those accumulated transformations put a joint in the wrong place.
L_pose = Σₜ Σⱼ ‖FK(qⱼ,ₜ, oⱼ) − FK(q̂ⱼ,ₜ, oⱼ)‖²
L_pose is the pose loss. FK denotes forward kinematics evaluated at the indicated joint, with parent transformations determining its position in the tree. qⱼ,ₜ and q̂ⱼ,ₜ designate the recorded and predicted rotations at joint j and time t. The offset oⱼ gives the joint’s displacement relative to its parent in the skeleton. The sums cover the timesteps and joints, and ‖·‖² is the squared Euclidean distance between the resulting positions. Comparing positions makes the motion of endpoints such as the wrists directly accountable during training.
The affective loss compares features calculated from the poses. The authors use 15 features, comprising 7 angles, 5 distance ratios, and 3 area ratios. An angle describes the configuration of parts of the body without needing an absolute distance. A distance or area divided by another comparable measurement expresses a proportion. In this way the features represent body shape and arrangement without depending directly on the overall size of the figure.
The joints relevant to the seated experiments include the shoulders, elbows, wrists, root, neck, and head. The authors use them because those are the areas where the visible expressive movement occurs. A pose with an upright head and arms held farther away from the torso can produce a different feature vector from a pose with a lowered head and the arms drawn inward. Over the sequence, changes in the features characterize how the body moves between these shapes. The authors illustrate such patterns with expansive gestures associated with pride and more contracted gestures associated with fear.
L_aff = Σₜ ‖aₜ − âₜ‖²
L_aff is the affective loss, and Σₜ sums over frames indexed by t. The vector aₜ contains the affective features measured on the recorded pose. The hatted vector âₜ contains the same measurements on the predicted pose. The squared norm ‖·‖² measures the discrepancy between those vectors. The loss uses geometric features learned from the reference movement, while the intended valence, arousal, and dominance enter separately as input conditions. Training therefore asks for movement resembling how the target was performed, without requiring a separate emotion classifier to score the animation.
L = L_ang + L_pose + L_aff + λ ‖W‖
L is the overall training objective. L_ang, L_pose, and L_aff denote the angle, pose, and affective losses. W here denotes the full collection of trainable network parameters, separate from the earlier notation for the word sequence. The norm ‖W‖ measures the size of those parameters for regularization, and λ is its multiplier. The plus signs give each of the three motion losses an additive contribution to the training objective.
The authors optimize this objective using Adam, with a learning rate of 0.001 and a reported weight decay of 0.999 at every epoch. They run training for 600 epochs and use stochastic batches of 16 sampled without replacement in each iteration. The network has 26,264,145 trainable parameters. The authors make their implementation available as Text2Gestures code and accompany it with demonstrations of the generated movement.
Experiments and results
The recordings and the held-out comparison
Both training and evaluation use data from the MPI Emotional Body Expressions Database, which holds 1,447 pairs of sentence and motion-capture sequences. In the recordings, performers narrate a sentence, gesture a scenario specified in writing, or gesture while speaking a conversational line. The database therefore includes a scenario-acting category as well as the narration and conversation categories presented as controls in Text2Gestures. Each sequence is associated with a sentence and attributes identifying the intended emotion, gender, and handedness.
The database’s 11 emotion labels cover expressions including amusement, anger, pride, fear, sadness, and relief, as well as a neutral condition. The associated lexical representation supplies coordinates in valence, arousal, and dominance. Gender and handedness each take the categories described in the method. The recordings were captured at 120 fps and last between 4 and 20 seconds. The range of durations is important to the training setup because the same representation has to accommodate a short utterance and a much longer stretch of motion.
The authors make the examples equal in length by filling the unused frames with the end-of-sequence pose. A recorded performer may have their head turned or their hands away from the resting position as the line ends. The padding can then introduce a jump where the original recording meets the added pose. The smoothness terms in training are intended to help the predictor produce a gentler transition into rest. That difference between the recorded and generated endings also matters when the authors interpret the naturalness study.
The paper allocates 80% of the data to training, 10% to validation, and the remaining 10% to testing. The benchmark scores use the held-out test sequences. The paper reports approximately 8 hours of training on an Nvidia GeForce GTX 1080Ti GPU. The same split is used when retraining the baseline, so both methods are tested against the same held-out recordings.
Yoon and colleagues’ text-to-gesture technique provides the comparison. In its adaptation to the MPI data, it uses eight upper-body joints spanning the arms, neck, and head. The authors apply principal component analysis, or PCA, to obtain the 10-dimensional representation used for the baseline. PCA describes movement using a smaller set of directions in the data, retaining a compact account of the original joint measurements. They train the baseline with the hyper-parameters specified by its authors. Although Text2Gestures has a larger skeletal representation, the shared eight joints define the scope of the comparison.
The evaluation metric is normalized mean pose error. It begins with Euclidean distances between the predicted and recorded joint positions over the frames of a sequence. The framewise errors contribute to a mean for that sequence. The authors normalize the discrepancy for avatar size by dividing the sequence mean by the average length of the longest diagonal in the avatar’s 3D bounding box. The test result averages the normalized errors of the sequences. Smaller values mean that the predicted joints were closer to the recorded positions by this measure.
Normalized mean pose error on the MPI database test set
Text2Gestures stays closer to the recorded joint positions than the retrained baseline.
The numbers
| System or setting | normalized mean pose error |
|---|---|
| Yoon and colleagues | 1.57 |
| Text2Gestures, all losses (this paper) | 0.05 |
The authors describe the benchmark result as a reduction in mean pose error of around 97% relative to the Yoon baseline. Both systems see the same training and test partition, and the evaluation restricts the poses to comparable body parts. The methods still differ in the information they are designed to represent and how they predict movement. The baseline’s compact pose representation is part of the comparison, just as the relative joint rotations and specialized losses are part of Text2Gestures. The experiment measures the combined outcome of those choices.
Where the predicted paths differ
The paper supplements the average error with traces of head and wrist movements on two held-out examples. For each example, the authors plot the head, left wrist, and right wrist separately along each coordinate direction. They select sequences with different combinations of delivery task, emotion, gender, and handedness. The plots show the timing and size of deviations that would be hard to infer from a single error value. A movement might have the right direction while being too small, or it might skip the repeated peaks visible in the recording.
In the examples, the Yoon baseline fails to reproduce some of the larger oscillations seen in the motion capture. The authors attribute this to the dimensionality reduction in its pose representation. They also report that the baseline’s animated movement in the plotted examples remained in a plane along the z dimension. The abrupt change visible in that coordinate occurred when the gesture switched to the designated end pose, which lay in a different plane. Text2Gestures follows more of the recorded variation in the shown paths.
These examples give a specific interpretation of the benchmark difference. A missing excursion can reduce the amplitude of a movement a viewer would otherwise see. A mostly flat trace can also make the pose sequence easier to represent at the cost of matching the original performance. The examples diagnose these behaviors for the displayed cases. The test-set average supplies the broader evidence that the methods differ in positional agreement.
Animation throughput and the virtual setting
On the tested Nvidia GeForce GTX 1080Ti GPU, generation averaged 3.2 ms per frame, reported also as 312.5 frames per second. This measures the production of gesture animation frames for a supplied sentence. It shows why the authors consider the generation stage suitable for interactive use. The cost of producing an animation frame is distinct from the time a user experiences across the full interaction, which also involves receiving a line, preparing a response, and displaying the scene.
The demonstration uses low-poly humanoid meshes and the pre-defined female and male skeletons associated with the database. To fit a mesh to the corresponding skeleton, the authors adjust the mesh’s rest pose and manually fix distortions from mismatched shapes. They rig the animations in Blender 2.7 and place the agents in an environment built with Unreal 4.25. They add periodic breathing and blinking to the figures. These rendering choices help present the animation, while the generated pose sequence controls the gesturing body.
The agent can narrate a selected story line by line or take part in a text exchange in which its response carries an associated movement. Synthetic speech with a neutral tone accompanies the gesture demonstrations so the timing of the movement relative to the line can be experienced. The authors avoid expressive speech and facial emotion for their evaluation of the body cues. The scene centers the seated figure, making changes in the arms, upper torso, and head available to the viewer.
What emotion viewers perceived
The web study examines emotion perception and animation quality in separate tasks. Fifty participants were recruited through web advertisements. Most were in the reported age groups of 18-24 and 25-34. The paper reports no particular response pattern by the age and gender information collected. It describes the study as taking about ten minutes.
In the emotion task, each participant watched six generated clips selected at random and chose an emotion for each one. This produced 300 emotion judgments. A pilot suggested that choosing among all 11 labels was demanding, especially for labels with nearby positions in the emotion space. Each clip therefore came with four possible answers. The intended emotion was always available, and the other choices were sampled randomly. The choice set could sometimes make the intended answer conspicuous, for instance if sadness appeared alongside a group of labels with more positive valence.
The analysis transforms each chosen word into valence, arousal, and dominance using the same lexicon used for the intended word. Then, for each dimension, the authors compare the intended and perceived values across the responses with Pearson correlation. Pearson correlation measures the strength of a linear relationship between two variables. A positive value means that clips with higher intended values on a dimension tended to receive responses with higher values on that same dimension. As the paper explains, 1 corresponds to maximal positive linear correlation, 0 to no linear correlation, and -1 to maximal negative linear correlation.
The result was 0.77 for valence, 0.95 for arousal, and 0.82 for dominance. Hence, the closest relationship was for the perceived level of activity or excitement. The sense of control conveyed by the movement also tracked its intended value, and pleasantness had the weakest relationship of the three. This pattern fits the prior work the authors discuss, in which body movement provides more consistent cues about arousal and dominance than about valence.
Each response contributes coordinates even when the selected word differs from the intended label. A viewer who picks an emotion with a similar arousal value can contribute to the arousal relationship even if the category differs. The correlations therefore answer a question about the perceptible ordering of emotional dimensions under this choice procedure. The paper’s main statistical result here concerns the relationship between intended and perceived values, while the naturalness study addresses a separate judgment.
How natural viewers found the gestures
The second task mixed randomly selected motion-captured and generated animations. Each participant saw three of each in random order, without being told the origin of the movement. The pool consisted of 145 generated clips and 145 matching motion-captured clips. Across the tasks the clips for a given participant were drawn without replacement. In the quality task specifically, participants never received a generated clip and its motion-captured counterpart together. Clips could recur across participants, allowing multiple viewers to rate the same material.
Viewers rated each animation on a five-point Likert scale. The categories ranged from severe movement problems, such as an implausibly bent limb, through an acceptable but unappealing middle category, to movement that looked human. The authors used a score of 3 as the minimum for plausibility. Hence, an animation could satisfy the study’s plausibility criterion while still leaving room for improvement in realism or appeal.
Share of plausible gesture ratings in the web study
Generated gestures met the plausibility threshold more frequently than motions taken from the recordings.
The numbers
| System or setting | plausible ratings % |
|---|---|
| Motion-captured gestures | 86.67 |
| Text2Gestures (this paper) | 91.33 |
Each condition received 150 responses. The percentages in the chart give the shares of ratings meeting the threshold within those sets of responses. The authors also report that the generated clips received scores of 4 and 5 more often, with reported differences of 2.00% and 3.33%, respectively. The concealed source of each animation makes it possible to compare how the clips appeared to viewers without an explicit cue that motion capture should look more realistic.
The paper offers a possible reason why generated movement could receive slightly more favorable ratings. The generated sequences tend to return to rest, while the motion-captured sequences stop in the pose held at the end of the sentence. A viewer can perceive that difference even when the motion before the ending looks human in both clips. The study reports the ratings of the animations as presented, which allows finishing behavior to contribute to the overall impression.
Participants also reported difficulties with the presentation. The authors report that 14% were distracted by the lack of facial emotion, 10% had trouble determining emotion from the gestures alone, and 8% experienced both difficulties. Some ratings also reflected stray self-collisions in the animated clips. Together with the correlation results, the feedback shows that recognizable bodily cues were frequently available while still leaving some viewers wanting other forms of expression or finding visible problems with particular movements.
What the ablations show
What changes when a training loss is removed
The authors test the training losses by removing each one in turn and retraining the network from scratch with the others. This design asks what happens when a particular source of supervision is absent during learning. Since the resulting systems have all adapted to the objective they were given, the comparison can reveal whether two losses that seem similar on paper provide different information in practice. The authors examine both mean position error and the movement visible in selected test examples.
Effect of the training losses on MPI test-set pose error
The complete loss gives the lowest pose error, and omitting angle supervision gives the largest error among the ablations.
The numbers
| System or setting | normalized mean pose error |
|---|---|
| Without angle loss | 0.07 |
| Without pose loss | 0.06 |
| Without affective loss | 0.06 |
| All losses (this paper) | 0.05 |
Every ablation increases the overall error according to the reported precision. The fact that two alternatives share the same reported pose error makes the qualitative part of the study important. Positions, rates of change, and expressive shape are related, but the same degree of positional agreement can accompany different animation defects. The trajectory plots and pose snapshots help locate those differences.
Angle and pose supervision have distinct effects
Without the angle loss, the displayed head and wrist trajectories are substantially jerkier. The remaining objective still evaluates positions and affective geometry on each frame. The missing loss, however, is the one that explicitly compares changes in rotation between successive frames. The trajectory plots expose rapid irregular changes that can make an animation feel unstable even when many individual poses resemble the reference. In the test averages, this is the loss removal associated with the largest positional error among the ablations.
Removing the pose loss leaves the rotation-based temporal supervision in place. In the examples the resulting motion is smoother than in the ablation without angle supervision, although the authors still observe jerkiness and poorer tracking of the reference paths. The difference makes sense in terms of the joint tree. A sequence of local rotations can appear reasonable at the joints where it is specified, yet several angular errors can accumulate through the limbs. A loss measured at the resulting positions penalizes the combined effect of those changes.
The authors also report that animations produced without either of these losses can look rigid and restricted. This can coexist with jerkiness. The range the body moves through can stay small while its motion within that range changes abruptly. Conversely, a large movement can look smooth if its frame-to-frame progression is coherent. The qualitative comparison therefore describes two aspects of the movement that an average error cannot easily separate: the extent of the gesture and the regularity of the path through it.
Affective supervision changes the character of the movement
With the affective loss removed, the network still receives direct supervision of angles and positions. The examples can consequently retain a varied range of movement and appear fluid. The reported weakness is the match between specific expressive movements and the intended emotion. The authors point to changes in arm spread, contraction toward the body, and head shaking that are less consistent with the target expression. The feature loss gives the network an additional cost for losing these patterns, even when the resulting gesture is otherwise credible.
The screenshots compare poses at selected timesteps in the same test cases used for the trajectories. A snapshot can make differences in arm spread or head posture clearer than a plot of Cartesian coordinates. The plots, in turn, show whether a motion unfolds smoothly over time and whether a joint reproduces the excursions in the recording. Together they illustrate why removing the affective term can leave recognizable body motion while changing what that motion appears to express.
The evidence for the affective term consists of the benchmark change and the authors’ qualitative comparisons of the variants. The reported human emotion correlations are for the complete system. Accordingly, the ablations support a contribution from the feature loss to the shape and timing of the shown expressions, while the study of viewer responses describes what the complete training recipe achieved. The paper gives no corresponding viewer correlation for a version trained without the affective term.
The word-representation trials are a separate preliminary comparison. They motivate the choice of GloVe, but the paper reports those outcomes qualitatively. The main controlled comparisons retrain the gesture network after changing a training loss. They leave open how much of the overall gain over the earlier system comes from the attention architecture, the skeletal representation, or the conditioning inputs individually.
Limitations
Limits the authors identify
The paper’s first stated limit is the granularity of the mapping. Text2Gestures receives a whole sentence, and the training examples pair the sentence with the entire movement. A gesture may carry information associated with a particular phrase, yet this setup gives no explicit correspondence between that phrase and its frames. The authors propose investigating phrase-level mappings and how their movements might be composed into an animation for a complete sentence. This would make it possible to ask more precisely how parts of an utterance contribute to the movement.
Continuity across sentences is another limit. The training examples begin at rest, and generated gestures return to the designated end pose after each line. The procedure can support a story told sentence by sentence, but a conversational motion may naturally continue across a sentence boundary. The authors mention using the final pose window from one sentence to initialize the next as a possible extension. They also point out the need for recordings of transitions to train or evaluate the resulting movement. A system initialized in the middle of an ongoing gesture needs evidence about where that gesture should go next.
The treatment of emotion is limited to a categorical term supplied for the sentence and converted to valence, arousal, and dominance. The authors attribute the choice of a single emotion in part to the available training data. A sentence with mixed feelings, or with a delivery that changes halfway through, falls outside that setup. The paper proposes studying how the affective values of individual words relate to the emotion assigned to a line. It also proposes studying how affective representations vary with gender, age, and ethnicity to support a broader range of expressive behavior.
The paper evaluates gestures without emotional facial movements or vocal tone. This lets observers focus on the body and reduces the influence of facial or vocal cues on their judgments. In ordinary interaction, those cues also shape how the body is read and may draw much of the observer’s attention. The authors propose combining the gestures with expressive faces and voices and measuring how the channels work together. They also identify integration into socially aware conversational systems as future work.
Limits visible in the experimental design
The sentence is only one part of the generation input. An intended emotion, a task, and agent settings have to come from somewhere before the network turns the line into movement. In these experiments the relevant attributes are available as annotations or assigned settings. The reported results therefore concern gesture generation under specified conditions. They do not establish how well a system could infer an appropriate emotion from a new conversation, resolve an ambiguous utterance in context, or change those instructions in response to a partner’s behavior.
The skeleton covers the body, and the comparative evaluation covers a smaller domain. The agents sit in chairs, the affective features are measured primarily on expressive upper-body joints, and the comparative error is restricted to the upper-body joints shared with the earlier method. The setup gives a detailed view of seated gesture generation. It leaves standing movement, locomotion during speech, and the coordination of gestures with pronounced lower-body action outside the demonstrated results. Similarly, gender and handedness are categorical conditioning settings. The test does not establish how expressive movement varies across a broader range of bodies or people.
The normalized position error rewards closeness to the recorded performance for each test item. A sentence can be delivered with several plausible gestures, including ones that would place the joints far from the particular reference. For that reason, the benchmark is most directly a test of agreement with the recording, while the user study separately asks whether viewers accept the result. The benchmark comparison includes a single close predecessor adapted to the same split. That is informative about the tested pair of systems, while leaving broader comparisons and generalization to other kinds of recordings unresolved.
The emotion result also depends on the task viewers were given. Each answer set contains the intended category, and the alternatives can differ from it by varying amounts. The authors recognize that certain sets of distractors may make the target easier to choose. Ratings are converted to the same lexical coordinates used to specify the target, so the reported correlation reflects choices among emotion terms under that procedure. It gives no direct measure of how readily viewers would volunteer the intended label, or how frequently they would recover it if nearby alternatives were always present.
The naturalness comparison gives different randomly selected movements to participants under each condition, with no corresponding captured and generated clip shown together. This lets participants rate distinct clips without knowing origin. It also means that the reported percentages describe the displayed sets rather than paired decisions about which performance of a given sentence looks better. The paper’s proposed explanation involving a smooth return to rest is plausible from the described presentation, but the comparison does not isolate that ending from the rest of the animation.
Finally, the throughput figure concerns one GPU and measures production of a gesture frame. A responsive conversational agent also has to acquire the line, determine how it should be delivered, and coordinate animation with other output. The paper demonstrates rapid animation generation and gives examples of an interactive interface. It leaves the timing and effectiveness of an extended, socially responsive interaction unmeasured.
What came after
There is no documented follow-up study to describe here. The paper closes with open questions about carrying movement across sentence boundaries, aligning gestures to phrases, and combining bodily expression with emotional voice and face cues. Those are directions proposed by the authors. The results reported in Text2Gestures concern sentence-level generation and the perception of its gestures under the tested conditions.
Cite
Cite as Uttaran Bhattacharya, Nicholas Rewkowski, Abhishek Banerjee, Pooja Guhan, Aniket Bera and Dinesh Manocha. 2021. Text2Gestures: A Transformer-Based Network for Generating Emotive Body Gestures for Virtual Agents. arXiv:2101.11101 · IEEEVR 2021, pp. 1-10.
@misc{bhattacharya2021text2gestures,
title = {{Text2Gestures: A Transformer-Based Network for Generating Emotive Body Gestures for Virtual Agents}},
author = {Uttaran Bhattacharya, Nicholas Rewkowski, Abhishek Banerjee, Pooja Guhan, Aniket Bera and Dinesh Manocha},
year = {2021},
doi = {10.1109/vr50410.2021.00037},
eprint = {2101.11101},
archivePrefix = {arXiv},
url = {https://doi.org/10.1109/vr50410.2021.00037}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bhattacharya-2021-text2gestures-transformer-based-network-generating/