Answers.Body: <p>Pragmatically you could use the discriminatory from a GAN for outlier detection.</p>
  
  <p>Ideally you'd start collecting fakes now and do a normal model on both good and bad cases.</p>
  
  <p>In the absence of that you can create a GAN to create realistic looking fakes on only real cases and then take the discriminator from that GAN to flag real-life cases for manual checks.</p>
  
  <p>Please for a real life case always include these real life checks which also helps collecting cases for improving the model.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-31T14:36:34.840Z
Answers.LastActivityDate: 2020-01-31T14:36:34.840Z
Answers.UserDisplayName: Fnguyen
Answers.Body: <p>The problem which you have is a <strong>classification</strong> problem. You assume a class "good users" and a distinct class "bad users". You want to train an AI to tell the two apart, but all your examples are "good users". Any reasonable AI will draw the logical conclusion from those examples: all users are good users. That's a 100% match for the training data. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-31T01:40:50.717Z
Answers.Text: This isn't necessarily classification, could also be anomaly detection. Of course, having an outlier is not always bad. If you're a small bank with relatively poor customers, a billionaire is an outlier you don't want to throw out.
Answers.UserDisplayName: Nyos
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-31T00:24:08.870Z
Answers.LastActivityDate: 2020-01-31T00:24:08.870Z
Answers.UserDisplayName: MSalters
Body: <p>We have hundreds of thousands of customers records, and we need to take the benefits of our data to train a model that will recognize fake entries or unrealistic ones for our platform, where customers are asked to enter their names, phone number and zip code.</p>
  
  <p>So, our attributes are name, phone number, zip code and IP address to train the model with. We have only data associated with real users. Can we train a model provided with only positive labels (as we do not have a negative dataset to train the model with)?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T09:58:31.693Z
Comments.Text: Regardless of the practicality of using an AI system to solve this problem, I would doubt that this is something that should be done. Human names are 'weird', and different cultures have different conventions. By excluding anything that doesn't conform to the majority, you are discriminating against those that are different. You cannot guarantee that names are 'true' anyway, as you can easily make up a name that looks like a real one.
Comments.UserDisplayName: Oliver Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T10:02:39.630Z
Comments.Text: Thanks, even if we already have customers names for the past 4 years?
Comments.UserDisplayName: simo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T10:41:51.540Z
Comments.Text: How do you define 'bad' or 'unrealistic' names? Do you not expect any new customers? You could simply check the first names against all your existing first names to flag those up which look peculiar if that's what you want. But I would strongly advise against doing this fully automated.
Comments.UserDisplayName: Oliver Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T10:41:52.690Z
Comments.Text: Hi simo, it may be possible to answer this question in a theoretical sense, and show you how you might create a system that allowed 99.9% of your customers to use the system plus block 90%+ of attempts to naively trick the system. That is interesting from the AI stand point, and would be fine and on topic question here. Whether you *should* try and implement such a thing on a commercial system is another matter. My web development background would agree with Oliver's summary here - although it may depend on your purpose for making names conform.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T10:44:32.247Z
Comments.Text: So, could you be clear, are you asking for AI theory on detecting "realistic" names? We can answer that with suitable theory from NLP/ML. Or are you asking for advice for implementing/integrating this witha real-world system? The answer there will look more like Oliver's comment, unless we dig more into why you want such a detector
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T11:16:22.947Z
Comments.Text: @NeilSlater, my problem of detecting real names and avoid bad names like for example spamming or bad words or inconsistent combination attributes. Its a problem we need to solve for a real-world system, as we already have real customers data for previous years, kindly see my commits below for available attributes.
Comments.UserDisplayName: simo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T11:16:28.917Z
Comments.Text: @OliverMason We always expect new customers, we have multiple attributes for each customer, that is customer name, phone number and address, so we can include those attributes in the learning phase, we can also add other attributes like IP address or zip code.
  
  Advice is highly appreciated.
