{
  "id": 446689,
  "title": "Public 5th & Private 24th Place Solution (CV = LB)",
  "content": "<p>Congratulations to the winners and everyone who put lots of efforts on this competition, and thank Kaggle &amp; host for organising this competition.<br>\nEven though my team shakedown on the private learderboard, we don't think it's truly 'shakedown'. Because our CVs are very close to the LBs (public + private) and we have already selected almost our best results. Our final solutions are purely based on best CVs.</p>\n<h1>1 Summary</h1>\n<h2>1.1 Key points</h2>\n<p>●    Various inputs using common words, phrases, etc. between “prompt_text” and “text” as inputs.<br>\n●    Custom heads combining various pooling.<br>\n●    Pseudo labeling with back translated texts.<br>\n●    Weighted loss.<br>\n●    Ensemble weights based on ridge regression with large alpha </p>\n<h2>1.2 Our submissions (3 final submissions and the best submission)</h2>\n<pre><code>CV   LB    LB\n</code></pre>\n<p>①best public LB    0.4596  0.420   0.463<br>\n②best CV    0.4566  0.423   0.463<br>\n③other    0.4579  0.422   0.464<br>\n(best private LB)    0.4601  0.420   0.462<br>\ncv roughly euqals to LB: 0.457 = 0.420x0.13(public) + 0.463x0.87(private)</p>\n<h1>2 Details</h1>\n<h2>2.1 Various inputs</h2>\n<p>We added common words, phrases, etc. between “prompt_text” and “text” to the end of the input texts.(While 2 and 3 grams overlap were added to the input, 2nd Stage LGB models are not working anymore, at least this is the case on Jie’s models)<br>\n●    overlap words<br>\n●    overlap N-grams (N=2,3)<br>\n●    overlap phrases<br>\n●    overlap key phrases by Rake method</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2Fc4af5af50522e5116d8ff8a626d594ef%2FScreenshot%202023-10-12%20at%2017.42.56.png?generation=1697129165509557&amp;alt=media\" alt=\"\"></p>\n<h2>2.2 Custom heads</h2>\n<p>We created many custom heads that cat the output values of different poolings.<br>\n●    CLS output<br>\n●    Mean pooling<br>\n●    Max pooling<br>\n●    GeM pooling<br>\n●    Attention pooling<br>\n●    Mean-Max-Attention Pooling (MMA)<br>\n●    Mean-Max-Gem Pooling (MMG)<br>\n●    Gem-Attention Pooling (GA)<br>\nExample: GA Pooling<br>\ngemtext_out = self.gempooler(lasthiddenstate, attention_mask)<br>\nattpool_out = self.attpooler(lasthiddenstate, attention_mask)<br>\ncontext_vector = torch.cat((gemtext_out, attpool_out), dim=-1)</p>\n<h2>2.3 Pseudo labeling for back translated texts.</h2>\n<p>Data Augmentation and Pseudo Labelling: Translate summary text to Chinese, then translate back to English, then use a good model to Pseudo label.</p>\n<h2>2.4 Weighted loss</h2>\n<p>We created a weighted loss for wording and content as following, ratios are decided by the RMSE ratio between content and wording.<br>\nclass WeightedCRMSE(nn.Module):<br>\n    def <strong>init</strong>(self):<br>\n        super(WeightedCRMSE, self).<strong>init</strong>()<br>\n        self.weights = torch.tensor([0.85, 1.15]).to(device)</p>\n<pre><code> ():\n    squared_errors = torch.square(y_pred - y_true)\n    weighted_root_squared_errors = torch.mean(squared_errors, dim=) **  * .weights\n    loss = torch.mean(weighted_root_squared_errors)\n     loss\n</code></pre>\n<h2>2.5 Ensemble weights based on ridge regression with large alpha</h2>\n<p>We trained ridge regression out-of-fold and use the mean of the normalized coefficients as the ensemble weights. Both CV and LB scores were better when using ridge regression with a large alpha than using linear regression and other methods.</p>\n<ol>\n<li>The intercept is zero.</li>\n<li>Large alpha (500)</li>\n</ol>\n<h2>2.6 Others</h2>\n<p>●    Backbone<br>\n○    deberta-v3-large<br>\n○    electra-large<br>\n○    roberta-large<br>\n○    roberta-large-squad2<br>\n●    Model for ensemble<br>\n○    LightGBM<br>\n○    Ridge regression<br>\n●    Max length<br>\n○    300<br>\n○    512<br>\n○    768</p>\n<h1>3 Not working</h1>\n<p>●    LSTM head<br>\n●    Freezing the embbedings and some layers.<br>\n●    AWP<br>\n●    MLM<br>\n●    30° rotated targets<br>\n●    Different max length between training and inference.</p>\n<h1>4 Jie’s model performance</h1>\n<p>●    Name convention backbon_maxlength_2&amp;3gramsoverlap_dataaugmentionflag_pooling, e.g.<br>\ndel_768_23_aug_mmg: Debertal-V3-Large, maxlength=768, 2and3 grams overlap were added to input, data augmention is used for model training, use Mean-Max-Gem pooling.<br>\n●    Table below: 1st row: model name, 2nd row: CV(average of 4 folds), 3rd row: CV (oof), 4th row: LB, 5th row: Inference time. <br>\n●    Ensemble of LB 0.437, 0.432, 0.439, 0.436, 0.433 and 0.436 gives CV: 0.45909, Pubic LB 0.424, Private LB: 0.464<br>\n●    Note: Deberta Large models inference time are 80mins not 125-140min, all other models are &lt;=36mins\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F231869326fa934ba8ccf68f282a8a442%2FJies%20Model%20Performance.png?generation=1697129193727475&amp;alt=media\" alt=\"\"></p>\n<h1>5 yyykrk’s model performance</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F692c701395194fb917ea8a5be76ef559%2Fyyykrk.png?generation=1697129202595643&amp;alt=media\" alt=\"\"></p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 2479495,
      "postDate": "2023-10-12T16:46:56.203Z",
      "content": "<p>Congratulations to the winners and everyone who put lots of efforts on this competition, and thank Kaggle &amp; host for organising this competition.<br>\nEven though my team shakedown on the private learderboard, we don't think it's truly 'shakedown'. Because our CVs are very close to the LBs (public + private) and we have already selected almost our best results. Our final solutions are purely based on best CVs.</p>\n<h1>1 Summary</h1>\n<h2>1.1 Key points</h2>\n<p>●    Various inputs using common words, phrases, etc. between “prompt_text” and “text” as inputs.<br>\n●    Custom heads combining various pooling.<br>\n●    Pseudo labeling with back translated texts.<br>\n●    Weighted loss.<br>\n●    Ensemble weights based on ridge regression with large alpha </p>\n<h2>1.2 Our submissions (3 final submissions and the best submission)</h2>\n<pre><code>CV   LB    LB\n</code></pre>\n<p>①best public LB    0.4596  0.420   0.463<br>\n②best CV    0.4566  0.423   0.463<br>\n③other    0.4579  0.422   0.464<br>\n(best private LB)    0.4601  0.420   0.462<br>\ncv roughly euqals to LB: 0.457 = 0.420x0.13(public) + 0.463x0.87(private)</p>\n<h1>2 Details</h1>\n<h2>2.1 Various inputs</h2>\n<p>We added common words, phrases, etc. between “prompt_text” and “text” to the end of the input texts.(While 2 and 3 grams overlap were added to the input, 2nd Stage LGB models are not working anymore, at least this is the case on Jie’s models)<br>\n●    overlap words<br>\n●    overlap N-grams (N=2,3)<br>\n●    overlap phrases<br>\n●    overlap key phrases by Rake method</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2Fc4af5af50522e5116d8ff8a626d594ef%2FScreenshot%202023-10-12%20at%2017.42.56.png?generation=1697129165509557&amp;alt=media\" alt=\"\"></p>\n<h2>2.2 Custom heads</h2>\n<p>We created many custom heads that cat the output values of different poolings.<br>\n●    CLS output<br>\n●    Mean pooling<br>\n●    Max pooling<br>\n●    GeM pooling<br>\n●    Attention pooling<br>\n●    Mean-Max-Attention Pooling (MMA)<br>\n●    Mean-Max-Gem Pooling (MMG)<br>\n●    Gem-Attention Pooling (GA)<br>\nExample: GA Pooling<br>\ngemtext_out = self.gempooler(lasthiddenstate, attention_mask)<br>\nattpool_out = self.attpooler(lasthiddenstate, attention_mask)<br>\ncontext_vector = torch.cat((gemtext_out, attpool_out), dim=-1)</p>\n<h2>2.3 Pseudo labeling for back translated texts.</h2>\n<p>Data Augmentation and Pseudo Labelling: Translate summary text to Chinese, then translate back to English, then use a good model to Pseudo label.</p>\n<h2>2.4 Weighted loss</h2>\n<p>We created a weighted loss for wording and content as following, ratios are decided by the RMSE ratio between content and wording.<br>\nclass WeightedCRMSE(nn.Module):<br>\n    def <strong>init</strong>(self):<br>\n        super(WeightedCRMSE, self).<strong>init</strong>()<br>\n        self.weights = torch.tensor([0.85, 1.15]).to(device)</p>\n<pre><code> ():\n    squared_errors = torch.square(y_pred - y_true)\n    weighted_root_squared_errors = torch.mean(squared_errors, dim=) **  * .weights\n    loss = torch.mean(weighted_root_squared_errors)\n     loss\n</code></pre>\n<h2>2.5 Ensemble weights based on ridge regression with large alpha</h2>\n<p>We trained ridge regression out-of-fold and use the mean of the normalized coefficients as the ensemble weights. Both CV and LB scores were better when using ridge regression with a large alpha than using linear regression and other methods.</p>\n<ol>\n<li>The intercept is zero.</li>\n<li>Large alpha (500)</li>\n</ol>\n<h2>2.6 Others</h2>\n<p>●    Backbone<br>\n○    deberta-v3-large<br>\n○    electra-large<br>\n○    roberta-large<br>\n○    roberta-large-squad2<br>\n●    Model for ensemble<br>\n○    LightGBM<br>\n○    Ridge regression<br>\n●    Max length<br>\n○    300<br>\n○    512<br>\n○    768</p>\n<h1>3 Not working</h1>\n<p>●    LSTM head<br>\n●    Freezing the embbedings and some layers.<br>\n●    AWP<br>\n●    MLM<br>\n●    30° rotated targets<br>\n●    Different max length between training and inference.</p>\n<h1>4 Jie’s model performance</h1>\n<p>●    Name convention backbon_maxlength_2&amp;3gramsoverlap_dataaugmentionflag_pooling, e.g.<br>\ndel_768_23_aug_mmg: Debertal-V3-Large, maxlength=768, 2and3 grams overlap were added to input, data augmention is used for model training, use Mean-Max-Gem pooling.<br>\n●    Table below: 1st row: model name, 2nd row: CV(average of 4 folds), 3rd row: CV (oof), 4th row: LB, 5th row: Inference time. <br>\n●    Ensemble of LB 0.437, 0.432, 0.439, 0.436, 0.433 and 0.436 gives CV: 0.45909, Pubic LB 0.424, Private LB: 0.464<br>\n●    Note: Deberta Large models inference time are 80mins not 125-140min, all other models are &lt;=36mins\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F231869326fa934ba8ccf68f282a8a442%2FJies%20Model%20Performance.png?generation=1697129193727475&amp;alt=media\" alt=\"\"></p>\n<h1>5 yyykrk’s model performance</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F692c701395194fb917ea8a5be76ef559%2Fyyykrk.png?generation=1697129202595643&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Congratulations to the winners and everyone who put lots of efforts on this competition, and thank Kaggle & host for organising this competition.\nEven though my team shakedown on the private learderboard, we don't think it's truly 'shakedown'. Because our CVs are very close to the LBs (public + private) and we have already selected almost our best results. Our final solutions are purely based on best CVs.\n\n# 1 Summary\n## 1.1 Key points\n●\tVarious inputs using common words, phrases, etc. between “prompt_text” and “text” as inputs.\n●\tCustom heads combining various pooling.\n●\tPseudo labeling with back translated texts.\n●\tWeighted loss.\n●\tEnsemble weights based on ridge regression with large alpha \n## 1.2 Our submissions (3 final submissions and the best submission)\n\tCV\tPublic LB\tPrivate LB\n①best public LB\t0.4596\t0.420\t0.463\n②best CV\t0.4566\t0.423\t0.463\n③other\t0.4579\t0.422\t0.464\n(best private LB)\t0.4601\t0.420\t0.462\ncv roughly euqals to LB: 0.457 = 0.420x0.13(public) + 0.463x0.87(private)\n\n# 2 Details\n## 2.1 Various inputs\nWe added common words, phrases, etc. between “prompt_text” and “text” to the end of the input texts.(While 2 and 3 grams overlap were added to the input, 2nd Stage LGB models are not working anymore, at least this is the case on Jie’s models)\n●\toverlap words\n●\toverlap N-grams (N=2,3)\n●\toverlap phrases\n●\toverlap key phrases by Rake method\n \n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2Fc4af5af50522e5116d8ff8a626d594ef%2FScreenshot%202023-10-12%20at%2017.42.56.png?generation=1697129165509557&alt=media)\n \n## 2.2 Custom heads\nWe created many custom heads that cat the output values of different poolings.\n●\tCLS output\n●\tMean pooling\n●\tMax pooling\n●\tGeM pooling\n●\tAttention pooling\n●\tMean-Max-Attention Pooling (MMA)\n●\tMean-Max-Gem Pooling (MMG)\n●\tGem-Attention Pooling (GA)\nExample: GA Pooling\ngemtext_out = self.gempooler(lasthiddenstate, attention_mask)\nattpool_out = self.attpooler(lasthiddenstate, attention_mask)\ncontext_vector = torch.cat((gemtext_out, attpool_out), dim=-1)\n\n## 2.3 Pseudo labeling for back translated texts.\nData Augmentation and Pseudo Labelling: Translate summary text to Chinese, then translate back to English, then use a good model to Pseudo label.\n## 2.4 Weighted loss\nWe created a weighted loss for wording and content as following, ratios are decided by the RMSE ratio between content and wording.\nclass WeightedCRMSE(nn.Module):\n    def __init__(self):\n        super(WeightedCRMSE, self).__init__()\n        self.weights = torch.tensor([0.85, 1.15]).to(device)\n\n    def forward(self, y_pred, y_true):\n        squared_errors = torch.square(y_pred - y_true)\n        weighted_root_squared_errors = torch.mean(squared_errors, dim=0) ** 0.5 * self.weights\n        loss = torch.mean(weighted_root_squared_errors)\n        return loss\n## 2.5 Ensemble weights based on ridge regression with large alpha\nWe trained ridge regression out-of-fold and use the mean of the normalized coefficients as the ensemble weights. Both CV and LB scores were better when using ridge regression with a large alpha than using linear regression and other methods.\n1.\tThe intercept is zero.\n2.\tLarge alpha (500)\n\n## 2.6 Others\n●\tBackbone\n○\tdeberta-v3-large\n○\telectra-large\n○\troberta-large\n○\troberta-large-squad2\n●\tModel for ensemble\n○\tLightGBM\n○\tRidge regression\n●\tMax length\n○\t300\n○\t512\n○\t768\n\n# 3 Not working\n●\tLSTM head\n●\tFreezing the embbedings and some layers.\n●\tAWP\n●\tMLM\n●\t30° rotated targets\n●\tDifferent max length between training and inference.\n\n\n# 4 Jie’s model performance\n●\tName convention backbon_maxlength_2&3gramsoverlap_dataaugmentionflag_pooling, e.g.\ndel_768_23_aug_mmg: Debertal-V3-Large, maxlength=768, 2and3 grams overlap were added to input, data augmention is used for model training, use Mean-Max-Gem pooling.\n●\tTable below: 1st row: model name, 2nd row: CV(average of 4 folds), 3rd row: CV (oof), 4th row: LB, 5th row: Inference time. \n●\tEnsemble of LB 0.437, 0.432, 0.439, 0.436, 0.433 and 0.436 gives CV: 0.45909, Pubic LB 0.424, Private LB: 0.464\n●\tNote: Deberta Large models inference time are 80mins not 125-140min, all other models are <=36mins\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F231869326fa934ba8ccf68f282a8a442%2FJies%20Model%20Performance.png?generation=1697129193727475&alt=media)\n\n\n# 5 yyykrk’s model performance\n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F530572%2F692c701395194fb917ea8a5be76ef559%2Fyyykrk.png?generation=1697129202595643&alt=media)\n\n",
      "votes": 14
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T23:04:33Z",
  "competition_id": 53482,
  "competition_slug": "commonlit-evaluate-student-summaries",
  "team_id": 10680186,
  "solution_url": "/competitions/commonlit-evaluate-student-summaries/writeups/jie-yyykrk-public-5th-private-24th-place-solution-"
}