Artificial Intelligence and the Environment
M2 MVA · Semester 2 · Opening · 2.5 ECTS
Contents
- Introduction and overview
- 0. Review: energy, uncertainty and time-series basics
- 1. Environmental impacts of AI and life cycle assessment
- 2. Measuring the footprint of an AI system
- 3. Climate and environmental data
- 4. Machine learning on infrasound data in polar regions
- 5. Sensor and IoT time series: preparation, segmentation, anomalies, prediction
- 6. AI for a smaller footprint: overview and the water cycle
- 7. Complements: sensitivity, EOFs, exact segmentation, quantiles and decisions
- 8. Research directions and open problems
- Exercises
- Projects and assessment
- References
Introduction and overview
| Module | Artificial Intelligence and the Environment |
| Official title | Intelligence Artificielle et Environnement |
| Instructors | A-L. LIGOZAT, G. FAY (master-mva.com, 2026–2027) |
| Period | Semester 2 · period 2 (04/01/2027 – 02/04/2027) |
| Credits and volume | 2.5 ECTS · 18 h (lectures 9 h, labs 9 h) per the Université Paris-Saclay programme table |
| Label | Opening |
| Language | English (Université Paris-Saclay course detail: language of instruction English, no distance teaching); the master-mva.com description is written in French |
| Assessment | 50 % continuous assessment (the lab part) and 50 % for the mini-project grade or a critical reading of a paper (written report) (master-mva.com, “Mode de validation”); non-integral continuous assessment, “Evaluation Continue non Intégrale” (Université Paris-Saclay course detail) |
| Prerequisites | notions of modelling and of machine learning and/or deep learning; Python programming with the numpy, pandas, scikit-learn and pytorch or tensorflow libraries (master-mva.com and Université Paris-Saclay course detail) |
Audience: a student with a good M1 in mathematics, computer science or physics who can train a model in Python and wants to put numbers, with their uncertainty, on the environmental side of machine learning.
Empirical first: the final training of the 176-billion-parameter language model BLOOM used about 433 MWh of electricity. On the low-carbon French grid this is about 25 tonnes of CO₂-equivalent, but the estimate doubles to about 50 tonnes once the idle power of the cluster and the manufacturing of the hardware are counted (Luccioni, Viguier and Ligozat, 2023; ch. 2). Where the factor of two comes from, and what the same run would emit elsewhere, is the first question of this course.
The course links machine learning to climate change and to the impact of human activity on the environment, from three angles. First, the footprint of AI itself: life cycle assessment, energy measurement, the carbon footprint of a digital service (ch. 1–2). Second, AI to observe the Earth: climate records, reanalyses, simulations and infrasound arrays (ch. 3–4). Third, AI to use resources better, through sensor time series and the water cycle (ch. 5–6).
As listed on master-mva.com, lecture 1 is given by Anne-Laure Ligozat (ENSIIE), lecture 2 by Sentia Oger and lecture 3 by Gilles Faÿ (CentraleSupélec); the number of places is limited to 35. Related MVA pages: Machine Learning for Time Series, Statistical Learning for Scientific Imaging and Physical Measurements: Geosciences, Training and Deploying Large-Scale Models and Remote Sensing Data.
What you will be able to do
- Distinguish the direct, indirect and systemic environmental effects of an AI system, and name the impact categories beyond carbon: water, abiotic resources, energy.
- Set up a life cycle assessment with a functional unit and system boundaries, and compute its inventory by the matrix method.
- Explain when an attributional or a consequential assessment answers the question asked, and compute average and marginal footprints.
- Measure or model the electricity of a training run or an inference service, and turn it into a carbon footprint with PUE, carbon intensity and embodied emissions.
- Propagate the uncertainty of a footprint estimate and rank its sources.
- Compute area-weighted climate averages, anomalies and trends with autocorrelated noise.
- Estimate the direction and speed of an infrasound wave from an array, and classify detections without leakage.
- Prepare raw sensor series, segment them exactly, and detect anomalies with robust statistics and CUSUM.
- Build and evaluate forecasts against seasonal baselines, from rating curves and rainfall–runoff models to demand.
- Weigh the savings of an AI application against its own footprint, category by category.
Official objectives and syllabus (2026–2027)
The course description on master-mva.com, repeated in the Université Paris-Saclay course detail, sets the objective of linking the technology that is transforming every science and every sector, artificial intelligence, to two major stakes for humanity: climate change and the impact of human activity on the environment.
It announces three complementary subjects: the impact of AI itself on the environment, the use of AI to measure these impacts, and its use to actively reduce the effects of humans on the planet. The course is organised as three lectures of 3 h and three labs of 3 h, each lecture followed by its lab.
| Official topic (master-mva.com and Université Paris-Saclay, 2026–2027) | Course section |
|---|---|
| Objective: link AI to climate change and to the impact of human activity on the environment | the whole page; overview in this introduction |
| Objective: the impact of AI itself on the environment | ch. 1 (impacts, life cycle assessment) and ch. 2 (measurement) |
| Objective: how to use AI to measure these impacts | ch. 3 (climate data), ch. 4 (infrasound), ch. 5 (sensor time series) |
| Objective: actively reduce the effects of humans on the planet | ch. 6 (overview, water cycle, net balance), ch. 7.7 (decisions) |
| Organisation: 3 lectures of 3 h and 3 labs of 3 h | the session plan |
| Lecture 1 (A.-L. Ligozat): environmental impacts of artificial intelligence | ch. 1 |
| Lecture 1: impacts due to the life cycle of the digital equipment (carbon footprint, water consumption, resource depletion) | ch. 1.1 (Definitions 1.1–1.2, depletion factors), ch. 1.2 (Theorem 1.4, Proposition 1.6), ch. 2.2 (water) |
| Lecture 1: impacts due to the use of these models in other sectors | ch. 1.1 (indirect effects), ch. 1.4 (rebound, Proposition 1.8) |
| Lecture 1: the types of impacts resulting from the use of such models | ch. 1.1 (orders of effects, impact categories) |
| Lecture 1: methods and tools to measure and qualify these impacts | ch. 1.2 (life cycle assessment), ch. 2.1–2.2 (power models, measurement tools, PUE, carbon intensity), ch. 7.1 |
| Lecture 1: trade-offs between environmental and societal costs and benefits | ch. 1.4, ch. 2.5 (accuracy–energy Pareto front), ch. 6.4 (net balance) |
| Lab 1: case study, environmental assessment of an AI system | ch. 2, lab sheet of ch. 2.6 |
| Lecture 2 (S. Oger): exploiting climate and environmental data; improving climate projections and predictions for adaptation | ch. 3.1 (Definition 3.1) |
| Lecture 2: meteorological and environmental observations (stations, buoys), some from the end of the 19th century, not covering the whole planet | ch. 3.1, ch. 3.2 (area weighting) |
| Lecture 2: satellite data since the 1970s | ch. 3.1 |
| Lecture 2: climate simulations | ch. 3.1 (ensembles, reanalyses), ch. 3.4 (emulators) |
| Lecture 2: the freely available machine-learning toolbox, to investigate natural processes | ch. 3.3–3.4 (anomalies, trends, uses of ML), ch. 7.3 (EOFs) and the Python blocks |
| Lab 2: machine-learning algorithms applied to infrasound data in a polar region | ch. 4 |
| Lecture 3 (G. Faÿ): sensor and Internet-of-Things data for an optimised use of resources | ch. 5.1 |
| Lecture 3: drinking water, energy, transport and waste production measured by communicating sensors | ch. 5.1, ch. 5.3 (night flow), ch. 6.1 |
| Lecture 3: structured or unstructured data, with priority to time series | ch. 5.1 (Definition 5.1), ch. 5.2–5.4 |
| Université Paris-Saclay, lecture 3: overview of machine-learning approaches that reduce our environmental footprint | ch. 6.1 |
| Lab 3: case study, sensor data exploited by AI techniques (large water cycle) | ch. 6.2–6.4 |
| Université Paris-Saclay: specific teaching arrangements, Opening module | the fiche (label) and this introduction |
| Theme: direct and indirect environmental impacts | ch. 1.1 |
| Theme: attributional and consequential life cycle assessment | ch. 1.3 |
| Theme: carbon footprint of a digital service | ch. 2.4 (Definition 2.5, Proposition 2.6, Example 2.7) |
| Theme: electricity consumption of digital equipment | ch. 2.1–2.2, ch. 7.1 |
| Theme: preparation and analysis of time series | ch. 0.4, ch. 5.1 |
| Theme: segmentation | ch. 5.2, ch. 7.4 |
| Theme: anomaly detection | ch. 5.3, ch. 6.3 (sensor validation), ch. 7.5 |
| Theme: predictions | ch. 5.4, ch. 6.3, ch. 7.6 |
| “Les intervenants” (the speakers) | this introduction |
| Places limited to 35 | this introduction |
| Assessment: 50 % labs, 50 % mini-project or critical reading of a paper | the fiche and Projects and assessment |
Every official topic is taught on this page. Its extensions beyond the syllabus are the review chapter 0, the matrix form of life cycle assessment and the rebound model, array processing for infrasound, exact change-point algorithms, rating curves and rainfall–runoff models, the complements of ch. 7 (sensitivity indices, EOFs, PELT, CUSUM optimality, conformal quantiles, cost–loss decisions) and the research chapter 8.
Where this course fits in the programme
Official prerequisites: notions of modelling and of machine learning and/or deep learning, and Python programming with numpy, pandas, scikit-learn and pytorch or tensorflow. It is an Opening course of semester 2, period 2, with 2.5 ECTS and 18 h.
- Preparation — the refreshers Probability and Statistics (variance, estimation), Linear Algebra, Analysis and Optimization (least squares, the SVD) and Scientific Python, NumPy and PyTorch (every code block).
- Semester 1 courses that prepare it — Machine Learning for Time Series (ch. 5), Statistical Learning for Scientific Imaging and Physical Measurements: Geosciences (ch. 3–4), Introduction to Statistical Learning, Statistical Learning with Extreme Values (floods and heat waves), Fundamentals of Reproducible Research and Free Software and the Turing Seminar (societal costs and benefits).
- Related courses of semester 2 — Training and Deploying Large-Scale Models (the compute behind ch. 2), Remote Sensing Data (satellites, ch. 3), Learning Physical Phenomena: Metamodelling and Uncertainty Quantification (emulators, sensitivity indices), Audio Signal Processing: Time–Frequency Analysis (spectra, ch. 4), Interactions: Complexity, Stochasticity, Extrema and Rare Events, Regulating AI and Responsible Machine Learning.
- Afterwards — an environmental topic, in a laboratory or a utility, is a natural Research Internship.
Course outline
- Review: energy, uncertainty and time-series basics — units of power and energy, products of uncertain factors, least squares, autocorrelation, honest validation (self-study).
- Environmental impacts of AI and life cycle assessment — orders of effects, impact categories, the ISO life cycle method in matrix form, attributional against consequential, rebound.
- Measuring the footprint of an AI system — power models and meters, PUE and carbon intensity, embodied emissions, training against inference, digital services, uncertainty and trade-offs.
- Climate and environmental data — observations, satellites, simulations and reanalyses; averages on the sphere, anomalies, trends; the uses of machine learning.
- Machine learning on infrasound data in polar regions — spectra, array processing for direction and speed, classification of detections without leakage.
- Sensor and IoT time series — preparing meter data, exact segmentation, robust and sequential anomaly detection, forecasting and its evaluation.
- AI for a smaller footprint: overview and the water cycle — what machine learning does for energy, transport, water and waste; rating curves, rainfall–runoff forecasts, sensor validation, net balance.
- Complements — sampling error of power traces, Sobol indices, EOFs, PELT, the optimality of CUSUM, quantile forecasts with conformal calibration, cost–loss decisions (self-study).
- Research directions and open problems — measurement standards, indirect effects, machine-learning weather and climate models, ungauged basins, label-scarce sensing (self-study).
Session plan
18 h in class = 6 sessions of 3 h. The volume is the Université Paris-Saclay programme table (9 h of lectures, 9 h of labs); master-mva.com announces the same organisation, three lectures of 3 h and three labs of 3 h. The plan keeps the official order (lecture 1, lab 1, lecture 2, lab 2, lecture 3, lab 3); the split of the chapters between sessions is a proposal.
Level 1 = foundations (definitions, orders of magnitude, first computations), 2 = core methods, 3 = case study close to research; the level never decreases.
| Session | Hours | Level | Content | Practice |
|---|---|---|---|---|
| 1 | 3 h | 1 | ch. 1 Lecture 1, environmental impacts of AI: orders of effects, impact categories, life cycle assessment in matrix form, embodied share, attributional against consequential, rebound | Ex. 2, 3, 9, 10 |
| 2 | 3 h | 2 | ch. 2 Lab 1, environmental assessment of an AI system: power and its measurement, PUE and carbon intensity, BLOOM, training against inference, digital services, uncertainty, Pareto front | Ex. 1, 4, 15; lab sheet of ch. 2.6 |
| 3 | 3 h | 2 | ch. 3 Lecture 2, climate and environmental data: sources, area-weighted means, anomalies and trends with AR(1) noise, uses of machine learning | Ex. 5, 11 |
| 4 | 3 h | 2 | ch. 4 Lab 2, infrasound in polar regions: Welch spectra, delays and slowness, closure, classification with grouped validation | Ex. 12, 13 |
| 5 | 3 h | 2 | ch. 5 Lecture 3, sensor time series: preparation, segmentation, anomalies, forecasting; ch. 6.1 overview of machine learning for a smaller footprint | Ex. 6, 7, 14 |
| 6 | 3 h | 3 | ch. 6.2–6.4 Lab 3, the large water cycle: rating curves, rainfall–runoff forecasts, sensor validation, net balance | Ex. 8, 17 |
Self-study, outside the 18 h (about 8 h in total): ch. 0 Review: energy, uncertainty and time-series basics, before session 1 (≈ 2 h) · ch. 7 Complements, section by section after the session of the chapter it completes (≈ 4 h, with Ex. 16) · ch. 8 Research directions and open problems, after session 6 (≈ 2 h, with Ex. 18). The mini-project or critical reading comes on top (see Projects and assessment).
How to study this module
- Read ch. 0 before session 1: every later chapter multiplies uncertain factors, fits least squares or works with autocorrelated series.
- Read each chapter before its session. The labs (sessions 2, 4 and 6) assume the lecture before them: ch. 2 uses ch. 1, ch. 4 uses ch. 3, and ch. 6 uses ch. 5.
- Read each section of ch. 7 after the chapter it completes: 7.1–7.2 after ch. 2, 7.3 after ch. 3, 7.4–7.6 after ch. 5, 7.7 after ch. 6.
- Keep a notebook of orders of magnitude (watts of a GPU, PUE of a data centre, grams of CO₂e per kWh) with their source and uncertainty. A footprint without its assumptions is not a result.
- After each session, do the exercises of its row: ★ checks definitions, ★★ asks for a short proof or a computation.
- Run every Python block: NumPy, SciPy, pandas and scikit-learn on a CPU, fixed seeds, synthetic data, a few seconds each.
- Write each lab as a short report, as for the continuous assessment: question, method, numbers with uncertainty, one limitation.
0. Review: energy, uncertainty and time-series basics
Four M1 tools return in every chapter: physical units of power and energy (ch. 1–2, 6), products of uncertain factors (ch. 1–2), least squares with its standard errors (ch. 3–6), and autocorrelated series with honest validation (ch. 3–5). This chapter states them in the form used later. The refreshers Probability and Statistics and Linear Algebra, Analysis and Optimization give more detail.
0.1 Power, energy and carbon units
Definition 0.1 — Power, energy, carbon intensity The power P(t) drawn by a device is measured in watts (W = J/s). The energy used over [0, T] is E = \int_0^T P(t)\, dt, in joules, or in kilowatt-hours: 1\ \text{kWh} = 3.6 \times 10^6\ \text{J}.
The carbon intensity \mathrm{CI} of an electricity supply is the mass of CO₂-equivalent emitted per kWh delivered, in g CO₂e/kWh. The emissions caused by using the energy E are E \times \mathrm{CI}.
Power is a rate and energy a quantity; most errors in footprint reports come from mixing them. A GPU that draws 300 W for 24 h uses
0.3\ \text{kW} \times 24\ \text{h} = 7.2\ \text{kWh}.
At an illustrative 50 g CO₂e/kWh this is 0.36 kg CO₂e; at 400 g CO₂e/kWh it is 2.9 kg. The factor of eight between the two grids is larger than most hardware or software optimisations.
0.2 Products of uncertain factors
A footprint is almost always a product: energy × overhead × carbon intensity, or hours × power × lifetime share. Each factor is uncertain, often by tens of percent. Products are best handled on the logarithmic scale.
Proposition 0.2 — Uncertainty of a product Let C = X_1 X_2 \cdots X_k with independent positive factors.
- If each X_i is log-normal, \log X_i \sim \mathcal{N}(\mu_i, \sigma_i^2), then C is log-normal and \log C \sim \mathcal{N}\Big(\sum_i \mu_i,\ \sum_i \sigma_i^2\Big).
- For small relative errors, with \delta_i the coefficient of variation of X_i, the delta method gives \frac{\mathrm{sd}(C)}{\mathbb{E}[C]} \approx \sqrt{\delta_1^2 + \cdots + \delta_k^2}.
Proof.
- \log C = \sum_i \log X_i is a sum of independent Gaussian variables, hence Gaussian, with the sum of the means and the sum of the variances.
- Write X_i = m_i(1 + \varepsilon_i) with \mathbb{E}\varepsilon_i = 0 and \mathrm{Var}\,\varepsilon_i = \delta_i^2.
- To first order, C \approx \prod_i m_i \,(1 + \sum_i \varepsilon_i), whose relative variance is \sum_i \delta_i^2 by independence. ∎
The share of factor i in the variance of \log C is \sigma_i^2 / \sum_j \sigma_j^2. This ranks the assumptions worth checking first; ch. 2.5 uses it on a training run.
import numpy as np
rng = np.random.default_rng(0)
n = 200_000
# energy (kWh), PUE, carbon intensity (kg/kWh): medians and log-sd
med = np.array([500.0, 1.3, 0.06])
sig = np.array([0.10, 0.08, 0.30])
logs = np.log(med) + sig * rng.standard_normal((n, 3))
C = np.exp(logs.sum(axis=1))
print(f"median {np.median(C):.1f} kg CO2e, 90% interval "
f"[{np.quantile(C, .05):.1f}, {np.quantile(C, .95):.1f}]")
print("variance shares of log C:", np.round(sig**2 / (sig**2).sum(), 3))The median is 500 \times 1.3 \times 0.06 = 39 kg CO₂e. The carbon intensity carries about 85 % of the variance of the logarithm, so it deserves the first check.
0.3 Least squares and standard errors
Theorem 0.3 — Ordinary least squares Let y = X\beta + \varepsilon with X \in \mathbb{R}^{n \times p} of rank p, \mathbb{E}\varepsilon = 0 and \mathrm{Cov}\,\varepsilon = \sigma^2 I. The least-squares estimator and its covariance are \hat\beta = (X^\top X)^{-1} X^\top y, \qquad \mathrm{Cov}(\hat\beta) = \sigma^2 (X^\top X)^{-1}. For the straight line y_t = a + b t + \varepsilon_t, t = 1, \dots, n, the slope has variance \mathrm{Var}(\hat b) = \frac{\sigma^2}{\sum_t (t - \bar t)^2} = \frac{12\, \sigma^2}{n(n^2 - 1)}.
The first formula follows from setting the gradient of \|y - X\beta\|^2 to zero. The covariance follows from \hat\beta - \beta = (X^\top X)^{-1} X^\top \varepsilon. The last equality uses \sum_{t=1}^n (t - \bar t)^2 = n(n^2 - 1)/12.
0.4 Stationarity and autocorrelation
Definition 0.4 — Weak stationarity, autocorrelation, AR(1) A series (X_t) is weakly stationary if its mean \mu is constant and \mathrm{Cov}(X_t, X_{t+h}) = \gamma(h) depends only on the lag h. Its autocorrelation function is \rho(h) = \gamma(h)/\gamma(0).
The AR(1) process is X_t = \phi X_{t-1} + \varepsilon_t with white noise \varepsilon_t of variance \sigma^2 and |\phi| < 1. Its autocorrelation is \rho(h) = \phi^{|h|}.
Proposition 0.5 — The mean of an autocorrelated series For a stationary series with summable autocovariances, n\, \mathrm{Var}(\bar X_n) \longrightarrow \sum_{h=-\infty}^{\infty} \gamma(h). For an AR(1), the right-hand side is \gamma(0)\, \frac{1 + \phi}{1 - \phi}. So n correlated values carry the information of about n_{\mathrm{eff}} = n (1 - \phi)/(1 + \phi) independent ones.
Proof.
- Expand the variance: \mathrm{Var}(\bar X_n) = n^{-2} \sum_{s, t} \gamma(t - s).
- Group by lag: this equals n^{-1} \sum_{|h| < n} (1 - |h|/n)\, \gamma(h), and dominated convergence gives the limit.
- For the AR(1), the geometric series gives \sum_h \phi^{|h|} = 1 + \frac{2\phi}{1 - \phi} = \frac{1 + \phi}{1 - \phi}. ∎
With \phi = 0.6, a hundred daily values are worth only 25 independent ones. Chapter 3 applies the same correction to climate trends.
0.5 Honest validation
Definition 0.6 — Leakage, temporal and grouped validation Leakage occurs when information from the test set reaches the training set. With time series, a random split leaks, because neighbouring times are correlated. A temporal split trains on the past and tests on the future. A grouped split keeps whole groups (a day, a site, a sensor, an event) on one side.
The rule is simple: the test set must look like the situation in which the model will be used. A flood forecaster will be used on future years, so it is tested on later years. A leak detector will be installed on new districts, so it is tested on districts it has not seen.
Key takeaways — chapter 0
- Energy is power integrated over time; emissions are energy times carbon intensity.
- Uncertain products are handled on the log scale, where variances add.
- The least-squares slope over n equally spaced times has variance 12\sigma^2 / (n(n^2 - 1)) for white noise.
- Autocorrelation shrinks the effective sample size by the factor (1 - \phi)/(1 + \phi) for an AR(1).
- Validation splits follow time, sites or events, never a random shuffle of correlated data.
1. Environmental impacts of AI and life cycle assessment
Before measuring anything, one must say what is measured: which effects, over which part of the life of the equipment, for which question. This chapter gives the vocabulary of impacts and the standard accounting method, life cycle assessment, in matrix form.
1.1 Direct and indirect effects, impact categories
Definition 1.1 — Orders of effects The environmental effects of a digital technology are classified in three orders (Hilty and Aebischer, 2015):
- first-order (direct) effects: the impacts of producing, using and disposing of the equipment — servers, accelerators, networks, terminals;
- second-order (indirect, enabling) effects: the changes caused by the applications of the technology in other sectors — optimisation, substitution, or on the contrary induced consumption;
- higher-order (systemic) effects: the structural responses of society, such as rebound effects and changes of behaviour or of the economy.
Kaack and coauthors (2022) use a parallel split for machine learning: computing-related, immediate application and system-level impacts. A model that speeds up oil exploration has a small direct footprint but a large indirect one, of the opposite sign to a model that helps integrate wind power.
Definition 1.2 — Inventory, impact categories, characterisation An inventory is a vector g \in \mathbb{R}^m of elementary flows exchanged with the environment: kilograms of CO₂, CH₄ and N₂O emitted, cubic metres of water withdrawn, kilograms of copper or cobalt extracted.
An impact category aggregates flows with characterisation factors. With Q \in \mathbb{R}^{k \times m} the matrix of factors, the impact scores are h = Q g.
For climate change the factors are global warming potentials over 100 years: 1 for CO₂, roughly 30 for methane and roughly 270 for nitrous oxide in the latest IPCC assessment. The score is then in kg CO₂-equivalent (CO₂e). Other categories used for digital equipment are water use, abiotic resource depletion (metals and minerals, in kg of antimony-equivalent), and primary energy.
For resource depletion, the CML method (Guinée, 2002) characterises an element i by its yearly extraction \mathrm{DR}_i and its ultimate reserve R_i, relative to antimony: \mathrm{ADP}_i = \frac{\mathrm{DR}_i / R_i^2}{\mathrm{DR}_{\mathrm{Sb}} / R_{\mathrm{Sb}}^2}\ \text{kg Sb-eq per kg}. Scarce metals, such as the gold of circuit boards, therefore weigh orders of magnitude more per kilogram than iron.
Reporting a single category hides burden shifting: a liquid-cooled data centre may use less electricity but more water. A complete assessment is multi-criteria.
1.2 Life cycle assessment in matrix form
Definition 1.3 — Life cycle assessment (ISO 14040 and 14044) A life cycle assessment (LCA) evaluates the impacts of a product or service over its whole life: raw material extraction, manufacturing, transport, use and end of life. It has four phases:
- goal and scope: the question, the functional unit (the service delivered, e.g. “one training run of a given model” or “one thousand answered queries”) and the system boundaries;
- inventory analysis: the flows g caused by one functional unit;
- impact assessment: the scores h = Qg;
- interpretation: sensitivity, uncertainty, conclusions within the scope.
Processes are linked by their products: a process uses electricity, itself made by a process, and so on up the supply chain. Linear algebra solves this loop exactly.
Theorem 1.4 — Matrix method of LCA (Heijungs and Suh, 2002) Consider n processes and n products.
Column j of the technology matrix A \in \mathbb{R}^{n \times n} lists the products made (positive entries) and used (negative entries) by one unit of process j.
Column j of the intervention matrix B \in \mathbb{R}^{m \times n} lists its elementary flows.
For a final demand f \in \mathbb{R}^n, if A is invertible the activity levels, the inventory and the impacts are
Key result — life cycle impacts s = A^{-1} f, \qquad g = B s, \qquad h = Q B A^{-1} f.
If A = I - M with M \geq 0 entrywise and spectral radius \rho(M) < 1, then A^{-1} = \sum_{k \geq 0} M^k \geq 0.
Proof.
- Process j run at level s_j makes the net amounts A s of every product. Balancing them with the demand gives A s = f, hence s = A^{-1} f.
- Flows scale linearly with the activity levels, so g = B s, and h = Q g by Definition 1.2.
- If \rho(M) < 1, the series \sum_k M^k converges, and (I - M) \sum_{k=0}^{K} M^k = I - M^{K+1} tends to I.
- Each M^k is nonnegative, so the sum is too. ∎
The series has a direct reading: f is the demand, Mf the inputs needed to make it, M^2 f the inputs of those inputs, and so on up the supply chain. The condition \rho(M) < 1 says that the economy is productive: making a product does not consume more of it than it delivers.
Example 1.5 — Inventory of a training run Three processes, with illustrative values of a realistic order of magnitude:
- electricity (unit: kWh), emitting \mathrm{CI} kg CO₂e and 1 L of water per kWh;
- one GPU-hour, using 0.48 kWh (400 W at a power usage effectiveness, PUE, of 1.2: the facility draws 1.2 kWh per kWh used by the IT equipment; Definition 2.2) and emitting 0.01 kg CO₂e of amortised manufacturing and 0.2 L of cooling water;
- one training run, using 1000 GPU-hours and 100 kWh for storage, CPUs and network.
Solving A s = f with f = (0, 0, 1) gives 1000 GPU-hours and 0.48 \times 1000 + 100 = 580 kWh. With \mathrm{CI} = 0.05 kg/kWh: g_{\mathrm{CO_2e}} = 0.05 \times 580 + 0.01 \times 1000 = 29 + 10 = 39\ \text{kg}. Manufacturing is 26 % of the total. With \mathrm{CI} = 0.4 kg/kWh, the total is 242 kg and manufacturing falls to 4 %.
import numpy as np
# products / processes: electricity [kWh], GPU-hour [h], training run [run]
A = np.array([[1.0, -0.48, -100.0],
[0.0, 1.0, -1000.0],
[0.0, 0.0, 1.0]])
f = np.array([0.0, 0.0, 1.0])
s = np.linalg.solve(A, f)
for ci in (0.05, 0.40):
B = np.array([[ci, 0.01, 0.0], # kg CO2e per unit of each process
[1.0, 0.20, 0.0]]) # litres of water
g = B @ s
emb = 0.01 * s[1] / g[0]
print(f"CI={ci}: activity {s}, CO2e {g[0]:.0f} kg, water {g[1]:.0f} L, "
f"embodied share {emb:.0%}")Proposition 1.6 — Embodied share of an hour of use A device with manufacturing footprint M (kg CO₂e), lifetime L hours and utilisation u is charged e_{\mathrm{emb}} = \frac{M}{u L} per hour of use under linear allocation. If it draws power P in a facility of overhead \mathrm{PUE}, its embodied share is \eta = \frac{e_{\mathrm{emb}}}{e_{\mathrm{emb}} + P \cdot \mathrm{PUE} \cdot \mathrm{CI}}, which increases to 1 as the carbon intensity \mathrm{CI} decreases to 0.
Proof. The total embodied footprint M is spread over the uL hours of actual use; the rest is the per-hour operational footprint. The function \mathrm{CI} \mapsto \eta is decreasing and equals 1 at \mathrm{CI} = 0. ∎
On a decarbonised grid, the manufacturing of the hardware becomes the main lever: longer lifetimes and higher utilisation, rather than lower power alone (Gupta and coauthors, 2021).
1.3 Attributional and consequential assessment
Definition 1.7 — Attributional and consequential LCA An attributional LCA asks what share of the global burdens belongs to the product. It uses average data (the average carbon intensity of the grid) and allocates shared impacts by rules.
A consequential LCA asks how the global burdens change in response to a decision. It uses marginal data (the plants whose output actually changes) and replaces allocation by system expansion: it includes every process affected by the decision.
The two answer different questions. Consider a grid of average intensity 60 g CO₂e/kWh whose evening demand is met at the margin by gas plants at about 450 g CO₂e/kWh (illustrative values).
- The attributional footprint of the 580 kWh of Example 1.5 is about 35 kg CO₂e.
- If the run is added in the evening, the consequential footprint is about 261 kg CO₂e.
- If the decision is long-term (building a data centre that triggers new wind farms), the marginal source may be the new capacity, and the consequential footprint can be lower than the average one.
The time horizon of the decision decides which marginal source is relevant (Ekvall and Weidema, 2004).
1.4 Rebound, trade-offs and indirect effects
Efficiency gains are the main promise of AI for the environment: less energy per trip, per tonne, per query. The rebound effect says that the saving can be partly or wholly eaten by extra demand.
Proposition 1.8 — Rebound and the Jevons condition A service is delivered with energy e per unit, at a cost proportional to e. Its demand has constant price elasticity \varepsilon > 0, so that D \propto e^{-\varepsilon}.
If an innovation lowers e to (1 - r)e with 0 < r < 1, the total energy E = De becomes E' = (1 - r)^{1 - \varepsilon} E. The rebound R, the fraction of the expected saving that is lost, is R = 1 - \frac{1 - (1 - r)^{1 - \varepsilon}}{r}. Total energy increases (backfire, R > 1) exactly when \varepsilon > 1.
Proof.
- The new demand is D' = D (1 - r)^{-\varepsilon}, so E' = D' (1 - r) e = (1 - r)^{1 - \varepsilon} E.
- The expected saving, with unchanged demand, is rE; the actual saving is E - E'. Their ratio gives 1 - R.
- Since 0 < 1 - r < 1, the factor (1 - r)^{1 - \varepsilon} exceeds 1 if and only if 1 - \varepsilon < 0. ∎
With r = 0.3 and \varepsilon = 0.5, energy falls by only 16 % instead of 30 %, a rebound of about 46 %. Jevons (1865) observed that more efficient steam engines increased coal consumption.
Weighing environmental and societal costs against benefits has no single formula, but three principles help.
- Compare with the situation without the AI system, under the same functional unit, rather than reporting the footprint alone (Ligozat and coauthors, 2022).
- Count indirect effects on both sides: avoided emissions, and induced consumption.
- Keep categories separate when they cannot be traded: a model that saves CO₂ but uses scarce water in a dry region has not simply “paid back”.
Key takeaways — chapter 1
- Effects come in three orders: direct (equipment), enabling (applications), systemic (rebound, behaviour).
- Carbon is one category among several: water, abiotic resources and energy matter for digital equipment.
- An LCA fixes a functional unit and boundaries; its inventory is g = BA^{-1}f, a sum over supply-chain tiers.
- Embodied emissions dominate when electricity is low-carbon.
- Attributional answers “what share is mine”, consequential answers “what changes if I decide”; they use average and marginal data.
- Efficiency gains backfire when demand is elastic enough (\varepsilon > 1).
2. Measuring the footprint of an AI system
Chapter 1 said what to count; this chapter says how to measure it for a training run, an inference service and a digital service, and how sure one can be of the result. It ends with the lab sheet of the first case study.
2.1 Electricity consumption of digital equipment
Definition 2.1 — Linear utilisation model of power The power of a server or an accelerator at utilisation u \in [0, 1] is modelled as P(u) = P_{\mathrm{idle}} + (P_{\max} - P_{\mathrm{idle}})\, u. The static (idle) part is drawn whenever the device is on; the dynamic part is caused by the computation.
Fan, Weber and Barroso (2007) found this model accurate for whole servers. Idle power is large: a server idling at half its peak power wastes energy whenever it waits for data.
Power is measured at three levels, from coarse to fine.
- A wattmeter at the wall plug sees a whole node, including fans and power supply losses.
- On-chip counters report component energy: RAPL for Intel processors and memory, NVML for NVIDIA GPUs. They miss the rest of the node.
- Software estimators, such as CodeCarbon, Carbontracker (Anthony, Kanding and Selvan, 2020), experiment-impact-tracker (Henderson and coauthors, 2020) and the Green Algorithms calculator (Lannelongue, Grealey and Inouye, 2021), read these counters or use catalogue power values, then apply PUE and carbon intensity.
Sampled power misses short spikes between two samples. A cumulative energy counter, as RAPL provides, integrates in hardware and avoids the problem; ch. 7.1 bounds the error of sampling.
2.2 Data-centre overhead, carbon intensity and water
Definition 2.2 — PUE and WUE The power usage effectiveness of a data centre is \mathrm{PUE} = \frac{\text{total facility energy}}{\text{IT equipment energy}} \geq 1. The excess over 1 is cooling, power conversion and lighting. The water usage effectiveness \mathrm{WUE} is the on-site water consumed per kWh of IT energy, in L/kWh.
Water is used twice: on site for evaporative cooling, and off site to cool the power plants that make the electricity (Li and coauthors, 2023). Like carbon intensity, both depend on place and season.
The operational and embodied parts combine into the footprint of a computation that runs devices for T hours at IT energy E_{\mathrm{IT}}, with e_{\mathrm{emb}} the embodied rate of Proposition 1.6:
Key result — footprint of a computation C = E_{\mathrm{IT}} \cdot \mathrm{PUE} \cdot \mathrm{CI} + \sum_{\text{devices}} e_{\mathrm{emb}}\, T.
Example 2.3 — The footprint of BLOOM Luccioni, Viguier and Ligozat (2023) estimated the footprint of the final training of BLOOM (176 billion parameters, on the French Jean Zay supercomputer, about 1.08 million GPU-hours).
- Dynamic consumption: about 433 MWh at 57 g CO₂e/kWh, that is 433\,000 \times 0.057 \approx 24.7 t CO₂e.
- Idle consumption of the infrastructure: about 14.6 t.
- Embodied emissions of servers and GPUs: about 11.2 t, which is about 0.01 kg CO₂e per GPU-hour.
The total is 24.7 + 14.6 + 11.2 \approx 50.5\ \text{t CO}_2\text{e}, twice the dynamic estimate. The same 433 MWh on a grid at 400 g CO₂e/kWh would emit about 173 t from dynamic consumption alone.
2.3 Training against inference
A model is trained once and queried many times. Luccioni, Jernite and Strubell (2024) measured inference across tasks and models. Generative tasks cost far more energy per query than classification, and image generation is the most expensive; general-purpose models cost more than task-specific ones for the same task.
Proposition 2.4 — Break-even number of queries If training costs C_{\mathrm{train}} and each query costs c_{\mathrm{inf}}, the cumulative footprint after N queries is C(N) = C_{\mathrm{train}} + N c_{\mathrm{inf}}. Inference dominates once N > N^\star = \frac{C_{\mathrm{train}}}{c_{\mathrm{inf}}}.
Proof. N c_{\mathrm{inf}} > C_{\mathrm{train}} is equivalent to N > C_{\mathrm{train}} / c_{\mathrm{inf}}. ∎
With 433 MWh of training and an illustrative 3 Wh per query, N^\star \approx 1.4 \times 10^8 queries. A service answering 10^7 queries a day reaches it in two weeks, so for deployed models the footprint of inference, and of the terminals that call it, cannot be ignored.
2.4 The carbon footprint of a digital service
Definition 2.5 — Tiers and allocation of a digital service A digital service uses three tiers: user terminals, networks, and data centres. Its footprint per functional unit (one user-day, one thousand queries) adds, for each tier, an allocated share of the operational and embodied impacts of the equipment. Common allocation keys are the time of use (terminals), the data volume (networks) and the compute time or number of requests (data centres).
Allocation is a modelling choice and must be stated. For networks, it hides a real difficulty.
Proposition 2.6 — Average and marginal network intensity Suppose the power of a network element carrying traffic x is P(x) = P_0 + kx with P_0 > 0. The average energy per unit of traffic exceeds the marginal one: \frac{P(x)}{x} = \frac{P_0}{x} + k > k = P'(x). An attributional factor “per GB” therefore overstates the short-term saving obtained by sending fewer bytes.
Proof. P_0 / x > 0 for every x > 0. ∎
Over the long term the picture changes: traffic growth triggers new capacity, whose embodied and fixed power become marginal. This is Definition 1.7 again: the question (short-term reduction or long-term trend) fixes the right factor.
Example 2.7 — One user-day of a chatbot Illustrative values: 20 queries and 30 minutes on a laptop, on a grid at 60 g CO₂e/kWh.
- Terminal (time key): a laptop of 250 kg CO₂e, used 8 h a day for 4 years, is charged 21 g per hour, so 10.7 g; its 30 W add 15 Wh, or 0.9 g.
- Network (data key): 20 MB at an assumed 0.05 kWh/GB is 1 Wh, or 0.06 g.
- Data centre (request key, operational only): 20 queries of 3 Wh at a PUE of 1.2 make 72 Wh, or 4.3 g.
The total is 10.7 + 0.9 + 0.06 + 4.3 \approx 16\ \text{g CO}_2\text{e per user-day}, two thirds of it from making the laptop. At 400 g CO₂e/kWh it is about 46 g, and the data centre dominates.
2.5 Uncertainty and trade-offs
Every factor of C is uncertain: power is measured on some components only, the PUE is a yearly average, carbon intensity varies by hour and country, and manufacturing data are scarce. A Monte Carlo simulation turns these ranges into an interval and a ranking (Proposition 0.2).
import numpy as np
rng = np.random.default_rng(1)
n = 100_000
gpu_hours = 1000.0
names = ["GPU power", "PUE", "carbon int.", "embodied"]
med = np.array([0.40, 1.2, 0.06, 0.010]) # kW, -, kg/kWh, kg/GPU-h
sig = np.array([0.05, 0.10, 0.40, 0.50]) # log-sd of each factor
X = np.exp(np.log(med) + sig * rng.standard_normal((n, 4)))
oper = gpu_hours * X[:, 0] * X[:, 1] * X[:, 2]
emb = gpu_hours * X[:, 3]
C = oper + emb
print(f"median {np.median(C):.1f} kg, 90% interval "
f"[{np.quantile(C, .05):.1f}, {np.quantile(C, .95):.1f}] kg")
# first-order sensitivity: share of Var(C) explained by each factor
for j, name in enumerate(names):
bins = np.quantile(X[:, j], np.linspace(0, 1, 21))
idx = np.clip(np.digitize(X[:, j], bins) - 1, 0, 19)
cond_means = np.array([C[idx == b].mean() for b in range(20)])
print(f"{name:12s} {cond_means.var() / C.var():.2f}")The final loop estimates the share of the variance of C explained by each factor, the sensitivity indices of ch. 7.2. Carbon intensity and embodied emissions dominate; measuring GPU power more precisely would hardly change the interval.
The benefit side matters as much. Schwartz and coauthors (2020) asked that papers report the computational cost of their results next to the accuracy, so that efficiency becomes a criterion.
Definition 2.8 — Pareto front of accuracy and energy A model a dominates a model b if it is at least as accurate and uses at most as much energy, with one inequality strict. The Pareto front is the set of non-dominated models.
Only models on the front are reasonable choices; choosing among them is a value judgement that the numbers make explicit.
2.6 Lab sheet: environmental assessment of an AI system
The first case study follows the four phases of Definition 1.3.
- Goal and scope: one training run plus one year of inference; functional unit “one thousand answered queries”; boundaries: GPUs, servers, storage, network, data-centre overhead.
- Inventory: power, hours, PUE, location and hour of the carbon intensity, embodied factors, each with its source.
- Impacts: carbon split into dynamic, idle and embodied parts (Example 2.3), and water through the WUE.
- Interpretation: Monte Carlo interval, sensitivity ranking, break-even point (Proposition 2.4), Pareto front of the candidate models.
import time
import numpy as np
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
X, y = load_digits(return_X_y=True)
Xtr, Xte, ytr, yte = train_test_split(X, y, test_size=0.3, random_state=0)
P_cpu = 15.0 # assumed power of one CPU core under load, in W (illustrative)
models = {"logreg": LogisticRegression(max_iter=2000),
"rf-10": RandomForestClassifier(10, random_state=0, n_jobs=1),
"rf-100": RandomForestClassifier(100, random_state=0, n_jobs=1),
"rf-400": RandomForestClassifier(400, random_state=0, n_jobs=1)}
rows = []
for name, m in models.items():
t0 = time.process_time()
m.fit(Xtr, ytr)
acc = m.score(Xte, yte)
energy_J = P_cpu * (time.process_time() - t0)
rows.append((name, acc, energy_J))
for name, acc, e in rows:
dominated = any(a2 >= acc and e2 <= e and (a2 > acc or e2 < e)
for n2, a2, e2 in rows if n2 != name)
print(f"{name:7s} acc={acc:.3f} energy={e:6.2f} J "
f"{'dominated' if dominated else 'Pareto'}")The timings vary between machines, which is itself a lesson: an energy estimate from time and an assumed power is a model, and must say so.
Key takeaways — chapter 2
- Power splits into a static and a dynamic part; energy counters beat sampled power.
- The operational footprint is E_{\mathrm{IT}} \cdot \mathrm{PUE} \cdot \mathrm{CI}; manufacturing adds an embodied term per hour of use.
- For BLOOM, idle power and manufacturing doubled the estimate based on dynamic consumption.
- Inference overtakes training after C_{\mathrm{train}} / c_{\mathrm{inf}} queries, which a popular service reaches quickly.
- Average and marginal factors differ for networks and grids; the question decides which to use.
- Report an interval and a sensitivity ranking, and choose models on the accuracy–energy Pareto front.
3. Climate and environmental data
Climate science has more data than most fields, but the data are uneven in space, in time and in kind. This chapter describes the sources, then the operations that every analysis of climate data starts with: averages on the sphere, anomalies, and trends with honest error bars. Empirical orthogonal functions, the climate name of principal component analysis, are in the self-study ch. 7.
3.1 Observations, satellites, simulations and reanalyses
Definition 3.1 — Weather, climate, prediction and projection Weather is the state of the atmosphere at a given time. Climate is the statistical distribution of weather over decades, conventionally 30 years.
A climate prediction starts from the observed state and forecasts the coming months to decades. A climate projection simulates the response to a scenario of future emissions and land use, without claiming to follow the actual year-to-year path.
Better projections and predictions are what society needs to plan its adaptation. Four kinds of data feed them.
- In situ observations: weather stations, ships and buoys. Some records go back to the end of the 19th century, but coverage is dense in Europe and North America and sparse over the oceans, deserts and poles.
- Satellite data, since the 1970s: radiances turned into temperature, sea ice, sea level or vegetation. Coverage is global, but successive instruments must be intercalibrated.
- Climate simulations: numerical models of atmosphere, ocean, ice and land, run under common protocols (the CMIP intercomparison projects). An ensemble of runs samples the uncertainty.
- Reanalyses, such as ERA5 (Hersbach and coauthors, 2020): a weather model assimilates past observations into a complete, gridded, hourly history of the atmosphere over several decades.
ERA5 is distributed by the Copernicus Climate Data Store and CMIP outputs by the Earth System Grid Federation. With free machine-learning libraries, anyone can investigate natural processes from these data.
3.2 Averages on the sphere
Gridded data come on a regular latitude–longitude grid. Cells near the poles are much smaller than cells near the equator, so the plain mean of all cells gives the poles too much weight.
Proposition 3.2 — Area weights On a sphere of radius R, the cell between latitudes \varphi and \varphi + \Delta\varphi, of longitude width \Delta\lambda, has area A = R^2\, \Delta\lambda\, \big(\sin(\varphi + \Delta\varphi) - \sin\varphi\big) \approx R^2 \cos\varphi\, \Delta\varphi\, \Delta\lambda. The spatial mean of a field x on a regular grid is therefore the weighted mean \bar x = \frac{\sum_i \cos\varphi_i\, x_i}{\sum_i \cos\varphi_i}.
Proof. The area element of the sphere is R^2 \cos\varphi\, d\varphi\, d\lambda. Integrating it over the cell gives the exact formula, and the mean value theorem gives the approximation. ∎
Example 3.3 — Arctic amplification and the plain mean The fraction of the globe north of latitude \varphi_0 is (1 - \sin\varphi_0)/2, that is 6.7 % for \varphi_0 = 60^\circ. On a 1° grid, the rows north of 60° N are 30 of 180 rows, 16.7 % of the cells.
Suppose, for illustration, a warming of 3 °C north of 60° N and 1 °C elsewhere; the Arctic has indeed warmed much faster than the globe (Rantanen and coauthors, 2022). The area-weighted mean and the plain mean are 0.067 \times 3 + 0.933 \times 1 = 1.13\,^\circ\text{C}, \qquad 0.167 \times 3 + 0.833 \times 1 = 1.33\,^\circ\text{C}.
import numpy as np
lat = np.arange(-89.5, 90, 1.0) # 1-degree cell centres
lon = np.arange(0.5, 360, 1.0)
warming = np.where(lat[:, None] > 60, 3.0, 1.0) * np.ones((lat.size, lon.size))
w = np.cos(np.deg2rad(lat))[:, None] * np.ones_like(warming)
print(f"plain mean {warming.mean():.2f} C, area-weighted {np.average(warming, weights=w):.2f} C")3.3 Anomalies and trends
Definition 3.4 — Climatology and anomaly The climatology of a variable at a site, for a calendar month, is its mean over a reference period such as 1991–2020. The anomaly is the departure from it, x'_t = x_t - \bar x_{m(t)}, where m(t) is the calendar month of t.
Anomalies remove the seasonal cycle and the differences of altitude between stations. This is why temperature records are averaged as anomalies, not as absolute values.
A trend is then fitted by least squares (Theorem 0.3). The residuals of climate series are autocorrelated, so the white-noise standard error is too small.
Proposition 3.5 — Trend error with AR(1) noise Let x'_t = a + bt + u_t for t = 1, \dots, n, with (u_t) a stationary AR(1) of coefficient \phi and variance \gamma_0. For large n, the least-squares slope satisfies \mathrm{Var}(\hat b) \approx \frac{12\, \gamma_0}{n^3} \cdot \frac{1 + \phi}{1 - \phi}.
Proof.
- Write \hat b - b = \sum_t w_t u_t, with w_t = (t - \bar t) / \sum_s (s - \bar s)^2.
- Then \mathrm{Var}(\hat b) = \gamma_0 \sum_{s,t} w_s w_t\, \phi^{|s - t|}.
- The weights vary slowly, so w_{t+h} \approx w_t for the lags where \phi^{|h|} is not negligible. The double sum is close to \sum_t w_t^2 \sum_h \phi^{|h|}.
- Conclude with \sum_t w_t^2 = 12/(n(n^2 - 1)) and \sum_h \phi^{|h|} = (1 + \phi)/(1 - \phi) (Proposition 0.5). ∎
In practice \phi is estimated from the residuals, and the effective sample size n(1 - \phi)/(1 + \phi) replaces n in the test (Santer and coauthors, 2000).
import numpy as np
rng = np.random.default_rng(3)
n, phi, b = 45 * 12, 0.6, 0.02 / 12 # 45 years of months, 0.2 C per decade
u = np.zeros(n)
for t in range(1, n):
u[t] = phi * u[t - 1] + 0.12 * rng.standard_normal()
t = np.arange(n)
x = b * t + u
X = np.column_stack([np.ones(n), t])
coef, res, *_ = np.linalg.lstsq(X, x, rcond=None)
r = x - X @ coef
s2 = r @ r / (n - 2)
se_white = np.sqrt(s2 / ((t - t.mean()) ** 2).sum())
phi_hat = np.corrcoef(r[:-1], r[1:])[0, 1]
se_ar1 = se_white * np.sqrt((1 + phi_hat) / (1 - phi_hat))
print(f"trend {coef[1] * 120:.3f} C/decade, se white {se_white * 120:.3f}, "
f"se AR(1) {se_ar1 * 120:.3f}, phi_hat {phi_hat:.2f}")The corrected standard error is twice the naive one here, so every white-noise t-statistic is twice too large.
3.4 Machine learning on climate data
Machine learning enters climate science at four places, each with its own pitfall.
- Downscaling and bias correction learn a map from coarse model output to local observations. The relation learnt on the past must still hold in a warmer climate.
- Emulators are cheap surrogates of climate models, trained on simulations; ClimateBench (Watson-Parris and coauthors, 2022) emulates the response of temperature and precipitation to emission scenarios. They must not be trusted outside the scenarios they were trained on.
- Data-driven weather forecasting: trained on ERA5, GraphCast (Lam and coauthors, 2023) matched or exceeded the operational medium-range forecast of the European Centre on most of the variables and lead times evaluated.
- Detection and classification of events in observations: cyclones, heat waves, and the infrasound signals of ch. 4.
Validation follows Definition 0.6: samples close in space and time are correlated, so test sets are whole years and whole regions. Under climate change the test period is warmer than the training period, which is precisely the situation of use.
Key takeaways — chapter 3
- Stations and buoys are long but sparse, satellites global since the 1970s, simulations and reanalyses complete but model-based.
- Means on a latitude–longitude grid are weighted by \cos\varphi.
- Trends are fitted on anomalies; AR(1) residuals inflate the slope variance by (1 + \phi)/(1 - \phi).
- Machine learning downscales, emulates, forecasts and detects; it must be validated on future years and new regions.
4. Machine learning on infrasound data in polar regions
Infrasound is sound below about 20 Hz, inaudible to humans, which can travel thousands of kilometres in the atmosphere. Polar regions are rich in infrasound sources and poor in other observations. This chapter turns raw pressure records into features, then classifies detections: the programme of the second lab.
4.1 Sources and stations
- The International Monitoring System of the Comprehensive Nuclear-Test-Ban Treaty runs a global network of infrasound stations, several at high latitudes, Antarctica included.
- Each station is an array of a few microbarometers spread over at most a few kilometres.
- Sources at high latitudes include microbaroms from ocean swell (about 0.1 to 0.5 Hz, peaking near 0.2 Hz), ice calving, aurorae, volcanoes and meteors.
- The main nuisance is wind noise, strong under katabatic winds and incoherent between sensors.
Beyond monitoring, these records inform on winds and temperatures of the middle atmosphere (Le Pichon, Blanc and Hauchecorne, 2010).
4.2 Spectra
Definition 4.1 — Power spectral density, Welch estimator For a stationary series with summable autocovariance \gamma and unit sampling step, the power spectral density is S(f) = \sum_{h \in \mathbb{Z}} \gamma(h)\, e^{-2i\pi f h}, \qquad |f| \leq \tfrac12. The Welch estimator cuts the record into K segments, multiplies each by a window, and averages their periodograms (Welch, 1967).
Proposition 4.2 — Why average periodograms At a fixed frequency 0 < f < \tfrac12, the periodogram of a long Gaussian record is approximately distributed as S(f)\, \chi^2_2 / 2. Its standard deviation equals its mean, whatever the record length.
Averaging K nearly independent segments gives approximately S(f)\, \chi^2_{2K} / (2K), of relative standard deviation 1 / \sqrt{K}.
Proof. The real and imaginary parts of the discrete Fourier transform at f are asymptotically independent Gaussian variables of variance S(f)/2. The sum of their squares is S(f)/2 times a \chi^2_2, of mean 2 and variance 4. A mean of K independent copies has variance divided by K (Percival and Walden, 1993, ch. 6). ∎
The price is resolution: a segment of length L resolves frequencies about 1/L apart.
import numpy as np
from scipy.signal import welch, lfilter
rng = np.random.default_rng(5)
fs, T = 20.0, 1800.0 # 20 Hz, 30 minutes
t = np.arange(0, T, 1 / fs)
amp = 1 + 0.3 * np.sin(2 * np.pi * t / 300) # slowly modulated microbarom
micro = 0.5 * amp * np.sin(2 * np.pi * 0.21 * t)
wind = lfilter([1.0], [1.0, -0.98], rng.standard_normal(t.size)) * 0.3
p = micro + wind
f, S = welch(p, fs=fs, nperseg=4096)
band = (f > 0.05) & (f < 2)
print(f"spectral peak at {f[band][np.argmax(S[band])]:.3f} Hz "
f"(resolution {fs / 4096:.4f} Hz, {2 * t.size // 4096 - 1} segments)")4.3 Array processing: direction and speed
A plane wave from back-azimuth \theta (direction of the source, clockwise from north) crosses the array at apparent speed c. Its slowness vector is u = -\frac{1}{c}\,(\sin\theta, \cos\theta). The wave reaches the sensor at position r_i (east, north) at time u \cdot r_i, so the delay of sensor j after sensor i is \tau_{ij} = u \cdot (r_j - r_i).
Proposition 4.3 — Least-squares slowness Stack the measured delays of q sensor pairs as \tau = Du + \varepsilon, where row \ell of D \in \mathbb{R}^{q \times 2} is (r_j - r_i)^\top. If the sensors are not collinear, D has rank 2 and \hat u = (D^\top D)^{-1} D^\top \tau, \qquad \hat c = 1 / \|\hat u\|, \qquad \hat\theta = \operatorname{atan2}(-\hat u_1, -\hat u_2). With collinear sensors, the slowness component perpendicular to the line is not identifiable.
Proof. This is Theorem 0.3 with design matrix D.
If all differences r_j - r_i are parallel to one vector e, then D e^\perp = 0, so adding any multiple of e^\perp to u leaves Du unchanged. ∎
Each delay is the lag that maximises the cross-correlation of two sensors. For a true plane wave the delays around a triangle cancel, \tau_{ij} + \tau_{jk} + \tau_{ki} = 0: this closure separates coherent signals from wind noise. Detectors such as PMCC (Cansi, 1995) slide windows in time and frequency bands and keep those with small closure and high correlation. An apparent speed near 0.34 km/s is acoustic; seismic arrivals are much faster.
import numpy as np
from scipy.signal import butter, filtfilt
rng = np.random.default_rng(6)
fs, c, theta = 100.0, 340.0, np.deg2rad(135.0) # true speed and back-azimuth
r = np.array([[0, 0], [800, 100], [200, 900], [-600, 400]], float)
u = -np.array([np.sin(theta), np.cos(theta)]) / c
t = np.arange(0, 60, 1 / fs)
b, a = butter(4, [0.5, 3.0], btype="band", fs=fs)
src = filtfilt(b, a, rng.standard_normal(t.size + 2000))
P = np.array([np.interp(t + 10 - ri @ u, np.arange(src.size) / fs, src) for ri in r])
P += 0.3 * src.std() * rng.standard_normal(P.shape)
pairs = [(i, j) for i in range(4) for j in range(i + 1, 4)]
taus, D = [], []
for i, j in pairs:
xc = np.correlate(P[j], P[i], "full")
taus.append((np.argmax(xc) - (t.size - 1)) / fs)
D.append(r[j] - r[i])
u_hat = np.linalg.lstsq(np.array(D), np.array(taus), rcond=None)[0]
baz = np.degrees(np.arctan2(-u_hat[0], -u_hat[1])) % 360
print(f"back-azimuth {baz:.1f} deg, apparent speed {1 / np.linalg.norm(u_hat):.0f} m/s")
print("closure 0-1-2:", round(taus[0] + taus[3] - taus[1], 3), "s")4.4 Classifying detections without leakage
Each detection becomes a feature vector: back-azimuth, apparent speed, dominant frequency, duration, amplitude, closure residual, time of day and season. Labelling detections as microbarom, wind or other signals is then supervised learning, with three pitfalls.
- One event yields many near-identical detections. A random split puts copies of the same event in training and test: this is leakage (Definition 0.6). Split by event or by day.
- Classes are imbalanced, so report balanced accuracy or per-class recall.
- Back-azimuth is an angle: encode it as (\sin\theta, \cos\theta).
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import KFold, GroupKFold, cross_val_score
rng = np.random.default_rng(7)
X, y, g = [], [], []
for e in range(150): # 150 events, 15 detections each
k = rng.choice(3, p=[0.6, 0.25, 0.15]) # microbarom, wind, other
centre = np.array([[0.2, 340, 200], [0.6, 300, 120], [1.5, 360, 60]])[k]
centre = centre + rng.normal(0, [0.45, 40, 100]) # classes overlap at event level
for _ in range(15):
f0, cel, baz = centre + rng.normal(0, [0.02, 3, 4])
X.append([f0, cel, np.sin(np.deg2rad(baz)), np.cos(np.deg2rad(baz))])
y.append(k); g.append(e)
X, y, g = np.array(X), np.array(y), np.array(g)
clf = RandomForestClassifier(200, random_state=0, n_jobs=1)
rand = cross_val_score(clf, X, y, cv=KFold(5, shuffle=True, random_state=0),
scoring="balanced_accuracy")
grp = cross_val_score(clf, X, y, cv=GroupKFold(5), groups=g, scoring="balanced_accuracy")
print(f"balanced accuracy: random split {rand.mean():.3f}, grouped by event {grp.mean():.3f}")The random split reports a balanced accuracy of about 0.99, the split by event about 0.73. Only the second number predicts the accuracy on next winter’s events.
Key takeaways — chapter 4
- Polar infrasound mixes microbaroms, ice, aurorae and volcanoes with strong, incoherent wind noise.
- Welch averaging trades frequency resolution for a variance reduced by 1/K.
- Pairwise delays give the slowness vector by least squares, hence back-azimuth and apparent speed, if the array is not collinear.
- Closure and correlation separate coherent waves from wind.
- Detections of one event are near-duplicates: validate by event or by day.
5. Sensor and IoT time series: preparation, segmentation, anomalies, prediction
Communicating sensors measure drinking water, energy, traffic and waste continuously. Their raw output is rarely ready for learning: timestamps are irregular, values are cumulative, some are missing or wrong. This chapter follows the sequence of the official themes: preparation, segmentation, anomaly detection, prediction.
5.1 Preparing sensor data
Definition 5.1 — Sensor time series, counter and flow A sensor time series is a sequence of pairs (t_k, z_k) with increasing, not necessarily regular, timestamps. A counter reports a cumulative quantity V(t_k), for example litres since installation. A flow sensor reports a rate. The consumption over [s, t] is V(t) - V(s).
Typical defects are irregular or missing transmissions, clock drift, counter resets, quantisation (one pulse per litre), stuck values, outliers and duplicated messages. Preparation sorts and deduplicates, corrects resets, resamples to a regular grid, and flags gaps rather than filling them silently. Unstructured data (images of meters, operator notes) exist too, but this chapter, like the official course, focuses on time series.
Proposition 5.2 — Resampling a counter conserves volume Interpolate a nondecreasing counter linearly between readings, evaluate it on a regular grid, and take differences. The resampled consumptions are nonnegative, and their sum between two grid points equals the change of the interpolated counter. In particular, the total between two readings that fall on the grid is exact.
Proof. The linear interpolant of nondecreasing values is nondecreasing, so its differences are nonnegative. The sum of the differences telescopes to the difference of the end values. ∎
Averaging a flow over each grid interval has no such guarantee when transmissions are missing, which is why counters are preferred for water and energy billing.
import numpy as np
import pandas as pd
rng = np.random.default_rng(8)
fine = np.arange(0, 72, 0.01) # hours, fine time grid
rate = 20 + 25 * np.exp(-((fine % 24 - 8) / 2) ** 2) + 30 * np.exp(-((fine % 24 - 20) / 2) ** 2)
V = np.cumsum(rate) * 0.01 # true counter, litres
hrs = np.sort(rng.uniform(0, 72, 60)) # irregular reading times
hrs = hrs[(hrs < 30) | (hrs > 42)] # 12 h without transmission
idx = np.interp(hrs, fine, V) # transmitted counter values
grid = np.arange(np.ceil(hrs[0]), np.floor(hrs[-1]) + 1) # whole hours inside the record
v = np.interp(grid, hrs, idx)
hourly = pd.Series(np.diff(v), index=pd.Timestamp("2027-01-04") + pd.to_timedelta(grid[1:], unit="h"))
print(f"{hourly.size} hours, min {hourly.min():.1f} L, total {hourly.sum():.0f} L, "
f"counter change {v[-1] - v[0]:.0f} L")
gap = hourly["2027-01-05 08:00":"2027-01-05 17:00"]
true_gap = np.diff(np.interp(np.arange(31, 42), fine, V))
print(f"in the gap: estimated {gap.min():.1f} to {gap.max():.1f} L/h, "
f"true {true_gap.min():.1f} to {true_gap.max():.1f} L/h")The total is exact, but inside the gap the estimate is a flat 27 L/h while the true use swung between 20 and 43 L/h. The volume is right; its timing is invented, so those hours must be flagged.
5.2 Segmentation
A consumption series is a succession of regimes: occupied or empty building, normal network or network with a leak. Segmentation finds the times of change.
Definition 5.3 — Penalised segmentation Given y_1, \dots, y_n and a cost C(y_{a+1:b}) of a segment, find change points 0 = \tau_0 < \tau_1 < \dots < \tau_m < \tau_{m+1} = n that minimise \sum_{i=0}^{m} C\big(y_{\tau_i + 1:\tau_{i+1}}\big) + \beta\, m. For changes in mean, the quadratic cost is C(y_{a+1:b}) = \sum_{t=a+1}^{b} (y_t - \bar y_{a+1:b})^2.
Theorem 5.4 — Optimal partitioning (Jackson and coauthors, 2005) Let F(0) = -\beta and, for t = 1, \dots, n, F(t) = \min_{0 \leq s < t} \big[ F(s) + C(y_{s+1:t}) + \beta \big]. Then F(n) is the minimum of Definition 5.3. Storing the minimising s for each t recovers the change points, with O(n^2) cost evaluations.
Proof.
- By induction on t, F(t) is the optimal penalised cost of y_{1:t}; the base case holds because one segment costs C(y_{1:t}) and m = 0.
- Let s be the last change point of an optimal segmentation of y_{1:t} (s = 0 if none). Its restriction to y_{1:s} must be optimal, otherwise replacing it lowers the total.
- Hence the optimum equals F(s) + C(y_{s+1:t}) + \beta for some s, and minimising over s gives F(t). ∎
With cumulative sums of y and y^2, each quadratic cost takes O(1). For Gaussian noise of known variance \sigma^2, a common penalty is \beta = 2\sigma^2 \log n. The pruning that makes the algorithm linear in practice (PELT) is in ch. 7.
import numpy as np
def segment(y, beta):
n = y.size
c1 = np.concatenate([[0], np.cumsum(y)]); c2 = np.concatenate([[0], np.cumsum(y**2)])
cost = lambda a, b: c2[b] - c2[a] - (c1[b] - c1[a]) ** 2 / (b - a)
F = np.full(n + 1, np.inf); F[0] = -beta; last = np.zeros(n + 1, int)
for t in range(1, n + 1):
vals = [F[s] + cost(s, t) + beta for s in range(t)]
last[t] = int(np.argmin(vals)); F[t] = vals[last[t]]
cps, t = [], n
while t > 0:
t = last[t]; cps.append(t)
return sorted(cps)[1:]
rng = np.random.default_rng(9)
mean = np.r_[np.full(90, 12.0), np.full(60, 7.0), np.full(100, 12.5), np.full(50, 15.5)]
y = mean + rng.normal(0, 1.2, mean.size) # daily consumption, m3
print("change points:", [int(c) for c in segment(y, 2 * 1.2**2 * np.log(y.size))],
"(true: 90, 150, 250)")The third change is placed at 256, not 250: the first six days of the new regime happen to be low, and a change point is located only as precisely as the noise allows.
5.3 Anomaly detection
Two kinds of anomaly matter. Point anomalies are isolated wrong or unusual values; collective anomalies are lasting shifts, such as a new leak.
Definition 5.5 — Robust z-score With \mathrm{med} the median of the series and \mathrm{MAD} the median of |x_t - \mathrm{med}|, the robust z-score is r_t = \frac{x_t - \mathrm{med}}{1.4826\, \mathrm{MAD}}. A value is flagged when |r_t| exceeds a threshold such as 3.5 (Iglewicz and Hoaglin, 1993).
Proposition 5.6 — Consistency of the MAD If X \sim \mathcal{N}(\mu, \sigma^2), the median of |X - \mu| is \sigma\, \Phi^{-1}(3/4) \approx 0.6745\, \sigma. Hence 1.4826\, \mathrm{MAD} estimates \sigma, and unlike the standard deviation it stays bounded while fewer than half of the values are outliers.
Proof. \mathbb{P}(|X - \mu| \leq m) = 2\Phi(m/\sigma) - 1, which equals 1/2 exactly when \Phi(m/\sigma) = 3/4. Finally 1/0.6745 = 1.4826. ∎
A leak adds a roughly constant flow. It is best seen in the minimum night flow of a district, around 3 a.m., when legitimate use is lowest (Puust and coauthors, 2010). Point tests miss a small shift; accumulating evidence finds it.
Definition 5.7 — CUSUM (Page, 1954) For a series with in-control mean \mu_0 and a reference value k > 0, set S_0 = 0 and S_t = \max\big(0,\ S_{t-1} + x_t - \mu_0 - k\big). An alarm is raised at the first t with S_t > h. To detect a shift of size \delta, the usual choice is k = \delta/2.
After a shift of \delta > k, the increments of S_t have mean \delta - k > 0, so S_t climbs like a random walk with drift. The expected delay is roughly h / (\delta - k), and Wald’s identity makes this precise up to the overshoot. Before the shift the drift is -k < 0, so false alarms are rare when h is a few standard deviations.
import numpy as np
rng = np.random.default_rng(11)
mnf = 8.0 + 0.8 * rng.standard_normal(120) # minimum night flow, m3/h, 120 nights
mnf[80:] += 1.0 # a leak of 1 m3/h appears on night 80
mu0, sd = np.median(mnf[:60]), 1.4826 * np.median(np.abs(mnf[:60] - np.median(mnf[:60])))
k, h = 0.5, 5 * sd # k = delta / 2
S, alarm = 0.0, None
for t, x in enumerate(mnf):
S = max(0.0, S + x - mu0 - k)
if S > h and alarm is None:
alarm = t
r = (mnf - mu0) / sd
print(f"CUSUM alarm on night {alarm}; nights with |robust z| > 3.5: {np.flatnonzero(np.abs(r) > 3.5)}")The robust z-score flags a single night, 37 nights after the leak started. The CUSUM alarms on night 89, close to the predicted delay h/(\delta - k) \approx 8 nights.
5.4 Forecasting and its evaluation
Forecasts of demand let a utility pump water when electricity is cheap and low-carbon, and size reserves. A forecast is useful only if it beats a simple baseline.
Definition 5.8 — Seasonal naive forecast and MASE With season length s (168 hours for a weekly cycle), the seasonal naive forecast is \hat y_{t} = y_{t-s}. The mean absolute scaled error of a forecast is its MAE divided by the in-sample MAE of the seasonal naive forecast (Hyndman and Koehler, 2006). A MASE below 1 beats the baseline.
Evaluation uses a rolling origin: train on the past up to a date, forecast the next day, move the date forward, and average the errors. A random split of hours would leak the future into the past.
import numpy as np
from sklearn.linear_model import Ridge
rng = np.random.default_rng(11)
H = 24 * 7 * 20 # 20 weeks of hourly demand
t = np.arange(H); hour, dow = t % 24, (t // 24) % 7
temp = 15 + 8 * np.sin(2 * np.pi * t / (24 * 365)) + 4 * np.sin(2 * np.pi * (hour - 9) / 24) \
+ rng.normal(0, 1.5, H)
y = 100 + 30 * np.exp(-((hour - 8) / 2.0) ** 2) + 25 * np.exp(-((hour - 20) / 2.5) ** 2) \
- 15 * (dow >= 5) + 1.5 * np.maximum(temp - 18, 0) + rng.normal(0, 5, H)
def features(i):
return np.r_[np.eye(24)[hour[i]], np.eye(7)[dow[i]], max(temp[i] - 18, 0), y[i - 168]]
mae_sn, mae_ml, scale = [], [], []
for origin in range(H - 28 * 24, H, 24): # 28 rolling origins, one day ahead
tr = np.arange(168, origin); te = np.arange(origin, origin + 24)
model = Ridge(alpha=1.0).fit(np.array([features(i) for i in tr]), y[tr])
pred = model.predict(np.array([features(i) for i in te]))
mae_ml.append(np.abs(pred - y[te]).mean())
mae_sn.append(np.abs(y[te - 168] - y[te]).mean())
scale.append(np.abs(y[tr] - y[tr - 168]).mean())
print(f"MAE seasonal naive {np.mean(mae_sn):.2f}, ridge {np.mean(mae_ml):.2f}, "
f"MASE ridge {np.mean(np.array(mae_ml) / np.array(scale)):.2f}")Interval forecasts, which a utility needs to size its reserves, come from the quantile loss of ch. 7.
Key takeaways — chapter 5
- Sensor data need sorting, reset correction, resampling and gap flags before any learning.
- Interpolating a counter and differencing conserves volume; inside a gap the timing is invented.
- Penalised segmentation is solved exactly by dynamic programming in O(n^2).
- The robust z-score finds point anomalies; CUSUM accumulates evidence and finds small persistent shifts such as leaks.
- Forecasts are judged against the seasonal naive baseline (MASE) with a rolling origin.
6. AI for a smaller footprint: overview and the water cycle
Chapters 1–2 counted the cost of AI; this chapter turns to its benefits. It surveys where machine learning saves resources, then follows the third case study, sensor data of the large water cycle, from the sensor to a forecast and a net balance; the decision that a forecast must change is in ch. 7.
6.1 Overview: machine learning for a smaller footprint
| Sector | What machine learning does | Typical data |
|---|---|---|
| Electricity | forecasts load, wind and solar output; schedules flexible demand | meters, weather forecasts |
| Buildings | controls heating and cooling; detects faults | room sensors, smart meters |
| Transport | forecasts traffic; optimises routes and loads | GPS traces, counters |
| Water | forecasts demand and floods; detects leaks and faulty sensors | flow, pressure, river levels, rain |
| Waste | sorts recyclables by computer vision; plans collection rounds | images, fill-level sensors |
| Agriculture | schedules irrigation; monitors crops | soil moisture, satellite images |
Rolnick and coauthors (2022) survey these applications. All of them are second-order effects in the sense of Definition 1.1: they are real only if they change what happens, and they can be eaten by rebound (Proposition 1.8). Section 6.4 turns this into a balance.
6.2 The large water cycle and its sensors
Definition 6.1 — Large and small water cycles The large water cycle is the natural cycle: precipitation, evaporation, infiltration, runoff, rivers and aquifers. The small water cycle is its human part: abstraction, treatment, distribution of drinking water, and collection and treatment of wastewater.
The large cycle is observed by rain gauges, weather radar, river stage (water level) gauges and groundwater piezometers. Discharge, the volume per second that matters for floods and droughts, is rarely measured continuously. It is derived from the stage through a rating curve fitted on occasional manual gaugings, Q = a\, (h - h_0)^b, with h_0 the stage of zero flow.
Proposition 6.2 — Fitting a rating curve For fixed h_0, the model \log Q = \log a + b \log(h - h_0) + \varepsilon is linear in (\log a, b), so least squares gives the estimates in closed form (Theorem 0.3). Minimising the residual sum of squares over a grid of h_0 values then gives the profile least-squares estimate of (a, b, h_0).
Proof. For fixed h_0 this is ordinary least squares with design columns 1 and \log(h - h_0). The joint minimum over (a, b, h_0) is the minimum over h_0 of these partial minima. ∎
import numpy as np
rng = np.random.default_rng(13)
h = np.sort(rng.uniform(0.4, 2.5, 25)) # stages of 25 gaugings, m
Q = 12 * (h - 0.2) ** 1.6 * np.exp(0.05 * rng.standard_normal(h.size)) # m3/s
def fit(h0):
X = np.column_stack([np.ones(h.size), np.log(h - h0)])
beta, rss, *_ = np.linalg.lstsq(X, np.log(Q), rcond=None)
return float(rss[0]), np.exp(beta[0]), beta[1]
grid = np.linspace(-0.3, 0.38, 69)
h0 = grid[np.argmin([fit(g)[0] for g in grid])]
_, a, b = fit(h0)
print(f"h0 = {h0:.2f} m, a = {a:.1f}, b = {b:.2f}")
for g in (h0 - 0.15, h0, h0 + 0.1):
_, a_g, b_g = fit(g)
print(f"h0 = {g:.2f}: Q(4.5 m) = {a_g * (4.5 - g) ** b_g:.0f} m3/s")The three curves fit the gaugings with a scatter of 4 to 8 %, yet at a flood stage of 4.5 m, far above the highest gauging, they give 104 to 150 m³/s. Extrapolation is the main uncertainty of flood discharges.
6.3 Rainfall–runoff forecasting
The simplest model of a catchment is a linear reservoir: storage S fills with rain P and empties at the rate Q = S/k, so that dS/dt = P - S/k.
Proposition 6.3 — The linear reservoir is an autoregression If the rain is constant over each time step \Delta, the discharge at the end of the steps satisfies exactly Q_t = \phi\, Q_{t-1} + (1 - \phi)\, P_t, \qquad \phi = e^{-\Delta/k}. Two reservoirs in parallel, each fed a fixed fraction of the rain, with coefficients \phi_1 and \phi_2, give an ARX model in Q_{t-1}, Q_{t-2}, P_t, P_{t-1}, whose autoregressive coefficients are \phi_1 + \phi_2 and -\phi_1\phi_2.
Proof.
- With P constant on the step, the linear equation dS/dt = P - S/k has the solution S_t = S_{t-1} e^{-\Delta/k} + kP_t (1 - e^{-\Delta/k}). Divide by k.
- For two reservoirs, apply the operator (1 - \phi_1 B)(1 - \phi_2 B), where B is the lag operator, to the sum of the two discharges. ∎
Definition 6.4 — Nash–Sutcliffe efficiency For observed discharges Q_t with mean \bar Q and simulated or forecast values \hat Q_t, the Nash–Sutcliffe efficiency is (Nash and Sutcliffe, 1970) \mathrm{NSE} = 1 - \frac{\sum_t (Q_t - \hat Q_t)^2}{\sum_t (Q_t - \bar Q)^2}. A perfect model has NSE 1; predicting the observed mean gives 0.
Recurrent networks trained on many catchments, such as the LSTM of Kratzert and coauthors (2018), rival calibrated conceptual models; the linear model below is the baseline they must beat.
import numpy as np
rng = np.random.default_rng(12)
n = 6 * 365 # six years of daily data
P = np.where(rng.random(n) < 0.35, rng.gamma(0.8, 8.0, n), 0.0) # rain, mm/day
phi = np.exp(-1 / np.array([2.0, 30.0])) # fast and slow reservoirs (k = 2 and 30 days)
share = np.array([0.15, 0.25]) # runoff coefficients of the two paths
Qr = np.zeros((n, 2))
for t in range(1, n):
Qr[t] = phi * Qr[t - 1] + (1 - phi) * share * P[t]
Q = Qr.sum(1) * np.exp(0.1 * rng.standard_normal(n)) # observed discharge, mm/day
def nse(obs, sim):
return 1 - ((obs - sim) ** 2).sum() / ((obs - obs.mean()) ** 2).sum()
X = np.column_stack([Q[1:-1], Q[:-2], P[2:], P[1:-1]]) # Q_{t-1}, Q_{t-2}, P_t, P_{t-1}
yv, cut = Q[2:], 4 * 365 # train on 4 years, test on 2
coef = np.linalg.lstsq(X[:cut], yv[:cut], rcond=None)[0]
print("AR coefficients:", np.round(coef[:2], 3), " noise-free theory:",
np.round([phi.sum(), -phi.prod()], 3))
print(f"test NSE: ARX {nse(yv[cut:], X[cut:] @ coef):.3f}, "
f"persistence {nse(yv[cut:], Q[1:-1][cut:]):.3f}")Driven by the observed rain of the day, the one-day-ahead ARX forecast reaches an NSE of about 0.92 on the two test years, against 0.34 for persistence. Its coefficients are far from the theoretical ones: noisy lagged discharges bias least squares (errors in variables). A good forecaster need not identify the physics.
The same residuals validate sensors: a gauge that drifts away from the forecast of its neighbours, with a large robust z-score or a CUSUM alarm (ch. 5.3), is more likely faulty than the river.
6.4 The net balance
Definition 6.5 — Net environmental effect The net effect of an AI application, per functional unit and per impact category, is the impact avoided compared with the situation without it, minus the life cycle impacts of the AI system itself (sensors, networks, computation; ch. 1–2), minus the impacts it induces (rebound).
Illustrative numbers for leak detection in a district (ch. 5.3). Twenty leaks a year, each of 2 m³/h, found ten days earlier, save 9600 m³ of water. At 0.5 kWh/m³ for production and distribution, this avoids 4800 kWh, that is 288 kg CO₂e at 60 g CO₂e/kWh.
On the other side, fifty loggers of 10 kg CO₂e each over ten years, plus 100 kWh a year of transmission and computation, cost about 56 kg CO₂e a year. The carbon balance is positive, about 232 kg CO₂e a year. The main benefit, 9600 m³ of water, lies in another category and is reported separately.
Key takeaways — chapter 6
- Machine learning can cut resource use in energy, buildings, transport, water, waste and agriculture, as a second-order effect exposed to rebound.
- Discharge comes from stage through a rating curve, fitted by profile least squares and uncertain beyond the gaugings.
- A linear reservoir is an autoregression; NSE compares a forecast with the observed mean.
- An AI application is judged by its net balance per category, against the situation without it.
7. Complements: sensitivity, EOFs, exact segmentation, quantiles and decisions
This self-study chapter gives the proofs and tools that the sessions only cite. Each section depends on one earlier chapter, named in its first line, and can be read on its own.
7.1 Sampling a power trace
This section completes ch. 2.1: how wrong is an energy computed from sampled power?
Proposition 7.1 — Error of a sampled energy Let P be twice differentiable on [0, T] with |P''| \leq K.
Sample it every \Delta seconds, with T a multiple of \Delta. The trapezoidal estimate \hat E of the energy satisfies |E - \hat E| \leq \frac{K\, T\, \Delta^2}{12}.
Proof.
- On one interval of length \Delta, the trapezoid integrates the linear interpolant of P.
- The interpolation error is \tfrac12 P''(\xi)(t - a)(t - a - \Delta), and \int_a^{a+\Delta} (t - a)(a + \Delta - t)\, dt = \Delta^3/6.
- So each interval contributes at most K\Delta^3/12; there are T/\Delta intervals. ∎
The bound fails for power traces with sharp steps, where P'' is unbounded: short spikes between two samples are simply missed. This is why ch. 2.1 prefers cumulative energy counters, which integrate in hardware.
7.2 Variance-based sensitivity indices
Chapter 2.5 ranked the factors of a footprint by the share of variance they explain. This section defines that share and gives a simple estimator.
Definition 7.2 — First-order sensitivity index Let Y = g(X_1, \dots, X_k) with independent inputs and finite variance. The first-order (Sobol) index of X_j is S_j = \frac{\mathrm{Var}\big(\mathbb{E}[Y \mid X_j]\big)}{\mathrm{Var}(Y)} \in [0, 1]. It is the fraction of the variance of Y that would disappear, on average, if X_j were known exactly.
Proposition 7.3 — Additive models If Y = \sum_j g_j(X_j) with independent X_j, then S_j = \frac{\mathrm{Var}\, g_j(X_j)}{\sum_i \mathrm{Var}\, g_i(X_i)}, \qquad \sum_j S_j = 1. In particular, for a product of independent log-normal factors, the indices of \log C are the shares \sigma_j^2 / \sum_i \sigma_i^2 of ch. 0.2.
Proof.
- By independence, the conditional expectation is \mathbb{E}[Y \mid X_j] = g_j(X_j) + \sum_{i \neq j} \mathbb{E}\, g_i(X_i), whose variance is that of g_j(X_j).
- Again by independence, \mathrm{Var}(Y) = \sum_i \mathrm{Var}\, g_i(X_i).
- For \log C = \sum_j \log X_j, take g_j = \log, of variance \sigma_j^2. ∎
For a non-additive model the first-order indices sum to less than 1; the remainder measures interactions (Sobol’, 1993).
The pick-freeze estimator uses two independent samples A and B of the inputs, and the matrix A_B^{(j)} equal to A except for column j, taken from B.
Since f(B) and f(A_B^{(j)}) share only X_j, their covariance is the numerator of S_j (Saltelli and coauthors, 2010).
import numpy as np
rng = np.random.default_rng(1)
N, gpu_hours = 100_000, 1000.0
med = np.array([0.40, 1.2, 0.06, 0.010]) # the model of ch. 2.5
sig = np.array([0.05, 0.10, 0.40, 0.50])
draw = lambda: np.exp(np.log(med) + sig * rng.standard_normal((N, 4)))
f = lambda X: gpu_hours * (X[:, 0] * X[:, 1] * X[:, 2] + X[:, 3])
A, B = draw(), draw()
fA, fB = f(A), f(B)
V = np.var(np.r_[fA, fB])
for j, name in enumerate(["GPU power", "PUE", "carbon int.", "embodied"]):
ABj = A.copy(); ABj[:, j] = B[:, j] # A with column j taken from B
Sj = np.mean(fB * (f(ABj) - fA)) / V # Saltelli (2010) estimator
print(f"{name:12s} S = {Sj:.2f}")
logs = sig ** 2 / (sig ** 2).sum()
print("log-scale shares of the operational product (exact):", np.round(logs[:3] / logs[:3].sum(), 2))The indices sum to about 1, so interactions are weak in this model. They are slightly higher than the binned estimates of ch. 2.5, which lose the variation inside each bin.
7.3 Empirical orthogonal functions
This section completes ch. 3. Empirical orthogonal functions (EOFs), the climate name of principal component analysis, summarise a field of anomalies (Definition 3.4) by a few spatial patterns and their time series.
Definition 7.4 — Empirical orthogonal functions Arrange the anomalies in a matrix X \in \mathbb{R}^{n \times p}: n times, p grid cells. Multiply column j by \sqrt{\cos\varphi_j}, so that inner products approximate integrals over the sphere. The SVD X = U \Sigma V^\top gives the EOFs (columns of V, spatial patterns), the principal components (columns of U\Sigma, their time series) and the explained variance fractions \sigma_k^2 / \sum_j \sigma_j^2.
Theorem 7.5 — Eckart–Young For every k, the truncated SVD X_k = \sum_{j \leq k} \sigma_j u_j v_j^\top minimises \|X - Y\|_F over the matrices Y of rank at most k. The minimal error is \|X - X_k\|_F^2 = \sum_{j > k} \sigma_j^2.
Proof. Weyl’s inequality for singular values gives \sigma_{i+k}(X) \leq \sigma_i(X - Y) + \sigma_{k+1}(Y), and \sigma_{k+1}(Y) = 0 when Y has rank at most k. Squaring and summing over i, \|X - Y\|_F^2 = \sum_i \sigma_i(X - Y)^2 \geq \sum_{i} \sigma_{i+k}(X)^2, with equality for Y = X_k. ∎
So the first k EOFs are the best k-dimensional summary of the field. The leading EOF of tropical Pacific sea-surface temperature anomalies, for example, is the El Niño pattern. EOFs are statistical modes, not physical ones: orthogonality can mix two physical patterns into one EOF (Hannachi, Jolliffe and Stephenson, 2007).
import numpy as np
rng = np.random.default_rng(4)
lat = np.linspace(-60, 60, 25); lon = np.linspace(0, 350, 36)
LA, LO = np.meshgrid(lat, lon, indexing="ij")
w = np.sqrt(np.cos(np.deg2rad(LA))).ravel()
p1 = np.exp(-((LA / 20) ** 2 + ((LO - 200) / 50) ** 2)).ravel() # tropical "El Nino-like" blob
p2 = np.sin(np.deg2rad(LA) * 3).ravel() # meridional dipole
n = 480 # 40 years of months
pc1 = np.convolve(rng.standard_normal(n + 11), np.ones(12) / 12, "valid") * 4 # slow index
pc2 = 0.5 * rng.standard_normal(n)
F = np.outer(pc1, p1) + np.outer(pc2, p2) + 0.3 * rng.standard_normal((n, p1.size))
X = (F - F.mean(0)) * w
U, s, Vt = np.linalg.svd(X, full_matrices=False)
print("explained variance of EOFs 1-4:", np.round(s[:4] ** 2 / (s ** 2).sum(), 3))
for k in range(2):
c = [abs(np.corrcoef(Vt[k], w * p)[0, 1]) for p in (p1, p2)]
print(f"EOF {k + 1}: |corr| with blob {c[0]:.2f}, with dipole {c[1]:.2f}")The dipole, spread over the whole grid, comes first although its time series has the smaller amplitude: EOFs rank patterns by explained variance, not by physical importance.
7.4 Exact segmentation in linear time: PELT
Optimal partitioning (Theorem 5.4) costs O(n^2). Killick, Fearnhead and Eckley (2012) showed that most candidate change points can be discarded for good without losing optimality.
Theorem 7.6 — PELT pruning Assume there is a constant K such that, for all s < t < T, C(y_{s+1:t}) + C(y_{t+1:T}) + K \leq C(y_{s+1:T}). If at some time t > s F(s) + C(y_{s+1:t}) + K \geq F(t), then s is never the optimal last change point before any T > t, and can be removed from the candidates.
Proof. For every T > t, chain the two inequalities: F(s) + C(y_{s+1:T}) + \beta \geq F(s) + C(y_{s+1:t}) + K + C(y_{t+1:T}) + \beta \geq F(t) + C(y_{t+1:T}) + \beta. So the candidate t is at least as good as s in the recursion of Theorem 5.4 at every later time. ∎
The quadratic cost satisfies the assumption with K = 0, because splitting a segment never increases the residual sum of squares. When the number of changes grows linearly with n, the expected cost of PELT is O(n) under conditions given by the authors.
import time
import numpy as np
def make_cost(y):
c1 = np.r_[0, np.cumsum(y)]; c2 = np.r_[0, np.cumsum(y ** 2)]
return lambda s, t: c2[t] - c2[s] - (c1[t] - c1[s]) ** 2 / (t - s) # s: array of starts
def op(y, beta, prune=False):
n, cost = y.size, make_cost(y)
F = np.empty(n + 1); F[0] = -beta; last = np.zeros(n + 1, int)
cand, evals = np.array([0]), 0
for t in range(1, n + 1):
s = cand if prune else np.arange(t)
v = F[s] + cost(s, t) + beta; evals += s.size
j = np.argmin(v); F[t], last[t] = v[j], s[j]
if prune: # PELT rule with K = 0
cand = np.r_[s[F[s] + cost(s, t) <= F[t]], t]
cps, t = [], n
while t > 0:
t = last[t]; cps.append(int(t))
return sorted(cps)[1:], evals
rng = np.random.default_rng(14)
n = 4000
mean = np.repeat(rng.normal(10, 3, 40), n // 40) # 39 true changes, every 100 points
y = mean + rng.normal(0, 1.0, n)
beta = 2 * np.log(n)
for prune in (False, True):
t0 = time.perf_counter(); cps, ev = op(y, beta, prune)
print(f"{'PELT' if prune else 'OP '}: {len(cps)} changes, {ev:,} cost evaluations, "
f"{time.perf_counter() - t0:.2f} s")
print("identical segmentations:", op(y, beta)[0] == op(y, beta, True)[0])Both versions return the same 37 change points, but pruning cuts the number of cost evaluations by a factor of about 30. Truong, Oudre and Vayatis (2020) review this and other segmentation methods.
7.5 How good is CUSUM?
Chapter 5.3 chose k = \delta/2 by intuition. Likelihood ratios explain the choice and its optimality.
Proposition 7.7 — CUSUM as a likelihood ratio test For independent \mathcal{N}(\mu, \sigma^2) observations and a change of mean from \mu_0 to \mu_0 + \delta, the log-likelihood ratio of one observation is \ell(x) = \frac{\delta}{\sigma^2} \Big(x - \mu_0 - \frac{\delta}{2}\Big). So the CUSUM of Definition 5.7 with k = \delta/2 is, up to the factor \delta/\sigma^2, the recursion S_t = \max(0, S_{t-1} + \ell(x_t)) on log-likelihood ratios.
Proof. Expand the difference of the two Gaussian log-densities: the quadratic terms in x cancel, leaving \big(2\delta(x - \mu_0) - \delta^2\big) / (2\sigma^2). ∎
Definition 7.8 — Average run length and worst-case delay For a stopping rule N, the average run length \mathrm{ARL}_0 = \mathbb{E}_\infty[N] is the mean time to a false alarm when no change occurs. The worst-case detection delay of Lorden (1971) is the supremum, over the change time \nu and the past, of the conditional expected delay \mathbb{E}_\nu[N - \nu + 1 \mid N \geq \nu, \text{past}].
Moustakides (1986) proved that the likelihood-ratio CUSUM minimises Lorden’s worst-case delay among all stopping rules with the same \mathrm{ARL}_0. The threshold h is set from the false-alarm rate one can afford, then the delay follows: about h/(\delta - k) steps, as in ch. 5.3.
7.6 Quantile forecasts and conformal intervals
This section completes the forecasts of ch. 5.4. A reserve is sized on a high quantile of demand, not on its mean, and quantiles are learnt with a loss of their own.
Definition 7.9 — Pinball loss For a level \tau \in (0, 1), the pinball (quantile) loss of the residual u = y - q is \rho_\tau(u) = \max\big(\tau u,\ (\tau - 1) u\big).
Theorem 7.10 — The pinball loss elicits the quantile Let Y have a continuous distribution function F and a finite mean. The function q \mapsto \mathbb{E}\, \rho_\tau(Y - q) is convex, and it is minimised exactly at the \tau-quantiles, the points where F(q) = \tau.
Proof.
- \rho_\tau is convex, so is its expectation.
- The derivative of \rho_\tau(y - q) in q is -\tau when y > q and 1 - \tau when y < q.
- Hence the derivative of the expected loss is \frac{d}{dq} \mathbb{E}\, \rho_\tau(Y - q) = -\tau (1 - F(q)) + (1 - \tau) F(q) = F(q) - \tau, which vanishes exactly when F(q) = \tau. ∎
This is quantile regression (Koenker and Bassett, 1978): any model trained with \rho_\tau estimates a conditional quantile. A 90 % interval uses \tau = 0.05 and \tau = 0.95. Its coverage must be checked on test data, and it is often too low. Split conformal prediction corrects it.
Proposition 7.11 — Conformalised quantile interval Fit lower and upper quantile models \hat q_{\mathrm{lo}} and \hat q_{\mathrm{hi}} on a training set. On m calibration points compute the scores E_i = \max\big(\hat q_{\mathrm{lo}}(x_i) - y_i,\ y_i - \hat q_{\mathrm{hi}}(x_i)\big), and let \hat Q be the \lceil (m+1)(1-\alpha) \rceil-th smallest score. If calibration and test points are exchangeable, the interval \big[\hat q_{\mathrm{lo}}(x) - \hat Q,\ \hat q_{\mathrm{hi}}(x) + \hat Q\big] covers a new y with probability at least 1 - \alpha.
Proof. The test point is in the interval exactly when its score is at most \hat Q. By exchangeability its score is equally likely to take any rank among the m + 1 scores, so this happens with probability at least \lceil (m+1)(1-\alpha) \rceil / (m+1) \geq 1 - \alpha (Romano, Patterson and Candès, 2019). ∎
Time series are not exchangeable, so the guarantee is only approximate here; calibrating on the most recent weeks keeps it close.
import numpy as np
from sklearn.ensemble import HistGradientBoostingRegressor
rng = np.random.default_rng(15)
H = 24 * 7 * 20
t = np.arange(H); hour, dow = t % 24, (t // 24) % 7
base = 100 + 30 * np.exp(-((hour - 8) / 2.0) ** 2) + 25 * np.exp(-((hour - 20) / 2.5) ** 2) - 15 * (dow >= 5)
y = base + (2 + 0.08 * (base - 85)) * rng.standard_normal(H) # noise grows with demand
X = np.column_stack([hour, dow])
tr, ca, te = np.arange(0, 12 * 168), np.arange(12 * 168, 16 * 168), np.arange(16 * 168, H)
lo, hi = [HistGradientBoostingRegressor(loss="quantile", quantile=q, max_iter=200,
random_state=0).fit(X[tr], y[tr]) for q in (0.05, 0.95)]
def cover(Q):
l, h = lo.predict(X[te]) - Q, hi.predict(X[te]) + Q
return np.mean((y[te] >= l) & (y[te] <= h)), np.mean(h - l)
E = np.maximum(lo.predict(X[ca]) - y[ca], y[ca] - hi.predict(X[ca])) # conformity scores
k = int(np.ceil((ca.size + 1) * 0.9))
Q = np.sort(E)[k - 1]
for name, q in [("quantile model", 0.0), ("conformalised", Q)]:
c, w = cover(q)
print(f"{name:15s}: coverage {c:.3f}, mean width {w:.1f}")The raw quantile model covers only about 81 % of the test hours; after conformal calibration the coverage is about 90 %, at the price of wider intervals.
7.7 From forecast to decision
A forecast (ch. 5.4, ch. 6.3) saves resources only if it changes a decision: close a flood barrier, release water from a dam, restrict abstraction.
Proposition 7.12 — Cost–loss rule Protection costs C; an unprotected adverse event causes a loss L > C. If the event has probability p, the expected expense is minimal when one protects exactly if p > C / L.
Proof. Protecting costs C for sure; not protecting costs pL in expectation. The first is smaller exactly when p > C/L. ∎
Example 7.13 — The value of a flood warning Take C = 10, L = 100 (thousand euros) and an event frequency of 0.05 per day.
- Climatology only: never protecting costs 0.05 \times 100 = 5 per day, less than always protecting (10).
- Perfect forecast: protect on event days only, 0.05 \times 10 = 0.5 per day.
- Real forecast with hit rate 0.8 and false-alarm rate 0.1: the expense per day is 0.05\,(0.8 \times 10 + 0.2 \times 100) + 0.95 \times 0.1 \times 10 = 2.35.
The relative value of the forecast (Murphy, 1977) is \frac{5 - 2.35}{5 - 0.5} \approx 0.59.
Key takeaways — chapter 7
- Sampled power has an error of order \Delta^2 for smooth traces, but misses spikes; counters do not.
- First-order Sobol indices rank uncertain factors; for additive models, and for the logarithm of a product, they sum to 1.
- EOFs are the best low-rank summary of a field, ranked by variance, not by physics.
- PELT prunes candidates without losing the optimum of penalised segmentation.
- CUSUM is a likelihood-ratio recursion and is optimal for worst-case delay at a given false-alarm rate.
- The pinball loss learns quantiles; conformal calibration fixes their coverage.
- A forecast is worth what it changes: protect when the probability exceeds C/L.
8. Research directions and open problems
The three parts of the course are active research areas. This self-study chapter points to the questions that remain open, with work one can start from.
8.1 Measuring and reporting the footprint of AI
Strubell, Ganesh and McCallum (2019) drew wide attention to the energy of training language models. Patterson and coauthors (2021) then showed how strongly such estimates depend on the hardware, the data centre and the grid, and argued that some earlier figures were much too high. The lesson of ch. 2 follows: a footprint without its assumptions cannot be compared.
- Luccioni and Hernandez-Garcia (2023) surveyed the reported emissions of 95 models and found the carbon intensity of the energy to be the main source of variation.
- Dodge and coauthors (2022) measured the carbon intensity of cloud instances and showed that the choice of region and of the time of day can cut emissions substantially.
- Inference at scale (Luccioni, Jernite and Strubell, 2024), embodied emissions of accelerators (Gupta and coauthors, 2021; Wu and coauthors, 2022) and water (Li and coauthors, 2023) remain poorly documented, mostly for lack of manufacturer and operator data.
Open problems. A common, auditable method for the footprint of a model across its whole life; per-query inference measurements for deployed services; manufacturing inventories of accelerators.
8.2 Indirect and systemic effects
Kaack and coauthors (2022) argue that the largest effects of machine learning on climate are not its own emissions but those of its applications and of the system-level changes it causes. Quantitative evidence for these effects is scarce. Ligozat and coauthors (2022) apply life cycle assessment to AI solutions designed for the environment, and show that their own footprint and their indirect effects are rarely counted.
Open problems. A consequential assessment (Definition 1.7) of the adoption of an AI technology in a whole sector; measuring rebound (Proposition 1.8) for digital services, whose demand elasticities are unknown.
8.3 Machine learning for weather and climate
Data-driven medium-range weather models trained on reanalyses now compete with physics-based forecasts: GraphCast (Lam and coauthors, 2023) and Pangu-Weather (Bi and coauthors, 2023). Hybrid models that keep a differentiable dynamical core and learn the rest, such as NeuralGCM (Kochkov and coauthors, 2024), aim at climate time scales. Emulators of climate models are benchmarked by ClimateBench (Watson-Parris and coauthors, 2022).
Open problems. Stability and physical consistency over decades; skill on rare extremes, which are by definition under-represented in training data; extrapolation to a climate warmer than any training year (ch. 3.4).
8.4 Hydrology and ungauged basins
Kratzert and coauthors (2019) trained an LSTM on 531 US catchments and showed that, in catchments it has never seen, it predicts discharge better than a conceptual model (SAC-SMA) calibrated on each catchment and than the US National Water Model. Nearing and coauthors (2024) extended this to global forecasts of extreme floods, reporting reliability up to five days ahead in ungauged watersheds comparable to that of a current global system at zero lead time.
Open problems. Uncertainty that remains calibrated in regions with few gauges; non-stationarity from land-use and climate change; rating-curve errors (ch. 6.2) in the training targets themselves.
8.5 Environmental signals with few labels
Infrasound arrays, hydrophones and seismometers in polar regions record far more than experts can label, and stations differ in geometry and noise (ch. 4). Learning representations that transfer from one station to another, with few labels and physically meaningful features such as back-azimuth and apparent speed, is an open problem shared with many environmental sensors.
Open problems. Transfer between stations and seasons; evaluation by event rather than by detection; detection of rare sources against a changing noise background.
Key takeaways — chapter 8
- Footprint estimates differ mainly through carbon intensity and assumptions; common, auditable methods are still missing.
- Indirect and systemic effects probably dominate but are hardly measured.
- Machine-learning weather models are strong; climate time scales and extremes remain open.
- Hydrology shows that training across many sites helps in ungauged places.
- Environmental sensing needs methods that work with few labels and transfer between stations.
Exercises
Levels: ★ apply the course, ★★ combine or prove a short result, ★★★ open-ended. The session plan says which exercises follow which session.
★ From GPU-days to carbon. A model is trained on 8 GPUs drawing 300 W on average for 5 days, in a data centre of PUE 1.4. Compute the IT energy, the facility energy, and the emissions on grids at 50 and 450 g CO₂e/kWh (ch. 0.1, ch. 2.2).
Solution: the IT energy is 8 \times 0.3 \times 120 = 288 kWh and the facility energy 288 \times 1.4 = 403.2 kWh. The emissions are 403.2 \times 0.05 \approx 20.2\ \text{kg}, \qquad 403.2 \times 0.45 \approx 181.4\ \text{kg CO}_2\text{e}. The grid changes the result by a factor of 9; the embodied part is not included.
★ A two-process inventory. Electricity is made with 0.05 kWh of own use per kWh and emits 0.08 kg CO₂e per kWh. One server-hour uses 0.5 kWh and carries 0.02 kg CO₂e of embodied emissions. Compute the activity levels and the emissions for 100 server-hours with Theorem 1.4, then check the result with the series \sum_k M^k.
Solution: the technology matrix has columns (0.95, 0) for electricity and (-0.5, 1) for the server-hour. Solving As = (0, 100) gives s_2 = 100 and 0.95\, s_1 = 50, so s_1 \approx 52.6\ \text{kWh}, \qquad g = 0.08 \times 52.6 + 0.02 \times 100 \approx 6.21\ \text{kg CO}_2\text{e}. With M having entries 0.05 and 0.5 in its first row, the series gives first-row entries 1/0.95 \approx 1.053 and 0.5/0.95 \approx 0.526, the first row of A^{-1}.
★ Embodied share of a GPU server. A server has a manufacturing footprint of 2500 kg CO₂e, a life of 5 years, a utilisation of 60 %, and draws 3 kW in a facility of PUE 1.2. Compute its embodied rate and its embodied share at 50 and at 500 g CO₂e/kWh (Proposition 1.6).
Solution: the server is used 0.6 \times 43\,800 = 26\,280 hours, so the embodied rate is 0.095 kg/h. The operational rate is 3 \times 1.2 \times \mathrm{CI}, that is 0.18 kg/h or 1.8 kg/h. The embodied shares are \eta \approx 0.35 \quad \text{and} \quad \eta \approx 0.05.
★ When does inference win? Training a model used 50 MWh; one query costs 0.5 Wh; the service answers two million queries a day. After how many queries, and how many days, does inference dominate (Proposition 2.4)?
Solution: N^\star = 5 \times 10^7 / 0.5 = 10^8 queries, reached after 50 days. Over a year of service, inference uses about 7 times the training energy.
★ An area-weighted mean. Three latitude bands of equal width are centred at 0°, 45° and 75° and have temperature anomalies 0.8, 1.2 and 2.5 °C. Compare the plain mean with the area-weighted mean (Proposition 3.2).
Solution: the plain mean is 1.5 °C. With weights \cos 0^\circ = 1, \cos 45^\circ \approx 0.707 and \cos 75^\circ \approx 0.259, \bar x = \frac{0.8 + 0.849 + 0.647}{1.966} \approx 1.17\,^\circ\text{C}. The plain mean overweights the fast-warming high latitudes.
★ Robust z-scores by hand. Nine night flows (m³/h) are 7.9, 8.1, 8.0, 7.8, 8.3, 8.0, 12.5, 8.2, 7.9. Compute the median, the MAD and the robust z-score of 12.5; compare with the usual z-score (Definition 5.5).
Solution: the median is 8.0 and the MAD 0.1, so the robust score of 12.5 is 4.5 / 0.148 \approx 30. The mean is 8.52 and the standard deviation 1.50, inflated by the outlier itself, so the usual z-score is only 2.65 and would miss it at a threshold of 3.
★ CUSUM by hand. With \mu_0 = 8, k = 0.5 and h = 2, run the CUSUM of Definition 5.7 on 8.2, 7.6, 8.9, 9.1, 8.7, 9.4. When is the alarm raised?
Solution: the increments x_t - 8.5 are -0.3, -0.9, 0.4, 0.6, 0.2, 0.9. The statistic is S = 0,\ 0,\ 0.4,\ 1.0,\ 1.2,\ 2.1, so the alarm is raised at the sixth observation. No single value is far from 8, but the sum of small excesses is.
★ Persistence on a flashy river. Observed daily discharges are 2, 4, 9, 5, 3 and the previous day was 2. Compute the NSE of the persistence forecast (Definition 6.4).
Solution: the forecasts are 2, 2, 4, 9, 5, the errors 0, 2, 5, −4, −2, with squares summing to 49. The observed mean is 4.6 and the sum of squared deviations 29.2. Hence \mathrm{NSE} = 1 - 49/29.2 \approx -0.68, worse than predicting the mean: persistence lags every peak.
★★ Rebound for small gains. Using Proposition 1.8, show that the rebound tends to the elasticity \varepsilon when the efficiency gain r tends to 0. Compute R for r = 0.2 with \varepsilon = 0.3 and with \varepsilon = 1.2.
Solution: to first order, (1 - r)^{1 - \varepsilon} \approx 1 - (1 - \varepsilon) r, so the saving is (1 - \varepsilon) r and R \to \varepsilon.
Numerically, 0.8^{0.7} \approx 0.855 gives R \approx 0.28. For \varepsilon = 1.2, 0.8^{-0.2} \approx 1.046, so energy rises by 4.6 % and R \approx 1.23 > 1 \quad \text{(backfire)}.
★★ Attributional or consequential? A data centre adds a constant 10 MW load to a grid whose average intensity is 60 g CO₂e/kWh. In the short term the extra demand is met by gas plants at 450 g CO₂e/kWh. Compute the yearly emissions in both views. Which number belongs in the company’s annual report, and which in the decision to build the data centre (Definition 1.7)?
Solution: the load uses 10 \times 8760 = 87\,600 MWh a year. The attributional footprint is about 5 260 t CO₂e and the short-term consequential one about 39 400 t. The report allocates existing burdens, so it uses the attributional figure. The siting decision changes the system, so it calls for the consequential figure. In the long term, the margin may be new wind or solar capacity, so the time horizon must be stated.
★★ A trend that is not significant. Annual anomalies over 30 years have AR(1) residuals with standard deviation 0.15 °C and \phi = 0.5. The fitted slope is 0.010 °C per year. Test it at the 5 % level with the white-noise and with the AR(1) standard errors (Proposition 3.5). What is the effective sample size?
Solution: the white-noise standard error is \sqrt{12 \times 0.0225 / (30 \times 899)} \approx 0.0032, so t \approx 3.2, significant. The AR(1) factor (1 + \phi)/(1 - \phi) = 3 multiplies the variance, giving a standard error of 0.0055 and t \approx 1.8 < 1.96, not significant. The effective sample size is 30 \times 0.5/1.5 = 10 years.
★★ Slowness from three sensors. Sensors sit at (0, 0), (1000, 0) and (0, 1000) m (east, north). The delays of sensors 2 and 3 after sensor 1 are -1.47 s and -2.55 s. Find the slowness vector, the apparent speed and the back-azimuth (Proposition 4.3). Then show that three sensors on a line cannot give the back-azimuth.
Solution: here D is 1000 times the identity, so u = (-1.47, -2.55) \times 10^{-3} s/m. Then c = 1/\|u\| \approx 340\ \text{m/s}, \qquad \theta = \operatorname{atan2}(1.47, 2.55) \approx 30^\circ. For collinear sensors every row of D is a multiple of the same vector e, so D has rank 1 and the component of u along e^\perp is not identifiable. The array cannot tell a wave from one side of the line from its mirror image.
★★ Measuring leakage (Python). Modify the code of ch. 4.4: vary the event-level spread of the features (multiply it by 0.5, 1, 2) and the number of detections per event (5, 15, 40). Plot the gap between the random-split and the grouped balanced accuracy.
Hints and expected result: the grouped score falls as the event-level spread grows, because the classes overlap more, while the random-split score stays near 0.99, because every test detection has near-copies in training. The gap grows with both the spread and the number of detections per event. Only the grouped score is a fair estimate.
★★ Optimal partitioning by hand. Apply the recursion of Theorem 5.4 to y = (1, 1, 5, 5, 5) with the quadratic cost and \beta = 1. Give F(1), \dots, F(5) and the optimal segmentation.
Solution: F(0) = -1, then F(1) = 0 and F(2) = 0 (one segment).
For t = 3 the best last change is s = 2, so F(3) = 0 + 0 + 1 = 1; the alternatives cost 9 and 10.7.
Likewise F(4) = 1 and F(5) = 1, each with s = 2. The optimum is one change after the second point: two segments of zero cost plus one penalty.
★★ Carbon-aware scheduling (Python). A flexible 6-hour job uses 120 kWh. The grid intensity follows a daily profile with a solar dip at midday and an evening peak. Find the start time that minimises the emissions, and compare with a start at midnight.
Solution:
import numpy as np h = np.arange(48) # two days, hourly ci = 300 - 150 * np.clip(np.sin(np.pi * ((h % 24) - 7) / 12), 0, None) \ + 60 * np.exp(-(((h % 24) - 19) / 2.0) ** 2) # g CO2e/kWh: solar dip, evening peak E_job, L = 120.0, 6 # kWh, spread evenly over 6 hours cost = np.array([E_job / L * ci[s:s + L].sum() / 1000 for s in range(24)]) # start in day 1 print(f"start at 00:00 -> {cost[0]:.1f} kg; best start {np.argmin(cost):02d}:00 -> {cost.min():.1f} kg; " f"worst start {np.argmax(cost):02d}:00 -> {cost.max():.1f} kg")The best start is 10:00 with about 19.9 kg CO₂e, against 36.0 kg at midnight and 38.9 kg at 18:00. Shifting in time halves the emissions here, without any change to the job: this is the lever measured by Dodge and coauthors (2022).
★★ Who should use a yes/no flood warning? A warning has hit rate 0.7 and false-alarm rate 0.05 for an event of frequency 0.1. Compute its relative value (Example 7.13) for a user with C/L = 0.2 and for one with C/L = 0.02.
Solution: per unit of L, for C/L = 0.2 the expenses are 0.1 (climatology: never protect), 0.02 (perfect) and 0.053 (warning), so the value is about 0.59. For C/L = 0.02, climatology already says “always protect” (0.02 per day). The warning costs 0.0323, so its value is (0.02 - 0.0323)/(0.02 - 0.002) \approx -0.68 < 0. A user with very cheap protection should ignore the yes/no warning; a probabilistic forecast with threshold C/L serves every user.
★★★ The net balance under uncertainty (Python). Redo the leak-detection balance of ch. 6.4 with log-normal uncertainty on every factor. Estimate the probability that the net carbon effect is negative, and rank the factors with the indices of ch. 7.2.
Solution (one possible set of assumptions):
import numpy as np rng = np.random.default_rng(17) N = 200_000 ln = lambda med, s: np.exp(np.log(med) + s * rng.standard_normal(N)) leaks, days, flow = ln(20, 0.3), ln(10, 0.4), ln(2.0, 0.3) # per year, days earlier, m3/h kwh_m3, ci = ln(0.5, 0.3), ln(0.06, 0.4) # kWh per m3, kg CO2e per kWh emb, ops = ln(10, 0.5), ln(100, 0.5) # kg per logger, kWh per year water = leaks * days * 24 * flow net = water * kwh_m3 * ci - (50 * emb / 10 + ops * ci) print(f"water saved: median {np.median(water):.0f} m3; net carbon: median {np.median(net):.0f} kg/yr, " f"90% interval [{np.quantile(net, .05):.0f}, {np.quantile(net, .95):.0f}], " f"P(net < 0) = {np.mean(net < 0):.3f}") factors = {"leaks": leaks, "days": days, "flow": flow, "kWh/m3": kwh_m3, "carbon int.": ci, "embodied": emb, "operation": ops} for name, x in factors.items(): # binned estimator of ch. 2.5 idx = np.clip(np.digitize(x, np.quantile(x, np.linspace(0, 1, 21))) - 1, 0, 19) S = np.array([net[idx == b].mean() for b in range(20)]).var() / net.var() print(f"{name:11s} S = {S:.2f}")With these assumptions the median net effect is about 227 kg CO₂e a year, the 90 % interval is roughly 15 to 950 kg, and the probability of a negative balance is about 3 %.
The first-order indices rank the days gained and the carbon intensity first (about 0.2 each), then the number of leaks, their flow and the energy per m³ (about 0.1 each). The footprint of the loggers and of their operation hardly matters (0.01 or less). The indices sum to about 0.75: the avoided emissions are a product, so interactions carry the rest.
The answer is open: the ranking depends on the ranges chosen, which the report must justify. The water saved, about 9 600 m³, is reported separately.
★★★ A critical reading. Write a two-page critical reading of Luccioni, Viguier and Ligozat (2023), the format of the written-report option of the official assessment. State the functional unit and the boundaries, classify each assumption as measured, modelled or taken from the literature, and say whether the assessment is attributional or consequential. Then say how the conclusion would change on a grid at 400 g CO₂e/kWh.
Hints and expected result: the functional unit is the final training run; the boundaries include dynamic and idle power and the embodied emissions of the hardware, but neither the experiments before the final run nor deployment, which the paper discusses separately. The assessment is attributional (average carbon intensity of the French grid). On a 400 g grid, dynamic emissions grow about sevenfold and the embodied share falls (Proposition 1.6). A good reading ends with the one measurement that would most reduce the uncertainty.
Projects and assessment
The official assessment (master-mva.com) is 50 % continuous assessment on the labs and 50 % for a mini-project or a critical reading of a paper, graded on a written report; the Université Paris-Saclay course detail calls it non-integral continuous assessment. No written exam is announced. The lab sheets of ch. 2.6, 4 and 6 prepare the lab part; the subjects below are sized as the mini-project, and solo project 2, like Ex. 18, follows the critical-reading option. The written exam is only a self-assessment proposal.
Solo projects
- [Solo · ≈ 20 h] Paper study: the carbon footprint of BLOOM (Luccioni, Viguier and Ligozat, 2023). Question: how robust is the conclusion that idle power and manufacturing double the footprint of training?
- Rebuild the dynamic, idle and embodied terms from the inputs stated in the paper (Example 2.3).
- Put a log-normal range on each factor, compute a 90 % interval and the Sobol indices (ch. 7.2), and recompute the total for three grids and for a marginal intensity.
- Deliverables: code, a 4–6 page report, a 10-minute talk. Chapters 1, 2 and 7.
- Success: the central total within 5 % of the published 50.5 t, an interval, a ranking of the factors, and a figure of the footprint against carbon intensity.
- [Solo · ≈ 20 h] Critical reading: Strubell, Ganesh and McCallum (2019) against Patterson and coauthors (2021). Question: why do published estimates of the footprint of the same kind of training differ so much?
- List every assumption of both papers (hardware, hours, PUE, carbon intensity, what is counted) and classify it as measured, modelled or borrowed.
- Recompute one estimate of each paper from its stated assumptions, then swap the assumptions that differ, one at a time.
- Deliverables: the written report of the official option (4–6 pages) and a short notebook. Chapters 1, 2 and 8.
- Success: each recomputed figure within 10 % of the published one, and a table attributing the gap between the papers to named assumptions.
- [Solo · ≈ 20 h] Paper study: LSTM rainfall–runoff models (Kratzert and coauthors, 2018). Question: does an LSTM beat the linear reservoir of Proposition 6.3 out of sample?
- Use five catchments of the public CAMELS-GB data set (Coxon and coauthors, 2020), or the synthetic catchment of ch. 6.3 if no download is possible.
- Fit the ARX baseline and a one-layer LSTM in simulation mode, driven by rain and temperature only; split by years (Definition 0.6).
- Deliverables: code, a 4–6 page report, a 10-minute talk. Chapters 5 and 6.
- Success: test NSE per catchment for both models, with the median difference and a discussion of the peaks.
Group projects
- [Group of 2–3 · ≈ 30 h each] Environmental assessment of a machine-learning pipeline. Question: what does one thousand predictions of a small model cost, and which choices matter?
- Train three to five models on a public data set (scikit-learn digits, or CIFAR-10 on a free GPU tier) and serve one of them for a simulated day of queries.
- Measure energy with a software tracker and with a hardware counter or wall-plug meter where available; add PUE, carbon intensity and embodied emissions (ch. 2).
- Split: one member measures, one builds the life cycle model and its uncertainty (ch. 1, 7.2), one benchmarks accuracy and draws the Pareto front (Definition 2.8).
- Deliverables: code, a 6–8 page report, a 15-minute talk. Success: footprint per thousand queries with a 90 % interval, the gap between two measurement methods explained, and the break-even point of Proposition 2.4.
- [Group of 2–3 · ≈ 30 h each] An infrasound detection and classification pipeline. Question: how well can sources be separated with array features when validation is honest?
- Extend the simulator of ch. 4 to several sources (microbaroms, transient events, wind noise) with varying signal-to-noise ratio, back-azimuth and season.
- Build a detector on correlation and closure, extract features, and classify detections with grouped validation.
- Split: one member writes the simulator, one the detector and slowness estimation (Proposition 4.3), one the classifier and the evaluation.
- Deliverables: code, a 6–8 page report, a 15-minute talk. Success: back-azimuth error below 5° at signal-to-noise ratio 1, and balanced accuracy by event with a confidence interval over folds.
- [Group of 2–3 · ≈ 30 h each] Leaks and demand in a simulated water district. Question: which detector finds leaks earliest at a fixed false-alarm rate, and is the system worth its footprint?
- Simulate a year of hourly district inflow with daily and weekly cycles, temperature effects, sensor gaps and leaks of random size.
- Compare the robust z-score, CUSUM (ch. 5.3, ch. 7.5) and penalised segmentation (ch. 5.2), and forecast demand with a rolling origin (ch. 5.4).
- Split: one member writes the simulator and the data preparation, one the detectors, one the forecasts and the net balance (ch. 6.4).
- Deliverables: code, a 6–8 page report, a 15-minute talk. Success: detection delay against false alarms per year for each detector, a MASE below 1, and a net balance with an interval.
Written exam (proposal)
Two hours, one handwritten A4 sheet allowed, a calculator; four questions.
Question (5 points). Define the three orders of environmental effects of a digital technology and give one example of each for a model that forecasts electricity demand. Explain the difference between an attributional and a consequential life cycle assessment and say which one answers “should we deploy this model?”.
Expected: Definition 1.1 with fitting examples (servers; better scheduling of power plants; rebound or changed consumption); Definition 1.7; consequential, because the question is a decision, with the time horizon stated.
Question (6 points). A model is trained for 2000 GPU-hours at 400 W in a data centre of PUE 1.2 on a grid at 100 g CO₂e/kWh; embodied emissions are 0.01 kg CO₂e per GPU-hour. Each query then costs 0.2 Wh at the same PUE and grid. Compute the training footprint, its embodied share, and the number of queries after which inference dominates.
Expected: 960 kWh, hence 96 kg operational and 20 kg embodied, 116 kg in total with an embodied share of 17 %; one query costs 0.024 g, so inference dominates after about 4.8 million queries (Proposition 2.4 with the embodied part included).
Question (5 points). Prove that a linear reservoir dS/dt = P - S/k, with Q = S/k and rain constant over each step \Delta, gives Q_t = \phi Q_{t-1} + (1 - \phi) P_t with \phi = e^{-\Delta/k}. Then show that forecasting the observed mean gives an NSE of 0.
Expected: solve the linear equation on one step (Proposition 6.3); substitute \hat Q_t = \bar Q in Definition 6.4.
Question (4 points). A district’s minimum night flow has in-control mean 6 m³/h and standard deviation 0.5 m³/h. Choose the CUSUM parameters to detect a leak of 1 m³/h and estimate the detection delay with h = 2.5. Explain why a random split would overestimate the accuracy of a leak classifier trained on hourly data.
Expected: k = 0.5 (Definition 5.7), delay about h/(\delta - k) = 5 nights; neighbouring hours of the same leak are near-duplicates, so the split must be by leak or by period (Definition 0.6).
Grading rubric (proposal)
| Criterion | Weight | What earns the marks |
|---|---|---|
| Question and scope | 15 % | A precise question, a functional unit and system boundaries stated before any number |
| Correctness | 25 % | Formulas, code and units checked; results reproduced where a paper is studied |
| Uncertainty and validation | 20 % | Intervals on footprints; splits by time, site or event; baselines reported |
| Critical discussion | 20 % | Assumptions classified, limitations named, costs and benefits weighed per impact category |
| Reproducibility | 10 % | Code that runs, fixed seeds, data and sources cited |
| Clarity | 10 % | A report and a talk that a non-specialist can follow, with one key figure |
References
Official references. The course pages on master-mva.com and the Université Paris-Saclay course detail list no bibliography for 2026–2027. The works below are standard references for each chapter; the two papers coauthored by an instructor (A.-L. Ligozat) come first.
Environmental impacts of AI and life cycle assessment (ch. 1–2, 8)
- Luccioni, A. S., Viguier, S. and Ligozat, A.-L. (2023). Estimating the carbon footprint of BLOOM, a 176B parameter language model. Journal of Machine Learning Research, 24(253), 1–15.
- Ligozat, A.-L., Lefèvre, J., Bugeau, A. and Combaz, J. (2022). Unraveling the hidden environmental impacts of AI solutions for environment life cycle assessment of AI solutions. Sustainability, 14(9), 5172.
- Kaack, L. H., Donti, P. L., Strubell, E., Kamiya, G., Creutzig, F. and Rolnick, D. (2022). Aligning artificial intelligence with climate change mitigation. Nature Climate Change, 12, 518–527.
- ISO 14040:2006, Environmental management — Life cycle assessment — Principles and framework, and ISO 14044:2006, Requirements and guidelines. International Organization for Standardization.
- Heijungs, R. and Suh, S. (2002). The Computational Structure of Life Cycle Assessment. Kluwer Academic Publishers.
- Guinée, J. B. (ed.) (2002). Handbook on Life Cycle Assessment: Operational Guide to the ISO Standards. Kluwer Academic Publishers.
- Ekvall, T. and Weidema, B. P. (2004). System boundaries and input data in consequential life cycle inventory analysis. The International Journal of Life Cycle Assessment, 9(3), 161–171.
- Hilty, L. M. and Aebischer, B. (2015). ICT for sustainability: an emerging research field. In ICT Innovations for Sustainability, Advances in Intelligent Systems and Computing 310, Springer.
- Jevons, W. S. (1865). The Coal Question. Macmillan, London.
- Strubell, E., Ganesh, A. and McCallum, A. (2019). Energy and policy considerations for deep learning in NLP. Proceedings of ACL 2019, 3645–3650.
- Patterson, D., Gonzalez, J., Le, Q., Liang, C., Munguia, L.-M., Rothchild, D., So, D., Texier, M. and Dean, J. (2021). Carbon emissions and large neural network training. arXiv:2104.10350.
- Schwartz, R., Dodge, J., Smith, N. A. and Etzioni, O. (2020). Green AI. Communications of the ACM, 63(12), 54–63.
- Henderson, P., Hu, J., Romoff, J., Brunskill, E., Jurafsky, D. and Pineau, J. (2020). Towards the systematic reporting of the energy and carbon footprints of machine learning. Journal of Machine Learning Research, 21(248), 1–43.
- Anthony, L. F. W., Kanding, B. and Selvan, R. (2020). Carbontracker: tracking and predicting the carbon footprint of training deep learning models. ICML Workshop on Challenges in Deploying and Monitoring Machine Learning Systems; arXiv:2007.03051.
- Lannelongue, L., Grealey, J. and Inouye, M. (2021). Green Algorithms: quantifying the carbon footprint of computation. Advanced Science, 8(12), 2100707.
- Fan, X., Weber, W.-D. and Barroso, L. A. (2007). Power provisioning for a warehouse-sized computer. Proceedings of the 34th International Symposium on Computer Architecture (ISCA 2007).
- Gupta, U., Kim, Y. G., Lee, S., Tse, J., Lee, H.-H. S., Wei, G.-Y., Brooks, D. and Wu, C.-J. (2021). Chasing carbon: the elusive environmental footprint of computing. IEEE International Symposium on High-Performance Computer Architecture (HPCA 2021).
- Wu, C.-J. and coauthors (2022). Sustainable AI: environmental implications, challenges and opportunities. Proceedings of Machine Learning and Systems (MLSys), 4.
- Li, P., Yang, J., Islam, M. A. and Ren, S. (2023). Making AI less “thirsty”: uncovering and addressing the secret water footprint of AI models. arXiv:2304.03271.
- Luccioni, A. S., Jernite, Y. and Strubell, E. (2024). Power hungry processing: watts driving the cost of AI deployment? Proceedings of the 2024 ACM Conference on Fairness, Accountability, and Transparency (FAccT).
- Luccioni, A. S. and Hernandez-Garcia, A. (2023). Counting carbon: a survey of factors influencing the emissions of machine learning. arXiv:2302.08476.
- Dodge, J. and coauthors (2022). Measuring the carbon intensity of AI in cloud instances. Proceedings of the 2022 ACM Conference on Fairness, Accountability, and Transparency (FAccT).
- Rolnick, D. and coauthors (2022). Tackling climate change with machine learning. ACM Computing Surveys, 55(2), 42.
Climate and environmental data (ch. 3, 7.3, 8)
- Hersbach, H. and coauthors (2020). The ERA5 global reanalysis. Quarterly Journal of the Royal Meteorological Society, 146(730), 1999–2049.
- von Storch, H. and Zwiers, F. W. (1999). Statistical Analysis in Climate Research. Cambridge University Press.
- Wilks, D. S. (2019). Statistical Methods in the Atmospheric Sciences, 4th edition. Elsevier.
- Santer, B. D., Wigley, T. M. L., Boyle, J. S., Gaffen, D. J., Hnilo, J. J., Nychka, D., Parker, D. E. and Taylor, K. E. (2000). Statistical significance of trends and trend differences in layer-average atmospheric temperature time series. Journal of Geophysical Research, 105(D6), 7337–7356.
- Rantanen, M., Karpechko, A. Yu., Lipponen, A., Nordling, K., Hyvärinen, O., Ruosteenoja, K., Vihma, T. and Laaksonen, A. (2022). The Arctic has warmed nearly four times faster than the globe since 1979. Communications Earth & Environment, 3, 168.
- Hannachi, A., Jolliffe, I. T. and Stephenson, D. B. (2007). Empirical orthogonal functions and related techniques in atmospheric science: a review. International Journal of Climatology, 27(9), 1119–1152.
- Eckart, C. and Young, G. (1936). The approximation of one matrix by another of lower rank. Psychometrika, 1(3), 211–218.
- Watson-Parris, D. and coauthors (2022). ClimateBench v1.0: a benchmark for data-driven climate projections. Journal of Advances in Modeling Earth Systems, 14(10), e2021MS002954.
- Lam, R. and coauthors (2023). Learning skillful medium-range global weather forecasting. Science, 382(6677), 1416–1421.
- Bi, K., Xie, L., Zhang, H., Chen, X., Gu, X. and Tian, Q. (2023). Accurate medium-range global weather forecasting with 3D neural networks. Nature, 619, 533–538.
- Kochkov, D. and coauthors (2024). Neural general circulation models for weather and climate. Nature, 632, 1060–1066.
Infrasound and spectral analysis (ch. 4)
- Le Pichon, A., Blanc, E. and Hauchecorne, A. (eds.) (2010). Infrasound Monitoring for Atmospheric Studies. Springer.
- Cansi, Y. (1995). An automatic seismic event processing for detection and location: the P.M.C.C. method. Geophysical Research Letters, 22(9), 1021–1024.
- Welch, P. D. (1967). The use of fast Fourier transform for the estimation of power spectra: a method based on time averaging over short, modified periodograms. IEEE Transactions on Audio and Electroacoustics, 15(2), 70–73.
- Percival, D. B. and Walden, A. T. (1993). Spectral Analysis for Physical Applications. Cambridge University Press.
Sensor time series, segmentation, anomalies and forecasting (ch. 5, 7)
- Hyndman, R. J. and Athanasopoulos, G. (2021). Forecasting: Principles and Practice, 3rd edition. OTexts.
- Hyndman, R. J. and Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688.
- Cleveland, R. B., Cleveland, W. S., McRae, J. E. and Terpenning, I. (1990). STL: a seasonal-trend decomposition procedure based on loess. Journal of Official Statistics, 6(1), 3–73.
- Jackson, B. and coauthors (2005). An algorithm for optimal partitioning of data on an interval. IEEE Signal Processing Letters, 12(2), 105–108.
- Killick, R., Fearnhead, P. and Eckley, I. A. (2012). Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500), 1590–1598.
- Truong, C., Oudre, L. and Vayatis, N. (2020). Selective review of offline change point detection methods. Signal Processing, 167, 107299.
- Page, E. S. (1954). Continuous inspection schemes. Biometrika, 41(1–2), 100–115.
- Lorden, G. (1971). Procedures for reacting to a change in distribution. The Annals of Mathematical Statistics, 42(6), 1897–1908.
- Moustakides, G. V. (1986). Optimal stopping times for detecting changes in distributions. The Annals of Statistics, 14(4), 1379–1387.
- Iglewicz, B. and Hoaglin, D. C. (1993). How to Detect and Handle Outliers. ASQC Quality Press.
- Rousseeuw, P. J. and Croux, C. (1993). Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424), 1273–1283.
- Koenker, R. and Bassett, G. (1978). Regression quantiles. Econometrica, 46(1), 33–50.
- Gneiting, T. and Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477), 359–378.
- Romano, Y., Patterson, E. and Candès, E. J. (2019). Conformalized quantile regression. Advances in Neural Information Processing Systems 32 (NeurIPS 2019).
- Vovk, V., Gammerman, A. and Shafer, G. (2005). Algorithmic Learning in a Random World. Springer.
- Sobol’, I. M. (1993). Sensitivity estimates for nonlinear mathematical models. Mathematical Modelling and Computational Experiments, 1(4), 407–414.
- Saltelli, A., Annoni, P., Azzini, I., Campolongo, F., Ratto, M. and Tarantola, S. (2010). Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index. Computer Physics Communications, 181(2), 259–270.
Water cycle and decisions (ch. 6, 7.7, 8)
- Nash, J. E. and Sutcliffe, J. V. (1970). River flow forecasting through conceptual models part I — a discussion of principles. Journal of Hydrology, 10(3), 282–290.
- Kratzert, F., Klotz, D., Brenner, C., Schulz, K. and Herrnegger, M. (2018). Rainfall–runoff modelling using Long Short-Term Memory (LSTM) networks. Hydrology and Earth System Sciences, 22(11), 6005–6022.
- Kratzert, F., Klotz, D., Herrnegger, M., Sampson, A. K., Hochreiter, S. and Nearing, G. S. (2019). Toward improved predictions in ungauged basins: exploiting the power of machine learning. Water Resources Research, 55(12), 11344–11354.
- Nearing, G. and coauthors (2024). Global prediction of extreme floods in ungauged watersheds. Nature, 627, 559–563.
- Coxon, G. and coauthors (2020). CAMELS-GB: hydrometeorological time series and landscape attributes for 671 catchments in Great Britain. Earth System Science Data, 12(4), 2459–2483.
- Puust, R., Kapelan, Z., Savic, D. A. and Koppel, T. (2010). A review of methods for leakage management in pipe networks. Urban Water Journal, 7(1), 25–45.
- Murphy, A. H. (1977). The value of climatological, categorical and probabilistic forecasts in the cost-loss ratio situation. Monthly Weather Review, 105(7), 803–816.