AI tool automatically reveals how to write apps that drain less battery

October 09, 2018

WEST LAFAYETTE, Ind. -- To send a text message, there's not only "an app for that," there are dozens of apps for that.

So why does sending a message through Skype drain over three times more battery than WhatsApp? Developers simply haven't had a way of knowing when and how to make their apps more energy-efficient.

Purdue University researchers have created a new tool, called "DiffProf," that uses artificial intelligence to automatically decide for the developer if a feature should be improved to drain less battery and how to make that improvement.

"What if a feature of an app needs to consume 70 percent of the phone's battery? Is there room for improvement, or should that feature be left the way it is?" said Y. Charlie Hu, the Michael and Katherine Birck Professor of Electrical and Computer Engineering and the CEO and co-founder of Mobile Enerlytics, LLC.

The tool, which was announced on Oct. 8 at the 13th USENIX Symposium on Operating Systems Design and Implementation, aligns with Purdue's Giant Leaps celebration, acknowledging the university's global advancements made in AI, algorithms and automation as part of Purdue's 150th anniversary. This is one of the four themes of the yearlong celebration's Ideas Festival, designed to showcase Purdue as an intellectual center solving real-world issues.

In 2012, Hu's lab was the first to develop a tool for developers to identify hot spots in source code that are responsible for an app's battery drain.

"Before this point, trying to figure out how much battery an app is draining was like looking at a black box," Hu said. "It was a big step forward, but it still isn't enough, because developers often wouldn't know what to do with information about the source of a battery drain."

How code runs can dramatically differ between two apps, even if the developers are implementing the same task. DiffProf catches these differences in the "call trees" of similar tasks, to show why the messaging feature of one messaging app consumes more energy than another messaging app. DiffProf then reveals how to rewrite the app to drain less battery.

"Ultimately, in order for this technique to make a big difference for an entire smartphone, all developers would need to make their apps more energy-efficient," said Abhilash Jindal, fellow co-founder of Mobile Enerlytics and a former Ph.D. student in computer science at Purdue.

"The impact also depends on how intensively someone uses certain apps. Someone who uses messaging apps a lot might experience longer battery life, but someone who doesn't use their messaging apps at all might not," he said.

So far, the DiffProf prototype has only been tested for the Android mobile operating system.
-end-
The work was supported in part by the National Science Foundation (Grant CSR-1718854).

ABSTRACT

Differential energy profiling: Energy optimization via diffing similar apps

Abhilash Jindal, Y. Charlie Hu

Purdue University and Mobile Enerlytics, LLC

Mobile app energy profilers provide a foundational energy diagnostic tool by identifying energy hotspots in the app source code. However, they only tackle the first challenge faced by developers, as after presented with the energy hotspots, developers typically do not have any guidance on how to proceed with the remaining optimization process: (1) Is there a more energy-efficient implementation for the same app task? (2) How to come up with the more efficient implementation? To help developers tackle these challenges, we developed a new energy profiling methodology called differential energy profiling, that automatically uncovers more efficient implementations of common app tasks by leveraging existing implementations of similar apps which are bountiful in the app marketplace. To demonstrate its effectiveness, we implemented such a differential energy profiler, DiffProf, for Android apps and used it to profile 8 groups (from 6 popular app categories) of 5 similar apps each. Our extensive case studies show that DiffProf provides developers with actionable diagnosis beyond a traditional energy profiler: it identifies non-essential (unmatched or extra) and known-to-be inefficient (matched) tasks, and the call trees of tasks it extracts further allow developers to quickly understand the reasons and develop fixes for the energy difference with minor manual debugging efforts.

Purdue University

Related Artificial Intelligence Articles from Brightsurf:

Physics can assist with key challenges in artificial intelligence
Two challenges in the field of artificial intelligence have been solved by adopting a physical concept introduced a century ago to describe the formation of a magnet during a process of iron bulk cooling.

A survey on artificial intelligence in chest imaging of COVID-19
Announcing a new article publication for BIO Integration journal. In this review article the authors consider the application of artificial intelligence imaging analysis methods for COVID-19 clinical diagnosis.

Using artificial intelligence can improve pregnant women's health
Disorders such as congenital heart birth defects or macrosomia, gestational diabetes and preterm birth can be detected earlier when artificial intelligence is used.

Artificial intelligence (AI)-aided disease prediction
Artificial Intelligence (AI)-aided Disease Prediction https://doi.org/10.15212/bioi-2020-0017 Announcing a new article publication for BIO Integration journal.

Artificial intelligence dives into thousands of WW2 photographs
In a new international cross disciplinary study, researchers from Aarhus University, Denmark and Tampere University, Finland have used artificial intelligence to analyse large amounts of historical photos from WW2.

Applying artificial intelligence to science education
A new review published in the Journal of Research in Science Teaching highlights the potential of machine learning--a subset of artificial intelligence--in science education.

New roles for clinicians in the age of artificial intelligence
New Roles for Clinicians in the Age of Artificial Intelligence https://doi.org/10.15212/bioi-2020-0014 Announcing a new article publication for BIO Integration journal.

Artificial intelligence aids gene activation discovery
Scientists have long known that human genes are activated through instructions delivered by the precise order of our DNA.

Artificial intelligence recognizes deteriorating photoreceptors
A software based on artificial intelligence (AI), which was developed by researchers at the Eye Clinic of the University Hospital Bonn, Stanford University and University of Utah, enables the precise assessment of the progression of geographic atrophy (GA), a disease of the light sensitive retina caused by age-related macular degeneration (AMD).

Classifying galaxies with artificial intelligence
Astronomers have applied artificial intelligence (AI) to ultra-wide field-of-view images of the distant Universe captured by the Subaru Telescope, and have achieved a very high accuracy for finding and classifying spiral galaxies in those images.

Read More: Artificial Intelligence News and Artificial Intelligence Current Events
Brightsurf.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.