arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.14776cs.CYcs.AIcs.PL
收藏

Green AI:哪种编程语言消耗最多?

Green AI: Which Programming Language Consumes the Most?

University of Florence(佛罗伦萨大学)

Niccolò Marini, Leonardo Pampaloni, Filippo Di Martino, Roberto Verdecchia, Enrico Vicario

AI总结:

本研究通过受控实验评估五种编程语言在七种AI算法上的能耗,发现编译型语言能效更高,但算法实现方式才是决定Green AI能耗的关键,需在能效与实现便捷性间权衡。

摘要:

AI正消耗着日益增长的自然资源份额。尽管编程语言在AI(低)效率方面具有潜在影响,但迄今为止其作用仍属未知。本研究旨在理解编程语言对AI环境可持续性的影响。为实现目标,我们开展了受控实证实验,考察了五种编程语言(C++、Java、Python、MATLAB和R)、七种AI算法(KNN、SVC、AdaBoost、决策树、逻辑回归、朴素贝叶斯和随机森林)、三个流行数据集,以及训练和推理阶段。收集的结果表明,编程语言对AI环境可持续性有显著影响。编译和半编译语言(C++、Java)的能耗始终低于解释型语言(Python、MATLAB、R),后者所需的能耗最高达54倍。某些语言在训练中累积效率更高,而其他语言则在推理中效率更高。哪种编程语言消耗最多在很大程度上取决于所使用的算法。最终,在Green AI中,算法的实现方式可能是最具决定性的因素,而与所使用的语言无关。结论是,尽管提升AI的环境可持续性至关重要,但应始终考虑能效与实现便捷性之间的权衡。无需彻底颠覆现有的开发实践和技术即可实现Green AI。

英文摘要:

AI is demanding an evergrowing portion of environmental resources. Despite their potential impact on AI environmental sustainability, the role that programming languages play in AI (in)efficiency is to date still unknown. With this study, we aim to understand the impact that programming languages can have on AI environmental sustainability. To achieve our goal, we conduct a controlled empirical experiment by considering five programming languages (C++, Java, Python, MATLAB, and R), seven AI algorithms (KNN, SVC, AdaBoost, decision tree, logistic regression, naive bayses, and random forest), three popular datasets, and the training and inference phases. The collected results show that programming languages have a considerable impact on AI environmental sustainability. Compiled and semi-compiled languages (C++, Java) consistently consume less than interpreted languages (Python, MATLAB, R), which require up to 54x more energy. Some languages are cumulatively more efficient in training, while others in inference. Which programming language consumes the most highly depends on the algorithm considered. Ultimately, algorithm implementation might be the most determining factor in Green AI, regardless of the language used. As conclusion, while making AI more environmentally sustainable is paramount, a trade-off between energy efficiency and implementation ease should always be considered. Green AI can be achieved without the need of completely disrupting the development practices and technologies currently in place.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