Skip to content

European Chinese Law Research Hub

  • Home
  • About Us
  • Follow Us
European Chinese Law Research Hub

Rule by Algorithm: When Code Displaces Law

A new paper by Michelle Miao


The Question

When states discover that algorithms are able to do what law does in contemporary societies, such as regulating the behaviours of individuals, implementing top-down polices, and managing bureaucratic acts, and can do this even quicker, more cheaply, without political risks as genuine legal institutions do, what would happen? The question sits at the heart of this article. Using two case studies, it surveys how algorithmic governance becomes a new form of social control in contemporary China. Tracing the increasingly prevalent phenomenon where algorithmic systems are performing functions traditionally ascribed to law, this piece seeks to understand the implications of this transition for the future of the rule of law in China and beyond.

Moving Beyond the Debate on the Rule-of-Law

For decades, generations of Chinese law and politics scholars have debated whether China’s legal system is moving toward the rule of law or away from it. The controversy derives from profound ambiguity between the theories and practice of law in China. Critics claim that the regime has strategically embraced rule-of-law rhetoric such as “socialist rule of law” and “rule of law with Chinese characteristics” to fend off genuine institutional commitments that would bar rulers from exercising unbridled political power. This article suggests that the long-running debate may be better understood through an alternative frame. The most consequential distinction may not depend on the regime’s attitudinal difference between rule by law (or rule by man) and rule of law. Rather, to reveal the essential character of Chinese governance, one may find it a fruitful path to observe the regime’s choice between law-based and algorithmic-enabled governance. Instead of asking whether China is becoming more or less a rule-of-law country, the article asks whether law itself is being displaced as the primary instrument through which the state governs its population.

Two Case Studies: The Health QR Code and the Social Credit System

To make this case, the article examines two systems in detail. The first is the health QR code, deployed nationwide during the COVID-19 pandemic. Colour-coded and algorithmically assigned, these digital badges determined whether citizens could use public transport, enter hospitals, or move between neighbourhoods — all based on real-time data processed with automated AI systems. The QR code systems operate independently of legal rules or judicial institutions. From their design to application, these highly automated systems constitute a highly effective means of social surveillance and control. They collapsed the distance between norm and enforcement into a single automated act. A citizen’s freedom of movement was not restricted by a judicial decision issued by a court or a police officer, which is subject to judicial review and appeal. Under the health QR code regime, essential liberty and fundamental rights could be deprived, restricted and curtailed by a colour change on a digital screen, generated by an algorithm whose inputs and logic were opaque to the person it governed.
The second system is the social credit framework, under which local and departmental social credit systems track and evaluate behaviour across economic, social, and, in some implementations, political domains. Unlike the health QR code, which operated as a pandemic-era emergency measure, the social credit system represents a longer-term institutional ambition: the creation of a comprehensive, data-driven mechanism for assessing trustworthiness and allocating consequences accordingly. Citizens and businesses that score well in respective local schemes receive preferential treatment — expedited administrative approvals, favourable credit terms, and public praise. Those who score poorly face restrictions — exclusion from government contracts, reputational penalties — imposed not through judicial proceedings but through automated, algorithmic processes. Both systems illustrate what the article calls the “algorithmic turn”: a structural shift from governance through legal institutions — with their procedural safeguards, interpretive discretion, and institutional accountability — to governance through data-driven, automated decision-making.

Three Comparative Advantages of Algorithmic Governance

The article identifies three comparative advantages that algorithmic governance offers authoritarian rulers over traditional law. First, algorithms strengthen bureaucratic control by automating oversight of officials and reducing the principal-agent problems that plague hierarchical administration. Where law depends on human intermediaries who may resist, reinterpret, or selectively enforce directives, algorithms execute uniformly and without discretion. The central leadership’s intent is encoded directly into the system; local variation and bureaucratic resistance are engineered out.
Furthermore, algorithms enable extensive surveillance and behaviour modification in real time and with a granularity that legal processes cannot offer. For instance, they can limit movement in real-time or nudge citizens towards state-approved conduct through reputational incentives. The law works in broad categories: allowed, prohibited, mandatory. Algorithms function on a constant slide, modulating rewards and punishment based on real-time behavioural data with an intricacy no legal code could hope to achieve.
Third, algorithms accomplish ideological neutralization, as suggested by the article. Algorithms are said to be neutral, technical devices that are scientific, data-driven, and free of politics. Unlike legal norms, they do not make their normative commitments explicit and thus do not invite contestation. This false sense of neutrality permits regimes to weave political preferences directly into the architecture of government while deflecting accusations of arbitrariness or ideological coercion. A law that restricts travel is recognisable as a political act and can be challenged as such. An algorithm that changes the color of a QR code seems to be just data and science.

Algorithmic Authoritarianism

The article does not argue that algorithms have replaced the rule of law in China. The relationship is more nuanced. Algorithmic systems supplement legal institutions in routine domains while circumventing them in politically sensitive ones. Law remains formally in place; it has not been repealed or denounced. But its functional significance declines where algorithmic systems can achieve the same (or even better!) regulatory outcomes without the institutional friction and ideological contradiction that legal processes create and sustain. This is why authoritarian rulers would shift to a new form of governance the article describes as “algorithmic authoritarianism” — a model of regime in which the traditional constraints of legality are rendered irrelevant albeit not abolished altogether. This term captures what the existing concepts — rule of law, rule by law, rule by man, authoritarian legality — do not fully cover: a mode of governance in which the question is no longer how law is used or abused, but whether law remains the key instrument of governance at all.

Implications Beyond China

Questions about rule of law have become pressing beyond China as powerful actors are using algorithms to make important decisions. An algorithm performs a governance function when it denies you a loan, flags a traveller for further screening or determines that a welfare claimant is ineligible. This applies to both liberal democracies and autocracies. Algorithms have been applied in both public affairs and private market, ranging from credit scoring, predictive policing, welfare eligibility, medical examination and warfare. Democratic states may encounter similar tensions as described in the article. On the one hand, algorithmic systems promise efficiency, consistency, and scale. Meanwhile, algorithms function without the procedural safeguards and accountability structures that legitimate the democratic exercise of public power. The rule of law exists to offer reasoned justification and the ability to challenge. These are not the values embedded in algorithmic governance. As Langdon Winner reminds us, “[t]he things we call ‘technologies’ are ways of building order in our world.” The situation in the People’s Republic of China is extreme; but it is not unique. It brings to light, in sharpened form, a tension between algorithmic functionality and legal accountability which has not been resolved by any jurisdiction yet.

The paper Rule by Algorithm was published in the Columbia Journal of Transnational Law 63, (2025). Michelle Miao is an Associate Professor at the Faculty of Law, the Chinese University of Hong Kong, and was a Fellow of the Center for Advanced Study in the Behavioral Sciences at Stanford University when she wrote this article.

The statements made in this blog post do not reflect the views of the blog editor.

General

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Idealist by NewMediaThemes