# Voice-Based Smart Assistant System for Vehicles using RASA

1st Aditya Paranjape  Information Technology
Pune Institute of Computer Technology
Pune, India
<EMAIL_ADDRESS>2nd Yash Patwardhan  Information Technology
Pune Institute of Computer Technology
Pune, India
<EMAIL_ADDRESS>3rd Vedant Deshpande  Information Technology
Pune Institute of Computer Technology
Pune, India
<EMAIL_ADDRESS>4th Aniket Darp  Information Technology
Pune Institute of Computer Technology
Pune, India
<EMAIL_ADDRESS>5th Dr. Jayashree Jagdale  Information Technology
Pune Institute of Computer Technology
Pune, India
<EMAIL_ADDRESS>
###### Abstract

Conversational AIs, or chatbots, mimic human speech when conversing. Smart
assistants facilitate the automation of several tasks that needed human
intervention earlier. Because of their accuracy, absence of dependence on
human resources, and accessibility around the clock, chatbots can be employed
in vehicles too. Due to people’s propensity to divert their attention away
from the task of driving while engaging in other activities like calling,
playing music, navigation, and getting updates on the weather forecast and
latest news, road safety has declined and accidents have increased as a
result. It would be advantageous to automate these tasks using voice commands
rather than carrying them out manually. This paper focuses on the development
of a voice-based smart assistance application for vehicles based on the RASA
framework. The smart assistant provides functionalities like navigation,
communication via calls, getting weather forecasts and the latest news
updates, and music that are completely voice-based in nature.

###### Index Terms:

chatbot, voice-based smart assistant, RASA, vehicles, road safety

##  I Introduction

A chatbot is a programmed tool that can mimic human conversations via text or
voice. Chatbots can be either stateless or stateful. Stateless chatbots
consider each conversation as a new one, while stateful chatbots remember past
interactions and can use that data to give more personalized responses. Voice
is the fastest way for a modern digital business to communicate with its
customers. Voice-enabled chatbots outperform emails, call centers, and
accessing support sections on a company’s website. Speech AI software has the
potential to revolutionize the way businesses communicate with their
customers. Voice-recognition chatbots can improve the customer experience for
both the customer and the business. RASA, an open-source framework, is best
suited for creating chatbots that can provide a more human touch to
interactions. It is made up of two key components, namely RASA NLU and RASA
Core. RASA NLU is a tool for natural language processing that is open-source
and assists chatbots in comprehending user input. It does this by categorizing
user intents (what the user is asking), extracting entities from user input
(such as names, dates, and locations), and assisting chatbots in understanding
user input. RASA Core is a framework for chatbots that incorporates machine
learning for managing dialogues. It accepts input from RASA NLU and predicts
the most probable action in line using a probabilistic model (like an LSTM
neural network) rather than if/else conditional lines of code. Reinforcement
learning is leveraged by RASA Core to ensure enhancement in the course of
prediction for the next best action. Overall, RASA is an excellent
conversational AI tool that is adaptable and customizable. It is a great
choice for businesses that want to improve the customer experience. This paper
aims to study and create a voice-based smart assistant using the RASA
framework, serving as an assistant to the user while driving a vehicle. This
assistant targets drivers who wish to perform functions like playing music,
setting up navigation, getting news and weather updates, and placing phone
calls. The assistant will improve its efficiency by getting more real-world
data from its users.

##  II Related Work

A chatbot is a computer program that communicates with humans and other bots
by acting as an intermediary agent. Broadly, there exist three types of
chatbots; contextual, menu_button-based, and keyword recognition-based [1, 2,
3]. AIML (Artificial Intelligence Markup Language) is a markup language used
to develop distinctive chatbots. Consequently, they are very popular when it
comes to choosing the type of chatbot that is to be built[4]. Conversation
systems are divided into three main categories namely agents which answer
questions, dialogue agents which are task-oriented, and social bots. ReasoNet
is used in the approach by Agents, which answer questions. For the Task-
oriented Dialogue Agents, state-of-the-art approaches are described using two
methods, end-to-end (E2E) learning and advanced reinforcement learning
techniques. The exploration of a fully data-oriented stage of conversational
responses in the form of encoder-decoder or seq2seq models has been started by
researchers[5].

Recent advancements in the field of Conversational AI architecture development
have shown that Bi-directional LSTM produces the best results. Dialogue
Management is responsible for the actions of the Conversational Agent and
mapping inputs to appropriate outputs. Natural Language Generation (NLG) is a
subdomain of Natural Language Processing (NLP), that includes the generation
of outputs according to given queries in the natural language [6]. Several
studies were analyzed, and it was discovered that many chatbots lacked emotion
as a component of input, which may be quite useful in providing even more
suitable outcomes [7]. It is seen that chatbots developed using retrieval-
based models respond to queries from the training dataset using proper
language and spelling. The system, however, is unable to respond to queries
not contained in the training dataset, and the responses can occasionally seem
forced[8].

RASA Conversational AI assistant is built upon natural conversations. This is
done with the help of contextualization. The assistant is said to have mainly
two components; the RASA NLU and RASA Core [9, 10]. The RASA NLU is also
referred to as the ear of the assistant as it handles the input while the RASA
Core is referred to as the brain of the assistant because it makes decisions
based on the input [11]. Their goal is to provide non-specialist software
developers with access to machine-learning-based dialogue management and
language interpretation. Language comprehension and dialogue management in
RASA are completely independent. As a result, trained dialogue models may be
employed in multiple languages and RASA NLU and Core can be used independently
of one another. RASA NLU consists of loosely connected modules that integrate
a large number of machine learning and natural language processing components
in a unified API[12].

RASA has various application fields, including Intelligent Customer Service in
the disease detection domain, which combines users’ conversational records and
existing data with semantic analysis[13]. Taiwan Disease Control Center
proposed and utilized a system that provided 99% accurate disease information
to users instantly[14]. A conversational question-and-answer (CQA) system was
created, and by determining the question’s intent and locating the solution in
a knowledge base, the system may respond to inquiries made in natural
language. The limitations of the system include the fact that the system is
only able to answer questions that are in the knowledge base[15]. Intelligent
virtual laboratory developed with NLP (Natural Language Processing) and
machine learning models with Artificial Intelligence (AI) powered RASA
framework for virtual assistant creation in this study. Chatbot is set up on
the RASA chatbot server, which is a machine learning model framework to build
chatbot using RASA NLU and Core. With the help of these virtual assistants,
students can solve their problems faced during an experiment [16]. A similar
implementation involving the RASA framework has been used to create a college
inquiry chatbot and a question clarification virtual assistant to aid students
in resolving their doubts in another application [17, 18]. RASA has also been
employed to develop a chatbot designed to assist in the generation of academic
schedules [19]. RASA has found its application in the locomotive industry too.
A virtual assistant created using RASA is used for automating information
exchange in a car [20].

This paper proposes a voice-based smart assistant system for vehicles
leveraging the benefits of the RASA framework.

##  III Methodology

###  III-A RASA

RASA is an open-source framework used to build text-based and voice-based
chatbots. RASA chatbots are capable of contextualization and can devise their
response based on the surrounding context. As a result, they are said to work
at Level 3 of conversational AI. Transformer Embedding Dialogue Policy(TED),
which is the default machine learning-based dialogue policy used by RASA, is
the algorithm which the models are trained over. It is also the default
machine learning-based dialogue policy used in the framework. TED is
especially useful for handling unforeseen situations, and can efficiently
handle user input even if the conversation goes off track. To choose which
dialogues to selectively pay attention to and ignore while making predictions,
TED uses a transformer architecture. The TED policy takes three main inputs,
viz. the user’s utterance, predicted previous action, and slots. The
transformer accepts this information after it is featured and concatenated.

In this paper, a RASA framework is used to create a smart assistant to assist
drivers while on the road. Voice-based functionalities using speech-to-text
technologies are added to ensure that drivers need not look at the screen
while driving. Whenever the user speaks, the speech-to-text functionality will
convert whatever the user has said into text and send it to the NLU. In the
NLU, entity, and intent recognition will take place, where the keywords of the
sentences will be picked and contextualized. Based on these words, the core
will decide the relevant response and call the respective API or reply to the
user based on its knowledge. While replying to the user, the text-to-speech
functionality will convert the text back to audio to enhance the user
experience and reduce the need to look away from the road while driving. It
makes use of intents, entities, stories, and rules to build up and understand
various possible scenarios.

  1. 1.

