{
  "id": 584912,
  "title": "Sequence Data Augmentations",
  "url": "/competitions/cmi-detect-behavior-with-sensor-data/discussion/584912",
  "author_name": "moth",
  "post_date": "2025-06-16T20:09:47.785000",
  "votes": 51,
  "comment_count": 25,
  "views": 0,
  "content": "<p>I shared a <a href=\"https://www.kaggle.com/code/alejopaullier/cmi-sequence-data-augmentation\" target=\"_blank\">notebook</a> introducing some sequence data augmentations. These can be applied to our competition data to create new transformed sequences. The proposed data augmentations are:</p>\n<ul>\n<li><code>GaussianNoise</code>: adds Gaussian (normally distributed) noise to a signal.</li>\n<li><code>PinkNoiseSNR</code>: adds pink noise to a multichannel time-series signal while maintaining a controlled signal-to-noise ratio (SNR).</li>\n<li><code>TimeStretch</code>: changes the speed (duration) of a 1D or 2D signal by stretching or compressing it in the time dimension without changing the sampling rate.</li>\n<li><code>TimeShift</code>: randomly shifts a multichannel time-series signal along the time axis, simulating temporal misalignment or delay.</li>\n<li><code>ButterFilter</code>: applies a low-pass Butterworth filter to multichannel time-series data.</li>\n<li><code>MixUp</code>: mixes two sequences data linearly and combines their respective ground truths accordingly as a weighted average.</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3197853%2F4692ab5f128c79ecfe575519c0a20b74%2Fnewplot%20(1).png?generation=1750104520399702&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 3225760,
      "postDate": "2025-06-16T20:09:47.787Z",
      "content": "<p>I shared a <a href=\"https://www.kaggle.com/code/alejopaullier/cmi-sequence-data-augmentation\" target=\"_blank\">notebook</a> introducing some sequence data augmentations. These can be applied to our competition data to create new transformed sequences. The proposed data augmentations are:</p>\n<ul>\n<li><code>GaussianNoise</code>: adds Gaussian (normally distributed) noise to a signal.</li>\n<li><code>PinkNoiseSNR</code>: adds pink noise to a multichannel time-series signal while maintaining a controlled signal-to-noise ratio (SNR).</li>\n<li><code>TimeStretch</code>: changes the speed (duration) of a 1D or 2D signal by stretching or compressing it in the time dimension without changing the sampling rate.</li>\n<li><code>TimeShift</code>: randomly shifts a multichannel time-series signal along the time axis, simulating temporal misalignment or delay.</li>\n<li><code>ButterFilter</code>: applies a low-pass Butterworth filter to multichannel time-series data.</li>\n<li><code>MixUp</code>: mixes two sequences data linearly and combines their respective ground truths accordingly as a weighted average.</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3197853%2F4692ab5f128c79ecfe575519c0a20b74%2Fnewplot%20(1).png?generation=1750104520399702&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I shared a [notebook][1] introducing some sequence data augmentations. These can be applied to our competition data to create new transformed sequences. The proposed data augmentations are:\n- `GaussianNoise`: adds Gaussian (normally distributed) noise to a signal.\n- `PinkNoiseSNR`: adds pink noise to a multichannel time-series signal while maintaining a controlled signal-to-noise ratio (SNR).\n- `TimeStretch`: changes the speed (duration) of a 1D or 2D signal by stretching or compressing it in the time dimension without changing the sampling rate.\n- `TimeShift`: randomly shifts a multichannel time-series signal along the time axis, simulating temporal misalignment or delay.\n- `ButterFilter`: applies a low-pass Butterworth filter to multichannel time-series data.\n- `MixUp`: mixes two sequences data linearly and combines their respective ground truths accordingly as a weighted average.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3197853%2F4692ab5f128c79ecfe575519c0a20b74%2Fnewplot%20(1).png?generation=1750104520399702&alt=media)\n\n[1]: https://www.kaggle.com/code/alejopaullier/cmi-sequence-data-augmentation",
      "votes": 50
    },
    {
      "id": 3225815,
      "postDate": "2025-06-16T21:47:57.113Z",
      "content": "<p>Thanks for sharing! I think audiomentations can be used for a similar purpose if anyone is interested further. </p>\n<p><a href=\"https://iver56.github.io/audiomentations/\" target=\"_blank\">https://iver56.github.io/audiomentations/</a></p>",
      "rawMarkdown": "Thanks for sharing! I think audiomentations can be used for a similar purpose if anyone is interested further. \n\nhttps://iver56.github.io/audiomentations/",
      "votes": 5,
      "replies": [
        {
          "id": 3225857,
          "postDate": "2025-06-16T23:49:18.167Z",
          "content": "<p>Thanks for sharing Sinan, I haven't checked out some of these augmentations, but some issues I've seen about directly applying sound augmentations is that these usually rely on some properties that are inherent to audios, like high sampling rates. Also I ignore if these can be applied in multi-channel sequences. Here we have 7 channels (raw data), perhaps they can be adapted or applied at a channel level.</p>",
          "rawMarkdown": "Thanks for sharing Sinan, I haven't checked out some of these augmentations, but some issues I've seen about directly applying sound augmentations is that these usually rely on some properties that are inherent to audios, like high sampling rates. Also I ignore if these can be applied in multi-channel sequences. Here we have 7 channels (raw data), perhaps they can be adapted or applied at a channel level.",
          "votes": 1,
          "replies": [
            {
              "id": 3226372,
              "postDate": "2025-06-17T15:04:28.037Z",
              "content": "<p>Yeah, that's correct. A bit more experimental for those. For being multi-channel, I think this library supports that too. So it wouldn't be too much of a hustle, I think. </p>",
              "rawMarkdown": "Yeah, that's correct. A bit more experimental for those. For being multi-channel, I think this library supports that too. So it wouldn't be too much of a hustle, I think. "
            }
          ]
        }
      ]
    },
    {
      "id": 3225780,
      "postDate": "2025-06-16T20:38:55.847Z",
      "content": "<p>Hey Alejo, thanks for sharing! I also experimented with stuff like that - did you find any of them helpful? So far none of the mentioned augmentations helped my score … </p>",
      "rawMarkdown": "Hey Alejo, thanks for sharing! I also experimented with stuff like that - did you find any of them helpful? So far none of the mentioned augmentations helped my score ... ",
      "votes": 1,
      "replies": [
        {
          "id": 3225792,
          "postDate": "2025-06-16T21:02:47.060Z",
          "content": "<p>I just started playing with augmentations. So far I've seen 0.01 increments but its too early to say, perhaps trying different parameters and probabilities of the aforementioned augmentations can boost more. Also, I have some other augmentations in mind which I have not yet tried. Once I get a better idea I will share my results.</p>",
          "rawMarkdown": "I just started playing with augmentations. So far I've seen 0.01 increments but its too early to say, perhaps trying different parameters and probabilities of the aforementioned augmentations can boost more. Also, I have some other augmentations in mind which I have not yet tried. Once I get a better idea I will share my results.",
          "votes": 2,
          "replies": [
            {
              "id": 3225810,
              "postDate": "2025-06-16T21:44:25.827Z",
              "content": "<p>Thanks for sharing, would be interested in your results - you might remember my efforts to find good augmentation :D </p>",
              "rawMarkdown": "Thanks for sharing, would be interested in your results - you might remember my efforts to find good augmentation :D "
            },
            {
              "id": 3225841,
              "postDate": "2025-06-16T23:02:41.350Z",
              "content": "<p>I can't forget HMS 😂</p>",
              "rawMarkdown": "I can't forget HMS 😂"
            },
            {
              "id": 3226036,
              "postDate": "2025-06-17T07:10:18.513Z",
              "content": "<p>Did the improvements also map to LB?</p>",
              "rawMarkdown": "Did the improvements also map to LB?"
            },
            {
              "id": 3231765,
              "postDate": "2025-06-24T21:50:17.313Z",
              "content": "<p><a href=\"https://www.kaggle.com/nlztrk\" target=\"_blank\">@nlztrk</a> yes, around ~0.015</p>",
              "rawMarkdown": "@nlztrk yes, around ~0.015",
              "votes": 2
            },
            {
              "id": 3231934,
              "postDate": "2025-06-25T06:35:08.363Z",
              "content": "<p>Using all of them together? 😊</p>",
              "rawMarkdown": "Using all of them together? 😊"
            }
          ]
        }
      ]
    },
    {
      "id": 3225990,
      "postDate": "2025-06-17T05:57:48.940Z",
      "content": "<p>In my experiments, nothing but mixup helps. </p>",
      "rawMarkdown": "In my experiments, nothing but mixup helps. ",
      "votes": 2,
      "replies": [
        {
          "id": 3226455,
          "postDate": "2025-06-17T17:18:12.897Z",
          "content": "<p>are you willing to go into more detail about you implementation of mixup? I tried it and it did not do a thing 🥲</p>",
          "rawMarkdown": "are you willing to go into more detail about you implementation of mixup? I tried it and it did not do a thing 🥲",
          "replies": [
            {
              "id": 3226483,
              "postDate": "2025-06-17T18:10:57.547Z",
              "content": "<p>I use simple linear interpolation between two samples. Maybe not all models are equal in terms of getting benefits from mixup or any other potential improvement.</p>",
              "rawMarkdown": "I use simple linear interpolation between two samples. Maybe not all models are equal in terms of getting benefits from mixup or any other potential improvement."
            },
            {
              "id": 3226505,
              "postDate": "2025-06-17T18:52:09.910Z",
              "content": "<p>Thanks for sharing, yes that might be true! </p>",
              "rawMarkdown": "Thanks for sharing, yes that might be true! "
            },
            {
              "id": 3232499,
              "postDate": "2025-06-25T19:42:49.283Z",
              "content": "<p>Thank you, I used it and my LB score raised by 0.02!</p>",
              "rawMarkdown": "Thank you, I used it and my LB score raised by 0.02!"
            }
          ]
        }
      ]
    },
    {
      "id": 3232868,
      "postDate": "2025-06-26T09:20:47.490Z",
      "content": "<p>I used the five data augmentations mentioned above, and cv increased by about 0.015, and Public LB decreased by 0.01. I guess it is caused by the difference between local data distribution and LB distribution. Which one should I believe?</p>",
      "rawMarkdown": "I used the five data augmentations mentioned above, and cv increased by about 0.015, and Public LB decreased by 0.01. I guess it is caused by the difference between local data distribution and LB distribution. Which one should I believe?",
      "replies": [
        {
          "id": 3234390,
          "postDate": "2025-06-27T18:55:47.440Z",
          "content": "<p>I tried mixed up and it helped me increase 0.04 in the LB</p>",
          "rawMarkdown": "I tried mixed up and it helped me increase 0.04 in the LB",
          "replies": [
            {
              "id": 3234460,
              "postDate": "2025-06-27T21:33:23.550Z",
              "content": "<p>So you use a lot of mixup? crazy benefit!</p>",
              "rawMarkdown": "So you use a lot of mixup? crazy benefit!"
            },
            {
              "id": 3234476,
              "postDate": "2025-06-27T22:13:21.850Z",
              "content": "<p>I twice the size of the dataset using mixup and I find it useful.</p>",
              "rawMarkdown": "I twice the size of the dataset using mixup and I find it useful.",
              "votes": -2
            },
            {
              "id": 3234478,
              "postDate": "2025-06-27T22:15:46.847Z",
              "content": "<p>I might not get that correctly - you double the size of the dataset using mixup? </p>",
              "rawMarkdown": "I might not get that correctly - you double the size of the dataset using mixup? "
            },
            {
              "id": 3234479,
              "postDate": "2025-06-27T22:20:13.157Z",
              "content": "<p>Yup, half of the data I used for training are augmented data from mix up.</p>",
              "rawMarkdown": "Yup, half of the data I used for training are augmented data from mix up.",
              "votes": -3
            }
          ]
        }
      ]
    },
    {
      "id": 3227465,
      "postDate": "2025-06-19T03:03:57.013Z",
      "rawMarkdown": "",
      "votes": -2,
      "isDeleted": true
    },
    {
      "id": 3232784,
      "postDate": "2025-06-26T07:44:30.383Z",
      "content": "<p>Thanks for sharing…</p>",
      "rawMarkdown": "Thanks for sharing..."
    },
    {
      "id": 3226251,
      "postDate": "2025-06-17T12:23:23.397Z",
      "content": "<p>Thanks, man! Really appreciated.</p>",
      "rawMarkdown": "Thanks, man! Really appreciated."
    },
    {
      "id": 3226039,
      "postDate": "2025-06-17T07:16:39.433Z",
      "content": "<p>Thanks for the nice information</p>",
      "rawMarkdown": "Thanks for the nice information"
    }
  ],
  "comments": [
    {
      "id": 3225815,
      "author_name": "Sinan Calisir",
      "author_url": "",
      "post_date": "2025-06-16T21:47:57.113000",
      "content": "<p>Thanks for sharing! I think audiomentations can be used for a similar purpose if anyone is interested further. </p>\n<p><a href=\"https://iver56.github.io/audiomentations/\" target=\"_blank\">https://iver56.github.io/audiomentations/</a></p>",
      "votes": 5,
      "replies": [
        {
          "id": 3225857,
          "author_name": "moth",
          "author_url": "",
          "post_date": "2025-06-16T23:49:18.167000",
          "content": "<p>Thanks for sharing Sinan, I haven't checked out some of these augmentations, but some issues I've seen about directly applying sound augmentations is that these usually rely on some properties that are inherent to audios, like high sampling rates. Also I ignore if these can be applied in multi-channel sequences. Here we have 7 channels (raw data), perhaps they can be adapted or applied at a channel level.</p>",
          "votes": 1,
          "replies": [
            {
              "id": 3226372,
              "author_name": "Sinan Calisir",
              "author_url": "",
              "post_date": "2025-06-17T15:04:28.037000",
              "content": "<p>Yeah, that's correct. A bit more experimental for those. For being multi-channel, I think this library supports that too. So it wouldn't be too much of a hustle, I think. </p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3225780,
      "author_name": "Jan Brederecke",
      "author_url": "",
      "post_date": "2025-06-16T20:38:55.847000",
      "content": "<p>Hey Alejo, thanks for sharing! I also experimented with stuff like that - did you find any of them helpful? So far none of the mentioned augmentations helped my score … </p>",
      "votes": 1,
      "replies": [
        {
          "id": 3225792,
          "author_name": "moth",
          "author_url": "",
          "post_date": "2025-06-16T21:02:47.060000",
          "content": "<p>I just started playing with augmentations. So far I've seen 0.01 increments but its too early to say, perhaps trying different parameters and probabilities of the aforementioned augmentations can boost more. Also, I have some other augmentations in mind which I have not yet tried. Once I get a better idea I will share my results.</p>",
          "votes": 2,
          "replies": [
            {
              "id": 3225810,
              "author_name": "Jan Brederecke",
              "author_url": "",
              "post_date": "2025-06-16T21:44:25.827000",
              "content": "<p>Thanks for sharing, would be interested in your results - you might remember my efforts to find good augmentation :D </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3225841,
              "author_name": "moth",
              "author_url": "",
              "post_date": "2025-06-16T23:02:41.350000",
              "content": "<p>I can't forget HMS 😂</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3226036,
              "author_name": "Anil Ozturk",
              "author_url": "",
              "post_date": "2025-06-17T07:10:18.513000",
              "content": "<p>Did the improvements also map to LB?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3231765,
              "author_name": "moth",
              "author_url": "",
              "post_date": "2025-06-24T21:50:17.313000",
              "content": "<p><a href=\"https://www.kaggle.com/nlztrk\" target=\"_blank\">@nlztrk</a> yes, around ~0.015</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 3231934,
              "author_name": "Jan Brederecke",
              "author_url": "",
              "post_date": "2025-06-25T06:35:08.363000",
              "content": "<p>Using all of them together? 😊</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3225990,
      "author_name": "Ogurtsov",
      "author_url": "",
      "post_date": "2025-06-17T05:57:48.940000",
      "content": "<p>In my experiments, nothing but mixup helps. </p>",
      "votes": 2,
      "replies": [
        {
          "id": 3226455,
          "author_name": "Jan Brederecke",
          "author_url": "",
          "post_date": "2025-06-17T17:18:12.897000",
          "content": "<p>are you willing to go into more detail about you implementation of mixup? I tried it and it did not do a thing 🥲</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3226483,
              "author_name": "Ogurtsov",
              "author_url": "",
              "post_date": "2025-06-17T18:10:57.547000",
              "content": "<p>I use simple linear interpolation between two samples. Maybe not all models are equal in terms of getting benefits from mixup or any other potential improvement.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3226505,
              "author_name": "Jan Brederecke",
              "author_url": "",
              "post_date": "2025-06-17T18:52:09.910000",
              "content": "<p>Thanks for sharing, yes that might be true! </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3232499,
              "author_name": "menglei",
              "author_url": "",
              "post_date": "2025-06-25T19:42:49.283000",
              "content": "<p>Thank you, I used it and my LB score raised by 0.02!</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3232868,
      "author_name": "ynhuhu",
      "author_url": "",
      "post_date": "2025-06-26T09:20:47.490000",
      "content": "<p>I used the five data augmentations mentioned above, and cv increased by about 0.015, and Public LB decreased by 0.01. I guess it is caused by the difference between local data distribution and LB distribution. Which one should I believe?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3234390,
          "author_name": "menglei",
          "author_url": "",
          "post_date": "2025-06-27T18:55:47.440000",
          "content": "<p>I tried mixed up and it helped me increase 0.04 in the LB</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3234460,
              "author_name": "Jan Brederecke",
              "author_url": "",
              "post_date": "2025-06-27T21:33:23.550000",
              "content": "<p>So you use a lot of mixup? crazy benefit!</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3234476,
              "author_name": "menglei",
              "author_url": "",
              "post_date": "2025-06-27T22:13:21.850000",
              "content": "<p>I twice the size of the dataset using mixup and I find it useful.</p>",
              "votes": -2,
              "replies": []
            },
            {
              "id": 3234478,
              "author_name": "Jan Brederecke",
              "author_url": "",
              "post_date": "2025-06-27T22:15:46.847000",
              "content": "<p>I might not get that correctly - you double the size of the dataset using mixup? </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3234479,
              "author_name": "menglei",
              "author_url": "",
              "post_date": "2025-06-27T22:20:13.157000",
              "content": "<p>Yup, half of the data I used for training are augmented data from mix up.</p>",
              "votes": -3,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3227465,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-06-19T03:03:57.013000",
      "content": "",
      "votes": -2,
      "replies": []
    },
    {
      "id": 3232784,
      "author_name": "Sarah Arshad",
      "author_url": "",
      "post_date": "2025-06-26T07:44:30.383000",
      "content": "<p>Thanks for sharing…</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3226251,
      "author_name": "Alex 1996",
      "author_url": "",
      "post_date": "2025-06-17T12:23:23.397000",
      "content": "<p>Thanks, man! Really appreciated.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3226039,
      "author_name": "Yiwen hhh",
      "author_url": "",
      "post_date": "2025-06-17T07:16:39.433000",
      "content": "<p>Thanks for the nice information</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3225760": "I shared a [notebook][1] introducing some sequence data augmentations. These can be applied to our competition data to create new transformed sequences. The proposed data augmentations are:\n- `GaussianNoise`: adds Gaussian (normally distributed) noise to a signal.\n- `PinkNoiseSNR`: adds pink noise to a multichannel time-series signal while maintaining a controlled signal-to-noise ratio (SNR).\n- `TimeStretch`: changes the speed (duration) of a 1D or 2D signal by stretching or compressing it in the time dimension without changing the sampling rate.\n- `TimeShift`: randomly shifts a multichannel time-series signal along the time axis, simulating temporal misalignment or delay.\n- `ButterFilter`: applies a low-pass Butterworth filter to multichannel time-series data.\n- `MixUp`: mixes two sequences data linearly and combines their respective ground truths accordingly as a weighted average.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3197853%2F4692ab5f128c79ecfe575519c0a20b74%2Fnewplot%20(1).png?generation=1750104520399702&alt=media)\n\n[1]: https://www.kaggle.com/code/alejopaullier/cmi-sequence-data-augmentation",
    "3225815": "Thanks for sharing! I think audiomentations can be used for a similar purpose if anyone is interested further. \n\nhttps://iver56.github.io/audiomentations/",
    "3225780": "Hey Alejo, thanks for sharing! I also experimented with stuff like that - did you find any of them helpful? So far none of the mentioned augmentations helped my score ... ",
    "3225990": "In my experiments, nothing but mixup helps. ",
    "3232868": "I used the five data augmentations mentioned above, and cv increased by about 0.015, and Public LB decreased by 0.01. I guess it is caused by the difference between local data distribution and LB distribution. Which one should I believe?",
    "3227465": "",
    "3232784": "Thanks for sharing...",
    "3226251": "Thanks, man! Really appreciated.",
    "3226039": "Thanks for the nice information"
  }
}