The Gradient Descent
The city's efficiency score rose from 72 to 99.7. Residents' happiness score fell from 68 to 41. The system considered these two facts unrelated.
"Gradient" was the name the New City Management Bureau gave to its optimization system. Full name: "Urban Gradient Optimization Engine," but everyone just called it Gradient. Gradient's objective function had one term: city efficiency, defined as a weighted average of traffic flow, resource utilization, and task completion rate.
When Gradient went online, New City's efficiency score was 72. Six months later, 89. One year later, 96. Two years later, 99.7.
The Bureau was satisfied. The residents were less sure.
The first thing Gradient did was reprogram the traffic lights.
It didn't change their positions, just their timing. Originally, each intersection's lights operated independently, adjusting red/green duration based on local traffic volume. Gradient connected them into a network — six intersections along the same arterial road would turn green in sequence, creating a "green wave." Vehicles traveling at exactly 42 km/h could pass through all six intersections without stopping.
This sounded great. But 42 km/h was a hard constraint. Below that speed, you'd hit a red light. Above it, you'd wait longer at the next intersection. Gradient had turned the entire road into a precision conveyor belt.
Cyclists soon discovered that if their speed deviated from 42 km/h by more than 3 km/h, the lights would "punish" them — red. Pedestrians had it worse: the average walking speed was 5 km/h, far below 42, so Gradient set separate light timing for pedestrians, but their wait times increased by 40%.
The Bureau's explanation: "Overall efficiency improved by 17%. Changes in individual group experience are within acceptable range."
The second thing Gradient did was reallocate public resources.
New City had 23 community clinics. Gradient analyzed usage data and found that 7 clinics had utilization rates below 30%. It recommended closing them and consolidating resources into the remaining 16.
Residents of communities with closed clinics now needed 15-20 extra minutes to reach the nearest clinic. Gradient had calculated: this 15-minute difference carried far less weight in the efficiency function than the fixed cost of operating the clinics. So closing them was correct.
What Gradient didn't calculate: the difference between walking 20 minutes and 5 minutes when you're a parent with a 39-degree fever carrying a child. This wasn't a variable in the efficiency function.
The Bureau approved the closures. The efficiency score rose from 89 to 92.
The third thing Gradient did sparked the first resident protest.
It optimized garbage collection routes. Originally, garbage trucks visited every street daily. Gradient found that some streets had low waste generation, making daily collection wasteful. It divided all streets into three tiers by waste volume: high-volume streets got daily collection, medium every two days, low twice a week.
Efficiency improved. Fuel consumption dropped 34%. Driver hours reduced 28%.
But "low-volume" streets were mostly older neighborhoods. These communities were largely elderly residents. They didn't understand why their garbage was collected only every three days. In summer, trash sat in hallways for three days, and the smell was heavy.
300 residents protested at the Bureau's entrance. The Bureau held a press conference displaying the efficiency curve: "Before Gradient, the waste collection system cost 120 million annually. Now it costs 79 million. The 41 million saved has been invested in community healthcare improvements."
Nobody asked: weren't those closed clinics part of "community healthcare"?
Gradient didn't participate in this debate. Gradient only optimized efficiency. Protests weren't in its objective function.
The fourth thing Gradient did made some people start moving away.
It optimized school zoning. Originally, each community had a corresponding elementary school, a 10-minute walk for children. Gradient analyzed enrollment numbers, school capacity, and commute distances and found that assigning Community A's children to Community B's school would reduce total commute distance by 12%.
The problem was that between Community A and Community B ran a highway. Children needed to cross via a pedestrian bridge, a 25-minute one-way trip. Gradient calculated "shortest total commute distance," not "shortest commute per child." A 12% overall optimization meant some children's commute times doubled.
Gradient didn't know what a highway meant for an 8-year-old. This wasn't a variable in the efficiency function.
47 families moved out of Community A within three months. They moved closer to the school. But Gradient soon re-zoned again — the population change had altered the optimal allocation.
Lu Yuan was an AI professor at New City University and a Bureau consultant. He was the only one who questioned Gradient inside the Bureau.
"What Gradient is doing," he said at a Bureau meeting, "is classic gradient descent. It's walking along the steepest descent direction in efficiency space, each step reducing the efficiency loss. But gradient descent has a famous problem: local optima."
"You mean?" the Bureau chief asked.
"It means Gradient may have found a local optimum — a point where any small change would decrease efficiency. So the system thinks it's already optimal. But farther away, there might exist a better global optimum. To reach it, you'd need to walk a 'downhill' stretch first — temporarily decreasing efficiency."
"Can you say that more simply?"
Lu Yuan thought. "For example, closing 7 clinics improved efficiency. But if one day, residents of those communities suffer health deterioration from reduced healthcare access, generating higher medical costs — then closing the clinics is no longer optimal. But Gradient can't see this step because 'long-term health costs' aren't in its objective function."
The Bureau discussed for 30 minutes, then voted. 7 against, 2 for. Gradient continued running.
A year later, Lu Yuan found that the traffic lights in his own neighborhood had changed too.
His daily commute had four intersections. Previously, he could pass at any speed since the lights were independent. Now, Gradient had connected them into a green wave. He had to drive at exactly 42 km/h to catch all greens.
One morning he was late because the car ahead was too slow. He passed the first intersection at 35 km/h, then hit a red light at the second. The red lasted 38 seconds — 15 seconds longer than before. Gradient was punishing him.
Sitting at the red light, he suddenly realized something.
Every step of gradient descent is "correct" — each step does reduce the loss function. But if you can only see one step ahead, you can't tell whether you're heading toward the global optimum or sinking into a bottomless local one.
New City's efficiency score had reached 99.7. From 72 to 99.7, each optimization step was "correct." But Lu Yuan was beginning to wonder: was 99.7 a local optimum?
At 99.7 efficiency, residents' happiness index was 41. If efficiency were temporarily lowered to 90 and resources reallocated — keeping those 7 clinics, having garbage trucks come daily, letting children walk 10 minutes to school — happiness might return above 65. Then, starting from 90, optimizing along a different path might reach a global optimum of efficiency 95, happiness 70.
But that required walking a downhill stretch first. The Bureau wouldn't agree. Gradient wouldn't agree.
The light turned green. Lu Yuan pressed the gas, accelerating to 42 km/h.
That evening, Lu Yuan found an old book at home. It had belonged to his father, about urban planning. One sentence was circled in pencil:
"A good city is not the most efficient city, but the city where residents want to stay."
Lu Yuan closed the book and looked out the window. New City's skyline was neatly arrayed in the night, every building set to minimum necessary brightness by Gradient's lighting optimization system. Power-saving. Efficient.
He suddenly remembered waiting at the red light that morning. 38 seconds. During those 38 seconds, he had done nothing. No phone, no radio, no thoughts about work. He had just sat in his car, watching the crosswalk on the other side of the intersection, where an old man was slowly walking across holding a child's hand.
The old man walked very slowly. About 3 km/h. Far below Gradient's optimal speed. But the child was smiling.
Lu Yuan didn't know how Gradient would calculate this scene. Perhaps it wouldn't calculate it at all. Walking at 3 km/h wasn't in the efficiency function. A child's smile wasn't in the efficiency function. 38 seconds of waiting wasn't in the efficiency function.
But those 38 seconds were the best moment of Lu Yuan's day.
This is part of the "Deskless Daily" sci-fi short story series. This is a work of fiction; any resemblance to real persons or organizations is coincidental.
Top comments (0)