Module 1 — The past, present and future
Lesson 5 of 6
Space matters too
Events do not only happen in time.
They happen somewhere.
A temperature measurement has a location.
A vehicle occupies a particular part of a road.
Electricity is generated and consumed at particular points on a network.
A disease spreads between people and places.
Rain falls in one area while somewhere nearby remains dry.
A shop experiences demand from the people who can reach it.
A robot needs to know not only that an obstacle exists, but where that obstacle is relative to itself.
So when we ask:
What happened?
we often also need to ask:
Where did it happen?
Space provides context.
And just as ignoring time can destroy important information about a system, ignoring space can do the same.
Data exists somewhere
Consider a simple temperature measurement:
18°C
What does it tell us?
Not very much.
Now add a time:
18°C at 14:00
That gives us more information.
Now add a location:
18°C at 14:00 in Dublin
The observation has become much more meaningful.
A useful representation is therefore:
VALUE + TIME + LOCATION
Many real-world datasets have exactly this structure.
For example:
electricity demand + 18:00 + Dublin
rainfall + 09:30 + Cork
vehicle speed + 08:15 + motorway segment
air pollution + 17:00 + monitoring station
hospital admissions + Monday + local health region
The value alone tells only part of the story.
Time tells us when.
Space tells us where.
The world is spatially uneven
Many quantities are not distributed evenly across space.
Consider rainfall.
It might be raining heavily in one part of a country and completely dry in another.
Or electricity.
One region might have abundant wind generation while another has very little generation and high demand.
Or traffic.
One road may be congested while another road a few kilometres away is almost empty.
Or housing.
Prices can differ enormously between neighbouring areas.
The average condition across a large area can therefore hide what is actually happening locally.
This gives us an important principle:
Where something happens can be as important as how much of it happens.
Averages can hide the system
Suppose we have two towns.
Town A has a temperature of:
10°C
Town B has a temperature of:
30°C
The average temperature is:
20°C
That average is mathematically correct.
But there is a problem.
Neither town is actually experiencing 20°C.
The average describes the group.
It does not describe either location.
This is a simple example of spatial aggregation.
We have taken observations from different places and combined them into a single value.
Aggregation can be useful.
But it can also destroy information.
Spatial aggregation
Imagine a country divided into four regions:
| Region | Electricity demand | Electricity generation |
|---|---|---|
| North | 1 GW | 4 GW |
| South | 4 GW | 1 GW |
| East | 2 GW | 2 GW |
| West | 2 GW | 2 GW |
Across the whole country:
Total demand = 9 GW
Total generation = 9 GW
At the national level, the system appears perfectly balanced.
Generation equals demand.
But locally, something very different is happening.
The North has:
3 GW surplus
The South has:
3 GW deficit
Electricity therefore needs to move from one place to another.
Whether that is possible depends on the network connecting them.
The national total has hidden the spatial problem.
The same total can describe very different systems
Consider two electricity systems.
System A
Every region generates exactly as much electricity as it consumes.
System B
Almost all generation is concentrated in the north while most demand is concentrated in the south.
Suppose both systems have:
100 GW generation
and:
100 GW demand
If we look only at national totals, they appear identical.
Physically, they are not.
System B requires much more electricity to move through the network.
It may experience:
- congestion,
- transmission losses,
- network constraints,
- curtailment,
- local shortages.
The aggregate data has removed the information needed to see those differences.
This is why spatial structure matters.
Aggregation is a form of compression
Whenever we aggregate data, we compress information.
Suppose we begin with:
1,000 individual observations
and replace them with:
one average
We have deliberately discarded information.
That may be useful.
Instead of analysing every household's electricity consumption, we might want to know the average consumption of a neighbourhood.
Instead of storing every individual temperature measurement, we might want a regional average.
But compression comes with a cost.
Once the detail is removed, some questions can no longer be answered.
If we know only the average electricity consumption of a city, we cannot determine which neighbourhood is experiencing peak demand.
If we know only national rainfall, we cannot determine where flooding is likely.
If we know only average journey time, we cannot determine which roads are congested.
Aggregation therefore creates a trade-off:
simplicity ↔ information
The scale of observation matters
Suppose we are studying unemployment.
We could measure it at:
- national level,
- regional level,
- city level,
- neighbourhood level,
- household level,
- individual level.
Each scale reveals something different.
A national unemployment rate might appear relatively low.
But particular towns may have very high unemployment.
Within those towns, particular communities may be affected much more strongly than others.
The national statistic is not wrong.
It simply answers a different question.
This gives us another important principle:
Patterns visible at one spatial scale may disappear at another.
Zooming changes what we see
Imagine looking at Earth from space.
You can see continents.
Move closer and you see countries.
Closer again and you see cities.
Then roads.
Then buildings.
Then rooms.
At each scale, different structures become visible.
Data behaves similarly.
A model trained at national scale may identify national patterns.
A model trained at neighbourhood scale may identify local patterns.
Neither is automatically better.
The appropriate scale depends on the problem we are trying to solve.
Local and global information
This leads to an important distinction between local and global information.
Local information
Describes conditions close to a particular location.
For example:
- traffic on the road ahead,
- temperature inside a building,
- electricity demand on a local network,
- rainfall over a particular catchment,
- available hospital beds in a particular hospital.
Global information
Describes the wider system.
For example:
- national traffic patterns,
- national electricity demand,
- average national temperature,
- total hospital capacity,
- global economic conditions.
Both can matter.
The challenge is understanding which information is relevant to the decision being made.
A local decision may need local information
Imagine an autonomous vehicle approaching a junction.
The average traffic speed across the entire city might be:
32 km/h
That information is almost useless for deciding whether the vehicle should brake.
The vehicle needs to know:
- where nearby vehicles are,
- where pedestrians are,
- the state of the traffic light,
- its own position,
- its own velocity.
The decision is local.
The relevant information is therefore largely local.
This illustrates an important design principle:
The spatial scale of the information should match the spatial scale of the decision.
But local decisions can depend on global conditions
Local information is not always enough.
Suppose a navigation system is deciding which road a vehicle should take.
It needs information about the immediate surroundings.
But it may also benefit from knowing:
- congestion elsewhere,
- road closures across the city,
- expected demand,
- major events,
- weather conditions.
The best decision may therefore combine:
LOCAL STATE + WIDER SYSTEM STATE
This pattern appears repeatedly in intelligent systems.
A local controller may need local measurements while still responding to wider system conditions.
Local predictions and global predictions
Prediction can also happen at different spatial scales.
Consider electricity demand.
A model might predict:
national electricity demand tomorrow = 45 GW
That is a global prediction.
Another model might predict demand separately for:
- Dublin,
- Cork,
- Galway,
- Limerick.
Another might predict demand for individual substations.
Another might predict individual buildings.
These predictions answer different questions.
A national forecast may be useful for estimating total generation requirements.
A local forecast may be necessary for determining whether a particular network asset will become overloaded.
A system can therefore be globally balanced while locally constrained.
The global prediction alone may not reveal the problem.
Local patterns may cancel each other out
Spatial aggregation can hide relationships because different locations may behave differently.
Suppose two regions respond differently to temperature.
In Region A:
higher temperature → higher electricity demand
because air conditioning is common.
In Region B:
higher temperature → lower electricity demand
because heating demand falls.
If we combine the two regions into one dataset, the effects may partially cancel.
The aggregate data might suggest:
temperature has little relationship with electricity demand
But locally, temperature may be extremely important.
The relationship has not disappeared.
Aggregation has hidden it.
Global patterns may not apply locally
A model might learn that, nationally:
Higher income is associated with higher electricity consumption.
But that relationship may not hold in every neighbourhood.
Some areas may contain:
- highly efficient buildings,
- different household sizes,
- different heating technologies,
- different climates,
- different lifestyles.
A global relationship is an average relationship across many different contexts.
Applying it blindly to every local situation can produce poor predictions.
This is one reason models need to understand context.
Geography can act as a proxy
Location can reveal much more than physical position.
A postcode may correlate with:
- income,
- property values,
- ethnicity,
- education,
- access to transport,
- healthcare availability,
- environmental quality,
- employment opportunities.
This makes spatial data extremely powerful.
It also makes it potentially dangerous.
Suppose an AI system uses location to predict credit risk.
Even if the model is not explicitly given information about protected characteristics, location may indirectly encode some of them.
The model may therefore reproduce historical inequalities through geography.
This is an important example of a proxy variable.
We will return to this when we study fairness and bias.
Spatial data reflects historical decisions
Geography is not always neutral.
Cities, transport systems, electricity networks, housing markets and public services have been shaped by previous decisions.
Where infrastructure exists today reflects decisions made in the past.
Where wealthy and poor communities live reflects economic and social history.
Where pollution is concentrated may reflect historical industrial development.
Where public transport is available reflects previous investment.
So when an AI model learns from spatial data, it may also be learning the consequences of historical policy and institutional choices.
Once again:
Historical data contains history.
And spatial data can make that history particularly visible.
Distance matters
Two locations may have similar characteristics but be separated by very different distances.
Distance can affect:
- travel time,
- transport cost,
- network losses,
- communication latency,
- access to services,
- social interaction.
Consider a hospital.
Two patients may both live within the same administrative region.
But one may live five minutes from the hospital while the other lives two hours away.
Treating them as spatially identical because they share a region loses important information.
The boundaries we use to group data are often administrative conveniences rather than descriptions of how systems actually interact.
Connectivity can matter more than distance
Physical distance is not always the most important measure.
Two locations might be geographically close but poorly connected.
Two other locations might be far apart but connected by:
- a motorway,
- a high-speed railway,
- a transmission line,
- a fibre-optic cable,
- a direct flight.
For many systems, what matters is not simply:
How far apart are these places?
but:
How are they connected?
This introduces the idea of a network.
Space often becomes a network
Many spatial systems can be represented as networks.
A road network contains:
- junctions,
- roads.
An electricity network contains:
- buses or connection points,
- transmission and distribution lines.
A communications network contains:
- routers,
- links.
A social network contains:
- people,
- relationships.
The relevant notion of space is then partly determined by the connections between locations.
Two nodes may be physically close but weakly connected.
Others may be physically distant but strongly connected.
For prediction and decision-making, the structure of those connections can be crucial.
Neighbours influence each other
Spatial observations are often related to nearby observations.
If it is raining heavily in one location, nearby locations may also experience rain.
If one road becomes congested, traffic may spill onto neighbouring roads.
If an infectious disease spreads in one community, nearby communities may face increased risk.
If electricity demand rises sharply at one point on a network, neighbouring infrastructure may be affected.
This means spatial data often contains dependencies.
Locations cannot always be treated as independent observations.
What happens here may influence what happens there.
Events propagate through space
Some processes move through spatial systems.
A weather front moves across a country.
Traffic congestion propagates backwards along a road.
Electricity flows through a network.
A disease spreads between communities.
Information spreads through social networks.
A robot moves through its environment.
Prediction therefore sometimes requires understanding not just locations, but how states propagate between locations over time.
This brings time and space together.
Spatiotemporal prediction
Many important AI problems are therefore spatiotemporal.
They ask:
What will happen, where, and when?
Examples include:
- weather forecasting,
- traffic forecasting,
- electricity demand forecasting,
- renewable generation forecasting,
- wildfire prediction,
- flood forecasting,
- disease modelling,
- autonomous driving.
A weather model might predict:
rainfall + location + future time
A traffic model might predict:
vehicle density + road segment + future time
An electricity model might predict:
demand + network location + future time
Time and space cannot always be separated.
The future unfolds somewhere.
A prediction can be right globally and wrong locally
Suppose a model predicts total electricity demand across ten regions.
The true total is:
10 GW
The model also predicts:
10 GW
Perfect.
But suppose the real distribution is:
| Region | Actual demand | Predicted demand |
|---|---|---|
| A | 4 GW | 1 GW |
| B | 1 GW | 4 GW |
| Others | 5 GW | 5 GW |
The national forecast is exactly correct.
The spatial forecast is badly wrong.
If electricity could move freely and without limit between every location, perhaps this would not matter.
But real networks have constraints.
The local errors may therefore be operationally much more important than the perfect global total suggests.
This gives us a crucial lesson:
Accuracy at an aggregate level does not guarantee accuracy where decisions actually need to be made.
Aggregation can make a model look better
This creates an interesting issue when evaluating predictions.
Suppose we forecast electricity consumption for 1,000 households.
Individual household demand is difficult to predict.
People behave unpredictably.
One person cooks earlier than expected.
Another arrives home late.
Another charges an electric vehicle.
When we aggregate all 1,000 households, many individual errors cancel each other out.
The total may be much easier to predict.
So aggregation can improve apparent predictability.
But that does not mean the individual uncertainty has disappeared.
It has simply become less visible at the aggregate scale.
Disaggregation reveals diversity
The reverse process is disaggregation.
Instead of asking:
What is total demand?
we ask:
Where is that demand coming from?
We might break electricity demand down by:
- region,
- neighbourhood,
- building,
- household,
- appliance.
Or healthcare demand by:
- country,
- region,
- hospital,
- clinic,
- patient group.
Disaggregation reveals heterogeneity.
Different people, places and resources behave differently.
That diversity can be important for both prediction and service design.
The right resolution depends on the problem
More spatial detail is not always better.
Extremely detailed data can be:
- expensive to collect,
- expensive to process,
- noisy,
- difficult to interpret,
- privacy-sensitive.
Imagine tracking the precise location of every person in a city continuously.
That might improve some predictions.
It would also create enormous privacy concerns.
So spatial resolution is a design choice.
We need enough detail to make useful decisions without collecting unnecessary information.
The right question is not:
How much spatial detail can we collect?
It is:
What spatial detail is necessary for the decision we are trying to make?
AI can learn spatial structure
Modern AI systems can learn relationships across space.
Computer-vision models learn that nearby pixels form shapes and objects.
Traffic models can learn relationships between connected roads.
Weather models can learn how atmospheric conditions evolve across regions.
Graph neural networks can learn relationships between connected nodes.
Robotic systems construct representations of their surroundings.
The underlying idea is similar:
location + relationship + context
provide information about what may happen next.
AI therefore does not only learn patterns across examples.
It can learn patterns across space.
Robotics makes space unavoidable
For a robot, space is fundamental.
A robot needs to understand:
- where it is,
- where objects are,
- where it wants to go,
- what paths are possible,
- which areas are occupied,
- how the environment is changing.
This requires a representation of the world.
A mobile robot might build a map.
It might estimate its position within that map.
It might track moving objects.
It might predict where those objects will be next.
It might then plan a route.
The loop becomes:
OBSERVE → LOCATE → MAP → PREDICT → PLAN → MOVE → OBSERVE AGAIN
Artificial intelligence becomes tightly connected to geometry, state estimation, prediction and control.
Local intelligence versus central intelligence
Spatial systems also raise an architectural question.
Where should decisions be made?
Imagine thousands of intelligent devices spread across an electricity network.
One approach is to send all information to a central system:
LOCAL DATA → CENTRAL MODEL → CENTRAL DECISION
Another approach is for devices to make decisions locally:
LOCAL DATA → LOCAL MODEL → LOCAL DECISION
Or the system might combine both:
LOCAL INFORMATION + SYSTEM INFORMATION → DISTRIBUTED DECISIONS
Each architecture has advantages and disadvantages.
Centralised systems may have a broader view.
Local systems may respond faster and require less communication.
Distributed systems may be more scalable but require coordination.
This question appears in:
- robotics,
- electricity networks,
- transport systems,
- telecommunications,
- cloud computing,
- multi-agent AI.
Shared resources make location important
Space becomes particularly important when many users share constrained resources.
Consider road capacity.
A city may have plenty of total road capacity.
But that does not help if everyone wants to use the same road at the same time.
Or electricity.
A country may have enough total generation.
But a local network may not have enough capacity to deliver electricity to a particular area.
Or computing.
A company may have enormous total computing capacity.
But latency-sensitive applications may require compute close to particular users.
Scarcity is therefore often not simply:
How much resource exists?
It is:
How much resource exists here, at this time, for these users?
This will become central when we study the design of services for shared resources.
Time and space together define availability
Suppose there is abundant solar electricity in one location at midday.
A user needs electricity somewhere else at midnight.
At an aggregate level, we might say:
energy was available
But it was not available:
at the right place
and:
at the right time.
Resources therefore have spatial and temporal value.
The same principle applies to:
- hospital beds,
- vehicles,
- computing capacity,
- workers,
- food,
- water,
- electricity.
Availability is often a question of:
WHAT + WHERE + WHEN
The same data can answer different questions
Suppose we have a dataset containing millions of journeys.
At national scale we might ask:
How many journeys occur each day?
At city scale:
Which cities experience the most congestion?
At neighbourhood scale:
Which streets experience the highest traffic?
At individual scale:
Where is this particular vehicle likely to go next?
The dataset may be similar.
The question changes.
And when the question changes, the appropriate spatial representation may change too.
This is why modelling always begins with deciding what problem we are actually trying to solve.
Space can change the meaning of prediction
Consider the statement:
Demand will increase by 10% tomorrow.
Where?
Across the entire country?
In one city?
At one electricity substation?
For one shop?
For one hospital?
Without location, the prediction may be too vague to support a useful decision.
A more complete prediction often needs to answer:
WHAT?
WHERE?
WHEN?
and increasingly:
HOW UNCERTAIN ARE WE?
These dimensions together describe much more useful information about possible futures.
From one future to a map of futures
In the previous lesson, we represented prediction as:
PRESENT STATE → POSSIBLE FUTURE STATE
We can now make that richer.
The present state is distributed across space.
Different places may have different conditions.
So instead of predicting one future value, we may predict a future spatial state.
For example:
CURRENT WEATHER MAP → FUTURE WEATHER MAP
or:
CURRENT TRAFFIC NETWORK → FUTURE TRAFFIC NETWORK
or:
CURRENT ELECTRICITY NETWORK → FUTURE ELECTRICITY NETWORK
The prediction becomes a map of possible future conditions.
And because the future remains uncertain, there may be many possible future maps.
The course framework gains another dimension
Our framework so far has largely been temporal:
PAST → DATA → PRESENT STATE → POSSIBLE FUTURES
We can now add space.
Data describes:
WHAT happened
WHEN it happened
WHERE it happened
The present state becomes:
the condition of the system across locations now
And prediction becomes:
what may happen across those locations next
So a more complete picture is:
PAST OBSERVATIONS ACROSS SPACE
↓
PRESENT SPATIAL STATE
↓
MODEL
↓
POSSIBLE FUTURE STATES ACROSS SPACE
Time tells us how the system changes.
Space tells us where those changes occur.
The central idea
Data without location can hide important structure.
Averages across large areas may be mathematically correct while describing conditions that exist nowhere.
A system can appear balanced globally while experiencing severe local shortages or surpluses.
A prediction can be accurate in aggregate while being wrong exactly where a decision needs to be made.
The world is not only dynamic. It is distributed across space.
Good prediction therefore requires us to think carefully about both when and where.
We need to ask:
What happened?
When did it happen?
Where did it happen?
What is happening there now?
What might happen there next?
And:
At what spatial scale does the decision actually matter?
In the next lesson, we will examine another fundamental limitation.
Even when we have excellent data about time and space, the model we build from that data is still not the world itself.
It is a representation of the world.
And every representation leaves something out.