Comments.UserDisplayName: simo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T11:34:49.003Z
Comments.Text: @simo: So you are more focused on solving this as a real problem with your system? I think you need to stop worrying so much about names, as they are poor data to base decisions on. Please [edit] your question to be about the problem you want to solve, include what data you have available, and what actions you need your system to be able to perform. You may also want to ask about your root question in https://security.stackexchange.com/ explaining what kinds bad data you are receiving, the damage it does to your service, and advice on filtering and/or blocking it
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T11:45:14.797Z
Comments.Text: Also, could you explain why you only have valid names or valid accounts to work with? Presumably you have a real, detected problem here and actualy have examples of non-valid data that has prompted you to try and solve this problem. I would also presume that you have more than one example of an unwanted account/order/message as otherwise there would not be a real problem to solve for your company's product, if no-one was misusing it?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T13:21:36.783Z
Comments.Text: @NeilSlaterwe Yes, its a real problem with our system, currently we reply on a trusted third party service but I found this an opportunity to apply what I learned in AI on a real problem, of course, my solution will not be deployed before comparing its output with the trusted third party service. We don't have non-valid data unfortunately, as we relied on a third party service, and our team was not aware of possibility of non-valid data advantages, however, we can start storing invalid data from now on..
Comments.UserDisplayName: simo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T13:24:00.803Z
Comments.Text: @NeilSlater I have edited the question to reflect attributes we have.
Comments.UserDisplayName: simo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-31T16:00:13.657Z
Comments.Text: i don't see why AI/ML is needed: you can find a list of zip codes online, you can check it with the ip address for validation, but this check won't always match even in proper cases; phone numbers can be checked for length and area code but not much else; you can perhaps train a model that infers how likely a given name is real, but it's probably not going to have an acceptable fail rate (perhaps something like 5-10%?) considering how mission critical signing up is. perhaps the better question is why you should bother with this in the first place, junk data / spam is normal for the internet :(
Comments.UserDisplayName: k.c. sayz 'k.c sayz'
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-31T16:02:35.663Z
Comments.Text: i am very suspicious of the fact that people actually provided AI/ML solutions to this question when the very premise of the question should be called into question
Comments.UserDisplayName: k.c. sayz 'k.c sayz'
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-31T23:37:55.210Z
Comments.Text: I do not see what is wrong with the premise of the question - it is akin to spam detection. Imagine they are sending snail mail catalogs to people in their database and do not wish to spend the money on Mickey Mouse at 123 Main Street. Even suppose they think the people worth having as customers all have first names in the top 100 American first names. This is evil?
Comments.UserDisplayName: George White
Tags: <machine-learning><classification><features>
Title: Can we train the model to detect real users with only positive labels?
UserDisplayName: simo
ThreadText: # Can we train the model to detect real users with only positive labels?
  
  (Asked by: username_0 on 2020-01-30)
  
  We have hundreds of thousands of customers records, and we need to take the benefits of our data to train a model that will recognize fake entries or unrealistic ones for our platform, where customers are asked to enter their names, phone number and zip code.
  
  So, our attributes are name, phone number, zip code and IP address to train the model with. We have only data associated with real users. Can we train a model provided with only positive labels (as we do not have a negative dataset to train the model with)?
  
  **Tags:** machine-learning, classification, features
  
  > **Comments:**
  > **username_1**: Regardless of the practicality of using an AI system to solve this problem, I would doubt that this is something that should be done. Human names are 'weird', and different cultures have different conventions. By excluding anything that doesn't conform to the majority, you are discriminating against those that are different. You cannot guarantee that names are 'true' anyway, as you can easily make up a name that looks like a real one.  
  > **username_0**: Thanks, even if we already have customers names for the past 4 years?  
  > **username_1**: How do you define 'bad' or 'unrealistic' names? Do you not expect any new customers? You could simply check the first names against all your existing first names to flag those up which look peculiar if that's what you want. But I would strongly advise against doing this fully automated.  
  > **username_2**: Hi username_0, it may be possible to answer this question in a theoretical sense, and show you how you might create a system that allowed 99.9% of your customers to use the system plus block 90%+ of attempts to naively trick the system. That is interesting from the AI stand point, and would be fine and on topic question here. Whether you *should* try and implement such a thing on a commercial system is another matter. My web development background would agree with username_1's summary here - although it may depend on your purpose for making names conform.  
  > **username_2**: So, could you be clear, are you asking for AI theory on detecting "realistic" names? We can answer that with suitable theory from NLP/ML. Or are you asking for advice for implementing/integrating this witha real-world system? The answer there will look more like username_1's comment, unless we dig more into why you want such a detector  
  > **username_0**: @username_2, my problem of detecting real names and avoid bad names like for example spamming or bad words or inconsistent combination attributes. Its a problem we need to solve for a real-world system, as we already have real customers data for previous years, kindly see my commits below for available attributes.  
  > **username_0**: @username_1 We always expect new customers, we have multiple attributes for each customer, that is customer name, phone number and address, so we can include those attributes in the learning phase, we can also add other attributes like IP address or zip code.  Advice is highly appreciated.  
  > **username_2**: @username_0: So you are more focused on solving this as a real problem with your system? I think you need to stop worrying so much about names, as they are poor data to base decisions on. Please [edit] your question to be about the problem you want to solve, include what data you have available, and what actions you need your system to be able to perform. You may also want to ask about your root question in https://security.stackexchange.com/ explaining what kinds bad data you are receiving, the damage it does to your service, and advice on filtering and/or blocking it  
  > **username_2**: Also, could you explain why you only have valid names or valid accounts to work with? Presumably you have a real, detected problem here and actualy have examples of non-valid data that has prompted you to try and solve this problem. I would also presume that you have more than one example of an unwanted account/order/message as otherwise there would not be a real problem to solve for your company's product, if no-one was misusing it?  
  > **username_0**: @NeilSlaterwe Yes, its a real problem with our system, currently we reply on a trusted third party service but I found this an opportunity to apply what I learned in AI on a real problem, of course, my solution will not be deployed before comparing its output with the trusted third party service. We don't have non-valid data unfortunately, as we relied on a third party service, and our team was not aware of possibility of non-valid data advantages, however, we can start storing invalid data from now on..  
  > **username_0**: @username_2 I have edited the question to reflect attributes we have.  
  > **username_3**: i don't see why AI/ML is needed: you can find a list of zip codes online, you can check it with the ip address for validation, but this check won't always match even in proper cases; phone numbers can be checked for length and area code but not much else; you can perhaps train a model that infers how likely a given name is real, but it's probably not going to have an acceptable fail rate (perhaps something like 5-10%?) considering how mission critical signing up is. perhaps the better question is why you should bother with this in the first place, junk data / spam is normal for the internet :(  
  > **username_3**: i am very suspicious of the fact that people actually provided AI/ML solutions to this question when the very premise of the question should be called into question  
  > **username_4**: I do not see what is wrong with the premise of the question - it is akin to spam detection. Imagine they are sending snail mail catalogs to people in their database and do not wish to spend the money on Mickey Mouse at 123 Main Street. Even suppose they think the people worth having as customers all have first names in the top 100 American first names. This is evil?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_5 on 2020-01-31. Score: 1
  
  Pragmatically you could use the discriminatory from a GAN for outlier detection.
  
  Ideally you'd start collecting fakes now and do a normal model on both good and bad cases.
  
  In the absence of that you can create a GAN to create realistic looking fakes on only real cases and then take the discriminator from that GAN to flag real-life cases for manual checks.
  
  Please for a real life case always include these real life checks which also helps collecting cases for improving the model.
  
  
  ---
  
  ### Answer by username_6 on 2020-01-31. Score: 1
  
  The problem which you have is a **classification** problem. You assume a class "good users" and a distinct class "bad users". You want to train an AI to tell the two apart, but all your examples are "good users". Any reasonable AI will draw the logical conclusion from those examples: all users are good users. That's a 100% match for the training data.
  
  > **Comments:**
  > **username_7**: This isn't necessarily classification, could also be anomaly detection. Of course, having an outlier is not always bad. If you're a small bank with relatively poor customers, a billionaire is an outlier you don't want to throw out.  
  
  ---
  
  