Explore | To use or not to use machine learning

Make a fortune with your little hand, give it a thumbs up!

Machine learning excels at solving certain complex problems, often involving difficult relationships between features and outcomes that cannot be easily hardcoded into heuristics or if-else statements. However, there are some limitations or things to be aware of when deciding whether ML is a good solution for a given problem at hand. In this post [1] , we delve into the topic of "with or without ML", first looking at "traditional" ML models, and then discussing how this will change with advances in generative AI.

To clarify some points, I'll use the following initiative as an example: "As a company, I want to know if my customers are satisfied and the main reasons for their dissatisfaction". A "traditional" machine learning based approach to this problem might be:

  • Get customer reviews about you (app or play store, twitter or other social network, your website...)
  • Classify reviews as positive/neutral/negative using a sentiment analysis model.
  • Topic modeling is used on predicted "negative sentiment" reviews to understand their meaning.
alt

Is the data of sufficient quality and quantity?

In a supervised ML model, training data is necessary for the model to learn anything it needs to predict (in this case, the sentiment in a review). If the data quality is low (lots of typos, missing data, errors...), it will be difficult for the model to perform well.

This is often referred to as the "garbage in, garbage out" problem: if your data is garbage, then your models and predictions will also be garbage.

Likewise, you need to have a sufficient amount of data for the model to learn to influence the different factors that need to be predicted. In this example, if you only had negative review labels containing "unhelpful", "disappointed" or similar concepts, the model would not be able to learn that these words usually occur when the label is "negative".

A sufficient amount of training data should also help ensure that you have a good representation of the data needed to perform predictions. For example, if your training data doesn't represent a certain geographic area or a certain population, it's more likely that your model won't handle those reviews well when making predictions.

For some use cases, it is also important to have enough historical data to ensure that we can compute relevant lagged features or labels (e.g. "whether the customer will pay the credit in the next year").

Are the label definitions clear and accessible?

同样,对于传统的监督机器学习模型,您需要一个带标签的数据集:您知道想要预测的最终结果的示例,以便能够训练您的模型。

标签的定义是关键。在此示例中,我们的标签将是与评论相关的情绪。我们可能认为我们只能发表“正面”或“负面”评论,然后认为我们也可能发表“中立”评论。在这种情况下,根据给定的评论,通常会清楚标签是否需要是“正面”、“中立”或“负面”。但是想象一下,我们有“非常积极”、“积极”、“中立”、“消极”或“非常消极”的标签……对于给定的评论,是否很容易决定它是“积极”还是“非常积极” ”?需要避免标签缺乏明确的定义,因为使用嘈杂的标签进行训练将使模型更难学习。

现在标签的定义已经很清楚了,我们需要能够获得足够的、高质量的示例集的标签,这些示例将形成我们的训练数据。在我们的示例中,我们可以考虑手动标记一组评论,无论是在公司还是团队内部,还是将标记外部化给专业注释者(是的,有人全职为 ML 标记数据集!)。需要考虑与获得这些标签相关的成本和可行性。

alt

解决方案的部署是否可行?

为了达到最终效果,机器学习模型的预测需要可用。根据用例,使用预测可能需要特定的基础设施(例如 ML 平台)和专家(例如 ML 工程师)。

在我们的示例中,由于我们希望将模型用于分析目的,因此我们可以离线运行它,并且利用预测将非常简单。然而,如果我们想在负面评论发布后 5 分钟内自动做出回应,那就另当别论了:需要部署和集成模型才能实现这一点。总的来说,重要的是要清楚地了解使用预测的要求是什么,以确保在可用的团队和工具的情况下它是可行的。

有什么利害关系?

机器学习模型的预测总会存在一定程度的误差。事实上,ML 中有一句经典的话:

如果模型没有错误,那么数据或模型肯定有问题