Intents: Intent defines the purpose or aim of speaking or performing a certain
action. (e,g. expressing disappointment, bidding farewell).

  2. 2.

Entities: Entities are the keywords that help the model make relevant
recommendations, which are obtained through the user’s input. (e.g. location,
name of song, color).

  3. 3.

Stories: Stories contain a format of training data for the model which
comprises the interaction of the user with the bot. The bot’s responses are
defined by a set of ordered actions, whereas the user’s messages are
interpreted as intents and entities.

  4. 4.

Rules: Rules provide a flow of actions where a specific next action is always
predicted by a triggering condition. (e.g. handling errors, similar stories)

RASA has two main components: RASA NLU and RASA Core.

  1. 1.

RASA NLU: RASA NLU refers to the Natural Language Understanding component
which examines the user’s utterance, classifies the intent, and abstracts the
entities.

  2. 2.

RASA Core: RASA Core contains the engine that takes decisions regarding the
next actions to be undertaken according to the context of the conversation. It
accepts input from the user and comes up with a response with the help of
pipelines in RASA.

Figure 1: System Architecture for the Voice-Based Smart Assistant

Figure 1 shows the system architecture of the smart assistant. The system
processes the audio input obtained from the user by extracting the keywords to
identify the intents and triggering necessary actions. The pre-trained model
runs to give a relevant response to the user query.

###  III-B Modules

  1. 1.

Voice Input & Output
The input and output process of the bot is entirely voice-based, achieved
using the open-source text-to-speech (TTS) library ’pyttsx3’ and the speech-
to-text (STT) library ’speech-recognition’. The pyttsx3 engine is initialized,
and properties such as voice, speaking rate, and volume are set. Once the
trigger word, in this case, ’coffee’, is detected by the program, the voice
bot starts execution and gets input from the user. The user’s input is then
sent to the RASA webhook as a POST request to obtain the desired output.

  2. 2.

RASA Webhook
In RASA, a webhook is a way to connect the chatbot to an external web service,
allowing it to fetch or send data to that service. Webhooks are used to
perform actions outside of the chatbot, such as looking up information in a
database or sending a notification to a user. In this system, POST requests
are sent to the webhook endpoint along with the message in the form of JSON.
The response to this request will contain the output of the bot.

  3. 3.

General Interaction
This module is used to greet the user when the user initiates and terminates
the assistant. The greet intent is identified using words like hello, hi, hey,
etc. The utter_greet action is performed by the assistant to reply and greet
the user. If the user says goodbye to the bot, the bot reciprocates the same
and the bot is stopped temporarily.

  4. 4.

News
The main objective of the news module is to provide the latest news headlines
to the user, which are fetched using the open-source NewsAPI. A story is
designed to deliver the headlines to the user, which is initiated once the
intent is identified correctly. The news intent is identified using words like
news, headlines, and related key terms. The bot then conveys to the user that
news headlines are being fetched. The action calls the NewsAPI with the
appropriate parameters, and results are obtained in JSON format. The bot asks
the user whether or not they would like to listen to more news headlines. If
the user affirms, the API call is repeated, and other news headlines are
provided to the user.

  5. 5.

Weather
The objective of the weather module is to provide the current weather data and
the weather forecast for the next day for a given user-specified location.
WeatherAPI has been used to fetch the data. The weather data includes
temperature, humidity, pressure, wind speed and direction, cloud cover, and
more. A story is designed to deliver the weather data to the user, which is
initiated once the intent is identified correctly. The intent is identified
using words like the weather, weather updates, today’s weather report, etc.
The action prompts the user to specify the location and the next actions are
used to verify that the location interpreted by the assistant is correct. The
intent affirm is identified when the user responds positively to verify that
the location understood by the assistant is correct and the Weather API is
called using appropriate parameters. The relevant information from these
results is conveyed to the user using the voice module.

  6. 6.

Navigation
The objective of the navigation module is to provide the route to the
specified destination using the Google Maps API. A story is designed to
display the route to the destination to the user, which is initiated once the
intent is identified correctly. The navigation intent is identified using
words like maps, directions, open maps, etc. The action prompts the user to
specify the destination. The intent for input location is identified if the
user speaks the name of a real location. Subsequently, verification actions
are used to confirm that the location is interpreted correctly by the
assistant. On positive affirmation from the user for the confirmation action,
the API call for Google Maps displays the route to the destination from the
current location.

  7. 7.

Music
The objective of the music module is to play the song requested by the user,
which is fetched using the Spotify API. A story is designed to play a specific
song for the user, which is initiated once the intent is identified correctly.
The intent is identified using words or phrases like music, song, let’s have
some music, etc. The bot then asks the user to specify the song and records
the user’s input. The next actions verify from the user that the assistant has
heard the correct name of the song and on positive affirmation, the Spotify
API is called with the appropriate parameters, and the requested song is
played.

  8. 8.

Communication
The objective of the communication module is to place a phone call to the
person requested by the user. A story is designed to place a phone call to the
user-specified contact, which is initiated once the intent is identified
correctly. The intent is identified using the words call, phone, contact, etc.
The assistant then prompts the user to provide the input for the contact name.
The next actions are used by the assistant to verify from the user that the
assistant has identified the name correctly. The phone call is then placed to
the appropriate contact.

Figure 2: Music Module Output

Figure 2 depicts the output of the music module in a visual form. Although the
system is predominantly voice-based, a basic frontend functionality has been
provided to the user.

##  IV Experimentation and Results

###  IV-A Experimentation Setup

Hyper-parameters are used to fine-tune the model. The hyper-parameters are
defined in the pipeline. In RASA, a pipeline refers to a series of components
that are used to process and transform user inputs, such as text messages or
voice commands, into structured data that can be used by the framework to
generate appropriate responses or take actions. WhiteSpaceTokenizer tokenizes
the input text based on whitespace, splitting it into individual words or
tokens. DIET classifier is a neural network-based classifier that uses a
combination of pre-trained word embeddings and sequence modeling to classify
text. It is trained using the supervised learning approach and optimized with
the DIET algorithm. The ”epochs” parameter specifies the number of training
epochs for the model, and ”constrain_similarities” enforces similarity
constraints during training. The order of the components in the pipeline is
important since each component takes the output of the previous component and
uses it as input. The following pipeline is used to create this voice-based
chatbot.

Figure 3: Pipeline for the Voice-Based Smart Assistant

In Figure 3, it can be seen that the pipeline performs a series of text
processing steps, featurization, and classification to understand and respond
to user input. It incorporates various techniques, such as tokenization,
feature extraction, and neural network-based classifiers, to improve the
accuracy and performance of the text classification task.

###  IV-B Results

The results of this study can be divided into 3 main components: average
response time for each action, average response time for each module, and
accuracy of intent identification. The time required to transmit the query,
process it by the computer, and then communicate the response is included in
the response time. The response time of an interactive system is typically
used to assess its performance. The average response times for a specific
action were determined based on a sample of 100 instances. Actions are divided
into 3 main types, viz. Intent Identification, Input & Confirmation, and API
Call & Output. Table I shows the average response time (in seconds), for each
type of action. For example, the time required for the bot to respond to the
user to perform intent identification is 0.08 seconds.

TABLE I: Average response times of the bot for each type of action Type of Action | Avg Response Time (in seconds)
---|---
Intent Identification | 0.08
Input & Confirmation | 2.4
API Call & Output | 4.6

The average response times for a specific module were determined based on a
sample of 100 instances. This includes an average of the response times of the
3 main actions present in a module. Modules are divided into 6 main types,
viz. General Interaction, Music, Navigation, Communication, Weather & News.
Table II shows the average response times of the bot (in seconds) for every
module. For example, while accessing the news module, the user can expect a
response from the bot in 2.12 seconds on average.

TABLE II: Average response times of the bot for each module Module | Avg Response Time (in seconds)
---|---
General Interaction | 0.06
Music | 2.62
Navigation | 2.46
Communication | 2.19
Weather | 2.58
News | 2.12

The automatic categorization of text data based on predefined rules is known
as intent classification. Intent classification automatically associates words
or sentences with a specific intent using machine learning and natural
language processing. Accuracy is the ratio of rightly classified data that a
trained ML model produces, or the proportion of correct predictions to all
other forecasts combined. It is a statistic for assessing the effectiveness of
models in categorization tasks. The intents were classified correctly for 281
out of 300 instances by the proposed model, yielding an accuracy of 93.67%.
Samples of the inputs in consideration have been displayed in Table III.

