Affect-LLaMA: Multimodal Human Affect-State Recognition via PEFT Foundation Models
Master's dissertation at Institute of Science Tokyo (2026). A trimodal framework adapting LLaMA-3.1-8B via LoRA, achieving #1 Valence CCC (0.6610) and State-of-the-Art Expression F1 (0.4364) on the Aff-Wild2 ABAW Benchmark.
Master Dissertation
Author: Erdenebat BATTSEREN
Institution: Institute of Science Tokyo (formerly Tokyo Institute of Technology), 2026
Repository: github.com/Rdnbt/masterthesis
Human affective behavior is intrinsically multimodal, synthesized across subtle facial micro-expressions, vocal prosody, pitch modulations, and contextual linguistic semantics.
This research investigates whether a Large Language Model (LLM) backbone, adapted via Parameter-Efficient Fine-Tuning (PEFT), can serve as a coherent cross-modal fusion and inference engine for in-the-wild affect recognition. We introduce Affect-LLaMA, a trimodal framework built upon LLaMA-3.1-8B that integrates continuous visual facial streams, acoustic waveforms, and synchronized speech text.
Evaluated on the Aff-Wild2 benchmark from the International Affective Behavior Analysis in-the-wild (ABAW) Challenge, Affect-LLaMA achieved the #1 Valence score (0.6610 CCC) and an overall Valence-Arousal score of 0.6480 CCC, outperforming specialized computer vision ensembles.
Interactive Computational Apparatus
Explore the real-time affective coordinate space, test continuous valence-arousal regression, and inspect cross-modal attention dynamics using the interactive module below:
System Architecture
The core hypothesis of this work is that pre-trained autoregressive foundation models possess rich semantic manifolds capable of performing cross-modal inference when provided with lightweight projection adapters.

1. Trimodal Feature Extraction Pipeline
-
Visual Modality (): We freeze CLIP-ViT-Large-Patch14 pre-trained on large-scale image-text pairs. Video frames are sampled and resized to . The pooled 1024-dimensional visual feature vector is projected to the 4096-dimensional LLaMA hidden dimension through a learnable Multi-Layer Perceptron (MLP) projector :
where is the GELU activation function.
-
Acoustic Modality (): Raw audio is resampled to 16kHz. For each video frame at timestamp , a symmetric 3.0-second window is passed through a frozen HuBERT-Base-LS960 encoder. Global average pooling over the temporal dimension compresses the acoustic state into , which is mapped to LLaMA space via :
-
Linguistic Modality (): Audio tracks are transcribed into text timestamps using OpenAI Whisper. When active speech coincides with timestamp , the spoken transcript is incorporated. When no speech is detected, an explicit silence prompt is constructed ("The user is silent. Analyze their face and voice to estimate valence and arousal."), preventing hallucination.
2. Input Concatenation & Cross-Modal Self-Attention
The projected acoustic and visual embeddings act as non-verbal soft prefix prompts prepended to the instruction token embeddings:
By passing directly into LLaMA's decoder layers, the standard self-attention mechanism natively attends across modalities:
Parameter-Efficient Fine-Tuning (PEFT): Adapter vs. LoRA
Full fine-tuning of an 8-billion parameter foundation model is computationally prohibitive and risks catastrophic forgetting of pre-trained linguistic knowledge. In this research, we designed, implemented, and empirically benchmarked both primary PEFT architectures directly within the LLaMA 3.1 8B transformer blocks:
- LLaMA-Adapter Modules (Houlsby et al.): Sequential bottleneck sub-networks inserted after attention and feed-forward layers.
- LLaMA-LoRA (Hu et al.): Parallel low-rank decomposition matrices bypassing the frozen linear projection weights.
After systematic experimentation, LoRA consistently outperformed Adapters across all evaluation axes: achieving higher Expression Macro F1 (+1.66%), superior Action Unit detection (+1.58%), and higher Valence-Arousal correlation (+0.50% CCC), while requiring 3.1× fewer trainable parameters (0.0153% vs 0.047%) and incurring zero runtime latency overhead via weight folding.
Empirical evaluation of parameter-efficient adaptation strategies on multimodal affect recognition
Structural Topology: Sequential Bottleneck vs. Parallel Rank Decomposition
Both architectures were proposed and evaluated within each of the 32 LLaMA 3.1 8B Transformer layers.
LLaMA-Adapter Modules
LLaMA-LoRA Low-Rank Adaptation
Mathematical Formulation of Adapter vs. LoRA
For an input hidden state , the sequential bottleneck Adapter module computes:
In contrast, LoRA keeps pre-trained weight matrices strictly frozen and injects trainable rank decomposition matrices and in parallel, where rank :
We applied LoRA adapters with rank and scaling factor across all linear layers (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj).
======================================================================
Trainable Parameters : 1,228,830
Total Parameters : 8,031,490,078
Trainable Percentage : 0.0153%
Quantization Format : NormalFloat 4-bit (NF4 via BitsAndBytes)
Compute Precision : bfloat16
Acceleration Library : Unsloth + PyTorch
======================================================================
By updating only 0.0153% of parameters, the entire trimodal architecture trains in under 15 GB of VRAM, fitting comfortably on a single NVIDIA A100 or RTX 3090 GPU, while delivering higher F1 and CCC scores than sequential adapter modules.
Mathematical Training Objectives
The framework is trained jointly across three distinct affective tasks:
1. Continuous Valence-Arousal Hybrid Loss
Valence (pleasantness) and Arousal (intensity) are continuous values in . We combine Mean Squared Error (MSE) with the Concordance Correlation Coefficient (CCC) loss:
Where and denote means and standard deviations over the batch, and is the Pearson correlation coefficient. The CCC metric penalizes shifts in scale and location, ensuring accurate dynamic trajectory tracking.
2. 8-Class Categorical Expression Loss
For discrete emotion recognition (Neutral, Anger, Disgust, Fear, Happiness, Sadness, Surprise, Other), we optimize class-weighted Cross-Entropy to handle dataset imbalance:
3. Multi-Label Action Unit (AU) Detection
For detecting 12 concurrent Facial Action Units (AU1, AU2, AU4, AU6, AU7, AU10, AU12, AU15, AU25, AU26), we use positive-weighted Binary Cross-Entropy with Logits:
Benchmark Results on Aff-Wild2

