ParlAI icon indicating copy to clipboard operation
ParlAI copied to clipboard

Question about the `MemoryDecision` task of BB3

Open desperadoola opened this issue 3 years ago • 7 comments

The format of MemoryDecision task seems to conflict during training and interactive mode. On the Agent Information Page, MemoryDecision task is described as below, and we observe the same format during interactive mode,

image

But the display of taskMSCMemoryDecisionTeacher seems to provide another format,

parlai dd --task projects.bb3.tasks.opt_decision_tasks:MSCMemoryDecisionTeacher

image

What I missed?

desperadoola avatar Sep 30 '22 07:09 desperadoola

The same conflicts exist on memory generation task,

according to Agent Information Page:

4565C98F-7F76-435B-91F1-1445448E44FE

But when run the script: parlai dd --task projects.bb3.tasks.r2c2_memory_generation_tasks:MscMemoryGenerationTeacher, it generates the below samples. Apparently, a full history of dialogue is used as the context.

image

desperadoola avatar Sep 30 '22 09:09 desperadoola

I think you are confusing the dataset example with the process that happens inside the agent. The examples you show here are the datasets that we used for training modules in BB3. However, the context of the example goes through extra processing (in this case choosing the last turn) to train the model. In fact, we often try different approaches for this extra processing and the flags for controlling it might be available in agent. The final released models are based on what had the best performance.

mojtaba-komeili avatar Oct 01 '22 02:10 mojtaba-komeili

So what is the best way to print out the training examples after all the extra processing? For example, the task projects.bb3.tasks.r2c2_decision_tasks:MSCMemoryDecisionTeacher when we train bb3.

desperadoola avatar Oct 08 '22 08:10 desperadoola

Appreciate your comment here @klshuster.

mojtaba-komeili avatar Oct 10 '22 20:10 mojtaba-komeili

I have checked the logbook of bb3 carefully. I'm wondering if the task projects.bb3.tasks.opt_decision_tasks:MSCMemoryDecisionTeacher is up-to-date. Since I did find the below descriptions in the logbook, which seems to be the initial trail to introduce personas in the context of memory decision tasks. And it's also the current implementation of the task projects.bb3.tasks.opt_decision_tasks:MSCMemoryDecisionTeacher.

image

However, the final version described in Agent Information Page, which uses the full personas as the context, seems not available in current task implementation for training. Correct me if I'm wrong, and thanks for your reply.

desperadoola avatar Oct 13 '22 10:10 desperadoola

Hi there, yes you've identified a mismatch between training and test-time inference.

The memory decision task during training only shows a single persona; this is meant to teach the model whether using such a persona is helpful in responding to the one turn of context; we want to give maximum signal to the model during training. During inference, however, we have several memories on which to possibly condition, so we show them all at the same time. This is simply a design choice.

The memory generation task is similarly setup. During training, we show the model several turns of context, but during inference (in our setup) we only show one turn of context.

For both of these cases, one could setup inference to be exactly as is seen during training, but again these are design decisions.

klshuster avatar Nov 03 '22 14:11 klshuster

Thanks for your reply. It confused me for a long time.

It's impressive that the model could figure out the mismatch and give a reasonable response. Great work!

desperadoola avatar Nov 07 '22 13:11 desperadoola

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

github-actions[bot] avatar Dec 08 '22 00:12 github-actions[bot]