TABLE III: Accuracy of identifying intents Intent | Identified Intent | Correct Intent | Result (Y/N)
---|---|---|---
Sunlight | Song | Song | Y
Mumbai | Location | Location | Y
Delhi | Location | Location | Y
John | Person | Person | Y
Suresh | Location | Person | N
99 Problems | Song | Song | Y
Sachin | Person | Person | Y
New York | Location | Location | Y
Stan | Song | Song | Y
Paris | Location | Song | N

In the examples presented in Table III, 8 of the 10 intents were properly
identified. Suresh, as a proper noun and a regional name, is misinterpreted.
Although Paris is identified as a location, the user anticipated the bot to
identify Paris as a song rather than a location.

As mentioned previously, 281 out of 300 intents were correctly identified. The
confusion matrix helps in understanding the overall performance of the models
and Figure 4 shows a graphical representation of the obtained results.

Figure 4: Confusion Matrix

##  V Conclusion

This paper proposes a voice-based smart assistant for vehicles based on RASA.
The system’s goal is to reduce distractions while driving vehicles by
facilitating routine driving activities via an audio channel, encouraging safe
driving. The system includes frequently utilized functionalities such as
general interaction, news, weather, navigation, music, and communication. The
results of the research were quantified using three metrics: average response
time for each action, average response time for each module, and accuracy of
intent identification. From the user’s perspective, the most important metric
is the accuracy of intent identification, which comes out to be 93.67%.
However, the model has some limitations, including deteriorated performance in
a noisy environment, difficulty understanding regional accents, and limited
training data. The future scope of this study may include the implementation
of multi-lingual models to aid in the understanding of multiple languages,
integration with hardware via the Internet of Things, and the implementation
of additional functionalities such as voice-automating vehicle controls such
as changing the radio volume, locking the car doors, enabling wipers, and
controlling the air conditioning, to name a few.

## References

  * [1] Kandpal, Prathamesh, Kapil Jasnani, Ritesh Raut, and Siddharth Bhorge. ”Contextual Chatbot for healthcare purposes (using deep learning).” _In 2020 Fourth World Conference on Smart Trends in Systems, Security and Sustainability (WorldS4), pp. 625-634. IEEE, 2020_.
  * [2] Nguyen, Quynh N., Anna Sidorova, and Russell Torres. ”User interactions with chatbot interfaces vs. Menu-based interfaces: An empirical study.” _Computers in Human Behavior 128 (2022): 107093_.
  * [3] Tsai, Meng-Han, James Yichu Chen, and Shih-Chung Kang. ”Ask Diana: A keyword-based chatbot system for water-related disaster management.” _Water 11, no. 2 (2019): 234_.
  * [4] Gupta, Aishwarya, Divya Hathwar, and A. Vijayakumar. ”Introduction to AI chatbots.” _International Journal of Engineering Research and Technology 9.7 (2020): 255-258_.
  * [5] Gao, Jianfeng, Michel Galley, and Lihong Li. ”Neural approaches to conversational AI.” _In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, pp. 1371-1374. 2018_.
  * [6] Kulkarni, Pradnya, Ameya Mahabaleshwarkar, Mrunalini Kulkarni, Nachiket Sirsikar, and Kunal Gadgil. ”Conversational AI: An overview of methodologies, applications & future scope.” _In 2019 5th International Conference On Computing, Communication, Control And Automation (ICCUBEA), pp. 1-7. IEEE, 2019_.
  * [7] Meshram, S., Naik, N., Megha, V.R., More, T. and Kharche, S. ”Conversational AI: Chatbots.” _2021 International Conference on Intelligent Technologies (CONIT) (pp. 1-6). IEEE_.
  * [8] Lam, Khang Nhut, Nam Nhat Le, and Jugal Kalita. ”Building a Chatbot on a Closed Domain using RASA.” _4th International Conference on Natural Language Processing and Information Retrieval, pp. 144-148. 2020_.
  * [9] Rafla, Andrew, and Casey Kennington. ”Incrementalizing RASA’s Open-Source Natural Language Understanding Pipeline.” _a_ rXiv preprint arXiv:1907.05403 (2019).
  * [10] Malamas, Nikolaos, and Andreas Symeonidis. ”Embedding RASA in edge devices: capabilities and limitations.” _P_ rocedia Computer Science 192 (2021): 109-118.
  * [11] Sharma, Rakesh Kumar, and Manoj Joshi. ”An analytical study and review of open source chatbot framework, RASA.” _International Journal of Engineering Research and 9.06 (2020)_.
  * [12] Bocklisch, T., Faulkner, J., Pawlowski, N., & Nichol, A. (2017). RASA: Open source language understanding and dialogue management. arXiv preprint arXiv:1712.05181.
  * [13] V. Gupta, A. Sood and T. Singh, ”Disease Detection Using RASA Chatbot,” 2022 International Mobile and Embedded Technology Conference (MECON), Noida, India, 2022, pp. 94-100, doi: 10.1109/MECON53876.2022.9752338.
  * [14] Tseng, Hsiao-Ting, Chen-Chiung Hsieh, and Yi-Wei Lin. ”An Intelligent Disease Query System Based on RASA NLU.” _International Symposium on Computer, Consumer and Control (IS3C). IEEE, 2020_.
  * [15] Kumari, Vijay, Ayush Jain, Yashvardhan Sharma, and Lavika Goel. ”Conversational question answering system using RASA framework.” _In Applications of Machine Intelligence in Engineering, pp. 489-498. CRC Press, 2022._
  * [16] Deepika, N. M., Myneni Madhu Bala, and Ravi Kumar. ”Design and implementation of intelligent virtual laboratory using RASA framework.” _(2021)_.
  * [17] Meshram, Siddhant, Namit Naik, V. R. Megha, Tanmay More, and Shubhangi Kharche. ”College enquiry chatbot using rasa framework.” _In 2021 Asian Conference on Innovation in Technology (ASIANCON), pp. 1-8. IEEE, 2021._
  * [18] Fonseca, João, and Fátima Rodrigues. ”ChatBot for student service based on RASA framework.” _(2023)._
  * [19] Dinesh, T., A. M. R., Newton, T. T., and S. G. R. ”AI Bot for Academic Schedules using Rasa.” _2021 International Conference on Innovative Computing, Intelligent Communication and Smart Electrical Systems (ICSES), Chennai, India, 2021._
  * [20] Rubleva, Olga, Elena Emelyanova, Tatiana Mozharova, Natalya Polshakova, and Nadezhda Gavrilovskaya. ”Development of a chatbot for a car service.” _In AIP Conference Proceedings, vol. 2700, no. 1. AIP Publishing, 2023._


# Cross-sectional Urban Scaling Fails in Predicting Temporal Growth of Cities

Gang Xu<EMAIL_ADDRESS>School of Remote Sensing and Information
Engineering, Wuhan University, Wuhan 430079, China  Zhengzi Zhou  School of
Resource and Environmental Sciences, Wuhan University, Wuhan 430079, China
Limin Jiao<EMAIL_ADDRESS>School of Resource and Environmental Sciences,
Wuhan University, Wuhan 430079, China  Ting Dong  School of Resource and
Environmental Sciences, Wuhan University, Wuhan 430079, China  Ruiqi Li
College of Information Science and Technology, Beijing University of Chemical
Technology, Beijing 100029, China

(Version August 27, 2024)

###### Abstract

Numerous urban indicators scale with population in a power law across cities,
but whether the cross-sectional scaling law is applicable to the temporal
growth of individual cities is unclear. Here we first find two paradoxical
scaling relationships that urban built-up area sub-linearly scales with
population across cities, but super-linearly scales with population over time
in most individual cities because urban land expands faster than population
grows. Different cities have diverse temporal scaling exponents and one city
even has opposite temporal scaling regimes during two periods, strongly
supporting the absence of single temporal scaling and further illustrating the
failure of cross-sectional urban scaling in predicting temporal growth of
cities. We propose a conceptual model that can clarify the essential
difference and also connections between the cross-sectional scaling law and
temporal trajectories of cities. Our model shows that cities have an extra
growth of built-up area over time besides the supposed growth predicted by the
cross-sectional scaling law. Disparities of extra growth among different-sized
cities change the cross-sectional scaling exponent. Further analyses of GDP
and other indicators confirm the contradiction between cross-sectional and
temporal scaling relationships and the validity of the conceptual model. Our
findings may open a new avenue towards the science of cities.

scaling law| urban system| science of cities| cross-sectional scaling|
temporal trajectories

## Introduction

