Abstract Social coding platforms, such as GitHub, can serve as natural laboratories for studying the diffusion of innovation through tracking the pattern of code adoption by programmers. This paper focuses on the problem of predicting the popularity of software repositories over time; our aim is to forecast the time series of popularity-related events (code forks and watches). In particular, we are interested in cross-repository patterns—how do events on one repository affect other repositories? Our proposed LSTM (Long Short-Term Memory) recurrent neural network integrates events across multiple active repositories, outperforming a standard ARIMA (Auto Regressive Integrated Moving Average) time series prediction based on the single repository. The ability of the LSTM to leverage cross-repository information gives it a significant edge over standard time series forecasting.
Introduction
Predicting which software projects will "go viral" or sustain growth is a major challenge for developers, investors, and researchers studying the diffusion of innovation. Traditionally, popularity prediction on platforms like GitHub has been treated as a localized problem: if you want to know how many "stars" or "forks" a repository will get tomorrow, you look at its own historical data.
However, GitHub functions as a social network rather than a collection of isolated silos. Projects often share contributors, dependencies, and user bases. Traditional statistical models, like ARIMA, often fail because they ignore these interdependencies. This research addresses the challenge of integrating activity data from multiple active repositories simultaneously to better forecast future demand for specific projects.
Methodology: Leveraging Cross-Repository Patterns
The core of the proposed approach is a Long Short-Term Memory (LSTM) recurrent neural network. LSTMs are specifically designed to capture long-term dependencies in sequential data, making them ideal for time-series forecasting where past events have a lingering influence on the future.
The key innovation is the cross-repository feature set. Instead of feeding the model data from just one repository, the researchers structured the input to include both local activity and relational context:
- $n_t$: The number of events (forks or watches) for a repository at a given time step.
- $c_t$: An impacting factor or component ID representing the relationship between repositories, allowing the model to recognize when different projects belong to the same functional ecosystem.
This approach was compared against a baseline ARIMA (Auto-Regressive Integrated Moving Average) model, the industry standard for univariate time-series forecasting, which lacks the ability to process external "cross-talk" between different data streams.
Dataset and Scope
The study utilized public GitHub events and repository profiles from January 2015 through June 2017.
- Event Types: The focus was on Forks (cloning a repo) and Watches (subscribing to notifications), as these are the strongest indicators of active interest.
- Scope: The researchers sampled the 100 most active repositories based on fork and watch counts.
- Granularity: Data was aggregated into 10-day time steps, creating a sequence of activity levels over the 30-month period.
Key Results and Performance
The LSTM model with cross-repository information significantly outperformed the traditional ARIMA baseline. The LSTM achieved a total average Root Mean Square Error (RMSE) of 312.07, compared to 401.35 for the ARIMA model.
Qualitative analysis revealed that the LSTM was much better at predicting high-activity bursts. While ARIMA tended to under-predict activity for popular repositories by reverting to the mean, the LSTM’s ability to leverage features from the wider network allowed it to anticipate surges more accurately.
The researchers also found that a "loop back" (memory window) of 8 time steps (80 days) provided the optimal balance for the LSTM. This suggests that the momentum of a software project has a measurable memory of approximately three months.
Conclusion and Future Work
The "Ecosystem Effect" is a critical factor in software popularity. By demonstrating that "transfer entropy" exists between repositories—where a spike in one project provides predictive value for another—this research highlights the limitations of siloed forecasting.
Future work will aim to combine multiple event types (stars, commits, pull requests) into a single, multi-dimensional model. Additionally, the authors suggest that explicitly calculating transfer entropy between specific pairs of repositories could further refine the model’s predictive edge. Expanding the scope beyond the top 100 repositories will also determine if these cross-repository patterns remain as influential in smaller, niche communities.
Summary updated