{
  "id": 98402,
  "title": "Do GANs Memorize or Generalize?",
  "url": "/competitions/generative-dog-images/discussion/98402",
  "author_name": "Chris Deotte",
  "post_date": "2019-07-03T14:34:18.808000",
  "votes": 55,
  "comment_count": 21,
  "views": 0,
  "content": "<p>Do GANs memorize or generalize? This question fascinates me. As a math teacher, I often wonder if my students have memorized the formulas or understand the formulas.</p>\n\n<p>I have many students with high grades and low understanding. And many students with low grades and high understanding. In the same way that it is hard for a teacher to evaluate students, it will be hard for Kaggle to evaluate GANs</p>\n\n<p>I posted a kernel that explores this concept <a href=\"https://www.kaggle.com/cdeotte/supervised-generative-dog-net\">here</a> (and another <a href=\"https://www.kaggle.com/cdeotte/dog-memorizer-gan\">here</a>). Note that I purposely made a simple example. I could have made a full GAN with both a generator and discriminator and only showed the training images to the discriminator. Then I could have the discriminator teach the generator to memorize the images.</p>",
  "messages": [
    {
      "id": 567449,
      "postDate": "2019-07-03T14:34:18.807Z",
      "content": "<p>Do GANs memorize or generalize? This question fascinates me. As a math teacher, I often wonder if my students have memorized the formulas or understand the formulas.</p>\n\n<p>I have many students with high grades and low understanding. And many students with low grades and high understanding. In the same way that it is hard for a teacher to evaluate students, it will be hard for Kaggle to evaluate GANs</p>\n\n<p>I posted a kernel that explores this concept <a href=\"https://www.kaggle.com/cdeotte/supervised-generative-dog-net\">here</a> (and another <a href=\"https://www.kaggle.com/cdeotte/dog-memorizer-gan\">here</a>). Note that I purposely made a simple example. I could have made a full GAN with both a generator and discriminator and only showed the training images to the discriminator. Then I could have the discriminator teach the generator to memorize the images.</p>",
      "rawMarkdown": "Do GANs memorize or generalize? This question fascinates me. As a math teacher, I often wonder if my students have memorized the formulas or understand the formulas.\n\nI have many students with high grades and low understanding. And many students with low grades and high understanding. In the same way that it is hard for a teacher to evaluate students, it will be hard for Kaggle to evaluate GANs\n\nI posted a kernel that explores this concept [here][1] (and another [here][2]). Note that I purposely made a simple example. I could have made a full GAN with both a generator and discriminator and only showed the training images to the discriminator. Then I could have the discriminator teach the generator to memorize the images.\n\n[1]: https://www.kaggle.com/cdeotte/supervised-generative-dog-net\n[2]: https://www.kaggle.com/cdeotte/dog-memorizer-gan",
      "votes": 55
    },
    {
      "id": 567458,
      "postDate": "2019-07-03T14:49:23.143Z",
      "content": "<p>Wonderful kernel and explanation, as always!\nIt will start a great discussion of what is allowed in this competition and how the metric can be changed to pick that up. </p>\n\n<p>I hope the hosts will also have a word on this ;)</p>",
      "rawMarkdown": "Wonderful kernel and explanation, as always!\nIt will start a great discussion of what is allowed in this competition and how the metric can be changed to pick that up. \n\nI hope the hosts will also have a word on this ;)",
      "votes": 4,
      "replies": [
        {
          "id": 567697,
          "postDate": "2019-07-03T21:12:24.477Z",
          "content": "<p>Thanks Ilu. I think one solution would be for the Kaggle judges to verify the winners' Generative Network by choosing and submitting 10000 random seeds of their (the judges') choice. And then computing the MiFID metric of those images to make sure it is similar to Private LB score.</p>\n\n<p>(And judges can verify that the range of the image space is greater than 10000 by observing a few random latent space walks).</p>",
          "rawMarkdown": "Thanks Ilu. I think one solution would be for the Kaggle judges to verify the winners' Generative Network by choosing and submitting 10000 random seeds of their (the judges') choice. And then computing the MiFID metric of those images to make sure it is similar to Private LB score.\n\n(And judges can verify that the range of the image space is greater than 10000 by observing a few random latent space walks).",
          "votes": 1
        }
      ]
    },
    {
      "id": 570494,
      "postDate": "2019-07-08T11:27:09.680Z",
      "content": "<p>It is probably difficult for you as a teacher to develop some formal approach to distinguish low understanding and good understanding speaking about your students. In this competition I think it is difficult for Kaggle to create some formal approach for distinguishing between two types of GAN architectures (generalizing and memorizing).</p>\n\n<p>Without this approach memorizing GAN just wins this competition.</p>",
      "rawMarkdown": "It is probably difficult for you as a teacher to develop some formal approach to distinguish low understanding and good understanding speaking about your students. In this competition I think it is difficult for Kaggle to create some formal approach for distinguishing between two types of GAN architectures (generalizing and memorizing).\n\nWithout this approach memorizing GAN just wins this competition.",
      "votes": 1
    },
    {
      "id": 570487,
      "postDate": "2019-07-08T11:13:23.317Z",
      "content": "<p>Nice read </p>",
      "rawMarkdown": "Nice read ",
      "votes": 1
    },
    {
      "id": 570232,
      "postDate": "2019-07-08T03:21:24.557Z",
      "content": "<p>nice</p>",
      "rawMarkdown": "nice",
      "votes": 1
    },
    {
      "id": 570097,
      "postDate": "2019-07-07T19:12:53.927Z",
      "content": "<p>Great kernel and explanation,thank u mr deotte</p>",
      "rawMarkdown": "Great kernel and explanation,thank u mr deotte",
      "votes": 1
    },
    {
      "id": 567685,
      "postDate": "2019-07-03T20:45:09.860Z",
      "content": "<p>Yes in many cases provided with enough degrees of freedom you can over-fit (sometimes unintentionally) neural network to work like lookup-table without any generalization. GAN architecture is not different since it allows generator to over-fit on train data.\nI'd rather bother about other question. Here we have formal task with formal metric. Why some method are considered as cheating based on our subjective assumptions about meaning of vague term \"generalization\"?</p>",
      "rawMarkdown": "Yes in many cases provided with enough degrees of freedom you can over-fit (sometimes unintentionally) neural network to work like lookup-table without any generalization. GAN architecture is not different since it allows generator to over-fit on train data.\nI'd rather bother about other question. Here we have formal task with formal metric. Why some method are considered as cheating based on our subjective assumptions about meaning of vague term \"generalization\"?",
      "votes": 1,
      "replies": [
        {
          "id": 567693,
          "postDate": "2019-07-03T21:01:29.790Z",
          "content": "<p>The problem is that the MiFID metric is easily fooled. You can submit crops of original images and it won't penalize them as duplicates. Kaggle realizes this, so they added </p>\n\n<p>&gt; To enforce and prevent cheating, we reserve the right to: (a) Visually inspect all participants' submitted images, (b) review any submitted source code, (c) use these reviews to identify violators or determine winners, and (d) disqualify participants from the competition who are found in violation. </p>\n\n<p>This says that humans (Kaggle judges) will review the images to make sure they are \"original\". At what point does a GAN start making \"original\" images? Is 99% one image with 1% new stuff considered \"original\"?</p>",
          "rawMarkdown": "The problem is that the MiFID metric is easily fooled. You can submit crops of original images and it won't penalize them as duplicates. Kaggle realizes this, so they added \n\n&gt; To enforce and prevent cheating, we reserve the right to: (a) Visually inspect all participants' submitted images, (b) review any submitted source code, (c) use these reviews to identify violators or determine winners, and (d) disqualify participants from the competition who are found in violation. \n\nThis says that humans (Kaggle judges) will review the images to make sure they are \"original\". At what point does a GAN start making \"original\" images? Is 99% one image with 1% new stuff considered \"original\"?"
        },
        {
          "id": 567694,
          "postDate": "2019-07-03T21:03:52.147Z",
          "content": "<p>If memorization is not cheating, then this will be a way to win this competition. \nAnd to my understanding, memorizing NNs are of no use at all to anyone. So it would be a lot of wasted work for everyone in this competition. </p>\n\n<p>Also, I find it hard to believe that the authors will check all medal ranks. That would be a lot of work. </p>",
          "rawMarkdown": "If memorization is not cheating, then this will be a way to win this competition. \nAnd to my understanding, memorizing NNs are of no use at all to anyone. So it would be a lot of wasted work for everyone in this competition. \n\nAlso, I find it hard to believe that the authors will check all medal ranks. That would be a lot of work. ",
          "votes": 5
        },
        {
          "id": 567701,
          "postDate": "2019-07-03T21:17:56.420Z",
          "content": "<p>You can't just forbid memorization because it is in the heart of ML. I understand that organizers want models learn patterns, not images, but you can't control and easily interpret machine learning models. \nMiFID metric can be fooled, but organizers could:\n1) Request that the output of kernel is serialized model of Generator network not images.\n2) Restrict dimension of input and number of parameters of Generator network\n3) Ensure that private image set doesn't include any training images</p>",
          "rawMarkdown": "You can't just forbid memorization because it is in the heart of ML. I understand that organizers want models learn patterns, not images, but you can't control and easily interpret machine learning models. \nMiFID metric can be fooled, but organizers could:\n1) Request that the output of kernel is serialized model of Generator network not images.\n2) Restrict dimension of input and number of parameters of Generator network\n3) Ensure that private image set doesn't include any training images"
        },
        {
          "id": 568665,
          "postDate": "2019-07-05T09:21:39.637Z",
          "content": "<p>I agree with Ilu</p>\n\n<blockquote>\n  <p>If memorization is not cheating, then this will be a way to win this competition. </p>\n</blockquote>\n\n<p>It will be very hard to beat a Memorizer GAN. I posted a competitive one <a href=\"https://www.kaggle.com/cdeotte/dog-memorizer-gan\">here</a> to demonstrate their unfair advantage.</p>",
          "rawMarkdown": "I agree with Ilu\n&gt; If memorization is not cheating, then this will be a way to win this competition. \n\nIt will be very hard to beat a Memorizer GAN. I posted a competitive one [here][1] to demonstrate their unfair advantage.\n\n[1]: https://www.kaggle.com/cdeotte/dog-memorizer-gan",
          "votes": 3
        },
        {
          "id": 568891,
          "postDate": "2019-07-05T16:09:35.390Z",
          "content": "<p>More than just \"hard\". FID scores from the very best GANs in current research don't reach values as low as your memorizing Kernel, <a href=\"/cdeotte\">@cdeotte</a> \nIf i remember correctly they are around 8 for dogs right now with many many days of training. </p>",
          "rawMarkdown": "More than just \"hard\". FID scores from the very best GANs in current research don't reach values as low as your memorizing Kernel, @cdeotte \nIf i remember correctly they are around 8 for dogs right now with many many days of training. ",
          "votes": 2
        }
      ]
    },
    {
      "id": 567622,
      "postDate": "2019-07-03T19:01:01.590Z",
      "content": "<p>Thank you so much sir. I have never thought about GANs this way. I am flattered with your understanding about GANs. Do you have a blog where you write about these topic , I will throughly enjoy reading it.</p>",
      "rawMarkdown": "Thank you so much sir. I have never thought about GANs this way. I am flattered with your understanding about GANs. Do you have a blog where you write about these topic , I will throughly enjoy reading it.",
      "votes": 1,
      "replies": [
        {
          "id": 567698,
          "postDate": "2019-07-03T21:14:24.310Z",
          "content": "<p>Thanks Rahul. Currently my only blog is Kaggle :-)</p>",
          "rawMarkdown": "Thanks Rahul. Currently my only blog is Kaggle :-)",
          "votes": 2
        }
      ]
    },
    {
      "id": 567547,
      "postDate": "2019-07-03T17:04:19.380Z",
      "content": "<p>Good to see you Chris, again !\nI thought that all generative models, if tuned well, do generalize. No? I have never worked with GAN, so looking forward to the reasoning from others.</p>",
      "rawMarkdown": "Good to see you Chris, again !\nI thought that all generative models, if tuned well, do generalize. No? I have never worked with GAN, so looking forward to the reasoning from others.",
      "votes": 1
    },
    {
      "id": 569753,
      "postDate": "2019-07-07T08:59:41.373Z",
      "content": "<p><a href=\"/cdeotte\">@cdeotte</a> great discussion. A couple of months ago I read this article in relation to an evaluation metric which seems to be more robust to memorization. \n<a href=\"https://openreview.net/pdf?id=HkxKH2AcFm\">TOWARDS GAN BENCHMARKS WHICH REQUIRE GENERALIZATION</a></p>",
      "rawMarkdown": "@cdeotte great discussion. A couple of months ago I read this article in relation to an evaluation metric which seems to be more robust to memorization. \n[TOWARDS GAN BENCHMARKS WHICH REQUIRE GENERALIZATION](https://openreview.net/pdf?id=HkxKH2AcFm)",
      "votes": 2,
      "replies": [
        {
          "id": 570114,
          "postDate": "2019-07-07T19:33:54.093Z",
          "content": "<p>Thanks for the link. I'll check it out.</p>",
          "rawMarkdown": "Thanks for the link. I'll check it out.",
          "votes": 1
        }
      ]
    },
    {
      "id": 568549,
      "postDate": "2019-07-05T05:07:15.863Z",
      "content": "<p>I think on simple dataset like mnist, GAN is easily able to generalize(Like we able to understand easy formulas quickly.) and when things came to complex problems, GAN memorizes. </p>\n\n<p>Basically It also depend on Generator and descriminator architecture.</p>\n\n<p>if we define too many neurons obviously it will memorize each example and if we lower the no of neurons it will generalize them and a single neuron will try to store information about more then 1 example which will generalize the technique but it will fail to give good output.</p>\n\n<p>To make good GAN </p>\n\n<p>Architecture should be good</p>\n\n<p>Use batch norm in each layer</p>\n\n<p>never forget to apply dropouts( If using too many neurons )</p>\n\n<p>introduce different type of loss like log loss, rmse,  pre pixel loss, In some cases style loss also do great.</p>\n\n<p>If GAN is input based (input(img)-&gt;GAN-&gt;output(img)) use resnet as it is able to preserve maximum information.</p>\n\n<p>Dont Up-sample with Transposed Convolution( create checker board pattern),  use simple image resize function</p>",
      "rawMarkdown": "I think on simple dataset like mnist, GAN is easily able to generalize(Like we able to understand easy formulas quickly.) and when things came to complex problems, GAN memorizes. \n\nBasically It also depend on Generator and descriminator architecture.\n\nif we define too many neurons obviously it will memorize each example and if we lower the no of neurons it will generalize them and a single neuron will try to store information about more then 1 example which will generalize the technique but it will fail to give good output.\n\nTo make good GAN \n\nArchitecture should be good\n\nUse batch norm in each layer\n\nnever forget to apply dropouts( If using too many neurons )\n\nintroduce different type of loss like log loss, rmse,  pre pixel loss, In some cases style loss also do great.\n\nIf GAN is input based (input(img)-&gt;GAN-&gt;output(img)) use resnet as it is able to preserve maximum information.\n\nDont Up-sample with Transposed Convolution( create checker board pattern),  use simple image resize function",
      "votes": 2
    },
    {
      "id": 567532,
      "postDate": "2019-07-03T16:42:25.587Z",
      "content": "<p>Super interesting topic! I think this kind of discussions give a lot of value to the community </p>",
      "rawMarkdown": "Super interesting topic! I think this kind of discussions give a lot of value to the community ",
      "votes": 2
    },
    {
      "id": 586224,
      "postDate": "2019-07-28T20:25:45.830Z",
      "content": "<p>Nice read, but still, memorization is pretty much unfair and not very interesting in the point of view of this competition. But I guess life is unfair :)</p>",
      "rawMarkdown": "Nice read, but still, memorization is pretty much unfair and not very interesting in the point of view of this competition. But I guess life is unfair :)"
    },
    {
      "id": 567810,
      "postDate": "2019-07-04T03:20:02.203Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 567458,
      "author_name": "Pascal Pfeiffer",
      "author_url": "",
      "post_date": "2019-07-03T14:49:23.143000",
      "content": "<p>Wonderful kernel and explanation, as always!\nIt will start a great discussion of what is allowed in this competition and how the metric can be changed to pick that up. </p>\n\n<p>I hope the hosts will also have a word on this ;)</p>",
      "votes": 4,
      "replies": [
        {
          "id": 567697,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2019-07-03T21:12:24.477000",
          "content": "<p>Thanks Ilu. I think one solution would be for the Kaggle judges to verify the winners' Generative Network by choosing and submitting 10000 random seeds of their (the judges') choice. And then computing the MiFID metric of those images to make sure it is similar to Private LB score.</p>\n\n<p>(And judges can verify that the range of the image space is greater than 10000 by observing a few random latent space walks).</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 570494,
      "author_name": "Anna Novikova",
      "author_url": "",
      "post_date": "2019-07-08T11:27:09.680000",
      "content": "<p>It is probably difficult for you as a teacher to develop some formal approach to distinguish low understanding and good understanding speaking about your students. In this competition I think it is difficult for Kaggle to create some formal approach for distinguishing between two types of GAN architectures (generalizing and memorizing).</p>\n\n<p>Without this approach memorizing GAN just wins this competition.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 570487,
      "author_name": "shilpa.rpns",
      "author_url": "",
      "post_date": "2019-07-08T11:13:23.317000",
      "content": "<p>Nice read </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 570232,
      "author_name": "muhammad umar",
      "author_url": "",
      "post_date": "2019-07-08T03:21:24.557000",
      "content": "<p>nice</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 570097,
      "author_name": "Hamza Topal",
      "author_url": "",
      "post_date": "2019-07-07T19:12:53.927000",
      "content": "<p>Great kernel and explanation,thank u mr deotte</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 567685,
      "author_name": "Anton Chikin",
      "author_url": "",
      "post_date": "2019-07-03T20:45:09.860000",
      "content": "<p>Yes in many cases provided with enough degrees of freedom you can over-fit (sometimes unintentionally) neural network to work like lookup-table without any generalization. GAN architecture is not different since it allows generator to over-fit on train data.\nI'd rather bother about other question. Here we have formal task with formal metric. Why some method are considered as cheating based on our subjective assumptions about meaning of vague term \"generalization\"?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 567693,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2019-07-03T21:01:29.790000",
          "content": "<p>The problem is that the MiFID metric is easily fooled. You can submit crops of original images and it won't penalize them as duplicates. Kaggle realizes this, so they added </p>\n\n<p>&gt; To enforce and prevent cheating, we reserve the right to: (a) Visually inspect all participants' submitted images, (b) review any submitted source code, (c) use these reviews to identify violators or determine winners, and (d) disqualify participants from the competition who are found in violation. </p>\n\n<p>This says that humans (Kaggle judges) will review the images to make sure they are \"original\". At what point does a GAN start making \"original\" images? Is 99% one image with 1% new stuff considered \"original\"?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 567694,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2019-07-03T21:03:52.147000",
          "content": "<p>If memorization is not cheating, then this will be a way to win this competition. \nAnd to my understanding, memorizing NNs are of no use at all to anyone. So it would be a lot of wasted work for everyone in this competition. </p>\n\n<p>Also, I find it hard to believe that the authors will check all medal ranks. That would be a lot of work. </p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 567701,
          "author_name": "Anton Chikin",
          "author_url": "",
          "post_date": "2019-07-03T21:17:56.420000",
          "content": "<p>You can't just forbid memorization because it is in the heart of ML. I understand that organizers want models learn patterns, not images, but you can't control and easily interpret machine learning models. \nMiFID metric can be fooled, but organizers could:\n1) Request that the output of kernel is serialized model of Generator network not images.\n2) Restrict dimension of input and number of parameters of Generator network\n3) Ensure that private image set doesn't include any training images</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 568665,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2019-07-05T09:21:39.637000",
          "content": "<p>I agree with Ilu</p>\n\n<blockquote>\n  <p>If memorization is not cheating, then this will be a way to win this competition. </p>\n</blockquote>\n\n<p>It will be very hard to beat a Memorizer GAN. I posted a competitive one <a href=\"https://www.kaggle.com/cdeotte/dog-memorizer-gan\">here</a> to demonstrate their unfair advantage.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 568891,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2019-07-05T16:09:35.390000",
          "content": "<p>More than just \"hard\". FID scores from the very best GANs in current research don't reach values as low as your memorizing Kernel, <a href=\"/cdeotte\">@cdeotte</a> \nIf i remember correctly they are around 8 for dogs right now with many many days of training. </p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 567622,
      "author_name": "rahul",
      "author_url": "",
      "post_date": "2019-07-03T19:01:01.590000",
      "content": "<p>Thank you so much sir. I have never thought about GANs this way. I am flattered with your understanding about GANs. Do you have a blog where you write about these topic , I will throughly enjoy reading it.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 567698,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2019-07-03T21:14:24.310000",
          "content": "<p>Thanks Rahul. Currently my only blog is Kaggle :-)</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 567547,
      "author_name": "Piyush Paliwal",
      "author_url": "",
      "post_date": "2019-07-03T17:04:19.380000",
      "content": "<p>Good to see you Chris, again !\nI thought that all generative models, if tuned well, do generalize. No? I have never worked with GAN, so looking forward to the reasoning from others.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 569753,
      "author_name": "JasonX",
      "author_url": "",
      "post_date": "2019-07-07T08:59:41.373000",
      "content": "<p><a href=\"/cdeotte\">@cdeotte</a> great discussion. A couple of months ago I read this article in relation to an evaluation metric which seems to be more robust to memorization. \n<a href=\"https://openreview.net/pdf?id=HkxKH2AcFm\">TOWARDS GAN BENCHMARKS WHICH REQUIRE GENERALIZATION</a></p>",
      "votes": 2,
      "replies": [
        {
          "id": 570114,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2019-07-07T19:33:54.093000",
          "content": "<p>Thanks for the link. I'll check it out.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 568549,
      "author_name": "Mohit Duklan",
      "author_url": "",
      "post_date": "2019-07-05T05:07:15.863000",
      "content": "<p>I think on simple dataset like mnist, GAN is easily able to generalize(Like we able to understand easy formulas quickly.) and when things came to complex problems, GAN memorizes. </p>\n\n<p>Basically It also depend on Generator and descriminator architecture.</p>\n\n<p>if we define too many neurons obviously it will memorize each example and if we lower the no of neurons it will generalize them and a single neuron will try to store information about more then 1 example which will generalize the technique but it will fail to give good output.</p>\n\n<p>To make good GAN </p>\n\n<p>Architecture should be good</p>\n\n<p>Use batch norm in each layer</p>\n\n<p>never forget to apply dropouts( If using too many neurons )</p>\n\n<p>introduce different type of loss like log loss, rmse,  pre pixel loss, In some cases style loss also do great.</p>\n\n<p>If GAN is input based (input(img)-&gt;GAN-&gt;output(img)) use resnet as it is able to preserve maximum information.</p>\n\n<p>Dont Up-sample with Transposed Convolution( create checker board pattern),  use simple image resize function</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 567532,
      "author_name": "Federico Raimondi Cominesi",
      "author_url": "",
      "post_date": "2019-07-03T16:42:25.587000",
      "content": "<p>Super interesting topic! I think this kind of discussions give a lot of value to the community </p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 586224,
      "author_name": "Matthieu Cordier",
      "author_url": "",
      "post_date": "2019-07-28T20:25:45.830000",
      "content": "<p>Nice read, but still, memorization is pretty much unfair and not very interesting in the point of view of this competition. But I guess life is unfair :)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 567810,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-07-04T03:20:02.203000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "567449": "Do GANs memorize or generalize? This question fascinates me. As a math teacher, I often wonder if my students have memorized the formulas or understand the formulas.\n\nI have many students with high grades and low understanding. And many students with low grades and high understanding. In the same way that it is hard for a teacher to evaluate students, it will be hard for Kaggle to evaluate GANs\n\nI posted a kernel that explores this concept [here][1] (and another [here][2]). Note that I purposely made a simple example. I could have made a full GAN with both a generator and discriminator and only showed the training images to the discriminator. Then I could have the discriminator teach the generator to memorize the images.\n\n[1]: https://www.kaggle.com/cdeotte/supervised-generative-dog-net\n[2]: https://www.kaggle.com/cdeotte/dog-memorizer-gan",
    "567458": "Wonderful kernel and explanation, as always!\nIt will start a great discussion of what is allowed in this competition and how the metric can be changed to pick that up. \n\nI hope the hosts will also have a word on this ;)",
    "570494": "It is probably difficult for you as a teacher to develop some formal approach to distinguish low understanding and good understanding speaking about your students. In this competition I think it is difficult for Kaggle to create some formal approach for distinguishing between two types of GAN architectures (generalizing and memorizing).\n\nWithout this approach memorizing GAN just wins this competition.",
    "570487": "Nice read ",
    "570232": "nice",
    "570097": "Great kernel and explanation,thank u mr deotte",
    "567685": "Yes in many cases provided with enough degrees of freedom you can over-fit (sometimes unintentionally) neural network to work like lookup-table without any generalization. GAN architecture is not different since it allows generator to over-fit on train data.\nI'd rather bother about other question. Here we have formal task with formal metric. Why some method are considered as cheating based on our subjective assumptions about meaning of vague term \"generalization\"?",
    "567622": "Thank you so much sir. I have never thought about GANs this way. I am flattered with your understanding about GANs. Do you have a blog where you write about these topic , I will throughly enjoy reading it.",
    "567547": "Good to see you Chris, again !\nI thought that all generative models, if tuned well, do generalize. No? I have never worked with GAN, so looking forward to the reasoning from others.",
    "569753": "@cdeotte great discussion. A couple of months ago I read this article in relation to an evaluation metric which seems to be more robust to memorization. \n[TOWARDS GAN BENCHMARKS WHICH REQUIRE GENERALIZATION](https://openreview.net/pdf?id=HkxKH2AcFm)",
    "568549": "I think on simple dataset like mnist, GAN is easily able to generalize(Like we able to understand easy formulas quickly.) and when things came to complex problems, GAN memorizes. \n\nBasically It also depend on Generator and descriminator architecture.\n\nif we define too many neurons obviously it will memorize each example and if we lower the no of neurons it will generalize them and a single neuron will try to store information about more then 1 example which will generalize the technique but it will fail to give good output.\n\nTo make good GAN \n\nArchitecture should be good\n\nUse batch norm in each layer\n\nnever forget to apply dropouts( If using too many neurons )\n\nintroduce different type of loss like log loss, rmse,  pre pixel loss, In some cases style loss also do great.\n\nIf GAN is input based (input(img)-&gt;GAN-&gt;output(img)) use resnet as it is able to preserve maximum information.\n\nDont Up-sample with Transposed Convolution( create checker board pattern),  use simple image resize function",
    "567532": "Super interesting topic! I think this kind of discussions give a lot of value to the community ",
    "586224": "Nice read, but still, memorization is pretty much unfair and not very interesting in the point of view of this competition. But I guess life is unfair :)",
    "567810": ""
  }
}