4
$\begingroup$

I'm looking to make an NLP model that can achieve a dual purpose. One purpose is that it can hold interesting conversations (conversational AI), and another being that it can do intent classification and even accomplish the classified task.

To accomplish this, would I need to use multimodal machine learning, where you combine the signal from two models into one? Or can it be done with a single model?

In my internet searches, I found BERT, developed by Google engineers (although apparently not a Google product), which is an NLP model trained in an unsupervised fashion on 3.3 billion words or more and seems very capable.

How can I leverage BERT to make my own conversational AI that can also carry out tasks? Is it as simple as copying the weights from BERT to your own model?

Any guidance is appreciated.

$\endgroup$
0
$\begingroup$

Think of BERT (or similar models) as as good starting place for understanding context.

A couple options to make BERT contextualize dialogue:

  • Concatenate all messages with a seperator embedding and finetune a language model like BERT
    • This has shown good results in this paper, but understand it has weaknesses like struggling to determine order or author comprehension or conversation disentanglement. Additionally as threads grow longer this becomes more and more expensive
  • Use A BERT like model as an RNN and pass along author/memory information as the hidden state
    • Weaknesses here is that you are putting a lot of strain on the hidden state of the model, and ideally you want to train each comment block separately so the gradient wouldnt need to unroll or traverse the network in backprop (I actually implemented a variant of this for my work, and had good results)

The 2 modes above are just baseline examples that you can alter for your own needs, and im sure there is also others if you brainstorm about it.

Note if you want generation capabilities, you would want to use GPT2 or XLNet instead of BERT for unidirectional embeddings. Hope this helped.

| improve this answer | |
$\endgroup$
-1
$\begingroup$

I am not an expert in "conversational AI", but I do have some experience with BERT and other transformer-based language models. I would recommend using huggingface-transformers (https://github.com/huggingface/transformers) - which makes it very easy.

I practice, I wouldn't try to re-train BERT or another transformer from scratch, I would use existing weights, and only train my specific task on top of it.
See for example: 'https://medium.com/huggingface/how-to-build-a-state-of-the-art-conversational-ai-with-transfer-learning-2d818ac26313'

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ your answer does not answer their question at all $\endgroup$ – mshlis Dec 16 '19 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.