Cities, residing more than half of the world’s population and continuing to
grow, are of great significance in global sustainability
bettencourt_evolution_2011 ; christa_brelsford_heterogeneity_2017 . With
cities rising and bulk of urban data emerging, the appeal to the new Science
of Cities is getting stronger to understand our cities in
depthbatty_building_2012 ; batty_new_2013 ; bettencourt_towards_2019 ;
barthelemy_modeling_2019 ; barthelemy_statistical_2019 . Scaling law is one of
the general rule behind the complex system of cities, which describes how two
or more attributes are functionally related west_scale:_2017 ;
batty_theory_2013 ; batty_size_2008 . Numerous urban indicators ($Y$) scale
with urban population ($N$) in a power law form ($Y_{t}=Y_{0}N_{t}^{\beta}$)
across cities, where $Y_{0}$ is a constant and $\beta$ is the scaling
exponentbettencourt_growth_2007 . Urban infrastructure related indicators
(e.g., road length, gas stations) sub-linearly ($\beta<1$) scale with urban
population because of economies of scale, while social interactions related
indicators (e.g., GDP, innovation, crime) super-linearly ($\beta>1$) scale
with urban population due to the increasing returns to population size, and
urban indicators related to individual needs linearly ($\beta=1$) scale with
population size of cities bettencourt_growth_2007 .

Since Luis Bettencourt and his colleagues opened up the field of urban scaling
bettencourt_growth_2007 ; luis_m._a._bettencourt_origins_2013 ;
bettencourt_unified_2010 , scholars from different disciplines have ignited
heated discussion and extensive research on urban scaling in just a decade
rybski_scaling_2009 ; um_scaling_2009 ; gomez-lievano_explaining_2016 ;
ruiqi_li_simple_2017 ; depersin_global_2018 ; keuschnigg_urban_2019 . These
research progresses on urban scaling can be divided into four aspects at
least. (1) Verification of urban scaling. The urban scaling has been tested in
different regions, such as Europe van_raan_urban_2016 ; bettencourt_urban_2016
, Brazil meirelles_evolution_2018 , India sahasranaman_urban_2019  and China
zund_growth_2019 . In addition to modern cities, urban scaling law also exists
in the historical urban system ortman_pre-history_2014 ;
ortman_settlement_2015 ; cesaretti_population-area_2016 . These verifications
across regions and beyond time strongly demonstrate the universality of urban
scaling law that is not restricted by history, geography and culture. (2)
Mechanism of urban scaling. Network is the backbone behind all complex
systems, such as the vascular network of life systems, infrastructure and
social networks of urban systems west_scale:_2017 . Previous studies
abstracted and built entity or virtual networks of cities, trying to explain
mechanisms of urban scaling luis_m._a._bettencourt_origins_2013 ;
ruiqi_li_simple_2017 ; yakubo_superlinear_2014 ; zhang_scaling_2015 ;
ribeiro_model_2017 . (3) Application of urban scaling. Urban scaling provides
new ideas for urban performance evaluation rather than using per capita
indicators (e.g. GDP per capita). The Scale-Adjusted Metropolitan Indicator
(SAMI) defined as the deviation from urban scaling has been widely used to
evaluate urban performance bettencourt_urban_2010 ; alves_scale-adjusted_2015
; alves_distance_2013 ; lobo_urban_2013 ; sahasranaman_economic_2019 . (4)
Criticism on urban scaling louf_scaling:_2014 ; rybski_cities_2017 . First,
scaling exponents are unstable under different extents of cities because of
the complex and fuzzy boundaries arcaute_constructing_2015 ;
cottineau_diverse_2017 ; batty_defining_2011 . Second, the applicability of
the logarithmic linear regression model is questionable
gudipudi_efficient_2019 ; leitao_is_nodate . Third, scaling exponents are
affected by other external conditions such as macroeconomic constitutions and
public policies strano_rich_2016 ; muller_does_2017 . It is worth emphasizing
that these introspections or criticisms do not prevent the scaling law from
being one of the important quantitative laws of the new science of cities.

Cities are growing and systems of cities are also evolving over time
paulus_evolutionary_2006 ; pumain_urban_2012 . Previous studies mainly focused
on the scaling law across cities (cross-sectional scaling), the scaling law
for the temporal development of a single city (temporal scaling) is rarely
discussed marshall_urban_2007 . People take it for granted that the temporal
development of the city will also follow the cross-sectional scaling law of
the urban system. However, whether the cross-sectional scaling law is
applicable to individual cities remains unclear. In recent years, a small
number of studies investigated the temporal scaling and proved differences
between cross-sectional and temporal scaling relationships
depersin_global_2018 ; keuschnigg_scaling_2019 ;
bettencourt_interpretation_2019 ; ribeiro_relation_2019 .

The scientific question of this study is whether there is a scaling law for
the temporal development of a single city, and how cross-sectional and
temporal scaling relationships interrelate in an evolving system of cities. We
first reveal the paradoxical scaling relationships of built-up area and
population across cities and over time (2000-2016) in 275 Chinese cities. We
build a conceptual model to show how temporal trajectories of individual
cities influence the scaling exponent across cities. We further use gross
domestic product (GDP), household electricity consumption, and road length in
Chinese cities and congestion-induced delay in American cities to verify the
contradiction between cross-sectional and temporal scaling relationships, and
the validity of reconciling the conflict by our conceptual model.

## Results

### Paradoxical scaling regimes

We collected urban built-up area ($A$) and population ($P$) from 2000 to 2016
of 275 prefecture-level cities in China (Fig. 7). We define the scaling
relationship between built-up area and population across cities as the cross-
sectional scaling ($A=\alpha P^{\beta c}$) and that over time in an individual
city as the temporal scaling ($A_{t}=\alpha
P_{t}^{\beta_{t}}$)marshall_urban_2007 . The two scaling relationships lead to
the cross-sectional scaling exponent ($\beta_{c}$) and temporal scaling
exponent ($\beta_{t}$), respectively. Cross-sectionally, the built-up area
sub-linearly scales with population in Chinese cities (Fig. 1a, See scatter
plots in each year from 2000 to 2016 in Fig. 8). The cross-sectional exponents
($\beta_{c}$) are all significantly less than one, varying from 0.84 to 0.93,
with a mean of 0.89 (Fig. 1b). $\beta_{c}$ experiences two periods before and
after 2008: a persistent increase from 2000 to 2008 and a moderate decrease
from 2008 to 2016.

Taking Chengdu, a megacity located in the Southwestern China, as an example,
the power law ($A_{t}=\alpha P_{t}^{\beta}$) can also fit the relationship
between built-up area and population over time marshall_urban_2007  (Fig. 1c),
and the temporal scaling exponent is greater than one ($\beta_{t}=1.15$). We
fit the temporal relationships between the logarithmic forms of built-up area
and population in each city from 2000 to 2016. The $R^{2}$ of the linear
regression for temporal scaling varies among cities with a mean of 0.82 (Fig.
9). Different cities have diverse $\beta_{t}$ or even opposite scaling
regimes. The range of all $\beta_{t}$ of 275 cities is [-6.23, 13.53]. Values
of $\beta_{t}$ below $5^{th}$ percentiles or above $85^{th}$ percentiles are
removed, and the frequency distribution of $\beta_{t}$ of the remaining 248
cities is shown in Fig. 1d. Nearly 60% cities have a $\beta_{t}$ greater than
1 and the mean of $\beta_{t}$ of 248 cities is 1.17. Cities with a $\beta_{t}$
higher than 1 experience a higher rate of urban expansion than population
growth over time, which has been widely evidencedmarshall_urban_2007 ;
seto_meta-analysis_2011 .

Now we come to a paradox that urban built-up area sub-linearly scales with
population across cities at time $t$ luis_m._a._bettencourt_origins_2013 ;
ortman_settlement_2015 ; batty_defining_2011 , while built-up area super-
linearly correlated with population in more individual cities over time
because urban land expands faster than population grows marshall_urban_2007 ;
seto_meta-analysis_2011 ; angel_persistent_2010 ; xu_how_2019 . This is not
just a difference in numerical values of scaling exponents
depersin_global_2018 ; cottineau_diverse_2017 ; keuschnigg_scaling_2019 ;
bettencourt_interpretation_2019 ; ribeiro_relation_2019 , but a difference in
scaling regimes (sub-linear versus super-linear). What is the reasonable
interpretation behind the paradoxical scaling regimes along the evolution of
the system of cities?

