{
  "id": 566463,
  "title": "Basics To Understand the Competition",
  "url": "/competitions/stanford-rna-3d-folding/discussion/566463",
  "author_name": "",
  "post_date": "2025-03-05T16:46:44.848808200Z",
  "votes": 7,
  "comment_count": 10,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> could you help clarify some of these things for me?  Much appreciated.</p>\n<p>Let's take an example, say target 1HLX_A, whose sequence is 20-residue long: GGGAUAACUUCGGUUGUCCC</p>\n<p>For each of these 20 residues we happen to have 3 coordinates as training labels (rounded below for brevity):</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th></th>\n<th>x</th>\n<th>y</th>\n<th>z</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>G</td>\n<td>-10.127</td>\n<td>-6.587</td>\n<td>-7.376</td>\n</tr>\n<tr>\n<td>2</td>\n<td>G</td>\n<td>-9.419</td>\n<td>-6.704</td>\n<td>-1.318</td>\n</tr>\n<tr>\n<td>3</td>\n<td>G</td>\n<td>-6.191</td>\n<td>-6.382</td>\n<td>3.539</td>\n</tr>\n<tr>\n<td>4</td>\n<td>A</td>\n<td>-1.379</td>\n<td>-5.931</td>\n<td>5.581</td>\n</tr>\n<tr>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n</tr>\n<tr>\n<td>20</td>\n<td>C</td>\n<td>-7.853</td>\n<td>-13.855</td>\n<td>-0.582</td>\n</tr>\n</tbody>\n</table>\n<p>*Looking at the evaluation metric equation, for this target 1HLX_A we have L_ref = 20 residues, and we need to submit five coordinate triplets for each of these 20 residues (for the test set, of course).</p>\n<p>My questions (start from (8) to avoid number confusion):</p>\n<p>(8) Is my interpretation above correct?</p>\n<p>(9) What is L_align in this case?</p>\n<p>(10) For each residue, why are we predicting five triplets even though the ground truth seems to consist of only one triplet?</p>\n<p>Let's pretend the test set has M = 40 targets in total, comprising of say N = 837 residues in <strong>grand total</strong>.</p>\n<blockquote>\n  <p>… your final score will be the average of best-of-5 TM-scores of all targets.</p>\n</blockquote>\n<p>(11) By \"best-of-5\" do you mean that for each of the 837 residues, the evaluation engine will <em>select</em> the one out of the five predictions that is the best, and simply ignore the other four predictions?  If so, then this <em>selection</em> process is completely independent across all residues, even for those residues that belong to the same target RNA, right?  Or, do all residues that belong to the same target have to have the same <em>selection</em> (same <em>selected</em> one out of the five)?</p>\n<p>(12) By \"average of … all targets\" do you mean averaged over each result from (11) of all 837 residues (which might or might not be \"fair\" as a target might have more residues than another target), or a stratified/weighted average so that each of the 40 targets has equal contribution?</p>\n<p><code>*</code> Could someone please tell me how to add a line break after a table, and how to subscript font?  The markdown documentation doesn't help.  Much thanks.</p>",
  "messages": [
    {
      "id": "3141513",
      "postDate": "03/05/2025 16:46:44",
      "content": "<p><a href=\"https://www.kaggle.com/shujun717\" target=\"_blank\">@shujun717</a> could you help clarify some of these things for me?  Much appreciated.</p>\n<p>Let's take an example, say target 1HLX_A, whose sequence is 20-residue long: GGGAUAACUUCGGUUGUCCC</p>\n<p>For each of these 20 residues we happen to have 3 coordinates as training labels (rounded below for brevity):</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th></th>\n<th>x</th>\n<th>y</th>\n<th>z</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>G</td>\n<td>-10.127</td>\n<td>-6.587</td>\n<td>-7.376</td>\n</tr>\n<tr>\n<td>2</td>\n<td>G</td>\n<td>-9.419</td>\n<td>-6.704</td>\n<td>-1.318</td>\n</tr>\n<tr>\n<td>3</td>\n<td>G</td>\n<td>-6.191</td>\n<td>-6.382</td>\n<td>3.539</td>\n</tr>\n<tr>\n<td>4</td>\n<td>A</td>\n<td>-1.379</td>\n<td>-5.931</td>\n<td>5.581</td>\n</tr>\n<tr>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n<td>…</td>\n</tr>\n<tr>\n<td>20</td>\n<td>C</td>\n<td>-7.853</td>\n<td>-13.855</td>\n<td>-0.582</td>\n</tr>\n</tbody>\n</table>\n<p>*Looking at the evaluation metric equation, for this target 1HLX_A we have L_ref = 20 residues, and we need to submit five coordinate triplets for each of these 20 residues (for the test set, of course).</p>\n<p>My questions (start from (8) to avoid number confusion):</p>\n<p>(8) Is my interpretation above correct?</p>\n<p>(9) What is L_align in this case?</p>\n<p>(10) For each residue, why are we predicting five triplets even though the ground truth seems to consist of only one triplet?</p>\n<p>Let's pretend the test set has M = 40 targets in total, comprising of say N = 837 residues in <strong>grand total</strong>.</p>\n<blockquote>\n  <p>… your final score will be the average of best-of-5 TM-scores of all targets.</p>\n</blockquote>\n<p>(11) By \"best-of-5\" do you mean that for each of the 837 residues, the evaluation engine will <em>select</em> the one out of the five predictions that is the best, and simply ignore the other four predictions?  If so, then this <em>selection</em> process is completely independent across all residues, even for those residues that belong to the same target RNA, right?  Or, do all residues that belong to the same target have to have the same <em>selection</em> (same <em>selected</em> one out of the five)?</p>\n<p>(12) By \"average of … all targets\" do you mean averaged over each result from (11) of all 837 residues (which might or might not be \"fair\" as a target might have more residues than another target), or a stratified/weighted average so that each of the 40 targets has equal contribution?</p>\n<p><code>*</code> Could someone please tell me how to add a line break after a table, and how to subscript font?  The markdown documentation doesn't help.  Much thanks.</p>",
      "rawMarkdown": "shujun717 could you help clarify some of these things for me?  Much appreciated.\n\nLet's take an example, say target 1HLX_A, whose sequence is 20-residue long: GGGAUAACUUCGGUUGUCCC\n\nFor each of these 20 residues we happen to have 3 coordinates as training labels (rounded below for brevity):\n\n| | | x | y | z |\n| -- | -- |\n| 1 | G | -10.127 | -6.587 | -7.376 |\n| 2 | G | -9.419 | -6.704 | -1.318 |\n| 3 | G | -6.191 | -6.382 | 3.539 |\n| 4 | A | -1.379 | -5.931 | 5.581 |\n| ... | ... | ... | ... | ... |\n| 20 | C | -7.853 | -13.855 | -0.582 |   \n\n*Looking at the evaluation metric equation, for this target 1HLX_A we have L_ref = 20 residues, and we need to submit five coordinate triplets for each of these 20 residues (for the test set, of course).\n\nMy questions (start from (8) to avoid number confusion):\n\n(8) Is my interpretation above correct?\n\n(9) What is L_align in this case?\n\n(10) For each residue, why are we predicting five triplets even though the ground truth seems to consist of only one triplet?\n\nLet's pretend the test set has M = 40 targets in total, comprising of say N = 837 residues in **grand total**.\n\n>... your final score will be the average of best-of-5 TM-scores of all targets.\n\n(11) By \"best-of-5\" do you mean that for each of the 837 residues, the evaluation engine will *select* the one out of the five predictions that is the best, and simply ignore the other four predictions?  If so, then this *selection* process is completely independent across all residues, even for those residues that belong to the same target RNA, right?  Or, do all residues that belong to the same target have to have the same *selection* (same *selected* one out of the five)?\n\n(12) By \"average of ... all targets\" do you mean averaged over each result from (11) of all 837 residues (which might or might not be \"fair\" as a target might have more residues than another target), or a stratified/weighted average so that each of the 40 targets has equal contribution?\n\n`*` Could someone please tell me how to add a line break after a table, and how to subscript font?  The markdown documentation doesn't help.  Much thanks.",
      "votes": null
    },
    {
      "id": "3142106",
      "postDate": "03/06/2025 05:12:55",
      "content": "<p>Good question. I know the question is not for me, but I also struggled to understand the TM-score calculation. I made a notebook with explanation some things. It's still in progress. Will be much better soon :)</p>\n<p><a href=\"https://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists\" target=\"_blank\">https://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists</a></p>\n<p>L_align is number of overlapped residues between predicted and ground truth RNA molecules. It is coming from 3d space optimization part of TM-score. We don't see it in the formula but it's essential part of the calculation. </p>",
      "rawMarkdown": "Good question. I know the question is not for me, but I also struggled to understand the TM-score calculation. I made a notebook with explanation some things. It's still in progress. Will be much better soon :)\n \nhttps://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists\n\nL_align is number of overlapped residues between predicted and ground truth RNA molecules. It is coming from 3d space optimization part of TM-score. We don't see it in the formula but it's essential part of the calculation.",
      "votes": null
    },
    {
      "id": "3142114",
      "postDate": "03/06/2025 05:33:25",
      "content": "<p>Here’s a simple starting point with train test features.</p>\n<p>Will be granulizing the USalign TM=score metric to multiple tree based ML algos using the starter features in the following notebook which already look promising:</p>\n<p><a href=\"https://www.kaggle.com/code/jazivxt/tilt-or-fold\" target=\"_blank\">https://www.kaggle.com/code/jazivxt/tilt-or-fold</a></p>",
      "rawMarkdown": "Here’s a simple starting point with train test features.\n\nWill be granulizing the USalign TM=score metric to multiple tree based ML algos using the starter features in the following notebook which already look promising:\n\nhttps://www.kaggle.com/code/jazivxt/tilt-or-fold",
      "votes": null
    },
    {
      "id": "3143026",
      "postDate": "03/06/2025 21:10:34",
      "content": "<p><a href=\"https://www.kaggle.com/igorbashko\" target=\"_blank\">@igorbashko</a> Thank you for your reply.  Based on your reply, do you think my interpretation below is correct? (For the 1HLX_A example)</p>\n<p>Only some subset S of the 20 residues are aligned.  So, 0 &lt;= L_align = |S| &lt;= 20.  Only the TM-scores of the residues in S will be calculated, aggregated, and divided by L_ref = 20 to form my score for target 1HLX_A.  We don't know what S is, but of course we're welcome to estimate what S is if we want/need to.</p>\n<p>And a direct consequence of above is, whatever predictions I make for those residues not in S will <strong>not</strong> influence my final score in any way, right?</p>",
      "rawMarkdown": "igorbashko Thank you for your reply.  Based on your reply, do you think my interpretation below is correct? (For the 1HLX_A example)\n\nOnly some subset S of the 20 residues are aligned.  So, 0 <= L_align = |S| <= 20.  Only the TM-scores of the residues in S will be calculated, aggregated, and divided by L_ref = 20 to form my score for target 1HLX_A.  We don't know what S is, but of course we're welcome to estimate what S is if we want/need to.\n\nAnd a direct consequence of above is, whatever predictions I make for those residues not in S will **not** influence my final score in any way, right?",
      "votes": null
    },
    {
      "id": "3143054",
      "postDate": "03/06/2025 22:23:00",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/revealer\" target=\"_blank\">@revealer</a>,</p>\n<p>I'll try to add where I can….definitely not an expert here as I don't possess a lot of domain knowledge for this competition, but I believe your interpretations are correct. (#8).</p>\n<p>For # 10, I think it's just to give you more chance per sequence, and some of the sequences have multiple structures.  One of the things noted in the host's discussion <a href=\"https://www.kaggle.com/competitions/stanford-rna-3d-folding/discussion/565064\" target=\"_blank\">here</a> states:</p>\n<blockquote>\n  <p>For RNA's with multiple structures, are there better ways to generate 5 predictions than just different random seeds?</p>\n</blockquote>\n<p>So these five sets are a deliberate goal of this competition as well.</p>\n<p>In terms of linebreak after a table, does the following work?</p>\n<table>\n<thead>\n<tr>\n<th>col 1</th>\n<th>col2</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>a</td>\n<td>b</td>\n</tr>\n</tbody>\n</table>\n<p><br></p>\n<p>Worked! (add linespace after last row, then markdown br, then another linespace…then you should be good)</p>",
      "rawMarkdown": "Hi @revealer,\n\nI'll try to add where I can....definitely not an expert here as I don't possess a lot of domain knowledge for this competition, but I believe your interpretations are correct. (#8).\n\nFor # 10, I think it's just to give you more chance per sequence, and some of the sequences have multiple structures.  One of the things noted in the host's discussion [here](https://www.kaggle.com/competitions/stanford-rna-3d-folding/discussion/565064) states:\n\n> For RNA's with multiple structures, are there better ways to generate 5 predictions than just different random seeds?\n\nSo these five sets are a deliberate goal of this competition as well.\n\nIn terms of linebreak after a table, does the following work?\n\n\n|col 1|col2|\n|---|---|\n|a|b|\n\n<br>\n\nWorked! (add linespace after last row, then markdown br, then another linespace...then you should be good)",
      "votes": null
    },
    {
      "id": "3146167",
      "postDate": "03/10/2025 15:30:44",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/revealer\" target=\"_blank\">@revealer</a>. Sorry for late response. You might have already found the answer, but I hope my comment still will be helpful. As I researched TM-score I figured out that it was developed to compare molecules with different and slightly different RNA and see how similar they are. I guess it comes from biology that 2 RNAs. say 1HLX_A which has residues sequence AGGUH and 1HLX_B which has residues sequence AGGUHGGU can be considered from the same specie even if they have different length. If the majority of the residues(AGGUH) are perfectly aligned with each other and they have high TM-score(above 0.5) this is the same molecule. There is even such thing that we can get different TM-score depending on which molecule we compare to. 1HLX_A to 1HLX_B will have not the same score as 1HLX_B to 1HLX_A because as normalization L_ref will be different and in second case L_ref=L_align. But in the score of this competition we compare the same molecule and the same number of residues always. We are given them as the train labels. Are we ? The only thing which affects the TM-score is residues coordinates which we are predicting from them machine learning algorithm(Neural network or whatever it will be). Now, back to your question. Your statement about that aligned number of residues which is taken into account and divided by L_ref is correct, but we don't need to estimate the S. In the score of this competition S is the length of RNA sequence and L_align=L_ref in all cases. If some residues are not perfectly aligned because of poor predictions coordinates from machine learning model than yes, they will affect the TM-score. It will be lower because L_align&lt;L_ref in this case. </p>",
      "rawMarkdown": "Hi @revealer. Sorry for late response. You might have already found the answer, but I hope my comment still will be helpful. As I researched TM-score I figured out that it was developed to compare molecules with different and slightly different RNA and see how similar they are. I guess it comes from biology that 2 RNAs. say 1HLX_A which has residues sequence AGGUH and 1HLX_B which has residues sequence AGGUHGGU can be considered from the same specie even if they have different length. If the majority of the residues(AGGUH) are perfectly aligned with each other and they have high TM-score(above 0.5) this is the same molecule. There is even such thing that we can get different TM-score depending on which molecule we compare to. 1HLX_A to 1HLX_B will have not the same score as 1HLX_B to 1HLX_A because as normalization L_ref will be different and in second case L_ref=L_align. But in the score of this competition we compare the same molecule and the same number of residues always. We are given them as the train labels. Are we ? The only thing which affects the TM-score is residues coordinates which we are predicting from them machine learning algorithm(Neural network or whatever it will be). Now, back to your question. Your statement about that aligned number of residues which is taken into account and divided by L_ref is correct, but we don't need to estimate the S. In the score of this competition S is the length of RNA sequence and L_align=L_ref in all cases. If some residues are not perfectly aligned because of poor predictions coordinates from machine learning model than yes, they will affect the TM-score. It will be lower because L_align<L_ref in this case.",
      "votes": null
    },
    {
      "id": "3146172",
      "postDate": "03/10/2025 15:33:23",
      "content": "<p>And yes. Sequence for 1HLX_A and 1HLX_B I created on the fly. Don't consider it as a valid example which you provided.  I just was lazy to write down all the 20 residues :) </p>",
      "rawMarkdown": "And yes. Sequence for 1HLX_A and 1HLX_B I created on the fly. Don't consider it as a valid example which you provided.  I just was lazy to write down all the 20 residues :)",
      "votes": null
    },
    {
      "id": "3147261",
      "postDate": "03/11/2025 20:29:54",
      "content": "<p>Thanks everyone for trying to help.</p>\n<p>Below is my updated cartoonish understanding of this competition.  Feel free to correct me if anything is still wrong.  Let's still consider the example of 20-residue long 1HLX_A:</p>\n<p>(30) We predict L_ref = 20 triplets: one (x, y, z) for each of the 20 residues.</p>\n<p>(31) Host puts these 20 triplets into an engine called US-align.</p>\n<p>(32) US-align does some rotation/translation/magic to best align our predicted 20 triplets to the ground truth.</p>\n<p>(33) During (32), some of our 20 triplets will end up aligning with each of their corresponding ground truth coordinates pretty well, but the remaining triplets will not.  L_align is simply the number of those triplets that end up aligning pretty well.  Naturally, we want our L_align to be as close to 20 as possible.  And if we're good, of course L_align could be 20.  However, at all times we can't know what L_align is as we don't have the ground truth.</p>\n<p>(34) Our TM-score (for 1HLX_A) is computed from (33) and according to the evaluation equation.  Ignore the \"max\" in the equation for now, though.</p>\n<p>(35) We repeat the above (30) - (34) for five times, each time possibly with a different 20-triplet prediction resulting in a possibly different TM-score.  The host will pick the best (this is what the \"max\" is for) of these five TM-scores and call it our TM-score verdict for target 1HLX_A.</p>\n<p>(36) We repeat (35) for all the targets, and the average will be our final score.</p>",
      "rawMarkdown": "Thanks everyone for trying to help.\n\nBelow is my updated cartoonish understanding of this competition.  Feel free to correct me if anything is still wrong.  Let's still consider the example of 20-residue long 1HLX_A:\n\n(30) We predict L_ref = 20 triplets: one (x, y, z) for each of the 20 residues.\n\n(31) Host puts these 20 triplets into an engine called US-align.\n\n(32) US-align does some rotation/translation/magic to best align our predicted 20 triplets to the ground truth.\n\n(33) During (32), some of our 20 triplets will end up aligning with each of their corresponding ground truth coordinates pretty well, but the remaining triplets will not.  L_align is simply the number of those triplets that end up aligning pretty well.  Naturally, we want our L_align to be as close to 20 as possible.  And if we're good, of course L_align could be 20.  However, at all times we can't know what L_align is as we don't have the ground truth.\n\n(34) Our TM-score (for 1HLX_A) is computed from (33) and according to the evaluation equation.  Ignore the \"max\" in the equation for now, though.\n\n(35) We repeat the above (30) - (34) for five times, each time possibly with a different 20-triplet prediction resulting in a possibly different TM-score.  The host will pick the best (this is what the \"max\" is for) of these five TM-scores and call it our TM-score verdict for target 1HLX_A.\n\n(36) We repeat (35) for all the targets, and the average will be our final score.",
      "votes": null
    },
    {
      "id": "3147340",
      "postDate": "03/12/2025 00:18:19",
      "content": "<p>\"your final score will be the average of best-of-5 TM-scores of all targets.\"</p>\n<p>you should find your answer in the kaggle discussion post.<br>\nthe metric code is given by the host:<br>\n<a href=\"https://www.kaggle.com/code/metric/ribonanza-tm-score/notebook\" target=\"_blank\">https://www.kaggle.com/code/metric/ribonanza-tm-score/notebook</a></p>",
      "rawMarkdown": "\"your final score will be the average of best-of-5 TM-scores of all targets.\"\n\nyou should find your answer in the kaggle discussion post.\nthe metric code is given by the host:\nhttps://www.kaggle.com/code/metric/ribonanza-tm-score/notebook",
      "votes": null
    },
    {
      "id": "3148207",
      "postDate": "03/12/2025 20:42:14",
      "content": "<p>Hi  <a href=\"https://www.kaggle.com/chrisk321\" target=\"_blank\">@chrisk321</a> <br>\nalso got questions… I created this NB, maybe it works for you as well?<br>\n<a href=\"https://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data\" target=\"_blank\">https://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data</a><br>\nbest, dan</p>",
      "rawMarkdown": "Hi  @chrisk321 \nalso got questions... I created this NB, maybe it works for you as well?\nhttps://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data\nbest, dan",
      "votes": null
    },
    {
      "id": "3150453",
      "postDate": "03/15/2025 14:06:13",
      "content": "<p><a href=\"https://www.kaggle.com/dantheshark\" target=\"_blank\">@dantheshark</a> , danke!  There's some concepts in there I will incorporate into my work…thanks.</p>",
      "rawMarkdown": "dantheshark , danke!  There's some concepts in there I will incorporate into my work...thanks.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3142106,
      "author_name": "igorbashko",
      "author_url": "",
      "post_date": "03/06/2025 05:12:55",
      "content": "<p>Good question. I know the question is not for me, but I also struggled to understand the TM-score calculation. I made a notebook with explanation some things. It's still in progress. Will be much better soon :)</p>\n<p><a href=\"https://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists\" target=\"_blank\">https://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists</a></p>\n<p>L_align is number of overlapped residues between predicted and ground truth RNA molecules. It is coming from 3d space optimization part of TM-score. We don't see it in the formula but it's essential part of the calculation. </p>",
      "votes": null,
      "replies": [
        {
          "id": 3143026,
          "author_name": "revealer",
          "author_url": "",
          "post_date": "03/06/2025 21:10:34",
          "content": "<p><a href=\"https://www.kaggle.com/igorbashko\" target=\"_blank\">@igorbashko</a> Thank you for your reply.  Based on your reply, do you think my interpretation below is correct? (For the 1HLX_A example)</p>\n<p>Only some subset S of the 20 residues are aligned.  So, 0 &lt;= L_align = |S| &lt;= 20.  Only the TM-scores of the residues in S will be calculated, aggregated, and divided by L_ref = 20 to form my score for target 1HLX_A.  We don't know what S is, but of course we're welcome to estimate what S is if we want/need to.</p>\n<p>And a direct consequence of above is, whatever predictions I make for those residues not in S will <strong>not</strong> influence my final score in any way, right?</p>",
          "votes": null,
          "replies": [
            {
              "id": 3146167,
              "author_name": "igorbashko",
              "author_url": "",
              "post_date": "03/10/2025 15:30:44",
              "content": "<p>Hi <a href=\"https://www.kaggle.com/revealer\" target=\"_blank\">@revealer</a>. Sorry for late response. You might have already found the answer, but I hope my comment still will be helpful. As I researched TM-score I figured out that it was developed to compare molecules with different and slightly different RNA and see how similar they are. I guess it comes from biology that 2 RNAs. say 1HLX_A which has residues sequence AGGUH and 1HLX_B which has residues sequence AGGUHGGU can be considered from the same specie even if they have different length. If the majority of the residues(AGGUH) are perfectly aligned with each other and they have high TM-score(above 0.5) this is the same molecule. There is even such thing that we can get different TM-score depending on which molecule we compare to. 1HLX_A to 1HLX_B will have not the same score as 1HLX_B to 1HLX_A because as normalization L_ref will be different and in second case L_ref=L_align. But in the score of this competition we compare the same molecule and the same number of residues always. We are given them as the train labels. Are we ? The only thing which affects the TM-score is residues coordinates which we are predicting from them machine learning algorithm(Neural network or whatever it will be). Now, back to your question. Your statement about that aligned number of residues which is taken into account and divided by L_ref is correct, but we don't need to estimate the S. In the score of this competition S is the length of RNA sequence and L_align=L_ref in all cases. If some residues are not perfectly aligned because of poor predictions coordinates from machine learning model than yes, they will affect the TM-score. It will be lower because L_align&lt;L_ref in this case. </p>",
              "votes": null,
              "replies": []
            },
            {
              "id": 3146172,
              "author_name": "igorbashko",
              "author_url": "",
              "post_date": "03/10/2025 15:33:23",
              "content": "<p>And yes. Sequence for 1HLX_A and 1HLX_B I created on the fly. Don't consider it as a valid example which you provided.  I just was lazy to write down all the 20 residues :) </p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3142114,
      "author_name": "jazivxt",
      "author_url": "",
      "post_date": "03/06/2025 05:33:25",
      "content": "<p>Here’s a simple starting point with train test features.</p>\n<p>Will be granulizing the USalign TM=score metric to multiple tree based ML algos using the starter features in the following notebook which already look promising:</p>\n<p><a href=\"https://www.kaggle.com/code/jazivxt/tilt-or-fold\" target=\"_blank\">https://www.kaggle.com/code/jazivxt/tilt-or-fold</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3143054,
      "author_name": "chrisk321",
      "author_url": "",
      "post_date": "03/06/2025 22:23:00",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/revealer\" target=\"_blank\">@revealer</a>,</p>\n<p>I'll try to add where I can….definitely not an expert here as I don't possess a lot of domain knowledge for this competition, but I believe your interpretations are correct. (#8).</p>\n<p>For # 10, I think it's just to give you more chance per sequence, and some of the sequences have multiple structures.  One of the things noted in the host's discussion <a href=\"https://www.kaggle.com/competitions/stanford-rna-3d-folding/discussion/565064\" target=\"_blank\">here</a> states:</p>\n<blockquote>\n  <p>For RNA's with multiple structures, are there better ways to generate 5 predictions than just different random seeds?</p>\n</blockquote>\n<p>So these five sets are a deliberate goal of this competition as well.</p>\n<p>In terms of linebreak after a table, does the following work?</p>\n<table>\n<thead>\n<tr>\n<th>col 1</th>\n<th>col2</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>a</td>\n<td>b</td>\n</tr>\n</tbody>\n</table>\n<p><br></p>\n<p>Worked! (add linespace after last row, then markdown br, then another linespace…then you should be good)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3147261,
      "author_name": "revealer",
      "author_url": "",
      "post_date": "03/11/2025 20:29:54",
      "content": "<p>Thanks everyone for trying to help.</p>\n<p>Below is my updated cartoonish understanding of this competition.  Feel free to correct me if anything is still wrong.  Let's still consider the example of 20-residue long 1HLX_A:</p>\n<p>(30) We predict L_ref = 20 triplets: one (x, y, z) for each of the 20 residues.</p>\n<p>(31) Host puts these 20 triplets into an engine called US-align.</p>\n<p>(32) US-align does some rotation/translation/magic to best align our predicted 20 triplets to the ground truth.</p>\n<p>(33) During (32), some of our 20 triplets will end up aligning with each of their corresponding ground truth coordinates pretty well, but the remaining triplets will not.  L_align is simply the number of those triplets that end up aligning pretty well.  Naturally, we want our L_align to be as close to 20 as possible.  And if we're good, of course L_align could be 20.  However, at all times we can't know what L_align is as we don't have the ground truth.</p>\n<p>(34) Our TM-score (for 1HLX_A) is computed from (33) and according to the evaluation equation.  Ignore the \"max\" in the equation for now, though.</p>\n<p>(35) We repeat the above (30) - (34) for five times, each time possibly with a different 20-triplet prediction resulting in a possibly different TM-score.  The host will pick the best (this is what the \"max\" is for) of these five TM-scores and call it our TM-score verdict for target 1HLX_A.</p>\n<p>(36) We repeat (35) for all the targets, and the average will be our final score.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3147340,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/12/2025 00:18:19",
      "content": "<p>\"your final score will be the average of best-of-5 TM-scores of all targets.\"</p>\n<p>you should find your answer in the kaggle discussion post.<br>\nthe metric code is given by the host:<br>\n<a href=\"https://www.kaggle.com/code/metric/ribonanza-tm-score/notebook\" target=\"_blank\">https://www.kaggle.com/code/metric/ribonanza-tm-score/notebook</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3148207,
      "author_name": "dantheshark",
      "author_url": "",
      "post_date": "03/12/2025 20:42:14",
      "content": "<p>Hi  <a href=\"https://www.kaggle.com/chrisk321\" target=\"_blank\">@chrisk321</a> <br>\nalso got questions… I created this NB, maybe it works for you as well?<br>\n<a href=\"https://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data\" target=\"_blank\">https://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data</a><br>\nbest, dan</p>",
      "votes": null,
      "replies": [
        {
          "id": 3150453,
          "author_name": "chrisk321",
          "author_url": "",
          "post_date": "03/15/2025 14:06:13",
          "content": "<p><a href=\"https://www.kaggle.com/dantheshark\" target=\"_blank\">@dantheshark</a> , danke!  There's some concepts in there I will incorporate into my work…thanks.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3141513": "shujun717 could you help clarify some of these things for me?  Much appreciated.\n\nLet's take an example, say target 1HLX_A, whose sequence is 20-residue long: GGGAUAACUUCGGUUGUCCC\n\nFor each of these 20 residues we happen to have 3 coordinates as training labels (rounded below for brevity):\n\n| | | x | y | z |\n| -- | -- |\n| 1 | G | -10.127 | -6.587 | -7.376 |\n| 2 | G | -9.419 | -6.704 | -1.318 |\n| 3 | G | -6.191 | -6.382 | 3.539 |\n| 4 | A | -1.379 | -5.931 | 5.581 |\n| ... | ... | ... | ... | ... |\n| 20 | C | -7.853 | -13.855 | -0.582 |   \n\n*Looking at the evaluation metric equation, for this target 1HLX_A we have L_ref = 20 residues, and we need to submit five coordinate triplets for each of these 20 residues (for the test set, of course).\n\nMy questions (start from (8) to avoid number confusion):\n\n(8) Is my interpretation above correct?\n\n(9) What is L_align in this case?\n\n(10) For each residue, why are we predicting five triplets even though the ground truth seems to consist of only one triplet?\n\nLet's pretend the test set has M = 40 targets in total, comprising of say N = 837 residues in **grand total**.\n\n>... your final score will be the average of best-of-5 TM-scores of all targets.\n\n(11) By \"best-of-5\" do you mean that for each of the 837 residues, the evaluation engine will *select* the one out of the five predictions that is the best, and simply ignore the other four predictions?  If so, then this *selection* process is completely independent across all residues, even for those residues that belong to the same target RNA, right?  Or, do all residues that belong to the same target have to have the same *selection* (same *selected* one out of the five)?\n\n(12) By \"average of ... all targets\" do you mean averaged over each result from (11) of all 837 residues (which might or might not be \"fair\" as a target might have more residues than another target), or a stratified/weighted average so that each of the 40 targets has equal contribution?\n\n`*` Could someone please tell me how to add a line break after a table, and how to subscript font?  The markdown documentation doesn't help.  Much thanks.",
    "3142106": "Good question. I know the question is not for me, but I also struggled to understand the TM-score calculation. I made a notebook with explanation some things. It's still in progress. Will be much better soon :)\n \nhttps://www.kaggle.com/code/igorbashko/tm-score-explanation-for-non-biologists\n\nL_align is number of overlapped residues between predicted and ground truth RNA molecules. It is coming from 3d space optimization part of TM-score. We don't see it in the formula but it's essential part of the calculation.",
    "3142114": "Here’s a simple starting point with train test features.\n\nWill be granulizing the USalign TM=score metric to multiple tree based ML algos using the starter features in the following notebook which already look promising:\n\nhttps://www.kaggle.com/code/jazivxt/tilt-or-fold",
    "3143026": "igorbashko Thank you for your reply.  Based on your reply, do you think my interpretation below is correct? (For the 1HLX_A example)\n\nOnly some subset S of the 20 residues are aligned.  So, 0 <= L_align = |S| <= 20.  Only the TM-scores of the residues in S will be calculated, aggregated, and divided by L_ref = 20 to form my score for target 1HLX_A.  We don't know what S is, but of course we're welcome to estimate what S is if we want/need to.\n\nAnd a direct consequence of above is, whatever predictions I make for those residues not in S will **not** influence my final score in any way, right?",
    "3143054": "Hi @revealer,\n\nI'll try to add where I can....definitely not an expert here as I don't possess a lot of domain knowledge for this competition, but I believe your interpretations are correct. (#8).\n\nFor # 10, I think it's just to give you more chance per sequence, and some of the sequences have multiple structures.  One of the things noted in the host's discussion [here](https://www.kaggle.com/competitions/stanford-rna-3d-folding/discussion/565064) states:\n\n> For RNA's with multiple structures, are there better ways to generate 5 predictions than just different random seeds?\n\nSo these five sets are a deliberate goal of this competition as well.\n\nIn terms of linebreak after a table, does the following work?\n\n\n|col 1|col2|\n|---|---|\n|a|b|\n\n<br>\n\nWorked! (add linespace after last row, then markdown br, then another linespace...then you should be good)",
    "3146167": "Hi @revealer. Sorry for late response. You might have already found the answer, but I hope my comment still will be helpful. As I researched TM-score I figured out that it was developed to compare molecules with different and slightly different RNA and see how similar they are. I guess it comes from biology that 2 RNAs. say 1HLX_A which has residues sequence AGGUH and 1HLX_B which has residues sequence AGGUHGGU can be considered from the same specie even if they have different length. If the majority of the residues(AGGUH) are perfectly aligned with each other and they have high TM-score(above 0.5) this is the same molecule. There is even such thing that we can get different TM-score depending on which molecule we compare to. 1HLX_A to 1HLX_B will have not the same score as 1HLX_B to 1HLX_A because as normalization L_ref will be different and in second case L_ref=L_align. But in the score of this competition we compare the same molecule and the same number of residues always. We are given them as the train labels. Are we ? The only thing which affects the TM-score is residues coordinates which we are predicting from them machine learning algorithm(Neural network or whatever it will be). Now, back to your question. Your statement about that aligned number of residues which is taken into account and divided by L_ref is correct, but we don't need to estimate the S. In the score of this competition S is the length of RNA sequence and L_align=L_ref in all cases. If some residues are not perfectly aligned because of poor predictions coordinates from machine learning model than yes, they will affect the TM-score. It will be lower because L_align<L_ref in this case.",
    "3146172": "And yes. Sequence for 1HLX_A and 1HLX_B I created on the fly. Don't consider it as a valid example which you provided.  I just was lazy to write down all the 20 residues :)",
    "3147261": "Thanks everyone for trying to help.\n\nBelow is my updated cartoonish understanding of this competition.  Feel free to correct me if anything is still wrong.  Let's still consider the example of 20-residue long 1HLX_A:\n\n(30) We predict L_ref = 20 triplets: one (x, y, z) for each of the 20 residues.\n\n(31) Host puts these 20 triplets into an engine called US-align.\n\n(32) US-align does some rotation/translation/magic to best align our predicted 20 triplets to the ground truth.\n\n(33) During (32), some of our 20 triplets will end up aligning with each of their corresponding ground truth coordinates pretty well, but the remaining triplets will not.  L_align is simply the number of those triplets that end up aligning pretty well.  Naturally, we want our L_align to be as close to 20 as possible.  And if we're good, of course L_align could be 20.  However, at all times we can't know what L_align is as we don't have the ground truth.\n\n(34) Our TM-score (for 1HLX_A) is computed from (33) and according to the evaluation equation.  Ignore the \"max\" in the equation for now, though.\n\n(35) We repeat the above (30) - (34) for five times, each time possibly with a different 20-triplet prediction resulting in a possibly different TM-score.  The host will pick the best (this is what the \"max\" is for) of these five TM-scores and call it our TM-score verdict for target 1HLX_A.\n\n(36) We repeat (35) for all the targets, and the average will be our final score.",
    "3147340": "\"your final score will be the average of best-of-5 TM-scores of all targets.\"\n\nyou should find your answer in the kaggle discussion post.\nthe metric code is given by the host:\nhttps://www.kaggle.com/code/metric/ribonanza-tm-score/notebook",
    "3148207": "Hi  @chrisk321 \nalso got questions... I created this NB, maybe it works for you as well?\nhttps://www.kaggle.com/code/dantheshark/rna-3d-folding-understand-data\nbest, dan",
    "3150453": "dantheshark , danke!  There's some concepts in there I will incorporate into my work...thanks."
  },
  "source": "meta"
}