{
  "id": 373403,
  "title": "Negative Sampling of Candidates",
  "url": "/competitions/otto-recommender-system/discussion/373403",
  "author_name": "",
  "post_date": "2022-12-21T09:33:29.329997200Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Generating a large number of candidates, such as a co-visitation matrix, is often expected to result in an out-of-memory error.</p>\n<p>Therefore, I am considering negative sampling of some unnecessary candidates or sessions.</p>\n<p>As a kaggle beginner, I can only think of the followings…</p>\n<ul>\n<li>Remove sessions with too few logs</li>\n<li>Randomly reduce the number of sessions.</li>\n<li>Reduce the number of batches per study</li>\n</ul>\n<p>Do you have any good ideas?</p>",
  "messages": [
    {
      "id": "2071703",
      "postDate": "12/21/2022 09:33:29",
      "content": "<p>Generating a large number of candidates, such as a co-visitation matrix, is often expected to result in an out-of-memory error.</p>\n<p>Therefore, I am considering negative sampling of some unnecessary candidates or sessions.</p>\n<p>As a kaggle beginner, I can only think of the followings…</p>\n<ul>\n<li>Remove sessions with too few logs</li>\n<li>Randomly reduce the number of sessions.</li>\n<li>Reduce the number of batches per study</li>\n</ul>\n<p>Do you have any good ideas?</p>",
      "rawMarkdown": "Generating a large number of candidates, such as a co-visitation matrix, is often expected to result in an out-of-memory error.\n\nTherefore, I am considering negative sampling of some unnecessary candidates or sessions.\n\nAs a kaggle beginner, I can only think of the followings...\n\n- Remove sessions with too few logs\n- Randomly reduce the number of sessions.\n- Reduce the number of batches per study\n\nDo you have any good ideas?",
      "votes": null
    },
    {
      "id": "2071752",
      "postDate": "12/21/2022 10:49:13",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/373224\" target=\"_blank\">Otto's recent approach</a> discusses about negative sampling (although the original video is in German).<br>\nAs far as I know the most popular and recent approach of negative sampling is that used for GRU4Rec &amp; GRU4Rec+. Where they sample negative samples out of batch. Sampled Softmax Loss is also an approach that reduces memory consumption.</p>\n<p>However, I think most of current approach requires huge amount of GPU memory to achieve a decent score on a huge number of item &amp; users.</p>\n<p>If you have not enough memory, I think <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/364721\" target=\"_blank\">candidate rerank model shared in this discussion</a> is most promising ones.</p>",
      "rawMarkdown": "[Otto's recent approach] discusses about negative sampling (although the original video is in German).\nAs far as I know the most popular and recent approach of negative sampling is that used for GRU4Rec & GRU4Rec+. Where they sample negative samples out of batch. Sampled Softmax Loss is also an approach that reduces memory consumption.\n\nHowever, I think most of current approach requires huge amount of GPU memory to achieve a decent score on a huge number of item & users.\n\nIf you have not enough memory, I think [candidate rerank model shared in this discussion] is most promising ones.\n\n[Otto's recent approach]: https://www.kaggle.com/competitions/otto-recommender-system/discussion/373224\n[candidate rerank model shared in this discussion]: https://www.kaggle.com/competitions/otto-recommender-system/discussion/364721",
      "votes": null
    },
    {
      "id": "2073685",
      "postDate": "12/23/2022 09:19:29",
      "content": "<p>Build your validation scheme, and try all of it.<br>\nFYI, I'm using random.</p>",
      "rawMarkdown": "Build your validation scheme, and try all of it.\nFYI, I'm using random.",
      "votes": null
    },
    {
      "id": "2076434",
      "postDate": "12/26/2022 14:18:20",
      "content": "<p>Does it simply work? Did you try some heavy searches (hyperparameters for example) based on it? It didn't break?</p>",
      "rawMarkdown": "Does it simply work? Did you try some heavy searches (hyperparameters for example) based on it? It didn't break?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2071752,
      "author_name": "tatamikenn",
      "author_url": "",
      "post_date": "12/21/2022 10:49:13",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/373224\" target=\"_blank\">Otto's recent approach</a> discusses about negative sampling (although the original video is in German).<br>\nAs far as I know the most popular and recent approach of negative sampling is that used for GRU4Rec &amp; GRU4Rec+. Where they sample negative samples out of batch. Sampled Softmax Loss is also an approach that reduces memory consumption.</p>\n<p>However, I think most of current approach requires huge amount of GPU memory to achieve a decent score on a huge number of item &amp; users.</p>\n<p>If you have not enough memory, I think <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/364721\" target=\"_blank\">candidate rerank model shared in this discussion</a> is most promising ones.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2073685,
      "author_name": "onodera",
      "author_url": "",
      "post_date": "12/23/2022 09:19:29",
      "content": "<p>Build your validation scheme, and try all of it.<br>\nFYI, I'm using random.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2076434,
          "author_name": "thedevastator",
          "author_url": "",
          "post_date": "12/26/2022 14:18:20",
          "content": "<p>Does it simply work? Did you try some heavy searches (hyperparameters for example) based on it? It didn't break?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2071703": "Generating a large number of candidates, such as a co-visitation matrix, is often expected to result in an out-of-memory error.\n\nTherefore, I am considering negative sampling of some unnecessary candidates or sessions.\n\nAs a kaggle beginner, I can only think of the followings...\n\n- Remove sessions with too few logs\n- Randomly reduce the number of sessions.\n- Reduce the number of batches per study\n\nDo you have any good ideas?",
    "2071752": "[Otto's recent approach] discusses about negative sampling (although the original video is in German).\nAs far as I know the most popular and recent approach of negative sampling is that used for GRU4Rec & GRU4Rec+. Where they sample negative samples out of batch. Sampled Softmax Loss is also an approach that reduces memory consumption.\n\nHowever, I think most of current approach requires huge amount of GPU memory to achieve a decent score on a huge number of item & users.\n\nIf you have not enough memory, I think [candidate rerank model shared in this discussion] is most promising ones.\n\n[Otto's recent approach]: https://www.kaggle.com/competitions/otto-recommender-system/discussion/373224\n[candidate rerank model shared in this discussion]: https://www.kaggle.com/competitions/otto-recommender-system/discussion/364721",
    "2073685": "Build your validation scheme, and try all of it.\nFYI, I'm using random.",
    "2076434": "Does it simply work? Did you try some heavy searches (hyperparameters for example) based on it? It didn't break?"
  },
  "source": "meta"
}