Figure 1: Paradoxical scaling regimes of built-up area and population across
cities and over time. (a) Cross-sectional scaling law of built-up area and
population across Chinese cities in 2016. We first use OLS to fit the original
data, resulting in the regression line in blue. Cities with residuals greater
than twice the standard deviation of the residual are considered as outliers
(outside the two dashed lines). The OLS is used again to fit the remaining
samples after removing outliers, resulting in the final cross-sectional
scaling exponent ($\beta_{c}=0.91$). (b) The variations of $\beta_{c}$ with
95% confidence intervals from 2000 to 2016. (c) Temporal scaling relationship
between built-up area and population in Chengdu from 2000 to 2016 with a
temporal scaling exponent $\beta_{t}$ of 1.15. (d) Frequency distribution of
$\beta_{t}$ of each city from 2000 to 2016. Outliers of $\beta_{t}$ below
$5^{th}$ percentiles and above $95^{th}$ percentiles are not shown.

### Relationship between cross-sectional and temporal scaling

According to results in Fig. 1b, we use the year of 2008 as the cut-off point
to calculate $\beta_{t}$ of each city before and after this time point. There
are 38% and 64% cities experiencing a super-linear temporal scaling regime
($\beta_{t}>1$) between built-up area and population during 2000-2008 and
during 2008-2016, respectively (Fig. 2a). The scatter plots of $\beta_{t}$
during the two periods are dispersed without an obvious linear trend and
$\beta_{t}$ changes in different time periods, particularly changes through
scaling regimes (cities in the red shadow in Fig. 2a). This indicates that
$\beta_{t}$ is fluctuant and not robust in an individual city.

We further test whether different temporal scaling regimes influence or change
the cross-sectional scaling law. We divide cities into two sub-systems: cities
with super-linear ($\beta_{t}>1$) and sub-linear ($\beta_{t}<1$) temporal
scaling regimes from 2000 to 2016. Cities with $\beta_{t}>1$ are on the right
of the dashed line in Fig. 1d. Then, we calculate $\beta_{c}$ of the two sub-
systems in each year from 2000 to 2016. Cities in the two sub-systems
experience opposite temporal scaling regimes but the two sub-systems share a
similar varying trend of $\beta_{t}$ and there are no apparent differences of
$\beta_{t}$ between them (Fig. 2b). This indicates that the absolute size of
$\beta_{t}$ of cities does not change $\beta_{c}$ of the system of cities.
Most importantly, $\beta_{c}$ of the two sub-systems is always less than 1
from 2000 to 2016, revealing the robustness of the sub-linear cross-sectional
scaling law between built-up area and population.

Different cities have diverse values of $\beta_{t}$. Whether the $\beta_{t}$
of a city relies on its population size? From 2000 to 2008, $\beta_{t}$ of a
city is positively correlated with population size at the end year of 2008,
while $\beta_{t}$ of a city from 2008 to 2016 is negatively correlated with
population size at the end year of 2016 (Fig. 2c). There seems to be no
consistent correlations between $\beta_{t}$ and population size. However, when
we link their correlations to the change of $\beta_{c}$ during the two periods
(2000-2008 and 2008-2016) (Fig. 1d), this provides us with a thought that
whether the relative size of $\beta_{t}$ among different-sized cities changes
$\beta_{c}$ of the system of cities.

Figure 2: Relationships between cross-sectional and temporal scaling. (a)
Comparisons of temporal scaling exponents ($\beta_{t}$) in two periods
(2000-2008 and 2008-2016). Cities with a $\beta_{t}$ between 5th and 95th
percentile are remaining, resulting in 233 cities with pairs of $\beta_{t}$ in
the two periods. (b) The varying trend of cross-sectional scaling exponents
($\beta_{c}$) in two sub-systems of cities with a sub-linear or super-linear
temporal scaling regime, respectively. (c) Correlations between $\beta_{t}$ of
cities in two periods (2000-2008 and 2008-2016) and their urban population at
the end year (2008 and 2016).

### A conceptual model

We build a conceptual model to present the self-consistency of cross-sectional
scaling law and temporal growth of individual cities and how dynamics of
individual cities ($\beta_{t}$) influence the variation of $\beta_{c}$ (Fig.
3). We simplify the system of cities into two cities, the small city (in blue)
and the large city (in red). The cross-sectional scaling exponents at time
$t_{0}$ and $t_{1}$ are $\beta_{c}$ (<1) and$\beta_{c}^{,}$, respectively.
From $t_{0}$ to $t_{1}$, their population sizes in the logarithm scale
increase $x_{S}$ and $x_{L}$ of the small and large cities, respectively, and
their built-up areas increase $y_{S}$ and $y_{L}$, respectively. Taking
$x_{S}$ as an example, its calculation is as follows:

$x_{S}=\log P_{1}-\log P_{0}=\log\frac{P1}{P0}\quad.$ (1)

where $P_{0}$ and $P_{1}$ are the urban population of the small city at
$t_{0}$ and $t_{1}$, respectively. We can calculate $y_{S}$, $x_{L}$, and
$y_{L}$ in the same way.

Figure 3: A conceptual model showing how temporal trajectories of individual
cities influence the variation of the cross-sectional scaling exponent
($\beta_{c}$) from $t_{0}$ to $t_{1}$. The system of cities is generalized as
two cities, a small city (in blue) and a large city (in red). The x-axis
increments of urban population from $t_{0}$ to $t_{1}$ are $x_{S}$ and $x_{L}$
of the small and large cities, respectively, and their built-up areas increase
$y_{S}$ and $y_{L}$, respectively. All the x-axis and y-axis increments are in
the logarithm scale. The y-axis increment predicted by the cross-sectional
scaling exponent of time $t_{0}$ is defined as the supposed growth (SG), while
the difference of the actual y-axis increment ($y_{S}$ or $y_{L}$) and the
supposed growth is defined as the extra growth (EG). The relative size of the
extra growth among different-sized cities determines the variation of
$\beta_{c}$ from $t_{0}$ to $t_{1}$, while it has no correlations with
supposed growth.

If the small city grows over time following the scaling law across cities
($\beta_{c}$), then it moves from A to B (Fig. 3). Under this circumstance,
the y-axis increment equals to $\beta_{c}x_{S}$, which is defined as the
supposed growth (SG) predicted by the cross-sectional scaling law. However,
the temporal trajectory of an individual city ($\beta_{t}$) usually violates
the cross-sectional scaling law ($\beta_{c}$). The final position of the small
city is not B, but C. We define the increment from B to C as the extra growth
(EG), which can be calculated as follows:

$EG=y_{S}-SG=y_{s}-\beta_{c}x_{S}\quad.$ (2)

The introduction of the extra growth explains the paradoxical regimes and
unifies the scaling law across cities and temporal trajectories of individual
cities. If the large city has a higher extra growth than the small city,
$\beta_{t}^{,}$ increases at time $t_{1}$; otherwise,$\beta_{c}^{,}$
decreases. From the two cites back to the system of cities, we can interpret
that it is the differences of the extra growth among different-sized cities
that determines the change of $\beta_{c}$ from $t_{0}$ to $t_{1}$, while the
supposed growth does not influence. Specifically, if the extra growth of
built-up area from $t_{0}$ to $t_{1}$ of a city is positively correlated with
its population size at $t_{1}$, the cross-sectional scaling exponent
($\beta_{c}$) increases from $t_{0}$ to $t_{1}$; otherwise,$\beta_{c}$
decreases.

Our empirical analyses confirm with the interpretation of the conceptual
model(Fig. 4). The extra growth of built-up area from 2000 to 2016 is
significantly and positively correlated with the urban population in 2016
(Fig. 4a), which indicates that large cities have higher extra growth, finally
resulting in the increase of $\beta_{c}$ during this period (Fig. 1b).
Specific to the two sub-periods, the positive correlation between them
corresponds the increase of $\beta_{c}$ during 2000-2008 (Fig. 4b); while the
negative correlation explains the decrease of $\beta_{c}$ during 2008-2016
(Fig. 4c). Their correlations are all significant at the level of 0.05 (p <
0.05).

Figure 4: Scatter plots of extra growth of built-up area from $t_{0}$ to
$t_{1}$ and urban population at time $t_{1}$. (a) From 2000 to 2016, (b) From
2000 to 2008, and (c) From 2008 to 2016. The extra growth and urban population
are both in the logarithm scale.

### Verification using other indicators

