{
  "id": 448993,
  "title": "98th Place Solution Overview 🥈",
  "content": "<h1>🥈 <strong>Silver Medal Solution Overview for  CommonLit - Evaluate Student Summaries<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7523757%2F717c6210085b3728d0a839bb7b35e846%2FCDS.jpg?generation=1697980812788529&amp;alt=media\" alt=\"\"></strong></h1>\n<ul>\n<li><strong>Solution Link</strong>: <a href=\"https://www.kaggle.com/code/aleron751/sanseymysamba-final-solution/notebook\" target=\"_blank\">Kaggle Notebook</a></li>\n</ul>\n<h2><strong>1. 📖 Data Reading</strong></h2>\n<ul>\n<li><strong>Datasets Used</strong>: Data was sourced from Kaggle, including student prompts for train/test and their corresponding essays.</li>\n</ul>\n<h2><strong>2. 🛠 Feature Creation</strong></h2>\n<ul>\n<li>Generated features were primarily based on comparing student essays with a summarized version of the original prompts.</li>\n<li>An extraction-based summarization technique was employed to distill the essence of the original prompts, making them more comparable to student essays.</li>\n</ul>\n<h2><strong>3. 🔗 Data Concatenation</strong></h2>\n<ul>\n<li>To facilitate a holistic view and ease of processing, prompts and essays were concatenated.</li>\n</ul>\n<h2><strong>4. 🤖 Transformer Predictions</strong></h2>\n<ul>\n<li><p>Several transformer models were leveraged, forming a \"stack of BERTs\" to enhance prediction accuracy.</p></li>\n<li><p>Pre-existing models were harnessed to make out-of-fold predictions on the training data. The training process can be reviewed <a href=\"https://www.kaggle.com/code/bulivington/transformers-predictions-base\" target=\"_blank\">here</a>.</p></li>\n<li><p>Functions were defined to facilitate the efficient inference of test data using the trained models.</p></li>\n</ul>\n<h2><strong>5. 📚 Stacking Approach</strong></h2>\n<ul>\n<li><p>A customized model architecture was employed, utilizing Huggingface's trainer.</p></li>\n<li><p>Different pooling strategies were explored for the transformer outputs. <code>WeightedLayerPooling</code> was the chosen method due to its efficacy.</p></li>\n<li><p>A custom dataset class in PyTorch was designed for test inference, accompanied by its associated function.</p></li>\n</ul>\n<h2><strong>6. 🎛 Meta Model Training</strong></h2>\n<ul>\n<li><p>Given its resilience against overfitting and robustness to outliers, the <code>HuberRegressor</code> was chosen as the meta model.</p></li>\n<li><p>Beyond transformer-based features, various intuitive features were conceptualized, like word/token statistics, text readability score, and prompt-essay comparisons.</p></li>\n</ul>\n<h2><strong>7. 🔍 Feature Engineering</strong></h2>\n<ul>\n<li><p>The BARTScorer class was utilized to compute the BART score, shedding light on the essay's quality.</p></li>\n<li><p>Several pre-trained models were deployed to derive features that measure the degree of alignment between the prompt and the essay.</p></li>\n<li><p>A plethora of custom features were engineered to capture the nuances of the text, such as sentence structure, token intersections, and linguistic errors.</p></li>\n</ul>\n<h2><strong>8. 🧪 Feature Generation</strong></h2>\n<ul>\n<li><p>Sentence encoders, reward models, and other tools were employed to craft features that capture the essence of the text.</p></li>\n<li><p>Features that provide insights into the text's structure and coherence, like the count of stop words, n-gram token intersections, and sentence errors, were extracted.</p></li>\n<li><p>Models trained on previous competition datasets were leveraged to craft additional, insightful features.</p></li>\n</ul>\n<h2><strong>9. 🚀 Final Model Training</strong></h2>\n<ul>\n<li><p>All features, including transformer predictions and manually crafted ones, were integrated and readied for the final model.</p></li>\n<li><p>Cross-validation methods were possibly used to gauge the model's performance on unseen data.</p></li>\n<li><p>The model was trained with a limited iteration count to prevent overfitting and ensure its general applicability.</p></li>\n</ul>\n<h2><strong>10. 📤 Submission Generation</strong></h2>\n<ul>\n<li><p>Predictions for the test dataset were crafted using the meticulously trained HuberRegressor model.</p></li>\n<li><p>Predictions were organized into the required format, typically consisting of an ID and its corresponding predicted value.</p></li>\n<li><p>The structured submission file was uploaded to Kaggle's competition page, marking the culmination of the process.</p></li>\n</ul>",
  "comments": [
    {
      "id": 2582344,
      "author_name": "Zaakcii Ru",
      "author_url": "",
      "post_date": "2024-01-01T14:36:48.920000",
      "content": "<p>Wait wait !!! But in 98th place - me!)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2499017,
      "author_name": "Paul Cummins",
      "author_url": "",
      "post_date": "2023-10-25T17:15:11.550000",
      "content": "<p>Can I check my understanding of your method (my lack of experience in this kaggle lark rather than your lack of explanation)?</p>\n<p>In ridiculously simple terms… </p>\n<ul>\n<li>you used a battery of BERT models to tokenise the prompts and responses, then used them to predict content and wording scores</li>\n<li>Engineered a bunch of other features</li>\n<li>combined the outputs of the BERT predictions and the other features you engineered to train a final model</li>\n</ul>\n<p>and bam, final scores?</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 2,
  "messages": [
    {
      "id": 2492443,
      "postDate": "2023-10-22T14:16:56.810Z",
      "content": "<h1>🥈 <strong>Silver Medal Solution Overview for  CommonLit - Evaluate Student Summaries<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7523757%2F717c6210085b3728d0a839bb7b35e846%2FCDS.jpg?generation=1697980812788529&amp;alt=media\" alt=\"\"></strong></h1>\n<ul>\n<li><strong>Solution Link</strong>: <a href=\"https://www.kaggle.com/code/aleron751/sanseymysamba-final-solution/notebook\" target=\"_blank\">Kaggle Notebook</a></li>\n</ul>\n<h2><strong>1. 📖 Data Reading</strong></h2>\n<ul>\n<li><strong>Datasets Used</strong>: Data was sourced from Kaggle, including student prompts for train/test and their corresponding essays.</li>\n</ul>\n<h2><strong>2. 🛠 Feature Creation</strong></h2>\n<ul>\n<li>Generated features were primarily based on comparing student essays with a summarized version of the original prompts.</li>\n<li>An extraction-based summarization technique was employed to distill the essence of the original prompts, making them more comparable to student essays.</li>\n</ul>\n<h2><strong>3. 🔗 Data Concatenation</strong></h2>\n<ul>\n<li>To facilitate a holistic view and ease of processing, prompts and essays were concatenated.</li>\n</ul>\n<h2><strong>4. 🤖 Transformer Predictions</strong></h2>\n<ul>\n<li><p>Several transformer models were leveraged, forming a \"stack of BERTs\" to enhance prediction accuracy.</p></li>\n<li><p>Pre-existing models were harnessed to make out-of-fold predictions on the training data. The training process can be reviewed <a href=\"https://www.kaggle.com/code/bulivington/transformers-predictions-base\" target=\"_blank\">here</a>.</p></li>\n<li><p>Functions were defined to facilitate the efficient inference of test data using the trained models.</p></li>\n</ul>\n<h2><strong>5. 📚 Stacking Approach</strong></h2>\n<ul>\n<li><p>A customized model architecture was employed, utilizing Huggingface's trainer.</p></li>\n<li><p>Different pooling strategies were explored for the transformer outputs. <code>WeightedLayerPooling</code> was the chosen method due to its efficacy.</p></li>\n<li><p>A custom dataset class in PyTorch was designed for test inference, accompanied by its associated function.</p></li>\n</ul>\n<h2><strong>6. 🎛 Meta Model Training</strong></h2>\n<ul>\n<li><p>Given its resilience against overfitting and robustness to outliers, the <code>HuberRegressor</code> was chosen as the meta model.</p></li>\n<li><p>Beyond transformer-based features, various intuitive features were conceptualized, like word/token statistics, text readability score, and prompt-essay comparisons.</p></li>\n</ul>\n<h2><strong>7. 🔍 Feature Engineering</strong></h2>\n<ul>\n<li><p>The BARTScorer class was utilized to compute the BART score, shedding light on the essay's quality.</p></li>\n<li><p>Several pre-trained models were deployed to derive features that measure the degree of alignment between the prompt and the essay.</p></li>\n<li><p>A plethora of custom features were engineered to capture the nuances of the text, such as sentence structure, token intersections, and linguistic errors.</p></li>\n</ul>\n<h2><strong>8. 🧪 Feature Generation</strong></h2>\n<ul>\n<li><p>Sentence encoders, reward models, and other tools were employed to craft features that capture the essence of the text.</p></li>\n<li><p>Features that provide insights into the text's structure and coherence, like the count of stop words, n-gram token intersections, and sentence errors, were extracted.</p></li>\n<li><p>Models trained on previous competition datasets were leveraged to craft additional, insightful features.</p></li>\n</ul>\n<h2><strong>9. 🚀 Final Model Training</strong></h2>\n<ul>\n<li><p>All features, including transformer predictions and manually crafted ones, were integrated and readied for the final model.</p></li>\n<li><p>Cross-validation methods were possibly used to gauge the model's performance on unseen data.</p></li>\n<li><p>The model was trained with a limited iteration count to prevent overfitting and ensure its general applicability.</p></li>\n</ul>\n<h2><strong>10. 📤 Submission Generation</strong></h2>\n<ul>\n<li><p>Predictions for the test dataset were crafted using the meticulously trained HuberRegressor model.</p></li>\n<li><p>Predictions were organized into the required format, typically consisting of an ID and its corresponding predicted value.</p></li>\n<li><p>The structured submission file was uploaded to Kaggle's competition page, marking the culmination of the process.</p></li>\n</ul>",
      "rawMarkdown": "# 🥈 **Silver Medal Solution Overview for  CommonLit - Evaluate Student Summaries![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7523757%2F717c6210085b3728d0a839bb7b35e846%2FCDS.jpg?generation=1697980812788529&alt=media)**\n\n- **Solution Link**: [Kaggle Notebook](https://www.kaggle.com/code/aleron751/sanseymysamba-final-solution/notebook)\n\n\n\n## **1. 📖 Data Reading**\n\n- **Datasets Used**: Data was sourced from Kaggle, including student prompts for train/test and their corresponding essays.\n\n## **2. 🛠 Feature Creation**\n\n- Generated features were primarily based on comparing student essays with a summarized version of the original prompts.\n- An extraction-based summarization technique was employed to distill the essence of the original prompts, making them more comparable to student essays.\n\n## **3. 🔗 Data Concatenation**\n- To facilitate a holistic view and ease of processing, prompts and essays were concatenated.\n  \n## **4. 🤖 Transformer Predictions**\n\n- Several transformer models were leveraged, forming a \"stack of BERTs\" to enhance prediction accuracy.\n- Pre-existing models were harnessed to make out-of-fold predictions on the training data. The training process can be reviewed [here](https://www.kaggle.com/code/bulivington/transformers-predictions-base).\n\n- Functions were defined to facilitate the efficient inference of test data using the trained models.\n\n## **5. 📚 Stacking Approach**\n\n- A customized model architecture was employed, utilizing Huggingface's trainer.\n\n- Different pooling strategies were explored for the transformer outputs. `WeightedLayerPooling` was the chosen method due to its efficacy.\n\n- A custom dataset class in PyTorch was designed for test inference, accompanied by its associated function.\n\n## **6. 🎛 Meta Model Training**\n\n- Given its resilience against overfitting and robustness to outliers, the `HuberRegressor` was chosen as the meta model.\n\n- Beyond transformer-based features, various intuitive features were conceptualized, like word/token statistics, text readability score, and prompt-essay comparisons.\n\n## **7. 🔍 Feature Engineering**\n\n- The BARTScorer class was utilized to compute the BART score, shedding light on the essay's quality.\n\n- Several pre-trained models were deployed to derive features that measure the degree of alignment between the prompt and the essay.\n- A plethora of custom features were engineered to capture the nuances of the text, such as sentence structure, token intersections, and linguistic errors.\n\n## **8. 🧪 Feature Generation**\n\n- Sentence encoders, reward models, and other tools were employed to craft features that capture the essence of the text.\n\n- Features that provide insights into the text's structure and coherence, like the count of stop words, n-gram token intersections, and sentence errors, were extracted.\n\n- Models trained on previous competition datasets were leveraged to craft additional, insightful features.\n\n## **9. 🚀 Final Model Training**\n\n- All features, including transformer predictions and manually crafted ones, were integrated and readied for the final model.\n\n- Cross-validation methods were possibly used to gauge the model's performance on unseen data.\n\n- The model was trained with a limited iteration count to prevent overfitting and ensure its general applicability.\n\n## **10. 📤 Submission Generation**\n\n- Predictions for the test dataset were crafted using the meticulously trained HuberRegressor model.\n\n- Predictions were organized into the required format, typically consisting of an ID and its corresponding predicted value.\n\n- The structured submission file was uploaded to Kaggle's competition page, marking the culmination of the process.\n\n",
      "votes": 11
    },
    {
      "id": 2582344,
      "postDate": "2024-01-01T14:36:48.920Z",
      "content": "<p>Wait wait !!! But in 98th place - me!)</p>",
      "rawMarkdown": "Wait wait !!! But in 98th place - me!)"
    },
    {
      "id": 2499017,
      "postDate": "2023-10-25T17:15:11.550Z",
      "content": "<p>Can I check my understanding of your method (my lack of experience in this kaggle lark rather than your lack of explanation)?</p>\n<p>In ridiculously simple terms… </p>\n<ul>\n<li>you used a battery of BERT models to tokenise the prompts and responses, then used them to predict content and wording scores</li>\n<li>Engineered a bunch of other features</li>\n<li>combined the outputs of the BERT predictions and the other features you engineered to train a final model</li>\n</ul>\n<p>and bam, final scores?</p>",
      "rawMarkdown": "Can I check my understanding of your method (my lack of experience in this kaggle lark rather than your lack of explanation)?\n\nIn ridiculously simple terms... \n- you used a battery of BERT models to tokenise the prompts and responses, then used them to predict content and wording scores\n- Engineered a bunch of other features\n- combined the outputs of the BERT predictions and the other features you engineered to train a final model\n\nand bam, final scores?\n\n\n\n\n"
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T23:08:57Z",
  "competition_id": 53482,
  "competition_slug": "commonlit-evaluate-student-summaries",
  "team_id": 10676067,
  "solution_url": "/competitions/commonlit-evaluate-student-summaries/writeups/sanseymysamba-98th-place-solution-overview"
}