{
  "id": 129857,
  "title": "our magics",
  "content": "<p>Congrats to the winners. It is a  hard and funny competition. Thanks my teammates. (         @Yang Zhang @chizhu <a href=\"/chensheng\">@chensheng</a>  @Guan_Yuhang ). </p>\n\n<p>We got some magics in this competition.</p>\n\n<h1>1. We split the 30 targets into two parts.</h1>\n\n<p>One is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.\nIt let us get a higer score(0.39x) in the very beginning. </p>\n\n<h1>2. We use the customed model for transformers.</h1>\n\n<p>a) Add the additional layers. For roberta base model, we add the 13th layer with random initialize.  For roberta large model, we add the 25th layer with random initialize.\nb) concate CLS token embedding and SEP token embedding together. </p>\n\n<p>c) concate the category features and length features</p>\n\n<h1>3. Pre-process for data</h1>\n\n<p>We tried many pre-process methods for transformers.  Only one is useful.\ndef cln(x): return \" \".join(x.split())</p>\n\n<p>The very simple function boost 0.005 for  the roberta base lb score .</p>\n\n<h1>4. We use external datas for train .</h1>\n\n<p>It comes from <a href=\"https://www.kaggle.com/stackoverflow/stackoverflow\">https://www.kaggle.com/stackoverflow/stackoverflow</a>. \nWe got the ideas from  paper 'Self-training with Noisy Student improves ImageNet classification'. The teacher gives big size weak pesudo labels for the students.The students use the  weak pesudo labels for train.Firstly we use one model to predict the psuedo labels for the unlabeled datas.\nThen we use the psuedo labels to train our models. </p>\n\n<p>For 6k pesuedo labels, we boost the lstm model lb score from 0.365 to 0.372. (private score from 0.332 to 0.343)\nFor 50k pesuedo labels, we boost the roberta base lb score from 0.405 to 0.415.\nFor 100k pesuedo labels,  the roberta base lb score is still 0.415.</p>\n\n<p>We do not have too much time for training powerful student models. </p>\n\n<h1>5. Post-process for data</h1>\n\n<p>It is the big magic for this competition.\nWithout post-process, our roberta large mode got the 0.411 lb score.\nWhen we use the simple round post-process, it jumped 0.448 lb score. </p>\n\n<p>Then we combine several optimization methods for post-process, these make roberta large jumped 0.46x  lb score. Very big boosting!</p>\n\n<p>Thanks my teemates again.   You are genius.</p>\n\n<h1>6. Ensemble</h1>\n\n<p>We ensembled 6 models(roberta large, roberta base, bert base and xlnet. The best model is roberta base lb 0.415).  We used post-process for them and got the final score.</p>\n\n<h1>which do not work:</h1>\n\n<ol>\n<li>data argument.\nWe spend much time on it, but do not get boost.</li>\n<li>loss funtion. We try mse loss, dice loss, focal loss, they do not boost our scores</li>\n<li>Train one model for one target. </li>\n<li>lstm+use. We can not get a high score for lstm+use.  We want to see <a href=\"/sakami\">@sakami</a> lstm solutions.</li>\n</ol>",
  "comments": [
    {
      "id": 742762,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2020-02-11T14:29:04.737000",
      "content": "<p>Congrats on an amazing job Huiqin. I didn't realize that Roberta tokenizer doesn't remove white space itself. Thanks for sharing that.</p>\n\n<p>For others, I will emphasize this. If you type <code>RobertaTokenizer.from_pretrained('roberta-base').tokenize(\"extra <br>\n  space\")</code> (with 5 spaces between \"extra\" and \"space\"), then you will get <code>[\"extra\", \" \", \" \", \" \", \" \", \"space\"]</code>. This is different than <code>BertTokenizer.from_pretrained('bert-base-cased').tokenize(\"extra .   space\")</code> which removes white space and returns <code>[\"extra\", \"space\"]</code>.</p>",
      "votes": 7,
      "replies": [
        {
          "id": 742962,
          "author_name": "عثمان",
          "author_url": "",
          "post_date": "2020-02-11T17:06:24.813000",
          "content": "<p>I discovered this accidentally when I started stripping code blocks out of my text. Some of my models had started overfitting on multiple whitespace inadvertently. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 743664,
          "author_name": "stout",
          "author_url": "",
          "post_date": "2020-02-12T07:10:05.843000",
          "content": "<p>Great info for newbies. Thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 742487,
      "author_name": "sakami",
      "author_url": "",
      "post_date": "2020-02-11T10:17:37.913000",
      "content": "<p>I published my LSTM code <a href=\"https://www.kaggle.com/sakami/google-quest-single-lstm?scriptVersionId=28487242\">here</a>.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 742501,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T10:25:42.340000",
          "content": "<p>Thanks for sharing.  It's a very strong model !</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 742730,
      "author_name": "jionie",
      "author_url": "",
      "post_date": "2020-02-11T14:11:23",
      "content": "<p>Congrats!!! Very impressive solution💯 , especially the customed model and pseudo labeling. May I ask how could you come up with the idea of adding the additional layers? I have never thought about doing this 🙌 .</p>",
      "votes": 1,
      "replies": [
        {
          "id": 743318,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-12T01:29:41.427000",
          "content": "<p>I got this idea in 'Jigsaw Unintended Bias in Toxicity Classification' competition. I want to copy one  of the all 12 encoder layers and extend bert base model into 13 encoders.  But it did not work.  Tried many times, it suddenly worked when I added a new encoder layer with random initialize.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 744058,
          "author_name": "jionie",
          "author_url": "",
          "post_date": "2020-02-12T14:21:37.250000",
          "content": "<p>Wow, that's interesting! Thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 742042,
      "author_name": "Serigne ",
      "author_url": "",
      "post_date": "2020-02-11T03:41:38.357000",
      "content": "<blockquote>\n  <p>One is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.</p>\n</blockquote>\n\n<p>I did exactly the same thing in one of my bert model </p>\n\n<p>Congrats <a href=\"/qinhui1999\">@qinhui1999</a>  and your teams !</p>\n\n<p>It would be great to team up with you one day !</p>",
      "votes": 1,
      "replies": [
        {
          "id": 742068,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T04:03:53.567000",
          "content": "<p>@Serigne You are welcome. :)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 743433,
      "author_name": "oohara",
      "author_url": "",
      "post_date": "2020-02-12T03:52:09.420000",
      "content": "<p>Could you explain more about what the pre-processing code is doing?\n<code>def cln(x): return \" \".join(x.split())</code></p>",
      "votes": 2,
      "replies": [
        {
          "id": 743437,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2020-02-12T04:02:53.640000",
          "content": "<p>That removes white space. If there are 5 spaces between two words, that function converts the 5 spaces to 1 space.</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 743473,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-12T05:09:55.760000",
          "content": "<p>Thanks for your good explanations. In fact , we just want to remove many '\\n' tokens and let the sentences shorter. And this function works. : )</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 743688,
      "author_name": "stout",
      "author_url": "",
      "post_date": "2020-02-12T07:39:22.327000",
      "content": "<p>Thanks for sharing, and congrats! </p>\n\n<p>For everyone following the 2 part training:\nI asume that for the answer part you used as features only the \"answer\". Did you try to use a Q-A input form to BERT, where features for the answer part are <code>\"question_title\"+\"question_body\"+[SEP]+\"answer\"</code>? In my experiments I observed a big improvement over the <code>\"answer\"</code> only feature. Looking at targets it seems logical that some answer targets are correlated with questions features...</p>\n\n<p>I would appreciate very much to hear if anybody confirms the above observation :-)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 742738,
      "author_name": "CPMP",
      "author_url": "",
      "post_date": "2020-02-11T14:15:29.430000",
      "content": "<p>Thanks for sharing, and congrats on the result.  We should have tried pseudo labeling more ;)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 742255,
      "author_name": "YaGana Sheriff-Hussaini",
      "author_url": "",
      "post_date": "2020-02-11T07:28:47.127000",
      "content": "<p>Congrats <a href=\"/qinhui1999\">@qinhui1999</a> and team. Well done! Thanks for sharing your solution.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 742231,
      "author_name": "yukiya",
      "author_url": "",
      "post_date": "2020-02-11T07:03:46.480000",
      "content": "<p>Congratulations and thanks for the share.</p>\n\n<blockquote>\n  <p>We want to see <a href=\"/sakami\">@sakami</a> lstm solutions</p>\n</blockquote>\n\n<p>I second this request :) </p>",
      "votes": 0,
      "replies": [
        {
          "id": 742254,
          "author_name": "sakami",
          "author_url": "",
          "post_date": "2020-02-11T07:28:24.903000",
          "content": "<p>I'll share it later. ;)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 742185,
      "author_name": "MaChaogong",
      "author_url": "",
      "post_date": "2020-02-11T06:11:25.237000",
      "content": "<p>really amazing work. Congratulations! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 742108,
      "author_name": "Aditya Soni",
      "author_url": "",
      "post_date": "2020-02-11T04:40:16.837000",
      "content": "<p>How did you guys used external data? Can we see the snip or pseudo code?\nThanks And Congratulations for bagging a gold medal!!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 742116,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T04:47:41.893000",
          "content": "<p>As I mentioned, firstly you need a teacher model to predict the unlabeled datas and get the pseudo labels. Then you can add the pseudo labels into the train data for your student models.  You can see the details from paper ''<a href=\"https://arxiv.org/abs/1911.04252\">Self-training with Noisy Student improves ImageNet classification'</a>' . </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 741999,
      "author_name": "XY",
      "author_url": "",
      "post_date": "2020-02-11T03:07:19.433000",
      "content": "<p>Question and Answer labels have correlation. Din't you afraid split bring bad score ?  I was very much afraid did'n do that 😂 </p>",
      "votes": 0,
      "replies": [
        {
          "id": 742014,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T03:18:06.197000",
          "content": "<p>Question asker is the same one , but the answer people are quite different.  Split two parts, we can use more sentences for bert models. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 741994,
      "author_name": "huiqin",
      "author_url": "",
      "post_date": "2020-02-11T03:01:34.740000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 741991,
      "author_name": "Neuron Engineer",
      "author_url": "",
      "post_date": "2020-02-11T02:59:50.560000",
      "content": "<p>So you didn’t use post-processing? That amazing Hui!\n<em>EDIT</em> Okay, I can see the full post now :D</p>",
      "votes": 0,
      "replies": [
        {
          "id": 741995,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T03:03:08.263000",
          "content": "<p>No. We use the post-processing.  My post can not display all informations. :(</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 742005,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T03:13:29.490000",
          "content": "<p>Can you share your solution? You teem is powerful too. </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 741982,
      "author_name": "liuze",
      "author_url": "",
      "post_date": "2020-02-11T02:54:10.593000",
      "content": "<p>Congratulations, may I ask a question? what <code>SEP token embedding</code> is ?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 742001,
          "author_name": "huiqin",
          "author_url": "",
          "post_date": "2020-02-11T03:08:48.307000",
          "content": "<p>last encoder SEP like these:\nlayer, _,encoded_layer = self.mdl(x, attention_mask=attn_msk)\npooled_last_21 = layer[:, -1]</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 742566,
          "author_name": "liuze",
          "author_url": "",
          "post_date": "2020-02-11T11:32:57.183000",
          "content": "<p>thanks, got it</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 744558,
      "author_name": "corochann",
      "author_url": "",
      "post_date": "2020-02-12T23:42:22.617000",
      "content": "<p>Thanks for sharing.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 743507,
      "author_name": "Sanku Vishnu Darshan",
      "author_url": "",
      "post_date": "2020-02-12T05:44:46.017000",
      "content": "<p>Thanks for sharing, and congrats.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 32,
  "messages": [
    {
      "id": 741975,
      "postDate": "2020-02-11T02:49:47.660Z",
      "content": "<p>Congrats to the winners. It is a  hard and funny competition. Thanks my teammates. (         @Yang Zhang @chizhu <a href=\"/chensheng\">@chensheng</a>  @Guan_Yuhang ). </p>\n\n<p>We got some magics in this competition.</p>\n\n<h1>1. We split the 30 targets into two parts.</h1>\n\n<p>One is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.\nIt let us get a higer score(0.39x) in the very beginning. </p>\n\n<h1>2. We use the customed model for transformers.</h1>\n\n<p>a) Add the additional layers. For roberta base model, we add the 13th layer with random initialize.  For roberta large model, we add the 25th layer with random initialize.\nb) concate CLS token embedding and SEP token embedding together. </p>\n\n<p>c) concate the category features and length features</p>\n\n<h1>3. Pre-process for data</h1>\n\n<p>We tried many pre-process methods for transformers.  Only one is useful.\ndef cln(x): return \" \".join(x.split())</p>\n\n<p>The very simple function boost 0.005 for  the roberta base lb score .</p>\n\n<h1>4. We use external datas for train .</h1>\n\n<p>It comes from <a href=\"https://www.kaggle.com/stackoverflow/stackoverflow\">https://www.kaggle.com/stackoverflow/stackoverflow</a>. \nWe got the ideas from  paper 'Self-training with Noisy Student improves ImageNet classification'. The teacher gives big size weak pesudo labels for the students.The students use the  weak pesudo labels for train.Firstly we use one model to predict the psuedo labels for the unlabeled datas.\nThen we use the psuedo labels to train our models. </p>\n\n<p>For 6k pesuedo labels, we boost the lstm model lb score from 0.365 to 0.372. (private score from 0.332 to 0.343)\nFor 50k pesuedo labels, we boost the roberta base lb score from 0.405 to 0.415.\nFor 100k pesuedo labels,  the roberta base lb score is still 0.415.</p>\n\n<p>We do not have too much time for training powerful student models. </p>\n\n<h1>5. Post-process for data</h1>\n\n<p>It is the big magic for this competition.\nWithout post-process, our roberta large mode got the 0.411 lb score.\nWhen we use the simple round post-process, it jumped 0.448 lb score. </p>\n\n<p>Then we combine several optimization methods for post-process, these make roberta large jumped 0.46x  lb score. Very big boosting!</p>\n\n<p>Thanks my teemates again.   You are genius.</p>\n\n<h1>6. Ensemble</h1>\n\n<p>We ensembled 6 models(roberta large, roberta base, bert base and xlnet. The best model is roberta base lb 0.415).  We used post-process for them and got the final score.</p>\n\n<h1>which do not work:</h1>\n\n<ol>\n<li>data argument.\nWe spend much time on it, but do not get boost.</li>\n<li>loss funtion. We try mse loss, dice loss, focal loss, they do not boost our scores</li>\n<li>Train one model for one target. </li>\n<li>lstm+use. We can not get a high score for lstm+use.  We want to see <a href=\"/sakami\">@sakami</a> lstm solutions.</li>\n</ol>",
      "rawMarkdown": "Congrats to the winners. It is a  hard and funny competition. Thanks my teammates. (         @Yang Zhang @chizhu @chensheng  @Guan_Yuhang ). \n\nWe got some magics in this competition.\n\n#1. We split the 30 targets into two parts. \nOne is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.\nIt let us get a higer score(0.39x) in the very beginning. \n\n#2. We use the customed model for transformers. \na) Add the additional layers. For roberta base model, we add the 13th layer with random initialize.  For roberta large model, we add the 25th layer with random initialize.\nb) concate CLS token embedding and SEP token embedding together. \n\nc) concate the category features and length features\n\n#3. Pre-process for data\nWe tried many pre-process methods for transformers.  Only one is useful.\ndef cln(x): return \" \".join(x.split())\n\nThe very simple function boost 0.005 for  the roberta base lb score .\n\n#4. We use external datas for train .\nIt comes from https://www.kaggle.com/stackoverflow/stackoverflow. \nWe got the ideas from  paper 'Self-training with Noisy Student improves ImageNet classification'. The teacher gives big size weak pesudo labels for the students.The students use the  weak pesudo labels for train.Firstly we use one model to predict the psuedo labels for the unlabeled datas.\nThen we use the psuedo labels to train our models. \n\nFor 6k pesuedo labels, we boost the lstm model lb score from 0.365 to 0.372. (private score from 0.332 to 0.343)\nFor 50k pesuedo labels, we boost the roberta base lb score from 0.405 to 0.415.\nFor 100k pesuedo labels,  the roberta base lb score is still 0.415.\n\nWe do not have too much time for training powerful student models. \n\n#5. Post-process for data\nIt is the big magic for this competition.\nWithout post-process, our roberta large mode got the 0.411 lb score.\nWhen we use the simple round post-process, it jumped 0.448 lb score. \n\nThen we combine several optimization methods for post-process, these make roberta large jumped 0.46x  lb score. Very big boosting!\n\nThanks my teemates again.   You are genius.\n\n#6. Ensemble\nWe ensembled 6 models(roberta large, roberta base, bert base and xlnet. The best model is roberta base lb 0.415).  We used post-process for them and got the final score.\n\n\n#which do not work:\n1. data argument.\nWe spend much time on it, but do not get boost.\n2. loss funtion. We try mse loss, dice loss, focal loss, they do not boost our scores\n3. Train one model for one target. \n4. lstm+use. We can not get a high score for lstm+use.  We want to see @sakami lstm solutions.\n",
      "votes": 44
    },
    {
      "id": 742762,
      "postDate": "2020-02-11T14:29:04.737Z",
      "content": "<p>Congrats on an amazing job Huiqin. I didn't realize that Roberta tokenizer doesn't remove white space itself. Thanks for sharing that.</p>\n\n<p>For others, I will emphasize this. If you type <code>RobertaTokenizer.from_pretrained('roberta-base').tokenize(\"extra <br>\n  space\")</code> (with 5 spaces between \"extra\" and \"space\"), then you will get <code>[\"extra\", \" \", \" \", \" \", \" \", \"space\"]</code>. This is different than <code>BertTokenizer.from_pretrained('bert-base-cased').tokenize(\"extra .   space\")</code> which removes white space and returns <code>[\"extra\", \"space\"]</code>.</p>",
      "rawMarkdown": "Congrats on an amazing job Huiqin. I didn't realize that Roberta tokenizer doesn't remove white space itself. Thanks for sharing that.\n\nFor others, I will emphasize this. If you type `RobertaTokenizer.from_pretrained('roberta-base').tokenize(\"extra   \n  space\")` (with 5 spaces between \"extra\" and \"space\"), then you will get `[\"extra\", \" \", \" \", \" \", \" \", \"space\"]`. This is different than `BertTokenizer.from_pretrained('bert-base-cased').tokenize(\"extra .   space\")` which removes white space and returns `[\"extra\", \"space\"]`.",
      "votes": 7,
      "replies": [
        {
          "id": 742962,
          "postDate": "2020-02-11T17:06:24.813Z",
          "content": "<p>I discovered this accidentally when I started stripping code blocks out of my text. Some of my models had started overfitting on multiple whitespace inadvertently. </p>",
          "rawMarkdown": "I discovered this accidentally when I started stripping code blocks out of my text. Some of my models had started overfitting on multiple whitespace inadvertently. ",
          "votes": 1
        },
        {
          "id": 743664,
          "postDate": "2020-02-12T07:10:05.843Z",
          "content": "<p>Great info for newbies. Thanks!</p>",
          "rawMarkdown": "Great info for newbies. Thanks!"
        }
      ]
    },
    {
      "id": 742487,
      "postDate": "2020-02-11T10:17:37.913Z",
      "content": "<p>I published my LSTM code <a href=\"https://www.kaggle.com/sakami/google-quest-single-lstm?scriptVersionId=28487242\">here</a>.</p>",
      "rawMarkdown": "I published my LSTM code [here](https://www.kaggle.com/sakami/google-quest-single-lstm?scriptVersionId=28487242).",
      "votes": 3,
      "replies": [
        {
          "id": 742501,
          "postDate": "2020-02-11T10:25:42.340Z",
          "content": "<p>Thanks for sharing.  It's a very strong model !</p>",
          "rawMarkdown": "Thanks for sharing.  It's a very strong model !"
        }
      ]
    },
    {
      "id": 742730,
      "postDate": "2020-02-11T14:11:23Z",
      "content": "<p>Congrats!!! Very impressive solution💯 , especially the customed model and pseudo labeling. May I ask how could you come up with the idea of adding the additional layers? I have never thought about doing this 🙌 .</p>",
      "rawMarkdown": "Congrats!!! Very impressive solution💯 , especially the customed model and pseudo labeling. May I ask how could you come up with the idea of adding the additional layers? I have never thought about doing this 🙌 .",
      "votes": 1,
      "replies": [
        {
          "id": 743318,
          "postDate": "2020-02-12T01:29:41.427Z",
          "content": "<p>I got this idea in 'Jigsaw Unintended Bias in Toxicity Classification' competition. I want to copy one  of the all 12 encoder layers and extend bert base model into 13 encoders.  But it did not work.  Tried many times, it suddenly worked when I added a new encoder layer with random initialize.</p>",
          "rawMarkdown": "I got this idea in 'Jigsaw Unintended Bias in Toxicity Classification' competition. I want to copy one  of the all 12 encoder layers and extend bert base model into 13 encoders.  But it did not work.  Tried many times, it suddenly worked when I added a new encoder layer with random initialize.",
          "votes": 1
        },
        {
          "id": 744058,
          "postDate": "2020-02-12T14:21:37.250Z",
          "content": "<p>Wow, that's interesting! Thanks!</p>",
          "rawMarkdown": "Wow, that's interesting! Thanks!"
        }
      ]
    },
    {
      "id": 742042,
      "postDate": "2020-02-11T03:41:38.357Z",
      "content": "<blockquote>\n  <p>One is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.</p>\n</blockquote>\n\n<p>I did exactly the same thing in one of my bert model </p>\n\n<p>Congrats <a href=\"/qinhui1999\">@qinhui1999</a>  and your teams !</p>\n\n<p>It would be great to team up with you one day !</p>",
      "rawMarkdown": "&gt; One is question part, another is answer part. The question part has 21 targets. The answer part has 9 targets. We train two model to predict the two part.\n\nI did exactly the same thing in one of my bert model \n\n\nCongrats @qinhui1999  and your teams !\n\nIt would be great to team up with you one day !",
      "votes": 1,
      "replies": [
        {
          "id": 742068,
          "postDate": "2020-02-11T04:03:53.567Z",
          "content": "<p>@Serigne You are welcome. :)</p>",
          "rawMarkdown": "@Serigne You are welcome. :)",
          "votes": 1
        }
      ]
    },
    {
      "id": 743433,
      "postDate": "2020-02-12T03:52:09.420Z",
      "content": "<p>Could you explain more about what the pre-processing code is doing?\n<code>def cln(x): return \" \".join(x.split())</code></p>",
      "rawMarkdown": "Could you explain more about what the pre-processing code is doing?\n``` def cln(x): return \" \".join(x.split())```",
      "votes": 2,
      "replies": [
        {
          "id": 743437,
          "postDate": "2020-02-12T04:02:53.640Z",
          "content": "<p>That removes white space. If there are 5 spaces between two words, that function converts the 5 spaces to 1 space.</p>",
          "rawMarkdown": "That removes white space. If there are 5 spaces between two words, that function converts the 5 spaces to 1 space.",
          "votes": 4
        },
        {
          "id": 743473,
          "postDate": "2020-02-12T05:09:55.760Z",
          "content": "<p>Thanks for your good explanations. In fact , we just want to remove many '\\n' tokens and let the sentences shorter. And this function works. : )</p>",
          "rawMarkdown": "Thanks for your good explanations. In fact , we just want to remove many '\\n' tokens and let the sentences shorter. And this function works. : )",
          "votes": 1
        }
      ]
    },
    {
      "id": 743688,
      "postDate": "2020-02-12T07:39:22.327Z",
      "content": "<p>Thanks for sharing, and congrats! </p>\n\n<p>For everyone following the 2 part training:\nI asume that for the answer part you used as features only the \"answer\". Did you try to use a Q-A input form to BERT, where features for the answer part are <code>\"question_title\"+\"question_body\"+[SEP]+\"answer\"</code>? In my experiments I observed a big improvement over the <code>\"answer\"</code> only feature. Looking at targets it seems logical that some answer targets are correlated with questions features...</p>\n\n<p>I would appreciate very much to hear if anybody confirms the above observation :-)</p>",
      "rawMarkdown": "Thanks for sharing, and congrats! \n\nFor everyone following the 2 part training:\nI asume that for the answer part you used as features only the \"answer\". Did you try to use a Q-A input form to BERT, where features for the answer part are `\"question_title\"+\"question_body\"+[SEP]+\"answer\"`? In my experiments I observed a big improvement over the `\"answer\"` only feature. Looking at targets it seems logical that some answer targets are correlated with questions features...\n\nI would appreciate very much to hear if anybody confirms the above observation :-)"
    },
    {
      "id": 742738,
      "postDate": "2020-02-11T14:15:29.430Z",
      "content": "<p>Thanks for sharing, and congrats on the result.  We should have tried pseudo labeling more ;)</p>",
      "rawMarkdown": "Thanks for sharing, and congrats on the result.  We should have tried pseudo labeling more ;)"
    },
    {
      "id": 742255,
      "postDate": "2020-02-11T07:28:47.127Z",
      "content": "<p>Congrats <a href=\"/qinhui1999\">@qinhui1999</a> and team. Well done! Thanks for sharing your solution.</p>",
      "rawMarkdown": "Congrats @qinhui1999 and team. Well done! Thanks for sharing your solution."
    },
    {
      "id": 742231,
      "postDate": "2020-02-11T07:03:46.480Z",
      "content": "<p>Congratulations and thanks for the share.</p>\n\n<blockquote>\n  <p>We want to see <a href=\"/sakami\">@sakami</a> lstm solutions</p>\n</blockquote>\n\n<p>I second this request :) </p>",
      "rawMarkdown": "Congratulations and thanks for the share.\n\n&gt; We want to see @sakami lstm solutions\n\nI second this request :) ",
      "replies": [
        {
          "id": 742254,
          "postDate": "2020-02-11T07:28:24.903Z",
          "content": "<p>I'll share it later. ;)</p>",
          "rawMarkdown": "I'll share it later. ;)",
          "votes": 1
        }
      ]
    },
    {
      "id": 742185,
      "postDate": "2020-02-11T06:11:25.237Z",
      "content": "<p>really amazing work. Congratulations! </p>",
      "rawMarkdown": "really amazing work. Congratulations! "
    },
    {
      "id": 742108,
      "postDate": "2020-02-11T04:40:16.837Z",
      "content": "<p>How did you guys used external data? Can we see the snip or pseudo code?\nThanks And Congratulations for bagging a gold medal!!</p>",
      "rawMarkdown": "How did you guys used external data? Can we see the snip or pseudo code?\nThanks And Congratulations for bagging a gold medal!!",
      "replies": [
        {
          "id": 742116,
          "postDate": "2020-02-11T04:47:41.893Z",
          "content": "<p>As I mentioned, firstly you need a teacher model to predict the unlabeled datas and get the pseudo labels. Then you can add the pseudo labels into the train data for your student models.  You can see the details from paper ''<a href=\"https://arxiv.org/abs/1911.04252\">Self-training with Noisy Student improves ImageNet classification'</a>' . </p>",
          "rawMarkdown": "As I mentioned, firstly you need a teacher model to predict the unlabeled datas and get the pseudo labels. Then you can add the pseudo labels into the train data for your student models.  You can see the details from paper ''[Self-training with Noisy Student improves ImageNet classification'](https://arxiv.org/abs/1911.04252)' . ",
          "votes": 1
        }
      ]
    },
    {
      "id": 741999,
      "postDate": "2020-02-11T03:07:19.433Z",
      "content": "<p>Question and Answer labels have correlation. Din't you afraid split bring bad score ?  I was very much afraid did'n do that 😂 </p>",
      "rawMarkdown": "Question and Answer labels have correlation. Din't you afraid split bring bad score ?  I was very much afraid did'n do that 😂 ",
      "replies": [
        {
          "id": 742014,
          "postDate": "2020-02-11T03:18:06.197Z",
          "content": "<p>Question asker is the same one , but the answer people are quite different.  Split two parts, we can use more sentences for bert models. </p>",
          "rawMarkdown": "Question asker is the same one , but the answer people are quite different.  Split two parts, we can use more sentences for bert models. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 741994,
      "postDate": "2020-02-11T03:01:34.740Z",
      "rawMarkdown": ""
    },
    {
      "id": 741991,
      "postDate": "2020-02-11T02:59:50.560Z",
      "content": "<p>So you didn’t use post-processing? That amazing Hui!\n<em>EDIT</em> Okay, I can see the full post now :D</p>",
      "rawMarkdown": "So you didn’t use post-processing? That amazing Hui!\n*EDIT* Okay, I can see the full post now :D",
      "replies": [
        {
          "id": 741995,
          "postDate": "2020-02-11T03:03:08.263Z",
          "content": "<p>No. We use the post-processing.  My post can not display all informations. :(</p>",
          "rawMarkdown": "No. We use the post-processing.  My post can not display all informations. :("
        },
        {
          "id": 742005,
          "postDate": "2020-02-11T03:13:29.490Z",
          "content": "<p>Can you share your solution? You teem is powerful too. </p>",
          "rawMarkdown": "Can you share your solution? You teem is powerful too. "
        }
      ]
    },
    {
      "id": 741982,
      "postDate": "2020-02-11T02:54:10.593Z",
      "content": "<p>Congratulations, may I ask a question? what <code>SEP token embedding</code> is ?</p>",
      "rawMarkdown": "Congratulations, may I ask a question? what `SEP token embedding` is ?",
      "replies": [
        {
          "id": 742001,
          "postDate": "2020-02-11T03:08:48.307Z",
          "content": "<p>last encoder SEP like these:\nlayer, _,encoded_layer = self.mdl(x, attention_mask=attn_msk)\npooled_last_21 = layer[:, -1]</p>",
          "rawMarkdown": "last encoder SEP like these:\nlayer, _,encoded_layer = self.mdl(x, attention_mask=attn_msk)\npooled_last_21 = layer[:, -1]\n",
          "votes": 1
        },
        {
          "id": 742566,
          "postDate": "2020-02-11T11:32:57.183Z",
          "content": "<p>thanks, got it</p>",
          "rawMarkdown": "thanks, got it"
        }
      ]
    },
    {
      "id": 744558,
      "postDate": "2020-02-12T23:42:22.617Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing."
    },
    {
      "id": 743507,
      "postDate": "2020-02-12T05:44:46.017Z",
      "content": "<p>Thanks for sharing, and congrats.</p>",
      "rawMarkdown": "Thanks for sharing, and congrats."
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T19:07:32Z",
  "competition_id": 7968,
  "competition_slug": "google-quest-challenge",
  "team_id": 4014952,
  "solution_url": "/competitions/google-quest-challenge/writeups/on-the-way-our-magics"
}