We first use three other urban indicators (GDP, household electricity
consumption, and road length) in Chinese cities to verify our findings. The
power law holds well between urban indicators and population across cities in
each year from 2000 to 2016 (Fig. 5a, Fig. 10, the time period of household
electricity consumption is from 2006 to 2016). The $\beta_{c}$ of GDP is all
significantly greater than 1, indicating a super-linear cross-sectional
scaling regime all the time (Fig. 5b). Household electricity consumption,
strongly related to individual needs, is expected to linearly scale with
population size, but its $\beta_{c}$ is significantly greater than 1 from 2006
to 2010. Urban road, as a kind of infrastructure, its length is expected to
sub-linearly scale with population size, but the $\beta_{c}$ of road length is
not significantly less than 1 in most years.

Figure 5: Verification of the paradoxical scaling regimes across cities and
over time and the validity of the conceptual model using GDP, household
electricity consumption, and road length in 275 Chinese cities. (a) Scaling
relationships between three urban indicators and population in 2016. Urban
indicators and urban population are divided by their averages, respectively.
(b) Varying trends of the cross-sectional scaling exponents ($\beta_{c}$). (c)
The distribution of probability density of temporal scaling exponents
($\beta_{t}$). (d) Scatter plots of extra growth of GDP from 2000 to 2009 and
population in 2009. (e) Scatter plots of extra growth of household electricity
consumption from 2006 to 2016 and population in 2016. (f) Scatter plots of
extra growth of road length from 2013 to 2016 and population in 2016.

We calculate $\beta_{t}$ for GDP and road length of each city from 2000 to
2016 and $\beta_{t}$ for electricity consumption from 2006 to 2016. The curves
of probability density (which is a smoothed version of the histogram) of
$\beta_{t}$ are presented in Fig. 5c. No matter of what kind of urban
indicators, most cities have a $\beta_{t}$ greater than 1 (the vertical dashed
line), even though the $\beta_{t}$ for road length, whose $\beta_{c}$ is less
than 1. The average $\beta_{t}$ of cities for GDP, electricity consumption,
and road length are 3.18, 2.74, and 1.32, respectively. Correspondingly, the
average $\beta_{c}$ for GDP, electricity consumption, and road length are
1.14, 1.05, and 0.96, respectively. The $\beta_{c}$ and $\beta_{t}$ are
completely different from each other, strongly confirming the finding of
paradoxical scaling regimes across cities and over time.

The relationship between the extra growth and population size explains the
change of $\beta_{c}$ of GDP, electricity consumption, and road length (Fig.
5b-f). From 2000 to 2009, the extra growth of GDP is significantly and
positively correlated with population size in 2009, which means large cities
have higher extra growth of GDP, resulting in the increase of $\beta_{c}$ of
GDP during 2000-2009 (Fig. 5d). The $\beta_{c}$ of electricity obviously
decreases from 2006 to 2016, which can be explained by the significant and
negative correlation between the extra growth and population size (Fig. 5e).
The extra growth of road length from 2013 to 2016 are significantly and
negatively correlated with population size in 2016, which is consistent with
the decrease of $\beta_{c}$ of road length during 2013-2016 (Fig. 5f). These
correlations confirm our second finding that the extra growth of different-
sized cities determines the change of $\beta_{c}$.

Figure 6: Verification of the paradoxical scaling regimes across cities and
over time and the validity of the conceptual model using congestion-induced
delay in 101 American cities. (a) Varying trends of the cross-sectional
scaling exponents ($\beta_{c}$) between congestion-induced delay and the
number of car commuters from 1982 to 2014. (b) Frequency distribution of
$\beta_{t}$ from 1982 to 2014 of each city (101 cities). (c) Scatter plots of
extra growth of congestion-induced delay from 1982 to 2008 and population in
2008 in both logarithm scales. (d) Scatter plots of extra growth of
congestion-induced delay from 2008 to 2014 and the number of car commuters in
2014 in both logarithm scales.

We further use the congestion-induced delay in 101 American cities from 1982
to 2014 to verify our findings (Fig. 6). This is a public-accessed dataset and
it has been used in urban scaling studies depersin_global_2018 ;
bettencourt_interpretation_2019 . The $\beta_{c}$ of congestion-induced delay
(hours) and the number of car commuters (representing population size)
decreases from 1982 to 2008, and then it increases till 2014 (Fig. 6a). The
$\beta_{c}$ varies from 1.21 to 1.43, with a mean of 1.29. Different cities
have diverse $\beta_{t}$ during 1982-2014, with a mean of 2.41, which are
definitely different from $\beta_{c}$ (Fig. 6b). The correlation between extra
growth and population size explains the decreases of $\beta_{c}$ from 1982 to
2008 and its increase from 2008 to 2014, verifying the validity of the
conceptual model (Fig. 6c-d).

## Discussion

We discovered the paradoxical scaling regimes of built-up area and population
across cities and over time. Built-up area sub-linearly scales with population
across cities at time t luis_m._a._bettencourt_origins_2013 ;
rybski_cities_2017 ; batty_defining_2011 . Temporally, the worldwide faster
growth rate of built-up area than population in most individual cities results
in a super-linear scaling relationship over time marshall_urban_2007 ;
seto_meta-analysis_2011 ; angel_persistent_2010 ; xu_how_2019 . The
paradoxical scaling regimes imply that scaling exponent found across cities
cannot be applied to individual citiesdepersin_global_2018 . Previous studies
also have found different scaling exponents or regimes caused by varying
definitions of citiesarcaute_constructing_2015 ; cottineau_diverse_2017 ;
louf_scaling:_2014  or different groups strano_rich_2016 . Different from
these studies, the paradoxical scaling regimes found in this study reflects
the difference of characteristics across cities and over time along the
evolving system of cities.

Our study illustrates the absence of single scaling law for the temporal
development of a single city from the following three considerations. (1) In
terms of certain urban indicator, different cities have diverse temporal
scaling exponents and even opposite scaling regimes (Fig. 1d, Fig. 5c, Fig. 6b
). (2) One city has varying scaling exponents during different periods (Fig.
2a). (3) There is no obvious linear relationship between urban indicators and
population size over time in some cities, resulting in the bad performance of
the regression model (Fig. 9). These facts strongly and powerfully demonstrate
the temporal growth of individual cities will not follow the scaling law
across cities and the cross-sectional scaling law cannot be applied to
individual cities. Compared with the stable urban scaling law of urban
systems, there is no uniform and consistent law for the temporal trajectory of
a single city, particularly in countries with rapid urban transformation.

We proposed a conceptual model to reveal the evolutionary relationship between
$\beta_{c}$ and $\beta_{t}$. We found that it is the relative size, not the
absolute size, of $\beta_{t}$ of different-sized cities influences the
variation of $\beta_{c}$ of the system of cities. A city has an extra growth
of built-up area when it grows in population, beside the supposed growth
predicted by the cross-sectional scaling law. If large cities have higher
extra growth, $\beta_{c}$ increases over time; otherwise, it decreases. The
conceptual model not only reveals the contradiction between $\beta_{c}$ and
$\beta_{t}$, but also unify $\beta_{c}$ and $\beta_{t}$, and further explains
how temporal trajectories of individual cities ($\beta_{t}$) influences the
scaling exponent across cities ($\beta_{c}$).

$\beta_{c}$ reflects characteristics of the evolving system of cities. The
sub-linear scaling regime ($\beta_{c}$ < 1) between built-up area and
population indicates that large cities have a higher urban land use efficiency
compared to small cities. The comparative advantage of land use efficiency of
large cities decreased from 2000 to 2008 and then generally increased in
2008-2016. The $\beta_{c}$ of GDP increased from 2000 to 2009 and then
decreased to 2016, which indicates that large cities have a higher and higher
efficiency of economy performance from 2000 to 2009, but the pioneering
advantages of large cities decreased from 2009 to 2016. The variation trend of
$\beta_{c}$ for GDP is nearly consistent with built-up area. China joined the
WTO in 2001. Rapid urban expansion and fast economy growth mainly took place
in large cities during the first decade of the 21st century, resulting in the
decline in land use efficiency but the increase in economic efficiency in
large cities. After the economy crisis in 2008, China’s economic center
shifted to the interior and the inland, supporting the growth of small and
medium-sized cities, leading to the increase in land use efficiency but the
decline in economic efficiency in large cities. In addition, the decreasing of
$\beta_{c}$ for electricity reflects that the electricity supply meets the
demand of citizens in cities of all sizes. The $\beta_{c}$ of road length has
an overall increasing trend from 2000 to 2013 but with a decline from 2013 to
2016, indicating that large cities have a higher growth rate of roads before
2013.

