Two Small Experiments on GPT-2

I did two small ex­per­i­ments on the GPT-2 small model. First ex­per­i­ment: can GPT-2-small an­swer sen­ti­ment anal­y­sis ques­tions? (It can’t.) Se­cond ex­per­i­ment: When GPT-2 writes con­tinu­a­tions of Howl, is it pick­ing up the “Moloch in X!” tem­plate from its prim­ing, or from a copy of Howl in its origi­nal train­ing set? (It’s from the train­ing set.)

Sen­ti­ment anal­y­sis ex­per­i­ment:

I down­loaded the MPQA Sub­jec­tivity Lex­i­con, which is a dic­tio­nary in which words are marked as pos­i­tive or nega­tive. For ex­am­ple hope­less­ness=>nega­tive, hu­mour=>pos­i­tive, grace=>pos­i­tive, cor­rup­tion=>nega­tive. I primed GPT-2 with a list of 20 ques­tions like “Is a <noun> good? Yes. Is a <noun> good? No.” fol­lowed by an unan­swered ques­tion of the same form, and had it con­tinue for one more word. In its prim­ing, half the an­swers were yes and the other half were no. It an­swered “No” 3740 times, and nei­ther its an­swers nor its yes an­swers were bet­ter than chance.

Howl ex­per­i­ment:

When given some lines from Gins­berg’s Howl as prim­ing, it writes a good con­tinu­a­tion (similar to the one Chel­sea Voss and Qiaochu Yuan got from it). In par­tic­u­lar, it uses the “Moloch in X!” tem­plate re­peat­edly.

If I take its con­tinu­a­tion of Howl and feed it back in as a prompt, I get more Howl (Moloch in X!). If I take Howl and re­place “Moloch” with “Lo­moch”, I get more Howl. But if I take its con­tinu­a­tion of Howl from the first step and re­place Moloch with Lo­moch *there*, I get un­re­lated text which does not use the “Moloch in X!” tem­plate.

So, it isn’t in­fer­ring the tem­plate from its prim­ing; rather, it learned the tem­plate from its train­ing set (which prob­a­bly in­cluded Howl), and it pro­duces Howl-like text iff it’s given a cue strong enough to re­mind it of the source.