Emoturn

Emoturn

Behavior, not sentiment. Eight dials for every turn.

Emoturn is a compact bilingual behavior model for dialogue systems. Given a conversation up to the current user turn, it predicts the behavioral posture that an assistant should adopt in its next response across eight continuous dimensions:

Dimension Meaning
warmth Interpersonal warmth
empathy Emotional acknowledgment and care
curiosity Interest in exploring the user's context
creativity Willingness to generate novel options
rigor Analytical precision and verification
directness Explicitness and absence of hedging
assertiveness Confidence and proactive recommendation
caution Risk awareness and restraint

It also predicts:

  • confidence β€” confidence associated with the target behavior;
  • change_probability β€” whether the behavior should shift from the previous turn;
  • target_intensity β€” overall strength of the behavioral response.

Emoturn does not classify the user's emotion, infer personality, or diagnose mental health. It estimates how an assistant should behave, not how the user feels.

Why Emoturn

Most dialogue systems model what to say, but leave how to say it implicit. Emoturn makes that decision explicit, continuous, and inspectable. The goal is to provide a small, reusable signal for research on:

  • behavior-aware prompting;
  • activation steering;
  • dynamic adapter selection;
  • multi-turn response-style control;
  • human-in-the-loop evaluation of assistant behavior.

Architecture

Emoturn V1 is intentionally small:

  1. A frozen FacebookAI/xlm-roberta-base encoder reads the conversation prefix.
  2. Attention-mask mean pooling produces one contextual vector per user turn.
  3. A GRUCell with a 256-dimensional hidden state processes turns sequentially.
  4. State, gate, confidence, and intensity heads produce the final outputs.

Multi-turn behavior is modeled recurrently rather than as independent single-turn classifications. Context is truncated to 192 tokens per turn.

The behavioral model is independent of the generation model and can be used alongside different LLMs.

Base Model Relationships

This repository contains one behavioral model and one optional generation adapter. Their base models are different:

  • Emoturn behavioral model β€” built on FacebookAI/xlm-roberta-base. The XLM-R encoder is frozen and its weights are included in checkpoints/emotion_model_best.pt. This is the model declared in the base_model metadata above.
  • Companion QLoRA adapter β€” built on Qwen/Qwen3.5-4B. It is stored under adapters/quality_sft_adapter/ for generation experiments and is not part of Emoturn's behavioral architecture.
  • Local Qwen3-8B β€” used only as a generation test backend. No Qwen weights are included in this repository.

In short: Emoturn's base model is XLM-R, not Qwen. Qwen is only used downstream for text generation in integration tests.

Generation Compatibility

Emoturn has been tested alongside two generation stacks:

  • Qwen3.5-4B with the companion QLoRA adapter on CUDA;
  • a local Qwen3-8B GGUF model served through Ollama on CPU.

These tests validate the integration between behavior-state inference and text generation. They do not establish that Emoturn improves generation quality.

Training Data

Turn-level contexts were derived from the bilingual llamafactory/DPO-En-Zh-20k preference dataset. The V1 behavioral labels cover approximately 11.9k Chinese and English turns.

The labels were generated with two LLM annotators and validated for schema consistency and range correctness. They are weak labels, not human-gold annotations. Train, validation, and test splits were grouped by conversation to reduce leakage across turns.

Training Setup

  • Frozen 12-layer XLM-R encoder;
  • 256-dimensional GRU state;
  • five training epochs;
  • AdamW with learning rate 2e-4 and weight decay 0.01;
  • batch size two paths, up to 192 tokens per turn;
  • Smooth L1 state loss, combined with gate BCE, confidence MSE, intensity MSE, and a turn-to-turn smoothness penalty;
  • checkpoint selected by validation loss.

Evaluation

Held-out test results on weakly labeled data:

Metric Value
Overall state MAE 0.1767
Constant baseline MAE 0.1205

Per-dimension MAE:

Dimension MAE
warmth 0.1225
empathy 0.0706
curiosity 0.1174
creativity 0.1679
rigor 0.2569
directness 0.2844
assertiveness 0.2304
caution 0.1633

Important evaluation note

Emoturn V1 does not outperform the constant train-mean baseline overall. Predictions tend to contract toward the middle of the output range, and directness, assertiveness, and rigor are especially weak.

This checkpoint should therefore be treated as an initial research artifact and a reproducible baseline, not as evidence that the behavioral model is ready for production use.

QLoRA Adapter

The companion quality_sft_adapter is a QLoRA adapter for Qwen/Qwen3.5-4B, trained on the chosen responses from the preference data as a short quality-SFT smoke run.

It is not a behavior adapter, is not conditioned on Emoturn's eight-dimensional state, and should not be presented as a completed hybrid-control system. It exists to support comparison and further experimentation.

Files

Path Contents
checkpoints/emotion_model_best.pt Full strict state_dict, including the frozen encoder
checkpoints/emotion_model/tokenizer/ XLM-R tokenizer files
adapters/quality_sft_adapter/ Companion Qwen3.5-4B QLoRA adapter
inference.py Standalone behavioral inference implementation
requirements.txt Minimal inference dependencies
emoturn-mark.svg Emoturn mark

Usage

pip install -r requirements.txt
from pathlib import Path

from huggingface_hub import snapshot_download

from inference import EmotionEngine

model_dir = Path(snapshot_download("Salmoncat/emoturn-v1"))
engine = EmotionEngine(model_dir)

result = engine.predict([
    {"role": "user", "content": "I keep postponing this, but I cannot explain why."}
])

print(result["target_state"])

The behavioral encoder runs on CPU without requiring Transformers. A CUDA GPU is only needed when using the separate Qwen3.5-4B QLoRA generation stack.

Intended Use

Emoturn is intended for:

  • research on dialogue behavior representation;
  • interactive inspection of multi-turn behavioral state;
  • baseline comparisons for future behavior-control methods;
  • teaching and prototyping behavior-aware interfaces.

Out of Scope

Do not use Emoturn for:

  • sentiment analysis or emotion recognition;
  • psychological profiling, diagnosis, or crisis assessment;
  • personality inference;
  • moderation or hiring decisions;
  • autonomous control of user-facing systems without human review.

Limitations

  • Training labels are LLM-generated weak labels without human-gold evaluation.
  • Overall regression error is higher than a constant baseline.
  • Outputs cluster near the mean rather than producing sharply differentiated states.
  • The 192-token per-turn context limit discards long-range conversational evidence.
  • The model was evaluated on a single bilingual preference-derived dataset.
  • Behavior predictions are not yet used to steer generation in a learned or validated way.
  • The QLoRA adapter is a generic quality-SFT experiment, not a behavior-conditioned controller.

Status

V1 research preview. The inference path and evaluation pipeline are functional. The behavioral model itself is not yet validated as an improvement over the baseline.

License

Apache-2.0 for the Emoturn code and trained artifacts. The base encoder and generation models retain their respective upstream licenses.

Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Salmoncat/emoturn-v1

Finetuned
(4,343)
this model

Dataset used to train Salmoncat/emoturn-v1