## Conclusions

Scaling law is the simple rule behind the complex system of cities. Urban
area, as a kind of infrastructure, sub-linearly scales with urban population
because of economies of scale. However, urban area expands faster than
population grows in more individual cities over time, resulting in a super-
linear relationship over time. In this study, we revealed the paradoxical
scaling relationship between urban area and population across cities and over
time for the first time. The paradox clearly implies that scaling laws across
cities cannot be applied to the temporal growth of individual cities, which is
usually taken for granted.

We build a conceptual model to unify the difference between the scaling
relationship across cities and that over time, which shows cities have an
extra growth of urban area besides the supposed growth predicted by the
scaling law across cities. The differences of extra growth of urban area among
different-sized cities determine the change of the scaling exponent across
cities. If larger cities have higher extra growth, then the scaling exponent
across cities will increase at the next time point. We further verify the
paradoxical scaling relationships across cities and over time and the
effectiveness of the proposed conceptual model using other urban indicators in
Chinese cities and American cities. Our analyses on the scaling law across
cities and over time may open a new avenue towards the science of cities.

## Materials and Methods

### Study area and data

Our sample cities are 275 Chinese prefecture-level cities, including
megacities like Beijing and Shanghai and also medium-sized and small cities
(Fig. 7). We collected urban population and four urban indicators (built-up
area, GDP, household electricity consumption, and road length) in those
Chinese cities from the China Urban Construction Statistical Yearbook and the
China City Statistical Yearbook. The time period of the data is from 2000 to
2016 in each year except for electricity consumption data, which is from 2006
to 2016.

A key difficulty in urban studies is finding a practical way to define the
urban extentjiao_urban_2015 , which is also a skepticism and criticism point
in urban scaling analysisarcaute_constructing_2015 ; cottineau_diverse_2017 .
In this study, our statistical data of the urban extent is the built-up area,
which is defined as the area where urban infrastructure (e.g. road, water
supply, electricity, etc.) and public facilities (e.g. education, medicine
care, public administration, etc.) are basically available. The built-up area
reflects the physical extent of urbanized areas in Chinese cities. The
population used in a city is urban resident population within the urbanized
area, including registered population and floating populationxu_how_2019 . The
statistical extent (or unit) for GDP, household electricity consumption, and
road length is also the urbanized area. The validation dataset of congestion-
induced delay in 101 American cities from 1982 to 2014 is accessed from the
Texas A&M Transportation Institute (TTI) in the Urban Mobility Report (UMR).

