{
  "id": 444653,
  "title": "How to check if your model generalizes to long sequences",
  "url": "/competitions/stanford-ribonanza-rna-folding/discussion/444653",
  "author_name": "Shujun",
  "post_date": "2023-10-03T02:51:06.598000",
  "votes": 60,
  "comment_count": 78,
  "views": 0,
  "content": "<p>An important task in this competition is for models to generalize to long RNA sequences, because many RNAs of interest can be much longer than what is available in the training set. Therefore, we have included sequences that are much longer (as long as 457 nt) in the private test set. A good way to check your model's performance on these long sequences is to visually inspect a subset of sequences which we call <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4080707/\" target=\"_blank\">mutate and map</a> (used to infer base pairings by point mutations). We have an example of these using predictions from a model that gives reasonable predictions on a subset of 457nt sequences with known structure. Note that the red arrow points to a region of known long range pseudo-knot (the darker rectangle) which have been impossible to predict with prior modeling methods. When exposed following point mutations, the long range pseudo-knot region has increased reactivity.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2Fbda49dc7b259bcec466b575c5a75d97c%2Fexample.png?generation=1696301353614738&amp;alt=media\" alt=\"\"><br>\nTo plot these:</p>\n<pre><code>import polars as pl\nimport matplotlib.pyplot as plt\n\n=pl.read_csv(\"sub.csv\")\n\n=6\n=269545321\n=269724007\n=391\n=457\n\n=df[id1:id2+1][].to_numpy().reshape(reshape1,reshape2)\n=df[id1:id2+1][].to_numpy().reshape(reshape1,reshape2)\n\nfig = plt.figure()\nplt.subplot(121)\nplt.title(f, =font_size)\nplt.imshow(pred_DMS,=0,vmax=1, =)\nplt.subplot(122)\nplt.title(f, =font_size)\nplt.imshow(pred_2A3,=0,vmax=1, =)\nplt.tight_layout()\nplt.savefig(f,=500)\nplt.clf()\nplt.close()\n</code></pre>\n<p>Additionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.<br>\nFor anyone confused about how these mutations work, I have added another plot visualizing where these mutations occur. From position 27 to 416, the mutations at each position is one of {'A-&gt;U', 'C-&gt;G', 'G-&gt;C', 'U-&gt;A'}. Therefore, you can see a diagonal line in the middle. Note that the beginning and end regions are constant, while right before the end, there's also a bar code region unique to each sequence. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F633626f460d2a563a3757e5e003529e8%2FTribozyme_point_mutations.png?generation=1697823756980699&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 2465490,
      "postDate": "2023-10-03T02:51:06.600Z",
      "content": "<p>An important task in this competition is for models to generalize to long RNA sequences, because many RNAs of interest can be much longer than what is available in the training set. Therefore, we have included sequences that are much longer (as long as 457 nt) in the private test set. A good way to check your model's performance on these long sequences is to visually inspect a subset of sequences which we call <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4080707/\" target=\"_blank\">mutate and map</a> (used to infer base pairings by point mutations). We have an example of these using predictions from a model that gives reasonable predictions on a subset of 457nt sequences with known structure. Note that the red arrow points to a region of known long range pseudo-knot (the darker rectangle) which have been impossible to predict with prior modeling methods. When exposed following point mutations, the long range pseudo-knot region has increased reactivity.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2Fbda49dc7b259bcec466b575c5a75d97c%2Fexample.png?generation=1696301353614738&amp;alt=media\" alt=\"\"><br>\nTo plot these:</p>\n<pre><code>import polars as pl\nimport matplotlib.pyplot as plt\n\n=pl.read_csv(\"sub.csv\")\n\n=6\n=269545321\n=269724007\n=391\n=457\n\n=df[id1:id2+1][].to_numpy().reshape(reshape1,reshape2)\n=df[id1:id2+1][].to_numpy().reshape(reshape1,reshape2)\n\nfig = plt.figure()\nplt.subplot(121)\nplt.title(f, =font_size)\nplt.imshow(pred_DMS,=0,vmax=1, =)\nplt.subplot(122)\nplt.title(f, =font_size)\nplt.imshow(pred_2A3,=0,vmax=1, =)\nplt.tight_layout()\nplt.savefig(f,=500)\nplt.clf()\nplt.close()\n</code></pre>\n<p>Additionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.<br>\nFor anyone confused about how these mutations work, I have added another plot visualizing where these mutations occur. From position 27 to 416, the mutations at each position is one of {'A-&gt;U', 'C-&gt;G', 'G-&gt;C', 'U-&gt;A'}. Therefore, you can see a diagonal line in the middle. Note that the beginning and end regions are constant, while right before the end, there's also a bar code region unique to each sequence. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F633626f460d2a563a3757e5e003529e8%2FTribozyme_point_mutations.png?generation=1697823756980699&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "\nAn important task in this competition is for models to generalize to long RNA sequences, because many RNAs of interest can be much longer than what is available in the training set. Therefore, we have included sequences that are much longer (as long as 457 nt) in the private test set. A good way to check your model's performance on these long sequences is to visually inspect a subset of sequences which we call [mutate and map](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4080707/) (used to infer base pairings by point mutations). We have an example of these using predictions from a model that gives reasonable predictions on a subset of 457nt sequences with known structure. Note that the red arrow points to a region of known long range pseudo-knot (the darker rectangle) which have been impossible to predict with prior modeling methods. When exposed following point mutations, the long range pseudo-knot region has increased reactivity.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2Fbda49dc7b259bcec466b575c5a75d97c%2Fexample.png?generation=1696301353614738&alt=media)\n\nTo plot these:\n```\nimport polars as pl\nimport matplotlib.pyplot as plt\n\n#read your sub here\ndf=pl.read_csv(\"sub.csv\")\n\n#some parameters\nfont_size=6\nid1=269545321\nid2=269724007\nreshape1=391\nreshape2=457\n\n#get predictions\npred_DMS=df[id1:id2+1]['reactivity_DMS_MaP'].to_numpy().reshape(reshape1,reshape2)\npred_2A3=df[id1:id2+1]['reactivity_2A3_MaP'].to_numpy().reshape(reshape1,reshape2)\n\n#plot mutate and map\nfig = plt.figure()\nplt.subplot(121)\nplt.title(f'reactivity_DMS_MaP', fontsize=font_size)\nplt.imshow(pred_DMS,vmin=0,vmax=1, cmap='gray_r')\nplt.subplot(122)\nplt.title(f'reactivity_2A3_MaP', fontsize=font_size)\nplt.imshow(pred_2A3,vmin=0,vmax=1, cmap='gray_r')\n\nplt.tight_layout()\nplt.savefig(f\"plot.png\",dpi=500)\nplt.clf()\nplt.close()\n```\n\nAdditionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.\n\nFor anyone confused about how these mutations work, I have added another plot visualizing where these mutations occur. From position 27 to 416, the mutations at each position is one of {'A->U', 'C->G', 'G->C', 'U->A'}. Therefore, you can see a diagonal line in the middle. Note that the beginning and end regions are constant, while right before the end, there's also a bar code region unique to each sequence. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F633626f460d2a563a3757e5e003529e8%2FTribozyme_point_mutations.png?generation=1697823756980699&alt=media)\n\n",
      "votes": 60
    },
    {
      "id": 2544569,
      "postDate": "2023-11-30T23:42:47.880Z",
      "content": "<p>Hi Kagglers, we have another interesting test of generality with a sequence that was in the last CASP competition: R1138v1 or 7PTL in protein data bank (<a href=\"https://www.rcsb.org/structure/7PTL\" target=\"_blank\">https://www.rcsb.org/structure/7PTL</a> ). We have extracted the secondary structure from the experimentally resolved 3D structure:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F592eb93db2a8a6be01f8f4daaf0ba369%2F7PTL.png?generation=1701387560513990&amp;alt=media\" alt=\"\"></p>\n<p>and looked at our model’s predictions using the mutate-and-map technique with our model:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F1bd6d46561d3f9c3b7869e2f28fcf9f6%2FR1138v1.png?generation=1701387579567164&amp;alt=media\" alt=\"\"></p>\n<p></p>\n<p>While we definitely see the main secondary structure, the kissing loops above the diagonal between the 5' and 3' 'halves' are not clearly present (circled in cyan) and there are also some short stems missing (circled in red)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F929d70a5ec679273b52565cbf37ee7c7%2F7PTL_annotated.png?generation=1701392197627840&amp;alt=media\" alt=\"\"></p>\n<p>You can check your predictions by making predictions for the sequences in the following <a href=\"https://www.kaggle.com/datasets/shujun717/r1138v1-m2\" target=\"_blank\">CSV file</a>), where the sequence ids are in the format of V1138v1_m2_{mutated_position}. And I have prepared <a href=\"https://www.kaggle.com/datasets/shujun717/r1138-bpp\" target=\"_blank\">bpp files</a> for these. And after making predictions you can visualize with the following code:</p>\n<pre><code>m2_preds=(m2_sequences) #x720x2\n\nplt()\nplt()\nplt(m2_preds,vmin=,vmax=,cmap=)\nplt()\nplt()\nplt(m2_preds,vmin=,vmax=,cmap=)\n</code></pre>\n<p>We’re excited to see what you have and if your model is generalizing better!</p>",
      "rawMarkdown": "Hi Kagglers, we have another interesting test of generality with a sequence that was in the last CASP competition: R1138v1 or 7PTL in protein data bank (https://www.rcsb.org/structure/7PTL ). We have extracted the secondary structure from the experimentally resolved 3D structure:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F592eb93db2a8a6be01f8f4daaf0ba369%2F7PTL.png?generation=1701387560513990&alt=media)\n\nand looked at our model’s predictions using the mutate-and-map technique with our model:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F1bd6d46561d3f9c3b7869e2f28fcf9f6%2FR1138v1.png?generation=1701387579567164&alt=media)\n\n~~While we definitely see the main secondary structure, the kissing loops above the diagonal (in cyan) between the 5' and 3' 'halves' are not clearly present (circled in cyan)~~\n\nWhile we definitely see the main secondary structure, the kissing loops above the diagonal between the 5' and 3' 'halves' are not clearly present (circled in cyan) and there are also some short stems missing (circled in red)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F929d70a5ec679273b52565cbf37ee7c7%2F7PTL_annotated.png?generation=1701392197627840&alt=media)\n\n\nYou can check your predictions by making predictions for the sequences in the following [CSV file](https://www.kaggle.com/datasets/shujun717/r1138v1-m2)), where the sequence ids are in the format of V1138v1_m2_{mutated_position}. And I have prepared [bpp files](https://www.kaggle.com/datasets/shujun717/r1138-bpp) for these. And after making predictions you can visualize with the following code:\n\n```\nm2_preds=model(m2_sequences) #721x720x2\n\nplt.subplot(121)\nplt.title('2A3')\nplt.imshow(m2_preds[:,:,0],vmin=0,vmax=1,cmap='gray_r')\nplt.subplot(122)\nplt.title('DMS')\nplt.imshow(m2_preds[:,:,1],vmin=0,vmax=1,cmap='gray_r')\n```\n\nWe’re excited to see what you have and if your model is generalizing better!\n\n",
      "votes": 9,
      "replies": [
        {
          "id": 2544572,
          "postDate": "2023-11-30T23:47:57.213Z",
          "content": "<p>The link directs nowhere for now, can you make dataset public? Excited to try our models on these sequences c:</p>",
          "rawMarkdown": "The link directs nowhere for now, can you make dataset public? Excited to try our models on these sequences c:",
          "votes": 2
        },
        {
          "id": 2544573,
          "postDate": "2023-11-30T23:48:05.633Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 2544582,
          "postDate": "2023-12-01T00:04:02.757Z",
          "content": "<p><a href=\"https://www.kaggle.com/martynoveduard\" target=\"_blank\">@martynoveduard</a> fixed. Can you see it now?</p>",
          "rawMarkdown": "@martynoveduard fixed. Can you see it now?",
          "votes": 1,
          "replies": [
            {
              "id": 2544583,
              "postDate": "2023-12-01T00:05:12.310Z",
              "content": "<p>yup, thanks</p>",
              "rawMarkdown": "yup, thanks",
              "votes": 1
            }
          ]
        },
        {
          "id": 2544608,
          "postDate": "2023-12-01T01:09:26.333Z",
          "content": "<p>There was a mistake in my post regarding the kissing loops and I have updated the post and annotated secondary structure plot</p>",
          "rawMarkdown": "There was a mistake in my post regarding the kissing loops and I have updated the post and annotated secondary structure plot",
          "votes": 1
        },
        {
          "id": 2544622,
          "postDate": "2023-12-01T01:31:33.877Z",
          "content": "<p>Could you please provide the bpp files of the sequences ?</p>",
          "rawMarkdown": "Could you please provide the bpp files of the sequences ?",
          "replies": [
            {
              "id": 2544632,
              "postDate": "2023-12-01T01:48:08.160Z",
              "content": "<p>Yeah see here: <a href=\"https://www.kaggle.com/datasets/shujun717/r1138-bpp\" target=\"_blank\">https://www.kaggle.com/datasets/shujun717/r1138-bpp</a></p>",
              "rawMarkdown": "Yeah see here: https://www.kaggle.com/datasets/shujun717/r1138-bpp",
              "votes": 2
            },
            {
              "id": 2544646,
              "postDate": "2023-12-01T02:07:15.123Z",
              "content": "<p>Thanks a lot !</p>",
              "rawMarkdown": "Thanks a lot !"
            }
          ]
        },
        {
          "id": 2545058,
          "postDate": "2023-12-01T09:04:55.683Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F2cf362b4bdcb279336a4d2b81659dcff%2FR1138v1-m2.png?generation=1701421412590124&amp;alt=media\" alt=\"This one is really hard…\"></p>",
          "rawMarkdown": "![This one is really hard...](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F2cf362b4bdcb279336a4d2b81659dcff%2FR1138v1-m2.png?generation=1701421412590124&alt=media)",
          "replies": [
            {
              "id": 2545116,
              "postDate": "2023-12-01T10:00:20.753Z",
              "content": "<p>I tried to take the mean of 2A3 and DMS for a better picture. I can actually see hints of this middle kissing loop. But the side ones are too difficult… perhaps the top LB models would do better there.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F4a067628c581254f866c329c4a4f84ca%2FR1138v1-m2%20mean.png?generation=1701424745768217&amp;alt=media\" alt=\"\"></p>",
              "rawMarkdown": "I tried to take the mean of 2A3 and DMS for a better picture. I can actually see hints of this middle kissing loop. But the side ones are too difficult... perhaps the top LB models would do better there.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F4a067628c581254f866c329c4a4f84ca%2FR1138v1-m2%20mean.png?generation=1701424745768217&alt=media)"
            }
          ]
        },
        {
          "id": 2545614,
          "postDate": "2023-12-01T15:56:03.477Z",
          "content": "<p>Thanks for another example. It seems my model gets signs of all lines except the ones in the middle you outline with cyan(<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F713d4a75f27a4c1c64317e9ead70d19a%2Fg1.png?generation=1701445917913290&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "Thanks for another example. It seems my model gets signs of all lines except the ones in the middle you outline with cyan(\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F713d4a75f27a4c1c64317e9ead70d19a%2Fg1.png?generation=1701445917913290&alt=media)",
          "votes": 1
        }
      ]
    },
    {
      "id": 2468976,
      "postDate": "2023-10-06T03:32:47.713Z",
      "content": "<p>Nice post<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F5c3b1d7781037565087d814379e80f37%2Fplot.png?generation=1696563122851918&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Nice post\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F5c3b1d7781037565087d814379e80f37%2Fplot.png?generation=1696563122851918&alt=media)",
      "votes": 7
    },
    {
      "id": 2497319,
      "postDate": "2023-10-24T15:13:38.733Z",
      "content": "<p>Hopefully similar enough<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3586013%2Ff0719545c5889b67ddba45f7da00a3bf%2Fplot0.png?generation=1698160337092019&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Hopefully similar enough\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3586013%2Ff0719545c5889b67ddba45f7da00a3bf%2Fplot0.png?generation=1698160337092019&alt=media)",
      "votes": 6,
      "replies": [
        {
          "id": 2499257,
          "postDate": "2023-10-25T22:27:41.210Z",
          "content": "<p>Your's looks really similar!</p>",
          "rawMarkdown": "Your's looks really similar!"
        },
        {
          "id": 2513861,
          "postDate": "2023-11-05T19:47:20.967Z",
          "content": "<p>It's very impressive! Do you mind sharing the LB score of this model?</p>",
          "rawMarkdown": "It's very impressive! Do you mind sharing the LB score of this model?",
          "replies": [
            {
              "id": 2514136,
              "postDate": "2023-11-06T04:54:33.823Z",
              "content": "<p>The LB score is actually pretty bad ~0.17 but it was because of a bug</p>",
              "rawMarkdown": "The LB score is actually pretty bad ~0.17 but it was because of a bug",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2544552,
      "postDate": "2023-11-30T22:50:01.543Z",
      "content": "<p>Plot by current best submission<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1745801%2F685f90a707c237413455e9757b3a8355%2Fplot.png?generation=1701385653066069&amp;alt=media\" alt=\"\"></p>\n<p>I still don't know how to interpret the plots.</p>",
      "rawMarkdown": "Plot by current best submission\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1745801%2F685f90a707c237413455e9757b3a8355%2Fplot.png?generation=1701385653066069&alt=media)\n\nI still don't know how to interpret the plots.",
      "votes": 4
    },
    {
      "id": 2467044,
      "postDate": "2023-10-04T09:04:43.060Z",
      "content": "<p>I think this topic deserves a pin! I was wondering if the model you used was trained on the same data we have.</p>",
      "rawMarkdown": "I think this topic deserves a pin! I was wondering if the model you used was trained on the same data we have.",
      "votes": 3,
      "replies": [
        {
          "id": 2467846,
          "postDate": "2023-10-04T23:01:57.430Z",
          "content": "<p>Yes it was! </p>",
          "rawMarkdown": "Yes it was! ",
          "votes": 3
        },
        {
          "id": 2471884,
          "postDate": "2023-10-06T17:58:03.313Z",
          "content": "<p>Topic is pinned! Thanks for suggesting.</p>",
          "rawMarkdown": "Topic is pinned! Thanks for suggesting.",
          "votes": 2
        }
      ]
    },
    {
      "id": 2551957,
      "postDate": "2023-12-07T05:03:40.100Z",
      "content": "<p><a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> I'm just curious in case if you are allowed to share this information, were you able to resolve the technical difficulties with measuring the activity at the sequence ends, or do you still plan to evaluate only the middle parts of the sequences? Thanks.</p>",
      "rawMarkdown": "@shujun717 I'm just curious in case if you are allowed to share this information, were you able to resolve the technical difficulties with measuring the activity at the sequence ends, or do you still plan to evaluate only the middle parts of the sequences? Thanks.",
      "votes": 2,
      "replies": [
        {
          "id": 2553843,
          "postDate": "2023-12-08T14:47:27.777Z",
          "content": "<p>I think sequence ends were not used for scoring</p>",
          "rawMarkdown": "I think sequence ends were not used for scoring",
          "votes": 1
        }
      ]
    },
    {
      "id": 2473265,
      "postDate": "2023-10-08T06:01:29.310Z",
      "content": "<p>Great Post!<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6491363%2F13f80753ed9d37e3528d7b3a93fc0bc0%2Fplot.png?generation=1696744827715873&amp;alt=media\" alt=\"plot\"></p>",
      "rawMarkdown": "Great Post!\n![plot](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6491363%2F13f80753ed9d37e3528d7b3a93fc0bc0%2Fplot.png?generation=1696744827715873&alt=media)",
      "votes": 1
    },
    {
      "id": 2489571,
      "postDate": "2023-10-20T04:46:23.360Z",
      "content": "<p>I am still confused. Not sure what the arrangement is. Are these just lists of reactivity by nt position?</p>",
      "rawMarkdown": "I am still confused. Not sure what the arrangement is. Are these just lists of reactivity by nt position?",
      "replies": [
        {
          "id": 2490474,
          "postDate": "2023-10-20T17:54:43.980Z",
          "content": "<p>Yes I have added an explanation for this! See the added plot and last paragraph</p>",
          "rawMarkdown": "Yes I have added an explanation for this! See the added plot and last paragraph",
          "replies": [
            {
              "id": 2490680,
              "postDate": "2023-10-20T23:21:33.423Z",
              "content": "<p>Thank you. How did you determine the mutation?</p>",
              "rawMarkdown": "Thank you. How did you determine the mutation?",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2465687,
      "postDate": "2023-10-03T07:36:09.713Z",
      "content": "<p>Thank you for providing this valuable example!</p>\n<p>I'll give plots of two of my models here, - not generalizible and somewhat generalizable</p>",
      "rawMarkdown": "Thank you for providing this valuable example!\n\nI'll give plots of two of my models here, - not generalizible and somewhat generalizable",
      "votes": 2,
      "replies": [
        {
          "id": 2465690,
          "postDate": "2023-10-03T07:38:42.970Z",
          "content": "<p>This one I thought won't generalize to private LB</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F33511d686900e64bb2a2b80d38fa71fc%2FScreenshot%202023-10-03%20at%2010.36.42.png?generation=1696318705717511&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "This one I thought won't generalize to private LB\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F33511d686900e64bb2a2b80d38fa71fc%2FScreenshot%202023-10-03%20at%2010.36.42.png?generation=1696318705717511&alt=media)",
          "votes": 2
        },
        {
          "id": 2465692,
          "postDate": "2023-10-03T07:42:11.820Z",
          "content": "<p>I don't see the black rectangle here :D But the plot overall resembles yours </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F52d785fe5fb11ed872c9d7d7223487c4%2FScreenshot%202023-10-03%20at%2010.40.47.png?generation=1696318881885098&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "I don't see the black rectangle here :D But the plot overall resembles yours \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F52d785fe5fb11ed872c9d7d7223487c4%2FScreenshot%202023-10-03%20at%2010.40.47.png?generation=1696318881885098&alt=media)",
          "votes": 4,
          "replies": [
            {
              "id": 2467875,
              "postDate": "2023-10-05T00:57:05.717Z",
              "content": "<p>Thanks for posting. Any idea why the first model does not generalize well? It's fine if you don't want to share though.  </p>",
              "rawMarkdown": "Thanks for posting. Any idea why the first model does not generalize well? It's fine if you don't want to share though.  ",
              "votes": 2
            },
            {
              "id": 2468063,
              "postDate": "2023-10-05T06:41:32.447Z",
              "content": "<p>My early models were GRUs and LSTMs. I had two issue with those models. <br>\n1) The outputs were preferentially zeros at start and end of the sequences.<br>\n2)  I was struggling to generalize for long sequences. <br>\nThen, I implemented the model proposed by <a href=\"https://www.kaggle.com/IAFOSS\" target=\"_blank\">@IAFOSS</a> <a href=\"https://www.kaggle.com/code/iafoss/rna-starter-submission-0-186-lb\" target=\"_blank\">https://www.kaggle.com/code/iafoss/rna-starter-submission-0-186-lb</a> and the issues disappeared</p>",
              "rawMarkdown": "My early models were GRUs and LSTMs. I had two issue with those models. \n1) The outputs were preferentially zeros at start and end of the sequences.\n2)  I was struggling to generalize for long sequences. \nThen, I implemented the model proposed by @IAFOSS https://www.kaggle.com/code/iafoss/rna-starter-submission-0-186-lb and the issues disappeared",
              "votes": 3
            },
            {
              "id": 2468100,
              "postDate": "2023-10-05T07:14:51.937Z",
              "content": "<blockquote>\n  <p>Any idea why the first model does not generalize well?</p>\n</blockquote>\n<p>Sure! First model is using absolute positional encoding and was not trained on longer sequences.</p>\n<p>We've got to figure out how to align feature spaces of train and test distributions so that we can predict something like you shared in the post</p>",
              "rawMarkdown": ">  Any idea why the first model does not generalize well?\n\nSure! First model is using absolute positional encoding and was not trained on longer sequences.\n\nWe've got to figure out how to align feature spaces of train and test distributions so that we can predict something like you shared in the post",
              "votes": 6
            },
            {
              "id": 2474180,
              "postDate": "2023-10-09T03:57:04.610Z",
              "content": "<p><a href=\"https://www.kaggle.com/martynoveduard\" target=\"_blank\">@martynoveduard</a> what do you mean training on longer sequences? Most of the sequences in train are 177</p>",
              "rawMarkdown": "@martynoveduard what do you mean training on longer sequences? Most of the sequences in train are 177",
              "votes": 1
            },
            {
              "id": 2474197,
              "postDate": "2023-10-09T04:20:21.983Z",
              "content": "<p>When I talk about longer sequences, I'm referring to sequences with a length greater than 206. In the private test, it's apparent that the model hasn't learned positional encoding for tokens beyond the 206th position. Because of this, I consider these tokens as out-of-distribution (OOD) samples for the model and as can be seen from the first plot, predictions for these positions are different from the previous positions.</p>",
              "rawMarkdown": "When I talk about longer sequences, I'm referring to sequences with a length greater than 206. In the private test, it's apparent that the model hasn't learned positional encoding for tokens beyond the 206th position. Because of this, I consider these tokens as out-of-distribution (OOD) samples for the model and as can be seen from the first plot, predictions for these positions are different from the previous positions.",
              "votes": 1
            },
            {
              "id": 2502078,
              "postDate": "2023-10-27T23:47:58.583Z",
              "content": "<p>Forgive my stupidity but, how can you know that in the private test your model doesn't work on beyond 206th. The private test data has not been released. </p>",
              "rawMarkdown": "Forgive my stupidity but, how can you know that in the private test your model doesn't work on beyond 206th. The private test data has not been released. "
            },
            {
              "id": 2502338,
              "postDate": "2023-10-28T06:00:25.833Z",
              "content": "<p>I just compared (visually) the plots I obtained from the script provided by Shujun for my models and hosts model, as you can see there are sequences of length &gt;400, therefore its a part of the private data, and it's provided to us for convinience so we can sanity check our models on sequences with greater lengths</p>",
              "rawMarkdown": "I just compared (visually) the plots I obtained from the script provided by Shujun for my models and hosts model, as you can see there are sequences of length >400, therefore its a part of the private data, and it's provided to us for convinience so we can sanity check our models on sequences with greater lengths",
              "votes": 1
            },
            {
              "id": 2539283,
              "postDate": "2023-11-26T23:57:05.847Z",
              "content": "<p>Hello! <br>\nthe model does actually generalize quite worse than yours. Did you do anything specific to improve generalization or does it generalize better with accuracy improvement?<br>\nIf your willing to share i'll be glad to hear what you did to improve generalization… <br>\nI've tried implementing sliding windows and similar embedding stuff on top but haven't been able to generalize as well</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2Fc96903cd3bbd05b126094a7f4321bb22%2Fplot3%20(3).png?generation=1701042395156105&amp;alt=media\" alt=\"@iafoss\"></p>",
              "rawMarkdown": "Hello! \nthe model does actually generalize quite worse than yours. Did you do anything specific to improve generalization or does it generalize better with accuracy improvement?\nIf your willing to share i'll be glad to hear what you did to improve generalization... \nI've tried implementing sliding windows and similar embedding stuff on top but haven't been able to generalize as well\n\n![@iafoss](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2Fc96903cd3bbd05b126094a7f4321bb22%2Fplot3%20(3).png?generation=1701042395156105&alt=media)"
            },
            {
              "id": 2539286,
              "postDate": "2023-11-26T23:59:45.200Z",
              "content": "<p>implementing sliding window on top<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2F414a53cf6db6ca39ec1df130a5932aa5%2Fplot3.png?generation=1701043156096329&amp;alt=media\" alt=\"\"></p>",
              "rawMarkdown": "implementing sliding window on top\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2F414a53cf6db6ca39ec1df130a5932aa5%2Fplot3.png?generation=1701043156096329&alt=media)\n"
            },
            {
              "id": 2540819,
              "postDate": "2023-11-28T03:25:10.050Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        }
      ]
    },
    {
      "id": 2465562,
      "postDate": "2023-10-03T05:14:30.540Z",
      "content": "<p>It is not easy.</p>",
      "rawMarkdown": "It is not easy.",
      "votes": 2
    },
    {
      "id": 2552073,
      "postDate": "2023-12-07T07:06:08.943Z",
      "content": "<p>Did anybody succeed in predicting long-range pseudoknot?</p>",
      "rawMarkdown": "Did anybody succeed in predicting long-range pseudoknot?",
      "replies": [
        {
          "id": 2552173,
          "postDate": "2023-12-07T09:06:40.060Z",
          "rawMarkdown": "",
          "isDeleted": true,
          "replies": [
            {
              "id": 2552270,
              "postDate": "2023-12-07T10:49:21.667Z",
              "content": "<p>Black rectangle</p>",
              "rawMarkdown": "Black rectangle"
            },
            {
              "id": 2552309,
              "postDate": "2023-12-07T11:23:36.517Z",
              "content": "<p><a href=\"https://www.kaggle.com/sroger\" target=\"_blank\">@sroger</a> got it; he posted a picture below.<br>\nI got it, too, but my accuracy is really low, so unless there is a massive shakeup, I'm not a competition hehe.</p>",
              "rawMarkdown": "@sroger got it; he posted a picture below.\nI got it, too, but my accuracy is really low, so unless there is a massive shakeup, I'm not a competition hehe.",
              "votes": 1
            },
            {
              "id": 2552409,
              "postDate": "2023-12-07T12:39:06.940Z",
              "content": "<p>Unfortunately I was not able to maintain that knot as I lowered cv/lb. </p>",
              "rawMarkdown": "Unfortunately I was not able to maintain that knot as I lowered cv/lb. ",
              "votes": 2
            },
            {
              "id": 2552411,
              "postDate": "2023-12-07T12:43:49.903Z",
              "content": "<p>Yes, is it true that you were able to maintain it untill you started to use bpp?</p>",
              "rawMarkdown": "Yes, is it true that you were able to maintain it untill you started to use bpp?\n"
            },
            {
              "id": 2552413,
              "postDate": "2023-12-07T12:43:58.987Z",
              "content": "<p>Hmm, this is interesting. Do you have an idea why? (it's ok if you postpone your answer to the end of the competition)</p>",
              "rawMarkdown": "Hmm, this is interesting. Do you have an idea why? (it's ok if you postpone your answer to the end of the competition)"
            },
            {
              "id": 2552449,
              "postDate": "2023-12-07T13:23:26.133Z",
              "rawMarkdown": "",
              "votes": 2,
              "isDeleted": true
            },
            {
              "id": 2552468,
              "postDate": "2023-12-07T13:46:48.930Z",
              "content": "<p>Very surprising…</p>",
              "rawMarkdown": "Very surprising..."
            },
            {
              "id": 2552511,
              "postDate": "2023-12-07T14:17:11.630Z",
              "content": "<p>About software — it seems not as simple because bpp from eterna/contrafold can be used to predict pseudoknots. But yes, I think that they are anyway terrible at that. <br>\nUnfortunately, other matrices-producing algorithms haven't shown better score. </p>",
              "rawMarkdown": "About software — it seems not as simple because bpp from eterna/contrafold can be used to predict pseudoknots. But yes, I think that they are anyway terrible at that. \nUnfortunately, other matrices-producing algorithms haven't shown better score. "
            },
            {
              "id": 2552528,
              "postDate": "2023-12-07T14:31:08.607Z",
              "content": "<p>Have you tried also the last-generation deep-learning bpp models like UFold/RFold?</p>",
              "rawMarkdown": "Have you tried also the last-generation deep-learning bpp models like UFold/RFold?"
            },
            {
              "id": 2552538,
              "postDate": "2023-12-07T14:37:45.367Z",
              "content": "<p>Yes and its a huge disappointment. Maybe, more can be achieved by using model finetuning. </p>",
              "rawMarkdown": "Yes and its a huge disappointment. Maybe, more can be achieved by using model finetuning. \n",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2542027,
      "postDate": "2023-11-29T02:36:39.497Z",
      "content": "<p>What's the issue with absolute positional encodings? Some people here have mentioned they don't think their model will generalize because they've used them. Are relative or rotary embeddings better in some way?</p>",
      "rawMarkdown": "What's the issue with absolute positional encodings? Some people here have mentioned they don't think their model will generalize because they've used them. Are relative or rotary embeddings better in some way?",
      "replies": [
        {
          "id": 2542496,
          "postDate": "2023-11-29T09:59:23.170Z",
          "content": "<p>Since the test set contains longer sequences than the train set, the model doesn't 'know' how to deal with unseen-before positions and does not generalize, i.e., the generated pictures are not similar to the ones posted by <a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> above. As for other embeddings, I advise you to experiment and find out what works best.</p>",
          "rawMarkdown": "Since the test set contains longer sequences than the train set, the model doesn't 'know' how to deal with unseen-before positions and does not generalize, i.e., the generated pictures are not similar to the ones posted by @shujun717 above. As for other embeddings, I advise you to experiment and find out what works best."
        }
      ]
    },
    {
      "id": 2541974,
      "postDate": "2023-11-29T01:16:23.643Z",
      "content": "<p>I am unable to follow this point:</p>\n<pre><code>Additionally, you also want  make sure  your model  outputting reasonable predictions      regions  there  no training data. Currently, due   technical reasons, we cannot measure these positions  we might be able  resolve these limitations   final private test . We have noticed internally    our models under certain conditions like  output entirely s      regions, which should  be happening.\n</code></pre>\n<p>E.g. if at the beginning the model has just nan from the data, why do we expect it to output a valid set of floats? </p>\n<p>I have two models, and just with change of depth in transformer  I am seeing one model is outputting all zeros in beginning and another some constant float. The latter does have better LB and my val set accuracy. But it seems just just a chance. </p>",
      "rawMarkdown": "I am unable to follow this point:\n```\nAdditionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.\n```\n\nE.g. if at the beginning the model has just nan from the data, why do we expect it to output a valid set of floats? \n\nI have two models, and just with change of depth in transformer  I am seeing one model is outputting all zeros in beginning and another some constant float. The latter does have better LB and my val set accuracy. But it seems just just a chance. ",
      "replies": [
        {
          "id": 2541976,
          "postDate": "2023-11-29T01:17:48.960Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F916b055e92a0457b367d14186654bdac%2F116_plot.png?generation=1701220652522549&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F38dc3df65fdb197bb532f83a2ae84320%2F124_plot.png?generation=1701220666076154&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F916b055e92a0457b367d14186654bdac%2F116_plot.png?generation=1701220652522549&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F38dc3df65fdb197bb532f83a2ae84320%2F124_plot.png?generation=1701220666076154&alt=media)",
          "replies": [
            {
              "id": 2541979,
              "postDate": "2023-11-29T01:20:06.953Z",
              "content": "<p>Seeking some opinions on the plots - what aspect looks bad. It seems in plot-set-1, 2A3 looks smeared. <br>\nPlot set 2 looks better in some aspects. <br>\nDmS in plot-set-1 looks much crispier. </p>\n<p>Any other pointers? <br>\n(thanks in advance)</p>",
              "rawMarkdown": "Seeking some opinions on the plots - what aspect looks bad. It seems in plot-set-1, 2A3 looks smeared. \nPlot set 2 looks better in some aspects. \nDmS in plot-set-1 looks much crispier. \n\nAny other pointers? \n(thanks in advance)"
            },
            {
              "id": 2541980,
              "postDate": "2023-11-29T01:21:20.257Z",
              "content": "<p>(I am struggling to understand the plot tbh)</p>",
              "rawMarkdown": "(I am struggling to understand the plot tbh)"
            }
          ]
        }
      ]
    },
    {
      "id": 2538258,
      "postDate": "2023-11-26T00:33:30.490Z",
      "content": "<p>Anyone having sucess to convert this into a numerical metric?<br>\nafter a degree of generalization its very hard to compare the images</p>",
      "rawMarkdown": "Anyone having sucess to convert this into a numerical metric?\nafter a degree of generalization its very hard to compare the images",
      "replies": [
        {
          "id": 2538470,
          "postDate": "2023-11-26T06:46:13.473Z",
          "content": "<p>It will be useless anyway, since this picture is also a prediction, not ground truth. So it is possible that your model will do better than theirs.</p>",
          "rawMarkdown": "It will be useless anyway, since this picture is also a prediction, not ground truth. So it is possible that your model will do better than theirs.",
          "votes": 2,
          "replies": [
            {
              "id": 2538545,
              "postDate": "2023-11-26T08:48:59.073Z",
              "content": "<p>Ooh thanks!</p>",
              "rawMarkdown": "Ooh thanks!"
            }
          ]
        }
      ]
    },
    {
      "id": 2488102,
      "postDate": "2023-10-19T03:25:30.650Z",
      "content": "<p>What do the x and y axis represent?</p>",
      "rawMarkdown": "What do the x and y axis represent?",
      "replies": [
        {
          "id": 2490475,
          "postDate": "2023-10-20T17:54:55.957Z",
          "content": "<p>x axis represents position, while y axis represents sequence number. I have also added a plot in the main post visualizing sequence (AUGC) and therefore where the point mutations happen</p>",
          "rawMarkdown": "x axis represents position, while y axis represents sequence number. I have also added a plot in the main post visualizing sequence (AUGC) and therefore where the point mutations happen"
        }
      ]
    },
    {
      "id": 2474942,
      "postDate": "2023-10-09T14:53:55.930Z",
      "content": "<p>Very interesting, thanks for sharing this and the plots!</p>",
      "rawMarkdown": "Very interesting, thanks for sharing this and the plots!"
    },
    {
      "id": 2472724,
      "postDate": "2023-10-07T14:38:04.070Z",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc171dba0da0fd0fbb23777bce343f8ab%2Fplot.png?generation=1696689349360396&amp;alt=media\" alt=\"\"></p>\n<p>Too blurry!</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc171dba0da0fd0fbb23777bce343f8ab%2Fplot.png?generation=1696689349360396&alt=media)\n\nToo blurry!",
      "replies": [
        {
          "id": 2529639,
          "postDate": "2023-11-18T12:16:35.493Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2F9de73bab64e1da812cb4766ea85eca25%2Fprogress.png?generation=1700309493366166&amp;alt=media\" alt=\"\"></p>\n<p>A bit of progress for me during this month, still far away from the ground truth.</p>\n<p>The score for this prediction is 0.15387 in the public lb, without training on the shared sequences in case anyone is wondering.</p>",
          "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2F9de73bab64e1da812cb4766ea85eca25%2Fprogress.png?generation=1700309493366166&alt=media)\n\nA bit of progress for me during this month, still far away from the ground truth.\n\nThe score for this prediction is 0.15387 in the public lb, without training on the shared sequences in case anyone is wondering.",
          "replies": [
            {
              "id": 2541250,
              "postDate": "2023-11-28T10:29:58.207Z",
              "content": "<p>Would you mind sharing what helped you improve generalization?</p>\n<p>I'll share first: Sliding window surprisingly dosen't help too much for generalization, using rotary embeddings helped a bit but still far away… The biggest catch for generalization is how we're dealing with the data/embeddings though trying various augmentation techniques  shifting the sequences randomly eg GAB -&gt; ABG -&gt;BGA , etc seemingly helps, not sure though.<br>\nhaven't implemented bpps yet not sure if it helps with generalization, i know that it should help with the score</p>",
              "rawMarkdown": "Would you mind sharing what helped you improve generalization?\n\nI'll share first: Sliding window surprisingly dosen't help too much for generalization, using rotary embeddings helped a bit but still far away... The biggest catch for generalization is how we're dealing with the data/embeddings though trying various augmentation techniques  shifting the sequences randomly eg GAB -> ABG ->BGA , etc seemingly helps, not sure though.\nhaven't implemented bpps yet not sure if it helps with generalization, i know that it should help with the score"
            },
            {
              "id": 2541411,
              "postDate": "2023-11-28T13:24:02.050Z",
              "content": "<p>I'm just new and learning as I go, will share it at end of the competition if I think it can add anything.</p>\n<p>About the sliding window, I'm not sure what is the benefit of using it with such short sequences, the main idea behind sliding window is to reduce the complexity from O(n^2) to O(n * w) where w is smaller than n but the RNA sequences of this competition are  &lt;= 457, so the normal attention can be computed without much trouble.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc527f175c09c1b82b9e2424467ee8fd6%2FScreenshot%20from%202023-11-28%2014-19-09.png?generation=1701177743958059&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Ffd303593fde0bfe1a4fb80da56e0888b%2FScreenshot%20from%202023-11-28%2014-12-33.png?generation=1701177168201962&amp;alt=media\" alt=\"\"></p>\n<p>Source: <a href=\"https://arxiv.org/pdf/2004.05150.pdf\" target=\"_blank\">https://arxiv.org/pdf/2004.05150.pdf</a></p>\n<p>No benefit at 512 seqlen and n^2, I could be wrong, so please if anyone knows better correct me.</p>",
              "rawMarkdown": "I'm just new and learning as I go, will share it at end of the competition if I think it can add anything.\n\nAbout the sliding window, I'm not sure what is the benefit of using it with such short sequences, the main idea behind sliding window is to reduce the complexity from O(n^2) to O(n * w) where w is smaller than n but the RNA sequences of this competition are  <= 457, so the normal attention can be computed without much trouble.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc527f175c09c1b82b9e2424467ee8fd6%2FScreenshot%20from%202023-11-28%2014-19-09.png?generation=1701177743958059&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Ffd303593fde0bfe1a4fb80da56e0888b%2FScreenshot%20from%202023-11-28%2014-12-33.png?generation=1701177168201962&alt=media)\n\nSource: https://arxiv.org/pdf/2004.05150.pdf\n\nNo benefit at 512 seqlen and n^2, I could be wrong, so please if anyone knows better correct me."
            },
            {
              "id": 2541427,
              "postDate": "2023-11-28T13:38:17.120Z",
              "content": "<p>Sliding window can be seen as a form of restricting the model to see more than W tokens at a time, there are papers that claim that transformers with casual mask learn positional information from the amount of tokens being processed in attention (unmasked tokens) [e.g. when computing single-query/multiple-keys attention, depending on the amount of keys we get different smoothness of attention scores, I guess]</p>\n<p>It can be useful in this problem, since in train set Lmax=206, and in test Lmax=457</p>\n<p>My guess was if I am to use sliding window attention, my generalization plots would become closer to the ones Shujun shared, but it was not the case, they are still \"too sharp\"</p>",
              "rawMarkdown": "Sliding window can be seen as a form of restricting the model to see more than W tokens at a time, there are papers that claim that transformers with casual mask learn positional information from the amount of tokens being processed in attention (unmasked tokens) [e.g. when computing single-query/multiple-keys attention, depending on the amount of keys we get different smoothness of attention scores, I guess]\n\nIt can be useful in this problem, since in train set Lmax=206, and in test Lmax=457\n\nMy guess was if I am to use sliding window attention, my generalization plots would become closer to the ones Shujun shared, but it was not the case, they are still \"too sharp\"",
              "votes": 2
            },
            {
              "id": 2541455,
              "postDate": "2023-11-28T14:02:45.123Z",
              "content": "<p>Just to clarify if I'm understanding your point, the idea is to reduce the attention to smaller patchs so it can learn from smaller sequences and hope it will generalize in the longer sequence by attending to smaller patchs and sliding it.</p>\n<p>Isn't that the reverse idea of chopping 'very' long sequences and attending to smaller patches hoping to capture most of the important information?</p>\n<p>Is a cool idea slime.</p>",
              "rawMarkdown": "Just to clarify if I'm understanding your point, the idea is to reduce the attention to smaller patchs so it can learn from smaller sequences and hope it will generalize in the longer sequence by attending to smaller patchs and sliding it.\n\nIsn't that the reverse idea of chopping 'very' long sequences and attending to smaller patches hoping to capture most of the important information?\n\nIs a cool idea slime.",
              "votes": 1
            },
            {
              "id": 2541864,
              "postDate": "2023-11-28T21:27:41.623Z",
              "content": "<p>I think, there was a very valid point that the picture from the original post is also a **prediction **. So it is not a gold standard. But sliding window seems to be useless, yes.  </p>",
              "rawMarkdown": "I think, there was a very valid point that the picture from the original post is also a **prediction **. So it is not a gold standard. But sliding window seems to be useless, yes.  ",
              "votes": 1
            },
            {
              "id": 2542483,
              "postDate": "2023-11-29T09:47:26.417Z",
              "content": "<p>Oh true, is a prediction, thanks for pointing it out.</p>",
              "rawMarkdown": "Oh true, is a prediction, thanks for pointing it out."
            }
          ]
        }
      ]
    },
    {
      "id": 2547182,
      "postDate": "2023-12-03T08:58:20.580Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2544767,
      "postDate": "2023-12-01T04:28:09.573Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2544764,
      "postDate": "2023-12-01T04:27:28.890Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2534742,
      "postDate": "2023-11-22T20:58:55.103Z",
      "content": "<p>that's great! thank you</p>",
      "rawMarkdown": "that's great! thank you"
    },
    {
      "id": 2529727,
      "postDate": "2023-11-18T13:54:56.587Z",
      "content": "<p>Thanks for this good work</p>",
      "rawMarkdown": "Thanks for this good work"
    }
  ],
  "comments": [
    {
      "id": 2544569,
      "author_name": "Shujun",
      "author_url": "",
      "post_date": "2023-11-30T23:42:47.880000",
      "content": "<p>Hi Kagglers, we have another interesting test of generality with a sequence that was in the last CASP competition: R1138v1 or 7PTL in protein data bank (<a href=\"https://www.rcsb.org/structure/7PTL\" target=\"_blank\">https://www.rcsb.org/structure/7PTL</a> ). We have extracted the secondary structure from the experimentally resolved 3D structure:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F592eb93db2a8a6be01f8f4daaf0ba369%2F7PTL.png?generation=1701387560513990&amp;alt=media\" alt=\"\"></p>\n<p>and looked at our model’s predictions using the mutate-and-map technique with our model:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F1bd6d46561d3f9c3b7869e2f28fcf9f6%2FR1138v1.png?generation=1701387579567164&amp;alt=media\" alt=\"\"></p>\n<p></p>\n<p>While we definitely see the main secondary structure, the kissing loops above the diagonal between the 5' and 3' 'halves' are not clearly present (circled in cyan) and there are also some short stems missing (circled in red)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F929d70a5ec679273b52565cbf37ee7c7%2F7PTL_annotated.png?generation=1701392197627840&amp;alt=media\" alt=\"\"></p>\n<p>You can check your predictions by making predictions for the sequences in the following <a href=\"https://www.kaggle.com/datasets/shujun717/r1138v1-m2\" target=\"_blank\">CSV file</a>), where the sequence ids are in the format of V1138v1_m2_{mutated_position}. And I have prepared <a href=\"https://www.kaggle.com/datasets/shujun717/r1138-bpp\" target=\"_blank\">bpp files</a> for these. And after making predictions you can visualize with the following code:</p>\n<pre><code>m2_preds=(m2_sequences) #x720x2\n\nplt()\nplt()\nplt(m2_preds,vmin=,vmax=,cmap=)\nplt()\nplt()\nplt(m2_preds,vmin=,vmax=,cmap=)\n</code></pre>\n<p>We’re excited to see what you have and if your model is generalizing better!</p>",
      "votes": 9,
      "replies": [
        {
          "id": 2544572,
          "author_name": "slime",
          "author_url": "",
          "post_date": "2023-11-30T23:47:57.213000",
          "content": "<p>The link directs nowhere for now, can you make dataset public? Excited to try our models on these sequences c:</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 2544573,
          "author_name": "",
          "author_url": "",
          "post_date": "2023-11-30T23:48:05.633000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2544582,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-12-01T00:04:02.757000",
          "content": "<p><a href=\"https://www.kaggle.com/martynoveduard\" target=\"_blank\">@martynoveduard</a> fixed. Can you see it now?</p>",
          "votes": 1,
          "replies": [
            {
              "id": 2544583,
              "author_name": "slime",
              "author_url": "",
              "post_date": "2023-12-01T00:05:12.310000",
              "content": "<p>yup, thanks</p>",
              "votes": 1,
              "replies": []
            }
          ]
        },
        {
          "id": 2544608,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-12-01T01:09:26.333000",
          "content": "<p>There was a mistake in my post regarding the kissing loops and I have updated the post and annotated secondary structure plot</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2544622,
          "author_name": "Laura Romar",
          "author_url": "",
          "post_date": "2023-12-01T01:31:33.877000",
          "content": "<p>Could you please provide the bpp files of the sequences ?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2544632,
              "author_name": "Shujun",
              "author_url": "",
              "post_date": "2023-12-01T01:48:08.160000",
              "content": "<p>Yeah see here: <a href=\"https://www.kaggle.com/datasets/shujun717/r1138-bpp\" target=\"_blank\">https://www.kaggle.com/datasets/shujun717/r1138-bpp</a></p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2544646,
              "author_name": "Laura Romar",
              "author_url": "",
              "post_date": "2023-12-01T02:07:15.123000",
              "content": "<p>Thanks a lot !</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2545058,
          "author_name": "greySnow",
          "author_url": "",
          "post_date": "2023-12-01T09:04:55.683000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F2cf362b4bdcb279336a4d2b81659dcff%2FR1138v1-m2.png?generation=1701421412590124&amp;alt=media\" alt=\"This one is really hard…\"></p>",
          "votes": 0,
          "replies": [
            {
              "id": 2545116,
              "author_name": "greySnow",
              "author_url": "",
              "post_date": "2023-12-01T10:00:20.753000",
              "content": "<p>I tried to take the mean of 2A3 and DMS for a better picture. I can actually see hints of this middle kissing loop. But the side ones are too difficult… perhaps the top LB models would do better there.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6832115%2F4a067628c581254f866c329c4a4f84ca%2FR1138v1-m2%20mean.png?generation=1701424745768217&amp;alt=media\" alt=\"\"></p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2545614,
          "author_name": "Iafoss",
          "author_url": "",
          "post_date": "2023-12-01T15:56:03.477000",
          "content": "<p>Thanks for another example. It seems my model gets signs of all lines except the ones in the middle you outline with cyan(<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F713d4a75f27a4c1c64317e9ead70d19a%2Fg1.png?generation=1701445917913290&amp;alt=media\" alt=\"\"></p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2468976,
      "author_name": "Iafoss",
      "author_url": "",
      "post_date": "2023-10-06T03:32:47.713000",
      "content": "<p>Nice post<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F5c3b1d7781037565087d814379e80f37%2Fplot.png?generation=1696563122851918&amp;alt=media\" alt=\"\"></p>",
      "votes": 7,
      "replies": []
    },
    {
      "id": 2497319,
      "author_name": "sroger",
      "author_url": "",
      "post_date": "2023-10-24T15:13:38.733000",
      "content": "<p>Hopefully similar enough<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3586013%2Ff0719545c5889b67ddba45f7da00a3bf%2Fplot0.png?generation=1698160337092019&amp;alt=media\" alt=\"\"></p>",
      "votes": 6,
      "replies": [
        {
          "id": 2499257,
          "author_name": "junseonglee11",
          "author_url": "",
          "post_date": "2023-10-25T22:27:41.210000",
          "content": "<p>Your's looks really similar!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2513861,
          "author_name": "greySnow",
          "author_url": "",
          "post_date": "2023-11-05T19:47:20.967000",
          "content": "<p>It's very impressive! Do you mind sharing the LB score of this model?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2514136,
              "author_name": "sroger",
              "author_url": "",
              "post_date": "2023-11-06T04:54:33.823000",
              "content": "<p>The LB score is actually pretty bad ~0.17 but it was because of a bug</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2544552,
      "author_name": "tattaka",
      "author_url": "",
      "post_date": "2023-11-30T22:50:01.543000",
      "content": "<p>Plot by current best submission<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1745801%2F685f90a707c237413455e9757b3a8355%2Fplot.png?generation=1701385653066069&amp;alt=media\" alt=\"\"></p>\n<p>I still don't know how to interpret the plots.</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 2467044,
      "author_name": "MT",
      "author_url": "",
      "post_date": "2023-10-04T09:04:43.060000",
      "content": "<p>I think this topic deserves a pin! I was wondering if the model you used was trained on the same data we have.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2467846,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-10-04T23:01:57.430000",
          "content": "<p>Yes it was! </p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 2471884,
          "author_name": "Rhiju Das",
          "author_url": "",
          "post_date": "2023-10-06T17:58:03.313000",
          "content": "<p>Topic is pinned! Thanks for suggesting.</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 2551957,
      "author_name": "Iafoss",
      "author_url": "",
      "post_date": "2023-12-07T05:03:40.100000",
      "content": "<p><a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> I'm just curious in case if you are allowed to share this information, were you able to resolve the technical difficulties with measuring the activity at the sequence ends, or do you still plan to evaluate only the middle parts of the sequences? Thanks.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 2553843,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-12-08T14:47:27.777000",
          "content": "<p>I think sequence ends were not used for scoring</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2473265,
      "author_name": "DECEM",
      "author_url": "",
      "post_date": "2023-10-08T06:01:29.310000",
      "content": "<p>Great Post!<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6491363%2F13f80753ed9d37e3528d7b3a93fc0bc0%2Fplot.png?generation=1696744827715873&amp;alt=media\" alt=\"plot\"></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2489571,
      "author_name": "NathanTuttle",
      "author_url": "",
      "post_date": "2023-10-20T04:46:23.360000",
      "content": "<p>I am still confused. Not sure what the arrangement is. Are these just lists of reactivity by nt position?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2490474,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-10-20T17:54:43.980000",
          "content": "<p>Yes I have added an explanation for this! See the added plot and last paragraph</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2490680,
              "author_name": "NathanTuttle",
              "author_url": "",
              "post_date": "2023-10-20T23:21:33.423000",
              "content": "<p>Thank you. How did you determine the mutation?</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2465687,
      "author_name": "slime",
      "author_url": "",
      "post_date": "2023-10-03T07:36:09.713000",
      "content": "<p>Thank you for providing this valuable example!</p>\n<p>I'll give plots of two of my models here, - not generalizible and somewhat generalizable</p>",
      "votes": 2,
      "replies": [
        {
          "id": 2465690,
          "author_name": "slime",
          "author_url": "",
          "post_date": "2023-10-03T07:38:42.970000",
          "content": "<p>This one I thought won't generalize to private LB</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F33511d686900e64bb2a2b80d38fa71fc%2FScreenshot%202023-10-03%20at%2010.36.42.png?generation=1696318705717511&amp;alt=media\" alt=\"\"></p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 2465692,
          "author_name": "slime",
          "author_url": "",
          "post_date": "2023-10-03T07:42:11.820000",
          "content": "<p>I don't see the black rectangle here :D But the plot overall resembles yours </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5487737%2F52d785fe5fb11ed872c9d7d7223487c4%2FScreenshot%202023-10-03%20at%2010.40.47.png?generation=1696318881885098&amp;alt=media\" alt=\"\"></p>",
          "votes": 4,
          "replies": [
            {
              "id": 2467875,
              "author_name": "Shujun",
              "author_url": "",
              "post_date": "2023-10-05T00:57:05.717000",
              "content": "<p>Thanks for posting. Any idea why the first model does not generalize well? It's fine if you don't want to share though.  </p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2468063,
              "author_name": "MT",
              "author_url": "",
              "post_date": "2023-10-05T06:41:32.447000",
              "content": "<p>My early models were GRUs and LSTMs. I had two issue with those models. <br>\n1) The outputs were preferentially zeros at start and end of the sequences.<br>\n2)  I was struggling to generalize for long sequences. <br>\nThen, I implemented the model proposed by <a href=\"https://www.kaggle.com/IAFOSS\" target=\"_blank\">@IAFOSS</a> <a href=\"https://www.kaggle.com/code/iafoss/rna-starter-submission-0-186-lb\" target=\"_blank\">https://www.kaggle.com/code/iafoss/rna-starter-submission-0-186-lb</a> and the issues disappeared</p>",
              "votes": 3,
              "replies": []
            },
            {
              "id": 2468100,
              "author_name": "slime",
              "author_url": "",
              "post_date": "2023-10-05T07:14:51.937000",
              "content": "<blockquote>\n  <p>Any idea why the first model does not generalize well?</p>\n</blockquote>\n<p>Sure! First model is using absolute positional encoding and was not trained on longer sequences.</p>\n<p>We've got to figure out how to align feature spaces of train and test distributions so that we can predict something like you shared in the post</p>",
              "votes": 6,
              "replies": []
            },
            {
              "id": 2474180,
              "author_name": "Shujun",
              "author_url": "",
              "post_date": "2023-10-09T03:57:04.610000",
              "content": "<p><a href=\"https://www.kaggle.com/martynoveduard\" target=\"_blank\">@martynoveduard</a> what do you mean training on longer sequences? Most of the sequences in train are 177</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2474197,
              "author_name": "slime",
              "author_url": "",
              "post_date": "2023-10-09T04:20:21.983000",
              "content": "<p>When I talk about longer sequences, I'm referring to sequences with a length greater than 206. In the private test, it's apparent that the model hasn't learned positional encoding for tokens beyond the 206th position. Because of this, I consider these tokens as out-of-distribution (OOD) samples for the model and as can be seen from the first plot, predictions for these positions are different from the previous positions.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2502078,
              "author_name": "Frankly",
              "author_url": "",
              "post_date": "2023-10-27T23:47:58.583000",
              "content": "<p>Forgive my stupidity but, how can you know that in the private test your model doesn't work on beyond 206th. The private test data has not been released. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2502338,
              "author_name": "slime",
              "author_url": "",
              "post_date": "2023-10-28T06:00:25.833000",
              "content": "<p>I just compared (visually) the plots I obtained from the script provided by Shujun for my models and hosts model, as you can see there are sequences of length &gt;400, therefore its a part of the private data, and it's provided to us for convinience so we can sanity check our models on sequences with greater lengths</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2539283,
              "author_name": "blurrylogic",
              "author_url": "",
              "post_date": "2023-11-26T23:57:05.847000",
              "content": "<p>Hello! <br>\nthe model does actually generalize quite worse than yours. Did you do anything specific to improve generalization or does it generalize better with accuracy improvement?<br>\nIf your willing to share i'll be glad to hear what you did to improve generalization… <br>\nI've tried implementing sliding windows and similar embedding stuff on top but haven't been able to generalize as well</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2Fc96903cd3bbd05b126094a7f4321bb22%2Fplot3%20(3).png?generation=1701042395156105&amp;alt=media\" alt=\"@iafoss\"></p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2539286,
              "author_name": "blurrylogic",
              "author_url": "",
              "post_date": "2023-11-26T23:59:45.200000",
              "content": "<p>implementing sliding window on top<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12000969%2F414a53cf6db6ca39ec1df130a5932aa5%2Fplot3.png?generation=1701043156096329&amp;alt=media\" alt=\"\"></p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2540819,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-11-28T03:25:10.050000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2465562,
      "author_name": "Gary",
      "author_url": "",
      "post_date": "2023-10-03T05:14:30.540000",
      "content": "<p>It is not easy.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2552073,
      "author_name": "Penzar Dmitry",
      "author_url": "",
      "post_date": "2023-12-07T07:06:08.943000",
      "content": "<p>Did anybody succeed in predicting long-range pseudoknot?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2552173,
          "author_name": "",
          "author_url": "",
          "post_date": "2023-12-07T09:06:40.060000",
          "content": "",
          "votes": 0,
          "replies": [
            {
              "id": 2552270,
              "author_name": "Penzar Dmitry",
              "author_url": "",
              "post_date": "2023-12-07T10:49:21.667000",
              "content": "<p>Black rectangle</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552309,
              "author_name": "greySnow",
              "author_url": "",
              "post_date": "2023-12-07T11:23:36.517000",
              "content": "<p><a href=\"https://www.kaggle.com/sroger\" target=\"_blank\">@sroger</a> got it; he posted a picture below.<br>\nI got it, too, but my accuracy is really low, so unless there is a massive shakeup, I'm not a competition hehe.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2552409,
              "author_name": "sroger",
              "author_url": "",
              "post_date": "2023-12-07T12:39:06.940000",
              "content": "<p>Unfortunately I was not able to maintain that knot as I lowered cv/lb. </p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2552411,
              "author_name": "Penzar Dmitry",
              "author_url": "",
              "post_date": "2023-12-07T12:43:49.903000",
              "content": "<p>Yes, is it true that you were able to maintain it untill you started to use bpp?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552413,
              "author_name": "greySnow",
              "author_url": "",
              "post_date": "2023-12-07T12:43:58.987000",
              "content": "<p>Hmm, this is interesting. Do you have an idea why? (it's ok if you postpone your answer to the end of the competition)</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552449,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-12-07T13:23:26.133000",
              "content": "",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2552468,
              "author_name": "junseonglee11",
              "author_url": "",
              "post_date": "2023-12-07T13:46:48.930000",
              "content": "<p>Very surprising…</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552511,
              "author_name": "Penzar Dmitry",
              "author_url": "",
              "post_date": "2023-12-07T14:17:11.630000",
              "content": "<p>About software — it seems not as simple because bpp from eterna/contrafold can be used to predict pseudoknots. But yes, I think that they are anyway terrible at that. <br>\nUnfortunately, other matrices-producing algorithms haven't shown better score. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552528,
              "author_name": "greySnow",
              "author_url": "",
              "post_date": "2023-12-07T14:31:08.607000",
              "content": "<p>Have you tried also the last-generation deep-learning bpp models like UFold/RFold?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2552538,
              "author_name": "Penzar Dmitry",
              "author_url": "",
              "post_date": "2023-12-07T14:37:45.367000",
              "content": "<p>Yes and its a huge disappointment. Maybe, more can be achieved by using model finetuning. </p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2542027,
      "author_name": "Abhishek Shah",
      "author_url": "",
      "post_date": "2023-11-29T02:36:39.497000",
      "content": "<p>What's the issue with absolute positional encodings? Some people here have mentioned they don't think their model will generalize because they've used them. Are relative or rotary embeddings better in some way?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2542496,
          "author_name": "greySnow",
          "author_url": "",
          "post_date": "2023-11-29T09:59:23.170000",
          "content": "<p>Since the test set contains longer sequences than the train set, the model doesn't 'know' how to deal with unseen-before positions and does not generalize, i.e., the generated pictures are not similar to the ones posted by <a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> above. As for other embeddings, I advise you to experiment and find out what works best.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2541974,
      "author_name": "FdotRK",
      "author_url": "",
      "post_date": "2023-11-29T01:16:23.643000",
      "content": "<p>I am unable to follow this point:</p>\n<pre><code>Additionally, you also want  make sure  your model  outputting reasonable predictions      regions  there  no training data. Currently, due   technical reasons, we cannot measure these positions  we might be able  resolve these limitations   final private test . We have noticed internally    our models under certain conditions like  output entirely s      regions, which should  be happening.\n</code></pre>\n<p>E.g. if at the beginning the model has just nan from the data, why do we expect it to output a valid set of floats? </p>\n<p>I have two models, and just with change of depth in transformer  I am seeing one model is outputting all zeros in beginning and another some constant float. The latter does have better LB and my val set accuracy. But it seems just just a chance. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 2541976,
          "author_name": "FdotRK",
          "author_url": "",
          "post_date": "2023-11-29T01:17:48.960000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F916b055e92a0457b367d14186654bdac%2F116_plot.png?generation=1701220652522549&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6760%2F38dc3df65fdb197bb532f83a2ae84320%2F124_plot.png?generation=1701220666076154&amp;alt=media\" alt=\"\"></p>",
          "votes": 0,
          "replies": [
            {
              "id": 2541979,
              "author_name": "FdotRK",
              "author_url": "",
              "post_date": "2023-11-29T01:20:06.953000",
              "content": "<p>Seeking some opinions on the plots - what aspect looks bad. It seems in plot-set-1, 2A3 looks smeared. <br>\nPlot set 2 looks better in some aspects. <br>\nDmS in plot-set-1 looks much crispier. </p>\n<p>Any other pointers? <br>\n(thanks in advance)</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2541980,
              "author_name": "FdotRK",
              "author_url": "",
              "post_date": "2023-11-29T01:21:20.257000",
              "content": "<p>(I am struggling to understand the plot tbh)</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2538258,
      "author_name": "blurrylogic",
      "author_url": "",
      "post_date": "2023-11-26T00:33:30.490000",
      "content": "<p>Anyone having sucess to convert this into a numerical metric?<br>\nafter a degree of generalization its very hard to compare the images</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2538470,
          "author_name": "greySnow",
          "author_url": "",
          "post_date": "2023-11-26T06:46:13.473000",
          "content": "<p>It will be useless anyway, since this picture is also a prediction, not ground truth. So it is possible that your model will do better than theirs.</p>",
          "votes": 2,
          "replies": [
            {
              "id": 2538545,
              "author_name": "blurrylogic",
              "author_url": "",
              "post_date": "2023-11-26T08:48:59.073000",
              "content": "<p>Ooh thanks!</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2488102,
      "author_name": "NathanTuttle",
      "author_url": "",
      "post_date": "2023-10-19T03:25:30.650000",
      "content": "<p>What do the x and y axis represent?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2490475,
          "author_name": "Shujun",
          "author_url": "",
          "post_date": "2023-10-20T17:54:55.957000",
          "content": "<p>x axis represents position, while y axis represents sequence number. I have also added a plot in the main post visualizing sequence (AUGC) and therefore where the point mutations happen</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2474942,
      "author_name": "Yassine Alouini",
      "author_url": "",
      "post_date": "2023-10-09T14:53:55.930000",
      "content": "<p>Very interesting, thanks for sharing this and the plots!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2472724,
      "author_name": "Antonio Félix",
      "author_url": "",
      "post_date": "2023-10-07T14:38:04.070000",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc171dba0da0fd0fbb23777bce343f8ab%2Fplot.png?generation=1696689349360396&amp;alt=media\" alt=\"\"></p>\n<p>Too blurry!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2529639,
          "author_name": "Antonio Félix",
          "author_url": "",
          "post_date": "2023-11-18T12:16:35.493000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2F9de73bab64e1da812cb4766ea85eca25%2Fprogress.png?generation=1700309493366166&amp;alt=media\" alt=\"\"></p>\n<p>A bit of progress for me during this month, still far away from the ground truth.</p>\n<p>The score for this prediction is 0.15387 in the public lb, without training on the shared sequences in case anyone is wondering.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2541250,
              "author_name": "Dhruv Dhilla",
              "author_url": "",
              "post_date": "2023-11-28T10:29:58.207000",
              "content": "<p>Would you mind sharing what helped you improve generalization?</p>\n<p>I'll share first: Sliding window surprisingly dosen't help too much for generalization, using rotary embeddings helped a bit but still far away… The biggest catch for generalization is how we're dealing with the data/embeddings though trying various augmentation techniques  shifting the sequences randomly eg GAB -&gt; ABG -&gt;BGA , etc seemingly helps, not sure though.<br>\nhaven't implemented bpps yet not sure if it helps with generalization, i know that it should help with the score</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2541411,
              "author_name": "Antonio Félix",
              "author_url": "",
              "post_date": "2023-11-28T13:24:02.050000",
              "content": "<p>I'm just new and learning as I go, will share it at end of the competition if I think it can add anything.</p>\n<p>About the sliding window, I'm not sure what is the benefit of using it with such short sequences, the main idea behind sliding window is to reduce the complexity from O(n^2) to O(n * w) where w is smaller than n but the RNA sequences of this competition are  &lt;= 457, so the normal attention can be computed without much trouble.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc527f175c09c1b82b9e2424467ee8fd6%2FScreenshot%20from%202023-11-28%2014-19-09.png?generation=1701177743958059&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Ffd303593fde0bfe1a4fb80da56e0888b%2FScreenshot%20from%202023-11-28%2014-12-33.png?generation=1701177168201962&amp;alt=media\" alt=\"\"></p>\n<p>Source: <a href=\"https://arxiv.org/pdf/2004.05150.pdf\" target=\"_blank\">https://arxiv.org/pdf/2004.05150.pdf</a></p>\n<p>No benefit at 512 seqlen and n^2, I could be wrong, so please if anyone knows better correct me.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2541427,
              "author_name": "slime",
              "author_url": "",
              "post_date": "2023-11-28T13:38:17.120000",
              "content": "<p>Sliding window can be seen as a form of restricting the model to see more than W tokens at a time, there are papers that claim that transformers with casual mask learn positional information from the amount of tokens being processed in attention (unmasked tokens) [e.g. when computing single-query/multiple-keys attention, depending on the amount of keys we get different smoothness of attention scores, I guess]</p>\n<p>It can be useful in this problem, since in train set Lmax=206, and in test Lmax=457</p>\n<p>My guess was if I am to use sliding window attention, my generalization plots would become closer to the ones Shujun shared, but it was not the case, they are still \"too sharp\"</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2541455,
              "author_name": "Antonio Félix",
              "author_url": "",
              "post_date": "2023-11-28T14:02:45.123000",
              "content": "<p>Just to clarify if I'm understanding your point, the idea is to reduce the attention to smaller patchs so it can learn from smaller sequences and hope it will generalize in the longer sequence by attending to smaller patchs and sliding it.</p>\n<p>Isn't that the reverse idea of chopping 'very' long sequences and attending to smaller patches hoping to capture most of the important information?</p>\n<p>Is a cool idea slime.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2541864,
              "author_name": "Penzar Dmitry",
              "author_url": "",
              "post_date": "2023-11-28T21:27:41.623000",
              "content": "<p>I think, there was a very valid point that the picture from the original post is also a **prediction **. So it is not a gold standard. But sliding window seems to be useless, yes.  </p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2542483,
              "author_name": "Antonio Félix",
              "author_url": "",
              "post_date": "2023-11-29T09:47:26.417000",
              "content": "<p>Oh true, is a prediction, thanks for pointing it out.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2547182,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-12-03T08:58:20.580000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2544767,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-12-01T04:28:09.573000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2544764,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-12-01T04:27:28.890000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2534742,
      "author_name": "max regis",
      "author_url": "",
      "post_date": "2023-11-22T20:58:55.103000",
      "content": "<p>that's great! thank you</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2529727,
      "author_name": "Rewida shabaan mohamed",
      "author_url": "",
      "post_date": "2023-11-18T13:54:56.587000",
      "content": "<p>Thanks for this good work</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2465490": "\nAn important task in this competition is for models to generalize to long RNA sequences, because many RNAs of interest can be much longer than what is available in the training set. Therefore, we have included sequences that are much longer (as long as 457 nt) in the private test set. A good way to check your model's performance on these long sequences is to visually inspect a subset of sequences which we call [mutate and map](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4080707/) (used to infer base pairings by point mutations). We have an example of these using predictions from a model that gives reasonable predictions on a subset of 457nt sequences with known structure. Note that the red arrow points to a region of known long range pseudo-knot (the darker rectangle) which have been impossible to predict with prior modeling methods. When exposed following point mutations, the long range pseudo-knot region has increased reactivity.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2Fbda49dc7b259bcec466b575c5a75d97c%2Fexample.png?generation=1696301353614738&alt=media)\n\nTo plot these:\n```\nimport polars as pl\nimport matplotlib.pyplot as plt\n\n#read your sub here\ndf=pl.read_csv(\"sub.csv\")\n\n#some parameters\nfont_size=6\nid1=269545321\nid2=269724007\nreshape1=391\nreshape2=457\n\n#get predictions\npred_DMS=df[id1:id2+1]['reactivity_DMS_MaP'].to_numpy().reshape(reshape1,reshape2)\npred_2A3=df[id1:id2+1]['reactivity_2A3_MaP'].to_numpy().reshape(reshape1,reshape2)\n\n#plot mutate and map\nfig = plt.figure()\nplt.subplot(121)\nplt.title(f'reactivity_DMS_MaP', fontsize=font_size)\nplt.imshow(pred_DMS,vmin=0,vmax=1, cmap='gray_r')\nplt.subplot(122)\nplt.title(f'reactivity_2A3_MaP', fontsize=font_size)\nplt.imshow(pred_2A3,vmin=0,vmax=1, cmap='gray_r')\n\nplt.tight_layout()\nplt.savefig(f\"plot.png\",dpi=500)\nplt.clf()\nplt.close()\n```\n\nAdditionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.\n\nFor anyone confused about how these mutations work, I have added another plot visualizing where these mutations occur. From position 27 to 416, the mutations at each position is one of {'A->U', 'C->G', 'G->C', 'U->A'}. Therefore, you can see a diagonal line in the middle. Note that the beginning and end regions are constant, while right before the end, there's also a bar code region unique to each sequence. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F633626f460d2a563a3757e5e003529e8%2FTribozyme_point_mutations.png?generation=1697823756980699&alt=media)\n\n",
    "2544569": "Hi Kagglers, we have another interesting test of generality with a sequence that was in the last CASP competition: R1138v1 or 7PTL in protein data bank (https://www.rcsb.org/structure/7PTL ). We have extracted the secondary structure from the experimentally resolved 3D structure:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F592eb93db2a8a6be01f8f4daaf0ba369%2F7PTL.png?generation=1701387560513990&alt=media)\n\nand looked at our model’s predictions using the mutate-and-map technique with our model:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F1bd6d46561d3f9c3b7869e2f28fcf9f6%2FR1138v1.png?generation=1701387579567164&alt=media)\n\n~~While we definitely see the main secondary structure, the kissing loops above the diagonal (in cyan) between the 5' and 3' 'halves' are not clearly present (circled in cyan)~~\n\nWhile we definitely see the main secondary structure, the kissing loops above the diagonal between the 5' and 3' 'halves' are not clearly present (circled in cyan) and there are also some short stems missing (circled in red)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3355848%2F929d70a5ec679273b52565cbf37ee7c7%2F7PTL_annotated.png?generation=1701392197627840&alt=media)\n\n\nYou can check your predictions by making predictions for the sequences in the following [CSV file](https://www.kaggle.com/datasets/shujun717/r1138v1-m2)), where the sequence ids are in the format of V1138v1_m2_{mutated_position}. And I have prepared [bpp files](https://www.kaggle.com/datasets/shujun717/r1138-bpp) for these. And after making predictions you can visualize with the following code:\n\n```\nm2_preds=model(m2_sequences) #721x720x2\n\nplt.subplot(121)\nplt.title('2A3')\nplt.imshow(m2_preds[:,:,0],vmin=0,vmax=1,cmap='gray_r')\nplt.subplot(122)\nplt.title('DMS')\nplt.imshow(m2_preds[:,:,1],vmin=0,vmax=1,cmap='gray_r')\n```\n\nWe’re excited to see what you have and if your model is generalizing better!\n\n",
    "2468976": "Nice post\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1212661%2F5c3b1d7781037565087d814379e80f37%2Fplot.png?generation=1696563122851918&alt=media)",
    "2497319": "Hopefully similar enough\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3586013%2Ff0719545c5889b67ddba45f7da00a3bf%2Fplot0.png?generation=1698160337092019&alt=media)",
    "2544552": "Plot by current best submission\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1745801%2F685f90a707c237413455e9757b3a8355%2Fplot.png?generation=1701385653066069&alt=media)\n\nI still don't know how to interpret the plots.",
    "2467044": "I think this topic deserves a pin! I was wondering if the model you used was trained on the same data we have.",
    "2551957": "@shujun717 I'm just curious in case if you are allowed to share this information, were you able to resolve the technical difficulties with measuring the activity at the sequence ends, or do you still plan to evaluate only the middle parts of the sequences? Thanks.",
    "2473265": "Great Post!\n![plot](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6491363%2F13f80753ed9d37e3528d7b3a93fc0bc0%2Fplot.png?generation=1696744827715873&alt=media)",
    "2489571": "I am still confused. Not sure what the arrangement is. Are these just lists of reactivity by nt position?",
    "2465687": "Thank you for providing this valuable example!\n\nI'll give plots of two of my models here, - not generalizible and somewhat generalizable",
    "2465562": "It is not easy.",
    "2552073": "Did anybody succeed in predicting long-range pseudoknot?",
    "2542027": "What's the issue with absolute positional encodings? Some people here have mentioned they don't think their model will generalize because they've used them. Are relative or rotary embeddings better in some way?",
    "2541974": "I am unable to follow this point:\n```\nAdditionally, you also want to make sure that your model is outputting reasonable predictions for the beginning and end regions where there is no training data. Currently, due to some technical reasons, we cannot measure these positions but we might be able to resolve these limitations in the final private test set. We have noticed internally that some of our models under certain conditions like to output entirely 0s for the beginning and end regions, which should not be happening.\n```\n\nE.g. if at the beginning the model has just nan from the data, why do we expect it to output a valid set of floats? \n\nI have two models, and just with change of depth in transformer  I am seeing one model is outputting all zeros in beginning and another some constant float. The latter does have better LB and my val set accuracy. But it seems just just a chance. ",
    "2538258": "Anyone having sucess to convert this into a numerical metric?\nafter a degree of generalization its very hard to compare the images",
    "2488102": "What do the x and y axis represent?",
    "2474942": "Very interesting, thanks for sharing this and the plots!",
    "2472724": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14573416%2Fc171dba0da0fd0fbb23777bce343f8ab%2Fplot.png?generation=1696689349360396&alt=media)\n\nToo blurry!",
    "2547182": "",
    "2544767": "",
    "2544764": "",
    "2534742": "that's great! thank you",
    "2529727": "Thanks for this good work"
  }
}