理解这一点很重要,因为如果用例不允许这些错误发生,那么使用 ML 可能不是一个好主意。在我们的示例中,想象一下,我们使用该模型将客户的电子邮件分类为“是否提出指控”,而不是评论和情绪。拥有一个可以对对公司提出指控的电子邮件进行错误分类的模型并不是一个好主意,因为这可能会给公司带来可怕的后果。

使用机器学习在道德上是否正确?

已经有许多经过验证的预测模型基于性别、种族和其他敏感个人属性进行歧视的案例。因此,机器学习团队需要谨慎对待他们在项目中使用的数据和功能,同时也要质疑从道德角度来看,自动化某些类型的决策是否真的有意义。您可以查看我之前关于该主题的博客文章以了解更多详细信息。

我需要可解释性吗?

机器学习模型在某种程度上就像一个黑匣子:你输入一些信息,它们就会神奇地输出预测。模型背后的复杂性就是这个黑匣子背后的原因,特别是当我们与统计中的简单算法进行比较时。在我们的示例中,我们可能无法准确理解为什么评论被预测为“正面”或“负面”。

在其他用例中,可解释性可能是必须的。例如,在保险或银行等受到严格监管的行业。银行需要能够解释为什么向某人授予(或不授予)信贷,即使该决定是基于评分预测模型的。

这个话题与伦理道德有着密切的关系:如果我们不能完全理解模型的决策,就很难知道模型是否已经学会了歧视。

这一切会因为生成人工智能而改变吗?

随着生成式人工智能的进步,许多公司正在提供网页和 API 来使用强大的模型。这如何改变我之前提到的有关 ML 的限制和考虑因素?

  • 数据相关主题(质量、数量和标签):对于可以利用现有 GenAI 模型的用例,这肯定会发生变化。大量数据已用于训练 GenAI 模型。这些模型中的大多数都没有控制数据的质量,但这似乎弥补了它们使用的大量数据。由于这些模型,我们可能不再需要训练数据(同样,对于非常具体的用例)。这被称为零样本学习(例如“询问 ChatGPT 给定评论的情绪是什么”)和少样本学习(例如“向 ChatGPT 提供一些正面、中立和负面评论的示例,然后要求其提供对新评论的看法”)。关于这一点的一个很好的解释可以在 deeplearning.ai 时事通讯中找到。
  • 部署可行性:对于可以利用现有 GenAI 模型的用例,部署变得更加容易,因为许多公司和工具正在为这些强大的模型提供易于使用的 API。如果出于隐私原因需要对这些模型进行微调或将其引入内部,那么部署当然会变得更加困难。
alt

无论是否利用 GenAI,其他限制或考虑因素都不会改变:

  • 高风险:这将继续成为一个问题,因为 GenAI 模型的预测也存在一定程度的错误。谁没有见过 GhatGPT 产生幻觉或提供毫无意义的答案?更糟糕的是,评估这些模型变得更加困难,因为无论其准确性如何,响应听起来总是充满信心,并且评估变得主观(例如“这个响应对我有意义吗?”)。
  • 道德:仍然像以前一样重要。有证据表明 GenAI 模型可能会因用于训练的输入数据而产生偏差(链接)。随着越来越多的公司和功能开始使用这些类型的模型,明确这可能带来的风险非常重要。
  • 可解释性:由于 GenAI 模型比“传统”机器学习更大、更复杂,其预测的可解释性变得更加困难。目前正在进行研究来了解如何实现这种可解释性,但它仍然非常不成熟(链接)。

总结

In this blog post, we took a look at the main things to consider when deciding whether to use ML, and how things might change as generative AI models progress. The main topics discussed were data quality and quantity, label acquisition, deployment, risk, ethics, and interpretability. I hope this summary is useful as you consider your next ML initiative (or not)!

Reference

[1]

Source: https://towardsdatascience.com/to-use-or-not-to-use-machine-learning-d28185382c14

This article is published by mdnice multi-platform

Guess you like

Origin blog.csdn.net/swindler_ice/article/details/132131214