All data sets are publicly available. Data from the China Urban Construction
Statistical Yearbook (http://www.mohurd.gov.cn/xytj/tjzljsxytjgb/jstjnj) is
open access on the website of the Ministry of Housing and Urban-Rural
Development of China. Data from the China City Statistical Yearbook is
accessed from the website of China National Knowledge Infrastructure (CNKI)
(http://data.cnki.net/yearbook/Single/N2018050234). Congestion-induced delay
data in American cities can be accessed from the Texas A&M Transportation
Institute (TTI) (http://tti.tamu.edu/documents/ums/congestion-data/complete-
data.xlsx). All data sets are available from the authors upon reasonable
request.

### Power function fitting

Urban indicators ($Y$) scale with population size($N$) in a power law form
across cities at time t:

$Y_{t}=Y_{0}N_{t}^{\beta}\quad.$ (3)

where $\beta$ is the scaling exponent and $Y_{0}$ is the constant. Taking the
logarithm of both sides of Eqs. (3) results in a linear relationship between
$\log N_{t}$ and $\log Y_{t}$.

$\log Y_{t}=\beta\log N_{t}+\log Y_{0}\quad.$ (4)

We use the ordinary least-squares (OLS) linear regression to fit the
logarithms and the slope is the scaling exponent ($\beta$). Although this
usual approach has been criticizedgudipudi_efficient_2019 ; leitao_is_nodate ,
it is still a popular approach in urban scaling analysis because of its
simplicity and ease of implementation. In spite of fitting the power law
relationship between urban indicators and population size across cities at
time $t$, we also adopt the linear regression model to fit the logarithms of
urban indicators and population in each city over time. We define the scaling
relationship between urban indicators and population across cities as the
cross-sectional urban scaling and that over time in an individual city as the
temporal urban scaling, resulting in the cross-sectional scaling
exponent($\beta_{c}$) and temporal scaling exponent($\beta_{t}$),
respectively.

## Funding

This research was funded by the China Postdoctoral Science Foundation
(BX20190251), the National Natural Science Foundation of China (41971368,
61903020).

## References

  * [1] Luís M. A. Bettencourt and Jasleen Kaur.  Evolution and structure of sustainability science.  Proceedings of the National Academy of Sciences of the United States of America, 108(49):19540–19545.  2011\.
  * [2] Christa Brelsford, José Lobo, Joe Hand, and Luís M. A. Bettencourt.  Heterogeneity and scale of sustainable development in cities.  Proceedings of the National Academy of Sciences, 114(34):8963–8968.  2017\.
  * [3] Michael Batty.  Building a science of cities.  Cities, 29:S9–S16.  2012\.
  * [4] Michael Batty.  The New Science of Cities.  MIT Press.  2013\.
  * [5] Luís MA Bettencourt.  Towards a statistical mechanics of cities.  Comptes Rendus Physique.  2019\.
  * [6] Marc Barthelemy.  Modeling cities.  Comptes Rendus Physique.  2019\.
  * [7] Marc Barthelemy.  The statistical physics of cities.  Nature Reviews Physics, page 1.  2019\.
  * [8] Geoffrey B. West.  Scale: The Universal Laws of Growth, Innovation, Sustainability, and the Pace of Life in Organisms, Cities, Economies, and Companies.  Penguin.  2017\.
  * [9] Michael Batty.  A theory of city size.  Science, 340(6139):1418–1419.  2013\.
  * [10] Michael Batty.  The size, scale, and shape of cities.  Science, 319(5864):769–771.  2008\.
  * [11] Luís M. A. Bettencourt, José Lobo, Dirk Helbing, Christian Kühnert, and Geoffrey B. West.  Growth, innovation, scaling, and the pace of life in cities.  Proceedings of the National Academy of Sciences, 104(17):7301–7306.  2007\.
  * [12] Luís M. A. Bettencourt.  The origins of scaling in cities.  Science, 340(6139):1438–1441.  2013\.
  * [13] Luis Bettencourt and Geoffrey West.  A unified theory of urban living.  Nature.  2010\.
  * [14] Diego Rybski, Sergey V. Buldyrev, Shlomo Havlin, Fredrik Liljeros, and Hernán A. Makse.  Scaling laws of human interaction activity.  Proceedings of the National Academy of Sciences, 106(31):12640–12645.  2009\.
  * [15] Jaegon Um, Seung-Woo Son, Sung-Ik Lee, Hawoong Jeong, and Beom Jun Kim.  Scaling laws between population and facility densities.  Proceedings of the National Academy of Sciences, 106(34):14236–14240.  2009\.
  * [16] Andres Gomez-Lievano, Oscar Patterson-Lomba, and Ricardo Hausmann.  Explaining the prevalence, scaling and variance of urban phenomena.  Nature Human Behaviour, 1(1):0012.  2016\.
  * [17] Ruiqi Li, Lei Dong, Jiang Zhang, Xinran Wang, Wen-Xu Wang, Zengru Di, and H. Eugene Stanley.  Simple spatial scaling rules behind complex cities.  Nature Communications, 8(1):1841.  2017\.
  * [18] Jules Depersin and Marc Barthelemy.  From global scaling to the dynamics of individual cities.  Proceedings of the National Academy of Sciences, 115(10):2317–2322.  2018\.
  * [19] Marc Keuschnigg, Selcan Mutgan, and Peter Hedström.  Urban scaling and the regional divide.  Science advances, 5(1):eaav0042.  2019\.
  * [20] Anthony FJ Van Raan, Gerwin Van Der Meulen, and Willem Goedhart.  Urban scaling of cities in the netherlands.  PLoS One, 11(1):e0146775.  2016\.
  * [21] Luís MA Bettencourt and José Lobo.  Urban scaling in europe.  Journal of The Royal Society Interface, 13(116):20160005.  2016\.
  * [22] Joao Meirelles, Camilo Rodrigues Neto, Fernando Fagundes Ferreira, Fabiano Lemes Ribeiro, and Claudia Rebeca Binder.  Evolution of urban scaling: Evidence from brazil.  PloS one, 13(10):e0204574.  2018\.
  * [23] Anand Sahasranaman and Luís MA Bettencourt.  Urban geography and scaling of contemporary indian cities.  Journal of the Royal Society Interface, 16(152):20180758.  2019\.
  * [24] Daniel Zünd and Luís MA Bettencourt.  Growth and development in prefecture-level cities in china.  PloS one, 14(9):e0221017.  2019\.
  * [25] Scott G Ortman, Andrew HF Cabaniss, Jennie O Sturm, and Luis MA Bettencourt.  The pre-history of urban scaling.  PloS one, 9(2):e87902.  2014\.
  * [26] Scott G. Ortman, Andrew H. F. Cabaniss, Jennie O. Sturm, and Luís M. A. Bettencourt.  Settlement scaling and increasing returns in an ancient society.  Science Advances, 1(1).  2015\.
  * [27] Rudolf Cesaretti, José Lobo, Luís MA Bettencourt, Scott G Ortman, and Michael E Smith.  Population-area relationship for medieval european cities.  PloS one, 11(10):e0162678.  2016\.
  * [28] K. Yakubo, Y. Saijo, and D. Korošak.  Superlinear and sublinear urban scaling in geographical networks modeling cities.  Physical Review E, 90(2):022803.  2014\.
  * [29] Jiang Zhang, Xintong Li, Xinran Wang, Wen-Xu Wang, and Lingfei Wu.  Scaling behaviours in the growth of networked systems and their geometric origins.  Scientific reports, 5:9767.  2015\.
  * [30] Fabiano L Ribeiro, Joao Meirelles, Fernando F Ferreira, and Camilo Rodrigues Neto.  A model of urban scaling laws based on distance dependent interactions.  Royal Society open science, 4(3):160926.  2017\.
  * [31] Luís MA Bettencourt, José Lobo, Deborah Strumsky, and Geoffrey B West.  Urban scaling and its deviations: Revealing the structure of wealth, innovation and crime across cities.  PloS one, 5(11):e13541.  2010\.
  * [32] Luiz GA Alves, Renio S Mendes, Ervin K Lenzi, and Haroldo V Ribeiro.  Scale-adjusted metrics for predicting the evolution of urban indicators and quantifying the performance of cities.  PloS One, 10(9):e0134862.  2015\.
  * [33] Luiz GA Alves, Haroldo V Ribeiro, Ervin K Lenzi, and Renio S Mendes.  Distance to the scaling law: a useful approach for unveiling relationships between crime and urban metrics.  Plos one, 8(8):e69580.  2013\.
  * [34] José Lobo, Luís MA Bettencourt, Deborah Strumsky, and Geoffrey B West.  Urban scaling and the production function for cities.  PLoS One, 8(3):e58407.  2013\.
  * [35] Anand Sahasranaman and Luis Bettencourt.  Economic geography and the scaling of urban and regional income in india.  arXiv preprint arXiv:1902.09872.  2019\.
  * [36] Rémi Louf and Marc Barthelemy.  Scaling: Lost in the smog.  Environment and Planning B: Planning and Design, 41(5):767–769.  2014\.
  * [37] Diego Rybski, Dominik E Reusser, Anna-Lena Winz, Christina Fichtner, Till Sterzel, and Jürgen P Kropp.  Cities as nuclei of sustainability?  Environment and Planning B: Urban Analytics and City Science, 44(3):425–440.  2017\.
  * [38] Elsa Arcaute, Erez Hatna, Peter Ferguson, Hyejin Youn, Anders Johansson, and Michael Batty.  Constructing cities, deconstructing scaling laws.  Journal of The Royal Society Interface, 12(102):20140745.  2015\.
  * [39] Clémentine Cottineau, Erez Hatna, Elsa Arcaute, and Michael Batty.  Diverse cities or the systematic paradox of urban scaling laws.  Computers, Environment and Urban Systems, 63:80–94.  2017\.
  * [40] Michael Batty and Peter Ferguson.  Defining city size.  Environment and Planning B: Planning and Design, 38(5):753–756.  2011\.
  * [41] Ramana Gudipudi, Diego Rybski, Matthias K. B. Lüdeke, Bin Zhou, Zhu Liu, and Jürgen P. Kropp.  The efficient, the intensive, and the productive: Insights from urban kaya scaling.  Applied Energy, 236:155–162.  2019\.
  * [42] J. C. Leitão, J. M. Miotto, M. Gerlach, and E. G. Altmann.  Is this scaling nonlinear?  Royal Society Open Science, 3(7):150649.  2016\.
  * [43] Emanuele Strano and Vishal Sood.  Rich and poor cities in europe. an urban scaling approach to mapping the european economic transition.  PLOS ONE, 11(8):e0159465.  2016\.
  * [44] Nicholas Z Muller and Akshaya Jha.  Does environmental policy affect scaling laws between population and pollution? evidence from american metropolitan areas.  PloS one, 12(8):e0181407.  2017\.
  * [45] Fabien Paulus, Denise Pumain, Céline Vacchiani-Marcuzzo, and José Lobo.  An evolutionary theory for interpreting urban scaling laws.  2006\.
  * [46] Denise Pumain.  Urban systems dynamics, urban growth and scaling laws: The question of ergodicity.  In Juval Portugali, Han Meyer, Egbert Stolk, and Ekim Tan, editors, Complexity Theories of Cities Have Come of Age: An Overview with Implications to Urban Planning and Design, pages 91–103. Springer Berlin Heidelberg.  2012\.
  * [47] Julian D. Marshall.  Urban land area and population growth: A new scaling relationship for metropolitan expansion.  Urban Studies, 44(10):1889–1904.  2007\.
  * [48] Marc Keuschnigg.  Scaling trajectories of cities.  Proceedings of the National Academy of Sciences, 116(28):13759–13761.  2019\.
  * [49] Luis Bettencourt, Vicky Chuqiao Yang, José Lobo, Chris Kempes, Diego Rybski, and Marcus Hamilton.  The interpretation of urban scaling analysis in time.  Mansueto Institute for Urban Innovation Research Paper Forthcoming.  2019\.
  * [50] Fabiano L. Ribeiro, Joao Meirelles, Vinicius M. Netto, Camilo Rodrigues Neto, and Andrea Baronchelli.  On the relation between transversal and longitudinal scaling in cities.  arXiv:1910.02113 [physics].  2019\.
  * [51] Karen C. Seto, Michail Fragkias, Burak Güneralp, and Michael K. Reilly.  A meta-analysis of global urban land expansion.  PLOS ONE, 6(8):e23777.  2011\.
  * [52] Shlomo Angel, Jason Parent, Daniel L Civco, and Alejandro M Blei.  Persistent Decline in Urban Densities: Global and Historical Evidence of ‘Sprawl’.  Lincoln Institute of Land Policy.  2010\.
  * [53] Gang Xu, Limin Jiao, Man Yuan, Ting Dong, Boen Zhang, and Chunmeng Du.  How does urban population density decline over time? an exponential model for chinese cities with international comparisons.  Landscape and Urban Planning, 183:59–67.  2019\.
  * [54] Limin Jiao.  Urban land density function: A new method to characterize urban expansion.  Landscape and Urban Planning, 139:26–39.  2015\.

##  I Supplementary Information

Figure 7: The spatial distribution of 275 Chinese prefecture-level cities and
their population in 2016.  Figure 8: Scaling of built-up areas and population
across cities in China in each year from 2000 to 2016. Built-up areas and
population are in the logarithmic scale with a linear fit using the ordinary
least squares (OLS). Cities with residuals greater than twice the standard
deviation of residual in the initial regression model are considered as
outliers. After the outliers are removed, the linear regression is performed
again to obtain the final regression equation and scaling exponent, which are
shown as the red straight lines. For all cases, p-value < 0.001.  Figure 9:
Frequency distribution of $R^{2}$ of the linear regression for fitting the
temporal relationship between built-up area and urban population from 2000 to
2016 in 275 individual cities.  Figure 10: Scaling of three urban indicators
and population across Chinese cities in each year. (a) GDP (gross domestic
product), (b) Household electricity consumption, and (c) Road length. Both
urban indicators and population are in the logarithmic scale with a linear fit
using the ordinary least squares (OLS). Cities with residuals greater than
twice the standard deviation of residual in the initial regression model are
considered as outliers. After the outliers are removed, the linear regression
is performed again to obtain the final regression equation and scaling
exponent, which are shown as the red straight lines. For all cases, p-value <
0.001.