On the Costs and Benefits of Adopting Lifelong Learning for Software Analytics - Empirical Study on Brown Build and Risk Prediction

Doriane Olewicki, Sarra Habchi, Mathieu Nayrolles, Mojtaba Faramarzi, Sarath Chandar, Bram Adams

TL;DR

This paper investigates Lifelong Learning (LL) for software analytics tools, demonstrating it can match or outperform traditional retraining-from-scratch (RFS) methods while significantly reducing computational costs and data requirements. The study shows LL's potential to address concept drift in industrial settings by continuously updating models without forgetting past knowledge.

What Problem Does This Paper Address?

Software analytics tools, like those used for predicting code change risks or build failures, are increasingly common. However, these models degrade over time due to "concept drift" – changes in project goals, developer habits, or data distributions. The standard industry practice to combat this is retraining models from scratch (RFS) on updated datasets. This is computationally expensive, time-consuming, and discards valuable knowledge from previous models. While online learning approaches exist, they haven't been widely adopted in industrial environments. This paper aims to bridge this gap by empirically evaluating Lifelong Learning (LL) in an industrial context, specifically at Ubisoft, to assess its performance and cost-effectiveness compared to RFS.

Methods

The core of the paper's methodology is the application and evaluation of a Lifelong Learning (LL) setup for software analytics. The LL approach uses a single incremental learning model (a Neural Network) that is continuously updated with new data. To mitigate "catastrophic forgetting" (where the model forgets previously learned information), they incorporate a "replay buffer" that stores a sample of older data points. This replay buffer allows the model to retain knowledge from past data without needing to store the entire historical dataset. The LL setup is compared against various Retraining-From-Scratch (RFS) baselines, including industry-standard XGBoost models and a baseline MLP trained with RFS. The evaluation focuses on both predictive performance (F1-score, G-mean) and computational efficiency (training time, data usage).

Datasets

The study utilizes datasets from four projects for brown build detection and four projects for just-in-time (JIT) risk prediction. These datasets are sourced from Ubisoft, the industrial partner, with one additional open-source project (Brown_OSS) for brown build detection. The data spans periods of 1.5 to 9 years and consists of build logs and version control metadata. The projects were chosen for their consistent build job activity and varying characteristics (languages, number of jobs, failure rates).

Key Insights and Ideas

  • LL as a viable industrial solution: The study provides strong empirical evidence that LL can be a practical and effective alternative to RFS in industrial software analytics.
  • Mitigating catastrophic forgetting: The replay buffer is shown to be beneficial, significantly improving performance in some cases, though not always essential for good results.
  • Computational efficiency is key: The most compelling benefit of LL is its drastically reduced computational cost and data requirement per update, making frequent model updates feasible.
  • Continuity in model interpretation: LL models, by updating incrementally, exhibit more stable feature importance over time compared to RFS, potentially reducing the cognitive load on developers interpreting model predictions.

Key Results

  • Performance: The LL setup matched or outperformed RFS baselines in most studied projects. Specifically, it achieved significantly higher F1-scores (9-31% improvement) in 6 out of 8 projects for brown build detection and performed comparably or better than the industrial partner's RFS model for JIT risk prediction.
  • Data Efficiency: LL updates required 3.3-13.7 times less data on average compared to RFS setups.
  • Computational Effort: The overall computational effort for maintaining LL setups was found to be 2-40 times less expensive than RFS.
  • Replay Buffer Impact: Using a replay buffer significantly improved F1-scores by 4-26% in 3 out of 8 projects, while showing no significant change in others.

Limitations and Future Work

  • Feature Selection: For brown build detection, feature selection was only performed at the initialization step. Future work could explore dynamically adapting feature sets over time, perhaps by using flexibly-sized MLP models.
  • Labeling Delay: The study acknowledges that the delay between a prediction and the availability of its true label (especially for JIT risk prediction) was not explicitly modeled. However, they suggest that the frequent updates in LL might mitigate this issue.
  • Generalizability: While the study uses multiple projects and two distinct use cases, further validation on more projects and analytics tasks would strengthen the generalizability of the findings.
  • Bagging Approach: The paper mentions that incorporating an online bagging approach could further improve LL performance but would also increase computational effort. Future research could explore this trade-off.
  • Model Interpretation Stability: While LL showed more stable feature importance, further investigation into whether this stability is "correct" or if LL misses crucial changes is suggested.

Summary updated

BibTeX
@inproceedings{olewicki2024costs,
  author = {Doriane Olewicki and Sarra Habchi and Mathieu Nayrolles and Mojtaba Faramarzi and Sarath Chandar and Bram Adams},
  title = {{On the Costs and Benefits of Adopting Lifelong Learning for Software Analytics - Empirical Study on Brown Build and Risk Prediction}},
  booktitle = {ICSE-SEIP},
  year = {2024},
  doi = {10.1145/3639477.3639717},
}
Figure