BERT in ML4K: this is amazing!
Dave Touretzky 10 Dec 2021 00:59 UTC
I saw something yesterday that blew me away. BERT is now accessible via
the "Machine Learning For Kids" (ML4K) web site created by Dale Lane.
BERT is Google's natural language understanding architecture: a
horrendously complicated neural net called a "transformer" that allows
Google applications to 'understand' the meaning of text. Google has
made a version of BERT publicly available for researchers to play with.
But now, thanks to ML4K, BERT is available to your average eight year
old Scratch programmer. Try it out for yourself and prepare to be
amazed.
1. Go to https://MachineLearningForKids.co.uk
2. Click on "Get Started", then "Try it now".
3. Click on the "Pretrained" link in the top navigation bar.
4. Read the "How to use" panel to see how to load Scratch extensions,
and then Click on the blue "Get Started" button. This takes you to
the ML4K version of Scratch 3. Here's a direct link:
https://machinelearningforkids.co.uk/scratch3/
5. Click on the blue "Add Extension" button at the bottom of the
blocks palette.
6. Add the "Question Answering" extension.
Now you can set up a Scratch program to answer queries like in the
figure below. If you can't see the figure, here is the text equivalent:
WHEN "Start" clicked:
set answer to 0
set text to "When John was driving Mary to work, they saw a purple cow by the side of the road."
set query to "What did John see?"
set answer to find answer to query in text
Click on the green start flag and you'll see the answer: "a purple cow".
If you're not astonished by this, you should be. (By the answer, not
the cow.)
Here is a table of things I tried:
Query Response
======================= =======================
What did John see? a purple cow
What color was the cow? purple
What was purple? cow
Where was the cow? by the side of the road
What was John doing? driving Mary to work
What was by the road? a purple cow
Where did John drive? Mary to work
Who did John drive? Mary
Who was driving? [blank]
Where was John driving? [blank]
Who was John with? [blank]
What did Mary see? [blank]
As you can see, the queries didn't always succeed. But a lot of them
did. This is real natural language understanding (see Big Idea 4:
Natural Interaction), using a neural network that Google spent millions
to develop. And now this tool is available to children.
We are truly living in exciting times.
-- Dave