{
  "id": 464437,
  "title": "3rd Place Solution for the CAFA 5 Protein Function Prediction",
  "url": "/competitions/cafa-5-protein-function-prediction/discussion/464437",
  "author_name": "tito",
  "post_date": "2023-12-30T12:41:08.658000",
  "votes": 31,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Thanks to Kaggle and hosts for organising such an interesting competition.<br>\nThis competition task:\"Predict the function of this protein using any available data\" was linked to the fundamental of biology, making it a very exciting experience for me.<br>\nThanks also to the community, the discussions and notebooks were very helpful.</p>\n<h2>Overview</h2>\n<p>I used the following NN models.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2Fbf4221217029bc9d2ae30b78bf0d577d%2F.png?generation=1703936744527010&amp;alt=media\" alt=\"overview\"></p>\n<h2>Protein Sequence</h2>\n<p>I have extracted embeddings using protein language models from a protein sequence.<br>\nThe models I used include T5, ESM2t36, ESM2t48, and combinations of these.</p>\n<h2>Taxonomy Data</h2>\n<p>I one-hot encoded the taxonomy data and combined it with embeddings generated by protein language models. <br>\nDuring this process, only the 90 taxonomy IDs included in the test data were used.</p>\n<h2>Non-Experimental Annotation</h2>\n<p>The <a href=\"https://geneontology.org/docs/guide-go-evidence-codes/\" target=\"_blank\">evidence codes</a> of UniProt GOA annotations consist of 13 experimental labels and 11 non-experimental labels.<br>\nExperimental labels are used as GT and non-experimental labels are not used in training data.<br>\nSo I extracted non-experimental labels from UniProt GOA data and used it  as additional features. <br>\nThe non-experimental labels were one-hot encoded and transformed into a tensor of dimensions (batch size, 11, number of GT labels). <br>\nThen this tensor is processed using a 1D-CNN which kernel_size is 1.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F86368def7cbc9707ec8c8fb5c77f6217%2Fnon-exp-feat.png?generation=1704986539311314&amp;alt=media\"></p>\n<h2>Validation Data</h2>\n<p>The training data was created from experimental annotations in UniProtKB as of November 17, 2022, and the test data (private leaderboard) consists of data experimentally verified after August 22, 2023. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F6ba93a1b07cbdcdd3004f88a8ebb7952%2Fvalidation.png?generation=1703936790356554&amp;alt=media\"><br>\nTherefore, I approached the validation strategy as if it were time-series data.<br>\nValidation data was created by extracting experimental annotations from the latest UniProtKB data at the time of the competition, and any sub-ontology data which wrere annotated in the training data was excluded from the validation data.</p>",
  "messages": [
    {
      "id": 2579908,
      "postDate": "2023-12-30T12:41:08.660Z",
      "content": "<p>Thanks to Kaggle and hosts for organising such an interesting competition.<br>\nThis competition task:\"Predict the function of this protein using any available data\" was linked to the fundamental of biology, making it a very exciting experience for me.<br>\nThanks also to the community, the discussions and notebooks were very helpful.</p>\n<h2>Overview</h2>\n<p>I used the following NN models.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2Fbf4221217029bc9d2ae30b78bf0d577d%2F.png?generation=1703936744527010&amp;alt=media\" alt=\"overview\"></p>\n<h2>Protein Sequence</h2>\n<p>I have extracted embeddings using protein language models from a protein sequence.<br>\nThe models I used include T5, ESM2t36, ESM2t48, and combinations of these.</p>\n<h2>Taxonomy Data</h2>\n<p>I one-hot encoded the taxonomy data and combined it with embeddings generated by protein language models. <br>\nDuring this process, only the 90 taxonomy IDs included in the test data were used.</p>\n<h2>Non-Experimental Annotation</h2>\n<p>The <a href=\"https://geneontology.org/docs/guide-go-evidence-codes/\" target=\"_blank\">evidence codes</a> of UniProt GOA annotations consist of 13 experimental labels and 11 non-experimental labels.<br>\nExperimental labels are used as GT and non-experimental labels are not used in training data.<br>\nSo I extracted non-experimental labels from UniProt GOA data and used it  as additional features. <br>\nThe non-experimental labels were one-hot encoded and transformed into a tensor of dimensions (batch size, 11, number of GT labels). <br>\nThen this tensor is processed using a 1D-CNN which kernel_size is 1.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F86368def7cbc9707ec8c8fb5c77f6217%2Fnon-exp-feat.png?generation=1704986539311314&amp;alt=media\"></p>\n<h2>Validation Data</h2>\n<p>The training data was created from experimental annotations in UniProtKB as of November 17, 2022, and the test data (private leaderboard) consists of data experimentally verified after August 22, 2023. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F6ba93a1b07cbdcdd3004f88a8ebb7952%2Fvalidation.png?generation=1703936790356554&amp;alt=media\"><br>\nTherefore, I approached the validation strategy as if it were time-series data.<br>\nValidation data was created by extracting experimental annotations from the latest UniProtKB data at the time of the competition, and any sub-ontology data which wrere annotated in the training data was excluded from the validation data.</p>",
      "rawMarkdown": "Thanks to Kaggle and hosts for organising such an interesting competition.\nThis competition task:\"Predict the function of this protein using any available data\" was linked to the fundamental of biology, making it a very exciting experience for me.\nThanks also to the community, the discussions and notebooks were very helpful.\n\n\n## Overview\nI used the following NN models.\n![overview](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2Fbf4221217029bc9d2ae30b78bf0d577d%2F.png?generation=1703936744527010&alt=media)\n\n\n## Protein Sequence\nI have extracted embeddings using protein language models from a protein sequence.\nThe models I used include T5, ESM2t36, ESM2t48, and combinations of these.\n\n\n\n\n## Taxonomy Data\nI one-hot encoded the taxonomy data and combined it with embeddings generated by protein language models. \nDuring this process, only the 90 taxonomy IDs included in the test data were used.\n\n\n\n## Non-Experimental Annotation\nThe [evidence codes](https://geneontology.org/docs/guide-go-evidence-codes/) of UniProt GOA annotations consist of 13 experimental labels and 11 non-experimental labels.\nExperimental labels are used as GT and non-experimental labels are not used in training data.\nSo I extracted non-experimental labels from UniProt GOA data and used it  as additional features. \nThe non-experimental labels were one-hot encoded and transformed into a tensor of dimensions (batch size, 11, number of GT labels). \nThen this tensor is processed using a 1D-CNN which kernel_size is 1.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F86368def7cbc9707ec8c8fb5c77f6217%2Fnon-exp-feat.png?generation=1704986539311314&alt=media)\n\n## Validation Data\nThe training data was created from experimental annotations in UniProtKB as of November 17, 2022, and the test data (private leaderboard) consists of data experimentally verified after August 22, 2023. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F6ba93a1b07cbdcdd3004f88a8ebb7952%2Fvalidation.png?generation=1703936790356554&alt=media)\nTherefore, I approached the validation strategy as if it were time-series data.\nValidation data was created by extracting experimental annotations from the latest UniProtKB data at the time of the competition, and any sub-ontology data which wrere annotated in the training data was excluded from the validation data.",
      "votes": 31
    },
    {
      "id": 2601277,
      "postDate": "2024-01-14T10:01:45.040Z",
      "content": "<p>Did you make multiple DL models, per embedding source? Or did you concatenate all the embeddings from the different PLM models together and use that as one model? </p>\n<ul>\n<li>Did you do CV predictions? </li>\n</ul>",
      "rawMarkdown": "Did you make multiple DL models, per embedding source? Or did you concatenate all the embeddings from the different PLM models together and use that as one model? \n\n+ Did you do CV predictions? ",
      "votes": 1,
      "replies": [
        {
          "id": 2610528,
          "postDate": "2024-01-20T07:27:12.363Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/danofer\" target=\"_blank\">@danofer</a> </p>\n<p>I made 4 types of DL models for the different PLM. Embeddings are concatenated in type3 or type4. These 4 type of models are used for final ensemble (simple average ensemble).</p>\n<pre>type1 ESM2t36\ntype2 ESM2t48\ntype3 ESM2t36+T5\ntype4 ESM2t48+T5\n</pre>\n<p>I conducted a holdout validation using the \"Validation Data\" described above.</p>",
          "rawMarkdown": "Hi @danofer \n\nI made 4 types of DL models for the different PLM. Embeddings are concatenated in type3 or type4. These 4 type of models are used for final ensemble (simple average ensemble).\n<pre>\ntype1 ESM2t36\ntype2 ESM2t48\ntype3 ESM2t36+T5\ntype4 ESM2t48+T5\n</pre>\n\nI conducted a holdout validation using the \"Validation Data\" described above."
        }
      ]
    },
    {
      "id": 2592046,
      "postDate": "2024-01-08T11:27:11.497Z",
      "content": "<p>For the Non-Experimental Annotations, why did you use a 1d CNN, rather than embeddings or an MLP to transform them?</p>",
      "rawMarkdown": "For the Non-Experimental Annotations, why did you use a 1d CNN, rather than embeddings or an MLP to transform them?",
      "votes": 1,
      "replies": [
        {
          "id": 2595763,
          "postDate": "2024-01-10T16:21:21.563Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/danofer\" target=\"_blank\">@danofer</a> </p>\n<p>Good question!</p>\n<p>I wanted to use MLP here.<br>\nBut Non-Experimental Annotations are predictions about what functions each protein has.<br>\nAnd when these are one-hot encoded, they will have a dimensionality of number of GT labels.<br>\nTo manage this tensors with size (batch size, 11, number of GT labels), I utilized the characteristic that 1D-CNN with kernel size 1 is the same as a fully connected layer.</p>\n<p>I added a picture for this.</p>",
          "rawMarkdown": "Hi @danofer \n\nGood question!\n\nI wanted to use MLP here.\nBut Non-Experimental Annotations are predictions about what functions each protein has.\nAnd when these are one-hot encoded, they will have a dimensionality of number of GT labels.\nTo manage this tensors with size (batch size, 11, number of GT labels), I utilized the characteristic that 1D-CNN with kernel size 1 is the same as a fully connected layer.\n\nI added a picture for this.",
          "votes": 3,
          "replies": [
            {
              "id": 2600428,
              "postDate": "2024-01-13T15:52:45.660Z",
              "content": "<p>Ah neat, the figure explains it - you wanted  to use the confidences/types of annotator-confidence types per annotation. <br>\nThat makes sense!</p>",
              "rawMarkdown": "Ah neat, the figure explains it - you wanted  to use the confidences/types of annotator-confidence types per annotation. \nThat makes sense!",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2841207,
      "postDate": "2024-05-28T12:56:25.773Z",
      "content": "<p>can you please provide your code? I'll learn a lot from it😀</p>",
      "rawMarkdown": "can you please provide your code? I'll learn a lot from it😀"
    },
    {
      "id": 2796429,
      "postDate": "2024-05-06T08:20:00.993Z",
      "content": "<p>Has your code/repo been made available yet?<br>\nThanks!</p>",
      "rawMarkdown": "Has your code/repo been made available yet?\nThanks!"
    },
    {
      "id": 3313655,
      "postDate": "2025-11-09T15:36:25.197Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2638970,
      "postDate": "2024-02-06T15:44:45.683Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2601277,
      "author_name": "Dan Ofer",
      "author_url": "",
      "post_date": "2024-01-14T10:01:45.040000",
      "content": "<p>Did you make multiple DL models, per embedding source? Or did you concatenate all the embeddings from the different PLM models together and use that as one model? </p>\n<ul>\n<li>Did you do CV predictions? </li>\n</ul>",
      "votes": 1,
      "replies": [
        {
          "id": 2610528,
          "author_name": "tito",
          "author_url": "",
          "post_date": "2024-01-20T07:27:12.363000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/danofer\" target=\"_blank\">@danofer</a> </p>\n<p>I made 4 types of DL models for the different PLM. Embeddings are concatenated in type3 or type4. These 4 type of models are used for final ensemble (simple average ensemble).</p>\n<pre>type1 ESM2t36\ntype2 ESM2t48\ntype3 ESM2t36+T5\ntype4 ESM2t48+T5\n</pre>\n<p>I conducted a holdout validation using the \"Validation Data\" described above.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2592046,
      "author_name": "Dan Ofer",
      "author_url": "",
      "post_date": "2024-01-08T11:27:11.497000",
      "content": "<p>For the Non-Experimental Annotations, why did you use a 1d CNN, rather than embeddings or an MLP to transform them?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2595763,
          "author_name": "tito",
          "author_url": "",
          "post_date": "2024-01-10T16:21:21.563000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/danofer\" target=\"_blank\">@danofer</a> </p>\n<p>Good question!</p>\n<p>I wanted to use MLP here.<br>\nBut Non-Experimental Annotations are predictions about what functions each protein has.<br>\nAnd when these are one-hot encoded, they will have a dimensionality of number of GT labels.<br>\nTo manage this tensors with size (batch size, 11, number of GT labels), I utilized the characteristic that 1D-CNN with kernel size 1 is the same as a fully connected layer.</p>\n<p>I added a picture for this.</p>",
          "votes": 3,
          "replies": [
            {
              "id": 2600428,
              "author_name": "Dan Ofer",
              "author_url": "",
              "post_date": "2024-01-13T15:52:45.660000",
              "content": "<p>Ah neat, the figure explains it - you wanted  to use the confidences/types of annotator-confidence types per annotation. <br>\nThat makes sense!</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2841207,
      "author_name": "yangfa",
      "author_url": "",
      "post_date": "2024-05-28T12:56:25.773000",
      "content": "<p>can you please provide your code? I'll learn a lot from it😀</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2796429,
      "author_name": "Dan Ofer",
      "author_url": "",
      "post_date": "2024-05-06T08:20:00.993000",
      "content": "<p>Has your code/repo been made available yet?<br>\nThanks!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3313655,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-11-09T15:36:25.197000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2638970,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-02-06T15:44:45.683000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2579908": "Thanks to Kaggle and hosts for organising such an interesting competition.\nThis competition task:\"Predict the function of this protein using any available data\" was linked to the fundamental of biology, making it a very exciting experience for me.\nThanks also to the community, the discussions and notebooks were very helpful.\n\n\n## Overview\nI used the following NN models.\n![overview](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2Fbf4221217029bc9d2ae30b78bf0d577d%2F.png?generation=1703936744527010&alt=media)\n\n\n## Protein Sequence\nI have extracted embeddings using protein language models from a protein sequence.\nThe models I used include T5, ESM2t36, ESM2t48, and combinations of these.\n\n\n\n\n## Taxonomy Data\nI one-hot encoded the taxonomy data and combined it with embeddings generated by protein language models. \nDuring this process, only the 90 taxonomy IDs included in the test data were used.\n\n\n\n## Non-Experimental Annotation\nThe [evidence codes](https://geneontology.org/docs/guide-go-evidence-codes/) of UniProt GOA annotations consist of 13 experimental labels and 11 non-experimental labels.\nExperimental labels are used as GT and non-experimental labels are not used in training data.\nSo I extracted non-experimental labels from UniProt GOA data and used it  as additional features. \nThe non-experimental labels were one-hot encoded and transformed into a tensor of dimensions (batch size, 11, number of GT labels). \nThen this tensor is processed using a 1D-CNN which kernel_size is 1.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F86368def7cbc9707ec8c8fb5c77f6217%2Fnon-exp-feat.png?generation=1704986539311314&alt=media)\n\n## Validation Data\nThe training data was created from experimental annotations in UniProtKB as of November 17, 2022, and the test data (private leaderboard) consists of data experimentally verified after August 22, 2023. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F548996%2F6ba93a1b07cbdcdd3004f88a8ebb7952%2Fvalidation.png?generation=1703936790356554&alt=media)\nTherefore, I approached the validation strategy as if it were time-series data.\nValidation data was created by extracting experimental annotations from the latest UniProtKB data at the time of the competition, and any sub-ontology data which wrere annotated in the training data was excluded from the validation data.",
    "2601277": "Did you make multiple DL models, per embedding source? Or did you concatenate all the embeddings from the different PLM models together and use that as one model? \n\n+ Did you do CV predictions? ",
    "2592046": "For the Non-Experimental Annotations, why did you use a 1d CNN, rather than embeddings or an MLP to transform them?",
    "2841207": "can you please provide your code? I'll learn a lot from it😀",
    "2796429": "Has your code/repo been made available yet?\nThanks!",
    "3313655": "",
    "2638970": ""
  }
}