Continuous Valence & Arousal (VA) Estimation
Comparison against the top-performing international teams from the ABAW Challenge Leaderboard:
| Rank | Team / System | Total CCC | Valence CCC | Arousal CCC |
|---|---|---|---|---|
| 1st | Affect-LLaMA (Ours) | 0.6480 | 0.6610 | 0.6350 |
| 2nd | SituTech | 0.6414 | 0.6193 | 0.6634 |
| 3rd | Netease Fuxi | 0.6372 | 0.6486 | 0.6258 |
| 4th | CBCR | 0.5913 | 0.5526 | 0.6299 |
| 5th | CtyunAI | 0.5666 | 0.5008 | 0.6325 |
| 6th | HFUT-MAC | 0.5342 | 0.5234 | 0.5451 |
| 7th | HSE-NN-SberAI | 0.5048 | 0.4818 | 0.5279 |
| — | ABAW Baseline | 0.2010 | 0.2110 | 0.1910 |
Affect-LLaMA achieved the highest Valence CCC (0.6610) in the competition, confirming that the LLM's deep contextual understanding provides critical disambiguation when judging facial sentiment.

Expression Classification (EXPR)
Evaluated on the 8-class categorical emotion task:
| Team / System | Macro F1 | Accuracy |
|---|---|---|
| Affect-LLaMA (Ours) | 0.4364 | 55.44% |
| Netease Fuxi Virtual Human (ABAW Winner) | 0.4121 | — |
| SituTech | 0.4072 | — |
| CtyunAI | 0.3532 | — |
| HFUT-MAC | 0.3337 | — |
| ABAW Baseline | 0.2050 | — |
Affect-LLaMA outperforms the 2023 ABAW Challenge winner by +2.43% F1, demonstrating that a single foundation model architecture outperforms complex multi-stage ensemble pipelines.
Action Unit (AU) Detection
Evaluating multi-label occurrence across 12 distinct facial muscle movements:
| Team / System | Macro F1 |
|---|---|
| Netease Fuxi Virtual Human | 0.5549 |
| SituTech | 0.5422 |
| USTC-IAT-United | 0.5144 |
| Affect-LLaMA (Ours) | 0.4793 |
| HFUT-MAC | 0.4752 |
| SCLAB CNU | 0.4563 |
| ABAW Baseline | 0.3650 |


The integration of textual tokens particularly benefited speech-correlated Action Units, such as AU25 (Lips Part) and AU26 (Jaw Drop), confirming cross-modal reinforcement.
Ablation Study: Unimodal vs. Trimodal Fusion
To quantify the exact performance gain contributed by multimodal fusion, we compared unimodal baselines against our full trimodal model:
| Task | Metric | Visual Only (LoRA) | Trimodal (LoRA) | Relative Gain |
|---|---|---|---|---|
| Valence-Arousal | Avg. CCC | 0.3826 | 0.6480 | +69.4% |
| Expression | Macro F1 | 0.3557 | 0.4364 | +22.7% |
| AU Detection | Macro F1 | 0.4831 | 0.4793 | Comparable |
The dramatic +69.4% increase in continuous Valence-Arousal correlation demonstrates that human emotional dynamics cannot be fully resolved from visual pixels alone; vocal timbre and verbal context provide crucial complementary signals.
Qualitative Analyses & Time-Series Tracking
Continuous Frame-by-Frame Tracking
We tested continuous temporal tracking across challenging validation clips featuring extreme lighting, occlusion, and head pose variations:

Figure: Continuous frame-by-frame estimation on Video 259. Top curve shows Valence, bottom curve shows Arousal. The model achieves 0.73 Valence CCC and 0.63 Arousal CCC, maintaining tight concordance with ground-truth human annotations.

Figure: Video 186 tracking under rapid affective transitions and mild facial expressions.
Latent Manifold Structure (t-SNE)
To visualize how the 8B foundation model organizes multimodal affective representations, we projected high-dimensional embeddings into a 2D plane via t-SNE:

- Sadness & Disgust: Form tightly bounded, well-separated manifolds, indicating robust multimodal acoustic-visual signatures.
- Happiness & Surprise: Prominent distinct clusters in high-arousal territory.
- Neutral: Sits centrally at the manifold centroid, reflecting natural affective equilibrium.

Key Conclusions
- Parameter Efficiency: LoRA low-rank adaptation () is sufficient to repurpose a frozen 8B LLM into a multi-task continuous affective regression engine without catastrophic forgetting.
- Complementary Modalities: Audio provides crucial disambiguation for arousal intensity, while speech semantics anchor valence estimation during subtle or ambiguous facial expressions.
- Temporal Stability: Foundation models trained with CCC correlation loss exhibit smooth temporal tracking across video time series, resisting frame-level flicker and occlusion artifacts.
Citation
@mastersthesis{erdenebat2026affectllama,
title = {Affect-LLaMA: Multimodal Human Affect-state Recognition utilizing PEFT Methods},
author = {Erdenebat Battseren},
school = {Institute of Science Tokyo},
year = {2026},
url = {https://github.com/Rdnbt/masterthesis}
}