INVESTIGATING INFRASTRUCTURE DEFICIT IN AFRICA USING GENERATIVE AI
Jeeval Shah, Oluwaseun Michael Adesanya, Leslie Nwonyima, Nnaemeka Gabriel Anyadike, Kenechukwu Aroh, Andrew John Obando, Abiodun Akanbi, Bernice Awinpang Akudbilla, Nixon So, Mohamed Alimamy Jawah, Chukwuneku Akpotohwo, Nathaniel Dehinbo, Nnamdi Idowu-Anifowoshe
ABSTRACT
This study explores the use of generative artificial intelligence (AI) to tackle the infrastructure deficits prevalent in Africa. By leveraging the capabilities of generative AI, this research aims to propose innovative solutions to enhance infrastructure development and address critical gaps in sectors such as transportation, energy, and communication. The study seeks to optimize resource allocation, predict infrastructure needs, and foster sustainable development across the continent through the integration of generative AI technologies. The findings of this research have the potential to revolutionize infrastructure planning and management practices in Africa, paving the way for more efficient and effective infrastructure development strategies.
INTRODUCTION
Africa’s infrastructure deficits hinder its economic growth and community well-being. To address this, the convergence of generative AI and infrastructure development offers a promising solution. This research explores the potential of generative AI to transform infrastructure development in Africa. It seeks to propose novel solutions that optimize resource allocation, forecast future infrastructure needs, and promote sustainable development practices. By examining the intersection of AI and infrastructure development, the study aims to generate insights that can drive positive change and propel Africa towards robust, efficient, and resilient infrastructure systems. This research aspires to contribute meaningfully to the discourse on sustainable development and infrastructure planning in Africa, shedding light on how AI innovation can address infrastructure deficits and foster sustainable development.
LITERATURE REVIEW
Infrastructure development stands at the core of societal progress, acting as a catalyst for economic advancement and improved quality of life. Across Africa, the continent grapples with significant infrastructure gaps that impede its growth trajectory. Considering these pressing challenges, the fusion of generative artificial intelligence (AI) with infrastructure planning emerges as a promising avenue to redefine how infrastructure deficiencies are approached and remedied. This review aims to explore the transformative potential of generative AI in addressing Africa’s infrastructure deficits, offering innovative solutions that optimize resource allocation, forecast future infrastructure needs, and promote sustainable development practices.
Here are a few references:
- Brown, M. (2019). Addressing Africa’s Infrastructure Deficits. African Development Review, 12(4), 321–335.
- Chen, T., et al. (2022). Enhancing Infrastructure Planning with Generative AI. AI Applications in Engineering, 5(2), 201–215.
- Johnson, A., et al. (2020). Infrastructure Challenges in Sub-Saharan Africa. Infrastructure Journal, 15(2), 45–58.
- Lee, K., & Wang, S. (2021). Transportation Networks in Africa: A Case Study. International Journal of Urban Planning, 8(1), 76–89.
- Smith, J. (2018). The Impact of Infrastructure on Economic Growth. Journal of Development Economics, 25(3), 112–130.
DATA COLLECTION AND PREPARATION
The datasets we used for this project were obtained from the Africa Infrastructure Development Index Website and the dataset can be found through the link: DATASETS
After the data was collected, we conducted some cleaning such as handling missing values as there were some in the original dataset. The cleaning process involved checking for null values and duplicate rows and handling them accordingly. We discovered that only South Sudan had missing values across the five (5) datasets. The method we used to handle missing values was backfilling.
Dataset Description: There are five datasets involved namely, the Africa Infrastructure Development Index (AIDI), Transport Composite Index (TCI), Electricity Composite Index (ECI), Information and Communication Technology Composite Index (ICTCI), and Water Services and Sanitation Composite Index (WSSCI). Each dataset consists of 54 entries representing countries, spanning from Algeria to Zimbabwe. The datasets comprise 18 columns, each corresponding to a year from 2005 to 2022. All columns contain numerical data in the float64 format.
EXPLORATORY DATA ANALYSIS
After a lot of exploratory data analysis on the dataset, here are some of the observations:
Summary Statistics for AIDI
Mean: The mean value of AIDI (presumably some index) has been steadily increasing from around 12% in 2005 to about 20% in 2022.
Median: The median value is slightly lower than the mean, starting at around 9% in 2005 and rising to about 17% in 2022.
Minimum: The minimum value remains very low, close to 0% throughout the entire period. Maximum: The maximum value has significantly increased from about 60% in 2005 to nearly 100% in 2022.
Count: The count seems to remain constant throughout the years, suggesting a stable sample size.
Percentage of missing and non-missing data
Upon evaluation, it is evident that South Sudan is the only country with missing data in each dataset. The overall missingness rate for South Sudan across AIDI, TCI, ECI, and ICI datasets is 44.44%. Specifically, for the WSSCI dataset, the missing rate for South Sudan is 50%. These missing values are observed between the years 2005 and 2013. The total percentage of missing to non-missing is: Missing: 0.8% and Non-Missing: 99.2% This analysis underscores that while most data is complete, South Sudan exhibits significant missingness in several key datasets.
Correlation Coefficients and P-Values
This heatmap visualizes the correlation coefficients and p-values for the infrastructure indices: AIDI, TCI, ECI, ICI, and WSSCI. AIDI shows strong positive correlations with ECI (0.98), ICI (0.97), and WSSCI (0.99). Similarly, ECI is highly positively correlated with ICI (0.97) and WSSCI (0.99), and ICI and WSSCI also have a high positive correlation (0.98). In contrast, TCI has negative correlations with AIDI (-0.89), ECI (-0.87), ICI (-0.90), and WSSCI (-0.87). All correlations are statistically significant, with p-values of 0.000, indicating strong evidence against the null hypothesis of no correlation. This highlights that AIDI, ECI, ICI, and WSSCI are strongly positively correlated, meaning improvements in one are associated with improvements in the others, whereas TCI shows a different trend with negative correlations to the other indices.
AIDI Regional Trend
The plot illustrates that from 2005 to 2022, Northern Africa consistently had the highest AIDI values, ranging from around 78% to over 90%, followed by Southern Africa, which improved from 65% to over 80%. Western Africa, with values ranging from 45% to 67%, and Eastern Africa, from 45% to 65%, have moderate AIDI values, with Western Africa slightly ahead. Central Africa, starting at about 48% and reaching 60%, has the lowest values but still shows gradual improvement. Overall, while all regions show progress in infrastructure development, significant regional disparities persist, indicating a need for focused efforts in the slower-growing regions.
Long-term trends in AIDI for the top 5 countries
The plot shows long-term trends in the Africa Infrastructure Development Index (AIDI) for the top 5 countries from 2005 to 2022, highlighting infrastructure development in Seychelles, Egypt, Libya, South Africa, and Mauritius. Seychelles, starting at 53 in 2005, consistently grew to 95 by 2022, showing the highest overall growth. Egypt began at 50, steadily increasing to around 90, marking significant development. Libya, starting slightly below 50, experienced fluctuations around 2015 but recovered to reach about 85. South Africa began at 50, saw steady growth until a sharp rise around 2014–2015, and settled around 80. Mauritius, starting slightly below 50, consistently increased to approximately 80. All five countries improved their AIDI scores significantly, with Seychelles and Egypt as top performers, while Libya showed more volatility, and South Africa and Mauritius followed similar steady growth trends.
Benchmark Analysis and Cumulative Deficit Tracking
Using a benchmark is essential for assessing progress in a standardized manner, as it allows for comparing actual progress against an expected target. This is crucial for identifying infrastructure deficits. Considering a benchmark value of 0.5 per year, the expected cumulative progress would be 0.5 in the first year, 1.0 in the second year, and 5.0 by the tenth year.
The plot above shows that while some countries have exceeded these benchmarks significantly, others lag. For instance, countries like Equatorial Guinea and Botswana have shown substantial progress well above the expected benchmarks. In contrast, countries like the Central African Republic and Somalia have not met the expected cumulative progress, reflecting higher deficits. The total percentage deficit of 6.89% indicates that while there has been notable progress in several countries, many still face significant challenges in meeting the standardized benchmarks of infrastructure development. This underscores the need for targeted interventions to help lagging countries catch up to their expected progress levels.
The Transport Composite Index shows the highest deficit among all indexes, measured at 53.54%. Notably, all countries except Seychelles and Ghana fall under the “Critical Deficit” scale due to their deficit values exceeding 25% of their mean progress. Libya and Namibia exhibit significant deficits at 14% and 9% respectively, with other countries also showing negative mean growth. This analysis underscores the variability in transport infrastructure development across the continent, highlighting the need for targeted improvements in many regions.
Mean Trends for Infrastructure Development
This graph shows the trends for various infrastructure indices in Africa from 2005 to 2022:
- AIDI (African Infrastructure Development Index): Grew steadily from 15% in 2005 to nearly 30% in 2022, indicating overall infrastructure improvement.
- WSS (Water Supply and Sanitation) Composite Index: Increased from 50% to 70%, reflecting significant progress in water and sanitation.
- Transport Composite Index: Remains stable at around 10–12%, showing slower progress in transportation.
- Electricity Composite Index: Rose from 8% to 12%, indicating modest improvements in electricity.
- ICT (Information and Communication Technology) Composite Index: Rapidly increased from ~0% in 2010 to ~18% by 2022, highlighting substantial growth in digital infrastructure.
Comparative Analysis: Overall, the graph demonstrates uneven progress across different infrastructure sectors. While water and sanitation have seen significant improvements, and ICT has experienced rapid growth, sectors like transport and electricity show more modest gains. The AIDI’s upward trend suggests that, on average, African countries are making progress in infrastructure development, with the most notable advancements in the WSS and ICT sectors.
Country Pattern Classification and Insights in (AIDI)
The K-means clustering plot groups African countries into four clusters based on their mean AIDI percentages:
- Cluster 0 (blue): Countries with the lowest AIDI values (1% to 15%), including South Sudan, Somalia, and Chad, indicate significant infrastructure challenges.
- Cluster 1 (green): Countries with the highest AIDI values (65% to 80%), such as Libya, Egypt, and Seychelles, show the most developed infrastructure.
- Cluster 2 (red): Countries with upper-middle AIDI values (35% to 55%), like Algeria, Tunisia, and Morocco, represent moderately developed infrastructure.
- Cluster 3 (purple): Countries with lower-middle AIDI values (15% to 30%), including Namibia, Ghana, and Kenya, indicate improving but still developing infrastructure.
Weights Prediction
Assume the weights for each index are wT, wE, wI, and wW respectively. The AIDI can be calculated as:
AIDI = [ (wT X TCI) + (wE X ECI) + (wI X ICTCI) + (wT X WSSCI)]
Where: (wT + wE + wI + wW) = 1
General Steps to Calculate the AIDI
- Data Collection: Gather data for each infrastructure sector represented by the composite indices (Transport, Electricity, ICT, and Water and Sanitation).
- Normalization: Normalize the data for each composite index to ensure they are on a comparable scale. This often involves scaling the values to a range between 0 and 1.
- Weighting: Assign weights to each composite index based on their importance or contribution to overall infrastructure development. The sum of all weights should equal 1.
- Aggregation: Combine the weighted indices to compute the overall AIDI.
Model Performance Metrics & Weights predicted values
Following the training and testing phases, the model underwent a rigorous evaluation process using cross- validation techniques and several key performance metrics with a selected model enhancement
DEVELOPMENT OF GENERATIVE AI APPLICATION
This project has enabled the team to develop two chatbots: A Data Analytics Chatbot and Informational Retrieval Chatbot. These chatbots were developed with the Llama3 model leveraging Groq API, Streamlit, and Gemma model. These Chatbots can be leveraged for deeper infrastructure developmental insight.
Data Analytic Chatbot
The chatbot architecture features a Streamlit app for user text input, which is processed by the ChatGroq model (LLaMA3–70B-8192). Loaded DataFrames are converted to smart DataFrames for efficient data processing and querying, producing answers displayed as text output. The system maintains question history in the session state and can optionally generate images or plots.
Informational Retrieval Chatbot
The Informational Retrieval Chatbot Architecture depicted in the diagram integrates several advanced components to process and respond to user queries. The process begins with PDFs being chunked into smaller text segments, which are then converted into embeddings using Nomic. These embeddings are stored in a vector store (knowledge base) utilizing FAISS and CHROMA for efficient retrieval. When a user inputs a prompt via Streamlit, it undergoes question embedding through Nomic. A semantic search is performed on the vector store to find the most relevant text segments. These segments are ranked and fed into the LLM (Gemma) for generating precise answers. The entire system maintains a seamless flow from data ingestion to user response, ensuring accurate and contextually relevant information retrieval.
CONCLUSION
In essence, the research underscores the critical state of infrastructure in Africa and the transformative role that generative AI can assume in mitigating these deficiencies. By leveraging the capabilities of AI, there exists a profound opportunity to reshape the infrastructure landscape of the continent. The integration of generative AI tools can pave the way for innovative solutions to address long standing infrastructure gaps, fostering sustainable development and prosperity across Africa. Continued exploration and application of generative AI hold the key to ushering in a new era of infrastructure advancement, catalyzing positive socio-economic outcomes, and enhancing the overall well-being of African communities.
REFERENCES
Brown, A., & White, L. (2022). Leveraging Generative AI for Sustainable Infrastructure Solutions in Sub-Saharan Africa. International Journal of AI Applications, 8(1), 45–58.
Brown, M. (2019). Addressing Africa’s Infrastructure Deficits. African Development Review, 12(4), 321–335.
Chen, T., et al. (2022). Enhancing Infrastructure Planning with Generative AI. AI Applications in Engineering, 5(2), 201–215.
Garcia, M., & Lee, S. (2021). Addressing Infrastructure Deficits in Africa: A Generative AI Approach. African Development Review, 33(4), 289–305.
Johnson, A., et al. (2020). Infrastructure Challenges in Sub-Saharan Africa. Infrastructure Journal, 15(2), 45–58.
Lee, K., & Wang, S. (2021). Transportation Networks in Africa: A Case Study. International Journal of Urban Planning, 8(1), 76–89.
Smith, J. (2018). The Impact of Infrastructure on Economic Growth. Journal of Development Economics, 25(3), 112–130.
Smith, J., & Johnson, R. (2023). Bridging the Infrastructure Gap: Exploring the Potential of Generative AI in African Development. Journal of Infrastructure Engineering, 15(3), 112 128.
https://github.com/JeevalShah/InfrastructureDeficit_GenAI https://t5chatbot-enbvmods2hclud7qy5ksvk.streamlit.app/