Views
No views yet
⚠️ Methodology demonstration, not a production B2B model. Trained on consumer (C2C) Craigslist price-haggling; treat numbers as a demonstration of the method, not certified B2B performance.
each turn ──► RoBERTa (frozen, fine-tuned) ──► CLS [768]
│ sequence
Temporal Transformer (2L, 8 heads) ◄──┘ ──► mean-pool ──► e_conv [768]
│
LIWC features (90-d) ──► Conditioning MLP ──► γ, β [768] ──► e_fused = γ ⊙ e_conv + β
│
σ(Linear(768→1)) ──► LOSS PROBABILITY
+ SHAP seams (token · turn · feature) ──► coachingexternal_mode="identity") — fetched & shown
live but not used in the trained score, to avoid label leakage. (No learnable external params.)| Model | Test AUC-ROC |
|---|---|
| Flat RoBERTa (turn encoder) | 0.804 |
| Temporal transformer (val) | 0.939 |
| Full FiLM pipeline | 0.899 |
models/roberta_turn_encoder/ # HF-native frozen fine-tuned encoder (AutoModel)
models/temporal_transformer.pt # 2-layer temporal transformer state_dict
models/film_head.pt # FiLM conditioning + classifier state_dict
models/roberta_aux_head.pt # aux head for token-SHAP (approximate)
models/liwc_scaler.joblib # MinMaxScaler (train-fit) for LIWC features
models/calibration.json # Platt {a,b}
models/metrics.json # measured metrics
src/ # modeling code to reconstruct the pipeline
inference.py # runnable example1pip install -r requirements.txt
2python inference.py1from src.inference.live_scorer import LiveScorer
2scorer = LiveScorer.build()
3out = scorer.score([
4 {"speaker": "buyer", "text": "Is the charger still available?"},
5 {"speaker": "seller", "text": "Yes, asking $10."},
6 {"speaker": "buyer", "text": "That is too expensive, $4 is my max."},
7 {"speaker": "seller", "text": "I could maybe do $8."},
8 {"speaker": "buyer", "text": "No. $4 or I am done."},
9], fetch_external=False)
10print(out["loss_probability"], out["tipping_turn"], out["coaching"])1@inproceedings{he2018decoupling,
2 title={Decoupling Strategy and Generation in Negotiation Dialogues},
3 author={He, He and Chen, Derek and Balakrishnan, Anusha and Liang, Percy},
4 booktitle={EMNLP}, year={2018}
5}roberta-base (MIT) · empath (MIT). License of this repo: MIT (see LICENSE).