Picture a city at rush hour and ask which district needs more buses. The answer hides in four kinds of record: numbers, a network, pictures and words. Each sees part of the truth. Switch them on and watch the guess close in.
Learn why a city is a multimodal problem, how mobility data is gathered and fused, and where AI helps a city, and where it needs a person in the loop.
Start with only Numbers on, then switch on the other three channels one at a time. Watch each dot move toward the diagonal, where the guess equals the truth. Then we build, piece by piece, the lecture’s whole argument: the scorecard, the four channels, the wicked problem, and the model that keeps its theory.
You need a feel for averages and a little curiosity about cities. We build the rest from zero.
Based on Week 13.1 of MIT MMAI, Multimodal AI (Spring 2026, MIT Multisensory Intelligence group, led by Paul Liang). The lecture, “AI for Cities and Mobility”, is by Prof. Jinhua Zhao of MIT. Lecture slides. Every idea is re-taught here in our own words and devices.
Toy city, not real data. Each of 28 districts has a hidden transit need made of four parts (what the numbers show, what the network shows, what pictures show, what reports say). Each channel reads only its own part, with a little noise, and the guess adds up the parts you switched on. The idea, one view per channel of a city, is the lecture’s (slides 40 to 46); the numbers are made up and seeded, so they are the same on every visit.
Chapter 0
Check three numbers from the scoreboard of mobility, and see why better vehicles have not made better cities
Stand on a bridge above the Southeast Expressway in Dorchester, a part of Boston, at eight in the morning. Below you the road is full. Cars crawl, brake lights glow, and every driver is late. The lecture opens with this picture. Then it shows a traffic jam in Beijing today. Then it shows Beijing in 1982: a wide street packed with bicycles, with a few buses nosing through.
Before those three photos comes one more, a collage of transport through the ages: camels, sailing ships, carriages, trains, bicycles, aeroplanes, cars. It makes a quiet point. People have always invented better ways to move. So you might expect that today, with so much invention, cities would move well. The first half hour of the lecture asks whether they do.
Prof. Jinhua Zhao of MIT teaches cities and transportation. His talk, “AI for Cities and Mobility”, is Week 13.1 of the spring 2026 course (28 April). The syllabus line reads: multimodal and cities, spatial and temporal fusion, applications in cities. No readings are listed for it. Slide 2 names three parts of the full topic. The first is AI for the future of mobility (what is success, and what defines the future). The second is AI for city planning (the human in the loop, the balance of power, and the future role of planners). The third is AI for autonomous vehicles (human agency and deployment). The third part belongs to next week’s session. This lesson follows the 78 slides in order, and the last slide shows the three parts again.
Slide 8 says “Three questions”. Each one asks you to guess a number before the slide gives it. This is a good habit: a guess shows you what you believed.
Question 1. How many people died in road crashes in the United States in 2021? The slide answers: 42,915. The next slide draws a line from that number to a target, 0. Under the line sit five technologies, each with a question mark: electric vehicles, autonomous vehicles, roadside robotics, e-scooters and e-bikes, and urban drones. The question is which of them will move us along the line, and how far.
Question 2. How much does transportation add to greenhouse gas (GHG) emissions in the US? A greenhouse gas is a gas that traps heat in the air; carbon dioxide is the best known, and “CO2e” means the amount counted in carbon dioxide terms. The slide shows a pie chart of US emissions by economic sector in 2022, from the EPA. All sectors add up to 6.3 billion tonnes of CO2e. Transportation is 1.8 billion of them.
1.8 ÷ 6.3 = 0.286, about 29%; the slide prints 28% of the US total, because its tonnages are rounded
The slide sets this beside the world figure: 28% for the US, against 16% for the world. Transport is the largest single slice of the US pie, ahead of electric power at 25% and industry at 23%.
Question 3. Is public transit affordable in Boston? The slide gives no number. The summary slide that follows answers in words: many people cannot afford it.
Slide 16 then asks, “Are we successful?” and lists four facts. Cities are heavily congested. 42,915 people were killed on US roads. Transport makes 28% of US GHG emissions. Many people cannot afford public transit in Boston. Slide 17 gives the verdict in one sentence: technology progress has not been translated to the betterment of the mobility system.
Numbers on a slide are easy to nod at. A slider makes you feel their size. In the device below, the top line is the one from slide 12: 42,915 deaths at the left, the target 0 at the right. The bars are the six sectors of the pie. Drag the two sliders to cut road deaths and transport emissions, and read what each cut buys.
The top line runs from today’s road deaths to the target of zero. The bars show each sector’s share of US emissions; the transport bar shrinks as you cut it, and a faint outline keeps its old size.
The 42,915 deaths (2021), the 28% transport share, the 6.3 and 1.8 billion tonnes (2022) and the other sector shares (rounded as the slide prints them, so they sum to 99%) are from slides 10 to 14, which cite EPA. Bar lengths are the shares; tonnes for the cut are computed as 1.8 billion times your cut. The cuts are your what-ifs, not forecasts.
Try a 50% cut in transport emissions. It removes 0.9 billion tonnes, about 14% of the whole US total. That is a huge change for one sector, and still the US has far to go. Now try the deaths line. A cut of 90% still leaves 4,292 people killed in a year. The lecture’s target is 0, and that is the point of the arrow on slide 12.
Electric vehicles cut tailpipe exhaust, but they do not shorten a queue. Autonomous vehicles may drive more safely, but nothing in the technology says who can afford a ride. A scooter helps a trip of one kilometre, and does nothing for a trip of thirty. Each tool solves a piece. The scorecard measures the whole.
That is the opening argument of the lecture. A mobility system is more than machines. It is a system of people, prices, rules and habits, and the machines are one layer of it. A better machine in a system you do not understand can leave the score the same, or worse.
Slide 18 then asks, “What will define the future?” and slide 19 answers with two words: behavior and computation. Chapter 1 takes them apart. Everything after that, the data, the four channels, the grounded rules, is a tool for this one claim.
Chapter 1
Pair two ways of thinking, about people and about data, and use them to sort any city question
You stand at a bus stop. The app says the bus is four minutes away. It feels like ten. A taxi passes, and you almost wave. Nothing about the bus has changed. Your mind has changed the clock.
This small scene holds the whole chapter. The lecture says two kinds of thinking will define the future of mobility: behavioral thinking, which asks how people really feel and choose, and computational thinking, which asks what we can do with data, algorithms and computing power. Slide 19 puts them side by side as “Behavior + Computation”.
Slide 20 asks three questions about travel, each with a picture. Is travel social? The picture is a line of ants. Is travel emotional? The picture is an angry driver. Is time absolute? The picture is a painting of melting clocks. Slide 21 adds a joke photo captioned “Laziness knows no boundaries”. Together they say: people are not the neat, calm route-choosers of a textbook.
Travel is social: people copy each other, and they judge each other by how they travel. Chapter 3 shows a test of this. Travel is emotional: fear on a dark platform and anger in a jam change what people choose. And time is not absolute: a minute spent waiting does not weigh the same as a minute spent riding. Here is a worked case, with a made-up weight for the sake of the numbers.
Weight: 1 minute of waiting feels like 2 minutes of riding (illustrative)
Route A: wait 4 + ride 20 = 24 clock minutes; felt: 4 × 2 + 20 = 28
Route B: wait 10 + ride 14 = 24 clock minutes; felt: 10 × 2 + 14 = 34
Both routes take 24 minutes on a stopwatch. The rider feels 28 on A and 34 on B, so the rider picks A. A model that adds up only clock time sees a tie, and it cannot say why A fills up. This is the failure mode of ignoring behavior: the symptom is a forecast that is wrong on exactly the routes with long waits. You measure it by comparing the forecast to the real boardings, route by route. The fix is to give the model the felt weight as an input.
Slide 22 draws one arrow. On the left stand three ingredients: data (recorded facts), an algorithm (a recipe a computer follows), and computing power (the machines that run the recipe fast). On the right stand five things they let you do. These five verbs run through the whole lecture, so learn them now.
Represent means to turn messy records into a form a computer can work with. Predict means to say what will happen next from what happened before. Explain means to say why something happened. Control means to act, in a loop, to steer a system toward a goal. Create means to make something new, such as a text, a picture or a design.
The table shows what goes in and what comes out of each verb. It uses the shapes of real data: a trip record is a row, and a model turns a block of rows into a vector (a list of numbers) or a single number.
| Verb | Goes in | Comes out | City example |
|---|---|---|---|
| Represent | raw records: N rows of (card, station, time) | a vector of d numbers per place or rider | a map of where people go |
| Predict | past data, X | one future number, y | boardings at 8:15 tomorrow |
| Explain | a model and data | a reason, such as which factor moved the result | why ridership fell after a fare rise |
| Control | the live state of the system | an action, then a new state, in a loop | hold a bus 30 seconds |
| Create | a request or constraints | something new: text, a picture, a layout | three layouts for a plaza |
Slide 58 returns to this diagram later with the same five verbs. In Chapter 7 you will see that the lecture also crosses them with five jobs a person gives to AI.
Slide 23 puts them together. On one side stands behavioral thinking, with three words: emotional, social, perceptional. On the other stands transportation technology, with four: electrification, automation, connectivity, sharing. A tilde joins them, which says “these go together”. Under both sits the computational foundation: representation, explanation, prediction, control, creation.
Read it as a stack. A new technology, say shared electric scooters, only works if people feel safe on it, copy their friends in using it, and see its value (behavior). The computing layer is how a city learns whether that is happening, and what to change.
Slide 24 then shows the lecture’s map. The first lecture, “AI for Transportation”, has four sections: S1, success and future (Chapters 0 and 1 here); S2, transportation systems, changes and data (Chapters 2 and 3); S3, grounded AI: structure, trend, why now (Chapters 4 to 7); and S4, AI tensions and opportunities (Chapters 8 and 9).
Now sort a few real city questions into the five verbs. It is harder than it looks, because one task often mixes two verbs. Choose the verb that names the main result.
Read the task. Pick the verb that names what the task produces: a picture of the past, a forecast, a reason, an action, or something new.
The six tasks are our own examples, written for this lesson, to practise the lecture’s five verbs (slide 22). They are not from the slides.
Notice what the sorter teaches. Represent and Predict look backward and forward from data. Explain asks “why”. Only Control and Create change the world or add to it. Slide 60 will use exactly this split to ask who is responsible when the AI acts.
Chapter 2
Map the parts and the people of a transportation system, and see one decision spread through all of them
A city council meets to decide on one new bike lane. The traffic engineer talks about lane widths. A shop owner talks about parking. A parent talks about school routes. A treasurer talks about cost. An advocate talks about emissions. Each person is right about the same street, and each is looking at a different part of the system.
That is why the lecture stops, after the scorecard, to ask a plain question: what is transportation? Slide 26 answers in six photos (a road junction from above, trains, an airport crowd, a container port, a delivery robot, a logging truck) and one line: the movement of people and goods. Goods matter as much as people. The container ship and the parcel van are part of the system too.
Slide 27 asks, “What is the transportation system?” and answers with three boxes side by side. Think of them as three maps of the same territory. Each map shows something the others hide.
The physical framework lists the things you could photograph: vehicles, energy (fuel, electricity, batteries) and infrastructure (roads, rails, airports, stations). The functional framework lists the forces that decide how those things behave: technological, behavioral, political and regulatory, financial and environmental. The stakeholder framework lists the people and institutions behind it all, in three groups.
Business covers traditional mobility firms (the slide names Boeing, Toyota and DHL), big tech (Alphabet and Waymo, Amazon), related industries (energy, finance, insurance, infrastructure) and start-ups. Government runs from international bodies such as the ICAO (the air-travel standards body) through national, state and municipal levels. Civil society covers non-profit groups (the slide names Greenpeace and road-safety groups), international organisations (WBCSD, the World Economic Forum, the World Bank) and academic researchers.
The slide then gives its definition in one sentence. The transportation system is the collection of stakeholders, individuals and institutions, that deliver mobility for people. Notice the order. The definition starts with people and ends with people. Vehicles and roads are only the tools they use.
Slide 29 groups the change into three columns. Technology: automation, electrification, 5G and connected vehicles, the shared economy. Data: ubiquitous sensing (sensors everywhere), AI and computing, cybersecurity, and property rights over data. Value: climate change, the future of work, public health, social justice, and urban livability. The third column matters most. It says what people want from the system, and that list is changing as fast as the machines.
Slide 30 lists six framings of transportation. Is it a congestion problem, a sustainability problem, a social justice problem, a personal identity problem, an urban creativity problem or a public health problem? A framing is a lens that decides what you measure and what you call a success. The congestion lens counts minutes. The public health lens counts breaths and injuries. The identity lens asks what a car means to its owner. A project can win under one lens and lose under another.
Here is a device that makes this concrete. Pick one decision. The map shows which of the eleven parts of the system the decision touches. The touches are our own judgement for a typical city, so treat them as a starting point for your own argument.
Three columns: the physical, functional and stakeholder frameworks. A filled box means the decision touches it. Choose a decision and count the boxes.
The eleven boxes are the lecture’s (slide 27; “Regulatory” stands for political and regulatory). Which boxes each decision touches is our own illustrative judgement for a typical city, not from the slides.
Run the three decisions in turn. A bike lane touches seven of the eleven parts. Cutting bus fares touches six, but a different six: it reaches the budget, the rules, the operators and the voters, and it leaves the road itself alone. Allowing robotaxis touches all eleven. That last result is the lesson in one picture. The more a new technology reaches into every box, the less any single expert can judge it alone.
The symptom is a project that looks great on the engineer’s chart and meets a wall of opposition on the day of the vote. You measure the problem by listing who is touched, box by box, before you decide. The fix is to read all three maps. The device does exactly that, in a few seconds. A city that skips this step finds out about the missing box later, and more loudly.
This also tells us what an AI system for a city must be able to do. It must work with a physical map, a map of forces, and a map of people. One kind of data will not be enough. Chapter 3 shows the data that exists, and Chapter 4 shows how to join it.
Chapter 3
Follow the data of London’s transport system, and link two logs of the same trip
It is 8:15 at a busy London station. A rider touches a smart card on the gate. At the same moment her phone, in her pocket, whispers to a Wi-Fi point on the concourse. A bus outside reports its position. A camera counts heads on the platform. A tweet complains about the delay. Every one of these is a record about the same morning, and none of them knows about the others.
The lecture’s first case study, on slide 32, is the “evolution of data analytics in Transport for London”. Transport for London (TfL) is the body that runs the city’s buses, Underground and roads. It makes a good teacher because it has used almost every kind of data a city can collect.
Slide 33 shows the cover of an Economist report called “The data deluge” and a list of sources. Here they are, each in one line.
Slide 34 sorts them into five kinds of data resource. Location and trajectory data say where something was and how it moved. Transaction data say what was paid for. Profile data say who a person, vehicle or place is. Sensors give multimedia data: pictures, sound, signals. And cross-platform identification is the work of knowing that two records, from two systems, belong to one person or trip.
Slide 35 shows one location example, floating-car trajectories: the GPS tracks of ordinary vehicles, drawn over a city map. Slide 36 lists sensors: loop detectors (coils buried in the road that sense passing metal), cameras, microphones and phone sensors.
Slide 37 adds an unusual kind of data. It shows an Implicit Association Test. In this test a person sorts words and pictures as fast as possible, and the speed of pairing reveals a hidden link in the mind. The slide’s setup pairs “car” with positive or negative social status, and “bus” with the opposite. The slide shows the setup, along with pictures of an eye, a head-worn EEG sensor and brain scans, but gives no result. The point is the reach: a city can study what people feel about a bus with the same care it gives to a bus’s speed. This connects straight to Chapter 1’s claim that travel is social and emotional.
Slide 38 puts it all together as multi-modal data fusion and analytics. On the left: a multimodal travel information platform, fed by Oyster, mobile CDR and Wi-Fi, the survey and customer records, and tracking apps. On the right: statistical data fusion, a toolbox that runs from regression and discrete choice modelling (Chapter 8) to machine learning (unsupervised, supervised and reinforcement) and, last, LLMs and foundation models.
Slide 39 shows how TfL got there in three phases. Each phase has a kind of data and a kind of analysis.
| Phase | Data | Analysis | What it can answer |
|---|---|---|---|
| I | manual survey | historical | what people said they did last year |
| II | Oyster-centric | real time | where riders are right now |
| III | multi-modal data fusion | predictive | where riders will be, and why |
The slide draws arrows from each phase to several kinds of analysis. Read that as: each phase keeps the earlier kinds and adds a new one. A city that moves to fusion does not throw away its survey.
Fusion sounds simple until you look at the records. A tap looks like {card: a3f9, station: KGX, t: 08:15:12}. A Wi-Fi ping looks like {device_hash: 7c1e, point: KGX-concourse, t: 08:15:19}. The card and the device hash have no shared key. The only things the two logs share are a place and a time. So you link them by asking, “which ping happened closest in time to this tap?” This is the “cross-platform identification” of slide 34, in its simplest form.
The device below makes the trade-off visible. Riders pass the gate over 150 seconds. Each tap has a ping a few seconds off (the phone and the gate do not agree to the second). A time window says how far apart a tap and a ping may be and still link. The code pairs the closest ones first, and each tap and ping can be used once.
Top lane: card taps. Bottom lane: Wi-Fi pings. A green line is a correct link, a red line a wrong one, and a ringed tap found no ping. Widen the window, then add riders.
Toy data, seeded so it is the same on every visit: each ping falls a random number of seconds from its tap (about 7 seconds spread). Links are made greedily, closest pair first, and each record is used once. Real linking has more clues than time, such as place and walking speed.
At the default of 14 riders, a 10 second window links 9 riders correctly and 3 wrongly. Widen it to 30 seconds and every tap finds a ping, but 4 of the 14 links are now wrong. Then raise the crowd to 30 riders. Most links turn wrong, because the gaps between riders are smaller than the clock errors. This is the failure mode of fusion: the symptom is a clean-looking joined table. You measure the damage by checking the links against a sample you know. The fix is more clues, a narrower window in a crowd, or an honest label on the uncertain links.
In code, the whole idea is one call. It is a sketch of the join, not a full privacy-safe pipeline.
pythontaps = taps.sort_values("t") # card, station, t pings = pings.sort_values("t") # device_hash, station, t linked = pd.merge_asof(taps, pings, on="t", by="station", tolerance=pd.Timedelta("10s"), direction="nearest") # merge_asof lets two taps claim one ping; the device above forces one-to-one
Chapter 4
Look at a city through numbers, graphs, images and language, and join all four in one network
Ask five experts to describe Chicago and you get five different answers. The architect shows you photographs of its towers. The historian reads you the story of its fire and its rebuilding. The engineer unrolls a map of its rail and road network. The economist hands you a table of its population and its household cars. All of them are describing the same city, and none of them is lying.
Slide 40 calls this the multi-channel view of cities. A channel is one kind of signal that carries information about a thing. The lecture names four for a city: images, language, graphs and numbers.
Slide 41 draws the four channels as corners of a square. The top half is qualitative, the bottom half quantitative. In the top left, images: architecture design and urban design. In the top right, language: urban anthropology, urban history, urban sociology. In the bottom left, graphs: the transport network, the electric grid, water and wastewater, gas pipelines, the telephone and internet. In the bottom right, numbers: urban economics and urban real estate.
A graph here means a network: dots (stations, junctions, substations) joined by lines (tracks, roads, cables). Notice what the square says. Each discipline that studies cities has settled in one corner, and works with one kind of record. The architect rarely reads the economist’s tables.
Slide 42 shows Plato’s Allegory of the Cave: prisoners chained in a cave see only shadows cast by a fire, and they take the shadows for the real things. Slide 44 turns the story into a joke about cities. It shows the same cave four times, labelled “cities projected to graph”, “to image”, “to natural language” and “to numbers”. A projection is a flattening: you lose something, and you keep something. Each channel is one shadow of the city. A model that sees one shadow knows that shadow well and the rest not at all.
Slide 43 shows what the four shadows look like for Chicago. Numbers: a population of 2,693,976 and 1.12 cars per household. Graphs: the transit and road networks. Images: an aerial photo, or a street-view photo. Language: a paragraph from Wikipedia, which says that Chicago is the most populous city in Illinois and the third most populous in the US, with an estimated 2,693,976 people in 2019.
The hero at the top of this page is a toy of this idea. Its four channels each read one part of a district’s transit need. With one channel on, you guess badly. With all four on, you guess well, because the parts add up.
Slide 45 gives the lecture’s proposal: “DNN: a unified framework for graphs, language, images and numbers”. A DNN is a deep neural network, a stack of simple layers that learns a function from examples. The slide first writes the usual idea of prediction, then widens it.
How can one function read a picture, a network and a paragraph? It cannot, directly. So each channel gets its own encoder, a network that turns that kind of input into a fixed-length list of numbers, called an embedding. The slide names no encoders. The usual choices are ours to add: a small network for numbers, a vision network for images (see our vision transformer lesson), a graph neural network for graphs (each node repeatedly mixes in its neighbours’ features), and a transformer for language. Each returns a vector of the same width, d. The four vectors are joined end to end, and f reads the long vector. That is the whole trick.
The device lets you wire it. Pick a channel to see its input shape and encoder. Drop a channel to see what f loses.
Left: each channel’s input shape and encoder. Middle: the four embeddings joined into one vector. Right: f and its answer. Choose a channel, press Drop, and change the embedding width.
Illustrative shapes: k numbers per place, a 224 by 224 colour tile, N nodes with f features each, and T word pieces. The slide fixes the idea (one function over four channels) but names no encoder or width; the encoders and the widths here are ours.
With d = 64 and all four channels on, f reads 4 × 64 = 256 numbers. Drop the graph channel and 64 of those 256 become zeros. That is a quarter of the input, and f never saw zeros there during training. This is the failure mode: the symptom is a forecast that collapses for a city with no street photos or no network map. You measure it by testing the model with each channel removed in turn. The fix is to train with modality dropout, which means zeroing a random channel on purpose in many training examples, so f learns to cope.
Slide 46 closes the section by repeating the square. The message is the one the hero played: no corner is the whole city.
Chapter 5
See why a city plan is a wicked problem, and why no score picks the winner for everyone
A chess program has a clear job. The board is fixed, the rules are fixed, and at the end someone has won. Now give a city a job: “reduce congestion on the bridge.” Who says what counts as reduced? Reduced for whom? At what cost, and by when? There is no board, the rules change while you play, and nobody can say when you have won.
Slide 47 asks the lecture’s next question: why is AI for cities and city planning challenging and interesting? Slide 48 answers with five short phrases. Each one is a reason the chess-program approach will not carry over.
Multimodal. You met this in Chapter 4. A city is seen through images, language, graphs and numbers, and the disciplines that own each of them rarely talk.
Inherently spatial and physical. A city sits on a map. What is near what matters, and so does what is connected to what. A road can carry only so many cars. A bridge is where it is. This is the “spatial and temporal fusion” of the syllabus line for this week: the data must be joined by place and by time, not only by table row.
Value judgement. A value judgement is a call about what matters more. Is a faster commute worth a higher toll? Is cleaner air worth a slower bus? No dataset answers this. The answer comes from people.
Public engagement. Residents are not users of a product. They are the people who live with the plan, and they have a right to be heard. A plan the public rejects does not get built.
Wicked problem. The last phrase gets its own slide, so it gets its own section.
A wicked problem is a term from planning theory, due to Horst Rittel and Melvin Webber in the 1970s. “Wicked” does not mean evil. It means resistant to a clean solution. Slide 49 lists six marks. Here is each one, with a city example.
Hold two of these in mind: solutions are judged, not checked, and you cannot try them over. They explain why “train a model to find the best plan” is the wrong first sentence for city work. A model needs a score to push up. A wicked problem has no single score.
The device makes this concrete with a toy decision. A city can add a toll, build a bus lane, build a parking garage, or do nothing. Each option is scored on four things, from 0 to 10, where more is better: speed, clean air, fairness, and low cost to the city. You choose how much each thing matters. The device adds up the weighted scores.
Bars show each option’s weighted score. Move a weight, or press a group to load the weights that group might choose. The green outline marks the winner.
Illustrative: the option scores and the four groups’ weights are made up for this lesson to show how a winner depends on weights. They are not data about any real city, and they are not from the slides. The wicked-problem marks are the lecture’s (slide 49).
Start with the default, where every weight is 5. The bus lane wins with 7.3, ahead of the toll at 6.8. Now press Commuters, who care mostly about speed: the toll wins. Press Climate group: the bus lane wins again, 8.3 to 7.5. Press Neighbours, who weigh fairness most: the bus lane. Press Treasurer: doing nothing wins, because it costs nothing.
Across these four groups, three different options win. The scores did not change. The only thing that changed was who did the weighing. This is what “value judgement” means in practice, and it is why the lecture lists “public engagement” as part of the problem and not as a courtesy afterward.
The failure mode is quiet. A team builds a tool that ranks plans. The symptom is that the top plan is always the one the team’s own weights favour. You measure it by publishing the weights and re-running the ranking with each group’s weights, as the device does. The fix is to show the weights next to the ranking, and let people change them.
Chapter 6
Run a bus line with and without a live control loop, and see where AI can help
You wait for the number 12 bus. Eighteen minutes pass. Then three number 12 buses arrive in a row, nose to tail, and the first one is full while the other two are empty. You have just met bus bunching, the most common small failure of a bus line. It happens on almost every route in every city.
This chapter covers slides 50 to 59. They map the range of transport topics, show where AI already plays a part, and give a diagram of the analytics that run a transport system. We will use bunching as the running example, because you can watch it happen.
Slide 51 gives the section’s outline: a wide range of transport topics (how to structure them), leading trends in the industry, why AI is relevant now, and what “grounded” AI means. Slide 52 shows how wide the topics are, as a cloud of 22 labels: micro-mobility, on-demand services, active mobility (walking and cycling), congestion pricing, safety, workforce, behaviour, policy, accessibility, routing, fleet management, urban bus, autonomous vehicles, public transit, urban rail, urban air mobility, electrification, smart infrastructure, zero-emission vehicles, electric vehicles, logistics, and first and last mile. The message is that one person cannot know them all, and so a structure is needed. The next slides give one.
Slide 53 shows six places where AI already manages urban mobility: traffic management, on-demand mobility operation, assisted or automated driving, proactive infrastructure maintenance, EV charging and discharging management, and smart parking. Slide 54 sets this against a chart from an industry keynote that traces the waves of AI: perception, then generative, then agentic, then physical AI (robots and self-driving cars). Those waves explain why the timing is right.
Slide 55 is the heart of the chapter. It is a diagram of transportation analytic functions, in the shape of a loop. Read it from the middle outward.
In the middle sits transport analytics, which has four jobs: monitoring (what is happening), evaluation (how well), prediction (what next) and optimization (what is best to do). On the left sits supply: the buses, trains, drivers and schedules the agency offers. Its live data feed is AVL, automatic vehicle location, which reports where each vehicle is. On the right sits demand: the people who want to travel. Its data come from AFC (automatic fare collection, the taps and tickets), APC (automatic passenger counting, sensors at doors) and client-side apps.
At the top are the off-line functions, which run slowly, on history: service and operations planning, and performance measurement. At the bottom are the real-time functions, which run now: service management and operations control, and customer information. Slide 56 asks “Can AI help?” over the same loop and adds two more players, the workforce and the customers.
Here is the key idea. The same data feeds a slow loop (plan next season’s timetable) and a fast loop (hold a bus this minute). Only the fast loop needs AI that decides in seconds. Bunching lives there.
Here is the simple story behind bunching. A bus arrives at a stop and picks up everyone who has waited since the previous bus. A long gap since the bus ahead means a big crowd, and loading a big crowd takes longer. So a late bus gets later. The bus behind it finds few passengers and runs fast. The gap between them closes until the two travel as a pair.
We can check this in a toy line, a ring route with 6 buses. In this toy, a bus’s speed falls as the gap ahead of it grows, because a long gap means a big crowd to load: speed = 0.02 ÷ (1 + 4 × gap ahead), with the gap as a fraction of the loop. A control loop adds one rule. If a bus is closer to the bus ahead than 0.9 of the even spacing, it waits at its stop. Worked case, for a bus whose gap ahead is 0.05:
Even spacing = 1 ÷ 6 = 0.167 of the loop; hold limit = 0.9 × 0.167 = 0.15
Gap ahead 0.05 < 0.15, so the bus is held: speed 0.002, not 0.02 ÷ (1 + 4 × 0.05) = 0.02 ÷ 1.2 = 0.0167
The bus ahead keeps moving, so the gap grows until it passes 0.15, and then the bus is released
The bus that crowds the one ahead waits, and the gap opens. That is a control loop: measure (AVL gives the positions), decide (compare each gap with the limit), act (hold a bus), and measure again.
Left: six buses on a ring route. A red halo marks buses travelling as a pair. Right: how uneven the spacing is over time. Let the line run with control off, then turn control on.
A toy model, not from the slides: a ring route, 6 buses that cannot pass each other, speed = 0.02 ÷ (1 + 4 × gap ahead), and control that holds a bus whose gap ahead is under 0.15 of the loop. Unevenness is the spread of the gaps divided by the even spacing; 0 is perfectly even. Real dispatching, such as the Chicago Transit Authority project on slide 61, has stops, signals and delays.
With control off, the spacing starts nearly even (spread 0.18). Within about seven seconds it climbs past 2, because the buses have merged into one pile of six. Turn control on at any moment, and the spread falls to about 0.2 within a few seconds and stays there, even from a full pile. The failure mode is the one you saw on the road: the symptom is a pile of buses and a long wait. You measure it with a gap spread from AVL data. The fix is a rule, or a learned policy, that acts on the gaps.
Slide 57 lists four leading trends: from retrospective to predictive, from mass service to individualized, from static planning to experimental, and from isolated modes to multimode integration. The enabler for all four is the pair from Chapter 1, behavior plus compute. Slide 58 repeats the computational diagram: data, algorithms and compute on the left; represent, predict, explain, control and create on the right. Slide 59 sets an exercise: draw a similar diagram for your own industry. Try it for one: what is its supply, its demand, its slow loop and its fast loop?
Chapter 7
Place AI projects on the persona grid, and test them against five grounded rules
Your agency buys an AI tool for the control room. On day one, it tells a dispatcher to hold a bus for 30 seconds. The dispatcher asks, “Why?” The tool does not say. Does the dispatcher obey? Does the dispatcher ignore it? Who is to blame if the bus is late? Questions like these, not the algorithm, decide whether the project works.
Slides 60 to 64 give the lecture’s tools for these questions. First a grid, to place any AI project. Then a short list of why now. Then five rules for AI that is grounded, and three exercises to test your own work.
Slide 60 crosses two lists. The rows are the four AI functions from Chapter 1, now with their job in one line. Represent: gather, represent and analyze information. Predict: make future predictions based on past data. Control: make automatic decisions based on past data. Create: create new high-quality content, or act as general intelligence. (Explain is not a row here.)
The columns are five human-AI personas, which say what the AI is to the person who uses it. Sense: provide new or live information to existing tasks. Assist: help people do a task better. Work: do tasks that people do today. Instruct: train people to do a task. Interface: make the interaction with people easy.
Twenty cells result. The question the grid asks of any project is: which function, and in what role? A tool that predicts to sense (a live crowding warning) is a very different thing from a tool that controls to work (a system that dispatches buses with nobody watching), although both are called “AI”.
Slide 61 places five projects from the lecturer’s own lab on the grid. We list each as printed, with its transit-agency partner.
The slide credits the work to a long list of researchers, among them Michael Leong, Awad Abdelhalim, Riccardo Fiorista, Anson Stewart, Joseph Rodriguez, Haris Koutsopoulos, Qingyi Wang, Shenhao Wang, Amelia Baum, Jiangbo Yu, John Attanucci and Jinhua Zhao. Tap the grid below to see where each lands, and what the empty cells would mean.
Rows are what the AI does, columns are its role for the person. Filled cells hold a project from slide 61. Tap any cell, or move with the arrow keys, to read what it means.
The rows, columns, their one-line definitions and the five placements are from slides 60 and 61. The reading of an empty cell is composed from the slide’s own definitions; it is a prompt for thought, not a claim that a project exists.
Seven of the twenty cells are filled. The Instruct column is empty, and the Work column holds one project. That is itself a finding: most of the lab’s work lets AI sense, assist and interface, and only one project hands a task over. The pattern fits the next ideas.
Slide 62 gives four reasons the time is right. Technology has reached a threshold where industrial-scale deployment is feasible. Markets are ready, with investors and companies putting significant capital behind AI strategies. Society presses harder than ever, as climate, congestion, safety and inequity intensify the pressure on governments and firms. And the policy picture is in flux: governments struggle to pass laws, standards and frameworks to regulate AI.
That last reason matters for the grid. When the rules are not yet written, the people who build the systems have to supply the discipline. Slide 63 calls the result grounded AI, and gives five properties.
Slide 64 gives three questions for practitioners. We apply them to the dispatching tool from the opening, so you can see the answers are concrete.
1. Can you explain your model to a regulator or a commuter? Here is the message a grounded tool would send, with its reason in plain words:
json{ "bus": "12-B", "action": "hold", "seconds": 30, "because": "gap ahead 0.05 of the loop is under the 0.15 limit; holding opens the gap", "override": "dispatcher can reject; the rejection is logged" }
2. Who benefits when the model works, and who loses when it fails? Riders at a long stop benefit, and the riders on the held bus pay 30 seconds. If it fails and holds the wrong bus, the held riders lose time for nothing. 3. With your model, who is still in control? The dispatcher, because of the override. If you cannot write that field, the answer is nobody.
The failure mode here is a tool that is accurate and still unused. The symptom is a dispatcher who clicks “reject” every time. You measure it by logging how often the advice is followed. The fix is the reason field and the override, which turn a black box into a colleague.
Chapter 8
Fit a choice model that is simple, then one that is flexible, and measure where each error comes from
A city raises the parking price downtown. Will commuters drive less? Two analysts get the same trip survey. The first is a transport economist. She fits a short formula with one number for how much cost matters, and she can explain every term to the council. The second is a data scientist. He trains a deep network that reads everything and scores higher on held-out trips, but he cannot say why it changed its answer for a single commuter. Whom should the city trust?
Slides 65 to 74 are about this quarrel. The lecture calls it a tension, and it lists three themes: tensions, synergy and interpretability. This chapter takes the tensions. Chapter 9 takes the way out.
A discrete choice model (DCM) predicts which one of a few options a person picks: drive, ride transit, walk. The most used is the multinomial logit (MNL). It gives each option a score called utility, V, built from things like cost and time. Then it turns scores into probabilities, so that the options sum to 100%.
With two options the formula shrinks to a curve you may know, the S-shaped logistic function. Worked example, with a made-up rule Vdrive − Vother = 1.5 − 0.12 × cost (in dollars):
Cost $10: 1.5 − 1.2 = 0.3; P(drive) = 1 ÷ (1 + e−0.3) = 1 ÷ 1.741 = 57%
Cost $30: 1.5 − 3.6 = −2.1; P(drive) = 1 ÷ (1 + e2.1) = 1 ÷ 9.17 = 11%
The model is small, its single cost number (here −0.12) has a meaning, and it cannot bend. A deep neural network keeps the same softmax but replaces V with a stack of learned layers, so it can bend anywhere.
Slides 68 and 69 draw two colour blocks, domain-specific models on the left and machine learning models on the right, with a curved border. Three arrows cross it: interpretation, prediction and robustness. The border is not straight, because each side wins different fights. Slide 73 sets the two paradigms side by side in a table. We reproduce it in our words.
| Property | Deep neural network | Discrete choice model |
|---|---|---|
| Prediction accuracy | high | low |
| Representation learning | automatic | handcrafted |
| Interpretability | low | high |
| Architecture and regularization | flexible | rigid |
| Robustness | low | high |
Slide 71 gives the idea that explains the table in one line: prediction error = approximation error + estimation error. Approximation error is how far the best possible model in a family still is from the truth, because the family is too simple to bend that way. Estimation error is the extra loss from learning that best model from only a few examples, which grows when the family is large. A line is cheap to learn and may miss the truth. A very flexible curve can reach the truth but wobbles on a small sample. The slide draws this as a U-shaped risk curve with MNL at the simple end and a DNN at the flexible end. It labels two moves, “enrich MNL” and “simplify DNN”, that head toward the middle. Our bias and variance lesson builds this trade from zero.
Try it. The true choice curve below is a made-up one that bends: drivers react to price in a non-straight way. You choose how flexible the model is, and how many survey trips it sees. The device fits it, live.
The grey curve is the truth; the dots on the top and bottom edges are surveyed trips (drove, did not). The teal curve is the fit. The bar splits the error into the part from a model too simple and the part from too little data.
Toy world, made up for this lesson and seeded so it is the same on every visit; it is not from the slides. The model is a logistic curve whose score is a polynomial of the drive cost; a degree-1 score is the straight line of an MNL. Error is the average extra log-loss against the true curve, in nats. Approximation error is measured with 4,000 trips; estimation error is the rest.
At 40 trips, the line has a total error of 0.186, and almost all of it (0.172) is approximation: it cannot bend, so more data would not help. Degree 3 drops the total to 0.080. Degree 7 gets the approximation almost to zero (0.002) but pays 0.098 in estimation, so the total climbs back to 0.099. The model with the lowest training loss is not the best: the training loss falls from 0.590 (line) to 0.482 (degree 7), while the true error rises from its low at degree 3. Now slide the trips up to 400. Degree 7 catches up (0.009), because more data pays the estimation cost. The failure mode is trust in the training score. The symptom is a great fit on the survey and a poor forecast for a new price. You measure it on held-out trips. The fix is to match flexibility to data, or to add structure.
Slide 72 compares what each model says as the cost of driving rises: the probability of walking, public transit, ride hail, driving and an autonomous vehicle. The MNL panel shows five smooth curves. The deep-network panel overlays many thin curves, one per trained network, with many more bends and with disagreement between them. That is the flexibility the device just showed, and also a model you cannot read. Slide 74 ends the section with six tensions, which we restate as questions. Should a model be generic or domain-specific? Should it explain or predict? Does it show causality or only correlation? Should we go from simple to complex, or from complex to simple? Do we want to understand the world or to act on it (control)? And is knowledge discovered, or created?
Chapter 9
Keep the theory and add a leash on the network, and measure the trade between accuracy and meaning
Chapter 8 ended in a standoff. The economist’s formula is readable and sturdy but too stiff. The deep network bends to fit but nobody can read it. Slide 75 gives the way out in a title: synergy in machine learning and classic models. The word asks for something better than a truce. It asks for a model in which each side repairs the other’s weakness.
Slide 76 shows the lecture’s answer, the theory-based residual neural network, or TB-ResNet. A residual is what is left over after a first guess. The idea is old and simple: make the first guess with the theory, and use the network only to learn what the theory misses. Here is the slide’s formula in one line.
Think of a student who may correct the textbook, but who must keep the corrections small unless the evidence is strong. The textbook is VT. The student’s margin notes are the network. How strict the teacher is about the notes is a knob, which the slide’s panels call λ. It is a penalty on the size of the learned part: a high λ punishes big corrections.
As data flow, there is nothing exotic. The features x (a block of shape batch by k) go through two paths. One is a linear layer, the theory. The other is a small network, the correction. The two outputs add, one score per option.
pythonclass TBResNet(nn.Module): def __init__(self, k, n_options, hidden=64): super().__init__() self.theory = nn.Linear(k, n_options) # V_T(x): readable coefficients self.resid = nn.Sequential(nn.Linear(k, hidden), nn.ReLU(), nn.Linear(hidden, n_options)) # the learned correction def forward(self, x): # x: [batch, k] return self.theory(x) + self.resid(x) # utilities: [batch, n_options] loss = F.cross_entropy(model(x), y) + lam * sum((p**2).sum() for p in model.resid.parameters())
The slide draws the fitted utility as contour maps, one per model, with a percentage printed under each. We read the percentage as prediction accuracy, but the slide does not label it. A plain deep network (a) prints 55.2%. The residual network at three settings of λ prints 56.4% (λ = 10−10), 57.3% (λ = 0.005) and 56.8% (λ = 0.01). The classic choice model (e) prints 44.7%. So in the lecture’s experiment, the residual network is the most accurate of the five, and the contours of the middle λ are far straighter than the plain network’s tangled ones, so a person can read the cost trend from them.
The device uses the same toy world as Chapter 8. Its score is the theory part (a straight line in cost, the coefficient you can defend) plus a flexible correction whose size you control with λ. We use a polynomial correction that cannot copy the straight line, so the theory part keeps its meaning. A small λ is a loose leash. A large λ is a tight one.
Grey: the truth. Dashed purple: the theory term alone, the part you can read. Teal: theory plus correction. Slide the leash from loose (left) to tight (right).
Toy world, made up for this lesson and seeded; not the slide’s data. Score = intercept + cost coefficient × cost (theory, almost unpenalised) + four curved terms (correction, penalised by λ times the sum of squares of their weights). The cost coefficient is per unit of scaled cost, where $0 to $50 maps to −1 to 1. Error is the average extra log-loss against the true curve, in nats.
At 40 trips, a tight leash (λ = 1,000) gives the theory alone: error 0.186 and a cost coefficient of −1.76. A loose leash (λ = 0.001) lets the correction run wild: error 0.310, and the cost coefficient swings to −23.4, a number that nobody could defend in public. The middle of the dial does best: at λ = 0.32 the error is 0.103, the coefficient is −2.23, and the model still reads like the economist’s formula. At 100 trips the best leash loosens, to about λ = 0.1, with error 0.043: more data lets you trust the correction more.
That is the failure mode in two directions. Too tight, and the symptom is a forecast that misses the bends (measure: the error against held-out trips). Too loose, and the symptom is a coefficient that jumps around from sample to sample (measure: refit on two halves of the data and compare). The fix is to choose λ on held-out data, and to report the theory term next to the full model.
Slide 77 gives the lecture’s own scorecard for a model. Prediction accuracy comes first. Then interpretability, written “FAT” (usually read as fairness, accountability and transparency). Then sparsity: few moving parts. Then robustness, with security in brackets: a model that does not break when someone pushes on it. Last, practicality. Notice that accuracy is one of five. The lecture asks you to grade a model on all five, as the grounded rules of Chapter 7 asked you to grade a project.
Slide 78 repeats the opening agenda: AI for the future of mobility, AI for city planning, and AI for autonomous vehicles. The first two parts are what this lesson covered; the third is next week’s session.
Chapter 10
Review the numbers, the terms, the core code and the checklist on one page
You can now rebuild Week 13.1 of MIT MMAI from memory. A city fails its scorecard even with better machines (Chapter 0). Two kinds of thinking, behavioral and computational, will define the future, and five verbs name what computing can do (Chapter 1). The transportation system is three maps at once: things, forces and people (Chapter 2). Its data are many and unlinked, and linking them has a price (Chapter 3). A city has four channels, which one network can read together (Chapter 4). City planning is a wicked problem, where the winner depends on who weighs (Chapter 5). AI helps most in real-time loops such as dispatching (Chapter 6), and a project is grounded when it passes five tests (Chapter 7). The model that serves a city must balance accuracy and meaning (Chapter 8), and one way is to keep the theory and put a network on a leash (Chapter 9).
| What | Number or term | Why it matters |
|---|---|---|
| US road deaths, 2021 | 42,915 (target 0) | The scorecard says technology has not yet closed the gap |
| Transport share of US GHG, 2022 | 28% (1.8 of 6.3 billion tonnes CO2e); world 16% | The largest US sector |
| The five verbs | represent, predict, explain, control, create | What data, algorithms and computing power can do |
| Three frameworks | physical (3 parts), functional (5), stakeholder (3 groups) | Three maps of one system |
| TfL analytics phases | survey and historical, Oyster and real time, fusion and predictive | Each phase adds a kind of analysis |
| Four channels | images, language, graphs, numbers (GLIN) | Each is one shadow of the city |
| Chicago example | 2,693,976 people; 1.12 cars per household | The numeric channel of one city |
| Wicked problem | 6 marks, e.g. no stopping rule, one-shot solutions | No single score picks the winner |
| Persona grid | 4 functions × 5 personas; 7 of 20 cells filled | Says what the AI does and for whom |
| Grounded AI | 5 properties, 3 exercises | Problem-driven, context-aware, human-in-the-loop, deployable, co-developed |
| Prediction error | approximation + estimation | Why flexible models need more data |
| TB-ResNet | V = VT + δ VDNN; 55.2% (DNN), 57.3% (best ResNet), 44.7% (choice model) | Theory plus a leashed network |
| Criteria of a good model | accuracy, interpretability (FAT), sparsity, robustness, practicality | Five tests, not one |
The lecture’s unified framework fits in a few lines. This is a sketch: MLP, vit_small, GNN and TextEncoder stand for any encoder you choose, since the slide names none. The shapes are in the comments.
pythonclass CityFusion(nn.Module): def __init__(self, k, f, vocab, d=64): super().__init__() self.num = MLP(k, d) # numbers [B, k] -> [B, d] self.img = vit_small(out=d) # images [B, 3, 224, 224] -> [B, d] self.gra = GNN(f, d) # graph nodes [N, f] + edges -> [B, d] self.txt = TextEncoder(vocab, d)# language [B, T] word ids -> [B, d] self.head = nn.Sequential(nn.Linear(4 * d, 128), nn.ReLU(), nn.Linear(128, 1)) # f def forward(self, num, img, graph, tokens, p_drop=0.2): z = [self.num(num), self.img(img), self.gra(graph), self.txt(tokens)] # four [B, d] vectors if self.training: # modality dropout (Chapter 4) z = [zi * (torch.rand(zi.size(0), 1) > p_drop).float() for zi in z] return self.head(torch.cat(z, dim=1)) # [B, 4d] -> [B, 1]
This is Week 13.1 of the course (28 April). The syllabus line for it reads multimodal and cities, spatial and temporal fusion, applications in cities. Week 12 covered prescriptive modeling and agent pipelines. The next session, Week 13.2 (30 April), is multimodal and transportation: autonomous vehicles and applications in transportation. The course’s own slides and videos are on the schedule page.
Credit: this lesson re-teaches the lecture “AI for Cities and Mobility” by Prof. Jinhua Zhao (MIT), given in MIT MMAI, Multimodal AI, Spring 2026, a course of the MIT Multisensory Intelligence group led by Paul Liang. Slides: lecture 13.1. All devices, numbers marked illustrative, and wording are ours. Try the Teach button to explain it back on a whiteboard, or go back to the four channels.