Paper · 2018-08-29 · cs.CL
Decoupling Strategy and Generation in Negotiation Dialogues
Splits a negotiation bot into a manager that picks coarse dialogue acts such as propose(price=150) and a retrieval generator that writes the sentence. Act-level RL keeps human-likeness at 2.8 to 3.0 of 5 on CraigslistBargain, where word-level RL falls to 1.7 to 1.9 (author-reported).
Dialogue generationPolicy gradientHuman evaluationnegotiationtask-oriented-dialoguereinforcement-learningretrieval-based-generation
arXivPDFCodeMarkdown16 min read
AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
A bot that negotiates a price has to make two decisions at every turn: what move to make (ask for a lower price, accept, insist) and how to word it. End to end neural models learn both at once from human chats. That makes the strategy hard to control, and when they are trained to win the game they often collapse into repeating the same sentence.
The paper separates the two jobs. Each sentence is first reduced to a short label that keeps only its high-level move, such as "propose this price". A manager chooses the next label. A generator then picks a human-written sentence that fits that label and the conversation so far. Because the manager works on labels, a developer can set the strategy directly, by training it on data, by rewarding it for a goal, or by writing rules.
The authors also collected a new dataset of buyer and seller chats about real Craigslist listings, which contain more varied language than earlier game-based datasets. In human chats, the modular systems were rated about as human-like as the end-to-end ones, and reinforcement learning on the labels avoided the repetition seen when reinforcement learning was applied to the words directly.
TL;DR
- A modular negotiation bot: a rule-based parser turns each utterance into a coarse dialogue act (intent plus arguments), a manager picks the next act, and a retrieval generator fills in the wording §3.2 §3.3 §3.5.
- Three ways to train the manager: supervised learning on human acts, policy gradient on the acts with utility, fairness or length rewards, and a hybrid that uses a learned intent sequence with hand-coded argument rules §3.4.
- Author-reported: act-level RL keeps human-likeness near the supervised systems while RL on words collapses. The paper reports this on the new CraigslistBargain (CL) data and on DealOrNoDeal (FB) tab. 7.
- The official code (MIT, Stanford NLP) is Python 2.7 and PyTorch 0.4 and differs from the paper in several training details listed under Paper vs code.
Problem
End-to-end neural dialogue models learn strategy and language together. The authors say this makes the strategy hard to control and interpret, and that reinforcement learning on the words tends to produce degenerate text, such as ungrammatical or repetitive utterances §1. Earlier negotiation datasets were collected in closed games with few objects, such as dividing books, hats and balls, or Settlers of Catan resources, which restricts the language used §2.
The authors assume that a coarse act is enough to capture the strategy, but not the meaning of an utterance. The generator therefore has to read the full dialogue history, not only the act §3.2.
Method
Scenario and task. Two agents negotiate the price of a real item from a Craigslist posting. The listing price is shown to both. The buyer also gets a private target price, set at 0.5, 0.7 or 0.9 times the listing price. Either agent can make an offer at any time, and the other can accept, reject or quit §2. The dataset was collected on Amazon Mechanical Turk §2 tab. 3.
Coarse dialogue acts (CDA). An act has an intent and a set of arguments,
for example propose(price=15) for "I am willing to pay $15" §3.2. The
authors use fewer than ten intents, and argument values are normalised and
binned §3.4.
The system has three modules, run once per turn §3.2:
- Parser: maps the partner's last utterance x_{t-1} to an act z_{t-1}, using the dialogue history and the scenario. It is deterministic and rule-based §3.3.
- Manager: predicts the next act z_t from the past acts z_{<t} and the scenario c §3.4.
- Generator: turns z_t into a sentence x_t using the full history x_{<t} §3.5.
Parser. It detects entities (prices, items) and matches keyword patterns.
The rules are checked in an ordered list and the first matching intent wins.
If no rule fires, the act is unknown §3.3. The intent rules are in tab. 5.
Price detection and, for FB, item and count detection are in app. B.
| Intent | Matching rule (paper) | Source |
|---|---|---|
| greet | "hi", "hello", "hey", "hiya", "howdy" | tab. 5 |
| disagree | "no", "not", "n't", "nothing", "dont" | tab. 5 |
| agree | no negation, and a short acknowledgement such as "deal" or "that works" | tab. 5 |
| insist | the same offer as the previous one | tab. 5 |
| inquire | opens with a question word such as "what" or "where", or an auxiliary such as "do" | tab. 5 |
| intro (CL) | greet, or "how are you", or "interested" | tab. 5 |
| propose (CL) | first price mention | tab. 5 |
| vague-price (CL) | no price mentioned, but a phrase asking for a move, such as "come down" or "too high" | tab. 5 |
| counter (CL) | new price detected | tab. 5 |
| inform (CL) | previous act was inquire | tab. 5 |
| propose (FB) | items and their counts are detected | tab. 5 |
Price detection (CL): a number counts as a price if it starts or ends with a dollar sign. Otherwise it counts if its neighbouring words appear next to known prices in the training data, and it is at most 1.5 times the listing price app. B.
Manager. Three variants §3.4:
-
Supervised (SL). A sequence-to-sequence model with attention, trained by maximum likelihood on the parsed training dialogues. Each act is a token sequence, such as "offer 150". An LSTM encodes the partner's act and another decodes the agent's act. Hidden states are carried through the whole dialogue.
-
Reinforcement learning (RL). The SL model is fine-tuned with a reward on the whole act sequence R(z_{1:T}). Three rewards are used:
- Utility: linear in the final price. The buyer gets 1 at its target, the seller gets 1 at the listing price, and both get 0 when the final price sits halfway between the listing price and the buyer's target. The game is zero-sum. For FB, utility is the total value of the items the agent receives.
- Fairness: the difference between the two agents' utilities.
- Length: the number of utterances, which encourages long dialogues.
The reward is -1 if no agreement is reached §3.4. The update is policy gradient with a baseline, given in eq. 1. Pseudocode is below.
-
Hybrid. The intent is predicted by a trigram language model over intent sequences from the training data. The arguments are filled in by rules. For CL, the agent always splits the difference when it counter-proposes, rejects an offer worse than its bottomline and accepts otherwise §4.2. For FB, the agent keeps an estimate of the partner's utility and gives up the item with the lowest value of own utility minus partner utility. It also agrees when a proposal beats the previous one or its target §4.2.
Policy-gradient update §3.4 eq. 1. For a sampled trajectory with final reward r, the authors update the parameters with the log-likelihood of each generated token, weighted by (r - b). Here b is the average return so far, used for variance reduction. Equation 1 is printed with a minus sign in front of the learning-rate term. See Pitfalls: the code performs ascent on this objective.
# Policy-gradient fine-tuning of the manager [§3.4] [eq. 1]
# Input: manager parameters theta, fixed partner model, scenarios
# Output: fine-tuned theta
def finetune(theta, partner, scenarios, num_dialogues, lr):
returns = []
for episode in range(num_dialogues):
# Self-play one dialogue; the learned agent emits acts z_1..z_T [§4.3]
scenario = sample_scenario(scenarios)
acts, log_probs = rollout(theta, partner, scenario)
# One scalar reward for the whole act sequence [§3.4]
reward = reward_fn(acts, scenario)
returns.append(reward)
# Baseline b: average of the returns seen so far [§3.4]
baseline = mean(returns)
# Raise the log-probability of the sampled acts in proportion to
# the advantage [eq. 1]
advantage = reward - baseline
theta = theta + lr * advantage * grad_theta(sum(log_probs))
return thetaPrice normalisation for act models §4.2. Prices are rescaled so that the agent's target is 1 and its bottomline is 0. For a buyer, the scale runs from its private target (mapped to 1) down to the listing price (mapped to 0). For a seller, the listing price maps to 1 and 0.7 times the listing price maps to 0. The scaled values are rounded to two decimals and binned. In the code this is a linear map p' = (p - b)/(t - b) price_tracker.py price_tracker.py.
Generator. Retrieval-based generation §3.5:
- Each training utterance is stored as a tuple of its context template d(x_{t-1}), the previous act, its own template d(x_t) and its act z_t. Templates replace arguments with placeholders such as
[price], which are filled at generation time. - Given z_t, keep candidates whose intent matches both z_t and z_{t-1}.
- Rank them by the dot product of TF-IDF bag-of-words vectors of their context template and the current context.
- Sample one candidate from the top K, with probabilities from a trigram language model over the training templates. Sampling adds diversity.
# Retrieval-based generation of the reply to act z_t [§3.5]
# Input: act z_t, previous act z_(t-1), dialogue context text
# Output: a template with placeholders, e.g. [price]
def generate(act, prev_act, context_text, database):
# Only candidates whose intents match z_t and z_(t-1) survive [§3.5]
candidates = [c for c in database
if c.intent == act.intent
and c.prev_intent == prev_act.intent]
# Rank by TF-IDF dot product of the context template d(x_(t-1))
# and the current context [§3.5]
scores = tfidf_dot(candidates, context_text)
# Keep the top K candidates; K is not stated in the paper [§3.5]
top = top_k(candidates, scores, K)
# Sample one, with probabilities from a trigram LM over the training
# data, to encourage diversity [§3.5]
template = sample_by_trigram_lm(top)
# Fill the placeholders from the act's arguments [§3.5]
return fill(template, act.arguments)Models compared tab. 6:
| Model | Act z | Parser | Manager | Generator |
|---|---|---|---|---|
| SL/RL (word) | vector | learned | learned | generative |
| SL/RL (act) | logical | rules | learned | retrieval |
| Hybrid (SL(act)+rule) | logical | rules | hybrid | retrieval |
The paper names the word-based systems SL(word) and RL(word), and the act-based ones SL(act) and RL(act). Its reward variants are shown as RL-utility, RL-fairness and RL-length §4.2.
Hyperparameters
The paper's own values are shown as stated. "Not stated" means the paper gives
no value. Code values are from the official repository at code_commit, and
the README command lines are the authors' documented settings.
| Name | Value | Where | Notes |
|---|---|---|---|
| word vector size | 300 | §4.3 | Also --word-vec-size 300 README.md |
| pretrained word vectors | GloVe, 300-d | §4.3 | Word model: glove.840B.300d README.md. Act model: README passes no pretrained vectors README.md. See Pitfalls. |
| encoder/decoder LSTM layers | two layers each | §4.3 | Word model: --enc-layers 2 --dec-layers 2 README.md. Act model: no layer flags, so the default of 1 applies options.py. |
| LSTM hidden units | 300 | §4.3 | --rnn-size 300 in both README commands README.md README.md; code default is 500 options.py |
| parameter initialisation | uniform(-0.1, 0.1) | §4.3 | Code default param_init = 0.1 options.py model_builder.py |
| context for attention | previous 3 utterances and scenario | §4.3 | --num-context 2 plus the current input gives three turns batcher.py |
| SL optimiser | AdaGrad | §4.3 | --optim adagrad README.md |
| SL learning rate | 0.01 | §4.3 | --learning-rate 0.01 README.md |
| SL mini-batch size | 128 | §4.3 | --batch-size 128 README.md |
| SL epochs | 20; keep lowest validation loss | §4.3 | README uses 15 README.md README.md; code default 14 options.py |
| RL learning rate | 0.001 | §4.3 | AdaGrad in the README command README.md |
| RL episodes (dialogues) | 5000 | §4.3 | --num-dialogues 5000 README.md |
| RL partner | fixed SL model; only one agent updated | §4.3 | --agent-checkpoints given twice with the same SL checkpoint README.md |
| RL model selection | highest validation reward | §4.3 | Code: first 200 dev scenarios every 100 episodes rl_trainer.py rl_trainer.py |
| RL reward, no agreement | -1 | §3.4 | Code uses -0.5 rl_trainer.py |
| RL self-play sampling | not stated | not stated | README: --sample --temperature 0.5 --max-length 20 --max-turns 20 README.md |
| RL discount factor | not stated | not stated | Code default 1.0 options.py |
| RL gradient clipping | not stated | not stated | Code clips the norm to 1.0 rl_trainer.py |
| SL dropout | not stated | not stated | Code default 0.3 options.py |
| SL gradient clipping | not stated | not stated | Code default 5 options.py |
| Top K for retrieval | not stated | §3.5 | Code default 20 generator.py |
| Rule-based sampling temperature | not stated | not stated | Code uses 10 rulebased_session.py |
| Rule-based config | not stated | not stated | overshoot 0.2, bottomline fraction 0.5, compromise fraction 0.5, good-deal threshold 0.7 rulebased_session.py |
| Hybrid opening overshoot | not stated | not stated | Code: target times (1 ± 0.2) hybrid_session.py |
| Price-detection factor | 1.5 times listing price | app. B | price_tracker.py |
| Scenario buyer targets | 0.5, 0.7, 0.9 times listing | §2 | Same discounts in the scenario generation command README.md |
Results
Author-reported. Setup: the new CL dataset of 6682 human-human dialogues §2 tab. 3, and the FB dataset of Lewis et al. (2017) §4.1. Nine systems were put online. AMT workers chatted with a bot or a human partner, and then rated the question "Do you think your partner demonstrated reasonable human behavior?" on a 1-to-5 scale, running from "not at all" to "definitely" §4.4. Agreement rate (Ag), utility (Ut), fairness (Fa) and length (Len) are also reported. Bold in human-likeness (Hu) marks the best score in a group with p < 0.05 by paired t-tests. The highlighted column in each RL group is the objective optimised tab. 7.
| System | CL Hu | CL Ut | CL Fa | CL Ag | CL Len | FB Hu | FB Ut | FB Fa | FB Ag | FB Len |
|---|---|---|---|---|---|---|---|---|---|---|
| Human | 4.3 | -0.07 | -0.14 | 0.91 | 10.2 | 4.6 | 5.5 vs. 5.3 | -0.2 | 0.78 | 5.8 |
| SL(word) | 3.0 | -0.32 | -0.64 | 0.75 | 7.8 | 3.8 | 4.7 vs. 5.0 | -0.3 | 0.70 | 5.0 |
| SL(act) | 3.3 | 0.06 | -0.12 | 0.84 | 14.0 | 3.2 | 5.2 vs. 5.0 | -0.2 | 0.67 | 7.0 |
| SL(act)+rule (hybrid) | 3.6 | 0.23 | -0.46 | 0.75 | 11.4 | 4.2 | 5.2 vs. 5.2 | 0 | 0.72 | 8.0 |
| RL-utility (word) | 1.7 | [1.00] | -2.00 | 0.31 | 2.5 | 1.7 | [2.9 vs. 1.8] | -1.1 | 0.33 | 10.4 |
| RL-utility (act) | 2.8 | [1.00] | -2.00 | 0.22 | 6.7 | 2.8 | [3.3 vs. 2.3] | -1.0 | 0.38 | 9.5 |
| RL-fairness (word) | 1.8 | -0.62 | [-1.24] | 0.75 | 9.4 | 3.2 | 5.7 vs. 5.9 | [-0.2] | 0.79 | 4.0 |
| RL-fairness (act) | 3.0 | -0.28 | [-0.56] | 0.68 | 7.1 | 3.5 | 4.2 vs. 5.4 | [-1.2] | 0.77 | 7.6 |
| RL-length (word) | 1.9 | -0.79 | -1.58 | 0.85 | [13.8] | 1.6 | 3.4 vs. 2.9 | -0.5 | 0.48 | [9.2] |
| RL-length (act) | 3.0 | 0.89 | -1.78 | 0.40 | [11.8] | 2.5 | 2.5 vs. 3.1 | -0.6 | 0.54 | [11.0] |
Source: tab. 7. Square brackets mark the objective each RL group optimised (the paper highlights these cells). The caption does not explain the "x vs. y" utility cells on FB.
Headline claims, author-reported:
- Supervised act models and supervised word models have no statistically significant difference in human-likeness §4.4 tab. 7. The paper contradicts itself on which matches human statistics better: the text says SL(word) matches dialogue length and utility better §4.4, while the caption says act-based models match human statistics better across all metrics tab. 7. Table 7 supports the text for length (7.8 for SL(word), 14.0 for SL(act), 10.2 for humans on CL).
- RL on words degenerates. On CL, the three most frequent sentences make up 81.6%, 100% and 100% of all utterances for the utility, fairness and length models §4.4.
- RL on acts optimises its reward while keeping reasonable human-likeness §4.4 tab. 7.
- The utility-optimised act model learned to insist and refuse to budge, which lowered its agreement rate. The hybrid model, which adds domain knowledge, reached high utility and human-likeness on both tasks §4.4 tab. 7.
Paper vs code
Official code: the CraigslistBargain part of the stanfordnlp/cocoa repository,
linked from the paper's project page §4.1 (https://stanfordnlp.github.io/cocoa).
Its LICENSE is MIT, copyright Stanford NLP, and the commit is
52fb2d47a28537c7892f146a8972a75bcde4812c. The FB word-based baseline uses
Lewis et al.'s repository, which is not the authors' code and is not used here.
Setup requires Python 2.7 and PyTorch 0.4 README.md.
Discrepancies found after reading the code (paper value first):
- SL epochs. Paper: 20, with the lowest validation loss kept §4.3. README commands use 15 README.md README.md. Code default is 14 options.py.
- Act-model depth. Paper: two-layer LSTM for both encoder and decoder, for both word and act models §4.3. The act-model README command sets no layer count, so the default of one layer applies README.md options.py. The word-model command uses two layers README.md.
- GloVe for the act model. Paper: GloVe initialisation for both models §4.3. The act-model README passes empty pretrained vectors README.md.
- No-agreement reward. Paper: -1 §3.4. Code: -0.5 rl_trainer.py (the same value is used for the fairness and length rewards rl_trainer.py rl_trainer.py).
- Baseline and scaling. Paper: subtract the average return so far §3.4. Code: standardise the reward using the mean and standard deviation of all rewards so far, with the standard deviation floored at 1e-4 rl_trainer.py.
- Discounting. Not in the paper. Code multiplies the reward by a discount factor for each step back from the end of the dialogue, default 1.0 (no discount) rl_trainer.py options.py.
- Equation 1 sign. The paper prints \theta \leftarrow \theta - \eta \sum_i \nabla_\theta \log p_\theta(a_i \mid a_{<i}, c)(r - b) eq. 1. Read literally, that descends the reward-weighted log-likelihood. The code minimises the reward-weighted negative log-likelihood rl_trainer.py, which is ascent. The pseudocode above uses ascent.
- Fairness reward. Paper: the difference between the two agents' utilities §3.4. Code: 2 - |u| for each role, where u is that role's margin reward rl_trainer.py. Both peak at the midpoint, but the values differ.
- Length reward. Paper: the number of utterances §3.4. Code: the number of events, divided by 10 rl_trainer.py. Events include offers and other actions, not only messages.
- Intent names. Table 5 names the intents propose, counter, inquire and intro tab. 5. The code uses init-price, counter-price, inquiry and intro parser.py. The agreement rule in the code is a set of anchored regular expressions parser.py parser.py. It has no "perfect" pattern, which is in the paper's list tab. 5.
- Trigram intent model. Paper: trigram language model over intent sequences for the hybrid policy §4.2. README step 2 learns an n-gram model over dialogue acts for the hybrid policy README.md. The retrieval generator's trigram model is at generator.py.
- Retrieval sampling. Paper: top K candidates, K not stated §3.5. Code: top 20 by default generator.py. Sampling from the trigram model is a softmax over log-probabilities with temperature T, and the rule-based session uses T = 10 rulebased_session.py. Retrieval also excludes templates already used in the session while unused ones remain generator.py.
- Hybrid bottomline and compromise. Paper: split the difference when counter-proposing §4.2. Code: compromise fraction 0.5, which is the midpoint rulebased_session.py rulebased_session.py. The bottomline is estimated from the partner's offers or the listing price, not taken from the 0.7 times listing value used in scaling rulebased_session.py rulebased_session.py.
- Price scaling. Matches the paper's description: bottomline maps to 0, target maps to 1, two decimals price_tracker.py price_tracker.py price_tracker.py.
- RL sampling. RL self-play uses sampling with temperature 0.5, max length 20 and max 20 turns README.md. None of these values is in the paper.
I found no discrepancy in the reward definitions for utility (linear in the final price, zero at the midpoint, zero-sum) rl_trainer.py.
Pitfalls
- Invalid dialogues are not penalised.
get_rewardsets a -1 reward for invalid dialogues (more than one offer, quit, accept or reject, or an accept before any offer). The next branch onreward_functhen overwrites that value, so the penalty never takes effect rl_trainer.py rl_trainer.py. Implement the penalty correctly if you rely on it. - Equation 1 sign. Implement ascent on the advantage-weighted log-likelihood. Following the printed sign of eq. 1 literally minimises the reward.
- Standardised rewards change the effective scale. The code divides the advantage by a running standard deviation rl_trainer.py. The paper's learning rate of 0.001 is not stated with this scaling, so a direct port may behave differently.
- Two different bottomlines. The 0.7 times listing bottomline is used only to scale prices for the act model §4.2. The rule-based bottomline is estimated separately rulebased_session.py.
- Price rounding. Scaled prices are rounded to two decimals, then binned §4.2. When converting back to a dollar price, the code truncates with
int()price_tracker.py. - Degenerate RL on words. RL on words gives repetitive text even when reward goes up §4.4 tab. 7. The authors' evaluation model is itself an SL model trained on human-human dialogue, which the paper says may not match real human behaviour in human-bot chat §4.4.
- Utility RL is stubborn. RL utility on acts refuses to make compromises, which frustrated human partners and lowered agreement. The paper's remedy is the hybrid rule set, which adds a compromise §4.4.
- Length reward is loose. It counts events, not sentences, and is divided by 10 rl_trainer.py. Scale it against the other rewards before combining them.
- Unspecified RL training details. The paper does not state the RL optimiser, the sampling temperature, the discount, the gradient clipping, or the maximum turns. The README uses AdaGrad, temperature 0.5 and 20 turns README.md.
- Undefined tables. The "x vs. y" utility cells on FB tab. 7 are not explained in the caption.
- Environment. Python 2.7 and PyTorch 0.4 are required README.md. The data is distributed through a CodaLab worksheet linked from the README README.md. This card does not use or redistribute that data.
- Reproducing human results. The human evaluation requires AMT and the bots' online deployment. The paper's numbers cannot be checked from the released code alone.
Lineage
- Builds on: the goal-oriented dialogue pipeline with parser, manager and generator of Young et al. (2013), cited as the framework §3.2. Also the Hybrid Code Network §5, which keeps a neural dialogue state where this work keeps a structured one.
- Compared against: end-to-end word models and RL on words, following Lewis et al. (2017) §1 §4.2. The FB word-based baseline uses Lewis et al.'s implementation §4.2.
- Superseded by: not stated.
Source and license
Adapted from “Decoupling Strategy and Generation in Negotiation Dialogues” by He He, Derek Chen, Anusha Balakrishnan, Percy Liang (arXiv:1808.09637), used under CC BY-SA 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. This page is licensed under CC BY-SA 4.0. Code citations refer to https://github.com/stanfordnlp/cocoa at commit 52fb2d47a285 (MIT). Any quoted code is shown under that license.